efficient-storefront-blocks 0.78.0 → 0.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/chunks/EditorPreviewCheckout-6S2Q3GXI.js +4 -0
- package/dist/chunks/{SiteEditorProvider-YTZPWUDV.js → SiteEditorProvider-B6JGOUMX.js} +1 -1
- package/dist/chunks/chunk-IL5OJ6VZ.js +1 -0
- package/dist/chunks/chunk-NE47RYTU.js +320 -0
- package/dist/chunks/{chunk-4O66UMLS.js → chunk-WYNB6IMA.js} +1 -1
- package/dist/chunks/chunk-ZA227AIS.js +1 -0
- package/dist/chunks/{fitment-data-VU5A7VKV.js → fitment-data-KCPZ77HO.js} +1 -1
- package/dist/contract.js +1 -1
- package/dist/editor/lib/document/blocks/service/ContactCards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterEmailSignup/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterMessaging/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/MessagingCards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/OpeningHours/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/RateTable/fields.js +1 -1
- package/dist/editor/lib/document/box-header.d.ts +1 -1
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +28 -34
- package/dist/links.js +1 -1
- package/dist/render/app/globals.css +39 -1
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/checkout/checkout-state.js +3 -3
- package/dist/render/lib/api/index.d.ts +3 -0
- package/dist/render/lib/api/index.js +1 -1
- package/dist/render/lib/api/types.d.ts +46 -0
- package/dist/render/lib/checkout/pay-first.d.ts +5 -1
- package/dist/render/lib/checkout/pay-first.js +1 -1
- package/dist/render/lib/document/lazy-draws.js +1 -1
- package/dist/words.d.ts +11 -0
- package/dist/words.js +4 -4
- package/package.json +3 -3
- package/dist/chunks/EditorPreviewCheckout-IEFQC4T3.js +0 -4
- package/dist/chunks/chunk-LZTJCQ4A.js +0 -311
- package/dist/chunks/chunk-MZPZ4B7Y.js +0 -1
- package/dist/chunks/chunk-WC4XIVX3.js +0 -1
- /package/dist/chunks/{chunk-LZTJCQ4A.js.LEGAL.txt → chunk-NE47RYTU.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-TI4ZGDSG.js → chunk-PBU5KHED.js} +0 -0
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import{$ as Jx,B as jx,C as Kx,D as qx,Da as ne,F as Vx,G as Nd,Ha as iI,I as Yx,Ia as cI,J as Co,K as tr,Ka as Js,L as Xx,La as dI,M as Zo,Ma as fI,N as Xs,Q as Zx,R as Md,Ra as uI,U as Zs,V as Hd,X as Gd,a as Ft,b as Ad,fa as rr,h as Gx,ha as Qx,i as Ld,j as Bd,ja as eI,k as eo,l as Wx,la as oI,m as zx,ma as Eo,n as Xr,na as Qr,o as Xo,oa as tI,p as Zr,pa as dt,q as Jr,qa as Wd,ra as rn,s as Ux,v as tn,va as an,x as $x,xa as rI,y as Dd,za as aI}from"./chunk-IL5OJ6VZ.js";import{d as nI,e as nn,f as sI,g as lI,j as ea,n as zd}from"./chunk-PBU5KHED.js";var we=e=>typeof e=="string"&&e?e:void 0;var mI="en",Qs=null,hI=mI,xI=null;function tY(e,o,t){Qs=e??null,hI=o||mI,xI=t??null}function Q(){return xI}function Ud(){return hI}function II(){return Qs}function pI(e,o){return o?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,r)=>Object.prototype.hasOwnProperty.call(o,r)?String(o[r]):t):e}function i(e,o){let t=Qs?Qs[e]:void 0;if(typeof t=="function"){try{let r=we(t(o??{}));if(r)return r}catch{}return pI(e,o)}return pI(we(t)??e,o)}function io(e,o,t,r){return i(t===1?e:o,{...r,n:t})}import{jsx as $d,Fragment as WF,jsxs as zF}from"react/jsx-runtime";import{createContext as UF,useContext as $F}from"react";var jF={mirrorHostStyles:!0,css:null,fontHrefs:[]},gI=UF(jF);function sY({value:e,children:o}){return $d(gI.Provider,{value:e,children:o})}function jd(){return $F(gI)}function bI(){let{css:e,fontHrefs:o}=jd();return zF(WF,{children:[o.map(t=>$d("link",{rel:"stylesheet",href:t},t)),e?$d("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as KF}from"react/jsx-runtime";import{createContext as qF,useContext as VF}from"react";var yI=qF(void 0);function dY({metadata:e,children:o}){return KF(yI.Provider,{value:e,children:o})}var SI=()=>VF(yI);import{jsx as Je,Fragment as TF,jsxs as Ks}from"react/jsx-runtime";import{useCallback as qs,useEffect as ct,useRef as OV,useState as CF}from"react";import{SettingsSwitch as FV}from"efficient-easel/panel";import{PagesIcon as _V,StylesIcon as RV}from"efficient-easel/rail";import{PaletteIcon as AV}from"efficient-shell/icons/efficient";import{Subtree as LV,TreeRow as PF}from"efficient-easel/tree";import{useEasel as EF}from"efficient-easel/easel";import{useEaselStrings as OF}from"efficient-easel/strings";import{createContext as YF,useContext as XF}from"react";var Kd=YF(!1),pY=()=>XF(Kd);import{jsx as fe,Fragment as hw,jsxs as Mn}from"react/jsx-runtime";import{Fragment as w3,useEffect as k3,useId as v3,useMemo as xw,useRef as T3,useState as $t}from"react";import{useScreenDocument as kw}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Pp}from"efficient-easel/draw/client";import P3 from"efficient-easel/screen/components/SidePanelHead";import{jsx as oe,Fragment as Er,jsxs as Pr}from"react/jsx-runtime";import{useEasel as sw,useRootFields as v4}from"efficient-easel/easel";import{Inspector as T4}from"efficient-easel/fields";import{SettingsGroup as P4}from"efficient-easel/panel";import{useEffect as E4,useRef as O4,useState as Gi}from"react";import{jsx as nr,Fragment as F_,jsxs as __}from"react/jsx-runtime";import{useState as AI}from"react";import{SettingsDefaultReset as R_,SettingsField as A_}from"efficient-easel/panel";import{useEaselStrings as L_}from"efficient-easel/strings";import{AddIcon as B_}from"efficient-easel/icons";import{Button as D_}from"efficient-shell/ui";import{iconOf as N_,noGlyph as M_}from"efficient-easel/screen/lib/document/box-fields";import{jsx as ee,jsxs as Rt,Fragment as p_}from"react/jsx-runtime";import{parseHexColor as m_}from"efficient-shell/format";import{Button as Yd,IconButton as h_,Tooltip as x_}from"efficient-shell/ui";import{jsx as _t,jsxs as n_}from"react/jsx-runtime";import{AccentIcon as s_}from"efficient-easel/icons";import{Button as l_,Tooltip as i_}from"efficient-shell/ui";import{jsx as ar,jsxs as kI}from"react/jsx-runtime";import{ColorPicker as JF,HexInput as QF}from"efficient-shell/ui";import{SettingsDefaultReset as e_,SettingsField as o_}from"efficient-easel/panel";import{typedHex as qd}from"efficient-easel/pick";import{typedHex as ZF}from"efficient-easel/pick";function CI(e){let o=new Set,t=[];return eo(e).themes.forEach((r,a)=>{let n=[[i("Theme {n} main color",{n:a+1}),r.accent],[i("Theme {n} text color",{n:a+1}),r.text],[i("Theme {n} background",{n:a+1}),r.background]];for(let[s,l]of n){let c=l?ZF(l):null;!c||o.has(c)||(o.add(c),t.push({name:s,value:c}))}}),t}var wI="Not set";function t_({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,ariaLabel:s}){return ar(a_,{value:e,onChange:o,label:i(s??t),id:r,caption:a,inherited:n})}function r_(){let{theme:e}=ne();return CI(e).map(o=>({value:o.value,label:o.name}))}function a_({value:e,onChange:o,label:t,id:r,caption:a,inherited:n}){let s=r_(),l=e?null:qd(n??""),c=a!==void 0&&(!e||qd(a)!==qd(e))?a:null,d=u=>{u!==e&&o(u)};return kI("div",{className:"sf-colour",children:[ar(JF,{id:r,value:e,onChange:d,label:t,presets:s,fallback:l??void 0,size:"md",align:"start"}),c!==null?ar("span",{className:"sf-colour-caption",children:c}):ar("span",{className:"sf-colour-hexwrap",children:ar(QF,{value:e||l||"",onChange:d,label:i("{label} hex code",{label:t}),placeholder:e||l?void 0:i(wI),className:l?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function wo({label:e,icon:o,changed:t,hint:r,onReset:a,resetTo:n,children:s,...l}){return kI(o_,{label:e,icon:o,htmlFor:l.id,changed:t,hint:r,action:a?ar(e_,{words:Q()?.panel,label:e,changed:!!t,detail:n,onReset:a}):void 0,children:[t_({...l,label:e}),s]})}function el({label:e,icon:o,value:t,inherited:r,resetTo:a,onChange:n,onReset:s,hint:l}){let c=!!t;return ar(wo,{label:e,icon:o,value:t,inherited:c?void 0:r,onChange:n,changed:c,onReset:s,resetTo:a,hint:l})}function Vd(e){return Xo(e).background}function c_(e){let o=Ft(e.accent,Vd(e));return o===null?null:{ratio:o,grade:Jr(o)}}function d_(e){let o=Vd(e),t=Ft(e.accent,o);return t===null?[]:Ux(e.accent).filter(r=>{let a=Ft(r,o);return a!==null&&a>t&&Jr(a)==="good"})}var f_={good:"Easy to read","large-only":Zr["large-only"],hard:Zr.hard};function vI({value:e,onChange:o}){let t=c_(e),r=t?.grade,a=t&&t.grade!=="good"?d_(e):[];return _t(wo,{label:i("Main color"),icon:_t(s_,{}),hint:t?i(f_[t.grade]):void 0,value:e.accent,onChange:n=>o({...e,accent:n}),children:a.length>0?_t("div",{className:"w-full min-w-0",children:n_("div",{className:"sf-readability",children:[_t("p",{className:"sf-readability-advice",children:u_(r,!0)}),_t("div",{className:"sf-readability-suggestions",children:a.map(n=>{let s=Ft(n,Vd(e));return _t(i_,{content:i("Use {colour}",{colour:n.toUpperCase()}),children:_t(l_,{variant:"secondary",className:"sf-readability-suggestion",leftIcon:_t("span",{className:"sf-readability-chip",style:{background:n},"aria-hidden":!0}),onClick:()=>o({...e,accent:n}),children:s?`${s.toFixed(1)}:1`:n.toUpperCase()})},n)})})]})}):null})}function u_(e,o){return e?e==="good"?i("This color reads clearly on your pages."):o?i("This color is hard to read on this theme's page. The buttons below are the same hue, darkened."):i("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."):i("Pick a color to see how it reads.")}import{ButtonIcon as I_,ChevronDownIcon as PI,ChevronUpIcon as g_,GroundIcon as b_,LayoutIcon as y_,SquareIcon as S_,TextSmallIcon as C_,TypeIcon as TI}from"efficient-easel/icons";var sn=e=>i("Theme {n}",{n:e+1});function EI({colors:e}){let o=Xo(e),t=tn(e)??o.accent;return Rt("span",{className:"sf-theme-page",style:{background:o.background,color:o.text},"aria-hidden":!0,children:[ee("span",{className:"sf-theme-eyebrow",style:{color:o.muted},children:i("label")}),Rt("span",{className:"sf-theme-headline",children:[i("Heading")," ",ee("span",{style:{color:o.accent},children:i("accent")})]}),ee("span",{className:"sf-theme-body",children:i("body text")}),Rt("span",{className:"sf-theme-row",children:[ee("span",{className:"sf-theme-btn",style:{background:t,color:Dd(e,o.accent)},children:i("button")}),ee("span",{className:"sf-theme-mini",style:{background:o.surface,borderColor:o.line},children:i("card")})]})]})}var Xd={"Text color":ee(TI,{}),"Label color":ee(C_,{}),Background:ee(b_,{}),"Panels & cards":ee(y_,{}),Borders:ee(S_,{}),"Button color":ee(I_,{}),"Button text color":ee(TI,{})};function w_({label:e,colorKey:o,value:t,onChange:r,idPrefix:a="sf-theme-ink"}){let n=`${a}-${o}`;return ee(wo,{label:i(e),icon:Xd[e],id:n,value:t,onChange:s=>r(o,s)})}function k_({value:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button`,n=e!==void 0&&m_(e)===e.toLowerCase(),s=n?e:o;return ee(wo,{label:i("Button color"),icon:Xd["Button color"],id:a,value:s,caption:n?s:i("Main"),onChange:t})}function v_({colors:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button-ink`,n=$x(e),s=Dd(e,o),l=tn(e)??o,c=Jr(Ft(s,l)??0);return ee(wo,{label:i("Button text color"),icon:Xd["Button text color"],hint:n&&c!=="good"?i("{grade} on the button",{grade:i(Zr[c])}):void 0,id:a,value:s,caption:n?s:i("Auto"),onChange:t})}var T_=[{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 Zd({colors:e,onChange:o,idPrefix:t}){let r=Xo(e);return ee(p_,{children:T_.map(a=>"colour"in a?ee(vI,{value:e,onChange:o},"colour"):"moduleBreak"in a?ee("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in a?ee(k_,{value:e.button,accent:r.accent,onChange:n=>o({...e,button:n}),idPrefix:t},"button"):"buttonInk"in a?ee(v_,{colors:e,accent:r.accent,onChange:n=>o({...e,buttonInk:n}),idPrefix:t},"buttonInk"):ee(w_,{label:a.label,colorKey:a.key,value:r[a.key],onChange:(n,s)=>o({...e,[n]:s}),idPrefix:t},a.key))})}function ol({index:e,colors:o,selected:t,role:r="radio",open:a,editable:n=!0,onPick:s,onEdit:l,onChangeColors:c}){let d=Xo(o),u=sn(e),h=e<Bd.length&&!o.brandInk?Bd[e]:null,p=Jr(Ft(d.text,d.background)??0),x=h?JSON.stringify(o)!==JSON.stringify(h):!1,g=a!==void 0;return Rt("div",{className:`sf-theme-card${t?" is-selected":""}`,children:[ee("button",{type:"button",role:r,"aria-checked":r==="radio"?t:void 0,"aria-selected":r==="option"?t:void 0,"aria-label":u,className:"sf-theme-pick",onClick:s,children:ee(EI,{colors:o})}),Rt("div",{className:"sf-theme-foot",children:[ee("span",{className:"sf-theme-name",children:u}),p!=="good"&&ee("span",{className:"sf-theme-warn",children:i(Zr[p])}),n&&l&&g&&ee("span",{className:"sf-theme-edit",children:ee(x_,{content:a?i("Collapse"):i("Edit colors"),children:ee(h_,{size:"sm","aria-expanded":a,"aria-controls":`sf-theme-colours-${e}`,"aria-label":a?i("Collapse {name}",{name:u}):i("Edit colors for {name}",{name:u}),onClick:l,children:a?ee(g_,{size:14}):ee(PI,{size:14})})})}),n&&l&&!g&&ee(Yd,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":i("Edit {name}",{name:u}),onClick:l,children:i("Edit")})]}),a&&Rt("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[ee(Zd,{colors:o,onChange:y=>c?.(y)}),h&&ee(Yd,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!x,onClick:()=>c?.({...h}),children:x?i("Reset {name} to the preset",{name:u}):i("Not changed")})]})]})}function OI({colors:e,name:o,nameId:t,open:r,menuId:a,labelId:n,buttonRef:s,onClick:l,onKeyDown:c,onEdit:d}){return Rt("div",{className:"sf-secttheme-btn",children:[ee("button",{ref:s,type:"button",className:"sf-theme-pick","aria-expanded":r,"aria-controls":a,"aria-labelledby":`${n} ${t}`,onClick:l,onKeyDown:c,children:e?ee(EI,{colors:e}):ee("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),Rt("div",{className:"sf-theme-foot",children:[ee("span",{id:t,className:"sf-theme-name",children:o}),d&&ee(Yd,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":i("Edit {name}",{name:o}),onClick:d,children:i("Edit")}),ee("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:l,children:ee(PI,{size:12,className:"sf-multi-caret","aria-hidden":"true"})})]})]})}import{jsx as tl,Fragment as P_,jsxs as FI}from"react/jsx-runtime";import{Button as _I,Dialog as E_}from"efficient-shell/ui";function O_(e){return io("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 RI({count:e,onCancel:o,onConfirm:t}){return FI(E_,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:i("Clear this site\u2019s colors?"),footer:FI(P_,{children:[tl(_I,{variant:"secondary",onClick:o,children:i("Cancel")}),tl(_I,{variant:"danger",onClick:t,children:i("Clear colors")})]}),children:[tl("p",{children:O_(e)}),tl("p",{className:"mt-2 font-medium",children:i("This cannot be undone.")})]})}var H_=M_("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"),G_="Reset color",W_={selected:0,themes:[]};function z_(e){e(W_)}function LI({value:e,onChange:o}){let t=e?.themes??[],r=t.length===0,a=eo(e),[n,s]=AI(!1),l=L_(),[c,d]=AI(null),u=(O,C)=>{o({...a,themes:a.themes.map((I,w)=>w===O?C:I)})},h=Xr(a).accent,p=new Set(a.themes.map(O=>O.brandInk).filter(Boolean)),x=Wx.filter(O=>!p.has(O)).map(O=>zx(h,O)),g=[...a.themes,...x],y=O=>{if(O<a.themes.length)return o({...a,selected:O});let C=[...a.themes,g[O]];o({...a,themes:C,selected:C.length-1})},E=()=>{let O=[...a.themes,{...Xo(a.themes[a.selected])}];o({...a,themes:O,selected:O.length-1}),d(O.length-1)};return __(F_,{children:[r?null:nr(A_,{label:i(G_),icon:N_(H_),labelId:"sf-theme-reset",action:nr(R_,{label:i("all theme colors"),words:l.panel,changed:!0,onReset:()=>s(!0)})}),n&&nr(RI,{count:t.length,onCancel:()=>s(!1),onConfirm:()=>{s(!1),z_(o)}}),nr("div",{className:"sf-theme-list",role:"radiogroup","aria-label":i("Theme"),children:g.map((O,C)=>nr(ol,{index:C,colors:O,selected:C===a.selected,open:c===C&&C<a.themes.length,editable:C<a.themes.length,onPick:()=>y(C),onEdit:()=>d(I=>I===C?null:C),onChangeColors:I=>u(C,I)},C))}),nr(D_,{variant:"secondary",leftIcon:nr(B_,{}),onClick:E,className:"sf-theme-add",children:i("Add new theme")})]})}import{jsx as mi}from"react/jsx-runtime";import{SettingsDefaultReset as DM,SettingsField as NM}from"efficient-easel/panel";import{SquareIcon as MM}from"efficient-easel/icons";import{jsx as S,jsxs as Ia,Fragment as Gt}from"react/jsx-runtime";import{cloneElement as oS,createContext as TN,useContext as PN,useEffect as EN,useId as tS,useRef as oi,useState as wn}from"react";import{useEasel as Cu,useSelectedHost as ai}from"efficient-easel/easel";import{toDateKey as Tre,fromDateKey as Pre}from"efficient-shell/format";function U_(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function At(e){return typeof e=="string"?e:U_(e)?e.src:""}function lX(e,o,t){return Jd(e,o.split("."),t)}function Jd(e,o,t){if(o.length===0)return t(e);let[r,...a]=o,n=r.endsWith("[]"),s=n?r.slice(0,-2):r;if(!e||typeof e!="object"||Array.isArray(e))return e;let l=e;if(!(s in l))return e;let c=l[s];if(n){if(!Array.isArray(c))return e;let u=!1,h=c.map(p=>{let x=Jd(p,a,t);return x!==p&&(u=!0),x});return u?{...l,[s]:h}:e}let d=Jd(c,a,t);return d===c?e:{...l,[s]:d}}var $_=["upload","youtube"],j_="upload",dX={upload:"Upload",youtube:"YouTube"},K_=["background","click"],q_="background",fX={background:"Background",click:"Click to play"};function uX(e){return $_.includes(e)?e:j_}function pX(e){return K_.includes(e)?e:q_}var BI=/^[A-Za-z0-9_-]{11}$/,V_=/^(?:www\.|m\.|music\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.be)$/;function mX(e){let o=typeof e=="string"?e.trim():"";if(!o)return null;if(BI.test(o))return o;let t;try{t=new URL(/^[a-z]+:\/\//i.test(o)?o:`https://${o}`)}catch{return null}if(t.protocol!=="https:"&&t.protocol!=="http:"||!V_.test(t.hostname))return null;let r=t.pathname.split("/").filter(Boolean),a=t.hostname.endsWith("youtu.be")?r[0]:r[0]==="watch"?t.searchParams.get("v"):r[0]==="embed"||r[0]==="shorts"||r[0]==="live"||r[0]==="v"?r[1]:null;return a&&BI.test(a)?a:null}function hX(e,o){let t=o==="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}?${t}`}function xX(e){return`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`}function IX(e){return`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}var gX="Play video";var Qd={frame:"Video frame",image:"Image"},bX={any:[{field:"loadingShows",is:"image"},{all:[{not:{field:"loadingShows",set:!0}},{field:"poster",set:!0}]}]};function ef(e){let o=e.loadingShows;return o==="image"?"image":o!=null&&o!==""?"frame":At(e.poster)?"image":"frame"}function yX(e){return At(ef(e)==="image"?e.poster:e.videoFrame)||void 0}import{readHidable as Wt,hidableText as ON}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as rS,LINK_FIELD_MARKER as FN,MEDIA_FIELD_MARKER as _N,SCAFFOLD_FIELD_MARKER as RN,TEXT_FIELD_MARKER as ht,foldMetaOf as xt,textFieldIdentifier as Are}from"efficient-easel/draw";import{jsx as zI}from"react/jsx-runtime";import{useCallback as J_}from"react";import{useEasel as Q_}from"efficient-easel/easel";import{SettingsAction as eR}from"efficient-easel/panel";import{CORNER_SIDES as rl,hasCornerSubset as ln,normalizeCornerSides as Jo}from"efficient-easel/screen/lib/content/style-keys";function of(e){return typeof e=="number"&&Number.isFinite(e)}function kX(e,o){if(!of(e))return;let t=Xs(Zo(e));if(Object.keys(t).length===0)return;let r=t[tf];if(typeof r!="string")return t;let a=ln(o)?sr(r,Jo(o)??[]):r;return{...t,[Y_]:a}}var Y_="--sf-section-radius",tf="--sf-card-radius";function sr(e,o){return rl.map(t=>o.includes(t)?e:"0").join(" ")}var DI=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var X_="--sf-card-box-radius";function rf(e){return typeof e=="number"&&Number.isFinite(e)}function EX(e,o){if(!rf(e))return;let t=Xs(Zo(e))[tf];if(typeof t!="string")return;let r=ln(o)?sr(t,Jo(o)??[]):t;return{[X_]:r}}function NI(e,o){let t=e.find(n=>n?.props?.id===o);if(!t)return[...e];let r=t.props?.cardCorners,a=t.props?.cardCornerSides;return e.map(n=>n?.props?.id===o?n:{...n,props:{...n.props,cardCorners:r,cardCornerSides:a}})}import{locateNode as Z_}from"efficient-easel/draw";function cn(e){if(!e)return null;let o=e.lastIndexOf(":");return o>0?{ownerId:e.slice(0,o),slot:e.slice(o+1)}:null}function al(e,o,t){let r=cn(t?.zone),a=r?Z_(e,o,r.ownerId):null;return a&&r?{...a,slot:r.slot}:null}function MI(e,o,t){let r=al(e,o,t),a=r?.slot??"",n=r&&Array.isArray(r.item.props[a])?r.item.props[a]:[],s=t?.index??-1,l=s>=0?n[s]:void 0,c=l?.props?.id?String(l.props.id):"",d=Math.max(n.length-1,0);return!r||!c?{can:!1,reason:"unreachable",others:0}:n.length<=1?{can:!1,reason:"alone",others:d}:rf(l?.props?.cardCorners)?{can:!0,others:d,zone:r.zone,index:r.index,data:{...r.item,props:{...r.item.props,[a]:NI(n,c)}}}:{can:!1,reason:"unset",others:d}}function HI(e){return e.can?io("Gives the other card this card's Corners.","Gives the other {n} cards this card's Corners.",e.others):e.reason==="alone"?i("This is the only card in the section."):e.reason==="unset"?i("Set this card's corners first."):i("This card is not in a section that can share corners.")}function GI(e){return io("Applied to {n} card","Applied to {n} cards",e)}function WI(e,o){e.can&&o(e.zone,e.index,e.data)}import{useSectionOps as oR}from"efficient-easel/screen/lib/document/use-section-ops";var tR="apply-corners-to-siblings",rR="Apply to all cards";function aR({plan:e,onPress:o}){return zI(eR,{id:tR,label:i(rR),note:HI(e),disabled:!e.can,doneLabel:GI(e.others),onPress:o})}function UI(){let{appState:e,config:o}=Q_(n=>n),t=oR(),r=MI(o,e.data.content??[],e.ui.itemSelector),a=J_(()=>{WI(r,t.replaceComponent)},[r,t]);return zI(aR,{plan:r,onPress:a})}import{isShown as bR,lazyShowWhenContext as yR}from"efficient-shell/format";var lr="product",nl="recordType",nR={key:lr,label:"Product",fields:[]},sR=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,lR=/^[a-z][A-Za-z0-9]*$/,iR=["text","date"],$I=new Map,jI=0;function cR(e){if(typeof e.key!="string"||!sR.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===lr)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 o=new Set;for(let t of e.fields){if(typeof t.key!="string"||!lR.test(t.key)||o.has(t.key))throw new Error(`The record type ${e.key} has a field key it cannot use: ${JSON.stringify(t.key)}.`);if(!iR.includes(t.kind))throw new Error(`The field ${t.key} of ${e.key} has no kind ${JSON.stringify(t.kind)}.`);o.add(t.key)}return{key:e.key,label:e.label.trim(),fields:e.fields.map(t=>({...t}))}}function $X(e){let o=e.map(cR);for(let t of o)$I.set(t.key,t);o.length&&(jI+=1)}function af(){return[nR,...$I.values()]}function nf(){return jI}function sf(e){let o=e?.[nl];return typeof o!="string"?lr:o.trim()||lr}function lf(e){return sf(e)===lr}var cf="product",dR="tyre";var fR="productType",uR={[cf]:"alloy-wheel",[dR]:"tyre"},pR=["alloy-wheel","tyre"];function KI(e,o){return lf(o)?mR(o)??uR[e]??null:null}function mR(e){if(!lf(e))return null;let o=e?.[fR];return typeof o=="string"&&pR.includes(o)?o:null}var sl=null,qI=null;function hR(e,o){sl=e,qI=o}function YX(e){hR(e,null)}function XX(){return sl}function ll(){return qI==="dynamic"||sl===cf}function ZX(e){return KI(sl??"",e)??"alloy-wheel"}import{addShowWhenFacts as xR}from"efficient-shell/format";import{showWhenOf as df,shownForOption as IR,truthy as gR,withRowRules as ff,withRowsShownWhen as uf,withShowWhen as Oo}from"efficient-shell/format";var oZ=xR;function pf(e,o,t){let r=!1,a={};for(let[n,s]of Object.entries(e))bR(df(s),o??{},t)?a[n]=s:r=!0;return r?a:e}function YI(e,o,t,r){let a=al(o,t,r);return{device:e,parentType:a?.item.type,parent:a?.item.props}}function VI(e,o){if(!e||typeof e!="object")return!1;let t=e;if(typeof t.context=="string"&&(t.context===o||t.context.startsWith(`${o}.`)))return!0;if("not"in t)return VI(t.not,o);for(let r of[t.all,t.any])if(Array.isArray(r)&&r.some(a=>VI(a,o)))return!0;return!1}function iZ(e,o={}){return yR({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>ll(),root:()=>e.appState?.data?.root?.props,...o})}var XI=1;function SR(e){return Zo(e)}function fZ(e){let o=SR(e);return o===null?{}:{"--sf-card-image-radius":`${o}px`}}var ZI=1,JI="Corners";function CR(e){return Zo(e)}function hZ(e,o){let t=CR(e);if(t===null)return null;let r=`${t}px`;return{borderRadius:ln(o)?sr(r,Jo(o)??[]):r}}var ft={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]]}},mf=Object.keys(ft),eg=[2,3,4,6];function hf(e,o){return mf.filter(t=>t===o||e===null||ft[t].across===e)}function og(e){return typeof e!="string"||e===""?null:ft[e]??null}function QI(e,o){return o?6/e.acrossPhone:12/e.across}function tg(e){return[...e.lead??[],...e.desktop]}var wR="sf-wall--";function kR(e){return`${wR}${e}`}function IZ(e){let o=ft[e],t=`.${kR(e)}`,r=[],a=(n,s,l=[])=>{let c=[],d=n.length,u=l.length;l.forEach(([h,p],x)=>{c.push(`${t} > :nth-child(${x+1}){grid-column:span ${h};grid-row:span ${p}}`)}),n.forEach(([h,p],x)=>{c.push(`${t} > :nth-child(${d}n+${u+x+1}){grid-column:span ${h};grid-row:span ${p}}`)});for(let h=1;h<d;h+=1)c.push(`${t}:has(> :nth-child(${d}n+${u+h}):last-child) > :nth-last-child(-n+${h}){grid-column:span ${s};grid-row:span 1}`);return c};return r.push(`${t}{grid-template-columns:repeat(12,minmax(0,1fr))}`),r.push(...a(o.desktop,QI(o,!1),o.lead)),r.push("@media (max-width:800px){"),r.push(`${t}{grid-template-columns:repeat(6,minmax(0,1fr))}`),r.push(...a(o.phone,QI(o,!0),o.leadPhone)),r.push("}"),r.join("")}var il=12,rg=1,vR=3;var TR=3;function xf(e,o,t){let r=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(r)?Math.min(t,Math.max(o,Math.trunc(r))):null}function PR(e){return xf(e,1,il)??TR}function yZ(e,o){return xf(e,rg,vR)??(PR(o)===4?2:rg)}function SZ(e){return e==null||e===""?null:xf(e,1,il)}var CZ="data-sf-span";function wZ(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if(og(e.props?.layout))return!1;let o=e.props?.columns;return o!=null&&o!==""}return!1}import{jsx as ER}from"react/jsx-runtime";import*as OR from"efficient-easel/icons";function cl(e){let o=e.replace(/(^|-)([a-z])/g,(r,a,n)=>n.toUpperCase()),t=OR[`${o}Icon`];return t?ER(t,{size:16}):null}import{isNodeList as FR}from"efficient-easel/data";var oa=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],ng="bottom-left",ta=4,_R=ta+1,ag=40,RR=30,AR=100,LR=60,EZ=100;var If={"top-left":"Top left","top-center":"Top center","top-right":"Top right",left:"Left",center:"Center",right:"Right","bottom-left":"Bottom left","bottom-center":"Bottom center","bottom-right":"Bottom right"};function BR(e){let o=oa.indexOf(dn(e));return{band:Math.floor(o/3),column:["start","center","end"][o%3]}}function DR(e){return 1+BR(e).band*(_R+1)}function OZ(e){return DR(e)+1}function dn(e){return oa.includes(e)?e:ng}function FZ(e){let o=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-ag,Math.min(ag,Math.round(o)))}function _Z(e,o=LR){let t=typeof e=="number"&&Number.isFinite(e)?e:o;return Math.max(RR,Math.min(AR,Math.round(t)))}function gf(e,o){let t=dn(o);return e.filter(r=>dn(r?.props?.placement)===t).length}function sg(e){return`${If[dn(e)]} already holds ${ta} boxes. Move one somewhere else first.`}function lg(e,o){let t=e.filter(r=>r?.props?.id!==o);return oa.map(r=>{let a=gf(t,r)>=ta,n=If[r];return a?{value:r,label:n,disabled:!0,title:sg(r)}:{value:r,label:n}})}function dl(e,o){let t=o===void 0?ng:dn(o?.props?.placement);return gf(e,t)>=ta?sg(t):null}var fl="HeroGroup";function NR(e){return oa.map(o=>{let t=gf(e,o);return{anchor:o,total:t,hidden:t-ta}}).filter(o=>o.hidden>0)}function bf(e){let o=NR(e);return o.length===0?null:o.map(({anchor:t,total:r,hidden:a})=>{let n=If[t],s=a===1?"1 is not shown":`${a} are not shown`;return`${n} holds ${r} boxes. The published page draws the first ${ta}, so ${s}. ${a===1?"Move it":"Move them"} somewhere else.`}).join(" ")}function ig(e,o){let t=o;if(t?.type!==fl)return null;let r=t.props?.id===void 0?"":String(t.props.id);return r?dl(yf(e,r),t):null}function yf(e,o){let t=dg(e,o);return t&&t.ownerType===HR?t.siblings:[]}function cg(e,o){let t=dg(e,o);return t?t.ancestorTypes.filter(r=>r===fl).length:MR}var MR=1,HR="HeroSlide";function dg(e,o){let t=(r,a,n)=>{if(a>12||!r||typeof r!="object")return null;if(FR(r)){if(r.some(s=>s?.props?.id===o))return{siblings:r,ownerType:n.at(-1)??null,ancestorTypes:n};for(let s of r){let l=s.type,c=t(s,a+1,[...n,String(l)]);if(c)return c}return null}for(let s of Object.values(r)){let l=t(s,a+1,n);if(l)return l}return null};return t(e,0,[])}import{jsx as GR}from"react/jsx-runtime";var Sf="sf-hint-keep";function fg({children:e}){return GR("span",{className:Sf,children:e})}import{jsx as Lt,Fragment as UR,jsxs as yg}from"react/jsx-runtime";import{useContext as $R,useEffect as jR,useId as KR,useState as Sg}from"react";import{SettingsField as qR,SettingsSwitch as VR}from"efficient-easel/panel";import{AnchorIcon as YR}from"efficient-easel/icons";import{ScreenDocumentContext as XR}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as ZR}from"efficient-shell/ui";import{slugify as JR}from"efficient-shell/format";import{slugify as WR}from"efficient-shell/format";function fn(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}var ug=e=>WR(fn(e));var ul="homepage";import{slugify as zR}from"efficient-shell/format";var pg=[{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 mg(e){return e.offersCommerce&&e.offersService?pg:pg.filter(o=>!o.needs||(o.needs==="commerce"?e.offersCommerce:e.offersService))}var Cf="#popup:";function hg(e){return`${Cf}${e}`}function xg(e){return e.startsWith(Cf)&&e.slice(Cf.length).trim()||null}function un(e){return e===ul?"/":`/${e}`}function Ig(e){return`/journal/${e}`}function WZ(e){return`/wheels/${e}`}function pl(e,o){return`${un(e)}#${o}`}function gg(...e){let o=new Set,t=[];for(let r of e)for(let a of r?.content??[]){let n=fn(a?.props?.anchor);if(!n)continue;let s=zR(n);!s||o.has(s)||(o.add(s),t.push({slug:s,name:n}))}return t}function zZ(e){let o=e.indexOf("#"),t=o===-1?e:e.slice(0,o),r=t.indexOf("?");return r===-1?t:t.slice(0,r)}function bg(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as QR}from"efficient-easel/draw";function Cg({value:e,onChange:o,nameBox:t}){let r=QR(e).text,[a,n]=Sg(!1),s=a||r.trim()!=="",l=KR();return yg(UR,{children:[Lt(qR,{label:i("Add an anchor"),labelId:l,icon:Lt(YR,{}),action:Lt(VR,{checked:s,ariaLabelledBy:l,onChange:c=>{n(c),!c&&r!==""&&o("")}})}),s&&t(e,o),s&&Lt(eA,{name:r})]})}function eA({name:e}){let o=$R(XR),t=o?.templateId?"":o?.currentSlug??"",[r,a]=Sg("");jR(()=>a(ea()||window.location.origin),[]);let n=JR(e);if(!n||!t)return null;let s=`${r}${pl(t,n)}`,l=s.replace(/^https?:\/\//,""),c=l.lastIndexOf("#");return Lt("div",{className:"sf-anchor-link",children:Lt(ZR,{value:s,label:i("link"),size:"sm",children:yg("span",{className:"sf-anchor-link-text",children:[Lt("span",{className:"sf-anchor-link-path",children:l.slice(0,c)}),Lt("span",{className:"sf-anchor-link-hash",children:l.slice(c)})]})})})}import{AdjustIcon as AN,EyeIcon as LN,AnimationIcon as BN,BackgroundIcon as DN,BorderAllIcon as NN,BlockSectionIcon as MN,ColumnWidthsIcon as aS,ColumnsIcon as nS,CornerIcon as HN,DirectionDownIcon as GN,DirectionLeftIcon as WN,DirectionRightIcon as zN,DirectionUpIcon as UN,EditIcon as $N,GapIcon as jN,GridIcon as KN,GroundIcon as sS,HashIcon as lS,HeightIcon as qN,ImageIcon as VN,ListIcon as YN,LocationIcon as Ky,PaddingBottomIcon as iS,PaddingLeftIcon as cS,PaddingRightIcon as dS,PaddingTopIcon as fS,PageIcon as XN,StickyIcon as ZN,RotateIcon as JN,SearchIcon as QN,SquareIcon as e2,TypeIcon as o2,WidthIcon as t2}from"efficient-easel/icons";import{jsx as Re,Fragment as ir,jsxs as cr}from"react/jsx-runtime";import{CaptionIcon as oA,DateIcon as tA,FlagIcon as rA,TitleIcon as aA,ButtonIcon as nA,DollarIcon as sA,HashIcon as lA,LinkIcon as iA,NoteIcon as cA,TagIcon as dA,TextLinesIcon as fA}from"efficient-easel/icons";var wg={body:fA,button:nA,link:iA,label:dA,number:lA,price:sA,note:cA,name:rA,date:tA,caption:oA,title:aA},kg={eyebrow:cr(ir,{children:[Re("path",{d:"M5 6.5h5"}),Re("path",{d:"M5 12.5h14"}),Re("path",{d:"M5 18h11"})]}),heading:cr(ir,{children:[Re("path",{d:"M6.5 5v14"}),Re("path",{d:"M17.5 5v14"}),Re("path",{d:"M6.5 12h11"})]}),intro:cr(ir,{children:[Re("path",{d:"M4 5.5v13"}),Re("path",{d:"M8 7.5h12"}),Re("path",{d:"M8 12h12"}),Re("path",{d:"M8 16.5h8"})]}),value:cr(ir,{children:[Re("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),Re("path",{d:"M6.5 12h7"})]}),quote:cr(ir,{children:[Re("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),Re("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:cr(ir,{children:[Re("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),Re("path",{d:"M8 9.5h8"}),Re("path",{d:"M12 9.5v5"})]}),meta:cr(ir,{children:[Re("path",{d:"M4 7h16"}),Re("path",{d:"M4 14h3.5"}),Re("path",{d:"M10.5 14h3"}),Re("path",{d:"M17 14h3"})]})};function wf({noun:e,size:o=14,strokeWidth:t=1.8,className:r,style:a}){let n=wg[e];return n?Re("span",{className:r,style:{display:"inline-flex",...a},"aria-hidden":"true",children:Re(n,{size:o})}):Re("svg",{className:r,style:a,width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:kg[e]})}var aJ=Object.keys(wg);var nJ=Object.keys(kg);import{parseHexColor as uA}from"efficient-shell/format";var pA="#ffffff";function kf(e){return mA(e)?e:pA}function mA(e){return typeof e=="string"&&uA(e)===e.toLowerCase()}function iJ(e){return{"--bg":kf(e)}}function vg(e,o){let t=e?.content;if(!Array.isArray(t))return null;for(let r of t){if(!r||typeof r!="object")continue;let{type:a,props:n}=r;if(n?.id===o)return null;if(vf(r,o,0))return{type:typeof a=="string"?a:"",props:n??{}}}return null}function vf(e,o,t){if(t>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>vf(a,o,t+1));let r=e.props;return r&&typeof r=="object"&&r.id===o?!0:Object.values(e).some(a=>vf(a,o,t+1))}function Tg(e,o){let t=e?.content;return Array.isArray(t)?ml(t,o,0)??[]:[]}function ml(e,o,t){if(t>12||!e||typeof e!="object")return null;if(Array.isArray(e)){for(let a of e){let n=ml(a,o,t+1);if(n)return n}return null}let r=e.props;if(r&&typeof r=="object"){if(r.id===o)return[];for(let a of Object.values(r)){let n=ml(a,o,t+1);if(n)return[r,...n]}return null}for(let a of Object.values(e)){let n=ml(a,o,t+1);if(n)return n}return null}import{SettingsDefaultReset as co,SettingsDrill as r2,SettingsField as Ke,SettingsGroup as a2,SettingsGroupSub as Xre,SettingsSegmented as n2,SettingsBorder as s2,SettingsSidesEach as l2,SettingsSwitch as wu,borderSides as i2,borderStartEach as c2}from"efficient-easel/panel";import{ListField as d2}from"efficient-easel/fields";import{DisplayChips as f2}from"efficient-shell/ui";function ra(e){if(!e||typeof e!="object"||Array.isArray(e))return{};let o={};for(let[t,r]of Object.entries(e))typeof r=="boolean"&&(o[t]=r);return o}function hl(e,o){return ra(e)[o]!==!1}function Tf(e,o,t){let r=ra(o)[t];return typeof r=="boolean"?r:hl(e,t)}function Pg(e){return Object.values(ra(e)).some(o=>o===!1)}function Eg(e){return Object.keys(ra(e)).length>0}function Og(e,o,t){let r={...ra(e)};return t?delete r[o]:r[o]=!1,Object.keys(r).length?r:void 0}function Fg(e,o,t){return{...ra(e),[o]:t}}function fJ(e,o,t){let r=hl(e,t),a=Tf(e,o,t);return r&&a?"":!r&&!a?"hidden":r?"max-[720px]:hidden":"min-[720px]:hidden"}import{AlignmentGrid as u2,Checkbox as oae,ColorSwatch as p2,CornersInput as m2,DatePicker as tae,DateTimePicker as h2,FOCAL_DEFAULT as rae,PictureTiles as x2,IconPicker as I2,IconButton as uS,InputNumber as qy,Slider as g2,Tooltip as ti}from"efficient-shell/ui";import{backendOf as hA}from"efficient-easel/screen/lib/session";var Ne=hA,xl=e=>e.blocks;async function _g(e){let o=e.trim();if(!o)return null;let t=Ne().geocode;if(!t)throw new Error("geocode_unavailable");return t.locate(o)}var Pf="Lookup busy \u2014 try again in a moment.",Il=e=>typeof e=="number"&&Number.isFinite(e);function gJ(e){return e.some(o=>{let t=o?.geocode;return t?t.pending||t.manual&&t.lat===void 0&&t.lng===void 0?!0:Il(t.lat)&&t.lat!==o.lat||Il(t.lng)&&t.lng!==o.lng:!1})}async function bJ(e,o,{geocode:t=_g,courtesyGapMs:r=1100}={}){let a=s=>new Promise(l=>setTimeout(l,s)),n=e.slice();if(e.some(s=>s?.geocode?.pending)){let s=[],l=!1;for(let c of e){if(!c?.geocode?.pending){s.push(c);continue}l&&r>0&&await a(r),l=!0;try{let d=await t(o(c));s.push(d?{...c,lat:d.lat,lng:d.lng,geocode:{...c.geocode,pending:!1,ok:!0,status:`Found \u2014 ${d.label.split(",").slice(0,3).join(",").trim()}`,lat:d.lat,lng:d.lng}}:{...c,geocode:{...c.geocode,pending:!1,ok:!1,status:"No match \u2014 check the address and try again."}})}catch{s.push({...c,geocode:{...c.geocode,pending:!1,ok:!1,status:Pf}})}}n=s}return n.map(s=>{let l=s?.geocode;if(!l)return s;if(l.manual&&l.lat===void 0&&l.lng===void 0)return{...s,geocode:{...l,lat:s.lat,lng:s.lng}};let c=Il(l.lat)&&l.lat!==s.lat?l.lat:s.lat,d=Il(l.lng)&&l.lng!==s.lng?l.lng:s.lng;return c!==s.lat||d!==s.lng?{...s,lat:c,lng:d}:s})}import{keptByRow as b2}from"efficient-easel/screen/lib/document/style-fields";import{jsx as MA}from"react/jsx-runtime";import{useEffect as HA,useState as GA}from"react";import{clearRangeOf as WA,markSelection as zA,useCaretEdit as UA}from"efficient-easel/copy";import{TextToolbar as $A}from"efficient-shell/ui";import{applyMark as TJ,markupTools as PJ,MARKUP_TOOLS as EJ,COPY_FIELD_TOOLS as OJ,STOREFRONT_MARKUP as FJ,tokenizeInline as _J,stripInline as RJ,isSafeLinkHref as AJ}from"efficient-shell/markup";import{applyMark as PA,clearStyle as EA,markedAt as OA,markupTools as FA,MARKUP_TOOLS as _A,parseMarkup as RA,RETIRED_MARKS as AA,STOREFRONT_MARKUP as LA,tokenizeInline as BJ}from"efficient-shell/markup";var dr=["highlight","strong","quiet"],fr={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},Qo={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},Bg=Object.fromEntries(dr.map(e=>[Qo[e].kind,e])),Dg="data-sf-ws",gl=["accent","text","labels"],Ng={accent:"Accent",text:"Text",labels:"Labels"},ut={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},xA=80,IA=120,gA=100,bA=900,yA=.5,SA=3,CA=-.1,wA=.5,kA=3,Ef={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},vA={highlight:{...Ef},strong:{...Ef},quiet:{...Ef}};function Rg(e,o,t){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,o),t))}function Ag(e,o,t){if(typeof e!="number"||!Number.isFinite(e))return null;let r=10**kA;return Math.round(Math.min(Math.max(e,o),t)*r)/r}function Lg(e){return typeof e=="boolean"?e:null}function TA(e){let o=typeof e?.font=="string"&&Eo.some(r=>r.key===e.font)?e.font:null,t=typeof e?.colour=="string"&&gl.includes(e.colour)?e.colour:null;return{font:o,size:Rg(e?.size,xA,IA),weight:Rg(e?.weight,gA,bA),bold:Lg(e?.bold),italic:Lg(e?.italic),lineGap:Ag(e?.lineGap,yA,SA),textGap:Ag(e?.textGap,CA,wA),colour:t}}function Mg(e){let o={};for(let t of dr)o[t]=e&&t in e&&e[t]?TA(e[t]):{...vA[t]};return o}function CJ(e){let o=Mg(e),t={};for(let r of dr){let a=o[r],n=`--sf-ws-${r}`;if(a.font){let s=Eo.find(l=>l.key===a.font);s&&(t[`${n}-font`]=`var(${s.cssVar})`)}a.size!==null&&(t[`${n}-size`]=`${a.size/100}em`),a.weight!==null&&(t[`${n}-weight`]=String(a.weight)),a.bold!==null&&(t[`${n}-weight-bold`]=a.bold?"700":"400"),a.italic!==null&&(t[`${n}-style`]=a.italic?"italic":"normal"),a.lineGap!==null&&(t[`${n}-line`]=String(a.lineGap)),a.textGap!==null&&(t[`${n}-track`]=`${a.textGap}em`),a.colour!==null&&(t[`${n}-color`]=ut[a.colour])}return t}function wJ(e){let o=e?.word_styles??void 0,t={};for(let r of dr)o&&r in o&&(t[r]=o[r]??null);return Mg(t)}var BA=new Set(["strong"]),Hg=dr.map(e=>({open:Qo[e].delimiter,close:Qo[e].delimiter,kind:Qo[e].kind,...BA.has(e)?{wordStart:!0}:{}})),NJ=[{style:Qo.highlight.kind,label:fr.highlight,title:`${fr.highlight} word style`},{style:Qo.strong.kind,label:fr.strong,title:`${fr.strong} word style`},{style:Qo.quiet.kind,label:fr.quiet,title:`${fr.quiet} word style`}],DA=new Set(Hg.map(e=>e.open)),ur=[...LA.filter(e=>!DA.has(e.open)),...Hg];function Of(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function pn(e){return RA(typeof e=="string"?e:"",ur)}var NA=_A.map(e=>e.style).filter(e=>!AA.includes(e)).filter(e=>ur.some(o=>o.kind===e));function Gg(){return FA(NA)}var Wg=Object.fromEntries(dr.map(e=>[Qo[e].kind,Qo[e].delimiter]));function zg(e,o,t,r){let a=Wg[r];if(!a)return PA(e,o,t,r);let n=e.slice(o,t),s=e.slice(Math.max(0,o-a.length),o),l=e.slice(t,t+a.length);if(s===a&&l===a)return{text:e.slice(0,o-a.length)+n+e.slice(t+a.length),selectionStart:o-a.length,selectionEnd:o-a.length+n.length};let c=n||"styled text";return{text:e.slice(0,o)+a+c+a+e.slice(t),selectionStart:o+a.length,selectionEnd:o+a.length+c.length}}function Ug(e,o,t,r){let a=Wg[r];return a?o>=a.length&&e.slice(o-a.length,o)===a&&e.slice(t,t+a.length)===a:OA(e,o,t,r)}function pr(e){return pn(e).map(o=>Of(o)+jg(o.children)).join(`
|
|
2
|
+
`)}function $g(e,o,t){return EA(e,o,t,ur)}function jg(e){return e.map(o=>o.kind==="text"?o.text:jg(o.children)).join("")}function jA(e,o,t){return zA(e,o,t,zg)}function Kg(e,o){let t=WA(o,e.length),r=$g(e,t.start,t.end);return r.text===e?null:r}function KA(e){let[o,t]=GA(null);return HA(()=>{let r=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!r)return;let a=()=>{let n=e.current;if(!n||r.activeElement!==n)return;let s=n.selectionStart??n.value.length,l=n.selectionEnd??s;t(c=>c&&c.start===s&&c.end===l?c:{start:s,end:l})};return r.addEventListener("selectionchange",a),()=>r.removeEventListener("selectionchange",a)},[e]),[o,t]}function qA({target:e,value:o,onChange:t,disabled:r=!1,label:a="Formatting"}){let n=UA({target:e,onChange:t}),[s,l]=KA(e),c=p=>n(x=>{let g=jA(o,p,x);return l({start:g.selectionStart,end:g.selectionEnd}),g}),d=Gg(),u={};if(s)for(let p of d)u[p.style]=Ug(o,s.start,s.end,p.style);let h=r?null:Kg(o,s);return MA($A,{offered:new Set(d.map(p=>p.style)),onMark:p=>c(p),pressed:u,disabled:r,"aria-label":i(a),className:"sf-markup-bar",clear:h?{onClear:()=>n(()=>{let p=e.current,x=p&&p.ownerDocument.activeElement===p?{start:p.selectionStart??0,end:p.selectionEnd??0}:null,g=Kg(o,x)??{text:o,selectionStart:x?.start??0,selectionEnd:x?.end??0};return l({start:g.selectionStart,end:g.selectionEnd}),g})}:void 0})}var Ff=qA;import{deviceField as je}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as y2,NoControlMark as S2,noControlField as pS}from"efficient-easel/screen/lib/document/panel-no-control-mark";var _f="__ownBox";function qg(e){return!!e&&typeof e=="object"&&e[_f]===!0}function bl(e,o,t){return typeof e=="number"?e:typeof o=="number"?o:t}var yl=void 0;import{phoneKey as xa,tabletKey as C2}from"efficient-easel/draw";import{jsx as Af,Fragment as XA}from"react/jsx-runtime";import{createContext as ZA,useContext as JA}from"react";var Sl={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},Cl={Events:["posts"],SubscribeBlogs:["posts"]};var VA=["anchor"],YA=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function mn(e){return VA.includes(e)||YA.test(e)}var Rf={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"}}};Rf.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var XJ=Object.fromEntries(Object.entries(Sl).map(([e,o])=>[e,Object.keys(o)])),ZJ=Object.fromEntries(Object.entries(Cl).map(([e,o])=>[e,[...o]]));import{NoControlMark as QA}from"efficient-easel/screen/lib/document/panel-no-control-mark";var Vg=ZA(!1);function Yg({children:e}){return Af(Vg.Provider,{value:!0,children:e})}function eL(){return JA(Vg)}function Xg({name:e,children:o}){return!eL()||!e||!oL(e)||mn(e)?Af(XA,{children:o}):Af(QA,{})}function oL(e){return/^[A-Za-z0-9_$]+$/u.test(e)}function mo(e,o,t){return e.some(r=>(typeof r=="object"?r.value:r)===t)?t:o}var Lf="off",Bf="none",Df=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],Nf=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function sQ(e){return mo(Df,Lf,e)}function lQ(e){return mo(Nf,Bf,e)}var Zg="sf-card-index",hn="sf-card-index",iQ="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",tL={plain:`counter(${hn})`,padded:`counter(${hn}, decimal-leading-zero)`,numero:`"N\xB0" counter(${hn}, decimal-leading-zero)`};function cQ(e,o){return o==="off"?"":`.${e}{counter-reset:${hn}}.${e} .${Zg}{counter-increment:${hn}}.${e} .${Zg}::before{content:${tL[o]}}`}function dQ(e){return e==="hairline"?"border border-line hover:border-accent":""}var Jg=[{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 w2}from"efficient-easel/draw";import{jsx as et}from"react/jsx-runtime";import{SettingsDefaultReset as rL,SettingsField as Qg}from"efficient-easel/panel";import{useSelectedHost as aL}from"efficient-easel/easel";import{FOCAL_DEFAULT as nL}from"efficient-shell/format";import{ImageIcon as eb,PlayIcon as ob}from"efficient-easel/icons";import{MediaUploadField as sL}from"efficient-shell/ui";import{useContext as lL}from"react";import{ScreenDocumentContext as iL}from"efficient-easel/screen/components/ScreenDocumentContext";import{phoneKey as cL}from"efficient-easel/draw";import{usePreviewDevice as dL}from"efficient-easel/draw/client";import{shownTier as tb}from"efficient-easel/screen/lib/document/device-fields";import{requestMediaPick as fL}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as uL}from"efficient-easel/screen/lib/host";import{useEaselSession as pL}from"efficient-easel/screen/lib/session-context";function mL(e,o,t){if(tb(t)==="tablet")return null;let r=tb(t)==="mobile",a=typeof e[o]=="string"&&e[o]?String(e[o]):nL,n=cL(o),s=typeof e[n]=="string"&&e[n]?String(e[n]):void 0;return{phone:r,desktop:a,own:s,focus:r?s??a:a,key:r?n:o,twin:n}}function hL(e,o){let t=aL(),r=dL();if(!e||!t)return null;let a=t.values??{};if(o&&!o(a))return null;let n=mL(a,e,r);if(!n)return null;let s=t.onChange;return{phone:n.phone,desktop:n.desktop,own:n.own,focus:n.focus,set:l=>s(n.key,l),clear:()=>s(n.twin,yl)}}function rb({value:e,onChange:o,label:t,accept:r,placeholder:a,focusKey:n,focusWhen:s,frameKey:l,fieldKey:c}){let d=uL(),u=pL(),h=i(t),p=r.startsWith("video"),x=hL(p?void 0:n,s),g=lL(iL),y=Mf(),E=l&&c?{video:c,frame:l}:null,O=v=>fL(d,{accept:r,title:h,...v?{file:v}:{}}).then(k=>!k||!E?k?.url??null:(y({[E.video]:k.url,[E.frame]:k.posterUrl??""}),null)),C=E?v=>v?o(v):y({[E.video]:"",[E.frame]:""}):o;if(g&&!g.capabilities.mediaEditing)return et(Qg,{label:h,icon:p?et(ob,{}):et(eb,{}),children:et("div",{className:"sf-image-slot-inert",children:p?i("Templates don\u2019t store videos \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."):i("Templates don\u2019t store images \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created.")})});let I=At(e),w=x?.phone&&I?et(rL,{words:Q()?.panel,label:i("Image focus"),changed:!!x.own,detail:i("{value} on desktop",{value:x.desktop}),onReset:x.clear}):void 0;return et(Qg,{label:h,icon:p?et(ob,{}):et(eb,{}),action:w,children:et("div",{style:{flex:"1 1 auto",minWidth:0},children:et(sL,{value:I,onChange:C,onPick:O,accept:p?"video/*":"image/*",kind:p?"video":"image",placeholder:a===void 0?void 0:i(a),maxSizeBytes:Ne(u).media.maxUploadBytes,...x?{focus:x.focus,onFocusChange:x.set}:{}})})})}import{jsx as ab}from"react/jsx-runtime";import{useId as xL}from"react";import{FieldSelect as IL}from"efficient-easel/fields";import{SettingsField as gL}from"efficient-easel/panel";function bL(e){return e.map(({value:o,label:t,note:r})=>({value:o,label:t,...r?{meta:r}:{}}))}function nb({label:e,options:o,value:t,onChange:r,emptyLabel:a,icon:n,hint:s}){let l=xL(),c=`${l}-label`,d=`${l}-button`,u=Array.isArray(t)?t:[];return ab(gL,{label:i(e),labelId:c,icon:n,hint:s,children:ab(IL,{id:d,multiple:!0,value:u,options:bL(o),onChange:r,placeholder:a===void 0?i("None"):i(a),ariaLabelledBy:`${c} ${d}`,inline:!0})})}import{jsx as qe,jsxs as hr,Fragment as _L}from"react/jsx-runtime";import{useCallback as xb,useContext as RL,useId as bb,useRef as Ib,useState as gb}from"react";import{ThemeIcon as AL}from"efficient-easel/icons";import{Button as LL,useClickOutside as BL}from"efficient-shell/ui";import{SettingsField as DL}from"efficient-easel/panel";import{ScreenDocumentContext as NL}from"efficient-easel/screen/components/ScreenDocumentContext";import{useCallback as $f,useEffect as db,useRef as Tl}from"react";import{currentEaselSession as CL}from"efficient-easel/screen/lib/session";import{useEaselSession as wL}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as yL}from"react";var lb,Hf=null,mr=null,wl=0,Gf=new Set;function Wf(e){lb=e;for(let o of Gf)o()}function zf(e){Hf=e,wl+=1,mr&&clearTimeout(mr),mr=null,Wf(void 0)}function kl(e){wl+=1,Wf(e)}function pt(e=250){Hf&&(mr&&clearTimeout(mr),mr=setTimeout(()=>{mr=null;let o=Hf;if(!o)return;let t=++wl;o().then(r=>{t===wl&&Wf(r)}).catch(()=>{})},e))}function sb(){return lb}function SL(e){return Gf.add(e),()=>{Gf.delete(e)}}function vl(){return yL(SL,sb,sb)}var Uf=new Set;function ib(e){return Uf.add(e),()=>{Uf.delete(e)}}async function cb(){let e=(await Promise.allSettled([...Uf].map(async o=>o()))).find(o=>o.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as kL}from"efficient-easel/screen/lib/backend-error";function fb(e=CL()){return(o,t,r)=>{let a=Ne(e).theme;return a?a.update(o,r?{siteId:r}:void 0):Promise.reject(new kL("invalid","This backend stores no site theme."))}}function ub(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function vL(e,o=fb()){let{themeFromDocument:t,token:r,siteId:a,patch:n}=e,s=ub({themeFromDocument:t,token:r});if(s)return s;if(Object.keys(n).length===0)return{status:"skipped",reason:"empty"};try{return await o(n,r,a??void 0),{status:"saved"}}catch(l){return{status:"failed",error:l}}}function aa({themeFromDocument:e,tokenRef:o,siteId:t,onResult:r}){let a=Tl(null),n=Tl({}),s=wL(),l=Tl(r);l.current=r;let c=Tl(null),d=$f(p=>{if(p.status==="skipped"){let x=`skipped:${p.reason}`;if(c.current===x)return;c.current=x}else c.current=null;l.current?.(p)},[]),u=$f(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let p=n.current;n.current={};let x=await vL({themeFromDocument:e,token:o?.current,siteId:t,patch:p},fb(s));return d(x),x.status==="saved"&&pt(),x.status==="failed"&&(n.current={...p,...n.current}),x},[e,o,t,d,s]),h=$f((p,x=!1)=>{let g=ub({themeFromDocument:e,token:o?.current});if(g){d(g);return}n.current={...n.current,...p},a.current&&clearTimeout(a.current),x?u():a.current=setTimeout(()=>{u()},500)},[e,o,u,d]);return db(()=>()=>{u()},[u]),db(()=>ib(async()=>{if(!a.current&&Object.keys(n.current).length===0)return;let p=await u();if(p.status==="failed")throw p.error}),[u]),{persist:h,flush:u}}var jf=[{role:"bg",token:"--bg",ink:!1},{role:"fg",token:"--fg",ink:!0},{role:"surface",token:"--site-surface",ink:!1},{role:"surface-2",token:"--site-surface-2",ink:!1},{role:"line",token:"--site-line",ink:!0},{role:"muted",token:"--fg-dim",ink:!0}],TL=jf.filter(e=>e.ink);function PL(e){let o={color:e.fg};for(let{role:t,token:r}of TL)o[r]=e[t];return o}var EL={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},pb=Object.freeze(PL(EL));var na=-1,OL="sf-section-accent",mb="Color",hb=new Set(["CategoryBar","DocTabs"]),JQ=new Set(["Flex"]),Kf=0;function Fo(e){return e===na?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:Kf}function qf(e){return e??na}function FL(e){let o=`--theme-preset-${e}`,t={"--sf-sec-accent":`var(${o}-accent)`,"--sf-sec-accent-2":`var(${o}-accent-2)`,"--sf-sec-accent-ink":`var(${o}-accent-ink)`};for(let{role:r}of jf)t[`--sf-sec-${r}`]=`var(${o}-${r}, var(--theme-${r}))`;return t}function QQ(e){let o=Fo(e.sectionAccent);return o===null?null:{className:OL,style:FL(o)}}var ML="Follow the page",pee="Follow the slideshow",HL=e=>i("Editing {name} changes it everywhere.",{name:e});function GL({colors:e}){if(!e)return qe("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let o=Xo(e);return hr("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[qe("i",{style:{background:o.background}}),qe("i",{className:"sf-secttheme-chip-accent",style:{background:o.accent}})]})}function WL({themes:e,value:o,onPick:t,onEdit:r,menuId:a,followLabel:n}){return hr("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[n!==void 0&&hr(_L,{children:[hr("button",{type:"button",role:"option","aria-selected":o===null,className:`sf-secttheme-item${o===null?" is-active":""}`,onClick:()=>t(na),children:[qe(GL,{}),qe("span",{className:"sf-secttheme-name",children:i(n)})]}),qe("div",{className:"sf-secttheme-sep",role:"presentation"})]}),o!==null&&e[o]&&qe("p",{className:"sf-secttheme-oncard",role:"presentation",children:i("{name} is on this section",{name:sn(o)})}),e.map((s,l)=>l===o?null:qe(ol,{role:"option",index:l,colors:s,selected:!1,onPick:()=>t(l),onEdit:()=>r(l)},l))]})}function zL({index:e,colors:o,onChange:t,onDone:r}){let a=sn(e),n=bb();return hr("div",{className:"sf-secttheme-sheet",children:[hr("div",{className:"sf-secttheme-sheet-head",children:[qe("span",{children:a}),qe(LL,{variant:"secondary",className:"sf-secttheme-done",onClick:r,children:i("Done")})]}),qe("div",{className:"sf-secttheme-rows",children:qe(Zd,{colors:o,onChange:t,idPrefix:n})}),qe("p",{className:"sf-secttheme-warn",children:HL(a)})]})}function yb({value:e,onChange:o,followLabel:t,hint:r}){let{theme:a,setTheme:n}=ne(),s=eo(a),l=RL(NL),c=l?.tokenRef,d=l?.siteId??null,u=!l?.capabilities?.hasSiteTheme,{persist:h,flush:p}=aa({themeFromDocument:u,tokenRef:c,siteId:d}),x=eo(s),g=x.themes,y=Fo(e),E=y!==null?g[y]:void 0,O=E??(g.length?Xr(x):void 0),[C,I]=gb(!1),[w,v]=gb(null),k=Ib(null),R=Ib(null),B=bb(),P=xb(()=>{I(!1),v(null)},[]),_=xb(()=>{!C&&w===null||(p(),P())},[C,w,P,p]);BL(k,_);let N=F=>{o(F),P()},b=F=>{if(w===null)return;let A=g.map((z,Z)=>Z===w?F:z),H={...x,themes:A};n(H),h({selected_preset:H.selected,theme_presets:H.themes})};return hr("div",{className:"sf-secttheme",ref:k,children:[qe(DL,{label:i("Theme"),icon:qe(AL,{}),labelId:`${B}-label`,hint:r,children:qe(OI,{colors:O,onEdit:y!==null?()=>{v(y),I(!1)}:void 0,name:E?sn(y):i(t??ML),nameId:`${B}-value`,labelId:`${B}-label`,open:C,menuId:B,buttonRef:R,onClick:()=>{v(null),I(F=>!F)},onKeyDown:F=>{F.key==="Escape"&&(C||w!==null)&&(F.preventDefault(),P())}})}),C&&w===null&&qe("div",{onKeyDown:F=>{F.key==="Escape"&&(F.preventDefault(),P(),R.current?.focus())},children:qe(WL,{themes:g,value:y,onPick:N,onEdit:F=>{v(F),I(!1)},menuId:B,followLabel:t})}),w!==null&&g[w]&&qe(zL,{index:w,colors:g[w],onChange:b,onDone:()=>{p(),P(),R.current?.focus()}})]})}import{jsx as Sb}from"react/jsx-runtime";import{useId as UL}from"react";import{FieldSelect as $L}from"efficient-easel/fields";import{SettingsField as jL}from"efficient-easel/panel";function KL(e){return e.map(({value:o,label:t,group:r,thumb:a,meta:n})=>({value:o,label:t,...r!==void 0?{group:r}:{},...a!==void 0?{thumb:a}:{},...n!==void 0?{meta:n}:{}}))}function yee({label:e,options:o,fallback:t,value:r,onChange:a,placeholder:n,bare:s=!1,icon:l}){let c=UL(),d=`${c}-label`,u=`${c}-button`,h=r??"",p=o.some(E=>E.value===h)?h:t,x=i(e),g=n===void 0?void 0:i(n),y=Sb($L,{id:u,value:p,options:KL(o),onChange:a,placeholder:g,searchPlaceholder:g,...s?{ariaLabel:x}:{ariaLabelledBy:`${d} ${u}`},searchable:!0,groupCount:!0,inline:!0});return s?y:Sb(jL,{label:x,labelId:d,icon:l,children:y})}import{jsx as Ir,jsxs as wB}from"react/jsx-runtime";import{SettingsField as Kb}from"efficient-easel/panel";import{LinkIcon as kB}from"efficient-easel/icons";import{LinkPicker as vB,TextLinkField as TB}from"efficient-shell/ui";import{useEffect as jb,useMemo as Fl,useRef as PB,useState as Ol}from"react";import{currentEaselSession as qL}from"efficient-easel/screen/lib/session";function Cb(){return qL().auth.token}import{currentEaselSession as EB}from"efficient-easel/screen/lib/session";import{useScreenDocument as OB}from"efficient-easel/screen/components/ScreenDocumentContext";var VL=()=>({choosePage:i("Choose a page"),chooseSection:i("Choose a section"),noSections:i("No section anchors yet"),sectionHint:i("Jumps to a section on that page."),choosePost:i("Choose a post"),chooseProduct:i("Choose a product"),choosePopup:i("Choose a popup")});function wb(e,o,t){if(!e)return"page";if(xg(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(bg(e))return"product";if(e.includes("#")){let r=e.slice(0,e.indexOf("#"));if(r===""||r==="/"||o.includes(r))return"anchor"}return e==="/"||o.includes(e)||t&&t.listingPaths.includes(t.targetOf(e))?"page":"custom"}function Vf(e,o){let t=VL(),r=e.pages.map(u=>({value:un(u.slug),label:u.title})),a=o?.pageOptions?o.pageOptions(r):r,n=a.map(u=>u.value),s=e.pages.map(u=>({label:u.title,options:gg(...u.docs).map(h=>({value:pl(u.slug,h.slug),label:h.name}))})).filter(u=>u.options.length>0),l=u=>{switch(u){case"page":return{type:"select",options:a,placeholder:t.choosePage};case"anchor":return{type:"groups",groups:s,placeholder:s.length?t.chooseSection:t.noSections};case"blog":return{type:"select",options:e.posts.map(h=>({value:Ig(h.slug),label:h.title||h.slug})),placeholder:t.choosePost};case"product":return{type:"select",options:e.products.map(h=>({value:h.href,label:h.name||h.href})),placeholder:t.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(h=>({value:hg(h.slug),label:h.title||h.slug})),placeholder:t.choosePopup};case"custom":return{type:"text"}}},c=mg(e.offers).map(u=>({value:u.value,label:i(u.label),target:l(u.value),...u.value==="anchor"?{hint:t.sectionHint}:{},...u.value==="blog"||u.value==="product"||u.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!o)return{kinds:c,rules:{kindOf:u=>wb(u,n),targetOf:u=>u,readFilter:()=>null,withFilter:u=>u}};let d=u=>{let h=o.withFilter(u,null);return o.listingPaths.includes(h)?h:u};return{kinds:c,rules:{kindOf:u=>wb(u,n,{listingPaths:o.listingPaths,targetOf:d}),targetOf:d,readFilter:o.readFilter,withFilter:o.withFilter},filtersFor:u=>o.listingPaths.includes(u)?o.filtersFor(u):null}}import{useEaselSession as FB}from"efficient-easel/screen/lib/session-context";var K=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0;function oo(e,o){if(typeof e=="string")return e||o;if(e&&typeof e=="object"&&"text"in e){let t=e.text;return we(t)??o}return o}function kb(e,o){return K(e)??o}function Bt(e,o){return typeof e=="boolean"?e:o}function Pl(e,o){if(!Array.isArray(e))return o;let t=e.map(r=>typeof r=="string"?r:oo(r?.text,"")).map(r=>r.trim()).filter(Boolean);return t.length?t:o}var Tb=["delay","scroll","exit"],Pb=["all","chosen","except"],Eb=["visit","days","never","once"],YL=["all","desktop","phone"],XL=["stop","continue"],Ob={min:0,max:60},Fb={min:10,max:90},_b={min:1,max:90},Ro={autoOpen:!1,trigger:"delay",autoOpenDelaySec:15,scrollPercent:50,showOn:"all",showOnPages:[],devices:"all",hideAfter:"days",hideDays:7,afterSubmit:"stop",startDate:null,endDate:null};function _o(e,o,t){return typeof o=="string"&&e.includes(o)?o:t}function sa(e,o,t){let r=kb(e,t);return Math.min(o.max,Math.max(o.min,Math.round(r)))}function ZL(e){return typeof e.hideAfter=="string"?_o(Eb,e.hideAfter,Ro.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":Ro.hideAfter}function JL(e){return Array.isArray(e)?e.map(o=>typeof o=="string"?o.trim():"").filter(Boolean).map(o=>o.startsWith("/")?o:`/${o}`):[]}function vb(e){if(typeof e!="string")return null;let o=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(o)?o:null}function Rb(e){let o=e??{},t=Ro;return{autoOpen:Bt(o.autoOpen,t.autoOpen),trigger:_o(Tb,o.trigger,t.trigger),autoOpenDelaySec:sa(o.autoOpenDelaySec,Ob,t.autoOpenDelaySec),scrollPercent:sa(o.scrollPercent,Fb,t.scrollPercent),showOn:_o(Pb,o.showOn,t.showOn),showOnPages:JL(o.showOnPages),devices:_o(YL,o.devices,t.devices),hideAfter:ZL(o),hideDays:sa(o.hideDays,_b,t.hideDays),afterSubmit:_o(XL,o.afterSubmit,t.afterSubmit),startDate:vb(o.startDate),endDate:vb(o.endDate)}}import{parseHexColor as QL}from"efficient-shell/format";var la="#000000";var Yf="popup",eB=oa,oB=["auto","full"],tB=["inside","outside","none"],rB={min:240,max:1440},aB={min:0,max:100},xn={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:la,tintOpacity:60,outsideClick:!0,closeButton:"inside"};function nB(e,o){let t=typeof e=="string"?e.trim():"";return t&&QL(t)===t.toLowerCase()?t:o}function Ab(e,o=xn){let t=e??{},r=o;return{placement:_o(eB,t.placement,r.placement),fullWidth:Bt(t.fullWidth,r.fullWidth),width:sa(t.width,rB,r.width),height:_o(oB,t.height,r.height),tintColor:nB(t.tintColor,r.tintColor),tintOpacity:sa(t.tintOpacity,aB,r.tintOpacity),outsideClick:Bt(t.outsideClick,r.outsideClick),closeButton:_o(tB,t.closeButton,r.closeButton)}}var Lb="cart-drawer",zee="cart-drawer",sB={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 Uee(e,o){return o===0?e.subtitleEmpty:o===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(o))}function $ee(e){let o=e??{},t=sB;return{kickerBadge:oo(o.kickerBadge,t.kickerBadge),kickerText:oo(o.kickerText,t.kickerText),titleLead:oo(o.titleLead,t.titleLead),titleAccent:oo(o.titleAccent,t.titleAccent),subtitleEmpty:oo(o.subtitleEmpty,t.subtitleEmpty),subtitleOne:oo(o.subtitleOne,t.subtitleOne),subtitleMany:oo(o.subtitleMany,t.subtitleMany),leadTimeValue:oo(o.leadTimeValue,t.leadTimeValue),shipsToFallback:oo(o.shipsToFallback,t.shipsToFallback),promises:Pl(o.promises,t.promises),emptyKicker:oo(o.emptyKicker,t.emptyKicker),emptyBody:oo(o.emptyBody,t.emptyBody)}}var jee={...xn,width:520,tintOpacity:68};var Db="consent-banner",Yee="consent-banner";var lB=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],Xee="Layout",Bb={layout:"bar"},iB=e=>lB.some(o=>o.value===e);function Zee(e){let o=oo((e??{}).layout,Bb.layout);return{layout:iB(o)?o:Bb.layout}}var Jee={...xn,placement:"bottom-center",fullWidth:!0,width:440,tintOpacity:0,outsideClick:!1,closeButton:"none"};var cB="consentWords",dB=["eyebrow","notice","accept","reject","choose"];function Xf(e){let o=(e??{})[cB];return typeof o=="string"&&dB.includes(o)?o:null}function Zf(e){let o=e?.props;return o?Xf(o)!==null?!0:Object.values(o).some(t=>Array.isArray(t)&&t.some(r=>r&&typeof r=="object"&&"props"in r&&Zf(r))):!1}var fB=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],ooe={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"},uB={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"},toe={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 Nb(e){let o={};for(let t of fB){let r=dt(e[uB[t]]);r&&(o[t]=r)}return o}var Mb={heading:"Join our email list",placeholder:"Email address",buttonLabel:"Subscribe"},pB={lead:"We accept"},Hb={...pB,methods:[],size:"sm",align:"start",dataSource:"shop-payment-methods"},Ao="site-footer";var aoe=Ao,noe={desktop:!0,tablet:!0,mobile:!0},soe={desktop:!1,tablet:!1,mobile:!1},Jf=1,Gb=6,loe=Array.from({length:Gb-Jf+1},(e,o)=>Jf+o),El={desktop:6,tablet:3,mobile:2},mB={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}},xr=e=>Math.min(Math.max(Math.round(e),Jf),Gb);function ioe(e){if(typeof e=="number")return mB[xr(e)]??{desktop:xr(e),tablet:xr(e),mobile:xr(e)};if(e&&typeof e=="object"){let o=e;return{desktop:xr(o.desktop??El.desktop),tablet:xr(o.tablet??El.tablet),mobile:xr(o.mobile??El.mobile)}}return{...El}}var Qf="subscribe-popup",xoe="subscribe-popup",hB=[Qf,Ao,Lb,Db];function zb(e){return hB.includes(e)}var xB=["right","left"],IB={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
|
|
3
|
+
*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:Ro.autoOpen,autoOpenDelaySec:Ro.autoOpenDelaySec,formSlug:"",trigger:Ro.trigger,scrollPercent:Ro.scrollPercent,showOn:Ro.showOn,showOnPages:[],hideAfter:Ro.hideAfter,hideDays:Ro.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},Me=oo,gB=Bt,Ub=Pl;function Wb(e,o){if(e==null)return o;let t=r=>r.trim()?r:"";if(typeof e=="string")return t(e);if(typeof e=="object"&&"text"in e){let r=e.text;return typeof r=="string"?t(r):""}return o}function bB(e,o){return Array.isArray(e)?Ub(e,[]):o}function yB(e,o){return Array.isArray(e)?e.map(t=>{let r=t??{};return{label:Me(r.label,""),value:Me(r.value,"")}}).filter(t=>t.label||t.value):o}function goe(e){let o=e??{},t=IB,r=Rb(o);return{metaLabel:Me(o.metaLabel,t.metaLabel),issueLabel:Wb(o.issueLabel,t.issueLabel),issueNumber:Wb(o.issueNumber,t.issueNumber),kicker:Me(o.kicker,t.kicker),heading:Me(o.heading,t.heading),deck:Me(o.deck,t.deck),stats:yB(o.stats,t.stats),formLabel:Me(o.formLabel,t.formLabel),formHeading:Me(o.formHeading,t.formHeading),formIntro:Me(o.formIntro,t.formIntro),firstNameLabel:Me(o.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:Me(o.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:Me(o.emailLabel,t.emailLabel),emailPlaceholder:Me(o.emailPlaceholder,t.emailPlaceholder),interestsLabel:Me(o.interestsLabel,t.interestsLabel),interests:Ub(o.interests,t.interests),frequencyLabel:Me(o.frequencyLabel,t.frequencyLabel),frequencies:bB(o.frequencies,t.frequencies),submitText:Me(o.submitText,t.submitText),finePrint:Me(o.finePrint,t.finePrint),dismissText:Me(o.dismissText,t.dismissText),emailInvalidText:Me(o.emailInvalidText,t.emailInvalidText),submitErrorText:Me(o.submitErrorText,t.submitErrorText),successHeading:Me(o.successHeading,t.successHeading),successBody:Me(o.successBody,t.successBody),keepBrowsingText:Me(o.keepBrowsingText,t.keepBrowsingText),formSlug:typeof o.formSlug=="string"?o.formSlug.trim():t.formSlug,autoOpen:r.autoOpen,autoOpenDelaySec:r.autoOpenDelaySec,trigger:r.trigger,scrollPercent:r.scrollPercent,showOn:r.showOn,showOnPages:r.showOnPages,hideAfter:r.hideAfter,hideDays:r.hideDays,formSide:_o(xB,o.formSide,t.formSide),valuePanelOnPhone:gB(o.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:o.sectionAccent,sectionCorners:o.sectionCorners,sectionCornerSides:o.sectionCornerSides,textStyles:Nb(o)}}function SB(e,o=Math.random){for(;;){let t=`popup-${Math.floor(o()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(t))return t}}function CB(e){return{root:{props:{title:e,kind:Yf}},content:[],zones:{}}}function $b(e,o,t){return{slug:SB(o,t),title:e,kind:"lightbox",layout:CB(e)}}function In(e){return e?.root?.props?.kind===Yf}function qb(e){let o=new Map;return(t="")=>{let r=Cb(),a=o.get(t);if(!a||a.token===null&&r!==null){let n=r||!EB().usesBridgedToken?e(r??"",t).catch(()=>[]):Promise.resolve([]);return o.set(t,{promise:n,token:r}),n}return a.promise}}var _B=qb(async(e,o)=>{let t=o?{siteId:o}:void 0,{pages:r}=Ne();return r.linkTargets?r.linkTargets(t):(await r.list(t)).map(a=>({id:a.id,slug:a.slug,label:a.label,layout:null}))}),RB=qb(async(e,o)=>await Ne().blog?.posts(o?{siteId:o}:void 0)??[]);function AB({value:e,onChange:o,label:t="Link",data:r,filters:a}){let n=Fl(()=>Vf(r,a),[r,a]),s=i(t);return Ir(Kb,{label:s,icon:Ir(kB,{}),children:Ir(vB,{value:e,onChange:l=>o(l),kinds:n.kinds,rules:n.rules,filtersFor:n.filtersFor,label:s})})}function Vb(){let{siteId:e,capabilities:o}=OB(),{offersCommerce:t,hasBlog:r}=o,[a,n]=Ol([]),[s,l]=Ol([]),[c,d]=Ol([]),[u,h]=Ol(null),p=FB().chrome,x=p?.products?.list,g=p?.linkFilters,y=g?void 0:p?.linkRow,E=PB(!0);jb(()=>(E.current=!0,()=>{E.current=!1}),[]),jb(()=>{let I=!0;return _B(e??void 0).then(w=>I&&E.current&&n(w)),r&&RB(e??void 0).then(w=>I&&E.current&&l(w)),t&&x?.().then(w=>I&&E.current&&d(w)),t&&g?g.load(e).catch(()=>null).then(w=>I&&E.current&&h(()=>w)):h(null),()=>{I=!1}},[e,t,r,x,g]);let O=Fl(()=>({pages:a.filter(I=>!zb(I.slug)&&!In(I.layout)).map(I=>({slug:I.slug,title:I.label,docs:[I.layout]})),popups:a.filter(I=>I.slug===Qf||In(I.layout)).map(I=>({slug:I.slug,title:I.label})),posts:r?s.map(I=>({slug:I.slug,title:I.title})):[],products:t?c.map(I=>({href:I.href,name:I.name})):[],offers:{offersCommerce:t,offersService:r}}),[a,s,c,t,r]),C=Fl(()=>u?u(O.pages):null,[u,O]);return{data:O,filters:C,pages:a,offersCommerce:t,HostLinkRow:y}}function Noe({label:e,icon:o,text:t,onTextChange:r,link:a,onLinkChange:n}){let{data:s,filters:l}=Vb(),c=Fl(()=>Vf(s,l),[s,l]),d=i(e);return Ir(Kb,{label:d,icon:o,children:Ir(TB,{label:d,text:t,onTextChange:r,link:a,onLinkChange:u=>n(u),kinds:c.kinds,rules:c.rules,filtersFor:c.filtersFor})})}function Yb({value:e,onChange:o,label:t="Link"}){let r=typeof e=="string"?e:"",{data:a,filters:n,pages:s,offersCommerce:l,HostLinkRow:c}=Vb(),d=a.pages.map(h=>un(h.slug)),u=l&&c&&(r==="/"||d.includes(r))?c:void 0;return wB("div",{children:[Ir(AB,{value:r,onChange:o,label:t,data:a,filters:n}),u&&Ir(u,{value:r,onChange:o,pages:s})]})}import{UiIcon as Vy}from"efficient-easel/draw/client";import{phoneKey as GB,tabletKey as WB}from"efficient-easel/draw";import{AUTO_RULES as LB,FOLLOW_RULES as BB,VIEW_DESKTOP_MIN as DB,VIEW_TABLET_MIN as Xb,isAuto as NB,resolveViewValue as MB}from"efficient-easel/draw";var HB="v1";function _l(){return HB==="v2"?LB:BB}var Zb=.02,Jb=`(min-width: ${Xb}px) and (max-width: ${DB-Zb}px)`,ia=`(max-width: ${Xb-Zb}px)`;function Dt(e,o,t,r,a=_l()){let n=MB(e,o,t,r,a),s={},l=(c,d)=>!NB(c)||d!=null&&d!==o;return l(t,n.tablet)&&(s.tablet=n.tablet),l(r,n.phone)&&(s.phone=n.phone),s}var Lo={min:10,max:200,step:10};function zB(e,o){let t=K(e),r=K(o);if(!(t===void 0&&r===void 0))return{paddingTop:t,paddingBottom:r}}var UB="sf-pad-top-phone",$B="sf-pad-bottom-phone",jB="--sf-pad-t-phone",KB="--sf-pad-b-phone",qB="sf-pad-left-phone",VB="sf-pad-right-phone",YB="--sf-pad-l-phone",XB="--sf-pad-r-phone",ZB="sf-pad-top-tablet",JB="sf-pad-bottom-tablet",QB="sf-pad-left-tablet",eD="sf-pad-right-tablet",oD="--sf-pad-t-tablet",tD="--sf-pad-b-tablet",rD="--sf-pad-l-tablet",aD="--sf-pad-r-tablet";function Rl(e){let o=zB(e.top,e.bottom),t=eu({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});return o===void 0&&!t.classes.length&&!Object.keys(t.style).length?null:{className:["sf-section-pad",...t.classes].join(" "),style:{...o,...t.style}}}var nD=[["top","paddingTop",[ZB,oD],[UB,jB]],["bottom","paddingBottom",[JB,tD],[$B,KB]],["left","paddingLeft",[QB,rD],[qB,YB]],["right","paddingRight",[eD,aD],[VB,XB]]];function eu(e,o,t={},r=e){let a={},n={},s=[];for(let[l,c,...d]of nD){let u=K(e[l]);u!==void 0&&(a[c]=u);let h=Dt("spacing",K(r[l]),K(t[l]),K(o[l]));for(let[p,[x,g]]of[["tablet",d[0]],["phone",d[1]]]){let y=h[p];typeof y=="number"&&(s.push(x),n[g]=`${y}px`)}}return{classes:s,style:{...a,...n}}}function Qb(e,o,t){let r=K(e)??t,a=K(o);return r===void 0?a:a===void 0?r:r+a}function Al(e,o={}){return{top:Qb(e.padTop,e.sectionPaddingTop,o.top),bottom:Qb(e.padBottom,e.sectionPaddingBottom,o.bottom)}}var ou={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"};function ey(e,o=ou,t=!0){let r={};for(let a of t?["top","bottom","left","right"]:["top","bottom"])r[a]=e[o[a]],r[`${a}Tablet`]=e[WB(o[a])],r[`${a}Phone`]=e[GB(o[a])];return r}function $oe(e){return Rl(e)}function joe(e,o){let t=r=>typeof r=="number"?r+o:void 0;return Rl({...e,top:t(e.top),bottom:t(e.bottom),topTablet:t(e.topTablet),bottomTablet:t(e.bottomTablet),topPhone:t(e.topPhone),bottomPhone:t(e.bottomPhone)})}import{BUTTON_PAD_KEYS as Ll,buttonBorderOf as sD,buttonFillOpacityOf as lD,buttonPadSidesOf as iD}from"efficient-easel/draw";var cD="px-6 py-4",dD=4,Bl=e=>{let o=new RegExp(`\\bp${e}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(cD);if(!o)throw new Error(`BUTTON_PAD_CLASSES has no p${e}`);return o[1]!==void 0?Number(o[1]):Number(o[2])*dD},Joe={top:Bl("y"),right:Bl("x"),bottom:Bl("y"),left:Bl("x")},ty="var(--btn)";function fD(e){let o=e.variant==="ghost",t=lD(e.buttonFillOpacity),r=sD(e.buttonBorder),a=we(e.buttonColor);return{fillOpacity:t??(o?0:100),border:{width:r?.width??1,color:r?.color??a??(o?"currentColor":ty)},changed:t!==void 0||r!==void 0}}function Qoe(e){let o=fD(e);if(!o.changed)return null;let t=we(e.buttonColor)??ty;return{background:o.fillOpacity===0?"transparent":o.fillOpacity===100?t:`color-mix(in srgb, ${t} ${o.fillOpacity}%, transparent)`,borderWidth:o.border.width,borderStyle:"solid",borderColor:o.border.color}}var uD="var(--sf-button-radius, 0)";function ete(e){let o=K(e.buttonCorners),t=Jo(e.buttonCornerSides);if(o===void 0&&t===null)return null;let r=o===void 0?uD:`${Math.max(0,o)}px`;return{borderRadius:t===null?r:sr(r,t)}}function ote(e){let o=a=>iD({top:e[`${Ll.top}${a}`],right:e[`${Ll.right}${a}`],bottom:e[`${Ll.bottom}${a}`],left:e[`${Ll.left}${a}`]})??{},{classes:t,style:r}=eu(o(""),o("Phone"),o("Tablet"));return Object.keys(r).length?{className:t.join(" "),style:r}:null}var oy="upper";function ry(e,o,t){let r=e&&typeof e=="object"?e:{},a=we(r.textStyle),n=a?we(o?.find(u=>u?.id===a)?.name):void 0,s=a?/^(heading|body)-(\d+)$/.exec(a):null,l=a?n||(s?t.styleName({kind:s[1],n:Number(s[2])}):a):t.noStyle,{cases:c}=t,d=we(r.case)??oy;return`${l} \xB7 ${c[d]??c[oy]}`}import{usePreviewParts as k2}from"efficient-easel/draw/client";import{encodePartId as v2}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as T2,useEaselStrings as P2}from"efficient-easel/strings";var pD=["auto","fixed","screen"],mD=["px","%"];var hD="var(--sf-header-h, 88px)",tu={min:40,max:2e3,step:10,fallback:600},ru={min:10,max:200,step:5,fallback:100},xD="sf-section-minh",au="grid-cols-[minmax(0,1fr)]",ay={base:"--sf-section-minh",small:"--sf-section-minh-s"},sy=e=>typeof e=="string"&&pD.includes(e),ID=e=>typeof e=="string"&&mD.includes(e);function Dl(e){let o=sy(e.sectionHeightMode)?e.sectionHeightMode:"auto",t=o==="screen"?"%":ID(e.sectionHeightUnit)?e.sectionHeightUnit:"px",r=o==="screen"?ru.fallback:tu.fallback,a=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:r;return{mode:o,value:a,unit:t}}function ly(e){let{mode:o,value:t,unit:r}=Dl(e);if(o==="auto")return;if(o==="fixed"&&r==="px")return[`${t}px`,null];let a=t/100,n=s=>o==="screen"?`(100${s} - ${hD})`:`100${s}`;return[`calc(${n("vh")} * ${a})`,`calc(${n("svh")} * ${a})`]}function iy(e){let o=ly(e);if(!o)return;let[t,r]=o;return{display:"grid",[ay.base]:t,...r?{[ay.small]:r}:{}}}var rte=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),ca="Height",gD="sf-section-minh-phone",ny={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function nu(e){return sy(e.sectionHeightModePhone)}function ate(e){return Dl({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function bD(e){let o=iy(e),t=nu(e)?ly({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})??(o?["auto",null]:void 0):void 0;if(!o&&!t)return null;let r=[xD,au],a={...o??{}};return t&&(r.push(gD),a[ny.base]=t[0],t[1]&&(a[ny.small]=t[1])),{className:r.join(" "),style:a}}function yD(e){return bD(e)!==null}var SD=`grid ${au}`,cy="h-full",CD=`max-[720px]:grid ${au}`;function dy(e){return yD(e)?iy(e)?SD:CD:""}var Nl="Stick to top",Nt={min:0,max:200,step:4,fallback:0},wD="sf-section-stick",lte="sf-scroll-over",kD="sf-section-stick-phone-on",vD="sf-section-stick-phone-off",fy={desktop:"--sf-stick-distance",phone:"--sf-stick-distance-phone"},ite=new Set(["CategoryBar","DocTabs","IntroBleed","Contents"]);function uy(e){let o=K(e)??Nt.fallback;return Math.min(Nt.max,Math.max(Nt.min,Math.round(o)))}function su(e){return typeof e.stickTopPhone=="boolean"}function lu(e){let o=e.stickTop===!0,t=uy(e.stickTopDistance),r=su(e),a=r?e.stickTopPhone===!0:o,n=r?uy(e.stickTopDistancePhone):t;return{desktop:o,desktopDistance:t,phone:a,phoneDistance:n,ownPhone:r}}function cte(e){let o=lu(e);if(!o.desktop&&!o.phone)return null;let t=[wD],r={};return o.desktop&&(r[fy.desktop]=`${o.desktopDistance}px`),(o.ownPhone||o.phone!==o.desktop)&&(t.push(o.phone?kD:vD),o.phone&&(r[fy.phone]=`${o.phoneDistance}px`)),o.desktop||t.push("sf-section-stick-desktop-off"),{className:t.join(" "),style:r}}var TD=["column","row","tabs"];var PD={column:"Stacked",row:"One row",tabs:"Tabs"},py={Flex:TD,HeroGroup:["column","row"]},ED={Flex:"row",HeroGroup:"column"},OD={column:"flex-col",row:"flex-row",tabs:"flex-col"};function Ml(e,o){return py[e].includes(o)?o:ED[e]}function fte(e,o){return OD[Ml(e,o)]}function my(e){return py[e].map(o=>({label:PD[o],value:o}))}var iu="small",cu="dot",FD=[{label:"Small",value:"small"},{label:"Display",value:"display"}],du=[{label:"Dot \u25CF",value:"dot"},{label:"Cross \u2715",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle \u25BC",value:"triangle"},{label:"None",value:"none"}],Hl={dot:"\u25CF",cross:"\u2715",slash:"/",triangle:"\u25BC",none:""},_D={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-[800px]:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-[800px]:text-[length:var(--size-headingMedium,28px)]"},RD={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function mte(e){return mo(FD,iu,e)}function gn(e){return mo(du,cu,e)}function hte(e){return _D[e]}function hy(e,o){return RD[e][o]}var gte=[{value:"none"},{value:"dot"},{value:"cross"},{value:"slash"},{value:"triangle"}];function xy(e){return du.some(o=>o.value===e)?gn(e):void 0}var AD="overflow-hidden [&>*]:shrink-0 [&>*]:max-[800px]:basis-[content] [&>*_:is(p,h1,h2,h3,h4,h5,h6)]:max-w-none [&>*_:is(.sf-button-block>div)]:font-mono [&>*_:is(.sf-button-block>div)]:text-[length:var(--size-label,14px)] [&>*_:is(.sf-button-block>div)]:tracking-[0.2em] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:inline-flex [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:items-center [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:align-top [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:h-[calc(1lh/var(--sf-sep-k,1))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:mr-[var(--sf-gap-len,0px)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-[800px]:before:mr-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-accent [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*+*_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:before:content-[var(--sf-sep-mark)]";function da(e,o){return e==="row"&&xy(o)!==void 0}function bte(e,o){return da(e,o)?AD:""}var LD="[&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:inline-flex [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:items-center [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:align-top [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:h-[calc(1lh/var(--sf-sep-k,1))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:ml-[var(--sf-gap-len,0px)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:max-[800px]:after:ml-[var(--sf-gap-len-phone,calc(var(--sf-gap-len,0px)/2))] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-accent [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:text-[length:calc(var(--sf-sep-k,1)*1em)] [&>*:last-child_:is(:is(p,h1,h2,h3,h4,h5,h6):first-child,.sf-button-block>div)]:after:content-[var(--sf-sep-mark)]";function yte(e,o){return da(e,o)?LD:""}function Ste(e,o){if(!da(e,o))return{};let t=xy(o),r=/^text-\[([\d.]+)em\]$/.exec(hy("small",t))?.[1],a=Hl[t];return{"--sf-sep-mark":a===""?"none":JSON.stringify(a),...r?{"--sf-sep-k":r}:{}}}var bn={sectionPaddingTop:0,sectionPaddingBottom:0},Iy={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},gy={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function kte(e,o){let t=typeof e=="string"&&e in Iy?Iy[e]:"",r=typeof o=="string"&&o in gy?gy[o]:"";return[t,r].filter(Boolean).join(" ")}function vte(e){return e===!0||e==="wrap"?"flex-wrap":""}var Gl="Block widths",fu=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]},{label:"2 : 3",value:"twoThree",weights:[2,3]}],fa="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",BD={equal:fa,bigLeft:`${fa} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${fa} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${fa} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${fa} [&>*:last-child]:min-[800px]:grow-[3]`,twoThree:`${fa} [&>*:first-child]:min-[800px]:grow-[2] [&>*:last-child]:min-[800px]:grow-[3]`};function DD(e){return typeof e=="string"?BD[e]??"":""}var ND="[&>*]:min-[800px]:basis-[content]";function Tte(e){return DD(e)===""?ND:""}var uu="Columns",Wl=1,by=3,yy={2:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},Sy=fu.filter(e=>e.value==="content"||e.value==="equal"),Cy="equal",pu=1,wy=6,ua="min-[800px]:flex-wrap [&>*]:min-[800px]:min-w-0 [&>*]:min-[800px]:grow-0!",MD={1:`${ua} [&>*]:min-[800px]:basis-[calc(100%/1)]!`,2:`${ua} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${ua} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${ua} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${ua} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${ua} [&>*]:min-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function HD(e){return typeof e=="number"?MD[e]??"":""}var GD={1:"min-[720px]:max-[1100px]:flex-row! min-[720px]:max-[1100px]:flex-wrap! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:min-w-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:grow-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:basis-[calc(100%/1)]!",2:"min-[720px]:max-[1100px]:flex-row! min-[720px]:max-[1100px]:flex-wrap! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:min-w-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:grow-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"min-[720px]:max-[1100px]:flex-row! min-[720px]:max-[1100px]:flex-wrap! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:min-w-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:grow-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"min-[720px]:max-[1100px]:flex-row! min-[720px]:max-[1100px]:flex-wrap! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:min-w-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:grow-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"min-[720px]:max-[1100px]:flex-row! min-[720px]:max-[1100px]:flex-wrap! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:min-w-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:grow-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"min-[720px]:max-[1100px]:flex-row! min-[720px]:max-[1100px]:flex-wrap! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:min-w-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:grow-0! [&>*:nth-child(n)]:min-[720px]:max-[1100px]:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function WD(e){return typeof e=="number"?GD[e]??"":""}function Pte(e){return e.direction!=="row"||da(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":WD(e.columnsTablet)}function Ete(e){return e.direction!=="row"||da(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":HD(e.columns)}var zD="max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:grow-0 [&>*]:max-[800px]:basis-[content]",UD={2:"max-[800px]:flex-nowrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-[800px]:flex-nowrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},$D="max-[800px]:flex-nowrap [&>*]:max-[800px]:grow-0 [&>*]:max-[800px]:basis-[content]";function jD(e){return e===!1||e==="nowrap"}function Ote(e,o,t){let r=yy[Number(e)];if(!r)return"max-[800px]:flex-col";let a=jD(t);return KD(e,o)?a?$D:zD:a?UD[Number(e)]:r}function KD(e,o){return Number(e)in yy&&o==="content"}var ky="Block spacing",mu=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],qD="sf-box-gap-only";function Fte(e){return e==="gap"?qD:""}var VD=["solid","dashed","dotted"],YD=["top","right","bottom","left"],Rte="sf-section-border",Ate="sf-section-border-self",XD=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,vy=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(20,Math.max(0,Math.round(e)))}px`:void 0;function Ty(e,{phone:o=!1}={}){if(!e||typeof e!="object")return;let t=o?"-phone":"",r={};for(let a of YD){let n=vy(e[a])??vy(e.width);n!==void 0&&(r[`--sf-border-${a}-width${t}`]=n)}return typeof e.style=="string"&&VD.includes(e.style)&&(r[`--sf-border-style${t}`]=e.style),typeof e.color=="string"&&XD.test(e.color)&&(r[`--sf-border-color${t}`]=e.color.toLowerCase()),Object.keys(r).length?r:void 0}function Lte(e,o){let t=Ty(e),r=Ty(o,{phone:!0});return t||r?{...t,...r}:void 0}var zl="sf.gapContainer",mt={min:-32,max:64,step:2},Fy={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},pa={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},ZD=new Set(["Events","GalleryB"]);function br(e,o,t){if(typeof o=="number"&&Number.isFinite(o)&&o>=mt.min)return o;if(typeof o=="string"){let r=Fy[e]?.[o];if(typeof r=="number")return r}return typeof t=="number"&&Number.isFinite(t)?t:pa[e]}var JD="sf-gap-overlap",QD="--sf-gap-overlap",_y="--sf-block-gap",eN="--sf-block-gap-rem",gr={min:0,max:mt.max,step:mt.step};function yn(e){if(typeof e!="number"||!Number.isFinite(e))return null;let o=Math.min(Math.max(Math.round(e),gr.min),gr.max);return o-o%gr.step}function Dte(e){let o=yn(e);return o===null?{}:{[_y]:`${o}px`,[eN]:`${o/16}rem`}}var oN="--sf-block-gap-phone",tN="--sf-block-gap-phone-rem",rN="--sf-block-gap-on-phone",aN="max-[720px]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function Nte(e){let o=yn(e);return o===null?{}:{[oN]:`${o}px`,[tN]:`${o/16}rem`}}function Mte(e){return yn(e)===null?"":aN}var Py="sf-gap-zone",Ey="--sf-gap-len";function Ul(e,o){return typeof o=="number"&&Number.isFinite(o)&&o>=mt.min?!0:typeof o=="string"&&typeof Fy[e]?.[o]=="number"}var Oy="--sf-gap-len-phone",nN="--sf-gap-len-tablet",Sn={min:0,max:mt.max,step:mt.step};function Mt(e){return typeof e=="number"&&Number.isFinite(e)&&e>=Sn.min}function hu(e){return e/2}function xu(e,o,t){return Mt(t)&&!Ul(e,o)}function Iu(e,o,t,r,a){return Mt(o)?o:xu(e,t,a)?a:hu(br(e,t,r))}var sN={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function Hte(e,o,t,r,a){let n={...Mt(r)?{[Oy]:`${r}px`}:null,...Mt(a)?{[nN]:`${a}px`}:null};if(!Ul(e,o)){let l=`${pa[e]}px`,c=ZD.has(e)?`var(--sf-card-gap, ${l})`:l;return{className:` ${Py}`,style:{[Ey]:`var(${_y}, ${c})`,[Oy]:`var(${rN})`,...n}}}let s=br(e,o);return s>=0?{className:` ${Py}`,style:{[Ey]:`${s}px`,...n}}:{className:` ${JD} ${sN[t]}`,style:{gap:"0px",[QD]:`${-s/2}px`}}}var Ry=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],Ay={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Bo="var(--section-bg)",$l="inherit";function jl(e,o){return e===$l?Bo:e===void 0?o:Kl(e)}var lN=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function Kl(e){return e.replace(lN,"var(--site-$1")}function Ly(e,o){return e===$l?!0:e===void 0&&o===Bo}var By=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],Dy={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},ma="var(--wheel-stage)",ql="transparent",Cn="inherit";function Ute(e,o){return Kl(gu(e,o))}function gu(e,o){return e===Cn?ma:e==null?o:e===!0?ma:e===!1?ql:e}function $te(e){return typeof e=="string"&&e!==Cn?Kl(e):ma}function jte(e){return e!==ql&&e!=="none"&&e!==""}function Ny(e,o){return e===Cn||e===!0?!0:e==null?o===ma:!1}var My="inherit",Vl="fixed",Hy=e=>typeof e!="number"&&e!==Vl,iN="var(--sf-heading-max, 9999px)";function qte(e,o,t,r){if(typeof e=="number")return`${e}px`;if(e===Vl)return o;let a=r?`var(--size-${r}, ${o})`:o;return t==="heading"?`min(${a}, ${iN})`:a}var cN=["page","full"],Gy=["full","page"],yr={full:"Full width",page:"Content width"},bu="inherit",dN=e=>typeof e=="string"&&cN.includes(e),fN=e=>e===bu;function uN(e,o){return fN(e.widthMode)?{mode:"full",inherited:!0}:dN(e.widthMode)?{mode:e.widthMode,inherited:!1}:{mode:o,inherited:o==="full"}}function Yte(e){return uN(e,"page").mode==="full"}var pN={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 Xte(e){return Object.prototype.hasOwnProperty.call(pN,e)}var Wy="siteWidths",mN=e=>e==="full"||e==="content";function Yl(e){return mN(e)?e:null}function zy(e,o){return{[Wy]:{background:Yl(e),content:Yl(o)}}}function Zte(e){let o=e.editor?.metadata?.[Wy];return{background:Yl(o?.background),content:Yl(o?.content)}}import{jsx as hN}from"react/jsx-runtime";import{createContext as xN,useContext as ore}from"react";var IN=2,tre=IN+1,gN=xN(2);function Uy({tier:e,children:o}){return hN(gN.Provider,{value:e,children:o})}import{useEaselSession as E2}from"efficient-easel/screen/lib/session-context";import{BOX_GAP as O2,describedAs as Ht,group as No,iconOf as kn,sharedStyleKinds as vn}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as F2,phoneTwinFields as Yy}from"efficient-easel/screen/lib/document/box-fields";import{createElement as $y}from"react";import{SettingsField as bN}from"efficient-easel/panel";import{boxFieldBuilders as yN,describedAs as SN,iconOf as CN}from"efficient-easel/screen/lib/document/box-fields";import{IconPicker as wN}from"efficient-shell/ui";var kN=e=>i(e),to=yN(kN),ot=to.slider,Do=to.select,Xl=to.Segmented,ha=to.segmented,cre=to.alignmentField,dre=to.alignmentFields,fre=to.blockAlignmentField,ure=to.blockAlignmentFields,pre=to.boxJustifyField,mre=to.boxAlignField,hre=to.boxWrapField,jy=to.directionField,Zl=to.gapField,xre=to.placementField,Ire=to.PlacementGridView,gre=to.positionFields,Jl=to.sidesPaddingFields;function bre(e,o,t,r,a={}){let n=s=>t.some(l=>l.value===s);return{type:"custom",...SN({},{type:"radio",label:e,options:t.map(s=>s.label===void 0?{value:s.value}:{value:s.value,label:s.label})}),render:({value:s,onChange:l,field:c})=>{let d=t.map(p=>({value:p.value,...p.label===void 0?{}:{label:i(p.label)},icon:p.picture})),u=c?.currentValue,h=a.resolve?a.resolve(s)??r:n(s)?s:n(u)?u:r;return $y(bN,{label:i(e),icon:CN(o)},$y(wN,{label:i(e),value:h,options:d,onChange:l,emptyValue:a.emptyValue}))}}}import{TEXT_CONTROL_KINDS as Qae,SCALAR_TEXT_CONTROLS as ene}from"efficient-easel/draw";function Cr(e,o){return i("{value} from {from}",{value:e,from:o})}function _2(){let{blockGap:e}=ne();return e===null?i("this container's own spacing"):Cr(`${e}px`,i("Styles"))}function R2({inherited:e,onReset:o,label:t}){return S(co,{words:Q()?.panel,label:i(t),changed:!e,detail:_2(),onReset:o})}function A2(e){return Zl({...O2,builtIn:pa[e],resolve:(o,t)=>br(e,o,t?.siteGap),action:(o,t)=>S(R2,{inherited:!Ul(e,o),onReset:()=>t(void 0),label:"Gap"}),mark:{[zl]:e}})}function L2(e){return Oo(je("mobile",{[zl]:e,type:"custom",render:o=>S(N2,{container:e,...o})}),mS)}function B2(e){return Oo(je("tablet",{[zl]:e,type:"custom",render:o=>S(D2,{container:e,...o})}),mS)}var mS={not:{field:"gap",in:Array.from({length:-mt.min},(e,o)=>mt.min+o)}};function jae(e){return{gap:je("desktop",A2(e)),[C2("gap")]:B2(e),[xa("gap")]:L2(e)}}function D2({container:e,...o}){let[t]=Sr("gap"),{siteGap:r}=o.field??{},a=Math.max(Sn.min,br(e,t,r));return Zl({...Sn,builtIn:a,resolve:n=>Mt(n)?n:a,action:(n,s)=>S(co,{words:Q()?.panel,label:i("Gap"),changed:Mt(n),detail:Cr(`${a}px`,i("Desktop")),onReset:()=>s(void 0)})}).render(o)}function N2({container:e,...o}){let[t]=Sr("gap"),{siteGap:r,siteGapPhone:a}=o.field??{},n=Iu(e,void 0,t,r,a);return Zl({...Sn,builtIn:n,resolve:s=>Iu(e,s,t,r,a),action:(s,l)=>S(co,{words:Q()?.panel,label:i("Gap"),changed:Mt(s),detail:Cr(`${n}px`,xu(e,t,a)?i("Styles"):i("Desktop")),onReset:()=>l(void 0)})}).render(o)}function Kae(e){return jy({offered:my(e),fallback:Ml(e,void 0),resolve:o=>Ml(e,o)})}function qae(e,o){return lg(o?yf(e,o):[],o)}function M2({inherited:e,onReset:o,label:t}){return S(co,{words:Q()?.panel,label:i(t),changed:!e,detail:Cr(i("Full"),i("the page")),onReset:o})}function wr({value:e,onChange:o,label:t,placeholder:r,hint:a,multiline:n,hideable:s=!0,markup:l=!0}){let{text:c,hidden:d}=Wt(e),u=oi(null),h=oi(null),p=C=>o(s?{text:C,hidden:d}:C),x=()=>o({text:c,hidden:!d}),g=s&&d,y=tS(),E=a?U2(a)?S("span",{className:"sf-hint-keep sf-hint-while-typing",children:i(a)}):S(fg,{children:i(a)}):void 0,O=d?i("Show {label} on the slide",{label:i(t)}):i("Hide {label} on the slide",{label:i(t)});return S(Ke,{label:i(t),icon:S(o2,{}),htmlFor:y,className:g?"is-hidden":void 0,hint:E,action:s?S(ti,{content:O,children:S(uS,{"aria-pressed":d,"aria-label":O,onClick:x,children:d?S(Vy,{name:"eye-off",size:14}):S(Vy,{name:"eye",size:14})})}):void 0,children:Ia("div",{className:"sf-copybox",children:[l&&S(Ff,{target:n?h:u,value:c,onChange:p}),n?S("textarea",{id:y,ref:h,value:c,placeholder:r===void 0?void 0:i(r),onChange:C=>p(C.target.value)}):S("input",{id:y,ref:u,type:"text",value:c,placeholder:r===void 0?void 0:i(r),onChange:C=>p(C.target.value)})]})})}function Vae(e,o){return{...e,[RN]:o}}function Yae(e){let o=e[ht];if(!o)throw new Error("withOffPage: the field holds no authored text");return{...e,[ht]:{...o,offPage:!0}}}function ni(e){return!e||typeof e!="object"?!1:e[ht]?.offPage===!0}var hS="sfPanelOnly";function Xae(e){if(!e[ht])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[hS]:!0}}function xS(e){return!!e&&typeof e=="object"&&e[hS]===!0}function Zae(e){let o=e[ht];if(!o)throw new Error("withIdentifier: the field holds no authored text");return{...e,[ht]:{...o,identifier:!0}}}function one(e,o){if(!e[ht])throw new Error("inOwnBox: the field holds no authored text");let{[y2]:t,...r}=e;return{...r,[_f]:!0,render:o}}var H2=new Set(w2),ri={type:"radio",options:[{value:!0},{value:!1}]},IS={text:{type:"object",objectFields:{text:{type:"text"},hidden:ri}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:ri}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},kr=(e,o)=>{let t=Ht({...o,[ht]:e},{...IS[e.control],label:e.label});if(!H2.has(e.control))return t;let r=o.render;return{...pS(t,"authored-copy"),render:a=>S(Xg,{name:a.name,children:r(a)})}},tne="Everything else on this block comes from the linked post. Unlink it to edit by hand.",G2={field:"source.slug",set:!0},rne={not:G2},W2="Select a word, then press the highlighter.",z2=new Set([W2]),U2=e=>z2.has(e);function ane(e,o,t){return kr({control:"text",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>S(wr,{value:r,onChange:a,label:e,placeholder:o,hint:t})})}function nne(e,o,t){return kr({control:"textarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>S(wr,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0})})}function sne(e,o,t){return kr({control:"plainText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>S(wr,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1,markup:!1})})}function lne(e,o,t){return kr({control:"copyText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>S(wr,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1})})}function ine(e){return{type:"custom",[FN]:{label:e},...Ht({},{type:"text",label:e}),render:({value:o,onChange:t})=>S(Yb,{value:ON(o),onChange:t,label:e})}}function cne(e,o,t){return kr({control:"plainTextarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>S(wr,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0,hideable:!1})})}var gS={Design:AN,Animation:BN};function dne(e){return{type:"custom",render:()=>S($2,{text:e})}}function $2({text:e}){return S("p",{className:"sf-note",children:i(e)})}function fne(e){return xt(e)!==null&&e?.tabs!==void 0}var Xy=new Map;function si(e,o){let t=`${e}\0${o?o.join(""):""}`,r=Xy.get(t)??{type:"custom",tabs:o,[rS]:{label:e,level:1},bucket:e,marker:!0,render:()=>S(Gt,{})};return Xy.set(t,r),r}var Zy=new Map;function ku(e){let o=Zy.get(e)??{type:"custom",[rS]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>S(Gt,{})};return Zy.set(e,o),o}function j2(e){let o=e;return o?.marker===!0&&typeof o.fold=="string"?o.fold:null}function bS(e,o){return j2(e)===o?e:{...e,marker:!0,fold:o,render:()=>S(Gt,{})}}function yS(e){let o=e;if(o.marker===!0&&o.fold===void 0)return e;let{fold:t,...r}=e;return{...r,marker:!0,render:()=>S(Gt,{})}}function vu({title:e,children:o}){let[t,r]=wn(()=>!yu.has(e));return S(a2,{title:e,open:t,onToggle:a=>{r(a),a?yu.delete(e):yu.add(e)},children:o})}var yu=new Set;function SS({swatches:e,current:o,onPick:t,names:r}){let a=e.find(l=>l.toLowerCase()===o.toLowerCase()),n=a?r?.[a]:void 0,s=n?i(n):o;return Ia("div",{className:"sf-swatches",children:[e.map(l=>{let c=r?.[l]?i(r[l]):l;return S(ti,{content:c,children:S(p2,{color:l,selected:o.toLowerCase()===l.toLowerCase(),onClick:()=>t(l),"aria-label":c})},l)}),S("span",{className:"sf-swatch-hex",children:s})]})}function une(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=Ly(t,o);return S(Ke,{label:i(e),icon:S(DN,{}),changed:!a,action:S(co,{words:Q()?.panel,label:i(e),changed:!a,detail:i("the theme's section background"),onReset:()=>r($l)}),children:SS({swatches:Ry,current:a?Bo:t??o??"",onPick:r,names:Ay})})}}}function K2(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=t,n=Ny(a,o);return S(Ke,{label:i(e),icon:S(sS,{}),changed:!n,action:S(co,{words:Q()?.panel,label:i(e),changed:!n,detail:i("the theme's image stage"),onReset:()=>r(Cn)}),children:SS({swatches:By,current:n?ma:gu(a,o),onPick:r,names:Dy})})}}}function li(e=t=>t,o){return vn({_gSectionTheme:No(mb),sectionAccent:{type:"custom",render:({value:t,onChange:r})=>S(yb,{value:e(t),onChange:r,followLabel:o})}})}function go({min:e,max:o,step:t,value:r,onChange:a,suffix:n="",readout:s=!0,notch:l,ariaLabel:c,disabled:d=!1}){let u=l!==void 0&&Number.isFinite(l)&&l>=e&&l<=o;return S("div",{className:u?"sf-slider has-notch":"sf-slider",style:u?{"--sf-notch":(l-e)/(o-e)}:void 0,children:S(g2,{min:e,max:o,step:t,value:r,suffix:n||void 0,showInput:s,label:c===void 0?void 0:i(c),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:h=>{h!==null&&h!==r&&a(h)}})})}function CS(e,o){let{min:t,max:r,step:a=1,unsetLabel:n,hint:s,restTrack:l,unsetMark:c,icon:d,unit:u="px"}=o;return{type:"custom",render:({value:h,onChange:p})=>{let x=typeof h=="number"?h:null,g=x===null;return S(Ke,{label:i(e),icon:d?kn(d):void 0,value:g?c||n===void 0?void 0:i(n):`${x}${u}`,changed:!g,action:c?oS(c,{changed:!g,onReset:()=>p(null)}):S(co,{words:Q()?.panel,label:i(e),changed:!g,onReset:()=>p(null)}),hint:typeof s=="string"?i(s):s,children:l?l({min:t,max:r,step:a,px:x,label:e,onChange:p}):go({min:t,max:r,step:a,value:x??t,readout:!1,ariaLabel:e,onChange:p})})}}}var ii="Corners";function Tu(e){return{type:"custom",render:({value:o,onChange:t})=>{let r=typeof o=="number"&&Number.isFinite(o)?o:null,a=r!==null;return S(Ke,{label:i(ii),icon:S(HN,{}),changed:a,action:oS(e.mark,{changed:a,onReset:()=>t(null)}),hint:e.hint,children:S(q2,{tier:e,px:r,onRadius:t})})}}}function Sr(e){let o=ai();return[o?.values?.[e],t=>o?.onChange(e,t)]}function wS(){return pS({type:"custom",render:()=>S(S2,{})},"always")}function Mf(){let e=ai();return o=>e?.onChangeMany(o)}function q2({tier:e,px:o,onRadius:t}){let r=e.useFollowed(),[a,n]=Sr(e.sidesKey),s=Jo(a)??[...rl];return S(m2,{label:i(ii),value:s,corners:DI,onChange:l=>{let c=Jo(l)??[];n(c.length===rl.length?null:c)},radius:o,onRadiusChange:t,radiusMin:Co,radiusMax:tr,radiusStep:e.step??1,radiusPlaceholder:String(r)})}function kS(){return wS()}function V2({label:e,changed:o=!1,onReset:t=()=>{}}){let{cornerRadiusPx:r}=ne(),a=typeof r=="number"?`${r}px`:i("not set");return S(co,{words:Q()?.panel,label:i(e),changed:o,detail:r==null?i("the built-in corners"):Cr(a,i("Styles")),onReset:t})}function Y2(){let{cornerRadiusPx:e}=ne();return typeof e=="number"?e:Co}function X2(){return Tu({sidesKey:"sectionCornerSides",useFollowed:Y2,mark:S(V2,{label:ii}),hint:Z2})}var Z2="Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here.";function ci(){return vn({_gShape:No("Shape"),sectionCorners:X2(),sectionCornerSides:kS(),sectionBorder:Jy("desktop"),sectionBorderPhone:Jy("mobile")})}var J2=()=>({width:i("Border width"),sides:{top:i("Border top"),right:i("Border right"),bottom:i("Border bottom"),left:i("Border left")},style:i("Border style"),styles:{solid:i("Solid"),dashed:i("Dashed"),dotted:i("Dotted")},color:i("Border color"),unit:"px"});function Q2(e){let o=Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""));return Object.keys(o).length?o:void 0}function eM(){let e;try{let o=eo(ne().theme);e=o.themes[o.selected]?.line}catch{e=void 0}return e||Ld.line}function oM({value:e,onChange:o,placeholder:t,presets:r,sides:a=!0,styles:n=!0,above:s={}}){let l=e&&typeof e=="object"?e:{},[c,d]=wn(()=>a?c2(l,s):!1),u=J2(),h=p=>Q2(a&&n?p:{width:p.width,color:p.color,...n?{style:p.style}:{}});return S(Ke,{label:i("Border"),icon:S(NN,{}),action:a?S(l2,{each:c,label:i("Each side"),onChange:d}):void 0,children:S(s2,{label:i("Border"),value:l,each:c,onChange:p=>o(h(p)),placeholder:t,presets:r,words:u,styles:n,max:20})})}function tM({value:e,onChange:o,tier:t}){let[r]=Sr("sectionBorder"),a=eM(),n=t==="mobile"?r&&typeof r=="object"?r:{}:{};return S(oM,{value:e,onChange:o,placeholder:{sides:i2(n),style:n.style??"solid",color:n.color||a},presets:[a],above:n})}function Jy(e){return je(e,{type:"custom",render:({value:o,onChange:t})=>S(tM,{value:o,onChange:t,tier:e})})}function pne(e){return{type:"custom",render:()=>S(rM,{partKey:e})}}function rM({partKey:e}){let[o]=Sr("id"),[t]=Sr("_partStyles"),{textStyles:r}=ne(),a=P2(),n=null;try{n=k2().select}catch{n=null}let s=t&&typeof t=="object"?t[e]:void 0,l=Array.isArray(r)?r:null;return S(r2,{name:i("Text"),preview:ry(s,l,{noStyle:i("No style"),styleName:a.textStyles.styleName,cases:(a.copy.panel??T2.copy.panel).cases}),onOpen:()=>{n&&typeof o=="string"&&n(v2(o,e))}})}function vS(e){let{cornerRadiusPx:o}=ne(),t=typeof o=="number"?o:e,r=null;try{let{appState:n,selectedItem:s}=Cu(c=>c),l=s?.props?.id?String(s.props.id):void 0;r=l?vg(n?.data,l)?.props??null:null}catch{r=null}if(!r)return t;let a=r.sectionCorners;return of(a)?a:t}function aM({label:e,changed:o=!1,onReset:t=()=>{}}){let r=vS(Co);return S(co,{words:Q()?.panel,label:i(e),changed:o,detail:Cr(`${r}px`,i("the section")),onReset:t})}function nM(){return S(Gt,{children:i("Follows the section's Corners until you set a number here.")})}function sM(){return Tu({sidesKey:"cardCornerSides",useFollowed:()=>vS(Co),mark:S(aM,{label:ii}),hint:S(nM,{})})}function lM(){return{type:"custom",render:()=>S(UI,{})}}function mne(){return{_gShape:No("Shape"),cardCorners:sM(),cardCornerSides:kS(),cardCornersApplyAll:lM()}}function iM(e=fu,o=e[0].value){return Ht({type:"custom",render:({value:t,onChange:r})=>{let a=e.find(n=>n.value===t)??e.find(n=>n.value===o)??e[0];return S(Ke,{label:i(Gl),icon:S(aS,{}),value:i(a.label),children:S(x2,{className:"sf-gallery-layouts",label:i(Gl),value:a.value,onChange:r,options:e.map(n=>({value:n.value,label:i(n.label),picture:S("span",{className:"sf-gallery-pic",children:cM(n.weights).map((s,l)=>S("i",{style:{gridColumn:`span ${s}`}},l))})}))})})}},{type:"select",label:Gl,options:e.map(t=>({value:t.value,label:t.label}))})}function cM(e){if(!e)return[3,4];let o=e.reduce((t,r)=>t+r,0);return e.map(t=>Math.round(t/o*12))}function hne(){return Do(ky,S(jN,{}),mu,mu[0].value)}function xne(){return je("mobile",iM(Sy,Cy))}function dM(){return je("mobile",ot(uu,S(nS,{}),Wl,by,1,Wl,"",{clear:{phoneFollows:!1,hint:Wl}}))}var Qy={read:e=>e.phoneRow,write:(e,o,t)=>({phoneRow:t}),fieldKey:()=>"phoneRow",ownField:!0};function Ine(){let e=ot(uu,S(nS,{}),pu,wy,1,pu,"",{clear:{emptyLabel:"Auto"}}),o=Yy("columns",e,{...Qy,tablet:F2.tablet}),t=Yy("columns",e,Qy,{phoneRow:dM()});return{...o,phoneRow:t.phoneRow}}function gne(e,o,t,r,a,n){return{type:"custom",render:({value:s,onChange:l})=>S(Ke,{label:i(e),icon:S(wf,{noun:n}),action:S(co,{words:Q()?.panel,label:i(e),changed:!Hy(s),detail:i("the Text style in Styles"),onReset:()=>l(My),defaultAction:{onPress:()=>l(Vl),title:i("Keep this section's own built-in size"),icon:S(MN,{})}}),children:go({min:o,max:t,step:r,value:typeof s=="number"?s:a,suffix:"px",ariaLabel:e,onChange:l})})}}function bne(){return{_gCellWidth:No("Cell width"),gridSpan:Do("Positions",S(aS,{}),[{label:"Auto",value:""},...Array.from({length:il},(e,o)=>({label:o===0?"1 position":`${o+1} positions`,value:String(o+1)}))],"")}}function It(){let e=null,o=null;try{e=PN(Pu),o=Cu(t=>t).selectedItem}catch{o=null}return e??o?.props??{}}var Pu=TN(null);function fM({min:e,max:o,step:t,px:r,label:a,onChange:n,desktopKey:s,fallback:l}){let c=It()[s],d=bl(void 0,c,l);return S(Gt,{children:go({min:e,max:o,step:t,value:bl(r,c,l),readout:!1,ariaLabel:a,notch:d,onChange:n})})}function uM({label:e,desktopKey:o,fallback:t,unit:r="px",changed:a=!1,onReset:n=()=>{}}){let s=It()[o],l=bl(void 0,s,t);return S(co,{words:Q()?.panel,label:i(e),changed:a,detail:i("{value} on desktop",{value:`${l}${r}`}),onReset:n})}function di(e){return CS(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:S(uM,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:o=>S(fM,{...o,desktopKey:e.desktopKey,fallback:e.fallback})})}var pM={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},mM={Top:fS,Bottom:iS,Left:cS,Right:dS},hM=e=>{let o=mM[e];return S(o,{})};function yne(e={}){let o=e.keys?.top??"sectionPaddingTop",t=e.keys?.bottom??"sectionPaddingBottom",r=e.group!==!1,a=E=>pM[E],n=E=>ot(a("Top"),S(fS,{}),Lo.min,Lo.max,Lo.step,E,"px"),s=(E,O,C,I=Lo)=>je("mobile",di({label:a(E),icon:hM(E),desktopKey:O,min:I.min,max:I.max,step:I.step,fallback:C})),l=e.top??Lo.min,c=e.bottom??Lo.min,d="sectionPaddingLeft",u="sectionPaddingRight",h=e.sideBounds??Lo,p=e.side??h.min,x=e.sidePhone??p,g=e.phone===!0,y=E=>g?je("desktop",E):E;return vn({...r?{_gSpacing:No("Padding")}:{},[o]:y(n(l)),...g?{[xa(o)]:s("Top",o,l)}:{},...e.only==="top"?{}:{[t]:y(ot(a("Bottom"),S(iS,{}),Lo.min,Lo.max,Lo.step,c,"px")),...g?{[xa(t)]:s("Bottom",t,c)}:{}},...e.sides?{[d]:y(ot(a("Left"),S(cS,{}),h.min,h.max,h.step,p,"px")),...g?{[xa(d)]:s("Left",d,x,h)}:{},[u]:y(ot(a("Right"),S(dS,{}),h.min,h.max,h.step,p,"px")),...g?{[xa(u)]:s("Right",u,x,h)}:{}}:{}})}function Sne(e,o){let t=Object.fromEntries(Object.entries(o).map(([n,s])=>[n,n in e&&xt(s)?e[n]:s])),r={},a=!1;for(let[n,s]of Object.entries(e)){if(n in o){a||Object.assign(r,t),a=!0;continue}r[n]=s}return a||Object.assign(r,t),r}var Ql="Width";function fi(e,o=Gy,t=!0){let r=o.map(a=>({label:yr[a],value:a}));return vn({...t?{_gWidth:No(Ql)}:{},widthMode:{type:"custom",render:({onChange:a,field:n})=>S(Ke,{label:i(Ql),icon:S(t2,{}),action:t?S(M2,{inherited:n?.inherited??!1,onReset:()=>a(bu),label:Ql}):void 0,children:Xl({options:r,value:n?.currentValue||e,onChange:a,ariaLabel:Ql})})}})}function ui(){let e=r=>({type:"custom",render:({value:a,onChange:n})=>S(Ke,{label:ca,icon:kn(S(qN,{})),action:r?r(n):void 0,children:Xl({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(a)?a:"auto",onChange:n,ariaLabel:ca})})}),o=()=>({type:"custom",render:({value:r,onChange:a,field:n})=>{let s=n?.unit==="%"?"%":"px",l=s==="%"?ru:tu;return S("div",{className:"sf-field",children:go({min:l.min,max:l.max,step:l.step,value:typeof r=="number"?r:l.fallback,suffix:s,ariaLabel:ca,onChange:a})})}}),t=()=>ha("Unit",S(lS,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return vn({_gHeight:No(ca),sectionHeightMode:je("desktop",e()),sectionHeightValue:je("desktop",o()),sectionHeightUnit:je("desktop",t()),sectionHeightModePhone:je("mobile",e(r=>S(xM,{onClear:()=>r(void 0)}))),sectionHeightValuePhone:je("mobile",o()),sectionHeightUnitPhone:je("mobile",t())})}function xM({onClear:e}){let o=It(),t=nu(o),r=Dl(o),a=i("{value} on desktop",{value:r.mode==="auto"?i("Auto"):`${r.value}${r.unit}`});return S(co,{words:Q()?.panel,label:i(ca),changed:t,detail:a,onReset:e})}function Eu(){let e=t=>({type:"custom",render:({value:r,onChange:a,id:n,name:s})=>S(IM,{value:r,onChange:a,labelId:`${n??s??"stickTop"}-label`,phone:t})}),o=()=>({type:"custom",render:({value:t,onChange:r})=>S("div",{className:"sf-field",children:go({min:Nt.min,max:Nt.max,step:Nt.step,value:typeof t=="number"?t:Nt.fallback,suffix:"px",ariaLabel:i("Distance from top"),onChange:r})})});return{_gStick:No(Nl),stickTop:je("desktop",e(!1)),stickTopDistance:je("desktop",o()),stickTopPhone:je("mobile",e(!0)),stickTopDistancePhone:je("mobile",o())}}function IM({value:e,onChange:o,labelId:t,phone:r}){let a=It(),n=lu(a),s=r?n.phone:e===!0;return S(Ke,{label:i(Nl),labelId:t,icon:kn(S(ZN,{})),action:Ia(Gt,{children:[r?S(co,{words:Q()?.panel,label:i(Nl),changed:su(a),detail:i("{value} on desktop",{value:n.desktop?`${n.desktopDistance}px`:i("Off")}),onReset:()=>o(void 0)}):null,S(wu,{checked:s,onChange:o,ariaLabelledBy:t})]})})}var eS="e.g. about";function pi(){return{_gAnchor:No("Anchor"),anchor:kr({control:"plainText",label:"Name",placeholder:eS},{type:"custom",render:({value:e,onChange:o})=>S(Cg,{value:e,onChange:o,nameBox:(t,r)=>S(wr,{value:t,onChange:r,label:"Name",placeholder:eS,hideable:!1,markup:!1})})})}}function Cne(e,o,t){return{type:"custom",render:({value:r,onChange:a,id:n,name:s})=>{let l=`${n??s??e}-datetime`,c=Date.parse(typeof r=="string"?r:"");return S(Ke,{label:i(e),icon:o,htmlFor:l,hint:t===void 0?void 0:i(t),children:S(h2,{id:l,value:Number.isFinite(c)?new Date(c):null,onChange:d=>a(d?d.toISOString():"")})})}}}function TS(e,o,t,r){return{type:"custom",...Ht({},{...ri,label:e}),render:({value:a,onChange:n,id:s,name:l})=>{let c=typeof a=="boolean"?a:o,d=`${s??l??e}-label`;return S(Ke,{label:i(e),labelId:d,icon:t,hint:r===void 0?void 0:i(r),action:S(wu,{checked:c,onChange:n,ariaLabelledBy:d})})}}}function PS(){return{type:"custom",render:({value:e,onChange:o,id:t,name:r})=>{let a=`${String(t??r??"pageBackground")}-colour`;return S(wo,{label:i("Background"),icon:S(XN,{}),id:a,value:kf(e),onChange:o})}}}function wne(e,o,t){return{type:"custom",render:({value:r,onChange:a})=>S(wo,{label:i(e),icon:t,value:r||o,onChange:a})}}function kne(){return{type:"custom",render:({value:e,onChange:o})=>S(gM,{value:typeof e=="string"?e:"",onChange:o})}}function gM({value:e,onChange:o}){let{hex:t,n:r}=yM();return S(el,{label:i("Fill"),icon:S(sS,{}),value:e,inherited:t,resetTo:Cr(t.toUpperCase(),i("Theme {n} background",{n:r})),onChange:o,onReset:()=>o("")})}function bM(e,o,t){if((e?.content??[]).some(n=>n?.props?.id===o))return Fo(t);let r=Tg(e,o);if(r.length===0)return null;let a=Fo(qf(t));if(a!==null)return a;for(let n=r.length-1;n>0;n-=1){let s=Fo(qf(r[n].sectionAccent));if(s!==null)return s}return Fo(r[0].sectionAccent)}function yM(){let e=eo(ne().theme),[o]=Sr("sectionAccent"),t=null;try{let{appState:a,selectedItem:n}=Cu(l=>l),s=n?.props?.id?String(n.props.id):void 0;t=s?bM(a?.data,s,o):null}catch{t=null}let r=t!==null&&e.themes[t]?t:e.selected;return{hex:e.themes[r].background??Ld.background,n:r+1}}var SM=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function CM({label:e,value:o,onChange:t,points:r=SM}){let a=r.map(n=>({...n,label:i(n.label),...n.title?{title:i(n.title)}:null}));return S(u2,{label:i(e),value:o,points:a,onChange:t})}function vne(){return wS()}var ES={top:S(UN,{}),right:S(zN,{}),bottom:S(GN,{}),left:S(WN,{})};function OS(e,o,t,r,a,n){let s=u=>o.find(h=>h.value===u),l=u=>({value:u,label:"",disabled:!0,title:r}),c=u=>{let h=o.find(x=>x.cell===u);if(!h)return l(`missing-${u}`);let p=n?.[u];return p?{value:h.value,label:h.label,icon:p}:{value:h.value,label:h.label}},d=[l("corner-top-left"),c("top"),l("corner-top-right"),c("left"),l("centre"),c("right"),l("corner-bottom-left"),c("bottom"),l("corner-bottom-right")];return{type:"custom",render:({value:u,onChange:h})=>{let p=o.some(x=>x.value===u)?u:t;return S(Ke,{label:i(e),icon:a,value:s(p)?.label?i(s(p).label):"",children:CM({label:e,value:p,onChange:h,points:d})})}}}function Tne(e,o,t){return{type:"custom",options:o,render:({value:r,onChange:a,field:n})=>S(nb,{label:e,options:(n.options??o).map(s=>({...s,label:i(s.label)})),value:Array.isArray(r)?r:[],onChange:a,...t?{emptyLabel:i(t)}:{}})}}function Pne(e,o={}){return{type:"custom",render:({value:t,onChange:r})=>{let a={value:t,onChange:r,...o};return S(e,{...a})}}}var Ene=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function One(e,o,t){let r=Object.keys(Qd).map(a=>({label:Qd[a],value:a,picture:t[a]}));return{type:"custom",...Ht({},{type:"radio",label:e,options:r.map(a=>({value:a.value,label:a.label}))}),render:({onChange:a})=>S(wM,{label:e,icon:o,options:r,onChange:a})}}function wM({label:e,icon:o,options:t,onChange:r}){let a=ai()?.values??{},n=ef(a),s=n==="frame"&&!!At(a.mediaVideo)&&!At(a.videoFrame);return S(Ke,{label:i(e),icon:kn(o),hint:s?i("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:Xl({options:t,value:n,onChange:r,ariaLabel:e})})}function Fne(e,o,t,r={}){return{type:"custom",[_N]:!0,render:({value:a,onChange:n,name:s})=>S(rb,{value:a||"",onChange:n,fieldKey:s,label:e,accept:o,placeholder:t,focusKey:r.focus,focusWhen:r.focusWhen,frameKey:r.frame})}}function kM(e){let o=i(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${o} \xB7 ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:o}function _ne({value:e,onChange:o,label:t}){let r=e||{},a=ai(),n=a?a.values!==a.node.props:!0,s=!!r.pending&&n,l=!!r.pending&&!n,c=s?"var(--ink-faint)":r.ok&&!l?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",d=!!Ne(E2()).geocode,u=tS(),h=(p,x)=>o({...r,[p]:x??void 0});return Ia(Gt,{children:[S(Ke,{label:i(t),icon:S(Ky,{}),action:d?S(ti,{content:i("Find from the address (OpenStreetMap)"),children:S(uS,{"aria-label":i("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>o({...r,pending:!0,ok:!1,status:"Finding\u2026"}),children:S(QN,{})})}):void 0,children:d&&r.status?S(ti,{content:kM(r),className:"sf-name-tip",children:S("div",{className:`es-field-hint ${Sf}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:c},children:s?i("Finding\u2026"):l?i(Pf):i(r.status)})}):null}),S(Ke,{label:i("Enter by hand"),labelId:u,icon:S($N,{}),action:S(wu,{checked:!!r.manual,onChange:p=>o({...r,manual:p}),ariaLabelledBy:u})}),r.manual&&S(Ke,{label:i("Latitude, longitude"),icon:S(Ky,{}),children:Ia("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[S(qy,{value:typeof r.lat=="number"?r.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:i("Latitude")}),S(qy,{value:typeof r.lng=="number"?r.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:i("Longitude")})]})})]})}function vM(e,o){return o===null||o<0||o>=e.length?"":e[o]?.text??""}function TM(e,o,t){let r=e.map(a=>({text:a?.text??""}));return o===null||o<0||o>=e.length?r:r.map((a,n)=>n===o?{text:t}:a)}function PM(e,o,t){if(t===null||t>=o.length)return null;for(let r=0;r<t;r+=1)if(e[r]!==o[r])return null;return e[t]!==o[t]&&o.includes(e[t])||e[t]!==o[t]&&o.length!==e.length?null:t}var Ou={label:"Ticker items",icon:S(YN,{})};function Rne(e,o,t,r){return{type:"custom",[ht]:{control:"textList",label:e,placeholder:t,itemKey:"text",rendering:r},...Ht({},{...IS.textList,label:e}),render:({value:a,onChange:n})=>S(Fu,{label:e,icon:kn(o),items:Array.isArray(a)?a:[],placeholder:t,onChange:n,markup:r==="markup"})}}function Fu({label:e,icon:o,items:t,placeholder:r,onChange:a,markup:n=!1}){let s=oi(null),[l,c]=wn(null),d=h=>h.map(p=>({text:p?.text??""})),u=h=>{let p=PM(t,h,l);p===null&&(s.current=null),c(p),a(d(h))};return S(d2,{label:i(e),icon:o,noun:i("item"),items:t,onChange:u,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:n?S(Ff,{target:s,value:vM(t,l),onChange:h=>a(TM(t,l??-1,h)),disabled:l===null,label:l===null?i("Formatting \u2014 click a row first"):i("Formatting \u2014 row {n}",{n:l+1})}):void 0,renderRow:(h,p,x)=>S("input",{type:"text",className:n&&l===p?"sf-list-marking":void 0,value:h?.text??"",placeholder:i(r),"aria-label":i("{label} {n}",{label:i(e),n:p+1}),onChange:g=>x({text:g.target.value}),onFocus:g=>{s.current=g.currentTarget,c(p)}})})}function FS(e,o){let t=`${e.label} \u2014 row ${o+1}`;return kr({control:"plainText",label:t,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:r,onChange:a})=>S(wr,{value:r,onChange:a,label:i("{label} \u2014 row {n}",{label:i(e.label),n:o+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function _S(e){return{_gCards:No("Cards"),coverIndex:Do("Cover image",S(VN,{}),Jg,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:K2("Image background",ql),cardImage:FM(),spinOnHover:TS("Rotate on hover",e?.spinDefault??!0,S(JN,{}))}}function RS(){return{outline:Do("Card outline",S(e2,{}),Nf,Bf),indexBadge:Do("Card number",S(lS,{}),Df,Lf),showBadge:TS("Product badge",!0,S(wf,{noun:"tag"}))}}function AS(e){let o=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},t=a=>({...ri,label:ei.find(n=>n.id===a).label}),r=a=>Ht(b2(Su),t(a));return{_gShowOnCard:No("Show on a card"),[Su]:Ht({type:"custom",render:()=>S(EM,{rest:{showCardPrice:!0,showCardFinishes:!0,...o}})},t(Su)),showCardFinishes:r("showCardFinishes"),showCardSizes:r("showCardSizes"),showCardBuy:r("showCardBuy"),showCardPage:r("showCardPage")}}var Su="showCardPrice",ei=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function EM({rest:e}){let o=It(),t=Mf(),r=s=>typeof o[s]=="boolean"?o[s]:void 0,a=s=>r(s)??e[s],n=ei.some(({id:s})=>r(s)!==void 0&&r(s)!==e[s]);return S(_u,{parts:ei,changed:n,shown:a,onPress:(s,l)=>t({[s]:l}),onReset:()=>t(Object.fromEntries(ei.map(({id:s})=>[s,void 0])))})}function Ane(e,o="display"){let t=xa(o);return{[o]:je("desktop",{type:"custom",render:({value:r,onChange:a})=>S(_u,{parts:e,changed:Pg(r),shown:n=>hl(r,n),onPress:(n,s)=>a(Og(r,n,s)),onReset:()=>a(void 0)})}),[t]:je("mobile",{type:"custom",render:({value:r,onChange:a})=>S(OM,{parts:e,desktopKey:o,value:r,onChange:a})})}}function _u({parts:e,changed:o,shown:t,onPress:r,onReset:a,detail:n,disabledReason:s}){let l=i("Display");return S(Ke,{label:l,icon:S(LN,{}),changed:o,action:S(co,{words:Q()?.panel,label:l,changed:o,detail:n,onReset:a}),children:S(f2,{label:l,items:e.map(c=>({id:c.id,label:i(c.label),shown:t(c.id),...s?{disabled:!0,disabledReason:i(s)}:{}})),onChange:r})})}function OM({parts:e,desktopKey:o,value:t,onChange:r}){let a=It()[o];return S(_u,{parts:e,changed:Eg(t),shown:n=>Tf(a,t,n),onPress:(n,s)=>r(Fg(t,n,s)),onReset:()=>r(yl),detail:i("the same as Desktop")})}function FM(){return CS("Card image",{min:Co,max:tr,step:XI,hint:"Rounds the picture. The card's own corner is in Styles."})}function Lne(){return Tu({sidesKey:"cornerSides",step:ZI,useFollowed:()=>Co,mark:S(_M,{label:JI}),hint:i("Rounds the picture. Left alone it stays square.")})}function _M({label:e,changed:o=!1,onReset:t=()=>{}}){return S(co,{words:Q()?.panel,label:i(e),changed:o,onReset:t})}function Bne(){return{type:"custom",render:({value:e,onChange:o})=>S(BM,{value:typeof e=="string"?e:"",onChange:o})}}function RM({layout:e,width:o}){return S("span",{"aria-hidden":"true",style:{display:"grid",width:o,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:tg(e).map(([t,r],a)=>S("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${t}`,gridRow:`span ${r}`}},a))})}var AM={width:"3.5rem",height:"2.5rem"},LM=200;function BM({value:e,onChange:o}){let[t,r]=wn(null),[a,n]=wn(4),s=oi(null);EN(()=>{let p=s.current;if(!p||typeof ResizeObserver!="function")return;let x=()=>n(p.getBoundingClientRect().width>=LM?4:3);x();let g=new ResizeObserver(x);return g.observe(p),()=>g.disconnect()},[]);let l=e&&e in ft?e:"",c=hf(t,l),d=hf(t,"").length,u=cl("no-symbol"),h=[{value:"",label:i("Not chosen"),icon:u},...c.map(p=>({value:p,label:i(ft[p].label),icon:S(RM,{layout:ft[p],width:40})}))];return S(Ke,{label:i("Layout"),icon:S(KN,{}),value:l?i(ft[l].label):void 0,children:S("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:S(I2,{label:i("Layout"),value:l,emptyValue:"",options:h,onChange:o,columns:a,cell:AM,header:Ia("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[S("span",{className:"text-2xs text-ink-faint",children:i("Photos in a row")}),S(n2,{options:[{id:"all",label:i("All")},...eg.map(p=>({id:String(p),label:String(p)}))],value:t===null?"all":String(t),ariaLabel:i("Photos in a row"),onChange:p=>r(p==="all"?null:Number(p))}),S("span",{className:"text-2xs text-ink-faint",children:i("{n} of {total} layouts",{n:d,total:mf.length})})]})})})})}var HM="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",Ru="Corners";function LS({value:e,onChange:o,showHint:t=!0}){let r=e===null;return mi(NM,{label:i(Ru),icon:mi(MM,{}),value:r?i("Default"):`${e}px`,changed:!r,action:mi(DM,{words:Q()?.panel,label:i(Ru),changed:!r,detail:i("the built-in corners"),onReset:()=>o(null)}),hint:t?i(HM):void 0,children:mi(go,{min:Co,max:tr,step:1,value:e??Co,readout:!1,ariaLabel:i(Ru),onChange:o})})}import{jsx as Tn}from"react/jsx-runtime";import{SettingsDefaultReset as GM,SettingsField as WM}from"efficient-easel/panel";import{IconPicker as zM}from"efficient-shell/ui";import{ShadowIcon as UM}from"efficient-easel/icons";var Au={none:"None",soft:"Soft",lifted:"Lifted"},$M="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.",jM={none:"none",soft:"0 1px 1px rgba(20, 20, 22, 0.10), 0 2px 4px -1px rgba(20, 20, 22, 0.14)",lifted:"0 1px 2px rgba(20, 20, 22, 0.10), 0 4px 7px -2px rgba(20, 20, 22, 0.30)"};function BS({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??Md;return Tn(WM,{label:i("Card shadow"),icon:Tn(UM,{}),value:i(Au[a]),changed:!r,action:Tn(GM,{words:Q()?.panel,label:i("Card shadow"),changed:!r,detail:i(Au[Md]),onReset:()=>o(null)}),hint:t?i($M):void 0,children:Tn(zM,{label:i("Card shadow"),value:a,options:Zx.map(n=>({value:n,label:i(Au[n]),icon:Tn("span",{className:"sf-shadow-chip border border-line bg-surface",style:{boxShadow:jM[n]}})})),onChange:o})})}import{jsx as DS}from"react/jsx-runtime";import{ShadowIcon as KM}from"efficient-easel/icons";var qM="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 NS({value:e,onChange:o,showHint:t=!0}){let r=e===null;return DS(el,{label:i("Shadow color"),icon:DS(KM,{}),value:e??"",inherited:Gd,resetTo:Gd,onChange:o,onReset:()=>o(null),hint:t?i(qM):void 0})}import{jsx as xi}from"react/jsx-runtime";import{SettingsDefaultReset as VM,SettingsField as YM}from"efficient-easel/panel";import{AlignSeparateIcon as XM}from"efficient-easel/icons";function hi(e,o){return e==="tablet"?null:e==="mobile"?o.phone:o.desktop}var ZM="The space between the blocks inside a row, a grid or a box. Default means each one keeps the spacing it already has.",JM="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.",Lu="Block gap",MS=pa.Grid;function HS(e,o){return hi(e,{desktop:{key:"block_gap",value:o.gap,followsPx:null},phone:{key:"block_gap_phone",value:o.phone,followsPx:o.gap===null?null:hu(o.gap)}})}function GS({value:e,onChange:o,showHint:t=!0,followsPx:r=null}){let a=e===null,n=r===null?null:`${r}px`;return xi(YM,{label:i(Lu),labelId:"sf-block-gap",icon:xi(XM,{}),value:a?n??i("Default"):`${e}px`,changed:!a,action:xi(VM,{words:Q()?.panel,label:i(Lu),changed:!a,detail:n??i("each block's own spacing"),onReset:()=>o(null)}),hint:t?i(n===null?ZM:JM):void 0,children:xi(go,{min:gr.min,max:gr.max,step:gr.step,value:e??(r===null?MS:yn(r)??MS),readout:!1,ariaLabel:i(Lu),onChange:o})})}import{jsx as Ii}from"react/jsx-runtime";import{SettingsDefaultReset as QM,SettingsField as eH,SettingsSegmented as oH}from"efficient-easel/panel";import{HoverIcon as tH}from"efficient-easel/icons";var Pn={none:"None",lift:"Lift",highlight:"Highlight"},rH="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 WS({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??Hd;return Ii(eH,{label:i("Hover effect"),icon:Ii(tH,{}),value:i(Pn[a]),changed:!r,action:Ii(QM,{words:Q()?.panel,label:i("Hover effect"),changed:!r,detail:i(Pn[Hd]),onReset:()=>o(null)}),hint:t?i(rH):void 0,children:Ii(oH,{options:Zs.map(n=>({id:n,label:i(Pn[n])})),value:a,ariaLabel:i("Hover effect"),onChange:o})})}import{jsx as gi}from"react/jsx-runtime";import{SettingsDefaultReset as aH,SettingsField as nH,SettingsSegmented as sH}from"efficient-easel/panel";import{DropIcon as lH}from"efficient-easel/icons";var Bu="Photography",zS={shot:"As shot",mono:"Black and white"},Du=[{grayscale:!1,label:zS.shot},{grayscale:!0,label:zS.mono}],iH="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function US({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??!1;return gi(nH,{label:i(Bu),icon:gi(lH,{}),value:i(Du.find(n=>n.grayscale===a).label),changed:!r,action:gi(aH,{words:Q()?.panel,label:i(Bu),changed:!r,detail:i(Du.find(n=>!n.grayscale).label),onReset:()=>o(null)}),hint:t?i(iH):void 0,children:gi(sH,{options:Du.map(n=>({id:n.grayscale,label:i(n.label)})),value:a,ariaLabel:i(Bu),onChange:o})})}import{jsx as Nu}from"react/jsx-runtime";import{useId as cH}from"react";import{SettingsField as dH,SettingsSwitch as fH}from"efficient-easel/panel";import{ShareIcon as uH}from"efficient-easel/icons";var pH="Share button",mH="On every blog post.";function $S({value:e,onChange:o,showHint:t=!0}){let r=cH();return Nu(dH,{label:i(pH),labelId:r,icon:Nu(uH,{}),action:Nu(fH,{checked:e===!0,onChange:o,ariaLabelledBy:r}),hint:t?i(mH):void 0})}import{usePreviewDevice as Sp}from"efficient-easel/draw/client";import{jsx as Ci}from"react/jsx-runtime";import{SettingsDefaultReset as PH,SettingsField as EH}from"efficient-easel/panel";import{PaddingXIcon as OH}from"efficient-easel/icons";var ro={min:1e3,max:2e3,step:50,default:1600};function hH(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var jS="--sf-site-width",Mu=`var(${jS},${ro.default}px)`,Ose=`max-w-[${Mu}]`,Fse=`max-w-[${ro.default}px]`;function xH(e){return typeof e!="number"||!Number.isFinite(e)?ro.default:Math.round(Math.min(Math.max(e,ro.min),ro.max))}function _se(e){let o=xH(e);return o===ro.default?{}:{[jS]:`${o}px`}}var gt={min:0,max:80,step:4,default:40},KS="--sf-site-gutter",En={min:0,max:24,step:4},IH="--sf-site-gutter-phone",gH="max-[720px]:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",Mo=`var(${KS},${gt.default}px)`,bH=`px-[${Mo}]`;var zt={md:`min(24px,${Mo})`,sm:`min(20px,${Mo})`,frame:`min(24px,${Mo})`,tabs:`min(16px,${Mo})`},Rse=[[`max-[1100px]:px-[${zt.md}]`,"max-[1100px]:px-6"],[`max-[1100px]:px-[${zt.tabs}]`,"max-[1100px]:px-4"],[`max-[960px]:px-[${zt.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${zt.md}]`,"max-[900px]:px-6"],[`max-[800px]:px-[${zt.md}]`,"max-[800px]:px-6"],[`max-[720px]:px-[${zt.sm}]`,"max-[720px]:px-5"],[`max-[800px]:px-[${zt.sm}]`,"max-[800px]:px-5"],[`max-[640px]:px-[${zt.sm}]`,"max-[640px]:px-5"],[`min-[800px]:px-[${Mo}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${Mo})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${Mo})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${Mo})]`,"max-[720px]:-mx-5"],[`-mx-[${Mo}]`,"-mx-10"],[bH,"px-10"]];var Ase="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",Lse="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]";function bi(e){return typeof e!="number"||!Number.isFinite(e)?gt.default:Math.round(Math.min(Math.max(e,gt.min),gt.max))}function Bse(e){let o=bi(e);return o===gt.default?{}:{[KS]:`${o}px`}}function yi(e){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,En.min),En.max))}function Dse(e){let o=yi(e);return o===null?{}:{[IH]:`${o}px`}}function Nse(e){return yi(e)===null?"":gH}function Si(e){return Math.min(En.max,bi(e))}var qS=Mu,Mse=`max-w-[${qS}]`,Hse=`max-w-[min(var(--sf-page-cap,${ro.default}px),${ro.default}px)]`,VS="--sf-hero-cap",yH=`var(${VS},none)`,Gse=`max-w-[${yH}]`,SH="--sf-hero-bleed-m",CH="--sf-hero-bleed-w",wH="--sf-hero-chrome-x",kH="--sf-hero-chrome-cap";function Wse(e){return e===!0?{[VS]:qS,[SH]:"auto",[CH]:"100%",[wH]:"24px",[kH]:"none"}:{}}var Hu=`calc(${Mu} - ${Mo}*2)`,zse=`max-w-[${Hu.replace(/ /g,"_")}]`;var vH="--sf-chrome-cap",TH=`var(${vH},${Hu})`,Use="data-page-width";function $se(e){return e==="full"?"full":null}function jse(e){return e==="full"?null:hH(e==="content"?Hu:TH)}function Kse(e){if(e==="full")return"full";if(e==="content")return"content"}var Gu="Side space",YS=gt.default,FH="The room left at the left and right edge of every page.";function XS(e,o){return hi(e,{desktop:{key:"site_gutter",value:o.gutter,unsetPx:YS,bounds:gt},phone:{key:"site_gutter_phone",value:o.phone,unsetPx:Si(o.gutter),bounds:En}})}function ZS({value:e,onChange:o,showHint:t=!0,unsetPx:r=YS,bounds:a=gt}){let n=e===null;return Ci(EH,{label:i(Gu),labelId:"sf-side-space",icon:Ci(OH,{}),value:`${e??r}px`,changed:!n,action:Ci(PH,{words:Q()?.panel,label:i(Gu),changed:!n,detail:`${r}px`,onReset:()=>o(null)}),hint:t?i(FH):void 0,children:Ci(go,{min:a.min,max:a.max,step:a.step,value:e??r,readout:!1,ariaLabel:i(Gu),onChange:o})})}import{jsx as Wu}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as ale,SettingsBackgroundWidth as _H,SettingsContentWidth as RH}from"efficient-easel/panel";var AH="Background width",LH="Content width";var wi=e=>i(yr[e==="content"?"page":"full"]),JS="The width of every section's background.",QS="The width of every section's content.";function eC({value:e,changed:o,detail:t,onChange:r,onReset:a,hint:n,labelId:s}){return Wu(_H,{value:e,changed:o,detail:t,onChange:r,onReset:a,hint:n?i(n):void 0,labelId:s,words:{label:i(AH),full:wi("full"),content:wi("content")},resetWords:Q()?.panel})}function oC({mode:e,px:o,max:t=ro.max,min:r=ro.min,changed:a,detail:n,onMode:s,onPx:l,onReset:c,hint:d,labelId:u}){let h=i(LH),p=e!=="full"?Wu(go,{min:r,max:t,step:ro.step,value:Math.min(Math.max(o,r),t),onChange:l,suffix:"px",ariaLabel:h}):null;return Wu(RH,{mode:e,onMode:s,number:p,changed:a,detail:n,onReset:c,hint:d?i(d):void 0,labelId:u,words:{label:h,full:wi("full"),content:wi("content")},resetWords:Q()?.panel})}import{jsx as XC}from"react/jsx-runtime";import{TextStyleItem as o4,TextStylesGroup as t4}from"efficient-easel/text-styles";import{jsx as V5}from"react/jsx-runtime";import{useState as Y5}from"react";import{TextStylesList as X5}from"efficient-easel/text-styles";import{usePreviewDevice as Z5}from"efficient-easel/draw/client";import{defaultTextStyles as DC,textStyleCaseCss as N5,textStyleViewKey as M5}from"efficient-easel/text-styles/model";import{phoneKey as H5,resolveViewValue as NC,tabletKey as G5}from"efficient-easel/draw";import{parseHexColor as W5}from"efficient-shell/format";import{textStyleCaseCss as jH,textStyleCaseOfCss as KH}from"efficient-easel/draw";import{parseHexColor as qH}from"efficient-shell/format";function zu(e,o){return o?`${e}[${o.index}].${o.rowKey}`:e}function Ho(e){let o=/^([A-Za-z0-9_$]+)\[(\d+)\]\.([A-Za-z0-9_$]+)$/u.exec(e);return o?{key:o[1],row:{index:Number(o[2]),rowKey:o[3]}}:{key:e,row:null}}import{decodePartId as Ku,encodePartId as Ei}from"efficient-easel/draw";import{LINK_FIELD_MARKER as fC,SCAFFOLD_FIELD_MARKER as cC,TEXT_FIELD_MARKER as Oi}from"efficient-easel/draw";import{readHidable as uC}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as WH}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as GH}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as tC}from"efficient-easel/draw";import{readHidable as rC}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as BH}from"efficient-easel/draw";var DH=BH,NH=["text","textarea"],MH=["textarea","plainTextarea"];function HH(e){return!e||typeof e!="object"?null:e[tC]?.control??null}function ga(e){let o=HH(e);return o&&DH.includes(o)?o:null}function ki(e){return MH.includes(e)}function aC(e){return!e||typeof e!="object"?void 0:e[tC]?.placeholder}function vi(e){return rC(e).text}function Uu(e,o,t){return NH.includes(e)?{text:t,hidden:rC(o).hidden}:t}function nC(e,o,t,r){return vi(e[o])===r?null:{...e,[o]:Uu(t,e[o],r)}}function Ti(e){if(!(!e||typeof e!="object"))return e[GH]}function $u(e){if(!e||typeof e!="object")return null;let o=e.arrayFields;return o&&typeof o=="object"?o:null}function sC(e,o){if(!Array.isArray(o))return[];let t=Ti(e),r=[];if(t?.control==="textList"){let n=t.itemKey??"text";return o.forEach((s,l)=>{let c=we(s?.[n]);c&&r.push({row:{index:l,rowKey:n},text:c})}),r}let a=$u(e);return a?(o.forEach((n,s)=>{for(let[l,c]of Object.entries(a)){if(!ga(c))continue;let d=vi(n?.[l])||Ti(c)?.placeholder||"";d&&r.push({row:{index:s,rowKey:l},text:d})}}),r):[]}function On(e,o){if(Array.isArray(e))return e[o.index]?.[o.rowKey]}function ju(e,o,t,r){let a=e[o];return!Array.isArray(a)||t.index<0||t.index>=a.length?null:{...e,[o]:a.map((n,s)=>s===t.index?{...n,[t.rowKey]:r}:n)}}function lC(e,o,t,r,a){let n=On(e[o],t);return vi(n)===a?null:ju(e,o,t,Uu(r,n,a))}function iC(e,o){return o?`${e} \xB7 row ${o.index+1}`:e}var Go="data-sf-part",Ole="data-sf-region-part",Fle="data-sf-part-row";function _le(e,o){return`${e}[${o}]`}var Rle="data-sf-part-kind",zH="data-sf-part-style-owner",UH="data-sf-part-style-kind";function Ale(e){for(let o=e;o;o=o.parentElement){let t=o.getAttribute(zH),r=o.getAttribute(UH);if(t&&r)return{owner:t,kind:r};if(o.getAttribute("data-easel-block"))return null}return null}var dC=2;function ba(e){return pr(e).replace(/\s+/gu,"")}function Pi(e,o,t){let r=e[Oi];if(r){if(r.control==="textList"){let n=r.itemKey??"text";if(!Array.isArray(o))return;for(let s of o){let l=s?.[n];typeof l=="string"&&t.push(l)}return}let{text:a}=uC(o);a?t.push(a):r.placeholder&&t.push(r.placeholder);return}if(!e[fC]){if(e.type==="text"||e.type==="textarea"){let a=we(o);a&&t.push(a);return}if(e.arrayFields&&Array.isArray(o)){for(let a of o)for(let[n,s]of Object.entries(e.arrayFields))Pi(s,a?.[n],t);return}if(e.objectFields&&o&&typeof o=="object")for(let[a,n]of Object.entries(e.objectFields))Pi(n,o[a],t)}}function pC(e){if(!e||typeof e!="object")return!1;let o=e;return o[fC]?!1:!!o[Oi]||o.type==="text"||o.type==="textarea"}function Fi(e,o){let t=e[Oi];return t?.label?t.label:typeof e.label=="string"?e.label:o}function qu(e){let o=e.indexOf(" (");return(o>0?e.slice(0,o):e).trim()}function Lle(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){if(!a||typeof a!="object"||mn(r))continue;let n=a,s=[];Pi(n,o?.[r],s),!s.length&&n[cC]!==void 0&&Pi(n,n[cC],s);let l=Fi(n,r),c=new Set;for(let{row:h,text:p}of sC(n,o?.[r])){let x=ba(p);x.length<dC||(c.add(x),t.push({key:r,label:l,texts:[x],row:h}))}let d=new Set(c),u=[];for(let h of s){let p=ba(h);p.length<dC||d.has(p)||(d.add(p),u.push(p))}u.length&&t.push({key:r,label:l,texts:u})}return t}function Vu(e){return!e.offPage&&!e.hidden}var $H=WH;function mC(e,o){if(!o||typeof o!="object"||mn(e)||qg(o))return null;let t=o[Oi];return!t||!$H.includes(t.control)?null:t}function Ble(e,o){let t=mC(e,o);return t!==null&&t.identifier!==!0}function hC(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){let n=mC(r,a);if(!n)continue;let{text:s,hidden:l}=uC(o?.[r]);if(Vu({offPage:n.offPage===!0,hidden:!!l}))continue;let c=s||n.placeholder||"",d=pr(c).replace(/\s+/gu," ").trim();t.push({key:r,label:qu(Fi(a,r)),preview:d,offPage:n.offPage===!0,identifier:n.identifier===!0,hidden:!!l})}return t}function ya(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Sa(e,o){return ya(e?.[o])??{}}function _i(e,o,t){let r=Sa(e,o);return Object.hasOwn(r,t)?ya(r[t])??{}:{}}function Ri(e,o,t,r){let{[t]:a,...n}=Sa(e,o),s=r?{...n,[t]:r}:n,{[o]:l,...c}=e;return Object.keys(s).length?{...c,[o]:s}:c}var Zu="_partStyles",Ju="data-sf-part-styled",Ca="data-sf-text-style",VH=/^(heading|body)-[1-7]$/;function _n(e){return typeof e=="string"&&VH.test(e)}var Bi={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function YH(e){if(!e)return null;for(let[o,t]of Object.entries(Bi))if(t===e)return o;return null}function kC(e){if(_n(e.textStyle))return e.textStyle;let o=dt(e.role);return o?Bi[o]:void 0}var XH=[400,500,600,700],Ai=["left","center","right","justify"],xC=5,IC=1e3,ZH=-5,JH=10,Qu=0,ep=64,op=2,gC={size:{min:xC,max:IC,step:1},sizePhone:{min:xC,max:IC,step:1},padding:{min:Qu,max:ep,step:op}},QH=.05,e5=.01,o5=["line","letter"],t5=.5,r5=2.5,a5=-1,n5=1,s5=0,l5=400,i5=[...new Set(Object.values(rn))];function vC(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 Kle(e){return Sa(e,Zu)}function Di(e,o){return _i(e,Zu,o)}function TC(e,o,t){return Ri(e,Zu,o,c5(t).length?t:null)}function c5(e){return Object.entries(e).filter(([,o])=>o!==void 0)}function d5(e){return o5.includes(e)}var Fn=(e,o,t)=>Math.min(t,Math.max(o,e));function f5(e,o){if(d5(e)){let t=Math.round(Number(o));return!Number.isFinite(t)||t===0?null:Fn(t,ZH,JH)}if(e==="lineHeight"){let t=Number(o);return Number.isFinite(t)?wa(Fn(t,t5,r5),3):null}if(e==="letterSpacing"){let t=Number(o);return Number.isFinite(t)?wa(Fn(t,a5,n5),4):null}if(e==="paragraphSpacing"){let t=Math.round(Number(o));return!Number.isFinite(t)||t<=0?null:Fn(t,s5,l5)}if(Object.hasOwn(gC,e)){let{min:t,max:r}=gC[e],a=Math.round(Number(o));return Number.isFinite(a)?Fn(a,t,r):null}return e==="italic"?typeof o=="boolean"?o:null:e==="role"||e==="fontRole"?dt(o)?o:null:e==="sizeToken"?rp(o)?o:null:e==="textStyle"?_n(o)?o:null:e==="alignPhone"?Ai.includes(o)?o:null:o}var u5=["weight","size","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function tp(e){let o=null,t=r=>{o??={...e},delete o[r]};for(let r of u5){let a=e[r];a!==void 0&&!(typeof a=="number"&&Number.isFinite(a))&&t(r)}return e.align!==void 0&&!Ai.includes(e.align)&&t("align"),e.alignPhone!==void 0&&!Ai.includes(e.alignPhone)&&t("alignPhone"),e.textStyle!==void 0&&!_n(e.textStyle)&&t("textStyle"),e.sizeToken!==void 0&&!rp(e.sizeToken)&&t("sizeToken"),e.fontRole!==void 0&&!dt(e.fontRole)&&t("fontRole"),o??e}function rp(e){if(!e||typeof e!="object")return!1;let{step:o,px:t,stepPhone:r,pxPhone:a,fluid:n}=e,s=c=>typeof c=="number"&&Number.isFinite(c)&&c>0,l=c=>typeof c=="string"&&i5.includes(c);return l(o)&&s(t)&&(r===void 0||l(r))&&(a===void 0||s(a))&&(n===void 0||p5(n,t))}function p5(e,o){if(!e||typeof e!="object"||Array.isArray(e))return!1;let{minPx:t,vw:r,...a}=e;return Object.keys(a).length===0&&typeof t=="number"&&Number.isFinite(t)&&t>0&&t<o&&typeof r=="number"&&Number.isFinite(r)&&r>0&&r<=100}function PC(e){return e?.pxPhone&&rp(e)?{step:e.stepPhone??e.step,px:e.pxPhone}:null}function EC({step:e,px:o,fluid:t}){let r=t?`clamp(${t.minPx}px, ${t.vw}vw, ${o}px)`:`${o}px`,a=`var(--size-${e}, ${r})`;return e.startsWith("heading")?`min(${a}, var(--sf-heading-max,9999px))`:a}var m5=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function h5(e){let o=[];for(let[t,r]of m5)t===e?o.push(r):r===e&&o.push(t);return o}function ka(e,o,t,r){let a={...Di(e,o)},n=r==null?null:f5(t,r);if(n===null)delete a[t];else{a[t]=n;for(let s of h5(t))delete a[s]}return TC(e,o,a)}function OC(e,o){return TC(e,o,{})}function x5(e){return KH(e)??"none"}function I5(e){return jH(e)??""}var bC={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 g5(e,o){return dt(e.role)||(o?.blockDrawsStyle?null:YH(e.textStyle))}function FC(e,o){return e==="Text"&&o==="text"}var b5={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 y5(e){let o=rn[e],t=b5[o];return t?`var(--size-${o}, ${t})`:`var(--size-${o})`}function Rn(e){let o={};return typeof e.lineHeight=="number"?o.lineHeight=e.lineHeight:e.line&&(o.lineHeight=wa(S5+e.line*QH,3)),typeof e.letterSpacing=="number"?o.letterSpacingEm=e.letterSpacing:e.letter&&(o.letterSpacingEm=wa(e.letter*e5,4)),o}var S5=1,vr="--sf-part-para";function C5(e){e=tp(e);let o={};if(typeof e.sizePhone=="number"&&e.sizePhone>0)o.fontSize=`${e.sizePhone}px`;else{let t=PC(e.sizeToken);t&&(o.fontSize=EC(t))}return e.alignPhone&&(o.textAlign=e.alignPhone),o}function w5(e,o){if(!o)return e;let t=tp(e),r=e;if(typeof t.sizePhone=="number"&&t.sizePhone>0)r={...r,size:t.sizePhone};else{let a=PC(t.sizeToken);a&&(r={...r,size:void 0,sizeToken:a})}return t.alignPhone&&(r={...r,align:t.alignPhone}),r}function ap(e,o,t){e=tp(e);let r=g5(e,t),a=Rn(e),n=e.size?`${e.size}px`:e.sizeToken?EC(e.sizeToken):r?y5(r):"";return{fontFamily:e.font?P5(e.font):e.fontRole?`var(${bC[e.fontRole]})`:r?`var(${bC[r]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:n,minWidth:n?"0":"",overflowWrap:n?"break-word":"",lineHeight:a.lineHeight!==void 0?String(a.lineHeight):"",letterSpacing:a.letterSpacingEm!==void 0?`${a.letterSpacingEm}em`:"",[vr]:e.paragraphSpacing?`${e.paragraphSpacing}px`:"",textTransform:I5(e.case),textAlign:e.align??"",paddingTop:yC(e.padding),paddingBottom:yC(e.padding),color:k5(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var k5=e=>e===void 0||e===""?"":Object.hasOwn(ut,e)?ut[e]:qH(e)===e.toLowerCase()?e:"",yC=e=>e===void 0?"":`${e}px`,wa=(e,o)=>Number(e.toFixed(o));function qle(e,o){let t=Number.parseFloat(e.fontSize)||16,r=Number.parseFloat(e.lineHeight),a=Number.parseFloat(e.letterSpacing),n=Number.parseFloat(e.paddingTop);return{fontKey:o,sizePx:t,weight:v5(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(r)?wa(r/t,3):1.2,letterEm:Number.isFinite(a)?wa(a/t,4):0,align:T5(e.textAlign),case:x5(e.textTransform),paddingPx:Number.isFinite(n)?Math.round(n):0}}function v5(e){return Number.isFinite(e)?XH.reduce((o,t)=>Math.abs(t-e)<Math.abs(o-e)?t:o):400}function T5(e){for(let o of Ai)if(o===e)return o;return e==="end"?"right":"left"}function Vle(e,o){let t=SC(e);if(!t)return"";for(let r of Eo)if(SC(o(r.cssVar))===t)return r.key;return""}var SC=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function P5(e){let o=Qr(e);return o?`var(${o.cssVar})`:""}function Yle(e,o,t,r){return!o||Ku(o)?.nodeId!==e?null:t.find(a=>r(a.getAttribute("class")))??t[0]??null}function Xle(e,o,t=()=>Li,r=l=>l,a=F5,n=!1,s=()=>!1){let l=0;for(let{element:c,partId:d}of e){let u=Ku(d)?.propKey;if(!u)continue;let h=r(u),p=Object.hasOwn(o,h)?ya(o[h])??{}:{},x=ap(w5(p,n),Li,{blockDrawsStyle:s(u)});_n(p.textStyle)?c.setAttribute?.(Ca,p.textStyle):c.removeAttribute?.(Ca);let g=Yu.some(E=>c.style[E]),y=!1;for(let[E,O]of Object.entries(x))_5(c,E,O),O&&(y=!0);if(g||Yu.some(E=>x[E]))for(let E of E5(c,a))for(let O of Yu)E.style[O]=x[O]??"";y&&(l+=1)}return l}function E5(e,o){let t=ba(e.textContent??""),r=[],a=e;for(let n=0;n<O5&&o(a);n+=1){let s=a.parentElement;if(!s||ba(s.textContent??"")!==t)break;r.push(s),a=s}return r}var O5=8;function F5(e){let o=e;return typeof window>"u"||!o?.ownerDocument?!1:window.getComputedStyle(o).display==="inline"}var Li={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function _5(e,o,t){if(!o.startsWith("--")){e.style[o]=t;return}let r=e.style;typeof r.setProperty=="function"?t?r.setProperty(o,t):r.removeProperty?.(o):r[o]=t;let a=e;o===vr&&(t?a.setAttribute?.(CC,""):a.removeAttribute?.(CC))}var CC="data-sf-part-para",R5=Object.keys(ap({},Li)),Xu=new Set(["color","overflowWrap",vr,"fontStyle"]),Yu=R5.filter(e=>!Xu.has(e));function _C(e,o,t,r=l=>l,a=()=>!1,n=()=>null,s=[]){let l=new Map;for(let u of e){let h=zu(u.key,u.row);for(let p of u.texts){let x=l.get(p);x?(x.keys.add(u.key),x.partKeys.add(h)):l.set(p,{keys:new Set([u.key]),partKeys:new Set([h])})}}let c=new Map;for(let u of new Set([...Object.keys(o),...s])){if(!A5(u))continue;let h=wC(t,u,ya(o[u])??{},!1,n(u));h&&c.set(u,h)}let d=new Map;for(let[u,{keys:h,partKeys:p}]of l){let x=p.size===1?[...p][0]:h.size===1?[...h][0]:null;if(!x)continue;let g=r(x),y=n(g);if(!Object.hasOwn(o,g)&&!y)continue;let E=ya(o[g])??{},O=wC(t,x,E,a(x),y);O&&d.set(u,O)}return d.size||c.size?{rules:d,kindRules:c,drawn:new Set(l.keys())}:null}function wC(e,o,t,r,a){let n=ap(t,Li,{blockDrawsStyle:r}),s=C5(t),l=_n(t.textStyle)?t.textStyle:void 0;return!Object.values(n).some(Boolean)&&!Object.keys(s).length&&!l&&!a?null:{stamp:L5(e,o),declarations:n,...Object.keys(s).length?{phone:s}:{},...l?{textStyle:l}:{},...a?{motion:a}:{}}}function A5(e){return e.startsWith("@")}function np(e,o){return e?.kindRules.get(o)??null}function L5(e,o){let t=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${t(e)}~${t(o)}`}function RC(e){let o=[],t=new Set,r=a=>{let{stamp:n,declarations:s}=a;if(t.has(n))return;t.add(n);let l=Object.entries(s).filter(([,x])=>x!==""),c=x=>x.map(([g,y])=>`${B5(g)}: ${y}`).join("; "),d=`[${Ju}="${n}"]`,u=l.filter(([x])=>!Xu.has(x)),h=l.filter(([x])=>Xu.has(x));u.length&&o.push(`${d}, *:has(> ${d}) { ${c(u)} }`),h.length&&o.push(`${d} { ${c(h)} }`),s[vr]&&(o.push(`*:has(> ${d}) { ${vr}: ${s[vr]} }`),o.push(...Ni(d,`*:has(> ${d})`)));let p=Object.entries(a.phone??{}).filter(([,x])=>x!=="");p.length&&o.push(`@media ${ia} { ${d}, *:has(> ${d}) { ${c(p)} } }`)};for(let a of e.rules.values())r(a);for(let a of e.kindRules.values())r(a);return o.join(`
|
|
4
|
+
`)}function Ni(e,o){let t=`var(${vr})`,r=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: ${t} }`,`${e} ${r}:not(:first-child) { margin-top: ${t} }`,`${e} ${r}:not(:last-child) { margin-bottom: ${t} }`,`:is(${o}) + :is(${o}) { margin-top: ${t} }`]}var B5=e=>e.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);function AC(e,o){if(!e)return null;let t=ba(o),r=e.rules.get(t);if(r)return r;if(t.length<D5||e.drawn.has(t))return null;let a=null;for(let[n,s]of e.rules)if(n.includes(t)){if(a&&a.stamp!==s.stamp)return null;a=s}return a}var D5=8;function LC(e){switch(e.id){case"heading-1":return"font-display";case"heading-2":return"font-heading2";case"heading-3":return"font-heading3";case"body-1":return"font-body";case"body-5":return"font-mono";default:return`font-${e.id}`}}var sp=e=>e==="sentence"?"none":void 0,MC=["font","color","size","sizeTablet","sizePhone","weight","italic","lineHeight","lineHeightTablet","lineHeightPhone","letterSpacing","letterSpacingTablet","letterSpacingPhone","paragraphSpacing","paragraphSpacingTablet","paragraphSpacingPhone","letterCase","largestSize","largestSizeTablet","largestSizePhone"],va=["desktop","tablet","phone"],An=(e,o)=>o==="desktop"?e:o==="tablet"?G5(e):H5(e),Tr=(e,o)=>o==="desktop"?e:M5(e,o);function cp(e,o,t,r=_l()){return NC("textSize",o,e.sizeTablet,e.sizePhone,r)[t]}var z5=[["lineSpacing","lineHeight","line"],["letterSpacing","letterSpacing","letter"]];function lp(e){for(let[o,t,r]of z5)for(let a of va)if(e===Tr(o,a))return{key:An(t,a),view:a,spacing:r};return{key:e,view:"desktop",spacing:null}}function tt(e){let o={};for(let t of MC)e[t]!==void 0&&(o[t]=e[t]);return o}function dp(e,o){let{auto:t,...r}=e,a=new Set(o??[]),n=MC.filter(s=>a.has(s)&&e.values[s]===void 0);return n.length?{...r,auto:n}:r}function HC(e){let o=e.fonts,t=e.sizes,r=e.typography,a=Qx(e.compression),n={"heading-1":{font:we(o.heading),size:K(t.headingLarge),weight:K(r.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:sp(r.case),largestSize:K(r.maxPx)},"heading-2":{font:we(o.heading2),size:K(t.headingMedium),weight:K(r.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:sp(r.case2)},"heading-3":{font:we(o.heading3),size:K(t.headingSmall),weight:K(r.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:sp(r.case3)},"body-1":{font:we(o.body),size:K(t.body)},"body-5":{font:we(o.label),size:K(t.label)}};return DC().map(({id:s,kind:l,name:c})=>({id:s,kind:l,name:c,values:tt(n[s]??{})}))}function fp(e){return Array.isArray(e)&&e.every(o=>o&&typeof o=="object"&&typeof o.id=="string"&&(o.kind==="heading"||o.kind==="body")&&typeof o.name=="string")?e.map(o=>dp({...o,values:tt(o.values??{})},Array.isArray(o.auto)?o.auto:void 0)):null}function cie(e){return fp(e)??[]}function GC(e){return fp(e)??DC().map(({id:o,kind:t,name:r})=>({id:o,kind:t,name:r,values:{}}))}function Ut(e,o){let t=HC(o),r=fp(e);return r?r.map(a=>{let n={...ip(t,a.id)};for(let s of a.auto??[])delete n[s];return{...a,values:tt({...n,...a.values})}}):t}var ip=(e,o)=>e.find(t=>t.id===o)?.values??{},BC=["heading-1","heading-2","heading-3"];function WC({saved:e,old:o,cur:t,next:r,sizeOf:a,panelView:n="desktop"}){let s=HC(o),l=GC(e),c=Ut(l,o),d=[],u=r.map(p=>{let x=t.find(v=>v.id===p.id),g=l.find(v=>v.id===p.id);if(!x||!g)return U5([p],a,n)[0];let y={...g.values},E=new Set(g.auto??[]),O=p.values,C=x.values,I=[...new Set([...Object.keys(O),...Object.keys(C)])].filter(v=>JSON.stringify(O[v])!==JSON.stringify(C[v])),w=v=>lp(v).spacing==="letter";I.sort((v,k)=>Number(w(v))-Number(w(k)));for(let v of I){let{key:k,view:R,spacing:B}=lp(v),P=k,_=O[v];if(_===void 0){delete y[P],ip(s,p.id)[P]!==void 0&&(d.push([p.id,P]),E.add(P));continue}if(E.delete(P),B==="line")y[P]=Ta(_/100,3);else if(B==="letter"){let N={...c.find(A=>A.id===p.id)?.values??{}};for(let A of I)O[A]===void 0&&delete N[lp(A).key];let b=tt({...N,...y}),F=cp(b,a({...p,values:b}),R);y[P]=F?Ta(_/F,4):0}else y[P]=_}return dp({id:p.id,kind:p.kind,name:p.name,values:tt(y)},E)}),h=o.compression;if(d.some(([p,x])=>(x==="lineHeight"||x==="letterSpacing")&&BC.includes(p))&&rr(h)!=="normal"){for(let p of BC){let x=u.find(y=>y.id===p);if(!x)continue;let g={...x.values};for(let y of["lineHeight","letterSpacing"])d.some(([E,O])=>E===p&&O===y)||g[y]===void 0&&!(x.auto??[]).includes(y)&&(g[y]=ip(s,p)[y]);x.values=tt(g)}h="normal"}return{saved:u,old:{...o,compression:h}}}function zC(e,o){let t={text_styles:e.saved};return e.old.compression!==o.compression&&(t.heading_compression=rr(e.old.compression)),t}var Ta=(e,o)=>Number(e.toFixed(o)),UC=(e,o)=>va.indexOf(e)<va.indexOf(o)?o:e;function $C(e,o,t="desktop"){return e.map(r=>{let a={...r.values},n=o(r);for(let s of va){let l=An("lineHeight",s),c=r.values[l],d=r.values[An("letterSpacing",s)];delete a[l],c!==void 0&&(a[Tr("lineSpacing",s)]=Ta(c*100,1));let u=UC(s,t);d!==void 0&&(a[Tr("letterSpacing",s)]=Ta(d*cp(r.values,n,u),u===s?2:4))}return{id:r.id,kind:r.kind,name:r.name,values:a}})}function U5(e,o,t="desktop"){return e.map(r=>{let a=r.values,n={...a};for(let d of va)delete n[Tr("lineSpacing",d)],delete n[Tr("letterSpacing",d)];let s={id:r.id,kind:r.kind,name:r.name,values:tt(n)},l={...s.values},c=o({...s,values:{...s.values}});for(let d of va){let u=a[Tr("lineSpacing",d)],h=a[Tr("letterSpacing",d)];if(typeof u=="number"&&(l[An("lineHeight",d)]=Ta(u/100,3)),typeof h=="number"){let p=cp(s.values,c,UC(d,t));l[An("letterSpacing",d)]=p?Ta(h/p,4):0}}return{...s,values:tt(l)}})}function die(e){let o={fonts:an({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:Nd({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:rr(e.heading_compression),typography:oI(e)},t=e.text_styles??null,r=Array.isArray(t)?up(Ut(t,o),o):o;return{fonts:an(r.fonts),sizes:Nd(r.sizes),compression:rr(r.compression),typography:r.typography,textStyles:t}}function up(e,o){let t=p=>e.find(x=>x.id===p)?.values??{},r=t("heading-1"),a=t("heading-2"),n=t("heading-3"),s=t("body-1"),l=t("body-5"),c=o.fonts,d=o.sizes,u=o.typography,h=p=>p==="none"?"sentence":"authored";return{fonts:{...c,heading:r.font??c.heading,heading2:a.font??r.font??c.heading2,heading3:n.font??r.font??c.heading3,body:s.font??c.body,label:l.font??c.label},sizes:{...d,headingLarge:r.size??null,headingMedium:a.size??null,headingSmall:n.size??null,body:s.size??null,label:l.size??null},compression:o.compression,typography:{...u,case:h(r.letterCase),weight:r.weight??null,maxPx:r.largestSize??null,weight2:a.weight??null,weight3:n.weight??null,case2:h(a.letterCase),case3:h(n.letterCase)}}}function $5(e){return e==="accent"?"var(--accent)":e==="text"?"var(--fg)":e==="labels"?"var(--fg-dim)":W5(e)===e.toLowerCase()?e:null}function fie(e){let o=[];for(let t of e){let r=t.values,a=`.${LC(t)}`,n=`[${Ca}="${t.id}"]`,s=`${a}, ${n}`,l=[],c=r.font!==void 0?Eo.find(p=>p.key===r.font)?.cssVar:void 0;if(c&&l.push(`font-family: var(${c})`),r.size!==void 0){let p=r.largestSize!==void 0?Math.min(r.size,r.largestSize):r.size;l.push(`font-size: ${p}px`)}let d=r.color!==void 0?$5(r.color):null;d&&l.push(`color: ${d}`),r.italic===!0&&l.push("font-style: italic"),r.weight!==void 0&&l.push(`font-weight: ${r.weight}`);let u=[];r.lineHeight!==void 0&&u.push(`line-height: ${r.lineHeight}`),r.letterSpacing!==void 0&&u.push(`letter-spacing: ${r.letterSpacing}em`),t.kind==="body"&&l.push(...u);let h=N5(r.letterCase);h&&t.kind==="body"&&l.push(`text-transform: ${h}`),r.paragraphSpacing&&l.push(`--sf-part-para: ${r.paragraphSpacing}px`),l.length&&o.push(`${s} { ${l.join("; ")} }`),t.kind==="heading"&&u.length&&o.push(`${s}, ${a}:is(h1, h2, h3, h4), ${n}:is(h1, h2, h3, h4) { ${u.join("; ")} }`),t.kind==="heading"&&h&&o.push(`${n}, ${a}:is(h1, h2, h3, h4) { text-transform: ${h} }`),r.paragraphSpacing&&(o.push(`*:has(> ${n}) { --sf-part-para: ${r.paragraphSpacing}px }`),o.push(...Ni(`:is(${s})`,`*:has(> ${n})`))),o.push(...j5(t,s,a,n))}return o.join(`
|
|
5
|
+
`)}function j5(e,o,t,r){let a=e.values,n=Dt("textSize",a.size,a.sizeTablet,a.sizePhone),s=Dt("textSize",a.largestSize,a.largestSizeTablet,a.largestSizePhone),l=Dt("same",a.lineHeight,a.lineHeightTablet,a.lineHeightPhone),c=Dt("same",a.letterSpacing,a.letterSpacingTablet,a.letterSpacingPhone),d=Dt("spacing",a.paragraphSpacing,a.paragraphSpacingTablet,a.paragraphSpacingPhone),u=NC("textSize",a.size,a.sizeTablet,a.sizePhone,_l()),h=K5[e.id],p=[];for(let[x,g]of[["tablet",Jb],["phone",ia]]){let y=[],E=[],O=u[x],C=s[x],I=n[x]===void 0&&C===void 0||O===void 0?void 0:C===void 0?O:Math.min(O,C);I!==void 0&&E.push(`font-size: ${I}px`);let w=[];l[x]!==void 0&&w.push(`line-height: ${l[x]}`),c[x]!==void 0&&w.push(`letter-spacing: ${c[x]}em`),e.kind==="body"&&E.push(...w),d[x]!==void 0&&E.push(`--sf-part-para: ${d[x]}px`),E.length&&y.push(`${o} { ${E.join("; ")} }`),e.kind==="heading"&&w.length&&y.push(`${o}, ${t}:is(h1, h2, h3, h4), ${r}:is(h1, h2, h3, h4) { ${w.join("; ")} }`),d[x]!==void 0&&y.push(`*:has(> ${r}) { --sf-part-para: ${d[x]}px }`),d[x]!==void 0&&!a.paragraphSpacing&&y.push(...Ni(`:is(${o})`,`*:has(> ${r})`)),I!==void 0&&h&&y.push(`.sf-themed-content { --size-${h}: ${I}px !important }`),y.length&&p.push(`@media ${g} { ${y.join(" ")} }`)}return p}var K5={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function uie(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function jC(e){return e?Bi[e]:void 0}function pp(e){let o=Rn(e);return tt({font:e.font,color:e.color,size:e.size,weight:e.weight,italic:e.italic,lineHeight:o.lineHeight,letterSpacing:o.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function KC(e){return Object.keys(pp(e)).length>0}function qC({saved:e,old:o,styleId:t,values:r}){let a=GC(e);return{saved:q5(a,t,r),old:o}}function q5(e,o,t){return e.map(r=>r.id===o?dp({...r,values:tt({...r.values,...t})},r.auto):r)}var J5={desktop:"desktop",tablet:"tablet",mobile:"phone"},VC=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],Q5=["size","lineSpacing","letterSpacing","letterCase"],e4=500,mp=Eo.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function YC({saved:e,old:o,colours:t,sizeOf:r,onChange:a,openId:n,onOpenChange:s,readOnly:l=!1,withoutSize:c=!1}){let d=Z5(),[u,h]=Y5(null),p=Ut(e,o),x=J5[d],g=$C(p,r,x);return V5(X5,{styles:g,onChange:y=>a(WC({saved:e,old:o,cur:g,next:y,sizeOf:r,panelView:x})),fonts:mp,colours:t,settings:c?VC.filter(y=>y!=="size"):VC,auto:Q5,openId:n===void 0?u:n,onOpenChange:s??h,readOnly:l,device:x,fallback:y=>{let E=p.find(C=>C.id===(y.kind==="heading"?"heading-1":"body-1")),O={};return E?.values.font&&y.id!==E.id&&(O.font=E.values.font),y.kind==="heading"&&(O.weight=e4),O}})}var ZC=["font","size","weight","emphasis"],r4=500;function a4({font:e,size:o,weight:t,italic:r}){let a={font:e};return o!==null&&(a.size=o),t!==null&&(a.weight=t),r!==null&&(a.italic=r),{id:"accent",kind:"heading",name:i("Accent"),values:a}}function n4(e,o){let t=[],r=e.values,a=o.values;return a.font!==r.font&&a.font!==void 0&&t.push({key:"font",value:a.font}),a.size!==r.size&&t.push({key:"size",value:a.size??null}),a.weight!==r.weight&&t.push({key:"weight",value:a.weight??null}),a.italic!==r.italic&&t.push({key:"italic",value:a.italic??null}),t}function JC(e){let{headingWeight:o,open:t,onOpenChange:r,onChange:a,withoutSize:n=!1}=e,s=a4(e);return XC(t4,{label:i("Accent"),children:XC(o4,{style:s,fonts:mp,settings:n?ZC.filter(l=>l!=="size"):ZC,auto:["size"],fallback:()=>({weight:o??r4}),open:t,onOpenChange:r,onChange:l=>n4(s,l).forEach(a)})})}import{Button as F4,EmptyState as _4,Tabs as R4,Tooltip as _ce,tabButtonId as A4,tabPanelId as L4}from"efficient-shell/ui";import{ContrastIcon as B4,NoteIcon as D4,SettingsIcon as N4,TypeIcon as M4}from"efficient-easel/icons";function QC(e){switch(e.status){case"saved":return null;case"failed":return{msg:i("Not saved. Try again."),tone:"error"};case"skipped":switch(e.reason){case"empty":return null;case"no-token":return{msg:i("Not saved. Reload the page."),tone:"error"};case"template":return{msg:i("Templates keep their look. Press Done."),tone:"success"}}}}import{jsx as gp}from"react/jsx-runtime";import{ListIcon as g4,PaddingTopIcon as b4}from"efficient-easel/icons";import{jsx as Mi}from"react/jsx-runtime";import{SettingsDefaultReset as s4,SettingsField as l4,SettingsSegmented as i4}from"efficient-easel/panel";import{WidthIcon as c4}from"efficient-easel/icons";function ew({value:e,resolved:o,onChange:t,label:r="Width",labelId:a,followsLabel:n,hint:s}){let l=e===void 0,c=l?o:e,d=i(r);return Mi(l4,{label:d,labelId:a,icon:Mi(c4,{}),value:l?n:void 0,changed:!l,action:Mi(s4,{words:Q()?.panel,label:d,changed:!l,onReset:()=>t(void 0)}),hint:s,children:Mi(i4,{options:[{label:i(yr.full),id:"full"},{label:i(yr.page),id:"content"}],value:c,ariaLabel:d,onChange:t})})}import{HEADER_TYPE as hp,FOOTER_TYPE as d4}from"efficient-easel/draw";var f4=new Set(["Hero","HeroSingle","IntroBleed"]),ow={min:56,max:140,default:88},Bie={min:0,max:120,step:2,default:32},Die=`var(--sf-header-h, ${ow.default}px)`,u4="--sf-header-set-h",Nie="--sf-header-h",Mie=`var(${u4}, ${ow.default}px)`,Hie="sf-header-clearance",Gie="sf-sticky-underheader";function p4(e){return e?.find(o=>o?.type&&o.type!==hp)??null}function tw(e){let o=p4(e)?.type;return!o||!f4.has(o)}function Wie(e){return!tw(e)}function zie(e){return!!e?.some(o=>o?.type===hp)}function Uie(e){return!e||e.length===0?!1:!e.some(o=>o?.type===hp||o?.type===d4)}var m4=["auto","shared","own"],xp="auto",h4="topSpace",$ie="data-top-space";function x4(e){return m4.includes(e)?e:xp}function I4(e,o){let t=x4(e?.props?.[h4]);return t==="own"?!0:t==="shared"?!1:tw(o)}function jie(e,o){return I4(e,o)?"own":null}function y4(){return{type:"custom",render:({value:e,onChange:o})=>gp(ew,{value:e==="full"?"full":e==="content"?"content":void 0,resolved:"content",label:"Page width",followsLabel:i("Follows the site"),hint:i("Whether this page sits on the site's content column, or runs edge to edge."),onChange:t=>o(t)})}}var S4=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],tce={pageBackground:PS(),topSpace:Do("Top space",gp(b4,{}),S4,xp),widthChoice:y4()},Ln=["pageBackground","topSpace","widthChoice"],C4="Record type",Ip=new Map,rw=-1;function w4(e){rw!==nf()&&(Ip.clear(),rw=nf());let o=af(),t=o.some(a=>a.key===e)?"":e,r=Ip.get(t);return r||(r=Do(C4,gp(g4,{}),[...o.map(a=>({label:a.label,value:a.key})),...t?[{label:t,value:t}]:[]],lr),Ip.set(t,r)),r}var aw=new WeakMap;function rce(e,o){if(!ll()||af().length<2||nl in e)return e;let t=w4(sf(o)),r=aw.get(e);if(r&&r.row===t)return r.fields;let a={[nl]:t,...e};return aw.set(e,{row:t,fields:a}),a}import{previewFrame as H4}from"efficient-easel/screen/lib/document/preview-dom";import{useEasel as k4}from"efficient-easel/easel";function Hi({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=k4(R=>R),{fonts:a,setFonts:n,sizes:s,setSizes:l,headingCompression:c,setHeadingCompression:d,headingTypography:u,setHeadingTypography:h,textStyles:p,setTextStyles:x}=ne(),g=t.data,y=g.root?.props??{},E=e?an(y.fonts):a,O=e?Vx:s,C=e?rr(y.headingCompression):c,I=e?eI(y.headingTypography):u,w={fonts:E,sizes:O,compression:C,typography:I},v=e?y.textStyles:p,k=R=>r({type:"replaceRoot",root:{...g.root,props:{...y,...R}},recordHistory:!0});return{fonts:E,sizes:O,compression:C,typography:I,old:w,saved:v,write:(R,B)=>{let P=up(Ut(R.saved,R.old),R.old);e?k({textStyles:R.saved,fonts:P.fonts,headingCompression:P.compression,headingTypography:P.typography}):(x(R.saved),n(P.fonts),l(P.sizes),d(P.compression),h(P.typography)),o(zC(R,w),B)},writeRoot:k}}var yp="sf-site-styles",G4="sf-site-styles-tabpanel",Cp=!1,W4="Show hints";function wp({shown:e,onChange:o}){return oe("div",{className:"sf-hints",children:oe(F4,{type:"button",variant:"ghost","aria-pressed":e,leftIcon:oe(D4,{size:13}),onClick:()=>o(!e),children:i(W4)})})}var lw="text",Ea="basics",nw="this-page-group",Pa=[{id:Ea,label:"Basics",icon:oe(N4,{})},{id:"theme",label:"Theme",icon:oe(B4,{})},{id:"text",label:"Text",icon:oe(M4,{})}];function z4({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=sw(d=>d),{theme:a,setTheme:n}=ne(),s=t.data,l=s.root?.props??{},c=d=>{if(e){let u={...l,theme:d};r({type:"replaceRoot",root:{...s.root,props:u},recordHistory:!0})}else n(d);o({selected_preset:d.selected,theme_presets:d.themes})};return oe(LI,{value:e?l.theme:a,onChange:c})}function U4({themeFromDocument:e,persist:o}){let[t,r]=Gi(null),{theme:a,setFonts:n,setSizes:s,setHeadingTypography:l}=ne(),c=Hi({themeFromDocument:e,persist:o}),{old:d,saved:u,writeRoot:h}=c,p=c.fonts,x=c.sizes,g=c.typography,y=k=>k.values.size??V4(j4[k.id]??"body")??K4[k.kind],E=k=>c.write(k),O=$4(a),C=k=>{let R={...p,accent:k};e?h({fonts:R}):n(R),o({accent_font:k})},I=k=>{s({...x,accent:k}),o({accent_size_px:k})},w=k=>{let R={...g,weightStrong:k};e?h({headingTypography:R}):l(R),o({heading_weight_strong:k})},v=k=>{let R={...g,italicStrong:k};e?h({headingTypography:R}):l(R),o({accent_italic:k})};return Pr(Er,{children:[oe(YC,{saved:u,old:d,colours:O,sizeOf:y,onChange:E,openId:t===bp?null:t,onOpenChange:r,withoutSize:e}),oe(JC,{font:p.accent,size:x.accent,weight:g.weightStrong,italic:g.italicStrong,headingWeight:g.weight,open:t===bp,onOpenChange:k=>r(k?bp:null),onChange:k=>{k.key==="font"?C(k.value):k.key==="size"?I(k.value):k.key==="weight"?w(k.value):v(k.value)},withoutSize:e})]})}var bp="accent";function $4(e){let o=Xr(e);return[{key:"accent",name:i("Accent"),value:o.accent},{key:"text",name:i("Text"),value:o.text},{key:"labels",name:i("Labels"),value:o.muted??o.text}]}var j4={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},K4={heading:32,body:14},q4={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 V4(e){if(typeof document>"u")return null;let o=(H4()?.contentDocument??document).querySelector(q4[e]);if(!o)return null;let t=parseFloat(getComputedStyle(o).fontSize);return Number.isFinite(t)?t:null}function Y4({themeFromDocument:e,persist:o,showHint:t}){let{appState:r,dispatch:a}=sw(p=>p),{cornerRadiusPx:n,setCornerRadiusPx:s}=ne(),l=r.data,c=l.root?.props??{},d=c.cornerRadiusPx===void 0?Xx[Yx(c.cornerStyle)]:Zo(c.cornerRadiusPx),u=e?d:n,h=p=>a({type:"replaceRoot",root:{...l.root,props:{...c,...p}},recordHistory:!0});return oe(LS,{value:u,onChange:p=>{e?h({cornerRadiusPx:p}):s(p),o({corner_radius_px:p})},showHint:t})}function X4(e){return{site_width:e}}function Z4({persist:e,showHint:o}){let{siteWidth:t,setSiteWidth:r,sectionBackgroundWidth:a,setSectionBackgroundWidth:n,sectionContentWidth:s,setSectionContentWidth:l}=ne();if(Sp()!=="desktop")return null;let c=typeof t=="number"?t:ro.default,d=p=>{r(p),e(X4(p),p===null)},u=p=>{n(p),e({section_background_width:p},!0)},h=p=>{l(p),e({section_content_width:p},!0)};return Pr(Er,{children:[oe(eC,{value:a??"full",changed:a!==null,detail:i("Full width"),onChange:u,onReset:()=>u(null),hint:o?JS:void 0}),oe(oC,{mode:s??"content",px:c,min:ro.min,max:ro.max,changed:typeof t=="number"||s!==null,detail:`${i("Content width")} ${ro.default}px`,onMode:h,onPx:p=>d(p),onReset:()=>{h(null),d(null)},hint:o?QS:void 0})]})}function J4(e){return{block_gap:e}}function Q4(e){return{block_gap_phone:e}}function e3(e){return{site_gutter:e}}function o3(e){return{site_gutter_phone:e}}function iw(e,[o,t],r){o(e),r(t(e),e===null)}function t3({persist:e,showHint:o}){let{siteGutter:t,siteGutterPhone:r,setSiteGutter:a,setSiteGutterPhone:n}=ne(),s=XS(Sp(),{gutter:t,phone:r});if(!s)return null;let l=s.key==="site_gutter_phone"?[n,o3]:[a,e3];return oe(ZS,{value:s.value,onChange:c=>iw(c,l,e),showHint:o,unsetPx:s.unsetPx,bounds:s.bounds})}function r3({persist:e,showHint:o}){let{blockGap:t,blockGapPhone:r,setBlockGap:a,setBlockGapPhone:n}=ne(),s=HS(Sp(),{gap:t,phone:r});if(!s)return null;let l=s.key==="block_gap_phone"?[n,Q4]:[a,J4];return oe(GS,{value:s.value,onChange:c=>iw(c,l,e),showHint:o,followsPx:s.followsPx})}function a3({persist:e,showHint:o=!0}){return Pr(Er,{children:[oe(Z4,{persist:e,showHint:o}),oe(t3,{persist:e,showHint:o}),oe(r3,{persist:e,showHint:o})]})}function n3(e){return{card_shadow:e}}function s3(e){return e===null?{shadow_color:null}:{shadow_color:Jx(e)}}function l3(e){return{hover_effect:e}}function i3({persist:e,showHint:o=!0}){let{cardShadow:t,setCardShadow:r,shadowColor:a,setShadowColor:n,hoverEffect:s,setHoverEffect:l}=ne();return Pr(Er,{children:[oe(BS,{value:t,onChange:c=>{r(c),e(n3(c),!0)},showHint:o}),oe(NS,{value:a,onChange:c=>{n(c),e(s3(c),c===null)},showHint:o}),oe(WS,{value:s,onChange:c=>{l(c),e(l3(c),!0)},showHint:o})]})}function c3(e){return{photography_grayscale:e}}function d3({persist:e,showHint:o}){let{photographyGrayscale:t,setPhotographyGrayscale:r}=ne();return oe(US,{value:t,onChange:a=>{r(a),e(c3(a),!0)},showHint:o})}function f3({persist:e,showHint:o=!0}){return oe(Er,{children:oe(d3,{persist:e,showHint:o})})}function u3(e){return{share_button_on_posts:e}}function p3({persist:e,showHint:o=!0}){let{shareButtonOnPosts:t,setShareButtonOnPosts:r}=ne();return oe($S,{value:t,onChange:a=>{r(a),e(u3(a),!0)},showHint:o})}function Oa(){let{websiteName:e}=ne();return e?.trim()||cI}function Wi({themeFromDocument:e=!1,tokenRef:o,siteId:t,onNotify:r,tab:a,onTabChange:n,initialTab:s,revealPageGroup:l=!1,onPageGroupRevealed:c}){let{persist:d}=aa({themeFromDocument:e,tokenRef:o,siteId:t,onResult:C=>{let I=QC(C);I&&r?.(I.msg,I.tone)}}),[u,h]=Gi(s??Pa[0].id),p=a!==void 0,x=p?a:u,g=p?n??(()=>{}):h,y=Pa.find(C=>C.id===x)??Pa[0],[E,O]=Gi(Cp);return Pr(Er,{children:[oe(x3,{activeId:y.id,onSelect:g}),Pr("div",{id:L4(yp,y.id),className:G4,role:"tabpanel","aria-labelledby":A4(yp,y.id),children:[x===Ea&&Pr(Er,{children:[oe(Y4,{themeFromDocument:e,persist:d,showHint:E}),!e&&oe(i3,{persist:d,showHint:E}),!e&&oe(a3,{persist:d,showHint:E}),!e&&oe(f3,{persist:d,showHint:E}),!e&&oe(p3,{persist:d,showHint:E}),oe(m3,{reveal:l,onRevealed:c}),oe(wp,{shown:E,onChange:O})]}),x==="theme"&&oe(z4,{themeFromDocument:e,persist:d}),x==="text"&&oe(U4,{themeFromDocument:e,persist:d})]})]})}function m3({reveal:e,onRevealed:o}){let[t,r]=Gi(!0),a=O4(o);return a.current=o,E4(()=>{if(!e)return;r(!0);let n=requestAnimationFrame(()=>{document.getElementById(nw)?.scrollIntoView({block:"start"}),a.current?.()});return()=>cancelAnimationFrame(n)},[e]),oe(P4,{title:i("This page"),open:t,onToggle:r,id:nw,children:oe(h3,{})})}function h3(){let{fields:e,values:o,readOnly:t,onChange:r}=v4(),a=Object.fromEntries(Ln.filter(n=>n in e).map(n=>[n,e[n]]));return Object.keys(a).length===0?oe(_4,{variant:"none",icon:!1,message:i("This page has no look of its own to set.")}):oe(T4,{fields:a,values:o,onChange:r,readOnly:t,tabs:!1,idPrefix:"this-page",ariaLabel:i("This page")})}function x3({activeId:e,onSelect:o}){return oe("div",{className:"es-insp-tabs",children:oe(R4,{variant:"underline",block:!0,labelsFit:!0,"aria-label":i("Styles"),idPrefix:yp,value:e,onChange:o,items:Pa.map(t=>{let r=i(t.label);return{id:t.id,icon:t.icon,label:r}})})})}import{InspectorIconButton as E3}from"efficient-easel/chrome";import{Button as Iw,Dialog as O3,FormField as F3,Input as gw,PopupMenu as _3,PopupMenuItem as bw,toast as yw}from"efficient-shell/ui";import{LayersTree as R3,TreeGroupLabel as A3,TreeRow as Sw,TreeRowAction as ji}from"efficient-easel/tree";import{AddIcon as L3,DuplicateIcon as B3,PageIcon as D3,SettingsIcon as N3}from"efficient-easel/icons";import{PagesIcon as M3}from"efficient-easel/rail";import{useEaselHost as H3}from"efficient-easel/screen/lib/host";var kp="Main Pages",I3="Dynamic Pages",vp="dynamic",g3="dynamic";function Bn(e){return e.kind===g3}function cw(e){let o=[],t=[];for(let r of e){if(Bn(r)){t.push(r);continue}let a=r.groupKey??(r.group?`folder:${r.group}`:"top"),n=o[o.length-1];n&&n.key===a?n.rows.push(r):o.push({key:a,label:r.group??kp,rows:[r]})}if(t.length){let r=o.findIndex(a=>a.key.startsWith("system:"));o.splice(r===-1?o.length:r,0,{key:vp,label:I3,rows:t})}return o}import{useEaselSession as vw}from"efficient-easel/screen/lib/session-context";import{useCallback as zi,useEffect as b3,useSyncExternalStore as y3}from"react";import{useScreenDocument as pw}from"efficient-easel/screen/components/ScreenDocumentContext";var dw=new WeakMap;function Dn(e){let o=dw.get(e);return o||(o={rows:null,loading:null,listeners:new Set},dw.set(e,o)),o}function Tp(e,o){e.rows=o;for(let t of e.listeners)t()}var Ui=new Set;function $i(e,o){o?Ui.add(e):Ui.delete(e)}function fw(e){let o=Dn(e),t=e.listPages().then(r=>Tp(o,Ui.size?r.filter(a=>!Ui.has(a.id)):r),()=>Tp(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var uw=()=>null,S3=()=>()=>{};function Nn(){let{adapter:e,ready:o}=pw(),t=zi(l=>{let{listeners:c}=Dn(e);return c.add(l),()=>c.delete(l)},[e]),r=zi(()=>Dn(e).rows,[e]),a=y3(o?t:S3,o?r:uw,uw);b3(()=>{if(!o)return;let l=Dn(e);l.rows===null&&!l.loading&&fw(e)},[e,o]);let n=zi(()=>o?fw(e):Promise.resolve(),[e,o]),s=zi(l=>Tp(Dn(e),l),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function C3(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function mw(){let{currentSlug:e}=pw(),{rows:o}=Nn();return C3(o,e)}import{canDuplicatePage as G3,DuplicatePageDialog as W3,uniqueSlug as Cw}from"efficient-easel/page-copy";var ww="sf-editor-pages-collapsed-groups";function z3(){let e=vw(),{siteId:o,templateId:t}=kw(),r=Ne(e).pages;if(!(!r.duplicate||t))return(a,n)=>r.duplicate(a.id,{...n,...o?{siteId:o}:{}})}function U3(){try{let e=ea()||(typeof window>"u"?"":window.location.origin);return e?new URL(e).host:""}catch{return""}}function Tw({onNavigate:e,onClose:o,activeSurface:t,onPreviewSurface:r}){let a=vw().chrome?.pageRows,n=H3(),{adapter:s,capabilities:l,ready:c,currentSlug:d}=kw(),u=Oa(),{rows:h,reload:p,setRows:x,getRows:g}=Nn(),[y,E]=$t(""),[O,C]=$t(!1),[I,w]=$t(null),[v,k]=$t(!1),[R,B]=$t(""),P=v3(),_=z3(),[N,b]=$t(null),[F,A]=$t(()=>{if(typeof window>"u")return new Set;try{let M=window.localStorage.getItem(ww);return new Set(M?JSON.parse(M):[])}catch{return new Set}});k3(()=>{try{window.localStorage.setItem(ww,JSON.stringify([...F]))}catch{}},[F]);let H=M=>A(ie=>{let pe=new Set(ie);return pe.has(M)?pe.delete(M):pe.add(M),pe}),z=xw(()=>cw(h??[]),[h]),Z=y.trim().toLowerCase(),j=M=>!Z||M.toLowerCase().includes(Z),Ae=M=>Z?!0:!F.has(M),ge=xw(()=>new Set((h??[]).map(M=>M.slug)),[h]),Ye=()=>{if(l.pageCreationInAdminForm){n.send("storefront-editor:new-page");return}B(""),w(null),k(!0)},We=async()=>{let M=R.trim();if(!(!M||!c||O||!s.createPage)){C(!0),w(null);try{let ie=await s.createPage({slug:Cw(M,ge),title:M,layout:{}});await p(),k(!1),B(""),e(ie.slug)}catch{w(i("Couldn\u2019t add the page \u2014 please retry."))}finally{C(!1)}}},Pe=l.hasSiteSettings&&!!s.createPage,ue=async()=>{if(!(!c||O||!s.createPage)){C(!0),w(null);try{let M=await s.createPage($b(i("New popup"),ge));await p(),e(M.slug)}catch{w(i("Couldn\u2019t add the popup \u2014 please retry."))}finally{C(!1)}}},Ce=T3(null),[Qe,so]=$t(null),le=()=>{if(!Pe)return Ye();if(Qe)return so(null);let M=Ce.current?.getBoundingClientRect();M&&so({top:M.bottom+6,right:Math.max(8,window.innerWidth-M.right)})},Le=M=>{let ie=h??[],pe=s.deletePage;if(!c||O||!pe||ie.length<=1)return;let Be=ie.findIndex(Xe=>Xe.id===M.id),De=ie.filter(Xe=>Xe.id!==M.id),Et=M.slug===d;$i(M.id,!0),x(De),w(null),Et&&De[0]&&e(De[0].slug);let Vr=()=>{$i(M.id,!1);let Xe=g()??[];if(Xe.some(on=>on.id===M.id))return;let er=[...Xe];er.splice(Math.max(0,Math.min(Be,er.length)),0,M),x(er)};yw.undoable(i("Deleted \u201C{name}\u201D",{name:M.label}),{actionLabel:i("Undo"),commit:async Xe=>{await pe(M.id,Xe),$i(M.id,!1)},undo:()=>{Vr(),Et&&e(M.slug)},onFail:()=>{Vr(),yw.error(i("Couldn\u2019t delete the page \u2014 please retry."))}})},po=M=>n.send("storefront-editor:open-page",{slug:M}),_e=M=>{if(!j(M.label))return null;let ie=!t&&M.slug===d,pe=l.canDeletePagesInline&&(h??[]).length>1,Be=Bn(M),De=M.kind==="lightbox",Et=[...Be?[{label:i("Dynamic"),tone:"info"}]:[],...De?[{label:i("Lightbox"),tone:"success"}]:[],...M.draft?[{label:i("draft"),tone:"draft"}]:[]],Vr=Et.length>0?Et:void 0,Xe=!!_&&G3(M),er=Xe||l.pageCreationInAdminForm||pe?Mn(hw,{children:[Xe&&fe(ji,{kind:"plain",label:i("Duplicate \u201C{name}\u201D",{name:M.label}),disabled:O,onClick:()=>b(M),children:fe(B3,{size:13})}),l.pageCreationInAdminForm&&fe(ji,{kind:"plain",label:i("Page settings for \u201C{name}\u201D",{name:M.label}),onClick:()=>po(M.slug),children:fe(N3,{size:13})}),pe&&fe(ji,{kind:"delete",label:i("Delete \u201C{name}\u201D",{name:M.label}),disabled:O,onClick:()=>Le(M),children:fe(Pp,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return fe(Sw,{icon:fe(D3,{size:14}),name:M.label,selected:ie,onSelect:()=>e(M.slug),badge:Vr,actions:er,rowProps:{"data-page-slug":M.slug}},M.id)},ze=(M,ie,pe)=>{let Be=pe.filter(Boolean);if(Be.length===0)return null;let De=Ae(M);return Mn(w3,{children:[fe(A3,{count:Be.length,countLabel:io("{n} page","{n} pages",Be.length),expanded:De,onToggle:()=>H(M),children:ie}),De&&Be]},M)},qo=(a?.rows??[]).filter(M=>j(M.label)).map(M=>{let ie=t===M.key;return fe(Sw,{icon:M.icon,name:M.label,selected:ie,onSelect:()=>r(M.key),badge:{label:i("Preview"),tone:"warning"},actions:fe(ji,{kind:"plain",label:i("Open the {name} in a new tab",{name:M.label}),onClick:()=>window.open(M.href,"_blank","noopener,noreferrer"),children:fe(Pp,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":M.key}},M.key)}),Pt=l.hasSiteSettings&&!!a,Vo=(()=>{if(h===null)return null;let M=[],ie=!1;for(let pe of z){Pt&&!ie&&pe.key.startsWith("system:")&&(M.push(ze("shop",a.title,qo)),ie=!0);let Be=pe.key===vp||pe.label===kp?i(pe.label):pe.label;M.push(ze(pe.key,Be,pe.rows.map(_e)))}return Pt&&!ie&&M.push(ze("shop",a.title,qo)),M})();return Mn("div",{className:"sf-pages",children:[fe(P3,{icon:fe(M3,{}),title:i("Pages"),context:u,actions:fe(E3,{buttonRef:Ce,label:Pe?i("Add"):i("New page"),hasPopup:Pe?"menu":void 0,expanded:Pe?Qe!==null:void 0,onClick:le,children:fe(L3,{size:15})})}),Qe&&fe(_3,{portal:!0,style:{top:Qe.top,right:Qe.right},onClose:()=>so(null),children:Mn("div",{role:"menu","aria-label":i("Add"),children:[fe(bw,{role:"menuitem",onClick:()=>{so(null),Ye()},children:i("Page")}),fe(bw,{role:"menuitem",disabled:O,onClick:()=>{so(null),ue()},children:i("Popup")})]})}),fe("div",{className:"sf-pages-find",children:fe(gw,{type:"search",leftIcon:fe(Pp,{name:"search",size:14,rounded:!0}),placeholder:i("Search all pages\u2026"),value:y,onChange:M=>E(M.target.value),"aria-label":i("Search all pages")})}),I&&!v&&fe("div",{className:"sf-note sf-note--error",role:"alert",children:I}),Vo===null?fe("div",{className:"sf-note",children:i("Loading\u2026")}):Vo.some(Boolean)?fe(R3,{ariaLabel:i("Pages"),className:"sf-scroll",children:Vo}):fe("div",{className:"sf-note",children:y.trim()?i("No pages match your search"):i("No pages yet. Add one with + above.")}),_&&N&&fe(W3,{source:{title:N.label,slug:N.slug},taken:ge,host:U3(),duplicate:M=>_(N,M),onClose:()=>b(null),onDuplicated:M=>{b(null),p(),e(M.slug)}},N.id),fe(O3,{open:v,onClose:()=>k(!1),size:"sm",title:i("Add a page"),description:i("Give the new template page a name. It starts blank \u2014 add sections once it opens."),footer:Mn(hw,{children:[fe(Iw,{variant:"secondary",onClick:()=>k(!1),children:i("Cancel")}),fe(Iw,{onClick:()=>{We()},disabled:O||!R.trim(),loading:O,children:i("Add page")})]}),children:fe(F3,{label:i("Page name"),htmlFor:P,hint:R.trim()?i("URL: /{slug}",{slug:Cw(R,ge)}):void 0,error:I??void 0,children:fe(gw,{id:P,value:R,invalid:!!I,onChange:M=>B(M.target.value),onKeyDown:M=>{M.key==="Enter"&&We()},placeholder:i("e.g. About")})})})]})}import{jsx as Ow}from"react/jsx-runtime";import{createContext as j3,useCallback as K3,useContext as q3,useMemo as V3,useState as Y3}from"react";import{CanvasChromeContext as X3}from"efficient-easel/easel";import{useSelectHandler as Z3}from"efficient-easel/draw/client";import{parseHexColor as $3}from"efficient-shell/format";var Ki=["chat-bubble-left-right","chat-bubble-oval-left-ellipsis","chat","megaphone","phone","sparkles"],Fa=Ki[0];var Or="right";function qi(e){return Ki.includes(e??"")?e:Fa}function Pw(e){return e==="left"?"left":Or}function Ew(e){return e&&$3(e)===e.toLowerCase()?e.toLowerCase():""}var Fw="chat",Vi={enabled:!0,title:"",subtitle:"",greeting:"",launcherColor:"",launcherIcon:"",launcherPosition:Or,launcherLabel:"",showOnPhones:!0};function Sde(e){return{enabled:e.enabled,title:e.title,subtitle:e.subtitle,greeting:e.greeting,launcherColor:Ew(e.launcherColor),launcherIcon:e.launcherIcon?qi(e.launcherIcon):"",launcherPosition:Pw(e.launcherPosition),launcherLabel:e.launcherLabel??"",showOnPhones:e.showOnPhones!==!1}}var _w=j3({chat:Vi,setChat:()=>{},setSelected:()=>{},setSelectHandler:()=>{}});function Cde({children:e,chat:o=Vi,onChatChange:t}){let[r,a]=Y3(!1),n=K3(d=>t?.(d),[t]),{select:s,setSelectHandler:l}=Z3(),c=V3(()=>({selected:()=>r?Fw:null,select:d=>d===Fw&&s()}),[r,s]);return Ow(_w.Provider,{value:{chat:o,setChat:n,setSelected:a,setSelectHandler:l},children:Ow(X3.Provider,{value:c,children:e})})}var Yi=()=>q3(_w);import{jsx as Ep}from"react/jsx-runtime";import{DesktopIcon as J3,PhoneIcon as Q3,TabletIcon as e6}from"efficient-easel/icons";import{VIEW_TIERS as o6,VIEW_TIER_LABEL as t6}from"efficient-easel/draw";var r6={desktop:Ep(J3,{}),tablet:Ep(e6,{}),mobile:Ep(Q3,{})},Rw=o6.map(e=>({id:e,get label(){return i(t6[e])},icon:r6[e]}));import{PreviewDeviceContext as BV}from"efficient-easel/draw/client";import{jsx as a6}from"react/jsx-runtime";import{createContext as n6,useCallback as Aw,useContext as s6,useMemo as l6,useRef as i6}from"react";var c6=Object.fromEntries(Js.map(e=>[e,{value:"",error:null}])),Lw=n6({links:fI,rows:c6,canSave:!1,saveLink:async()=>({ok:!1,error:"There is no website to save to."}),openPanel:()=>{},setOpenHandler:()=>{}});function Rde({children:e,value:o}){let t=i6(()=>{}),r=Aw(()=>t.current(),[]),a=Aw(s=>{t.current=s},[]),n=l6(()=>({...o,openPanel:r,setOpenHandler:a}),[o,r,a]);return a6(Lw.Provider,{value:n,children:e})}var Hn=()=>s6(Lw);import{jsx as d6}from"react/jsx-runtime";import{createContext as f6,useContext as u6,useMemo as p6,useState as m6}from"react";var Bw=f6(null);function Dde({children:e}){let[o,t]=m6(null),r=p6(()=>({surface:o,setSurface:t}),[o]);return d6(Bw.Provider,{value:r,children:e})}function Dw(){return u6(Bw)??{surface:null,setSurface:()=>{}}}import{createPreviewSelectionContext as h6}from"efficient-easel/draw/client";var Gn="Scrolling Bar",{Provider:Hde,useSelection:Nw}=h6("selectedHeroId"),Gde="data-sf-hero-ticker";function Wde(e){return`${e}::ticker`}function zde(e){return!e||!e.endsWith("::ticker")?null:e.slice(0,-8)||null}import{createPreviewSelectionContext as x6}from"efficient-easel/draw/client";var{Provider:jde,useSelection:Xi}=x6("selectedHeroPart");var Hw=["one","side","stacked"];var qde={one:"One",side:"Side by side",stacked:"Stacked"};function Gw(e){return Hw.includes(e)?e:"one"}function Mw(e){return e==="one"?1:2}function I6(e,o){if(Hw.includes(e))return e;let t=Gw(o);return t==="side"?"stacked":t}function Op(e){let o=Gw(e.mediaLayout);return Math.max(Mw(o),Mw(I6(e.mediaLayoutPhone,o)))}var Wn=["media","image","image2"],_a={media:"Media",image:"Image",image2:"Image 2"},zn={media:"heroMedia",image:"heroImage",image2:"heroImage2"};function Zi(e,o){return e==="image"&&Op(o)>1?"Image 1":_a[e]}var Zde="Video file",Jde="Upload a video file";function g6(e,o){return{field:"mediaType",is:e,default:o}}var b6=new Set(["HeroSingle"]),Ww="heroPart";function y6(e,o){return{...o,[Ww]:e}}function Qde(e,{parts:o={},onlyFor:t,fallback:r,rules:a}){let n={...e};for(let s of["image","video"])for(let l of t[s])n[l]=Oo(n[l],g6(s,r));for(let[s,l]of Object.entries(a??{}))l&&(n[s]=Oo(n[s],l));for(let s of Wn)for(let l of o[s]??[])n[l]=y6(s,n[l]);return n}function S6(e){let o=e?.[Ww];return Wn.includes(o)?o:null}function zw(e,o){let t={};for(let[r,a]of Object.entries(e))S6(a)===o&&(t[r]=a);return t}function Uw(e){if(!b6.has(e.type))return[];let o=[{part:"media",label:_a.media,depth:0}];return(e.props.mediaType??"image")!=="video"&&(o.push({part:"image",label:Zi("image",e.props),depth:1}),Op(e.props)>1&&o.push({part:"image2",label:Zi("image2",e.props),depth:1})),o}function Un(e,o){return`${e}::${o}`}function $w(e){if(!e)return null;let o=e.lastIndexOf("::");if(o<=0)return null;let t=e.slice(o+2);return Wn.includes(t)?{nodeId:e.slice(0,o),part:t}:null}var efe="data-sf-hero-part";import{jsx as ce,jsxs as Gr,Fragment as Y0}from"react/jsx-runtime";import{useState as e8}from"react";import{useEasel as o8,useRootFields as t8}from"efficient-easel/easel";import{Button as r8,EmptyState as a8}from"efficient-shell/ui";function jw({kind:e,pageName:o}){return{name:o?.trim()||i("This page"),kindLabel:Bn({kind:e})?i("Template"):i("Page")}}import{headWords as Q0,InspectorHead as n8,InspectorIconButton as X0}from"efficient-easel/chrome";import{DuplicateIcon as s8,TrashIcon as l8}from"efficient-easel/icons";import{panelFieldsOf as i8}from"efficient-easel/screen/lib/document/panel-fields";import{jsx as L,Fragment as ae,jsxs as se}from"react/jsx-runtime";import{BlockBannerIcon as k6,BlockBoxIcon as v6,BlockButtonIcon as T6,BlockDividerIcon as qw,BlockFooterIcon as Vw,BlockHeadingIcon as P6,BlockProductIcon as E6,BlockSocialIcon as O6,BlockTextIcon as F6,CardPaymentIcon as _6,ChatIcon as R6,AccountIcon as A6,GlobeIcon as L6,GridIcon as B6,ImageIcon as _p,MapIcon as D6,MediaIcon as N6,PageIcon as M6}from"efficient-easel/icons";import{jsx as Fp,Fragment as C6,jsxs as w6}from"react/jsx-runtime";var Kw=w6(C6,{children:[Fp("circle",{cx:"9",cy:"20",r:"1.3"}),Fp("circle",{cx:"18",cy:"20",r:"1.3"}),Fp("path",{d:"M2.5 3.5h3l2.3 11.3a1.6 1.6 0 0 0 1.6 1.3h8.1a1.6 1.6 0 0 0 1.6-1.2L21 7H6"})]});var H6={header:se(ae,{children:[L("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),L("path",{d:"M3 9.5h18"})]}),social:se(ae,{children:[L("circle",{cx:"6",cy:"12",r:"2.5"}),L("circle",{cx:"18",cy:"6",r:"2.5"}),L("circle",{cx:"18",cy:"18",r:"2.5"}),L("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:se(ae,{children:[L("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),L("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:se(ae,{children:[L("path",{d:"M4 15.5h6M4 18h4"}),L("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:L("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:se(ae,{children:[L("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),L("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:L("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:se(ae,{children:[L("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),L("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:se(ae,{children:[L("circle",{cx:"11",cy:"11",r:"6"}),L("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:Kw,CountrySwitchBlock:se(ae,{children:[L("circle",{cx:"12",cy:"12",r:"8.5"}),L("path",{d:"M3.5 12h17M12 3.5c2.6 2.4 3.6 5.2 3.6 8.5s-1 6.1-3.6 8.5M12 3.5c-2.6 2.4-3.6 5.2-3.6 8.5s1 6.1 3.6 8.5"})]}),ThemeSwitchBlock:se(ae,{children:[L("circle",{cx:"12",cy:"12",r:"8.5"}),L("path",{d:"M12 3.5v17M12 5.5l6 6M12 10.5l5.2 5.2M12 15.5l2.8 2.8"})]}),LegalLineBlock:se(ae,{children:[L("path",{d:"M3 9h18"}),L("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:se(ae,{children:[L("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),L("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:se(ae,{children:[L("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),L("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:se(ae,{children:[L("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),L("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),L("path",{d:"M7 17h7"})]}),Collections:se(ae,{children:[L("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),L("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),L("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:se(ae,{children:[L("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),L("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:se(ae,{children:[L("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),L("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),L("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),L("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),L("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:se(ae,{children:[L("path",{d:"M3 7h9M15.5 7H21"}),L("circle",{cx:"13.5",cy:"7",r:"1.7"}),L("path",{d:"M3 12h4M10.5 12H21"}),L("circle",{cx:"8.5",cy:"12",r:"1.7"}),L("path",{d:"M3 17h9M15.5 17H21"}),L("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:se(ae,{children:[L("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),L("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),L("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),L("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),L("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),L("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:se(ae,{children:[L("path",{d:"M3 5h10"}),L("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),L("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),L("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:se(ae,{children:[L("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),L("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),L("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:se(ae,{children:[L("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),L("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),L("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),L("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:se(ae,{children:[L("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),L("circle",{cx:"9",cy:"10",r:"1.6"}),L("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:se(ae,{children:[L("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),L("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:se(ae,{children:[L("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),L("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),L("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:se(ae,{children:[L("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),L("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:se(ae,{children:[L("path",{d:"M3.5 20h17"}),L("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:se(ae,{children:[L("circle",{cx:"6",cy:"12",r:"2.6"}),L("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),L("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:se(ae,{children:[L("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),L("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:se(ae,{children:[L("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),L("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:se(ae,{children:[L("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),L("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:se(ae,{children:[L("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),L("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:se(ae,{children:[L("path",{d:"M4 8.5h4.5M11 8.5h9"}),L("path",{d:"M4 14.5h16"})]}),HeroGroup:se(ae,{children:[L("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),L("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:se(ae,{children:[L("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),L("path",{d:"M6.5 9h11M6.5 12.5h11"}),L("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:L(ae,{children:L("path",{d:"M12 3.5l7.5 3.2v5.1c0 4.2-3.2 7.1-7.5 8.7-4.3-1.6-7.5-4.5-7.5-8.7V6.7z"})}),Spacer:se(ae,{children:[L("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),L("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:se(ae,{children:[L("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),L("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),L("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),L("path",{d:"M4 13.5h11M4 17.5h7"}),L("path",{d:"M17 15l3 2-3 2"})]}),Contents:se(ae,{children:[L("path",{d:"M4 7h2M4 12h2M4 17h2"}),L("path",{d:"M9 7h11M9 12h9M9 17h10"})]}),CustomHTML:L("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},G6=L("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),W6={footer:Vw,Footer:Vw,Divider:qw,FooterDivider:qw,Banner:k6,Flex:v6,FooterSocial:O6,FooterPayment:_6,page:M6,website:L6,AccountBlock:A6,chat:R6,Heading:P6,Text:F6,ImageBlock:_p,ButtonBlock:T6,LocationMap:D6,Grid:B6,ProductRef:E6,heroMedia:N6,heroImage:_p,heroImage2:_p},z6={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",PaymentLogosBlock:"FooterPayment",SiteHeader:"header",SiteFooter:"footer"};function Fr({type:e,size:o=16,className:t}){let r=z6[e]??e,a=W6[r];return a?L(a,{size:o,className:t}):L("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:H6[r]??G6})}import{PanelHideButton as Z0}from"efficient-easel/screen/components/SidePanelHead";import{useEaselSession as c8}from"efficient-easel/screen/lib/session-context";import{jsx as be,jsxs as $n,Fragment as U6}from"react/jsx-runtime";import{useEffect as $6,useId as Yw,useState as j6}from"react";import{IconPicker as K6}from"efficient-shell/ui";import{SettingsDefaultReset as q6,SettingsField as jn,SettingsSegmented as V6,SettingsSwitch as Xw}from"efficient-easel/panel";import{ButtonIcon as Y6,ButtonIconIcon as X6,EyeIcon as Z6,PhoneIcon as J6,PlacementIcon as Q6,TypeIcon as eG}from"efficient-easel/icons";var oG="Chat with us",tG="We usually reply within a few minutes",rG="Hi! Ask us anything \u2014 about a wheel, an order, or fitment. Leave your details and we\u2019ll reply.";function Ji({label:e,value:o,placeholder:t,onCommit:r,multiline:a=!1,hint:n}){let[s,l]=j6(o);$6(()=>l(o),[o]);let c=()=>{s!==o&&r(s)};return be(jn,{label:e,icon:be(eG,{}),changed:o!=="",action:be(Kn,{label:e,changed:o!=="",onReset:()=>r("")}),hint:n,children:a?be("textarea",{value:s,placeholder:t,rows:3,onChange:d=>l(d.target.value),onBlur:c,"aria-label":e}):be("input",{type:"text",value:s,placeholder:t,onChange:d=>l(d.target.value),onBlur:c,onKeyDown:d=>{d.key==="Enter"&&d.currentTarget.blur()},"aria-label":e,autoComplete:"off"})})}function Kn({label:e,changed:o,onReset:t}){return be(q6,{words:Q()?.panel,label:e,changed:o,onReset:t})}function aG({label:e,icon:o,checked:t,fallback:r,onChange:a,hint:n}){let s=Yw();return be(jn,{label:e,labelId:s,icon:o,changed:t!==r,action:$n("span",{className:"inline-flex items-center gap-2",children:[be(Xw,{checked:t,onChange:a,ariaLabelledBy:s}),be(Kn,{label:e,changed:t!==r,onReset:()=>a(r)})]}),hint:n})}var nG=Ki.map(e=>({value:e,icon:cl(e)}));function sG(){let{theme:e}=ne(),o=eo(e).themes[0];return tn(o)??o?.accent??""}function Zw(){let{chat:e,setChat:o}=Yi(),t=Yw(),r=sG(),a=e.launcherIcon?qi(e.launcherIcon):Fa;return $n(U6,{children:[be(jn,{label:i("Show the chat bubble"),labelId:t,icon:be(Z6,{}),changed:!e.enabled,action:$n("span",{className:"inline-flex items-center gap-2",children:[be(Xw,{checked:e.enabled,onChange:n=>o({enabled:n}),ariaLabelledBy:t}),be(Kn,{label:i("Show the chat bubble"),changed:!e.enabled,onReset:()=>o({enabled:!0})})]}),hint:e.enabled?i("The floating chat bubble shows in the corner of every page."):i("The chat bubble is hidden across the whole site.")}),$n(vu,{title:i("Look"),children:[be(wo,{label:i("Button color"),icon:be(Y6,{}),changed:e.launcherColor!=="",value:e.launcherColor,inherited:r,caption:e.launcherColor?void 0:i("Site button color"),onChange:n=>o({launcherColor:n}),onReset:()=>o({launcherColor:""})}),be(jn,{label:i("Icon"),icon:be(X6,{}),changed:a!==Fa,action:be(Kn,{label:i("Icon"),changed:a!==Fa,onReset:()=>o({launcherIcon:""})}),children:be(K6,{label:i("Icon"),value:a,options:nG,onChange:n=>o({launcherIcon:n===Fa?"":n})})}),be(jn,{label:i("Position"),icon:be(Q6,{}),changed:e.launcherPosition!==Or,action:be(Kn,{label:i("Position"),changed:e.launcherPosition!==Or,onReset:()=>o({launcherPosition:Or})}),children:be(V6,{options:[{label:i("Right"),id:"right"},{label:i("Left"),id:"left"}],value:e.launcherPosition,ariaLabel:i("Position"),onChange:n=>o({launcherPosition:n})})}),be(Ji,{label:i("Label"),value:e.launcherLabel,placeholder:i("Icon only"),onCommit:n=>o({launcherLabel:n}),hint:i("Shows when a visitor points at the button")}),be(aG,{label:i("Show on phones"),icon:be(J6,{}),checked:e.showOnPhones,fallback:Vi.showOnPhones,onChange:n=>o({showOnPhones:n})})]}),$n(vu,{title:i("Wording"),children:[be(Ji,{label:i("Title"),value:e.title,placeholder:oG,onCommit:n=>o({title:n})}),be(Ji,{label:i("Subtitle"),value:e.subtitle,placeholder:tG,onCommit:n=>o({subtitle:n})}),be(Ji,{label:i("Greeting message"),value:e.greeting,placeholder:rG,onCommit:n=>o({greeting:n}),multiline:!0}),be("p",{className:"es-field-hint sf-hint-keep",children:i("Leave a field blank to use the built-in wording.")})]})]})}import{jsx as _r,Fragment as Qp,jsxs as tk}from"react/jsx-runtime";import{useEffect as DG,useId as ek,useState as ok}from"react";import{SettingsField as NG}from"efficient-easel/panel";import{jsx as PG}from"react/jsx-runtime";import{forwardRef as lG,createElement as Rp}from"react";var Jw={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};var J=(e,o,t,r)=>{let a=lG(({color:n="currentColor",size:s=24,stroke:l=2,title:c,className:d,children:u,...h},p)=>Rp("svg",{ref:p,...Jw[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${o}`,d].filter(Boolean).join(" "),...e==="filled"?{fill:n}:{strokeWidth:l,stroke:n},...h},[c&&Rp("title",{key:"svg-title"},c),...r.map(([x,g])=>Rp(x,g)),...Array.isArray(u)?u:[u]]));return a.displayName=`${t}`,a};var iG=[["path",{d:"M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3",key:"svg-0"}]],Ap=J("outline","brand-facebook","BrandFacebook",iG);var cG=[["path",{d:"M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10",key:"svg-0"}],["path",{d:"M8.5 12a3.5 3.5 0 1 0 7 0a3.5 3.5 0 0 0 -7 0",key:"svg-1"}],["path",{d:"M17 7v.01",key:"svg-2"}]],Lp=J("outline","brand-instagram","BrandInstagram",cG);var dG=[["path",{d:"M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01",key:"svg-0"}]],Bp=J("outline","brand-line","BrandLine",dG);var fG=[["path",{d:"M8 11v5",key:"svg-0"}],["path",{d:"M8 8v.01",key:"svg-1"}],["path",{d:"M12 16v-5",key:"svg-2"}],["path",{d:"M16 16v-3a2 2 0 1 0 -4 0",key:"svg-3"}],["path",{d:"M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10",key:"svg-4"}]],Dp=J("outline","brand-linkedin","BrandLinkedin",fG);var uG=[["path",{d:"M8 20l4 -9",key:"svg-0"}],["path",{d:"M10.7 14c.437 1.263 1.43 2 2.55 2c2.071 0 3.75 -1.554 3.75 -4a5 5 0 1 0 -9.7 1.7",key:"svg-1"}],["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-2"}]],Np=J("outline","brand-pinterest","BrandPinterest",uG);var pG=[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]],Mp=J("outline","brand-telegram","BrandTelegram",pG);var mG=[["path",{d:"M21 7.917v4.034a9.948 9.948 0 0 1 -5 -1.951v4.5a6.5 6.5 0 1 1 -8 -6.326v4.326a2.5 2.5 0 1 0 4 2v-11.5h4.083a6.005 6.005 0 0 0 4.917 4.917",key:"svg-0"}]],Hp=J("outline","brand-tiktok","BrandTiktok",mG);var hG=[["path",{d:"M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5",key:"svg-0"}],["path",{d:"M11.197 15.698c-.69 .196 -1.43 .302 -2.197 .302a8.008 8.008 0 0 1 -2.612 -.432l-2.388 1.432v-2.801c-1.237 -1.082 -2 -2.564 -2 -4.199c0 -3.314 3.134 -6 7 -6c3.782 0 6.863 2.57 7 5.785l0 .233",key:"svg-1"}],["path",{d:"M10 8h.01",key:"svg-2"}],["path",{d:"M7 8h.01",key:"svg-3"}],["path",{d:"M15 14h.01",key:"svg-4"}],["path",{d:"M18 14h.01",key:"svg-5"}]],Gp=J("outline","brand-wechat","BrandWechat",hG);var xG=[["path",{d:"M3 21l1.65 -3.8a9 9 0 1 1 3.4 2.9l-5.05 .9",key:"svg-0"}],["path",{d:"M9 10a.5 .5 0 0 0 1 0v-1a.5 .5 0 0 0 -1 0v1a5 5 0 0 0 5 5h1a.5 .5 0 0 0 0 -1h-1a.5 .5 0 0 0 0 1",key:"svg-1"}]],Wp=J("outline","brand-whatsapp","BrandWhatsapp",xG);var IG=[["path",{d:"M4 4l11.733 16h4.267l-11.733 -16l-4.267 0",key:"svg-0"}],["path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772",key:"svg-1"}]],zp=J("outline","brand-x","BrandX",IG);var gG=[["path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8",key:"svg-0"}],["path",{d:"M10 9l5 3l-5 3l0 -6",key:"svg-1"}]],Up=J("outline","brand-youtube","BrandYoutube",gG);var bG=[["path",{d:"M18 2a1 1 0 0 1 .993 .883l.007 .117v4a1 1 0 0 1 -.883 .993l-.117 .007h-3v1h3a1 1 0 0 1 .991 1.131l-.02 .112l-1 4a1 1 0 0 1 -.858 .75l-.113 .007h-2v6a1 1 0 0 1 -.883 .993l-.117 .007h-4a1 1 0 0 1 -.993 -.883l-.007 -.117v-6h-2a1 1 0 0 1 -.993 -.883l-.007 -.117v-4a1 1 0 0 1 .883 -.993l.117 -.007h2v-1a6 6 0 0 1 5.775 -5.996l.225 -.004h3z",key:"svg-0"}]],$p=J("filled","brand-facebook-filled","BrandFacebookFilled",bG);var yG=[["path",{d:"M16 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-8a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-4 5a4 4 0 0 0 -3.995 3.8l-.005 .2a4 4 0 1 0 4 -4m4.5 -1.5a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1",key:"svg-0"}]],jp=J("filled","brand-instagram-filled","BrandInstagramFilled",yG);var SG=[["path",{d:"M17 2a5 5 0 0 1 5 5v10a5 5 0 0 1 -5 5h-10a5 5 0 0 1 -5 -5v-10a5 5 0 0 1 5 -5zm-9 8a1 1 0 0 0 -1 1v5a1 1 0 0 0 2 0v-5a1 1 0 0 0 -1 -1m6 0a3 3 0 0 0 -1.168 .236l-.125 .057a1 1 0 0 0 -1.707 .707v5a1 1 0 0 0 2 0v-3a1 1 0 0 1 2 0v3a1 1 0 0 0 2 0v-3a3 3 0 0 0 -3 -3m-6 -3a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1",key:"svg-0"}]],Kp=J("filled","brand-linkedin-filled","BrandLinkedinFilled",SG);var CG=[["path",{d:"M17 3.34a10 10 0 0 1 -8.512 18.023l2.364 -5.315a3.5 3.5 0 0 0 2.398 .952c2.708 0 4.75 -2.089 4.75 -5a6 6 0 1 0 -11.64 2.041a1 1 0 1 0 1.88 -.682a4 4 0 1 1 7.76 -1.36c0 1.818 -1.156 3.001 -2.75 3.001c-.609 0 -1.153 -.361 -1.478 -1.022l1.142 -2.572a1 1 0 0 0 -1.828 -.812l-4.392 9.882a10 10 0 0 1 -4.694 -8.476l.005 -.324a10 10 0 0 1 14.995 -8.336",key:"svg-0"}]],qp=J("filled","brand-pinterest-filled","BrandPinterestFilled",CG);var wG=[["path",{d:"M16.083 2h-4.083a1 1 0 0 0 -1 1v11.5a1.5 1.5 0 1 1 -2.519 -1.1l.12 -.1a1 1 0 0 0 .399 -.8v-4.326a1 1 0 0 0 -1.23 -.974a7.5 7.5 0 0 0 1.73 14.8l.243 -.005a7.5 7.5 0 0 0 7.257 -7.495v-2.7l.311 .153c1.122 .53 2.333 .868 3.59 .993a1 1 0 0 0 1.099 -.996v-4.033a1 1 0 0 0 -.834 -.986a5.005 5.005 0 0 1 -4.097 -4.096a1 1 0 0 0 -.986 -.835z",key:"svg-0"}]],Vp=J("filled","brand-tiktok-filled","BrandTiktokFilled",wG);var kG=[["path",{d:"M18.497 4.409a10 10 0 0 1 -10.36 16.828l-.223 -.098l-4.759 .849l-.11 .011a1 1 0 0 1 -.11 0l-.102 -.013l-.108 -.024l-.105 -.037l-.099 -.047l-.093 -.058l-.014 -.011l-.012 -.007l-.086 -.073l-.077 -.08l-.067 -.088l-.056 -.094l-.034 -.07l-.04 -.108l-.028 -.128l-.012 -.102a1 1 0 0 1 0 -.125l.012 -.1l.024 -.11l.045 -.122l1.433 -3.304l-.009 -.014a10 10 0 0 1 1.549 -12.454l.215 -.203a10 10 0 0 1 13.226 -.217m-8.997 3.09a1.5 1.5 0 0 0 -1.5 1.5v1a6 6 0 0 0 6 6h1a1.5 1.5 0 0 0 0 -3h-1l-.144 .007a1.5 1.5 0 0 0 -1.128 .697l-.042 .074l-.022 -.007a4.01 4.01 0 0 1 -2.435 -2.435l-.008 -.023l.075 -.041a1.5 1.5 0 0 0 .704 -1.272v-1a1.5 1.5 0 0 0 -1.5 -1.5",key:"svg-0"}]],Yp=J("filled","brand-whatsapp-filled","BrandWhatsappFilled",kG);var vG=[["path",{d:"M8.267 3a1 1 0 0 1 .73 .317l.076 .092l4.274 5.828l5.946 -5.944a1 1 0 0 1 1.497 1.32l-.083 .094l-6.163 6.162l6.262 8.54a1 1 0 0 1 -.697 1.585l-.109 .006h-4.267a1 1 0 0 1 -.73 -.317l-.076 -.092l-4.276 -5.829l-5.944 5.945a1 1 0 0 1 -1.497 -1.32l.083 -.094l6.161 -6.163l-6.26 -8.539a1 1 0 0 1 .697 -1.585l.109 -.006h4.267z",key:"svg-0"}]],Xp=J("filled","brand-x-filled","BrandXFilled",vG);var TG=[["path",{d:"M18 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-12a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-9 6v6a1 1 0 0 0 1.514 .857l5 -3a1 1 0 0 0 0 -1.714l-5 -3a1 1 0 0 0 -1.514 .857z",key:"svg-0"}]],Zp=J("filled","brand-youtube-filled","BrandYoutubeFilled",TG);var Due="outline",Qi={fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},EG={},Jp={fillRule:"evenodd"},OG=[["path",{...Qi,d:"M21 4L3 11L7 13L9 19L12 15L17 20z"}],["path",{...Jp,d:"M21 4L3 11L7 13L9 19L12 15L17 20zM15.212 8.939 10.576 13.576 11.424 14.424 16.061 9.788z"}]],FG=[["path",{...Qi,d:["M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663","c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133","c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48","c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01z"].join("")}],["path",{...EG,d:["M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663","c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133","c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48","c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01z"].join("")}]],_G=[["path",{...Qi,d:["M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178","a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5z"].join("")}],["path",{...Qi,d:["M8.319 15.972L7.84 15.918L7.349 15.832L6.865 15.715L6.388 15.568L4 17L4 14.199","L3.559 13.775L3.197 13.356L2.877 12.91L2.603 12.439L2.376 11.946L2.201 11.433","L2.079 10.902L2.016 10.405L2.001 9.897L2.036 9.386L2.12 8.889L2.25 8.405L2.425 7.937","L2.642 7.486L2.9 7.055L3.195 6.645L3.459 6.333L3.744 6.037L4.05 5.757L4.377 5.495","L4.723 5.25L5.086 5.025L5.467 4.819L5.864 4.634L6.275 4.471L6.701 4.331L7.139 4.214","L7.589 4.122L8.05 4.055L8.521 4.014L9.352 4.007L9.815 4.04L10.269 4.098L10.713 4.181","L11.146 4.287L11.567 4.416L11.975 4.567L12.369 4.739L12.748 4.932L13.112 5.143","L13.459 5.374L13.788 5.622L14.172 5.956L14.458 6.241L14.722 6.542L14.965 6.856","L15.217 7.237A8.35 7.35 0 0 0 8.319 15.972z"].join("")}],["path",{...Jp,d:["M8.319 15.972L7.84 15.918L7.349 15.832L6.865 15.715L6.388 15.568L4 17L4 14.199","L3.559 13.775L3.197 13.356L2.877 12.91L2.603 12.439L2.376 11.946L2.201 11.433","L2.079 10.902L2.016 10.405L2.001 9.897L2.036 9.386L2.12 8.889L2.25 8.405L2.425 7.937","L2.642 7.486L2.9 7.055L3.195 6.645L3.459 6.333L3.744 6.037L4.05 5.757L4.377 5.495","L4.723 5.25L5.086 5.025L5.467 4.819L5.864 4.634L6.275 4.471L6.701 4.331L7.139 4.214","L7.589 4.122L8.05 4.055L8.521 4.014L9.352 4.007L9.815 4.04L10.269 4.098L10.713 4.181","L11.146 4.287L11.567 4.416L11.975 4.567L12.369 4.739L12.748 4.932L13.112 5.143","L13.459 5.374L13.788 5.622L14.172 5.956L14.458 6.241L14.722 6.542L14.965 6.856","L15.217 7.237A8.35 7.35 0 0 0 8.319 15.972zM5.25 7.9a0.85 0.85 0 1 0 1.7 0","a0.85 0.85 0 1 0 -1.7 0zM8.25 7.9a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0z"].join("")}],["path",{...Jp,d:["M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178","a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5z","M14.15 14a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0zM17.15 14","a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0z"].join("")}]],RG=J("filled","brand-telegram-filled","BrandTelegramFilled",OG),AG=J("filled","brand-line-filled","BrandLineFilled",FG),LG=J("filled","brand-wechat-filled","BrandWechatFilled",_G),BG={instagram:{outline:Lp,solid:jp},facebook:{outline:Ap,solid:$p},tiktok:{outline:Hp,solid:Vp},youtube:{outline:Up,solid:Zp},x:{outline:zp,solid:Xp},linkedin:{outline:Dp,solid:Kp},pinterest:{outline:Np,solid:qp},whatsapp:{outline:Wp,solid:Yp},telegram:{outline:Mp,solid:RG},line:{outline:Bp,solid:AG},wechat:{outline:Gp,solid:LG}};function Qw({platform:e,iconStyle:o,size:t}){let r=BG[e][o];return PG(r,{size:t,stroke:1.75,"aria-hidden":"true",focusable:"false"})}var MG={instagram:"instagram.com/yourshop",facebook:"facebook.com/yourshop",tiktok:"tiktok.com/@yourshop",youtube:"youtube.com/@yourshop",x:"x.com/yourshop",linkedin:"linkedin.com/company/yourshop",pinterest:"pinterest.com/yourshop",whatsapp:"wa.me/61400000000",telegram:"t.me/yourshop",line:"line.me/ti/p/~yourshop",wechat:"u.wechat.com/your-qr-code-link"};function HG({platform:e}){let{rows:o,saveLink:t}=Hn(),{value:r,error:a}=o[e],[n,s]=ok(r),[l,c]=ok(!1),d=ek(),u=ek();DG(()=>s(r),[r]);let h=async()=>{if(n.trim()===r){n!==r&&s(r);return}c(!0),await t(e,n),c(!1)},p=dI[e];return tk(Qp,{children:[_r(NG,{label:i(p),htmlFor:d,icon:_r(Qw,{platform:e,iconStyle:"outline",size:18}),children:_r("input",{id:d,type:"text",inputMode:"url",value:n,placeholder:MG[e],onChange:x=>s(x.target.value),onBlur:()=>{h()},onKeyDown:x=>{x.key==="Enter"&&x.currentTarget.blur(),x.key==="Escape"&&(s(r),x.currentTarget.blur())},"aria-invalid":a?!0:void 0,"aria-describedby":a?u:void 0,"aria-busy":l||void 0,autoComplete:"off",spellCheck:!1})}),a&&_r("p",{id:u,className:"sf-note sf-note--error",role:"alert",children:a})]})}function rk({unavailable:e}){let{canSave:o}=Hn();return!o&&e?_r(Qp,{children:e}):tk(Qp,{children:[_r("p",{className:"es-field-hint sf-hint-keep",children:i("Paste a link to each profile. A platform left empty shows nothing on the site.")}),Js.map(t=>_r(HG,{platform:t},t))]})}import{jsx as Lr,Fragment as gz,jsxs as bz}from"react/jsx-runtime";import{useId as yz,useMemo as Sz}from"react";import{useEasel as Cz}from"efficient-easel/easel";import{SettingsField as wz,SettingsSwitch as kz}from"efficient-easel/panel";import{EyeIcon as vz}from"efficient-easel/icons";import{fieldShownInView as Tz}from"efficient-easel/fields";import{usePreviewDevice as Pz}from"efficient-easel/draw/client";var ak=["","","","","",""],nk="#ticker";import{jsx as Ar,Fragment as GW,jsxs as WW}from"react/jsx-runtime";import{createContext as zW,useContext as UW,useLayoutEffect as Wk,useMemo as cc,useRef as zk,useState as um}from"react";import{useEasel as Uk,useSelectedFields as $W}from"efficient-easel/easel";import{fieldShownInView as jW,Inspector as KW,planFields as pm}from"efficient-easel/fields";function sk({allTabs:e,remembered:o,inherited:t,buckets:r,hasText:a}){return o&&(e||r.includes(o))?o:t&&r.includes(t)?t:a?"Design":r[0]??"Design"}import{group as TW}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as PW,deviceMetaOf as Ek}from"efficient-easel/screen/lib/document/device-fields";import{jsx as Y,jsxs as yt}from"react/jsx-runtime";import{phoneKey as jt}from"efficient-easel/draw";import{SettingsDefaultReset as XG,SettingsField as yk}from"efficient-easel/panel";import{AnimationIcon as Sk,ClockIcon as ZG,DirectionDownIcon as JG,DirectionIcon as QG,DirectionLeftIcon as eW,DirectionRightIcon as oW,DirectionUpIcon as tW,DurationIcon as rW}from"efficient-easel/icons";import{deviceField as Ra}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as aW,noControlField as nW}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{describedAs as Ck,group as sW,phoneTwinFields as lW}from"efficient-easel/screen/lib/document/box-fields";import{ENTRANCE_FROM as iW,ENTRANCE_FROM_DEFAULT as wk,ENTRANCE_KINDS as sc,ENTRANCE_KINDS_WITH_FROM as Ik,MOTION_TIMING as cW,entranceAttrs as dW,playEntrance as fW,readEntrance as uW}from"efficient-shell/format";import{IconPicker as pW}from"efficient-shell/ui";import{jsx as rm}from"react/jsx-runtime";import{ClockIcon as UG,DurationIcon as $G}from"efficient-easel/icons";import{MOTION_TIMING as uk}from"efficient-shell/format";import{useSelectedHost as jG}from"efficient-easel/easel";import{MOTION_EASING as GG,MOTION_TIMING as lk,motionSeconds as ik}from"efficient-shell/format";var em="none",om=[{label:"None",value:"none"},{label:"Scroll",value:"scroll"}];function Xue(e){return mo(om,em,e)}var ec={field:"loop",is:"scroll"},qn="left",tm=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],WG={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function ck(e){return mo(tm,qn,e)}function Zue(e){return e==="up"||e==="down"}function dk(e){return ik("loop","duration",e.loopDuration!=null?e.loopDuration:e.speed)}var Jue=lk.loop.duration.default,zG=lk.loop.delay.default;function fk(e){return ik("loop","delay",e.loopDelay)}function Que(e,o,t=zG){return`${WG[e]} ${o}s ${GG.loop}${t?` ${t}s`:""} infinite`}function am(e){let{min:o,max:t,step:r,default:a}=uk[e].duration;return ot("Duration",rm($G,{}),o,t,r,a,"s")}function nm(e){let{min:o,max:t,step:r,default:a}=uk[e].delay;return ot("Delay",rm(UG,{}),o,t,r,a,"s")}function pk(e,o){let t=e.render,r=a=>{let n=jG();return t({...a,value:o(a.value,n?.values)})};return{...e,render:a=>rm(r,{...a})}}function oc({readsSpeed:e}){return pk(am("loop"),(o,t)=>dk({loopDuration:o,speed:e?t?.speed:void 0}))}function tc(){return pk(nm("loop"),e=>fk({loopDelay:e}))}import{phoneKey as KG}from"efficient-easel/draw";import{readEntrance as qG}from"efficient-shell/format";var ac="sf-entrance",ke={kind:"entrance",from:"entranceFrom",duration:"entranceDuration",delay:"entranceDelay"},nc="sectionAnimation",mk=e=>e!=null&&e!=="";function VG(e,o){let t=e[ke[o]];return o==="kind"&&!mk(t)?e[nc]:t}function rc(e,o,t){if(t==="phone"){let r=e[KG(ke[o])];if(mk(r))return r}return VG(e,o)}function Vn(e,o){return qG(rc(e,"kind",o),rc(e,"from",o),rc(e,"duration",o),rc(e,"delay",o))}function hk(e){let o=Vn(e,"desktop"),t=Vn(e,"phone");return o.kind==="none"&&t.kind==="none"?null:{desktop:o,phone:t}}var YG={...Object.fromEntries([...hb].map(e=>[e,"a root position: sticky bar; an outer box becomes its sticky containing block and the pin collapses (the same fact every wrapper pass excludes it for, lib/content/section-surface)"])),HeroSlide:"a slide is a direct child of the Hero's transform track ([&>*]:basis-full); a wrapper would take its width, and the Hero already moves one slide in at a time",HeroGroup:"a slide box is placed by grid-item properties on its own root (--sf-hg-row, justify-self); a wrapper becomes the grid item and the box loses its anchor (lib/document/blocks/general/HeroGroup/meta)"},fpe=new Set(Object.keys(YG));var xk="_gEntrance";var Yn={none:"None",fade:"Fade",rise:"Rise",scale:"Scale",glide:"Glide",bounce:"Bounce",flip:"Flip",reveal:"Reveal",spin:"Spin"},mW={top:"Top",bottom:"Bottom",left:"Left",right:"Right"},hW={top:()=>Y(JG,{}),bottom:()=>Y(tW,{}),left:()=>Y(oW,{}),right:()=>Y(eW,{})},im="Entrance",gk=sc.filter(e=>e!=="none"),sm=e=>({any:[{field:ke.kind,in:e},{all:[{field:ke.kind,set:!1},{field:nc,in:e}]}]}),bk=e=>({any:[{field:jt(ke.kind),in:e},{all:[{field:jt(ke.kind),set:!1},sm(e)]}]}),xW=[[[ke.from],sm(Ik)],[[jt(ke.from)],bk(Ik)],[[ke.duration,ke.delay],sm(gk)],[[jt(ke.duration),jt(ke.delay)],bk(gk)]],bt=({children:e})=>Y("svg",{viewBox:"0 0 40 40",width:"40",height:"40",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:e}),Wo=({x:e=12,y:o=12,o:t=1})=>Y("rect",{x:e,y:o,width:"16",height:"16",rx:"2",opacity:t}),IW={none:Y(bt,{children:Y(Wo,{})}),fade:yt(bt,{children:[Y(Wo,{x:6,o:.3}),Y(Wo,{x:18})]}),rise:yt(bt,{children:[Y(Wo,{y:20,o:.3}),Y(Wo,{y:8}),Y("path",{d:"M20 36v-5m-2 2 2-2 2 2"})]}),scale:yt(bt,{children:[Y("rect",{x:"16",y:"16",width:"8",height:"8",rx:"1",opacity:".35"}),Y(Wo,{}),Y("path",{d:"M6 6l4 4M34 34l-4-4"})]}),glide:yt(bt,{children:[Y(Wo,{x:2,o:.3}),Y(Wo,{x:20}),Y("path",{d:"M4 33h12m-2-2 2 2-2 2"})]}),bounce:yt(bt,{children:[Y(Wo,{y:6}),Y("path",{d:"M8 34c3-6 5-6 8 0s5 6 8 0 5-6 8 0"})]}),flip:yt(bt,{children:[Y("path",{d:"M12 12l16 4v8l-16 4z",opacity:".35"}),Y(Wo,{}),Y("path",{d:"M20 4v32",strokeDasharray:"2 2"})]}),reveal:yt(bt,{children:[Y("rect",{x:"12",y:"12",width:"16",height:"16",rx:"2",strokeDasharray:"2 2",opacity:".5"}),Y("path",{d:"M12 22h16v4a2 2 0 0 1-2 2H14a2 2 0 0 1-2-2z",fill:"currentColor",opacity:".35"}),Y("path",{d:"M20 36v-5m-2 2 2-2 2 2"})]}),spin:yt(bt,{children:[Y(Wo,{}),Y("path",{d:"M33 14a14 14 0 0 1 0 12m0 0-3-1m3 1 1-3"})]})};function gW({kind:e}){let{attrs:o}=dW(uW(e,wk));return yt("span",{className:"sf-entrance-pic",children:[Y("span",{className:"sf-entrance-stage",children:Y("i",{...o,children:IW[e]})}),Y("span",{className:"sf-entrance-cap",children:i(Yn[e])})]})}var bW=(e,o)=>{let t=o.querySelector(".sf-entrance-stage > i");t&&fW(t)},yW={width:"3.5rem",height:"4.25rem"};function kk({value:e,onChange:o}){return Y(pW,{label:i(im),value:e,emptyValue:"none",columns:3,cell:yW,onChange:o,onPreview:bW,tooltips:!1,options:sc.map(t=>({value:t,label:i(Yn[t]),icon:Y(gW,{kind:t})}))})}var lm="Effect",vk=e=>e==="none"?void 0:i(Yn[e]);function SW({value:e,onChange:o}){let t=It(),r=Vn({...t,[ke.kind]:e},"desktop").kind;return Y(yk,{label:i(lm),icon:Y(Sk,{}),value:vk(r),children:Y(kk,{value:r,onChange:o})})}function CW({value:e,onChange:o}){let t=It(),r=typeof e=="string"&&sc.includes(e),a=Vn(t,"desktop").kind;return Y(yk,{label:i(lm),icon:Y(Sk,{}),value:vk(r?e:a),changed:r,action:Y(XG,{words:Q()?.panel,label:i(lm),changed:r,detail:i("{value} on desktop",{value:i(Yn[a])}),onReset:()=>o(void 0)}),children:Y(kk,{value:r?e:a,onChange:o})})}var Tk={type:"select",label:im,options:sc.map(e=>({value:e,label:Yn[e]}))},wW=()=>Ck({type:"custom",render:({value:e,onChange:o})=>Y(SW,{value:e,onChange:o})},Tk),kW=()=>Ck({type:"custom",render:({value:e,onChange:o})=>Y(CW,{value:e,onChange:o})},Tk),vW=iW.map(e=>({label:mW[e],value:e,picture:hW[e]()}));function St(){let{duration:e,delay:o}=cW.entrance,t={[xk]:sW(im),[ke.kind]:Ra("desktop",wW()),[nc]:nW({type:"custom",render:()=>Y(aW,{})},"always"),[jt(ke.kind)]:Ra("mobile",kW()),...lW(ke.from,ha("From",Y(QG,{}),vW,wk)),[ke.duration]:Ra("desktop",am("entrance")),[jt(ke.duration)]:Ra("mobile",di({label:"Duration",desktopKey:ke.duration,icon:Y(rW,{}),min:e.min,max:e.max,step:e.step,fallback:e.default,unit:"s"})),[ke.delay]:Ra("desktop",nm("entrance")),[jt(ke.delay)]:Ra("mobile",di({label:"Delay",desktopKey:ke.delay,icon:Y(ZG,{}),min:o.min,max:o.max,step:o.step,fallback:o.default,unit:"s"}))};return ff(t,xW)}import{DESIGN_GROUPS as dm,SETTINGS_BUCKETS as EW}from"efficient-easel/panel";import{BUCKET_KEY as bo,DESIGN_GROUP_KEY as Xn}from"efficient-easel/screen/lib/document/field-buckets";var Zn=EW;var OW="Editor only \u2014 not shown live",fm={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel \xB7 actions":"Content","Right panel \xB7 choices":"Content","Right panel \xB7 form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","\u201COther\u201D reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[OW]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},Ok={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},Fk={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function cm(e,o,t){let r=`${e}.${o}`;return Fk[r]??Ok[r]??fm[t]}function _k(e){return e==="Animation"?[bo.Animation]:[bo.Design,Xn[e]]}function lc(...e){let o=[];for(let t of e)for(let r of Object.values(t)){let a=Ek(r),n=xt(a?a.inner:r),s=n?fm[n.label]:void 0;if(s)for(let l of _k(s))o.includes(l)||o.push(l)}return o}var Hpe=[...lc(Jl({tablet:!0}),fi("full"),ui(),pi(),Eu()),...Object.keys(Jl({tablet:!0})),...Object.keys(fi("full")),...Object.keys(ui()),...Object.keys(pi()),...Object.keys(Eu())],Gpe=[...lc(li()),...Object.keys(li())],Wpe=[...lc(ci()),...Object.keys(ci())],zpe=[...lc(St()),...Object.keys(St())],FW=Object.keys(_S()),_W=new Set(["cardImage","imageBackground"]),Upe=[..._k(cm("ProductGrid","_gCards","Cards")??"Design"),...FW.filter(e=>e.startsWith("_g")||_W.has(e))],$pe=Object.keys(RS()),jpe=Object.keys(AS()),RW={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) \u2014 the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) \u2014 the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},Rk={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},Ak={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{let e={...Jl({tablet:!0}),...fi("full"),...ui(),...pi(),...li(),...ci(),...St()};for(let o of Object.keys(Ak)){let t=xt(e[o]),r=t?fm[t.label]:void 0;if(!t||t.level!==2||!r||!Rk[r].includes(t.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${o}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale \u2014 a list that quietly matches nothing is worse than no list.`)}}var AW=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),LW=new Map([[bo.Design,"Content"],[bo.Animation,"Animation"],...dm.map(e=>[Xn[e],e])]);function Lk(e){let o=new Set([...Object.values(bo),Xn.Content]);for(let[t,r]of Object.entries(e))if(!o.has(t)&&xt(r)?.level===1)return 1;return 2}function BW(e){let o=`${e}.`;return Object.keys(RW).filter(t=>t.startsWith(o)).map(t=>t.slice(o.length))}function DW(e,o){let t=Ek(e),r=TW(o);return t?PW(t.tier,r):r}function NW(e,o){let t=xt(o);return t?e==="Content"||e==="Animation"?bS(o,t.label):yS(o):o}function Pk(e){return e==="Design"?dm:["Animation"]}function Bk(e,o){let t=[],r=new Set(BW(o)),a=new Set,n=!1,s=null;for(let[p,x]of Object.entries(e)){let g=xt(x);if(AW.has(p))throw new Error(`${o}.${p}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design \xB7 Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g\u2026\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);let y=LW.get(p);if(y!==void 0){if(g?.level!==1)throw new Error(`${o}.${p}: that key is reserved for the ${y} heading of the settings panel, but this field is ${g?`a level-${g.level} "${g.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(p===bo.Design||p===bo.Animation)&&(n=!0),t.push(s={place:y,entries:[],adopted:!0});continue}if(!g){s||t.push(s={place:"Content",entries:[]}),s.entries.push([p,x]);continue}if(r.has(p)||p in Ak){let O=cm(o,p,g.label);if(g.level!==2||!O||!Rk[O].includes(g.label))throw new Error(`${o}.${p}: ${r.has(p)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${g.level} "${g.label}" header in the ${O??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired \u2014 anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);r.has(p)&&a.add(p),t.push(s={place:O,entries:[]});continue}let E=cm(o,p,g.label);if(!E)throw new Error(`${o}.${p}: the inspector group "${g.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...dm,"Animation"].join(" / ")} its controls belong under. Classify it \u2014 an unclassified group silently lands wherever it was declared, which is the whole bug.`);t.push(s={place:E,entries:[[p,g.level===2?x:DW(x,g.label)]]})}let l=new Set(Object.entries(e).filter(([,p])=>xt(p)).map(([p])=>p));for(let[p,x]of[["BLOCK_KEY_GROUP",Fk],["KEY_GROUP",Ok]]){let g=Object.keys(x).filter(y=>y.startsWith(`${o}.`)).filter(y=>!l.has(y.slice(o.length+1)));if(g.length)throw new Error(`${o}: ${p} (lib/document/field-groups.ts) lists ${JSON.stringify(g)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key \u2014 an override that quietly matches nothing is worse than no override.`)}let c=n?[]:[...r].filter(p=>!a.has(p));if(c.length)throw new Error(`${o}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(c)}, but this section has no such fold header${c.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section \u2014 a list that quietly matches nothing is worse than no list.`);let d=new Set(t.filter(p=>p.entries.length>0).map(p=>p.place)),u=Zn.filter(p=>Pk(p).some(x=>d.has(x))),h={};for(let p of u){h[bo[p]]=si(p,p===u[0]?u:null);for(let x of Pk(p)){if(!d.has(x))continue;let g=t.filter(E=>E.place===x),y=g.findIndex(E=>E.adopted);y>0&&g.unshift(...g.splice(y,1)),p==="Design"&&(h[Xn[x]]=ku(x));for(let E of g)for(let[O,C]of E.entries)h[O]=NW(x,C)}}return h}function Kpe(e){return bo.Design in e?e:{[bo.Design]:si("Design",null),[Xn.Content]:ku("Content"),...e}}function qpe(e){return Zn.some(o=>bo[o]in e)}function Vpe(e){let o=Zn.filter(r=>bo[r]in e);if(o.length===0)return e;let t={...e};for(let r of o)t[bo[r]]=si(r,r===o[0]?o:null);return t}import{jsx as MW}from"react/jsx-runtime";import{EmptyState as HW}from"efficient-shell/ui";function Rr(){return MW(HW,{variant:"none",icon:!1,message:i("These settings apply to every view.")})}import{usePreviewDevice as qW}from"efficient-easel/draw/client";import{deviceField as VW}from"efficient-easel/screen/lib/document/device-fields";var ic=" text",Dk="Text";function Jn(e){let o=e.rows.filter(t=>t.shown);return o.length===0||o.length===1&&o[0].labelled}function Nk(e){return e.filter(Jn).map(o=>o.key)}function Mk(e,o){let t=e.filter(a=>!Jn(a));if(t.length!==1)return null;let r=e.filter(Jn).flatMap(a=>a.rows);return[...o,...r].some(a=>a.shown)?null:t[0].rows.filter(a=>a.shown).length>1?t[0].key:null}function Hk(e,o){let t=null;for(let r of o){let a=e[r];!a||a.marker!==!0||typeof a.fold!="string"||(t??={...e},t[r]={...a,fold:!1})}return t??e}function Gk(e,o){if(e.size!==o.size)return!1;for(let t of e)if(!o.has(t))return!1;return!0}var mm=new Map,dc=new Set;function $k(e,o){let t=new Map;for(let a of e.querySelectorAll(".es-insp-row[data-field]"))t.set(a.getAttribute("data-field")??"",a);let r=[];for(let[a,n]of o)r.push({key:a,rows:n.map(s=>{let l=t.get(s),c=!!l&&[...l.children].some(u=>!u.hidden),d=l?.querySelector(".es-field-label, .es-list-label")?.textContent?.trim();return{shown:c,labelled:c&&!!d}})});return r}var YW=Object.fromEntries(Zn.map(e=>{let o=gS[e];return[e,Ar(o,{},e)]})),jk=zW(null),XW={_partBody:VW("each",{type:"custom",render:()=>Ar(ZW,{})})};function ZW(){return Ar(GW,{children:UW(jk)})}function rt({entries:e,entryCount:o=0,part:t=null,omit:r,motion:a,body:n}){let{id:s,fields:l,values:c,readOnly:d,onChange:u}=$W(),h=cc(()=>a?{...c,...a.values}:c,[c,a?.values]),p=(le,Le)=>a?.keys.has(le)?a.onChange(le,Le):u(le,Le),x=qW(),{appState:g,config:y}=Uk(le=>le),E=YI(x,y,g.data.content??[],g.ui.itemSelector),O=n===void 0?zw(l,t):XW,C=cc(()=>{let le=r?.length?Object.fromEntries(Object.entries(O).filter(([Le])=>!r.includes(Le))):O;return a?{...le,...a.fields}:le},[O,r,a?.fields]),I=pf(C,h,E),[w,v]=um(()=>new Set(dc)),[k,R]=um(()=>new Set),B=zk(null),{bandRows:P,designBands:_,looseRows:N}=cc(()=>{let le=new Map,Le=new Set,po=[];for(let _e of pm(I).rows){if(!_e.fold){_e.bucket==="Design"&&po.push(_e.name);continue}let ze=le.get(_e.fold.key)??[];ze.push(_e.name),le.set(_e.fold.key,ze),_e.bucket==="Design"&&Le.add(_e.fold.key)}return{bandRows:le,designBands:Le,looseRows:new Map([["",po]])}},[I]),b=jW({},x),F={key:ic,rows:Array.from({length:b?o:0},()=>({shown:!0,labelled:!0}))};Wk(()=>{let le=B.current?.parentElement;if(!le)return;let Le=$k(le,P),po=new Set(Nk(Le)),_e=Mk([F,...Le.filter(ze=>_.has(ze.key))],$k(le,N)[0].rows);_e&&po.add(_e),R(ze=>Gk(ze,po)?ze:po)});let A=cc(()=>Hk(I,k),[I,k]),H=!Jn(F)&&!k.has(ic)?{key:ic,title:Dk}:void 0,z=Uk(le=>le.selectedItem)!==null,Z=a?.part??t??"",j=`${s}:${Z}:${String(x)}`,[Ae,ge]=um(()=>({tab:mm.get(j)})),Ye=`${s}:${Z}`,We=zk(null),Pe={...E,node:h},ue=pm(I,{values:h,context:Pe}).buckets,Ce=sk({allTabs:z,remembered:mm.get(j),inherited:We.current?.panel===Ye?We.current.tab:Ae.tab,buckets:ue,hasText:b&&o>0}),Qe=!b&&!ue.includes(Ce)&&(pm(pf(C,h,{...E,device:"desktop"}),{values:h,context:{...Pe,device:"desktop"}}).buckets.includes(Ce)||Ce==="Design"&&o>0);Wk(()=>{We.current={panel:Ye,tab:Ce}});let so=Ce==="Design";return Ar(jk.Provider,{value:n??null,children:Ar(Pu.Provider,{value:a?h:null,children:WW(KW,{fields:A,values:h,onChange:p,readOnly:d,allTabs:z,showWhenContext:Pe,tab:Ce,onTab:le=>{mm.set(j,le),ge({tab:le})},tabIcons:YW,idPrefix:s,ariaLabel:i("Section settings"),lead:so?e:null,leadFold:H,closedFolds:w,onFold:(le,Le)=>{Le?dc.delete(le):dc.add(le),v(new Set(dc))},children:[Ar("span",{ref:B,hidden:!0}),Qe&&Ar(Rr,{})]})})})}import{useMemo as fz}from"react";import{useEasel as uz}from"efficient-easel/easel";import{useSectionOps as pz}from"efficient-easel/screen/lib/document/use-section-ops";import{jsx as JW}from"react/jsx-runtime";import{HoverIcon as QW}from"efficient-easel/icons";import{group as ez}from"efficient-easel/screen/lib/document/box-fields";var Aa="hover",hm=Zs.filter(e=>e==="none"||e==="lift");function Kk(e){let o=e[Aa];return hm.includes(o)?o:"none"}var oz="_gHover",tz="What this does when a shopper points at it, or taps it on a phone.";function qk(){return{[oz]:ez("Hover"),[Aa]:{...ha("Hover effect",JW(QW,{}),hm.map(e=>({label:Pn[e],value:e})),"none"),description:tz}}}import{jsx as Vk}from"react/jsx-runtime";import{DirectionIcon as rz,LoopIcon as az}from"efficient-easel/icons";function xm(){return OS("Scroll direction",tm,qn,"A marquee cannot run diagonally, so the corners are not answers.",Vk(rz,{}),ES)}function Yk(){return{loop:Do("Loop",Vk(az,{}),om,em),scrollDirection:Oo(xm(),ec),loopDuration:Oo(oc({readsSpeed:!1}),ec),loopDelay:Oo(tc(),ec)}}function Xk(e){switch(e){case"section":case"block":return St();case"box":return{...St(),...Yk()};case"textPart":return{...St(),...qk()};case"marquee":return{...St(),scrollDirection:xm(),loopDuration:oc({readsSpeed:!0}),loopDelay:tc()}}}import{phoneKey as nz}from"efficient-easel/draw";import{ENTRANCE_STATE_ATTR as sz,entranceAttrs as lz}from"efficient-shell/format";var Jk={},Im="_partMotion",gm=[...Object.values(ke).flatMap(e=>[e,nz(e)]),Aa];function $me(e){return Sa(e,Im)}function bm(e,o){return _i(e,Im,o)}var iz=new Set([ke.kind,Aa]);function Qk(e,o,t,r){let{[t]:a,...n}=bm(e,o),s=r==null||r===""||r==="none"&&iz.has(t)?n:{...n,[t]:r};return Ri(e,Im,o,Object.keys(s).length?s:null)}function ym(e){return{entrance:hk(e),hover:Kk(e)}}function ev(e){let o=ym(e);return o.entrance!==null||o.hover!=="none"}function ov(e,o){let{attrs:t,style:r}=lz(o),a=Object.keys(t).filter(n=>t[n]!==void 0);for(let n of a)e.setAttribute(n,String(t[n]));for(let[n,s]of Object.entries(r))e.style.setProperty(n,String(s));return()=>{for(let n of a)e.removeAttribute(n);for(let n of Object.keys(r))e.style.removeProperty(n);e.removeAttribute(sz)}}var cz=4;function tv(e){let o;for(let t of e)(!o||t.element.compareDocumentPosition(o.element)&cz)&&(o=t);return o}var dz="data-sf-part-host";function rv(e){let o=e?.ownerDocument.defaultView,t=e;for(;t&&!t.hasAttribute(dz)&&!t.classList.contains(ac);){let r=o?.getComputedStyle(t).display??"";if(r==="contents")return null;if(r!=="inline")return t;t=t.parentElement}return null}var fc="data-sf-part-lift",Zk="sf-part-lift";function av(e){if(e.getElementById(Zk))return;let o=e.createElement("style");o.id=Zk,o.textContent=vC(`[${fc}]`).join(`
|
|
6
|
+
`),e.head.appendChild(o)}var nv=new Map,mz=e=>{let o=nv.get(e);return o||nv.set(e,o=Bk(Xk(e),`part:${e}`)),o},hz=new Set(gm);function La(e,o,t){let{getItemById:r,getSelectorForId:a}=uz(u=>u),n=pz(),s=r(e)?.props??{},l=bm(s,o),c=JSON.stringify(l),d=fz(()=>Object.fromEntries(gm.map(u=>[u,l[u]])),[c]);return{part:o,fields:mz(t),values:d,keys:hz,onChange:(u,h)=>{let p=a(e),x=r(e);if(!p||!x)return;let g=Qk(x.props??{},o,u,h);n.replaceComponent(p.zone,p.index,{...x,props:g})}}}import{Fragment as xz,createElement as Iz}from"react";import{deviceField as Sm}from"efficient-easel/screen/lib/document/device-fields";var ao=()=>({type:"custom",render:()=>Iz(xz)});var Cm={words:ao(),sourceNote:ao(),style:ao(),font:ao(),italic:ao(),fontSize:Sm("each",ao()),lineHeight:ao(),letterSpacing:ao(),paragraphSpacing:ao(),padding:ao(),align:Sm("each",ao()),letterCase:ao(),fixedSizeHint:Sm("each",ao()),regionNote:ao(),regionStyle:ao()},sv={showTicker:ao(),items:ao()};var Ez="root:default-zone";function lv({heroId:e}){let{appState:o,dispatch:t}=Cz(x=>x),r=o.data.content??[],a=r.findIndex(x=>x.props.id===e),n=a>=0?r[a]:null,s=n?n.props.showTicker??!0:!0,l=Sz(()=>{let x=n?.props.tickerItems;return Array.isArray(x)?x:ak.map(g=>({text:g}))},[n]),c=yz(),d=Pz(),u=x=>Tz(sv[x],d),h=La(e,nk,"block");if(!n)return Lr("p",{className:"sf-note",children:i("This ticker\u2019s hero is no longer on the page.")});let p=x=>t({type:"replace",destinationZone:Ez,destinationIndex:a,data:{...n,props:{...n.props,...x}}});return Lr(rt,{motion:h,body:bz(gz,{children:[!u("showTicker")&&!u("items")&&Lr(Rr,{}),u("showTicker")&&Lr(wz,{label:i("Show ticker"),labelId:c,icon:Lr(vz,{}),action:Lr(kz,{checked:s,onChange:x=>p({showTicker:x}),ariaLabelledBy:c})}),u("items")&&Lr(Fu,{label:Ou.label,icon:Ou.icon,items:l,placeholder:"item",onChange:x=>p({tickerItems:x}),markup:!0})]})})}import{jsx as V,Fragment as is,jsxs as ko}from"react/jsx-runtime";import{useContext as TU,useEffect as Lm,useRef as PU,useState as o0}from"react";import{FieldSelect as EU,InspectorField as OU,fieldShownInView as FU}from"efficient-easel/fields";import{SettingsField as _U}from"efficient-easel/panel";import{InspectorUpLevel as Cc}from"efficient-easel/chrome";import{StylesIcon as RU,TypeIcon as AU}from"efficient-easel/icons";import{useEasel as LU}from"efficient-easel/easel";import{TextPartPanel as BU}from"efficient-easel/copy";import{Button as DU,IconButton as NU,Tooltip as MU}from"efficient-shell/ui";import{jsx as Bv,jsxs as rU}from"react/jsx-runtime";import{COPY_CELLS as ts,CopyBox as aU}from"efficient-easel/copy";import{PaddingYIcon as nU}from"efficient-easel/icons";import{useSyncExternalStore as Yz}from"react";import{isNodeList as Oz}from"efficient-easel/data";var wm="template",cv="Card template",Fz=["Text","ImageBlock","ButtonBlock","Flex"],uc="rowField",_z="rowLinkField";function bhe(){return{type:"slot",allow:[...Fz]}}var Rz=[{block:"OrderSummary",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]}],iv=Symbol.for("efficient.card-templates");function Br(){let e=globalThis,o=e[iv];return o||(o=new Map(Rz.map(t=>[t.block,t])),e[iv]=o),o}function yhe(e){for(let o of e){if(typeof o.block!="string"||!o.block)throw new Error("A card template names no block.");let t=[];for(let r of o.blocks??[]){if(typeof r?.type!="string"||!r.type)throw new Error(`The card template of ${o.block} names an empty block.`);t.some(a=>a.type===r.type)||t.push({type:r.type,label:r.label||r.type})}Br().set(o.block,{block:o.block,fields:o.fields.map(r=>({...r})),blocks:t})}}function dv(){for(let e of Br().values())if(e.blocks?.length)return!0;return!1}function fv(e){return Br().get(e)?.blocks??[]}function She(e){for(let o of Br().values())if(o.blocks?.some(t=>t.type===e))return!0;return!1}function km(e){return typeof e=="string"&&Br().has(e)}function Che(e,o){let t=Br().get(e)?.fields??[];return o?t.filter(r=>(r.kind??"text")===o):t}function whe(e,o){return e?Br().get(e)?.fields.find(t=>t.key===o)??null:null}function Ba(e,o=uc){let t=e?.[o];return typeof t=="string"?t.trim():""}function khe(e){let o={};if(e&&typeof e=="object"&&!Array.isArray(e))for(let[t,r]of Object.entries(e))typeof r=="string"&&(o[t]=r);return o}var uv={Text:{text:uc},ImageBlock:{src:uc},ButtonBlock:{label:uc,href:_z}};function pv(e,o,t){let r=uv[e]?.[t];return!!(r&&Ba(o,r))}function Az(e,o){return!o||!e?null:e[o]??""}function vhe(e,o,t){if(!t)return o;let r=null;for(let[a,n]of Object.entries(uv[e]??{})){let s=Az(t,Ba(o,n));s!==null&&(r??={...o},r[a]=s)}return r??o}function mv(e,o){let t=e?.data?.content;if(!Array.isArray(t)||typeof o!="string")return;let r=(n,s)=>{for(let l of n){if(l?.props?.id===o)return s;for(let[c,d]of Object.entries(l?.props??{})){if(!Oz(d))continue;let u=c===wm&&km(l.type)?{owner:l,direct:!0}:s&&{owner:s.owner,direct:!1},h=r(d,u);if(h!==void 0)return h}}},a=r(t,null);return a===void 0?null:a}function hv(e,o){let t=mv(e,o);return t&&t.owner}function The(e,o){let t=mv(e,o);return t&&(t.direct?t.owner:null)}import{isNodeList as mc}from"efficient-easel/data";var pc="dataSource";var Lz="dataRows",Dr="countKey",Qn="counts",Bz=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,Dz=Symbol.for("efficient.block-sources");function es(){let e=globalThis;return e[Dz]??={sources:new Map,revision:0}}var Nz=e=>[e?.key,e?.label,e?.value].every(o=>typeof o=="string"&&o.trim()!=="");function Mz(e){if(typeof e.key!="string"||!Bz.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(o=>typeof o!="string"||!o))throw new Error(`The block source ${e.key} names no block it can fill.`);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(o=>Iv(o)).filter(o=>o!==null)}:{},...Array.isArray(e.choices)?{choices:e.choices.filter(Nz)}:{}}}function Ohe(e){let o=e.map(Mz),t=es();for(let r of o)t.sources.set(r.key,r);o.length&&(t.revision+=1)}function Fhe(e){let o=[...es().sources.values()];return e===void 0?o:o.filter(t=>t.blocks.includes(e))}function Hz(e){return es().sources.get(e)??null}function xv(e){return es().sources.get(e)?.choices??[]}function _he(){return es().revision}function Nr(e){let o=e?.[pc];return typeof o=="string"?o.trim():""}function Iv(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let o={};for(let[t,r]of Object.entries(e)){let a=we(r);a&&(o[t]=a)}return Object.keys(o).length?o:null}function Gz(e){let o=e?.[Lz];return Array.isArray(o)?o.map(Iv).filter(t=>t!==null):null}function Rhe(e,o,t=[]){let r=Gz(e);if(r!==null&&(r.length||!o))return{rows:r,sample:!1};if(!o)return{rows:[],sample:!1};let a=Hz(Nr(e))?.sample;return{rows:a?.length?a:t,sample:!0}}var gv="Flex";function os(e){if(Ba(e))return"";let o=e?.[Dr];return typeof o=="string"?o.trim():""}var Wz=new Intl.NumberFormat("en-US");function zz(e){return/^\d+$/.test(e)?Wz.format(Number(e)):e}function Nhe(e,o){let t=o?o.find(r=>r.key===e)?.value:xv(Qn).find(r=>r.key===e)?.value;return t===void 0?null:zz(t)}function vm(e){let o=e.props;if(!o)return{node:e,names:!1};let t=e.type==="Text"&&os(o)!=="",r=o;for(let[n,s]of Object.entries(o)){if(!mc(s))continue;let l=s.map(vm);l.some(c=>c.names)&&(t=!0),l.some((c,d)=>c.node!==s[d])&&(r={...r,[n]:l.map(c=>c.node)})}if(e.type!==gv)return{node:r===o?e:{...e,props:r},names:t};let a=Nr(r);if(t&&!a&&(r={...r,[pc]:Qn}),!t&&a===Qn){let{[pc]:n,...s}=r;r=s}return{node:r===o?e:{...e,props:r},names:!1}}function bv(e,o,t){for(let r of e){if(r?.props?.id===o)return t;for(let a of Object.values(r?.props??{})){if(!mc(a))continue;let n=bv(a,o,r.type===gv?r:t);if(n!==void 0)return n}}}function Mhe(e,o){if(!mc(e))return!0;let t=bv(e,o,null);if(t===void 0)return!0;if(t===null)return!1;let r=Nr(t.props);return!r||r===Qn}function yv(e){let o=e?.content;if(!mc(o))return e;let t=o.map(vm);return t.every((r,a)=>r.node===o[a])?e:{...e,content:t.map(r=>r.node)}}function Sv(e){return vm(e).node}import{decodePartId as Xz}from"efficient-easel/draw";function Da(e,o){let t=Ti(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?FS(t,o.index):null:$u(e)?.[o.rowKey]??null}function hc(e,o,t){let r=e.node.props,{key:a,row:n}=Ho(e.propKey),s=n?lC(r,a,n,e.kind,o):nC(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}import{readHidable as kv}from"efficient-easel/draw";import{isNodeList as Uz}from"efficient-easel/data";var Na=e=>String(e+1).padStart(2,"0");var vv="Contents",$z="Flex",Cv="Text",exe="_contentsEntries",oxe="_kickerNumber",Tv="data-sf-kicker-number",jz=e=>kv(e).text.trim(),Pv=e=>ug(e?.anchor),wv=e=>String(e.props?.id??""),Kz=e=>!kv(e.props?.text).hidden&&!os(e.props)&&!Ba(e.props);function Tm(e){return Object.values(e.props??{}).filter(Uz)}function Ev(e){for(let o of Tm(e))for(let t of o){if(t.props?._hidden)continue;if(t.type===Cv&&Kz(t))return t;if(t.type===Cv)continue;let r=Ev(t);if(r)return r}}function Ov(e){return Tm(e).some(o=>o.some(t=>t&&!t.props?._hidden&&(t.type===vv||Ov(t))))}function qz(e){let o=[],t=r=>{for(let a of r)if(!(!a||a.props?._hidden)){if(a.type===vv){o.push({contents:a,sections:[]});continue}if(a.type===$z&&Pv(a.props)&&o.length&&!Ov(a)){o[o.length-1].sections.push({box:a,kicker:Ev(a)});continue}for(let n of Tm(a))t(n)}};return t(e),o}function Vz(e){return e.map(o=>({label:o.kicker?pr(jz(o.kicker.props?.text)):"",anchor:Pv(o.box.props)}))}function txe(e){let o=e?.length?qz(e):[];if(!o.length)return null;let t=new Map,r=new Map;for(let a of o){let n=wv(a.contents);n&&t.set(n,Vz(a.sections)),a.sections.forEach((s,l)=>{let c=s.kicker?wv(s.kicker):"";c&&r.set(c,Na(l))})}return{entries:t,numbers:r}}var rxe=e=>`${e} \xB7 `;var Zz=`[${Tv}]`,Jz=["bold","italic","underline","strike","link","sup","sub"],Qz=["bullet","number"];function Om(e,o){return e?[...Jz,...o?Qz:[]]:[]}function Fv(e,o){let t=Xz(e);if(!t?.propKey)return null;let{nodeId:r,propKey:a}=t,n=o.getItemById(r),s=o.getSelectorForId(r);if(!n||!s)return null;let{key:l,row:c}=Ho(a),d=o.components[n.type]?.fields?.[l],u=c?Da(d,c):d,h=ga(u);if(!h)return null;let p=n.props??{};if(Xf(p)!==null||!c&&pv(n.type,p,l)||n.type==="Text"&&l==="text"&&os(p)||c&&!(Array.isArray(p[l])&&c.index<p[l].length))return null;let x=c?On(p[l],c):p[l];return{node:n,selector:s,propKey:a,kind:h,stored:x,offPage:ni(u)}}function _v(e,o){let t=Fv(e,o);if(!t)return null;let{text:r,hidden:a}=Wt(t.stored);if(!Vu({offPage:t.offPage,hidden:!!a}))return null;let n=ki(t.kind);return{partId:e,value:r,rules:ur,multiline:n,skip:Zz,offered:Om(t.kind!=="plainText",n),write:s=>{let l=Fv(e,o);l&&hc({node:l.node,propKey:l.propKey,kind:l.kind,zone:l.selector.zone,index:l.selector.index},s,o.replace)}}}function Rv(e,o,t){return e?.isConnected&&e.getAttribute(Go)===t?e:o?.querySelector(`[${Go}="${eU(t)}"]`)??null}function eU(e){return e.replace(/["\\]/g,"\\$&")}function Av(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var Pm=null,Em=new Set;function oU(){return Pm}function Fm(e){if(e!==Pm){Pm=e;for(let o of Em)o()}}function tU(e){return Em.add(e),()=>{Em.delete(e)}}function Lv(){return Yz(tU,oU,()=>null)}var sU=["left","center","right","justify"];function _m(e,o,t,r="desktop"){let a=Rn(e),n=r==="mobile",s=(n?e.sizePhone:void 0)??e.size??o.sizePx;return[n?{...ts.fontSize,key:"fontSize",value:e.sizePhone,styleValue:Math.round(o.sizePx),onChange:l=>t({sizePhone:l??null})}:{...ts.fontSize,key:"fontSize",value:e.size,styleValue:Math.round(o.sizePx),onChange:l=>t({size:l??null})},{...ts.lineHeight,key:"lineHeight",value:a.lineHeight,styleValue:o.lineRatio,onChange:l=>t(l===void 0?{lineHeight:null,line:null}:{lineHeight:l})},{...ts.letterSpacing,key:"letterSpacing",scale:s,value:a.letterSpacingEm,styleValue:o.letterEm,onChange:l=>t(l===void 0?{letterSpacing:null,letter:null}:{letterSpacing:l})},{...ts.paragraphSpacing,key:"paragraphSpacing",value:e.paragraphSpacing,styleValue:0,onChange:l=>t({paragraphSpacing:l??null})},{key:"padding",name:i("Padding"),icon:Bv(nU,{}),unit:"px",step:op,shiftStep:10,min:Qu,max:ep,value:e.padding,styleValue:o.paddingPx,onChange:l=>t({padding:l??null})}]}function Dv({text:e,onTextChange:o,multiline:t,markup:r=!0,styled:a=!0,style:n,base:s,setValue:l,colors:c,placeholder:d,ariaLabel:u,head:h,typedOnCanvas:p=!1}){let x=_m(n,s,l),g=Om(r,t);return rU("div",{className:"sf-part-textbox",children:[h,Bv(aU,{value:e,onChange:o,multiline:t,placeholder:d,ariaLabel:u,rules:ur,tools:g,barShows:p?"focus":"always",colors:r?c:[],align:a?{value:n.align??s.align,allow:sU,onChange:y=>l({align:y})}:void 0,letterCase:a?{value:n.case==="capitalize"?"":n.case??"",onChange:y=>l({case:y||null})}:void 0,cells:a?x:void 0})]})}import{UiIcon as t0}from"efficient-easel/draw/client";import{jsx as xc,Fragment as lU,jsxs as iU}from"react/jsx-runtime";import{Button as Nv,Dialog as cU}from"efficient-shell/ui";function Mv({styleName:e,onCancel:o,onConfirm:t}){return xc(cU,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:i("Update {style}?",{style:e}),footer:iU(lU,{children:[xc(Nv,{variant:"secondary",onClick:o,children:i("Cancel")}),xc(Nv,{variant:"primary",onClick:t,children:i("Update style")})]}),children:xc("p",{children:i("Every text on the site that follows {style} changes to look like this one. This text\u2019s own changes are cleared, and it keeps following {style}.",{style:e})})})}import{ScreenDocumentContext as HU}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewDevice as GU}from"efficient-easel/draw/client";import{shownTier as Bm}from"efficient-easel/screen/lib/document/device-fields";import{jsx as dU}from"react/jsx-runtime";import{createContext as fU,useContext as uU,useMemo as pU,useState as mU}from"react";var hU={partStyle:null,setPartStyle:()=>{}},Hv=fU(hU);function Axe({children:e}){let[o,t]=mU(null),r=pU(()=>({partStyle:o,setPartStyle:t}),[o]);return dU(Hv.Provider,{value:r,children:e})}function Gv(){return uU(Hv)}import{TEXT_FIELD_MARKER as WU}from"efficient-easel/draw";import{useSectionOps as zU}from"efficient-easel/screen/lib/document/use-section-ops";import{parseHexColor as xU}from"efficient-shell/format";var IU="#9ca3af";function gU(e){return gl.map(o=>({key:o,name:Ng[o],value:e?.[o]||IU}))}function Ic(e){return gU(e).map(o=>({name:o.key,label:i(o.name),value:o.value}))}function zv(e){let o={},t=e.ownerDocument,r=t?.defaultView;if(!t||!r)return o;let a=r.getComputedStyle(e),n=t.createElement("canvas").getContext("2d");for(let s of gl){let l=ut[s].replace(/^var\((--[\w-]+)\)$/,"$1"),c=a.getPropertyValue(l).trim();if(!c)continue;let d=Wv(c);!d&&n&&(n.fillStyle="#000000",n.fillStyle=c,d=Wv(String(n.fillStyle))),d&&(o[s]=d)}return o}function Wv(e){let o=e.trim().toLowerCase();if(o.startsWith("#"))return xU(o);let t=o.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return t?`#${t.slice(1,4).map(r=>Math.min(255,Number(r)).toString(16).padStart(2,"0")).join("")}`:null}var rs="@name",Uv="@body",$v="@value",Gxe={[rs]:"Name",[Uv]:"Body",[$v]:"Value"},bU={TimelineTrack:{"entries.date":rs,"entries.title":rs,"entries.blurb":Uv},Footprint:{"offices.city":rs},Stats:{"items.label":rs,"items.value":$v}};function yU(e){let{key:o,row:t}=Ho(e);return t?`${o}.${t.rowKey}`:null}function as(e,o){if(!e)return o;let t=yU(o);return t?bU[e]?.[t]??o:o}import{useEaselHost as UU}from"efficient-easel/screen/lib/host";function SU(e){let o=new Set([...Object.keys(Sl[e]??{}),...Cl[e]??[]]);for(let[t,r]of Object.entries(Rf[e]??{}))r.verb==="snapshot"&&o.add(t);return[...o].sort()}var CU={CollectionCard:"product",FooterMenu:"menu",Gallery:"product",GalleryItem:"product",ProductGrid:"product",ProductHero:"product",SpecTable:"product",Events:"blog",FeaturedCover:"blog",LongRead:"blog",SubscribeBlogs:"blog"},jv={product:"Synced from the product.",blog:"Synced from the blog post.",menu:"Synced from the site menu."},Kv="Open",qv={product:{type:"storefront-editor:open-product",needsSlug:!0},blog:{type:"storefront-editor:open-post",needsSlug:!0},menu:{type:"storefront-editor:open-menus",needsSlug:!1}};function ns(e){let o=e?.source?.slug;return we(o)}function ss(e){return CU[e]??null}function Vv(e,o){let t=ss(e);return t&&SU(e).includes(o)?t:null}function gc(e){let o=e?.menu?.id;return we(o)}var bc="data-sf-spec-region";function Yv(e,o,t){if(!e)return;let r=t[e];if(r)return{fontFamily:`var(--font-role-${e})`,fontSize:`var(--size-${r}, ${o.builtIn})`}}function Ma(e){let o=/var\(--size-[A-Za-z]+, ?([0-9.]+px)\)/.exec(e);if(!o)throw new Error(`builtInOf: no --size-* fallback in ${e}`);return o[1]}function Rm(e){return`@${e}`}function Am(e,o){if(!o.startsWith("@"))return null;let t=o.slice(1);return t in e?t:null}function wU(e,o){return o&&o in e?o:null}var ls={tag:"text-[length:var(--size-label,13px)]",name:"text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))]",namePhone:"max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",body:"text-[length:var(--size-body,14px)]",price:"text-[length:var(--size-label,15px)]",link:"text-[length:var(--size-label,14px)]"},kU={tag:{label:"Tag",follows:"Labels",builtIn:Ma(ls.tag),writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:Ma(ls.name),writable:!0},body:{label:"Body",follows:"Body",builtIn:Ma(ls.body),writable:!0},price:{label:"Price",follows:"Labels",builtIn:Ma(ls.price),writable:!0},link:{label:"Link",follows:"Labels",builtIn:Ma(ls.link),writable:!0}},Xv=kU;var vU={number:{label:"Number",follows:"Labels",builtIn:"14px",writable:!0},question:{label:"Question",follows:"Body",builtIn:"18px",writable:!0},answer:{label:"Answer",follows:"Body",builtIn:"15px",writable:!0}},Zv=vU;var yc={entry:{label:"Entry",follows:"Labels",builtIn:"13px",writable:!0},number:{label:"Entry number",follows:"Labels",builtIn:"13px",writable:!0}};var Qxe=bc,Jv={rowLabel:{label:"Spec row name",follows:"Labels",builtIn:"14px"},rowValue:{label:"Spec row value",follows:"Labels",builtIn:"14px"},diagramTitle:{label:"Diagram title",follows:"Labels",builtIn:"12px"},diagramCallout:{label:"Diagram measurement",follows:"Labels",builtIn:"12px"},diagramStatLabel:{label:"Diagram stat name",follows:"Labels",builtIn:"11px"},diagramStatValue:{label:"Diagram stat value",follows:"Labels",builtIn:"11px"}};var Qv={SpecTable:Jv,FAQ:Zv,Collections:Xv,Contents:yc};function e0(e){return e&&Object.hasOwn(Qv,e)?Qv[e]:null}function Nm(e){return e?i(e):null}function r0(e){return e.kind==="role"?Wd[e.role]:e.kind==="custom"?"Custom":null}function $U(e){let o=dt(e.role);return o?{kind:"role",role:o}:null}function jU(e,o){if(!e)return{kind:"unread"};let{faceRole:t,base:r}=e;if(o[t]===r.fontKey)return{kind:"role",role:t};let a=Object.keys(o).filter(n=>o[n]===r.fontKey);return a.length===1?{kind:"role",role:a[0]}:{kind:"custom"}}function Dm(e,o,t,r){return $U(Di(e,o))??jU(t,r)}function KU(e,o){if(!e.length)return null;let t=o(e[0]);return e.every(r=>o(r)===t)?t:null}var Sc="";function qU({face:e,base:o,onPick:t}){let r=e.kind==="role"?e.role:Sc,a=[{label:i("No style"),value:Sc},...tI.map(n=>({label:i(Wd[n]),value:n}))];return V(EU,{ariaLabel:i("Style"),value:r,options:a,inline:!0,onChange:n=>t(n===Sc?null:n),renderOption:n=>n.value===Sc?ko(is,{children:[V("span",{className:"es-fsel-label sf-part-style-keep",children:n.label}),V("span",{className:"sf-part-style-aside","aria-hidden":"true",children:i("Section\u2019s own")})]}):V("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${n.value})`},children:n.label}),renderValue:()=>V("span",{style:{fontFamily:o?.fontKey?`var(${Qr(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:Nm(r0(e))}),valueText:n=>Nm(r0(e))??n?.label??""})}var n0=["regionNote","regionStyle"],VU=Object.keys(Cm).filter(e=>!n0.includes(e));function s0(e,o){return!e.some(o)}function YU({sectionName:e,onBack:o,textEditor:t,styleRow:r,children:a,tabs:n}){let s=ko(is,{children:[t,r,a]});return ko("div",{className:"sf-part-panel",children:[V(Cc,{inline:!0,name:i(e),onSelect:o}),n?n(s):s]})}function wc({source:e,slug:o,menuId:t}){let r=UU(),a=qv[e],n=!a.needsSlug||!!o;return V("div",{className:"sf-note sf-note--source",children:ko("p",{className:"es-field-hint sf-hint-keep",children:[i(jv[e]),n?ko(is,{children:[" ",V(DU,{type:"button",variant:"link",size:"sm",onClick:()=>{a.type==="storefront-editor:open-menus"?r.send(a.type,{menuId:t??null}):o&&r.send(a.type,{slug:o})},children:i(Kv)})]}):null]})})}var a0=4,XU=120;function ZU({region:e,sizePx:o,face:t,base:r,onFollowStyle:a,source:n,slug:s,onBack:l,shows:c}){let d=e.follows;return ko("div",{className:"sf-note",children:[c("regionNote")&&ko(is,{children:[V("p",{children:V("strong",{children:i(e.label)})}),V("p",{children:o?i("Its size follows Styles \u25B8 {follows} \u2014 {px}px right now.",{follows:i(d),px:Math.round(o)}):i("Its size follows Styles \u25B8 {follows}.",{follows:i(d)})})]}),a?c("regionStyle")?V(is,{children:V(_U,{label:i("Style"),icon:V(RU,{}),hint:i("Every {part} in this section follows it. The face and the size change; the letter case is the section\u2019s own and stays as it is.",{part:i(e.label).toLowerCase()}),children:V(qU,{face:t,base:r,onPick:a})})}):null:c("regionNote")&&V("p",{className:"es-field-hint sf-hint-keep",children:i("Only the size follows a site style. This section sets its own font, weight and letter case.")}),n&&c("sourceNote")?V(wc,{source:n,slug:s}):null,s0([...n0,"sourceNote"],u=>c(u)&&(u!=="sourceNote"||!!n))&&V(Rr,{}),V(Cc,{inline:!0,name:i("Page"),onSelect:l})]})}function JU({onBack:e}){return ko("div",{className:"sf-note",children:[V("p",{children:V("strong",{children:i("This part is no longer here.")})}),V("p",{children:i("The section it belonged to has been changed or removed.")}),V(Cc,{inline:!0,name:i("Page"),onSelect:e})]})}function QU({onBack:e,partId:o,why:t}){return ko("div",{className:"sf-note",children:[V("p",{children:V("strong",{children:i("This part's settings did not open.")})}),V("p",{children:i("The words are still on your page and nothing has been lost. The editor could not work out which control belongs to them, which is a fault on our side. Go back and click the section to open its settings instead.")}),V("p",{className:"sf-note-detail",children:ko("code",{children:[o," \u2014 ",t]})}),V(Cc,{inline:!0,name:i("Page"),onSelect:e})]})}function l0({nodeId:e,propKey:o,onBack:t,onEditStyle:r}){let{getItemById:a,getSelectorForId:n,config:s}=LU(W=>W),l=zU(),c=Lv(),{partStyle:d}=Gv(),{fonts:u,textStyles:h}=ne(),p=TU(HU),x=!p?.capabilities?.hasSiteTheme,{persist:g}=aa({themeFromDocument:x,tokenRef:p?.tokenRef,siteId:p?.siteId??null}),y=Hi({themeFromDocument:x,persist:g}),[E,O]=o0(!1),C=GU(),I=W=>Bm(C)!=="tablet"&&FU(Cm[W],C),w=PU(null),v=a(e),k=n(e),R=v?s.components[v.type]:void 0,{key:B,row:P}=Ho(o),_=R?.fields?.[B],N=P?Da(_,P):_,b=Ei(e,o),F=v?.props??{},A=ga(N),H=ni(N),z=pC(N),Z=v?ss(v.type):null,j=v?Vv(v.type,B):null,Ae=P?On(F[B],P):F[B],ge=!!P&&!(Array.isArray(F[B])&&P.index<F[B].length);Lm(()=>{Av(document)||w.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[b]);let[Ye,We]=o0(0);Lm(()=>We(0),[b]);let Pe=!!v&&!ge&&(!k||!N);Lm(()=>{if(!Pe||Ye>=a0)return;let W=setTimeout(()=>We($e=>$e+1),XU);return()=>clearTimeout(W)},[Pe,Ye]);let ue=Pe&&Ye<a0,Ce=La(e,as(v?.type,o),"textPart");if(!v||ge)return V(JU,{onBack:t});let Qe=e0(v.type),so=Qe?Am(Qe,o):null;if(Qe&&so){let W=d?.partId===b?d:null,$e=Qe[so],Yo=$e.writable===!0&&!!k,Ot=Rd=>{k&&l.replaceComponent(k.zone,k.index,{...v,props:ka(F,o,"role",Rd)})};return V(rt,{motion:Ce,body:V(ZU,{region:$e,sizePx:W?.base.sizePx??null,face:Dm(F,o,W,u),base:W?.base??null,onFollowStyle:Yo?Ot:void 0,source:Z,slug:ns(F),onBack:t,shows:I})})}if(!k||!N)return ue?V("div",{className:"sf-note","aria-busy":"true"}):V(QU,{onBack:t,partId:b,why:k?"no field":"no selector"});let le=W=>{l.replaceComponent(k.zone,k.index,{...v,props:W})},Le=W=>{if(Wt(W).hidden!==Wt(Ae).hidden||!A){let $e=P?ju(F,B,P,W):{...F,[B]:W};$e&&le($e);return}hc({node:v,propKey:o,kind:A,zone:k.zone,index:k.index},Wt(W).text,l.replaceComponent)},po=Ae,_e=d?.partId===b?d:null,ze=_e?.styleOwner,qo=ze?a(ze.owner):null,Pt=ze&&qo?n(ze.owner):null,Vo=!!(ze&&qo&&Pt),M=Vo?qo.props??{}:F,ie=Vo?W=>l.replaceComponent(Pt.zone,Pt.index,{...qo,props:W}):le,pe=Vo?ze.kind:as(v?.type,o),Be=Di(M,pe),De=[{partKey:pe,face:Dm(M,pe,_e,u),sizeGroup:_e?.sizeGroup??null,base:_e?.base??o$,style:Be}],Et=KU(De,W=>W.sizeGroup),Vr=Ic(_e?.inks),Xe=(W,$e)=>{let Yo=M;for(let Ot of De)Yo=ka(Yo,Ot.partKey,W,$e);ie(Yo)},er=W=>W?Xe("textStyle",W):on({textStyle:null,role:null}),on=W=>{let $e=M;for(let Yo of De)for(let[Ot,Rd]of Object.entries(W))$e=ka($e,Yo.partKey,Ot,Rd??null);ie($e)},Fd=A==="text"||A==="textarea",{text:Bx,hidden:Yr}=Wt(Ae),Vs=N?.[WU]?.label??o,Dx=Yr?i("Show {label} on the slide",{label:i(Vs)}):i("Hide {label} on the slide",{label:i(Vs)}),Nx=ko("div",{className:"sf-field-head",children:[V(AU,{}),V("span",{className:"sf-field-label sf-field-label--inline",children:i(Vs)}),Fd&&V(MU,{content:Dx,children:V(NU,{"aria-pressed":Yr,"aria-label":Dx,onClick:()=>Le({text:Bx,hidden:!Yr}),children:Yr?V(t0,{name:"eye-off",size:14}):V(t0,{name:"eye",size:14})})})]}),Ys=!H&&z,LF=!!A&&(xS(N)||H||Yr||!z),Mx=Dm(M,pe,_e,u),BF=Mx.kind==="role"?Mx.role:null,_d=kC(Be)??jC(BF),Hx=Ut(y.saved,y.old),DF=Object.entries(Be).filter(([W,$e])=>W!=="role"&&W!=="textStyle"&&$e!==void 0).length,NF=()=>{let W=M;for(let $e of De){let{role:Yo,textStyle:Ot}=$e.style;W=OC(W,$e.partKey),Yo&&(W=ka(W,$e.partKey,"role",Yo)),Ot&&(W=ka(W,$e.partKey,"textStyle",Ot))}ie(W)},or=_d,MF=KC(De[0].style),HF=or?Hx.find(W=>W.id===or)?.name??or:"",GF=()=>{O(!1),or&&(y.write(qC({saved:y.saved,old:y.old,styleId:or,values:pp(De[0].style)}),!0),NF())};return ko(YU,{sectionName:R?.label??v.type,onBack:t,tabs:W=>V(rt,{motion:Ce,body:W}),textEditor:I("words")?V("div",{ref:w,className:"sf-part-text",children:LF?V(Dv,{text:Bx,onTextChange:W=>Le(Fd?{text:W,hidden:Yr}:W),multiline:ki(A),markup:A!=="plainText",styled:!1,style:De[0].style,base:De[0].base,setValue:on,colors:Vr,placeholder:Nm(aC(N))??void 0,ariaLabel:i(Vs),head:Nx,typedOnCanvas:c===b}):A?Fd?Nx:null:V(OU,{field:N,name:o,value:po,onChange:Le,id:`sf-part-${e}-${o}`})}):void 0,children:[j&&I("sourceNote")&&V(wc,{source:j,slug:ns(F),menuId:gc(F)}),Ys&&V(BU,{style:I("style")?{value:_d??"",options:[{value:"",label:i("No style"),description:i("Section\u2019s own")},...Hx.map(W=>({value:W.id,label:W.name,description:W.values.font?Qr(W.values.font)?.label:void 0}))],onChange:W=>er(W||null),changed:DF>0,onEditStyles:r,onUpdateStyle:or&&MF?()=>O(!0):void 0}:void 0,font:I("font")?{value:Be.font??"",styleValue:Qr(De[0].base.fontKey)?.label,options:Eo.map(W=>({label:W.label,value:W.key})),onChange:W=>Xe("font",W||null)}:void 0,italic:I("italic")?{value:Be.italic,styleValue:e$(h,_d),onChange:W=>Xe("italic",W??null)}:void 0,cells:_m(De[0].style,De[0].base,on,Bm(C)).filter(W=>I(W.key)),align:I("align")?Bm(C)==="mobile"?{value:Be.alignPhone??"",styleValue:Be.align??De[0].base.align,onChange:W=>Xe("alignPhone",W||null)}:{value:Be.align??"",styleValue:De[0].base.align,onChange:W=>Xe("align",W||null)}:void 0,letterCase:I("letterCase")?{value:Be.case??"",styleValue:De[0].base.case,onChange:W=>Xe("case",W||null)}:void 0}),E&&or&&V(Mv,{styleName:HF,onCancel:()=>O(!1),onConfirm:GF}),Ys&&Et===null&&I("fixedSizeHint")&&V("p",{className:"es-field-hint sf-hint-keep",children:i("Fixed size \u2014 the site\u2019s Text setting doesn\u2019t resize this.")}),s0(VU,W=>I(W)&&(W==="words"||(W==="sourceNote"?!!j:W==="fixedSizeHint"?Ys&&Et===null:Ys)))&&V(Rr,{})]})}function e$(e,o){return!o||!Array.isArray(e)?!1:e.find(t=>t?.id===o)?.values?.italic===!0}var o$={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0};import{jsx as zo,jsxs as th,Fragment as g$}from"react/jsx-runtime";import{useCallback as b$,useRef as y$,useState as us}from"react";import{InspectorIconButton as S$}from"efficient-easel/chrome";import{PopupMenu as C$,PopupMenuItem as w$,PopupMenuLabel as Ac}from"efficient-shell/ui";import{CopyToPageIcon as k$}from"efficient-easel/icons";import{useEaselSession as v$}from"efficient-easel/screen/lib/session-context";import{cloneNodeWithFreshIds as T$}from"efficient-easel/screen/lib/document/section-doc";import{FOOTER_TYPE as P$}from"efficient-easel/draw";import{currentEaselSession as n$}from"efficient-easel/screen/lib/session";var i0=["general","commerce","service"],Kt=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero Slideshow",set:"general"},{type:"HeroSingle",label:"Hero",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"Gallery",label:"Tabbed Gallery",set:"commerce"},{type:"GalleryB",label:"Customer Photo Grid",set:"commerce"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"},{type:"TyreFitment",label:"Tyre Fitment Form",set:"commerce"},{type:"EuTyreLabel",label:"EU Tyre Label",set:"commerce"},{type:"RelatedProducts",label:"Related Products",set:"commerce"},{type:"BundleOffer",label:"Bundle Products",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"DeliveryOptions",label:"Delivery Options",set:"commerce"},{type:"PaymentBadges",label:"Payment Methods",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"StatsParagraph",label:"Stats with Text",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Testimonials",label:"Testimonials",set:"general"},{type:"Reviews",label:"Reviews",set:"service"},{type:"Logos",label:"Logos",set:"general"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Banner",label:"Banner",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"Masthead",label:"Issue Header",set:"general"},{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"Series",label:"Recurring Columns",set:"general"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"},{type:"CategoryBar",label:"Category Bar",set:"general"},{type:"DocTabs",label:"Document Tabs",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocMasthead",label:"Document Header",set:"general"},{type:"DocBody",label:"Document Text",set:"general"},{type:"DocMetaCards",label:"Document Detail Cards",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"}]}];function YIe(){return Object.fromEntries(Kt.map(e=>[e.key,{title:e.title,components:e.sections.map(o=>o.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var t$={Grid:'Lewis, 2026-09-14: Box and Grid duplicate each other and it feels confusing. 2026-09-15 he chose the order: give Box uneven widths FIRST, then merge Grid into Box. Shown three ways to pick the widths (mockup "Uneven Box Widths"), he chose A \u2014 shape pictures on the Box\'s `Block widths` row, the same "a row is a shape, pick a picture of it" rule he set for the photo wall on 2026-09-07.\n\nWHAT REPLACES IT: a Box set to One row, with `Block widths` at Equal or a shape (Big left, Big right, Bigger left, Bigger right) and its own `Columns` in the Phone view. Measured on PRODUCTION 2026-09-16 ~09:28 AEST (database `efficient-system`, all 10 tenant schemas, 128 storefront pages, both `layout` and `published_layout` \u2014 256 documents): 2 Grid nodes, and they are ONE Grid counted twice \u2014 the 9DIEM homepage on 9diem.com (`xtreme_mudder` schema), once as draft and once as published. It is top-level, holds three `ImageBlock`s at `columns` 3 \u2014 equal thirds \u2014 and NO block sets `Positions`. A Box draws that with `Block widths` at Equal.\n\n\u26A0\uFE0F THE COUNT MOVES; THE RULE MUST NOT DEPEND ON IT. This entry has already carried three different readings. A local-clone snapshot said no Grid used `Positions`. A PRODUCTION reading on 2026-09-15 ~13:15 AEST found 6 nodes on two sites, 4 of them spanned \u2014 hartesmetal.com.au homepage and about, 4 columns, spans 1 + 3. That one was TRUE when it was taken and stopped being true the same day: those two pages were rebuilt on Box (`Block widths: Bigger right`), and on 2026-09-16 they hold zero Grid nodes and are built from `Flex`. \u26D4 So the rule is NOT "there are still N spanned Grids". NEVER delete the Grid component or its `gridSpan` handling, whatever a census says \u2014 Grid still renders, still edits, still drags, and a merchant may rebuild a page either way on any day. Re-run the census on production before anyone PROPOSES deleting either, and read any number written here as the reading of its own day, not as the state of the world.\n\nWHAT A MERCHANT LOSES: a new Grid, and with it a fixed "N per row" that wraps by itself past three across, and the per-block `Positions` number. Box wraps with `Wrap`, but by content width, not by a fixed count.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Grid still renders through it and can still be edited, dragged and added to; no document is rewritten and NO MIGRATION RUNS \u2014 the owner redoes live sections himself.\n\n\u26A0\uFE0F AND IT STAYS DROPPABLE WHERE IT LIVES. The drop rule in lib/document/config.tsx read the nestable containers off the catalogue\'s `structure` row, so leaving the catalogue would have made every open slot \u2014 a Box included \u2014 refuse a Grid already stored inside one. `scripts/test-retired-grid-stays-editable.tsx` \xA73 pins it.',CompatibleTyres:'Lewis, 2026-09-09: "Do not bother counting. Delete Compatible Tyres and use the new one. The new one needs complete settings \u2014 it must have every setting our cards have." Shown three ways to finish it, he chose C: retire from the menu now, and take styling the card text as its own card.\n\nWHAT REPLACES IT: `RelatedProducts` with its `Show` dropdown set to "Tyres that fit this product". That block is the GENERIC relationship section from card 1128 \u2014 it knows nothing about wheels or tyres, it asks the registry for a relationship by name. The two have rendered through the SAME renderer (`DynamicRelatedProducts`) since that card; this one is the pre-registry one-off that was never removed.\n\n\u26A0\uFE0F THE SWAP WAS NOT SAFE UNTIL #1305, AND SAYING SO IS THE POINT. The first old-versus-new table put in front of the owner was WRONG. `DynamicRelatedProducts` returns EARLY on a tyre answer and draws this component, so the seven card settings, the head split and the Width control all stopped at that call \u2014 nine settings, measured NO EFFECT, on precisely the relationship that replaces this block. #1283 gave the new block the card settings, #1299 the head split and its own Width, #1305 carried all of it onto the tyre branch. Only then was the claim true.\n\nWHAT WAS MEASURED BEFORE RETIRING, four ways, because the premise decides the card:\n \u2022 settable text kinds (SECTION_TEXT_KINDS): both blocks ABSENT \u2014 the map holds only TimelineTrack and Footprint, both AUTHORED lists\n \u2022 read-only text regions: neither `components/CompatibleTyres` nor `components/TyreCard` stamps one\n \u2022 panel rows through resolveFields: this block 31, `RelatedProducts` 42. This block\'s only style-ish key is `_sStyle`, the bucket HEADER, not a control\n \u2022 head text (num/title/description) is authored on both, so `_partStyles` reaches it identically\nSo on the CARD runs the two are zero against zero \u2014 neither can style them \u2014 and everywhere else the new block is ahead. Styling those runs needs a section-level prop family and a paint path for DERIVED text, which no section has yet: a part is anchored by matching an AUTHORED prop\'s string against the DOM, and `lib/document/source-bound-parts` keeps hydrated copy unreachable on purpose so a merchant cannot type into a copy of a product name and lose it at the next sync. That is its own card, and `lib/sections/text-regions` is the read-only half that already ships.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT, the same contract Subscribe, Split and SubscribeBlogs have. Every page holding a `CompatibleTyres` still renders through it, no published document is rewritten, and NO MIGRATION RUNS \u2014 the owner\'s standing ruling of 2026-09-05: he redoes live sections himself and deletes the old ones when he does. He also said explicitly not to count them first.\n\n\u26A0\uFE0F AND THIS COMPONENT IS LOAD-BEARING FOR ITS OWN REPLACEMENT: `DynamicRelatedProducts` draws it for EVERY tyre answer. Deleting it would blank the block that replaces it, not just the pages still holding this one.',Spacer:`Lewis, 2026-10-10 (section-merges.md group 19, approved): one Divider holds space and lines. Style = None (was Spacer) / Line / Stripes; the space above and below as number boxes. Retired by card [MERGE] Spacer Into Divider (2026-10-26).
|
|
7
|
+
|
|
8
|
+
WHAT REPLACES IT: a Divider with Style set to None. It draws no line, only its space, and that space is the Divider's Padding row (top and bottom, each with its phone value): the Spacer's 24 / 48 / 96 / 160 px are None with Padding 12 + 12, 24 + 24, 48 + 48, 80 + 80. \`scripts/test-divider-holds-the-spacer.tsx\` \xA75 holds it.
|
|
9
|
+
|
|
10
|
+
WHAT A MERCHANT LOSES on a NEW space: nothing the Spacer had. Four fixed sizes become any number on the 4px grid, top and bottom apart, and a phone value.
|
|
11
|
+
|
|
12
|
+
NO CONVERTER ROW: 0 Spacer nodes on any page, draft or published, in any schema of the local production clone (read-only count, 2026-10-26), and none in the backend's seed files. It stays in \`scripts/fixtures/section-to-box.baseline.json\` with that reason.
|
|
13
|
+
|
|
14
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. A Spacer anywhere still renders through it and can still be edited; no document is rewritten.`,KeyFeatures:`Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds Cards and Key Features; Key Features' diamond cells are the card style "Label only". Retired by card [MERGE] One Text Block And Click Through Parts (2026-10-22).
|
|
15
|
+
|
|
16
|
+
WHAT REPLACES IT: a Cards section with Card style set to Label only. It draws this section's own component (\`components/KeyFeatures\`), so for the same words it draws the same bytes: the pill eyebrow when no look is stored, the columns, each cell's link. A cell's words are the card's \`title\` (row "Feature label"), its link the card's \`href\` (row "Link"), both shown under Label only. \`scripts/test-cards-label-only.tsx\` \xA72 holds the bytes.
|
|
17
|
+
|
|
18
|
+
WHAT A MERCHANT LOSES on a NEW Label only section: nothing this section had. It GAINS the Cards head split (its head can move into a box of its own), which Key Features never had: that head draws the shared \`simple\` head, eyebrow ABOVE the heading, where Key Features drew it beside.
|
|
19
|
+
|
|
20
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Key Features still renders through it and can still be edited; no document is rewritten and NO MIGRATION RUNS.`,SubscribeBlogs:"card 66396 \u2014 folded into `Subscribe`, which now chooses its rail's content with a `Type` control (the newsletter's own issues, or live blog posts). The two shared 21 of their fields and rendered THE SAME BYTES from equivalent rows, so offering both asked a merchant to choose between two names for one section. The type key stays because it is stored on published pages, and the component stays because those pages still render through it."},XIe=["Grid","Spacer"],ZIe=Array.from(new Set([...Kt.flatMap(e=>e.sections.map(o=>o.type)),...Object.keys(t$)])),c0=Object.fromEntries(Kt.flatMap(e=>e.sections.map(o=>[o.type,o.label]))),r$={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",LocationMap:"general",Contents:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",KeyFeatures:"general",Spacer:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",FooterPayment:"service",MenuBlock:"service",EmailFormBlock:"service",SocialLogosBlock:"service",PaymentLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},kc={...r$,...Object.fromEntries(Kt.flatMap(e=>e.sections.map(o=>[o.type,o.set])))};function d0(e){return Object.prototype.hasOwnProperty.call(kc,e)?kc[e]:void 0}function Mm(e){return Object.keys(kc).filter(o=>kc[o]===e).sort()}var JIe=Mm("general"),QIe=Mm("commerce"),ege=Mm("service"),Hm="Flex",qt="Box",oge=`${qt}es`;function a$(e){return e==="section"?"Blank section":qt}function Gm(e,o,t){return e===Hm?a$(o):t}var s$={general:!0,commerce:!0,service:!0};function Wm(e){let o=e?.sets;return o?Object.fromEntries(i0.map(t=>[t,o.includes(t)])):s$}function zm(e=n$()){return Wm(e.blocks)}import{isBackendError as Ua}from"efficient-easel/screen/lib/backend-error";import{isEfficientBackend as A0}from"efficient-easel/screen/lib/session";import{useSyncExternalStore as l$}from"react";var Ha=new Map,Um=new Set;function $m(e,o){if(!(Ha.has(e)&&Ha.get(e)===o)){Ha.set(e,o);for(let t of Um)t()}}function vc(e,o){$m(e,o)}function Tc(e,o){let t=Ha.get(e);$m(e,o??(t==="live"?"changed":t))}function Pc(e,o){$m(e,o??"live")}function f0(e){return Ha.get(e)}function i$(e){return Um.add(e),()=>{Um.delete(e)}}function u0(e){let o=()=>e?Ha.get(e):void 0;return l$(i$,o,o)}function p0(e,o){return e==="live"&&o?"changed":e}function jm({live:e,onPress:o,busy:t=!1,pinnedUnpublished:r=!1,goingLive:a}){let n=e==="live"&&!r,s=e==="changed"?i("Changes not live yet"):e==="never"?i("Never published"):r?i("Header and footer not live yet"):e==="live"?i("Everything is live"):null;return{label:i("Publish"),tooltip:e==="never"?i("Put this page on your site"):i("Put your changes on your site"),status:s,quiet:n?{label:i("Published"),reason:i("Everything is live")}:null,...a&&a.length?{goingLive:a}:{},onPress:o,busy:t}}function m0(e){return e.map(o=>o.change==="take_down"?i("{name} (taken down)",{name:o.name}):o.name)}var Oe="SiteHeader",ve="SiteFooter",Km="sections",cge=[Oe,ve],Ga=e=>e===Oe||e===ve,h0=e=>`${e}:${Km}`;function x0(e,o,t=[]){return{type:e,props:{id:o,[Km]:t}}}var c$=new Set(["Footer",Oe,ve]);function Wa(e){let o=new Set,t=!1,r=e.filter(a=>{let n=a?.type??"";return n==="Header"?(t=!0,!1):c$.has(n)?o.has(n)?(t=!0,!1):(o.add(n),!0):!0});return t?r:e}function Ec(e,o){return e.some(t=>t?.type===o.type)?e:o.type===Oe?[o,...e]:[...e,o]}var I0={[Oe]:{max:3,takes:["Flex","Ticker"]},[ve]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function g0(e,o,t){if(!Ga(e))return!0;let r=I0[e];return t<r.max&&r.takes.includes(o)}function b0(e,o){let t=o,r=t?.props?.id;if(r==null)return null;let a=e?.content;if(!Array.isArray(a))return null;for(let n of a){if(!Ga(n?.type))continue;let s=n.props?.[Km];if(!Array.isArray(s)||!s.some(c=>c?.props?.id===r))continue;let l=I0[n.type];return l.takes.includes(t?.type??"")?s.length>=l.max?{group:n.type,why:"full"}:null:{group:n.type,why:"type"}}return null}import{isNode as d$}from"efficient-easel/data";var y0="Footer",f$=[Oe,y0,ve],za=e=>{let o=e?.content;return Array.isArray(o)?o:[]},Mr=e=>{let o=e?.zones;return o&&typeof o=="object"&&!Array.isArray(o)?o:null},cs=e=>{let o=e?.props?.id;return typeof o=="string"?o:void 0},S0=e=>cn(e)?.ownerId??"";function C0(e){let o=Wa(za(e)),t=o.some(r=>r?.type===ve);return o.filter(r=>r?.type===Oe||r?.type===ve||r?.type===y0&&!t)}function qm(e,o){let t=new Set,r=a=>{if(Array.isArray(a)){for(let n of a)r(n);return}if(!(!a||typeof a!="object")){if(d$(a)){let n=cs(a);n&&t.add(n)}for(let n of Object.values(a))r(n)}};if(r(e),o){let a=!0,n=new Set;for(;a;){a=!1;for(let[s,l]of Object.entries(o))n.has(s)||!t.has(S0(s))||(n.add(s),r(l),a=!0)}}return t}function Vm(e,o){let t={},r={};for(let[a,n]of Object.entries(e??{}))(o.has(S0(a))?t:r)[a]=n;return{owned:t,rest:r}}function w0(e,o){if(!o)return e;let t=C0(o);if(!t.length)return e;let r=t.filter(l=>l.type===Oe),a=t.filter(l=>l.type!==Oe),n={...e,content:[...r,...za(e),...a]},{owned:s}=Vm(Mr(o),qm(t,Mr(o)));return Object.keys(s).length&&(n.zones={...Mr(e)??{},...s}),n}function Ym(e,o){if(!o)return{page:e,chrome:null};let t=C0(o),r=new Set(t.map(cs).filter(C=>!!C)),a=[],n=[];for(let C of za(e)){let I=cs(C);I&&r.has(I)||Ga(C?.type)?n.push(C):a.push(C)}let s=new Map(n.map(C=>[cs(C),C])),l=new Set,c=Wa(za(o)).flatMap(C=>{let I=cs(C);if(!I||!r.has(I))return[C];let w=s.get(I);return w?(l.add(w),[w]):[]});for(let C of n)l.has(C)||c.some(I=>I?.type===C.type)||(c=C.type===Oe?[C,...c]:[...c,C]);c=Wa(c);let d=c.length===za(o).length&&c.every((C,I)=>C===za(o)[I]),u=Mr(e),h=qm(c,u),{owned:p,rest:x}=Vm(u,h),g=Vm(Mr(o),qm(t,Mr(o))).owned,y={...o,content:d?o.content:[...c]},E=Mr(o);if(E||Object.keys(p).length){let C={};for(let[I,w]of Object.entries(E??{}))I in g?I in p&&(C[I]=p[I]):C[I]=w;for(let[I,w]of Object.entries(p))I in C||(C[I]=w);y.zones=C,E&&u$(y.zones,E)&&(y.zones=E)}let O={...e,content:a};return u&&(Object.keys(x).length||!Object.keys(g).length?O.zones=x:delete O.zones),{page:O,chrome:y}}function u$(e,o){let t=Object.keys(e),r=Object.keys(o);return t.length===r.length&&t.every((a,n)=>a===r[n]&&e[a]===o[a])}function k0(e,o){return t=>e(t)||t!==void 0&&f$.includes(t)&&o()}var v0="SharedSection",p$=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,ds=e=>{let o=e?.content;return Array.isArray(o)?o:[]},fs=e=>{let o=e?.props?.id;return typeof o=="string"?o:void 0};function T0(e){if(e?.type!==v0)return null;let o=e.props?.section;return typeof o=="string"&&p$.test(o)?o.toLowerCase():null}function P0(e){let o=[];for(let t of ds(e)){let r=T0(t),a=fs(t);r&&a&&o.push({refId:a,section:r})}return o}function Oc(e){let o=ds(e)[0];return o&&typeof o=="object"&&fs(o)?o:null}function m$(e,o){return{type:v0,props:{id:e,section:o}}}function E0(e,o){let t=new Map,r=new Set,a=!1,n=ds(e).map(s=>{let l=T0(s),c=fs(s);if(!l||!c||r.has(l))return s;let d=Oc(o.get(l)),u=fs(d??void 0);return!d||!u||t.has(u)?s:(r.add(l),t.set(u,{section:l,refId:c,reference:s}),a=!0,d)});return{working:a?{...e,content:n}:e,held:t}}function O0(e,o,t){let r=new Map,a=!1,n=ds(e).map(s=>{let l=fs(s),c=l?o.get(l):void 0,d=c?t.get(c.section):void 0;if(!c||!d||r.has(c.section))return s;let u=ds(d).slice(1),h=Oc(d);return r.set(c.section,h===s?d:{...d,content:[s,...u]}),a=!0,c.reference??m$(c.refId,c.section)});return{page:a?{...e,content:n}:e,docs:r}}var F0=null;function Xm(e){F0=e}function Ct(){return F0}var _0=null;function Zm(e){_0=e}function Fc(){return _0}var _c=null;function Jm(e){_c=e}function R0(){return!!(_c&&_c.state().lockHolder)}function Hr(){return _c!==null}function oh(e){return!!(e?.publish&&e.liveState)}function h$(e,o){if(!oh(e))return;let{versions:t,nameVersion:r,restoreVersion:a,previewVersion:n}=e;if(!(!t||!r||!a||!n))return{list:()=>t.call(e,o),name:(s,l)=>r.call(e,s,l,o),restore:(s,l)=>a.call(e,s,l??{},o),preview:s=>n.call(e,s,o)}}function x$(e,o){return async(t,r)=>{try{await cb()}catch(a){throw new Error(i("A change waiting to go live could not be saved."),{cause:a})}return(await e.publish(o)).state==="live"?kl({state:"live",changes:[]}):pt(0),{version:r??null}}}function eh(e,o,t){let r=o?{siteId:o}:void 0;return{resolve:a=>e.load({slug:a,...r}).then(n=>(n&&vc(n.id,n.live),n)),saveLayout:(a,n,s,l)=>e.save(a,{layout:n},{version:s,clientId:l??""}).then(c=>(Tc(a,c.live),pt(),c)),rereadVersion:e.version?a=>e.version(a):void 0,publish:oh(t)?x$(t,r):e.publish?(a,n)=>e.publish(a,n?{version:n}:void 0).then(s=>(Pc(a,s.live),s)):void 0,listPages:()=>e.list(r),createPage:e.create?a=>e.create({...a,...r}):void 0,deletePage:e.remove?(a,n)=>e.remove(a,n):void 0}}function I$(e,o,t,r,a=!1){let n=null,s=new Set,l=!1,c=new Map,d=new Map,u=new Map,h=new Map,p={docId:null,lockHolder:null,conflict:null,saveFailed:!1,unpublished:!1,loadFailed:!1,sections:[]},x=new Set,g=()=>{if(!n)return!1;let P=f0(n.id);return P==="changed"||P==="never"||P===void 0&&l},y=P=>{p={...p,...P,docId:n?.id??null,unpublished:g(),sections:[...u.values()]};for(let _ of x)_()},E=(P,_,N)=>{_?u.set(P,{section:P,title:c.get(P)?.title??"",problem:_,holder:N}):u.delete(P)},O=P=>P&&typeof P=="object"&&!Array.isArray(P)?P:{},C=P=>s.has(P),I=()=>new Map([...c].map(([P,_])=>[P,_.layout])),w=()=>`SharedSection-${typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2)}`,v=(P,_,N,b)=>{let F=O(_);c.set(P,{layout:F,version:N,savedJson:JSON.stringify(F),title:b})},k={state:()=>p,subscribe:P=>(x.add(P),()=>{x.delete(P)})},R={sectionOf:P=>d.get(P)?.section??null,heldElsewhere:P=>{let _=d.get(P)?.section;return!!(_&&u.get(_)?.problem==="lock")},adopt:(P,_)=>{v(_.id,_.layout,_.layout_updated_at,_.title),d.set(P,{section:_.id,refId:w()}),h.set(_.id,_.used_on),y({})},place:P=>{if([...d.values()].some(b=>b.section===P.id))return null;let _=Oc(O(P.layout)),N=typeof _?.props?.id=="string"?_.props.id:null;return!_||!N||!_.type?null:(v(P.id,P.layout,P.layout_updated_at,P.title),d.set(N,{section:P.id,refId:w()}),h.set(P.id,P.used_on),_)},usedOn:P=>h.get(P)??null,learn:P=>{for(let _ of P){h.set(_.id,_.used_on);let N=c.get(_.id);N&&(N.title=_.title);let b=u.get(_.id);b&&u.set(_.id,{...b,title:_.title})}y({})}},B=async(P,_)=>{for(let[N,b]of P){let F=c.get(N),A=JSON.stringify(b);if(!(!F||A===F.savedJson||u.get(N)?.problem==="lock"))try{let H=await e.save(N,{layout:b},{version:F.version,clientId:_??""});Tc(N,H.live),F.layout=b,F.version=H.version,F.savedJson=A,E(N,null)}catch(H){Ua(H,"changed-elsewhere")?E(N,"conflict"):Ua(H,"lock-taken")?E(N,"lock",H.holder??void 0):E(N,"save")}}P.size&&pt(),y({})};return{resolve:async P=>{if(Jm(P===Ao?null:k),Xm(P===Ao?null:R),c=new Map,d=new Map,u=new Map,h=new Map,P===Ao)return t.resolve(P);let _=!1,[N,b]=await Promise.all([t.resolve(P),e.load({slug:Ao,...o}).catch(()=>(_=!0,null))]);if(b&&!In(N?.layout)){vc(b.id,b.live);let j=O(b.layout);n={id:b.id,layout:j,version:b.version,savedJson:""}}else n=null;if(l=!1,!N)return y({conflict:null,saveFailed:!1,loadFailed:_}),N;let F=O(N.layout),A=P0(F),H=await Promise.all(A.map(j=>e.load({id:j.section,...o}).catch(()=>null)));A.forEach((j,Ae)=>{let ge=H[Ae];ge?(vc(ge.id,ge.live),v(j.section,ge.layout,ge.version,"")):(c.delete(j.section),u.set(j.section,{section:j.section,title:"",problem:"load"}))});let z=E0(F,I());if(d=z.held,!n)return d.size&&s.add(N.id),y({conflict:null,saveFailed:!1,loadFailed:_}),d.size?{...N,layout:z.working}:N;let Z=w0(z.working,n.layout);return n.savedJson=JSON.stringify(Ym(Z,n.layout).chrome),s.add(N.id),y({conflict:null,saveFailed:!1,loadFailed:!1}),{...N,layout:Z}},saveLayout:async(P,_,N,b)=>{if(!C(P))return t.saveLayout(P,_,N,b);let F=n,A=F?Ym(_,F.layout):{page:_,chrome:null},H=O0(A.page,d,I()),z=await t.saveLayout(P,H.page,N,b);if(await B(H.docs,b),!F)return z;let Z=JSON.stringify(A.chrome);if(!A.chrome||Z===F.savedJson||p.lockHolder)return z;try{let j=await e.save(F.id,{layout:A.chrome},{version:F.version,clientId:b??""});Tc(F.id,j.live),pt(),F.layout=A.chrome,F.version=j.version,F.savedJson=Z,l=!0,y({conflict:null,saveFailed:!1})}catch(j){Ua(j,"changed-elsewhere")?y({conflict:j.conflict??{savedBy:"",savedByYou:!1,secondsAgo:0}}):Ua(j,"lock-taken")?y({lockHolder:j.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}}):y({saveFailed:!0})}return z},publish:t.publish?async(P,_)=>{let N=await t.publish(P,_),b=n;if(b&&C(P)&&!a&&e.publish&&g()&&!p.lockHolder){let F=await e.publish(b.id,b.version?{version:b.version}:void 0);Pc(b.id,F.live),F.version!==null&&(b.version=F.version),l=!1,y({})}if(C(P)&&!a&&e.publish)for(let[F,A]of c){if(u.get(F)?.problem==="lock")continue;let H=await e.publish(F,A.version?{version:A.version}:void 0);Pc(F,H.live),H.version!==null&&(A.version=H.version)}return N}:void 0,lock:r?{claim:async(P,_,N)=>{let b=await r.claim(P,_,N);if(!C(P))return b;let F=n;if(F)try{await r.claim(F.id,_,!1),p.lockHolder&&y({lockHolder:null})}catch(A){Ua(A,"lock-taken")&&y({lockHolder:A.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}})}for(let A of c.keys())try{await r.claim(A,_,!1),u.get(A)?.problem==="lock"&&E(A,null)}catch(H){Ua(H,"lock-taken")&&E(A,"lock",H.holder??void 0)}return c.size&&y({}),b},release:async(P,_)=>{if(await r.release(P,_),!C(P))return;let N=n;N&&!p.lockHolder&&await r.release(N.id,_).catch(()=>{});for(let b of c.keys())u.get(b)?.problem!=="lock"&&await r.release(b,_).catch(()=>{})}}:void 0,pinnedChrome:k}}function Rc(e){let o=(t,r,a)=>e.save(t,r.layout?{...r,layout:yv(r.layout)}:r,a);return new Proxy(e,{get(t,r){if(r==="save")return o;let a=Reflect.get(t,r,t);return typeof a=="function"?a.bind(t):a}})}function Age(e,o,t){return e.update(o,Sv(t))}function Lge(e,o=Ne(),t=zm(),r={}){let a=A0(o),n=e?{siteId:e}:void 0,s=a?!!e:!0,l=o.site.update,c=a&&t.commerce&&t.service,d=!!r.editsPinnedInPlace&&c,u=oh(o.site)?o.site:void 0,h=Rc(o.pages),p=eh(h,e,u),x=d?I$(h,n,p,o.lock,!!u):null;return{capabilities:{canPublish:!!u||!!o.pages.publish,hasSiteSettings:a,hasSiteTheme:!!o.theme,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!o.pages.create,canDeletePagesInline:!!o.pages.remove,hasEditLock:!!o.lock,hasEditGuard:!0,hasPinnedChrome:c,editsPinnedInPlace:d,explainsSiteSettings:!1,hasSiteRecord:s,canEditSiteRecord:s&&!!l,hasPreviewLink:a||!!o.preview,hasCatalog:a&&t.commerce,hasForms:a&&t.service,hasBlog:!!o.blog&&t.service,offersCommerce:t.commerce,offersService:t.service},...p,...L0(p.resolve),lock:o.lock,...x,site:s?()=>o.site.get(n):void 0,siteLiveState:u?()=>u.liveState(n):void 0,siteVersions:h$(u,n),updateSite:s&&l?g=>l(g,n):void 0,previewHref:o.preview?g=>o.preview.href(g):void 0}}function Bge(e,o=Ne(),t=zm()){let r=A0(o),a=o.templates,n=a?Rc(a.pages(e)):{list:()=>Promise.reject(new Error(Qm)),load:()=>Promise.reject(new Error(Qm)),save:()=>Promise.reject(new Error(Qm))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!n.create,canDeletePagesInline:!!n.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:r&&t.commerce&&t.service,editsPinnedInPlace:!1,explainsSiteSettings:r,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:r&&t.commerce,hasForms:r&&t.service,hasBlog:!!o.blog&&t.service,offersCommerce:t.commerce,offersService:t.service},...eh(n,void 0),...L0(eh(n,void 0).resolve),publish:void 0,templateName:a?()=>a.get(e).then(s=>s.name):void 0}}function L0(e){return{resolve:o=>(Jm(null),Xm(null),e(o))}}var Qm="This editor's backend has no website templates.";function B0({node:e,currentSlug:o,siteId:t,tokenRef:r,runAuthed:a,onNotify:n}){let[s,l]=us(!1),[c,d]=us(null),u=v$(),[h,p]=us(!1),[x,g]=us(null),y=y$(null),[E,O]=us(null),C=b$(async()=>{if(u.usesBridgedToken&&!r.current){p(!0);return}try{d(await Ne(u).pages.list(t?{siteId:t}:void 0))}catch{p(!0)}},[r,t,u]),I=()=>{if(s){l(!1);return}let k=y.current?.getBoundingClientRect();k&&O({top:k.bottom+6,right:Math.max(8,window.innerWidth-k.right)}),d(null),p(!1),C(),l(!0)},w=(c??[]).filter(k=>k.slug!==o),v=async k=>{if(x)return;g(k.slug);let R=T$(e),B=u.documentHooks?.storedNode?.(R)??R,P=await a(()=>E$(Ne(u).pages,k,B));g(null),l(!1),n?.(P?i("Duplicated to \u201C{name}\u201D",{name:k.label}):i("Couldn\u2019t duplicate the section \u2014 please retry"),P?"success":"error")};return th(g$,{children:[zo("span",{"data-menu-toggle":!0,style:{display:"contents"},children:zo(S$,{buttonRef:y,label:i("Duplicate to another page"),hasPopup:"menu",expanded:s,onClick:I,children:zo(k$,{size:15})})}),s&&E&&zo(C$,{portal:!0,style:{top:E.top,right:E.right},onClose:()=>l(!1),children:th("div",{role:"menu","aria-label":i("Duplicate to page"),children:[zo(Ac,{children:i("Duplicate to page")}),h?zo(Ac,{children:i("Couldn\u2019t load pages")}):c===null?zo(Ac,{children:i("Loading\u2026")}):w.length===0?zo(Ac,{children:i("No other pages")}):w.map(k=>th(w$,{role:"menuitem",disabled:x!==null,onClick:()=>{v(k)},children:[zo("span",{className:"min-w-0 flex-1 truncate",children:k.label}),x===k.slug?zo("span",{className:"shrink-0 text-xs",children:i("Copying\u2026")}):k.draft&&zo("span",{className:"shrink-0 text-xs",children:i("draft")})]},k.id))]})})]})}async function E$(e,o,t){let r=Rc(e),a=await r.load({id:o.id});if(!a)throw new Error(`Page "${o.slug}" no longer exists.`);let n=a.layout??{},s=Array.isArray(n.content)?[...n.content]:[],l=s.findIndex(c=>c?.type===P$);s.splice(l===-1?s.length:l,0,t),await r.save(o.id,{layout:{root:{},zones:{},...n,content:s}},{version:a.version,clientId:""})}import{useScreenDocument as d8}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSectionOps as f8}from"efficient-easel/screen/lib/document/use-section-ops";import{SELECTION_MODE as aye,isSelectionMode as lh}from"efficient-easel/screen/lib/screen-parts";import{usePreviewParts as u8}from"efficient-easel/draw/client";import{jsx as ps,jsxs as O$}from"react/jsx-runtime";import{SettingsDrill as F$}from"efficient-easel/panel";import{UiIcon as _$}from"efficient-easel/draw/client";var R$="Not shown on the page";function A$({part:e,onOpen:o}){return ps(F$,{name:i(e.label),preview:e.offPage?i(R$):e.preview||i("Empty"),offPage:e.offPage,status:e.hidden?ps("span",{className:"sf-entry-eye",role:"img","aria-label":i("Hidden on the page"),children:ps(_$,{name:"eye-off",size:14})}):void 0,onOpen:()=>o(e.key)})}function rh(e){return e.filter(o=>!o.identifier)}function D0({parts:e,onOpen:o,heading:t=!0}){let r=rh(e);return r.length?O$("div",{className:"sf-entries",children:[t?ps("h3",{className:"sf-entries-head",children:i("Text")}):null,r.map(a=>ps(A$,{part:a,onOpen:o},a.key))]}):null}import{HEADER_TYPE as p8,ROOT_ZONE as J0}from"efficient-easel/draw";import{HEADER_TYPE as ho,FOOTER_TYPE as Fe,newNodeId as L$}from"efficient-easel/draw";function Lc(){return{type:ho,props:{id:L$(ho)}}}var N0=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterPayment",label:"Payment Logos"},{type:"FooterGroup",label:"Footer Box"}],B$=N0.filter(e=>e.type!=="FooterLogo"&&e.type!=="FooterGroup"),D$="FooterGroup",M0="blocks";function H0(e){return e===Fe?N0:e===D$?B$:null}function Bc(){let e=(o,t)=>({type:o,props:{id:`${o}-${crypto.randomUUID()}`,...t}});return[e("FooterLogo",{widthPct:100,align:"left",tagline:""}),e("FooterEmailSignup",{...Mb}),e("FooterPayment",{...Hb})]}function ah(e){switch(e?.type){case Oe:case ve:return i("On every page");case ho:case Fe:return i("On every page \xB7 old style");default:return null}}var G0=()=>null,W0=()=>i("Changed on every page");function Dc(e,o){let t=ig(e,o);if(t)return t;let r=b0(e,o);if(!r)return null;let a=r.group===Oe;return r.why==="type"?a?i("The header cannot take another one of these"):i("The footer cannot take another one of these"):a?i("The header holds at most 3 sections"):i("The footer holds at most 6 sections")}import{jsx as Mc,Fragment as j$,jsxs as K$}from"react/jsx-runtime";import{useState as q$}from"react";import{createNode as V$,newId as Y$}from"efficient-easel/data";import{useEasel as X$}from"efficient-easel/easel";import{Banner as Z$,Button as nh}from"efficient-shell/ui";import{useScreenDocument as J$}from"efficient-easel/screen/components/ScreenDocumentContext";var Nc="Flex",N$={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock",FooterPayment:"PaymentLogosBlock"},M$=e=>{let{id:o,...t}=e;return t},z0=e=>typeof e=="string"?e:"",U0={sm:12,md:13,lg:15},H$="md",$0=1.5,G$={size:13,lineHeight:$0,width:280},W$=14,z$=40,U$=e=>e==="center"||e==="right"?e:"left";function $$(e){let o={},t=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(let[r,a]of t){let n=K(e[r]);n&&(o[a]=n)}return o}function j0(e,o){let t=e.props??{},r=N$[e.type];if(r)return[o(r,M$(t))];switch(e.type){case"FooterLogo":{let a=U$(t.align),n=o("LogoBlock",{...t.reverse?{reverse:t.reverse}:{},...typeof t.customColor=="string"&&t.customColor?{customColor:t.customColor}:{},heightPx:Math.round(uI*((K(t.widthPct)??100)/100)),href:"/",align:a,...$$(t)}),s=z0(t.tagline).trim();return s?[n,o("Text",{text:s,tone:"dim",align:a,_partStyles:{text:{...G$}}})]:[n]}case"FooterText":{let a=typeof t.size=="string"&&t.size in U0?t.size:H$;return[o("Text",{text:z0(t.text),tone:typeof t.tone=="string"?t.tone:"default",_partStyles:{text:{size:U0[a],lineHeight:$0}}})]}case"FooterDivider":{let a=K(t.thickness),n=K(t.lengthPct);return[o("Divider",{...a!==void 0?{thickness:a}:{},...n!==void 0?{lengthPct:n}:{},...t.hideOnMobile===!0?{hideOnMobile:!0}:{}})]}case"FooterGroup":{let a=Array.isArray(t.blocks)?t.blocks:[];return[o(Nc,{direction:t.direction==="horizontal"?"row":"column",gap:br("FooterGroup",t.gap),align:t.align==="center"||t.align==="end"||t.align==="stretch"?t.align:"start",...bn,content:a.flatMap(n=>j0(n,o))})]}default:return[]}}function ms(e,o,t){let r=e&&Array.isArray(e.props?.blocks)?e.props.blocks:[],a=d=>o(Nc,{direction:"row",wrap:!0,share:"equal",gap:z$,content:d}),n=[],s=[];for(let d of r){let u=j0(d,o);if(d.type==="FooterDivider"){s.length&&n.push(a(s)),s=[],n.push(...u);continue}u.length<=1?s.push(...u):s.push(o(Nc,{direction:"column",gap:W$,align:"stretch",...bn,content:u}))}(s.length||!n.length)&&n.push(a(s));let l=o(Nc,{direction:"column",content:[o("LegalLineBlock")]}),c=x0(ve,t,[...n,l]);return{...c,props:{...c.props,...e?.props?.width==="full"?{fullWidth:!0}:{}}}}function K0(){let{appState:e,dispatch:o,config:t}=X$(u=>u),{readOnly:r}=J$(),[a,n]=q$(!1),s=e.data.content;if(r||s.some(u=>u.type===ve))return null;let l=s.find(u=>u.type===Fe)??null,c=(u,h)=>V$(t,u,h),d=()=>{let u=ms(l,c,Y$(ve));o({type:"setData",data:h=>({...h,content:[...Ec(h.content,u)]}),recordHistory:!0}),n(!1)};return Mc(Z$,{tone:"info",title:i("This footer uses the old layout"),action:a?K$(j$,{children:[Mc(nh,{variant:"primary",size:"sm",onClick:d,children:i("Switch now")}),Mc(nh,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:i("Cancel")})]}):Mc(nh,{variant:"secondary",size:"sm",onClick:()=>n(!0),children:i("Switch to Box footer")}),children:i("Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.")})}import{jsx as sh,jsxs as Q$}from"react/jsx-runtime";import{InspectorUpLevel as q0}from"efficient-easel/chrome";function V0({nodeId:e,part:o,sectionName:t,onUpToSection:r}){let{select:a}=Xi(),n=La(e,o,"block");return Q$("div",{children:[o!=="media"?sh(q0,{inline:!0,name:i(_a.media),onSelect:()=>a(Un(e,"media"))}):sh(q0,{inline:!0,name:i(t),onSelect:r}),sh(rt,{part:o,motion:n})]})}import{SettingsSwitch as m8}from"efficient-easel/panel";var eT={kind:"header"},ch={kind:"website"},oT={kind:"website",tab:Ea,revealPageGroup:!0},tT={kind:"chat"},rT={kind:"social"},hs="Part";function h8(e){return i("Part of {name}",{name:i(e)})}function x8(e,o,t){let r=e.describeNode(o);return{name:t,kindLabel:r?h8(r.label):i(hs)}}function I8(e){switch(e){case"Header":return{title:i("Header settings belong to a website."),own:i("Each website created from this template sets its own header afterwards.")};case"Appearance":return{title:i("Appearance settings belong to a website."),own:i("Each website created from this template sets its own appearance afterwards.")};case"Live chat":return{title:i("Live chat settings belong to a website."),own:i("Each website created from this template sets its own live chat afterwards.")};case"Social link":return{title:i("Social link settings belong to a website."),own:i("Each website created from this template sets its own social link afterwards.")};default:return{title:i("{what} settings belong to a website.",{what:e}),own:i("Each website created from this template sets its own {what} afterwards.",{what:e.toLowerCase()})}}}function aT({what:e}){let o=I8(e);return Gr("div",{className:"sf-note",children:[ce("p",{children:ce("strong",{children:o.title})}),Gr("p",{children:[i("A template is a blueprint \u2014 it has no website of its own, so there is nothing here to change.")," ",o.own]})]})}function ih(e){let o=zn[e];return{name:_a[e],kindLabel:hs,icon:o,head:(t,r)=>{if(t.kind!==o)return null;let a=r.describeNode(t.nodeId);if(!a)return null;let n=Q0({name:i(Zi(e,a.props)),tier:"part",of:i(a.label)},{partOf:({name:s})=>i("Part of {name}",{name:s})});return{name:n.name,kindLabel:n.kind}},render:(t,r)=>t.kind===o?ce(V0,{nodeId:t.nodeId,part:e,sectionName:r.describeNode(t.nodeId)?.label??"Hero",onUpToSection:()=>r.onSelectNode(t.nodeId)}):null}}var g8={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,o)=>{let t=o.hostPanels?.header;return t?ce(t,{placeholderMode:o.capabilities.placeholderFrames,tokenRef:o.tokenRef,siteId:o.siteId,websiteName:o.websiteName,onOpenWebsiteSettings:o.onOpenWebsiteSettings,onAuthExpired:()=>o.notifyParent("storefront-editor:auth-expired")}):null}},website:{name:"Appearance",kindLabel:"Site settings",icon:"website",render:(e,o)=>ce(Wi,{initialTab:e.tab,revealPageGroup:e.revealPageGroup,themeFromDocument:!o.capabilities.hasSiteTheme,tokenRef:o.tokenRef,siteId:o.siteId,onNotify:o.onNotify},e.tab??"")},chat:{name:"Live chat",kindLabel:"Site settings",icon:"chat",render:()=>ce(Zw,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>ce(rk,{unavailable:ce(aT,{what:"Social link"})})},ticker:{name:Gn,kindLabel:hs,icon:"ticker",head:(e,o)=>e.kind==="ticker"?x8(o,e.heroId,i(Gn)):null,render:e=>ce(lv,{heroId:e.kind==="ticker"?e.heroId:""})},heroMedia:ih("media"),heroImage:ih("image"),heroImage2:ih("image2"),part:{name:hs,kindLabel:hs,icon:"Text",head:(e,o)=>{if(e.kind!=="part")return null;let t=o.describeNode(e.nodeId);if(!t)return null;let{key:r,row:a}=Ho(e.propKey),n=a?Da(t.fields[r],a):t.fields[r],s=iC(i(qu(Fi(n??{},r))),a),l=Q0({name:s,tier:"part",of:i(t.label)},{partOf:({name:c})=>i("Part of {name}",{name:c})});return{name:l.name,kindLabel:l.kind}},render:(e,o)=>e.kind==="part"?ce(l0,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>o.onSelectNode(e.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},b8=new Set(["header","website","chat"]);function y8(e,o){if(e==="selection")return null;let t=g8[e];return b8.has(e)&&!o.hasSiteSettings?{...t,kindLabel:"Not part of a template",render:()=>ce(aT,{what:t.name})}:t}function nT({mode:e,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onOpenPageStyles:r,onSelectNode:a,hideNodeActions:n=!1,onNotify:s,onHidePanel:l}){let{capabilities:c,tokenRef:d,notifyParent:u,currentSlug:h,siteId:p,runAuthed:x,readOnly:g,navigate:y}=d8(),{rows:E}=Nn(),O=E?.find(ie=>ie.slug===h)??null,C=t8(),I=Object.keys(C.fields).some(ie=>!ie.startsWith("_")&&!Ln.includes(ie)),{websiteName:w}=ne(),v=f8({readOnly:g}),{select:k}=u8(),{selectedItem:R,getItemById:B,getSelectorForId:P,config:_,appState:N}=o8(ie=>ie),b=i8(_,R?{type:R.type,props:R.props}:null),F=R?hC(b??_.components[R.type]?.fields,R.props):[],A=ie=>_.components[ie]?.label??ie,H=R?P(R.props.id):void 0,z=y8(e.kind,c),Z=c8(),j={capabilities:c,tokenRef:d,hostPanels:Z.chrome?.panels,describeNode:ie=>{let pe=B(ie);if(!pe)return null;let Be=_.components[pe.type];return{type:pe.type,label:Be?.label??pe.type,fields:Be?.fields??{},props:pe.props??{}}},siteId:p,websiteName:w??null,notifyParent:u,onNotify:s,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onSelectNode:a},Ae=z?.head?.(e,j)??null,ge=jw({kind:O?.kind,pageName:O?.label}),Ye=Ae?.name??(z?i(z.name):R?i(A(R.type)):ge.name),We=Ae?.kindLabel??(z?i(z.kindLabel):R?H&&H.zone!==J0?i("Block"):i("Section"):ge.kindLabel),Pe=z?z.icon:R?R.type:"page",ue=z?null:R?_.components[R.type]?.fields??null:_.root?.fields??null,Ce=ue?Lk(ue):2,Qe=lh(e)&&R?ss(R.type):null,so=!!R&&!!H&&H.zone===J0&&R.type!==Fe&&R.type!==p8,le=Dc(N?.data,R),Le=()=>{le||H&&v.duplicateComponent(H.zone,H.index)},po=()=>{H&&(v.removeComponent(H.zone,H.index),v.select(null))},_e=R?_.components[R.type]?.defaultProps?.previewHover:void 0,ze=lh(e)&&!!R&&!!H&&_e!==void 0,qo=ze&&R.props.previewHover===!0,Pt=()=>{!R||!H||v.replaceComponent(H.zone,H.index,{...R,props:{...R.props,previewHover:!qo}})},[Vo,M]=e8(Cp);return Gr("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right${Vo||!(!z&&R)?"":" sf-hints-folded"}`,children:[ce(n8,{icon:ce(Fr,{type:Pe,size:15}),name:Ye,kind:We,actions:!n&&lh(e)&&R&&R.type!==Fe?Gr(Y0,{children:[ce(X0,{label:i("Duplicate section"),title:le??void 0,disabled:le!==null,onClick:Le,children:ce(s8,{size:15})}),so&&c.hasSiteSettings&&ce(B0,{node:R,currentSlug:h,siteId:p??void 0,tokenRef:d,runAuthed:x,onNotify:s}),ce(X0,{label:i("Remove section"),danger:!0,onClick:po,children:ce(l8,{size:15})}),l?ce(Z0,{side:"right",onHide:l,divider:!0}):null]}):l?ce(Z0,{side:"right",onHide:l}):void 0}),ze&&Gr("div",{className:"sf-preview-pin",children:[Gr("div",{className:"sf-preview-pin-text",children:[ce("span",{className:"sf-preview-pin-label",children:i("Preview hover state")}),ce("span",{className:"sf-preview-pin-hint",children:i("not shown live")})]}),ce(m8,{checked:qo,onChange:Pt,ariaLabel:i("Preview hover state")})]}),ce(Uy,{tier:Ce,children:ce("div",{className:"sf-insp-body es-insp-body sf-scroll",children:z?z.render(e,j):R?Gr(Y0,{children:[R.type===Fe&&c.hasSiteSettings&&ce(K0,{}),ce(Yg,{children:ce(rt,{entries:ce(D0,{parts:F,heading:!1,onOpen:ie=>k(Ei(R.props.id,ie))}),entryCount:rh(F).length})}),Qe&&ce(wc,{source:Qe,slug:ns(R?.props),menuId:gc(R?.props)}),ce(wp,{shown:Vo,onChange:M})]}):I?ce(rt,{omit:Ln}):ce(a8,{variant:"none",icon:!1,message:i("Select a section or block to edit it."),children:r&&ce(r8,{variant:"secondary",onClick:r,children:i("This page")})})})})]})}import{jsx as f,jsxs as T,Fragment as dT}from"react/jsx-runtime";var Ve={dark:"var(--sf-thumb-bar-dark)",soft:"var(--sf-thumb-bar-light)",accent:"var(--sf-thumb-accent)",tint:"var(--sf-thumb-accent-tint)",block:"var(--sf-thumb-block)",line:"var(--sf-thumb-border)",card:"var(--sf-thumb-card)"},dh="repeating-linear-gradient(135deg,var(--sf-thumb-hatch1) 0,var(--sf-thumb-hatch1) 5px,var(--sf-thumb-hatch2) 5px,var(--sf-thumb-hatch2) 10px)";function G({w:e,h:o,tone:t="dark",r=2,style:a}){return f("div",{style:{width:e,height:o,borderRadius:r,background:Ve[t],flex:"none",...a}})}var S8={Hero:"hero",HeroSingle:"herosingle",IntroBleed:"intro",Collections:"collections",AlloyWheelsListing:"wheelslisting",CatalogFilterBar:"catalogfilterbar",ProductGrid:"productgrid",FitmentFinder:"fitmentfinder",Gallery:"gallery",GalleryB:"gallerygrid",SpecStrip:"specstrip",ProductHero:"producthero",SpecTable:"spectable",ProcessSteps:"processsteps",DetailRows:"detailrows",FitmentTable:"fitmenttable",CompatibleTyres:"compatibletyres",TyreSizes:"tyresizes",TyreFitment:"tyrefitment",EuTyreLabel:"eutyrelabel",RelatedProducts:"productgrid",BundleOffer:"bundleoffer",OrderSummary:"ordersummary",DeliveryOptions:"deliveryoptions",PaymentBadges:"paymentbadges",CheckoutCTA:"checkoutcta",Manifesto:"manifesto",ParagraphsA:"paragraphs",Prose:"prose",StatsParagraph:"statsparagraph",Chart:"chart",Mockup:"mockup",Footprint:"footprint",Timeline:"timeline",TimelineTrack:"timelinetrack",TitleWithButtons:"titlewithbuttons",Split:"split",Cards:"cards",FAQ:"faq",Testimonials:"testimonials",Masthead:"masthead",Breadcrumb:"breadcrumb",CategoryBar:"categorybar",FeaturedCover:"featuredcover",LongRead:"longread",Series:"series",Subscribe:"subscribe",SubscribeBlogs:"subscribe",Events:"events",DocMasthead:"docmasthead",DocTabs:"doctabs",DocBody:"docbody",DocMetaCards:"docmetacards",Banner:"banner",Stats:"stats",KeyFeatures:"keyfeatures",Logos:"logos",Ticker:"ticker",Countdown:"countdown",Reviews:"reviews",SubmitBuild:"submitbuild",ReviewForm:"reviewform",Form:"form",AppointmentBooking:"appointmentbooking",ContactRouting:"contact",ContactLocations:"contactlocations",CityPictures:"citypictures",CityMaps:"citymaps",Header:"header",Footer:"footer",SectionHeader:"sectionheader",Grid:"grid",Flex:"blanksection",Spacer:"spacer",Divider:"divider",CustomHTML:"customhtml",Heading:"heading",Text:"text",ImageBlock:"image",ButtonBlock:"button",MenuBlock:"menu",EmailFormBlock:"emailform",SocialLogosBlock:"sociallogos",PaymentLogosBlock:"paymentlogos",LegalLineBlock:"legalline",SearchBlock:"search",CartBlock:"cart",CountrySwitchBlock:"countryswitch"},U={position:"absolute",inset:0},m={ink:"var(--sf-thumb-ink)",ink2:"var(--sf-thumb-ink-2)",inkSoft:"var(--sf-thumb-ink-soft)",inkSoft2:"var(--sf-thumb-ink-soft-2)",paper:"var(--sf-thumb-paper)",paper2:"var(--sf-thumb-paper-2)",warm:"var(--sf-thumb-warm)",rust:"var(--sf-thumb-rust)",onInk:"var(--sf-thumb-on-ink)",text:"var(--sf-thumb-scene-text)",muted:"var(--sf-thumb-scene-muted)",rule:"var(--sf-thumb-scene-rule)",mark1:"var(--sf-thumb-mark-1)",mark2:"var(--sf-thumb-mark-2)",card:"var(--sf-thumb-card)",scrim:"var(--sf-thumb-scrim)"},Ee=(e,o,t=160)=>({background:`linear-gradient(${t}deg,${e},${o})`});function kt({size:e,style:o}){let t=Math.max(2,Math.round(e*.13)),r=(a,n,s)=>({position:"absolute",inset:a,background:n,borderRadius:t,...s?{mixBlendMode:s}:null});return T("span",{style:{position:"absolute",display:"block",width:e,height:e,...o},children:[f("span",{style:r("8% 26% 30% 6%",m.mark1)}),f("span",{style:r("26% 6% 8% 30%",m.mark2,"multiply")})]})}function Gc({children:e}){return f("span",{style:{fontSize:"4.64cqw",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:m.muted},children:e})}function sT({over:e,overTone:o,head:t,headSize:r=11.5,cta:a,ctaBg:n,ctaFg:s,tone:l}){return T(dT,{children:[e&&f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:o},children:e}),f("span",{style:{fontSize:r,lineHeight:1.15,fontWeight:700,maxWidth:"78%",color:l},children:t}),a&&f("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,marginTop:2,background:n,color:s},children:a})]})}function fh({name:e,price:o}){return T("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[f("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",...Ee(m.paper,m.paper2,150)},children:f(kt,{size:34,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),f("span",{style:{fontSize:"3.65cqw",fontWeight:600,color:m.text},children:e}),f("span",{style:{fontSize:"3.65cqw",color:m.muted},children:o})]})}function wt({k:e,v:o,ok:t}){return T("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,padding:"3.5px 2px",borderBottom:`1px solid ${m.rule}`,fontSize:"3.98cqw",color:m.muted},children:[f("span",{children:e}),T("span",{style:{display:"flex",gap:6,alignItems:"center"},children:[f("b",{style:{color:m.text,fontWeight:700},children:o}),t&&f("span",{style:{color:m.rust,fontWeight:700},children:"\u2713"})]})]})}function ye({title:e,children:o}){return T("div",{style:{...U,background:m.card,padding:"9px 10px",display:"flex",flexDirection:"column",gap:6},children:[f(Gc,{children:e}),o]})}function lT({size:e=14}){return f("span",{style:{width:e,height:e,borderRadius:"50%",flex:"none",display:"block",background:`linear-gradient(150deg,${m.mark1},${m.mark2})`}})}function uh({filled:e=5,size:o=6}){return T("span",{style:{fontSize:o,letterSpacing:"0.06em",color:m.rust,lineHeight:1},children:["\u2605".repeat(e),f("span",{style:{color:m.mark1},children:"\u2605".repeat(5-e)})]})}function xs({n:e,label:o,tone:t=m.text}){return T("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[f("b",{style:{fontSize:"8.16cqw",lineHeight:1,color:t},children:e}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",opacity:.62,color:t},children:o})]})}function no({children:e,w:o}){return f("span",{style:{fontSize:"3.98cqw",lineHeight:1.45,color:m.muted,width:o,display:"block"},children:e})}function Hc({label:e,w:o="100%",filled:t}){return T("div",{style:{width:o,display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:m.muted},children:e}),f("span",{style:{height:9,borderRadius:3,border:`1px solid ${m.rule}`,background:t?m.paper:m.card}})]})}function iT({children:e}){return f("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:m.text,color:m.onInk},children:e})}var C8={wheelslisting:f(ye,{title:"All wheels",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Ridge 19","20\xD79 +12","$365"],["Ridge 29","18\xD79 +20","$410"],["Ridge 39","17\xD78 \u221210","$455"]].map(([e,o,t])=>T("div",{style:{display:"flex",alignItems:"center",gap:6},children:[f("span",{style:{width:20,height:15,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",...Ee(m.paper,m.paper2,150)},children:f(kt,{size:12,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),f("b",{style:{flex:1,fontSize:"4.31cqw",color:m.text},children:e}),f("span",{style:{fontSize:"3.65cqw",color:m.muted},children:o}),f("b",{style:{fontSize:"4.31cqw",color:m.text,width:26,textAlign:"right"},children:t})]},e))})}),catalogfilterbar:T("div",{style:{...U,background:m.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[T("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[["20 inch","6\xD7139.7","Black"].map(e=>T("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"4px 7px",borderRadius:99,background:m.text,color:m.onInk,display:"flex",gap:4,alignItems:"center"},children:[e,f("span",{style:{opacity:.6},children:"\u2715"})]},e)),f("span",{style:{fontSize:"3.65cqw",color:m.rust,fontWeight:700},children:"Clear"})]}),T("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[f("span",{style:{fontSize:"3.65cqw",color:m.muted},children:"128 results"}),f("span",{style:{fontSize:"3.65cqw",color:m.muted,border:`1px solid ${m.rule}`,borderRadius:3,padding:"3px 6px"},children:"Sort: Price \u25BE"})]})]}),fitmentfinder:T("div",{style:{...U,padding:"10px 12px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center",...Ee(m.ink,m.inkSoft)},children:[f("span",{style:{fontSize:"5.31cqw",fontWeight:700,color:m.onInk},children:"Will it fit your rig?"}),T("div",{style:{display:"flex",gap:4},children:[["2021","Toyota","Hilux"].map(e=>T("span",{style:{flex:1,fontSize:"3.65cqw",color:m.text,background:m.card,borderRadius:3,padding:"5px 6px",display:"flex",justifyContent:"space-between"},children:[e," ",f("span",{style:{color:m.muted},children:"\u25BE"})]},e)),f("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.08em",background:m.warm,color:m.ink,borderRadius:3,padding:"5px 7px"},children:"GO"})]})]}),compatibletyres:f(ye,{title:"Tyres that suit",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Ridge Grappler","$489"],["Trail Grappler","$525"],["Terra Grappler","$438"]].map(([e,o])=>T("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[f("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",background:m.ink},children:f("span",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)",width:26,height:26,borderRadius:"50%",border:`5px solid ${m.mark2}`,boxSizing:"border-box"}})}),f("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:m.text,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e}),f("span",{style:{fontSize:"3.32cqw",color:m.muted},children:o})]},e))})}),tyresizes:f(ye,{title:"Available sizes",children:f("div",{style:{flex:1,display:"flex",flexWrap:"wrap",gap:4,alignContent:"center"},children:["265/65R17","285/70R17","265/60R18","275/55R20"].map((e,o)=>f("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"5px 7px",borderRadius:3,border:`1px solid ${o===0?m.rust:m.rule}`,color:o===0?m.rust:m.text,background:o===0?m.paper:m.card},children:e},e))})}),tyrefitment:T(ye,{title:"Will it fit your car?",children:[f("div",{style:{display:"flex",gap:3},children:["Make","Model","Year","Trim"].map(e=>T("span",{style:{flex:1,minWidth:0,fontSize:"3.32cqw",color:m.muted,background:m.paper,border:`1px solid ${m.rule}`,borderRadius:3,padding:"4px 5px",display:"flex",justifyContent:"space-between",gap:2,overflow:"hidden",whiteSpace:"nowrap"},children:[e," ",f("span",{style:{color:m.muted},children:"\u25BE"})]},e))}),f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2,justifyContent:"center",minHeight:0},children:[["265/65R17","Fits",!0],["285/70R17","Not your size",!1]].map(([e,o,t])=>T("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:6,borderTop:`1px solid ${m.rule}`,paddingTop:3},children:[f("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:m.text},children:e}),f("span",{style:{fontSize:"3.32cqw",fontWeight:t?700:400,letterSpacing:"0.06em",color:t?m.warm:m.muted},children:o})]},e))})]}),eutyrelabel:T("div",{style:{...U,background:m.card,padding:"9px 11px",display:"flex",gap:8,alignItems:"center"},children:[f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1.5},children:[["A","42%"],["B","56%"],["C","70%"],["D","84%"]].map(([e,o],t)=>T("div",{style:{display:"flex",alignItems:"center",gap:3},children:[f("span",{style:{width:o,height:6,borderRadius:"0 2px 2px 0",background:t===1?m.rust:m.mark1}}),f("span",{style:{fontSize:"3.32cqw",fontWeight:700,color:t===1?m.rust:m.muted},children:e})]},e))}),T("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:3,alignItems:"center"},children:[f("b",{style:{fontSize:"6.63cqw",lineHeight:1,color:m.text},children:"72"}),f("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",color:m.muted},children:"dB"})]})]}),bundleoffer:T("div",{style:{...U,background:m.paper,padding:"9px 11px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[f(Gc,{children:"Buy it with"}),T("div",{style:{display:"flex",alignItems:"center",gap:5},children:[[0,1].map(e=>f("span",{style:{width:26,height:22,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",background:m.card},children:f(kt,{size:17,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})},e)),f("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:m.muted},children:"+"}),T("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1},children:[f("span",{style:{fontSize:"3.65cqw",color:m.muted,textDecoration:"line-through"},children:"$1,024"}),f("b",{style:{fontSize:"6.02cqw",color:m.rust,lineHeight:1},children:"$899"})]})]})]}),checkoutcta:T("div",{style:{...U,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,...Ee(m.ink,m.ink2)},children:[T("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",color:m.warm,fontWeight:700},children:"READY TO ORDER"}),f("b",{style:{fontSize:"6.63cqw",color:m.onInk,lineHeight:1},children:"$1,956"}),f("span",{style:{fontSize:"3.65cqw",color:m.onInk,opacity:.65},children:"4 items \xB7 fitted free"})]}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"6px 10px",borderRadius:2,background:m.warm,color:m.ink,flex:"none"},children:"CHECKOUT"})]}),contact:f(ye,{title:"Who do you need?",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Fitment help","the workshop"],["Order status","the front desk"],["Trade accounts","sales"]].map(([e,o])=>T("div",{style:{display:"flex",alignItems:"center",gap:5},children:[f("b",{style:{flex:1,fontSize:"4.31cqw",color:m.text},children:e}),f("span",{style:{fontSize:"3.65cqw",color:m.muted},children:o}),f("span",{style:{fontSize:"4.64cqw",color:m.rust,lineHeight:1},children:"\u203A"})]},e))})}),contactlocations:f(ye,{title:"Find us",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:5,minHeight:0},children:[["Brisbane","7 Kerry Rd","Mon\u2013Sat"],["Townsville","12 Enterprise","Mon\u2013Fri"]].map(([e,o,t])=>T("div",{style:{border:`1px solid ${m.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[f("b",{style:{fontSize:"4.31cqw",color:m.text},children:e}),f("span",{style:{fontSize:"3.32cqw",color:m.muted},children:o}),f("span",{style:{fontSize:"3.32cqw",color:m.rust,fontWeight:700},children:t})]},e))})}),citypictures:f(ye,{title:"Our studios",children:T("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:3,minHeight:0},children:[f("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.12em",fontWeight:700,color:m.muted},children:"A \xB7 AMERICAS"}),f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:["Los Angeles","Miami","Toronto"].map(e=>T("div",{style:{position:"relative",minHeight:0},children:[f(G,{r:3,style:{...U,background:`linear-gradient(transparent 45%,${m.scrim} 45%),${Ee(m.ink,m.inkSoft2).background}`}}),f("b",{style:{position:"absolute",left:5,bottom:4,fontSize:"3.65cqw",color:m.onInk},children:e})]},e))})]})}),citymaps:f(ye,{title:"Find us",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:5,minHeight:0},children:[["Brisbane","7 Kerry Rd"],["Townsville","12 Enterprise"]].map(([e,o])=>T("div",{style:{position:"relative",padding:"4px 5px",display:"flex",flexDirection:"column",gap:2,minHeight:0},children:[f(G,{r:4,style:{...U,background:"none",border:`1px solid ${m.rule}`}}),f("b",{style:{position:"relative",fontSize:"4.31cqw",color:m.text},children:e}),f("span",{style:{position:"relative",fontSize:"3.32cqw",color:m.muted},children:o}),T("div",{style:{flex:1,minHeight:0,position:"relative"},children:[f(G,{r:3,style:{...U,...Ee(m.paper,m.paper2,150)}}),f(G,{w:"60%",h:"60%",r:8,style:{position:"absolute",left:"12%",top:"20%",background:m.mark1,opacity:.75}}),f(G,{w:6,h:6,r:3,style:{position:"absolute",left:"44%",top:"34%",background:m.rust}})]})]},e))})}),form:f(ye,{title:"Send us a message",children:T("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[T("div",{style:{display:"flex",gap:5},children:[f(Hc,{label:"Name"}),f(Hc,{label:"Email"})]}),f(Hc,{label:"Message",filled:!0}),f(iT,{children:"SEND"})]})}),appointmentbooking:f(ye,{title:"Book a fitting",children:T("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("div",{style:{display:"flex",gap:3},children:["Mon","Tue","Wed","Thu"].map((e,o)=>f("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",fontWeight:o===2?700:500,padding:"4px 0",borderRadius:3,background:o===2?m.text:m.paper,color:o===2?m.onInk:m.muted},children:e},e))}),f("div",{style:{display:"flex",gap:3},children:["8:00","10:30","13:00","15:30"].map((e,o)=>f("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",padding:"4px 0",borderRadius:3,border:`1px solid ${o===1?m.rust:m.rule}`,color:o===1?m.rust:m.muted,background:o===3?m.paper:m.card,textDecoration:o===3?"line-through":"none"},children:e},e))})]})}),reviewform:f(ye,{title:"Leave a review",children:T("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[f(uh,{filled:4,size:14}),f(Hc,{label:"Your review",filled:!0}),f(iT,{children:"POST"})]})}),submitbuild:f(ye,{title:"Show us your build",children:T("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,border:`1px dashed ${m.mark1}`,borderRadius:5,background:m.paper},children:[f("span",{style:{fontSize:"6.63cqw",lineHeight:1,color:m.rust,fontWeight:300},children:"+"}),f("span",{style:{fontSize:"3.65cqw",color:m.muted},children:"Drop a photo of your rig"})]})}),masthead:T("div",{style:{...U,background:m.paper,display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 13px",gap:5},children:[f("span",{style:{height:1.5,background:m.text}}),f("span",{style:{fontSize:"7.65cqw",fontWeight:800,letterSpacing:"0.02em",color:m.text,lineHeight:1},children:"THE TRACK"}),T("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"3.65cqw",letterSpacing:"0.1em",textTransform:"uppercase",color:m.muted},children:[f("span",{children:"Issue 14"}),f("span",{children:"Spring 2026"})]}),f("span",{style:{height:1,background:m.rule}})]}),featuredcover:T("div",{style:{...U,overflow:"hidden",...Ee(m.ink,m.inkSoft2)},children:[f(kt,{size:92,style:{right:-18,top:-14}}),f("div",{style:{position:"absolute",inset:0,background:`linear-gradient(0deg,${m.scrim},transparent 62%)`}}),T("div",{style:{position:"absolute",left:12,right:12,bottom:11,display:"flex",flexDirection:"column",gap:3},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:m.warm},children:"FEATURE"}),f("span",{style:{fontSize:"6.16cqw",lineHeight:1.15,fontWeight:700,color:m.onInk},children:"Four days on the Madigan Line"})]})]}),longread:T("div",{style:{...U,background:m.card,padding:"10px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.14em",fontWeight:700,color:m.rust},children:"12 MIN READ"}),f("span",{style:{fontSize:"6.02cqw",lineHeight:1.15,fontWeight:700,color:m.text},children:"What breaks first, and why"}),f(no,{children:"Every failure starts in the same place \u2014 not the rim, not"}),f(no,{w:"62%",children:"the tyre, but the bolt nobody re-torqued."})]}),series:f(ye,{title:"Recurring columns",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[["Shed Notes","Monthly"],["Track Tested","Fortnightly"],["Reader Rigs","Weekly"]].map(([e,o])=>T("div",{style:{display:"flex",alignItems:"center",gap:6},children:[f("span",{style:{width:3,height:12,borderRadius:2,background:m.rust,flex:"none"}}),f("b",{style:{flex:1,fontSize:"4.64cqw",color:m.text},children:e}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:m.muted},children:o})]},e))})}),events:f(ye,{title:"Latest posts",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[[m.inkSoft,m.inkSoft2,"Madigan Line, four days"],[m.rust,m.warm,"Why offset beats width"]].map(([e,o,t])=>T("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[f("span",{style:{width:24,height:18,borderRadius:3,flex:"none",...Ee(e,o,150)}}),T("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[f("b",{style:{fontSize:"4.31cqw",color:m.text},children:t}),f("span",{style:{fontSize:"3.65cqw",color:m.muted},children:"4 Sep \xB7 Shed Notes"})]})]},t))})}),docmasthead:T("div",{style:{...U,background:m.card,padding:"12px 14px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:m.muted},children:"POLICY"}),f("span",{style:{fontSize:"6.49cqw",fontWeight:700,color:m.text,lineHeight:1.1},children:"Returns & refunds"}),f("span",{style:{fontSize:"3.65cqw",color:m.muted},children:"Version 3 \xB7 Updated 4 Sep 2026"}),f("span",{style:{height:2,width:26,background:m.rust,borderRadius:1}})]}),docbody:f("div",{style:{...U,background:m.card,padding:"9px 13px",display:"flex",flexDirection:"column",gap:3,justifyContent:"center"},children:[["1.","You may return an unfitted wheel within 30 days."],["2.","Fitted wheels are covered by the structural warranty."],["3.","Freight on a change of mind is yours."]].map(([e,o])=>T("div",{style:{display:"flex",gap:5},children:[f("b",{style:{fontSize:"3.98cqw",color:m.rust,flex:"none"},children:e}),f(no,{children:o})]},e))}),docmetacards:f(ye,{title:"At a glance",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:5,minHeight:0},children:[["30 days","To return"],["5 years","Structural"],["Free","Fitting"],["48 hrs","Dispatch"]].map(([e,o])=>T("div",{style:{border:`1px solid ${m.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[f("b",{style:{fontSize:"5.31cqw",color:m.text,lineHeight:1},children:e}),f("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:m.muted},children:o})]},o))})}),doctabs:T("div",{style:{...U,background:m.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:0,padding:"0 11px"},children:[f("div",{style:{display:"flex",gap:0},children:["Returns","Warranty","Shipping"].map((e,o)=>f("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"5px 8px",color:o===0?m.text:m.muted,background:o===0?m.paper:"transparent",borderRadius:"4px 4px 0 0",border:`1px solid ${o===0?m.rule:"transparent"}`,borderBottom:"none"},children:e},e))}),f("span",{style:{height:1,background:m.rule}}),T("div",{style:{paddingTop:6,display:"flex",flexDirection:"column",gap:2},children:[f(no,{children:"Unfitted wheels come back within 30 days, no questions."}),f(no,{w:"58%",children:"Freight on a change of mind is yours."})]})]}),paragraphs:T("div",{style:{...U,background:m.card,padding:"11px 14px",display:"flex",gap:10,alignItems:"center"},children:[f("span",{style:{flex:1,fontSize:"5.86cqw",lineHeight:1.2,fontWeight:700,color:m.text},children:"The right wheel is the boring one."}),T("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[f(no,{children:"Forged, correctly offset, rated for what you actually"}),f(no,{children:"carry. Everything else is a photograph."})]})]}),keyfeatures:f(ye,{title:"Key features",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:["Flow-formed barrel","1250 kg per corner","Hub-centric fit"].map(e=>T("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[f("span",{style:{fontSize:"4.64cqw",color:m.rust,fontWeight:700,lineHeight:1},children:"\u2713"}),f("span",{style:{fontSize:"4.31cqw",color:m.text},children:e})]},e))})}),statsparagraph:T("div",{style:{...U,background:m.paper,padding:"10px 12px",display:"flex",gap:10,alignItems:"center"},children:[T("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:5},children:[f(xs,{n:"27k",label:"Rigs"}),f(xs,{n:"4.9",label:"Rating"})]}),T("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[f(no,{children:"Twelve years of fitting the same three questions, and the"}),f(no,{children:"answer has not moved: load rating, offset, then looks."})]})]}),chart:T(ye,{title:"Load vs weight",children:[f("div",{style:{flex:1,display:"flex",alignItems:"flex-end",gap:5,paddingBottom:2},children:[38,62,84,71,96].map((e,o)=>f("span",{style:{flex:1,height:`${e}%`,borderRadius:"2px 2px 0 0",background:o===4?m.rust:m.mark1}},o))}),f("span",{style:{height:1,background:m.rule,marginTop:-4}})]}),mockup:f("div",{style:{...U,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",...Ee(m.inkSoft,m.ink)},children:T("div",{style:{width:"72%",height:"74%",borderRadius:4,overflow:"hidden",background:m.card,boxShadow:`0 6px 14px ${m.scrim}`},children:[f("div",{style:{height:9,background:m.paper,display:"flex",alignItems:"center",gap:2,padding:"0 4px"},children:[0,1,2].map(e=>f("span",{style:{width:2.5,height:2.5,borderRadius:"50%",background:m.mark1}},e))}),T("div",{style:{padding:5,display:"flex",flexDirection:"column",gap:3},children:[f("span",{style:{height:4,width:"56%",borderRadius:1,background:m.mark2}}),f("span",{style:{height:14,borderRadius:2,...Ee(m.paper,m.paper2,150)}}),f("span",{style:{height:3,width:"38%",borderRadius:1,background:m.rust}})]})]})}),manifesto:f("div",{style:{...U,overflow:"hidden",display:"flex",alignItems:"center",padding:"0 16px",...Ee(m.ink,m.ink2)},children:T("span",{style:{fontSize:"6.63cqw",lineHeight:1.2,fontWeight:700,color:m.onInk},children:["We build for the ",f("span",{style:{color:m.warm},children:"last"})," ten percent of the track."]})}),timeline:f(ye,{title:"Our story",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:6,paddingLeft:4},children:[["1998","One shed, one lathe."],["2009","First forged rim."],["2024","27,000 rigs on."]].map(([e,o],t)=>T("div",{style:{display:"flex",gap:7,alignItems:"flex-start",position:"relative"},children:[t<2&&f("span",{style:{position:"absolute",left:3,top:8,bottom:-8,width:1,background:m.rule}}),f("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",marginTop:1,background:m.rust,zIndex:1}}),T("div",{style:{display:"flex",flexDirection:"column",gap:0,minWidth:0},children:[f("b",{style:{fontSize:"4.64cqw",color:m.text},children:e}),f(no,{children:o})]})]},e))})}),timelinetrack:T("div",{style:{...U,padding:"0 12px",display:"flex",flexDirection:"column",gap:10,justifyContent:"center",...Ee(m.ink,m.inkSoft)},children:[f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:m.warm},children:"Milestones"}),T("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",paddingTop:7},children:[f("span",{style:{position:"absolute",left:0,right:0,top:3,height:1,background:m.mark2,opacity:.55}}),["1998","2009","2016","2024"].map((e,o)=>T("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,position:"relative"},children:[f("span",{style:{position:"absolute",top:-7,width:6,height:6,borderRadius:"50%",background:o===3?m.warm:m.mark1}}),f("span",{style:{fontSize:"4.31cqw",fontWeight:700,color:o===3?m.warm:m.onInk,opacity:o===3?1:.75},children:e})]},e))]})]}),footprint:T("div",{style:{...U,overflow:"hidden",...Ee(m.paper,m.paper2,150)},children:[f("span",{style:{position:"absolute",left:"8%",top:"18%",width:"62%",height:"64%",borderRadius:"48% 52% 40% 60% / 55% 45% 55% 45%",background:m.mark1,opacity:.75}}),f("span",{style:{position:"absolute",left:"52%",top:"52%",width:"34%",height:"34%",borderRadius:"58% 42% 55% 45% / 45% 58% 42% 55%",background:m.mark2,opacity:.55}}),[["26%","38%"],["44%","58%"],["62%","34%"]].map(([e,o])=>f("span",{style:{position:"absolute",left:e,top:o,width:7,height:7,borderRadius:"50% 50% 50% 0",transform:"rotate(-45deg)",background:m.rust}},e)),f("span",{style:{position:"absolute",left:11,bottom:9,fontSize:"4.64cqw",fontWeight:700,color:m.text},children:"3 fitting bays"})]}),banner:T("div",{style:{...U,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,background:m.rust},children:[T("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[f("b",{style:{fontSize:"6.02cqw",color:m.onInk},children:"End of season \xB7 20% off"}),f("span",{style:{fontSize:"3.98cqw",color:m.onInk,opacity:.8},children:"Fitted free, this month only."})]}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:m.onInk,color:m.text,flex:"none"},children:"SHOP"})]}),titlewithbuttons:T("div",{style:{...U,background:m.paper,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:7,padding:"0 14px",textAlign:"center"},children:[f("span",{style:{fontSize:"6.49cqw",lineHeight:1.15,fontWeight:700,color:m.text},children:"Not sure what fits?"}),T("div",{style:{display:"flex",gap:5},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:m.text,color:m.onInk},children:"FIND MY FIT"}),f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,border:`1px solid ${m.text}`,color:m.text},children:"CALL US"})]})]}),ticker:f("div",{style:{...U,overflow:"hidden",background:m.ink,display:"flex",alignItems:"center"},children:f("span",{style:{whiteSpace:"nowrap",fontSize:"6.29cqw",fontWeight:800,letterSpacing:"0.06em",color:m.warm,marginLeft:-14},children:"FREE FITTING \xB7 48HR DISPATCH \xB7 FREE FITTING \xB7 48HR DISPATCH"})}),countdown:T("div",{style:{...U,padding:"10px 12px",display:"flex",flexDirection:"column",alignItems:"center",gap:6,justifyContent:"center",...Ee(m.ink,m.ink2)},children:[f("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.16em",textTransform:"uppercase",color:m.muted},children:"Back online in"}),f("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[["23","Hours"],["59","Minutes"],["48","Seconds"]].map(([e,o],t)=>T("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[t>0&&f("b",{style:{fontSize:"9.5cqw",lineHeight:1,color:m.warm},children:":"}),T("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[f("b",{style:{fontSize:"11.5cqw",lineHeight:1,color:m.onInk,fontVariantNumeric:"tabular-nums"},children:e}),f("span",{style:{fontSize:"3.2cqw",letterSpacing:"0.1em",textTransform:"uppercase",opacity:.62,color:m.onInk},children:o})]})]},o))})]}),breadcrumb:f("div",{style:{...U,background:m.card,display:"flex",alignItems:"center",padding:"0 13px"},children:T("span",{style:{fontSize:"4.64cqw",color:m.muted},children:["Home ",f("span",{style:{opacity:.5},children:"/"})," Wheels ",f("span",{style:{opacity:.5},children:"/"})," ",f("span",{style:{color:m.text,fontWeight:700},children:"20 inch"})]})}),categorybar:T("div",{style:{...U,background:m.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[f("div",{style:{display:"flex",gap:5},children:["All","Wheels","Tyres","Lift"].map((e,o)=>f("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"4px 7px",borderRadius:99,background:o===0?m.text:m.paper,color:o===0?m.onInk:m.muted},children:e},e))}),f("span",{style:{height:1,background:m.rule}})]}),intro:T("div",{style:{...U,overflow:"hidden",background:m.card},children:[f("div",{style:{position:"absolute",inset:0,...Ee(m.ink,m.inkSoft2)}}),f(kt,{size:64,style:{right:8,top:6}}),T("div",{style:{position:"absolute",left:16,right:16,bottom:8,top:"46%",background:m.paper,borderRadius:6,padding:"8px 11px",display:"flex",flexDirection:"column",gap:2,boxShadow:`0 -4px 10px ${m.scrim}`},children:[f("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:m.text},children:"Since 1998"}),f(no,{children:"One shed, one lathe, one idea."}),f(no,{w:"66%",children:"It turned out to be right."})]})]}),gallerygrid:f(ye,{title:"From our customers",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gridTemplateRows:"repeat(2,1fr)",gap:4,minHeight:0},children:[[m.rust,m.warm],[m.inkSoft,m.ink],[m.paper2,m.mark2],[m.ink,m.inkSoft2],[m.warm,m.paper2],[m.mark2,m.inkSoft]].map(([e,o],t)=>f("div",{style:{borderRadius:3,...Ee(e,o,140+t*22)}},t))})}),gallery:T(ye,{title:"Gallery",children:[f("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:-2},children:["On the truck","Studio","Close-ups"].map((e,o)=>f("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,color:o===0?m.text:m.muted,borderBottom:`1.5px solid ${o===0?m.rust:"transparent"}`,paddingBottom:2},children:e},e))}),f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:[[m.rust,m.warm],[m.ink,m.inkSoft],[m.paper2,m.mark2]].map(([e,o],t)=>f("div",{style:{borderRadius:3,...Ee(e,o,150+t*20)}},t))})]}),ordersummary:T(ye,{title:"Order summary",children:[T("div",{style:{display:"flex",gap:6,alignItems:"center",paddingBottom:4},children:[f("span",{style:{width:26,height:26,borderRadius:4,position:"relative",overflow:"hidden",flex:"none",...Ee(m.paper,m.paper2,150)},children:f(kt,{size:18,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),T("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[f("b",{style:{fontSize:"4.31cqw",color:m.text},children:"Ridge Grappler"}),f("span",{style:{fontSize:"3.65cqw",color:m.muted},children:"20\xD79 +12 \xB7 qty 4"})]})]}),T("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",justifyContent:"center"},children:[f(wt,{k:"Subtotal",v:"$1,956"}),f(wt,{k:"Fitting",v:"Free"}),T("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:5,fontSize:"4.64cqw"},children:[f("b",{style:{color:m.text},children:"Total"}),f("b",{style:{color:m.text,fontSize:"6.02cqw"},children:"$1,956"})]})]})]}),deliveryoptions:f(ye,{title:"Delivery",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Standard","3\u20135 days","Free",!0],["Express","Next day","$19",!1]].map(([e,o,t,r])=>T("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"5px 6px",borderRadius:4,border:`1px solid ${r?m.rust:m.rule}`,background:r?m.paper:m.card},children:[f("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",border:`1.5px solid ${r?m.rust:m.mark1}`,background:r?m.rust:"transparent"}}),f("span",{style:{flex:1,fontSize:"4.31cqw",fontWeight:600,color:m.text},children:e}),f("span",{style:{fontSize:"3.98cqw",color:m.muted},children:o}),f("b",{style:{fontSize:"4.31cqw",color:m.text},children:t})]},e))})}),paymentbadges:T("div",{style:{...U,background:m.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[f(Gc,{children:"Ways to pay"}),f("div",{style:{display:"flex",gap:5},children:[["VISA",m.ink],["MC",m.rust],["AMEX",m.inkSoft],["PayPal",m.ink2]].map(([e,o])=>f("span",{style:{flex:1,textAlign:"center",fontSize:"3.65cqw",fontWeight:800,letterSpacing:"0.06em",color:m.onInk,borderRadius:3,padding:"6px 0",background:o},children:e},e))})]}),stats:T("div",{style:{...U,padding:"10px 12px",display:"flex",flexDirection:"column",gap:9,justifyContent:"center",...Ee(m.ink,m.ink2)},children:[f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:m.warm},children:"By the numbers"}),T("div",{style:{display:"flex",gap:8},children:[f(xs,{n:"27k",label:"Rigs fitted",tone:m.onInk}),f(xs,{n:"12",label:"Years",tone:m.onInk}),f(xs,{n:"4.9",label:"Avg rating",tone:m.warm})]})]}),testimonials:T("div",{style:{...U,overflow:"hidden",background:m.paper,padding:"10px 11px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center"},children:[f("span",{style:{position:"absolute",right:10,top:2,fontSize:"22.4cqw",lineHeight:1,fontWeight:800,color:m.rust,opacity:.16},children:"\u201D"}),f(uh,{filled:5,size:7}),f("span",{style:{position:"relative",fontSize:"5.31cqw",lineHeight:1.35,color:m.text,fontWeight:600},children:"\u201CTook them out to the Simpson and back. Not one chip.\u201D"}),T("div",{style:{display:"flex",alignItems:"center",gap:5},children:[f(lT,{}),f("span",{style:{fontSize:"3.98cqw",color:m.muted},children:"Dave M. \xB7 Hilux N80"})]})]}),reviews:T(ye,{title:"Reviews",children:[f("div",{style:{display:"flex",gap:4,height:22},children:[[m.inkSoft,m.inkSoft2],[m.rust,m.warm],[m.ink,m.inkSoft],[m.mark2,m.mark1]].map(([e,o],t)=>f("div",{style:{flex:1,borderRadius:3,...Ee(e,o,140+t*15)}},t))}),f("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[["Dave M.",5,"Not one chip after the Simpson."],["Sara K.",4,"Fitted in an hour, no fuss."]].map(([e,o,t])=>T("div",{style:{display:"flex",gap:5,alignItems:"flex-start"},children:[f(lT,{size:12}),T("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[T("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[f("b",{style:{fontSize:"3.98cqw",color:m.text},children:e}),f(uh,{filled:o})]}),f(no,{children:t})]})]},e))})]}),logos:T("div",{style:{...U,display:"flex",flexDirection:"column",gap:9,justifyContent:"center",padding:"0 12px",...Ee(m.ink,m.inkSoft)},children:[f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:m.warm},children:"As fitted by"}),f("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:8},children:["ARB","TJM","IRONMAN","OPPOSITE"].map(e=>f("span",{style:{textAlign:"center",fontSize:"4.31cqw",fontWeight:800,letterSpacing:"0.08em",color:m.onInk,opacity:.82},children:e},e))})]}),prose:T("div",{style:{...U,background:m.paper,padding:"11px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("span",{style:{fontSize:"5.86cqw",fontWeight:700,color:m.text},children:"Why offset matters"}),T("div",{style:{display:"flex",gap:6},children:[f("span",{style:{fontSize:"15.3cqw",lineHeight:.78,fontWeight:800,color:m.rust,marginTop:1},children:"T"}),T("div",{style:{display:"flex",flexDirection:"column"},children:[f(no,{children:"he number on the back of your wheel decides whether the"}),f(no,{w:"76%",children:"tyre sits under the guard or an inch outside it."})]})]})]}),cards:f(ye,{title:"What you get",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Fitted free","In store, same day."],["5 yr cover","Structural, no fine print."],["Swap it","30 days, any reason."]].map(([e,o])=>T("div",{style:{border:`1px solid ${m.rule}`,borderRadius:4,padding:6,display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{width:11,height:11,borderRadius:3,background:m.rust,opacity:.9}}),f("b",{style:{fontSize:"3.98cqw",color:m.text},children:e}),f(no,{children:o})]},e))})}),faq:f(ye,{title:"Questions",children:f("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[["Will these fit my Hilux?",!0],["Do you fit them for me?",!1],["What if I pick wrong?",!1]].map(([e,o])=>T("div",{style:{borderBottom:`1px solid ${m.rule}`,padding:"4px 2px"},children:[T("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6},children:[f("b",{style:{fontSize:"4.31cqw",color:m.text},children:e}),f("span",{style:{fontSize:"4.64cqw",color:m.muted,lineHeight:1},children:o?"\u2212":"+"})]}),o&&f(no,{w:"90%",children:"Use the fitment finder \u2014 it reads your build, not just the model."})]},e))})}),hero:T("div",{style:{...U,overflow:"hidden",...Ee(m.ink,m.ink2)},children:[f("div",{style:{...U,background:`linear-gradient(90deg,${m.scrim},transparent 70%)`}}),f("div",{style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",padding:"12px 14px",gap:5},children:f(sT,{over:"NEW \xB7 SUMMER",overTone:m.warm,head:"Built for the worst road you own",cta:"SHOP ALL",ctaBg:m.warm,ctaFg:m.ink,tone:m.onInk})}),f(kt,{size:104,style:{right:-24,bottom:-30}})]}),herosingle:T("div",{style:{...U,display:"flex",background:m.paper,overflow:"hidden"},children:[f("div",{style:{flex:1,padding:12,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:f(sT,{over:"ALL-TERRAIN",overTone:m.rust,head:"Grip that does not ask",headSize:12,cta:"EXPLORE",ctaBg:m.text,ctaFg:m.onInk,tone:m.text})}),f("div",{style:{flex:1,position:"relative",...Ee(m.inkSoft,m.inkSoft2)},children:f(kt,{size:74,style:{right:-14,top:16}})})]}),productgrid:f(ye,{title:"Best sellers",children:T("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[f(fh,{name:"Ridge 19",price:"$365"}),f(fh,{name:"Ridge 29",price:"$410"}),f(fh,{name:"Ridge 39",price:"$455"})]})}),collections:f(ye,{title:"Shop by category",children:f("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Wheels",m.inkSoft,m.inkSoft2],["Tyres",m.rust,m.warm],["Lift kits",m.ink,m.inkSoft]].map(([e,o,t])=>f("div",{style:{borderRadius:4,display:"flex",alignItems:"flex-end",padding:5,color:m.onInk,...Ee(o,t)},children:f("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.04em"},children:e})},e))})}),producthero:T("div",{style:{...U,display:"flex",background:m.card,overflow:"hidden"},children:[f("div",{style:{flex:1.1,position:"relative",...Ee(m.paper,m.paper2,150)},children:f(kt,{size:78,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),T("div",{style:{flex:1,padding:"10px 10px 10px 8px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[f("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:m.rust},children:"NITTO"}),f("b",{style:{fontSize:"6.29cqw",color:m.text},children:"Ridge Grappler"}),f("span",{style:{fontSize:"6.63cqw",fontWeight:700,color:m.text},children:"$489"}),f("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,background:m.text,color:m.onInk},children:"ADD TO CART"})]})]}),spectable:f(ye,{title:"Specifications",children:T("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[f(wt,{k:"Diameter",v:'20"'}),f(wt,{k:"Width",v:"9.0J"}),f(wt,{k:"Offset",v:"+12"}),f(wt,{k:"Load",v:"1250 kg"})]})}),fitmenttable:f(ye,{title:"Will it fit?",children:T("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[f(wt,{k:"Hilux N80",v:"20\xD79 +12",ok:!0}),f(wt,{k:"Ranger PX3",v:"20\xD79 +12",ok:!0}),f(wt,{k:"LC79",v:"17\xD78 \u221210",ok:!0})]})}),processsteps:T("div",{style:{...U,background:m.paper,padding:10,display:"flex",flexDirection:"column",gap:7,justifyContent:"center"},children:[f(Gc,{children:"How it works"}),f("div",{style:{display:"flex",gap:6},children:["Pick your rig","Match the fit","We fit it"].map((e,o)=>T("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{width:11,height:11,borderRadius:"50%",background:m.text,color:m.onInk,fontSize:"3.98cqw",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700},children:o+1}),f("span",{style:{fontSize:"3.98cqw",color:m.text,fontWeight:600},children:e})]},e))})]}),detailrows:f("div",{style:{...U,background:m.card,display:"flex",flexDirection:"column",overflow:"hidden"},children:[["Forged, not cast","Half the weight, twice the road.",!1],["Fits your load","Rated to 1250 kg a corner.",!0]].map(([e,o,t])=>{let r=f("div",{style:{flex:1,...Ee(t?m.rust:m.inkSoft,t?m.warm:m.inkSoft2)}},"art"),a=T("div",{style:{flex:1.1,padding:8,display:"flex",flexDirection:"column",gap:2,justifyContent:"center"},children:[f("b",{style:{fontSize:"4.64cqw",color:m.text},children:e}),f("span",{style:{fontSize:"3.98cqw",color:m.muted,lineHeight:1.3},children:o})]},"tx");return f("div",{style:{flex:1,display:"flex",minHeight:0},children:t?[a,r]:[r,a]},e)})}),specstrip:f("div",{style:{...U,background:m.ink,color:m.onInk,display:"flex",alignItems:"center",justifyContent:"space-around",padding:"0 8px"},children:[["5 yr","Warranty"],["Free","Fitting"],["48 hr","Dispatch"]].map(([e,o])=>T("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[f("b",{style:{fontSize:"5.69cqw",letterSpacing:"0.02em"},children:e}),f("span",{style:{fontSize:"3.65cqw",color:m.mark2,letterSpacing:"0.1em",textTransform:"uppercase"},children:o})]},o))})},cT={subscribe:T("div",{style:{...U,padding:13,display:"flex",flexDirection:"column"},children:[T("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[T("div",{style:{display:"flex",alignItems:"center",gap:6},children:[f(G,{w:8,h:8,r:2,tone:"accent"}),f(G,{w:38,h:7,r:3,tone:"dark"}),f(G,{w:16,h:7,r:3,tone:"accent"})]}),f(G,{w:38,h:4,r:2,tone:"soft"})]}),f("div",{style:{height:1,background:Ve.line,marginBottom:10}}),T("div",{style:{flex:1,display:"flex",gap:10,border:`1px solid ${Ve.line}`,borderRadius:7,padding:10},children:[T("div",{style:{flex:1.1,display:"flex",flexDirection:"column",justifyContent:"center",gap:5},children:[f(G,{w:"46%",h:3,r:2,tone:"accent"}),f(G,{w:"84%",h:8,r:4,tone:"dark"}),f(G,{w:"56%",h:8,r:4,tone:"accent"}),f(G,{w:"96%",h:3,r:2,tone:"soft",style:{marginTop:2}}),T("div",{style:{display:"flex",gap:5,marginTop:4},children:[f("div",{style:{flex:1,height:13,borderRadius:5,border:`1px solid ${Ve.line}`,background:Ve.block}}),f(G,{w:34,h:13,r:5,tone:"accent"})]})]}),T("div",{style:{flex:1,background:Ve.block,borderRadius:6,padding:8,display:"flex",flexDirection:"column",gap:6},children:[f(G,{w:"52%",h:4,r:2,tone:"accent"}),Array.from({length:3}).map((e,o)=>T("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,borderTop:o?`1px solid ${Ve.line}`:"none",paddingTop:o?4:0},children:[f(G,{w:34,h:4,r:2,tone:"dark"}),f(G,{w:16,h:3,r:2,tone:"soft"})]},o))]})]})]}),split:T("div",{style:{...U,display:"flex"},children:[f("div",{style:{width:"44%",background:dh}}),T("div",{style:{flex:1,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[f(G,{w:"44%",h:5,r:3,tone:"accent"}),f(G,{w:"88%",h:8,r:4,tone:"dark"}),f(G,{w:"70%",h:8,r:4,tone:"dark"}),f(G,{w:"94%",h:5,r:2,tone:"soft",style:{marginTop:2}}),f(G,{w:"80%",h:5,r:2,tone:"soft"}),f(G,{w:"40%",h:13,r:6,tone:"accent",style:{marginTop:5}})]})]}),sectionheader:T(dT,{children:[f(G,{w:"18%",h:6,r:3,tone:"accent",style:{position:"absolute",top:15,right:16}}),T("div",{style:{...U,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:10},children:[T("div",{style:{display:"flex",alignItems:"center",gap:9},children:[f(G,{w:16,h:16,r:4,tone:"accent"}),f(G,{w:"20%",h:9,r:4,tone:"dark"})]}),f(G,{w:"62%",h:10,r:5,tone:"dark"}),f(G,{w:"42%",h:6,r:3,tone:"soft"})]})]}),header:f("div",{style:{...U,padding:14,display:"flex",flexDirection:"column",justifyContent:"center"},children:T("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[f(G,{w:"22%",h:12,r:4,tone:"dark"}),T("div",{style:{display:"flex",gap:9,alignItems:"center"},children:[f(G,{w:26,h:6,r:3,tone:"soft"}),f(G,{w:26,h:6,r:3,tone:"soft"}),f(G,{w:26,h:6,r:3,tone:"soft"}),f(G,{w:18,h:14,r:5,tone:"accent"})]})]})}),footer:T("div",{style:{...U,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:12},children:[T("div",{style:{display:"flex",gap:14},children:[T("div",{style:{flex:1.4,display:"flex",flexDirection:"column",gap:6},children:[f(G,{w:"60%",h:9,r:4,tone:"dark"}),f(G,{w:"90%",h:5,r:2,tone:"soft"}),f(G,{w:"70%",h:5,r:2,tone:"soft"})]}),[0,1].map(e=>T("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6},children:[f(G,{w:"50%",h:6,r:3,tone:"dark"}),f(G,{w:"80%",h:5,r:2,tone:"soft"}),f(G,{w:"66%",h:5,r:2,tone:"soft"})]},e))]}),f("div",{style:{height:1,background:Ve.line}}),T("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[f(G,{w:"30%",h:5,r:2,tone:"soft"}),f(G,{w:"16%",h:5,r:2,tone:"soft"})]})]}),grid:f("div",{style:{...U,padding:14,display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr",gap:9},children:Array.from({length:4}).map((e,o)=>f("div",{style:{borderRadius:6,background:Ve.block}},o))}),blanksection:f("div",{style:{...U,padding:14,display:"flex"},children:T("div",{style:{flex:1,border:`1px dashed ${Ve.line}`,borderRadius:7,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:[f(G,{w:14,h:2,r:1,tone:"tint"}),f(G,{w:2,h:14,r:1,tone:"tint",style:{position:"absolute"}})]})}),spacer:T("div",{style:{...U,padding:14,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[f(G,{w:"100%",h:6,r:3,tone:"soft"}),f(G,{w:16,h:22,r:3,tone:"block",style:{alignSelf:"center"}}),f(G,{w:"100%",h:6,r:3,tone:"soft"})]}),divider:f("div",{style:{...U,padding:14,display:"flex",alignItems:"center"},children:f(G,{w:"100%",h:3,r:2,tone:"dark"})}),customhtml:T("div",{style:{...U,display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:dh},children:[f(G,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(-14deg)"}}),f(G,{w:16,h:10,r:3,tone:"accent"}),f(G,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(14deg)"}})]}),heading:f("div",{style:{...U,padding:14,display:"flex",alignItems:"center"},children:f(G,{w:"64%",h:13,r:4,tone:"dark"})}),text:T("div",{style:{...U,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[f(G,{w:"100%",h:6,r:3,tone:"soft"}),f(G,{w:"96%",h:6,r:3,tone:"soft"}),f(G,{w:"100%",h:6,r:3,tone:"soft"}),f(G,{w:"58%",h:6,r:3,tone:"soft"})]}),image:f("div",{style:{position:"absolute",inset:14,borderRadius:7,background:dh}}),button:f("div",{style:{...U,display:"flex",alignItems:"center",justifyContent:"center"},children:f(G,{w:"34%",h:16,r:8,tone:"accent"})}),menu:T("div",{style:{...U,padding:"14px 22%",display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[f(G,{w:"48%",h:7,r:3,tone:"dark"}),f(G,{w:"82%",h:5,r:2,tone:"soft"}),f(G,{w:"66%",h:5,r:2,tone:"soft"}),f(G,{w:"74%",h:5,r:2,tone:"soft"}),f(G,{w:"58%",h:5,r:2,tone:"soft"})]}),emailform:T("div",{style:{...U,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[f(G,{w:"56%",h:8,r:3,tone:"dark"}),T("div",{style:{display:"flex",gap:6},children:[f("div",{style:{flex:1,height:16,borderRadius:5,border:`1px solid ${Ve.line}`}}),f(G,{w:"30%",h:16,r:5,tone:"accent"})]})]}),sociallogos:f("div",{style:{...U,display:"flex",alignItems:"center",justifyContent:"center",gap:9},children:[0,1,2,3].map(e=>f(G,{w:16,h:16,r:8,tone:"dark"},e))}),paymentlogos:T("div",{style:{...U,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[f(G,{w:22,h:6,r:2,tone:"soft"}),[0,1,2,3].map(e=>f(G,{w:20,h:13,r:3,tone:"dark"},e))]}),search:f("div",{style:{...U,padding:"0 18%",display:"flex",alignItems:"center"},children:T("div",{style:{flex:1,height:22,borderRadius:11,border:`1px solid ${Ve.line}`,display:"flex",alignItems:"center",gap:7,padding:"0 9px"},children:[f("div",{style:{width:9,height:9,borderRadius:5,border:`2px solid ${Ve.dark}`}}),f(G,{w:"46%",h:5,r:2,tone:"soft"})]})}),cart:T("div",{style:{...U,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[f("div",{style:{width:22,height:18,borderRadius:"3px 3px 6px 6px",border:`2px solid ${Ve.dark}`}}),f("div",{style:{padding:"2px 6px",borderRadius:6,border:`1.5px solid ${Ve.dark}`},children:f(G,{w:7,h:7,r:2,tone:"dark"})})]}),countryswitch:T("div",{style:{...U,padding:14,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:5},children:[T("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",border:`1px solid ${Ve.line}`},children:[f(G,{w:22,h:6,r:2,tone:"dark"}),f(G,{w:6,h:4,r:1,tone:"soft"})]}),T("div",{style:{width:"46%",display:"flex",flexDirection:"column",gap:4,padding:6,border:`1px solid ${Ve.line}`},children:[f(G,{w:"80%",h:4,r:2,tone:"accent"}),f(G,{w:"64%",h:4,r:2,tone:"soft"}),f(G,{w:"72%",h:4,r:2,tone:"soft"})]})]}),legalline:T("div",{style:{...U,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[f("div",{style:{height:1,background:Ve.line}}),T("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[f(G,{w:"38%",h:5,r:2,tone:"soft"}),T("div",{style:{display:"flex",gap:5},children:[f(G,{w:14,h:5,r:2,tone:"soft"}),f(G,{w:14,h:5,r:2,tone:"soft"}),f(G,{w:14,h:5,r:2,tone:"soft"})]})]})]}),fallback:f("div",{style:{position:"absolute",inset:14,borderRadius:8,background:Ve.block}})};function fT({type:e}){let o=S8[e]??"",t=C8[o]??cT[o]??cT.fallback;return f("div",{className:"sf-thumb","aria-hidden":"true",style:{position:"absolute",inset:0,background:"var(--sf-thumb-thumb-bg)",pointerEvents:"none",containerType:"inline-size"},children:t})}import{useScreenDocument as Od}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as $a,jsxs as w8}from"react/jsx-runtime";import k8 from"efficient-easel/screen/components/SidePanelHead";import{StylesIcon as v8}from"efficient-easel/rail";import{Tooltip as T8}from"efficient-shell/ui";function uT({tokenRef:e,siteId:o,onClose:t,onNotify:r,tab:a,onTabChange:n,revealPageGroup:s,onPageGroupRevealed:l}){let c=Oa();return w8("div",{className:"sf-styles",children:[$a(k8,{icon:$a(v8,{}),title:i("Styles"),context:$a(T8,{content:i("{name} \u2014 renamed in the Console: {place}.",{name:c,place:i("Storefront \u25B8 Sites \u25B8 Settings")}),className:"sf-name-tip",children:$a("span",{className:"sf-name-text",children:c})})}),$a("div",{className:"sf-insp-body es-insp-body sf-scroll",children:$a(Wi,{tokenRef:e,siteId:o,onNotify:r,tab:a,onTabChange:n,revealPageGroup:s,onPageGroupRevealed:l})})]})}import{jsx as Ze,jsxs as zr,Fragment as A8}from"react/jsx-runtime";import{Fragment as TT,useEffect as PT,useRef as gh}from"react";import{useTreeDrag as ET}from"efficient-easel/drag";import{GlobeIcon as L8,ImageIcon as B8,LocationIcon as D8,MapIcon as N8,TextLinesIcon as M8,TrashIcon as OT}from"efficient-easel/icons";import{Subtree as FT,TreeRow as bs,TreeRowAction as _T,TreeSeam as RT}from"efficient-easel/tree";import{useEaselStrings as H8}from"efficient-easel/strings";import{createPreviewSelectionContext as P8}from"efficient-easel/draw/client";var{Provider:Aye,useSelection:pT}=P8("selectedLocationPartId");function mT(e,o,t){return`${e}::${o}::${t}`}function hT(e){if(!e)return null;let o=e.split("::");if(o.length<3)return null;let t=o[o.length-1];if(t!=="image"&&t!=="map"&&t!=="city")return null;let r=Number(o[o.length-2]);if(!Number.isInteger(r)||r<0)return null;let a=o.slice(0,-2).join("::");return a?{nodeId:a,index:r,part:t}:null}import{isSelectionMode as G8}from"efficient-easel/screen/lib/screen-parts";import{useSyncExternalStore as E8}from"react";var O8={level:"groups"},IT=O8,ph=new Set;function Uo(e){IT=e;for(let o of ph)o()}function F8(e){return ph.add(e),()=>{ph.delete(e)}}var xT=()=>IT;function gT(){return E8(F8,xT,xT)}function Wc(e,o,t){let r=[];return e.forEach((a,n)=>{let s=o(a),l=r.find(c=>c.key===s);l||(l={key:s,name:t(a),items:[]},r.push(l)),l.items.push({item:a,index:n})}),r}function Nye(e){return _8[Is(e)]}var _8={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"};function Is(e){if(e<=1)return 1;if(e<=4)return e;let o=t=>e%t||t;return o(4)>=o(3)?4:3}var gs=e=>String(e?.group??""),mh=new WeakMap,R8=0;function zc(e){let o=mh.get(e);return o||(o=`loc${++R8}`,mh.set(e,o)),o}var bT=(e,o)=>o||e||"Ungrouped",yT={photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
21
|
+
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""};function Wr(e){return Wc(e,gs,o=>String(o?.groupName??"")).map(o=>({key:o.key,name:o.name,cards:o.items.map(t=>t.item)}))}var hh=e=>e.flatMap(o=>o.cards),ST=(e,o,t)=>Math.min(Math.max(e,o),t);function Uc(e,o,t){let r=0;for(let a=0;a<e.length;a++)if(gs(e[a])===o){if(r===t)return a;r++}return-1}function xh(e,o,t){let r=Wr(e);if(o<0||o>=r.length)return e;let[a]=r.splice(o,1),n=ST(o<t?t-1:t,0,r.length);return r.splice(n,0,a),hh(r)}function Ih(e,o,t,r,a){let n=Wr(e),s=n.find(h=>h.key===o),l=n.find(h=>h.key===r);if(!s||!l||t<0||t>=s.cards.length)return e;let[c]=s.cards.splice(t,1),d=o===r?c:{...c,group:l.key,groupName:l.name};d!==c&&mh.set(d,zc(c));let u=ST(s===l&&t<a?a-1:a,0,l.cards.length);return l.cards.splice(u,0,d),hh(n)}function CT(e,o){let t=Wr(e),r=t.find(n=>n.key===o),a={...yT,group:o,groupName:r?.name??""};return r?(r.cards.push(a),hh(t)):[...e,a]}function wT(e){let o=new Set(Wr(e).map(a=>a.key)),t=o.size+1,r=`Group ${t}`;for(;o.has(r);)r=`Group ${++t}`;return{cards:[...e,{...yT,group:r,groupName:""}],key:r}}function kT(e,o){return e.filter(t=>gs(t)!==o)}function vT(e,o,t){let r=Uc(e,o,t);return r<0?e:e.filter((a,n)=>n!==r)}function Gye(e,o,t){let r=e.flatMap((s,l)=>gs(s)===o?[l]:[]),a=e.slice();r.forEach((s,l)=>{a[s]=t[l]});let n=t.slice(r.length);return[...a.filter(s=>s!==void 0),...n]}function Wye(e,o,t){return o.flatMap(r=>{let a=e.filter(n=>gs(n)===r);return a.length?a:t(r)})}var jc="ContactLocations",$c=e=>({parentId:`locations-${e}`,slot:"groups"}),bh=(e,o)=>({parentId:`locations-${e}`,slot:`cities:${o}`});function AT(e,o){let{readOnly:t,selected:r}=o,a=H8().tree,n=o.data?.content??[],s=G8(e),l=gh(null);PT(()=>{let I=r?.type===jc?String(r.props.id):null;I&&I!==l.current&&Uo({level:"groups"}),l.current=I},[r?.props.id]);let{selectedLocationPartId:c,setSelectedLocationPartId:d,setSelectHandler:u}=pT(),h=gT(),p=(I,w)=>{let v=n[I];v&&o.replace(I,{type:v.type,props:{...v.props,locations:w}})},x=I=>{let w=n[I]?.props?.locations;return Array.isArray(w)?w:[]},g=ET({keyOf:I=>`group:${I.si}:${I.index}`,readOnly:!!t,canDrop:(I,w)=>w.parentId===$c(I.si).parentId&&w.slot==="groups",onDrop:(I,w)=>{p(I.si,xh(x(I.si),I.index,w.index)),h.level==="city"&&Uo({level:"groups"})},onStep:(I,w)=>{p(I.si,xh(x(I.si),I.index,w<0?I.index-1:I.index+2)),h.level==="city"&&Uo({level:"groups"})}}),y=ET({keyOf:I=>`city:${I.si}:${I.group}:${I.index}`,readOnly:!!t,canDrop:(I,w)=>w.parentId===$c(I.si).parentId&&w.slot.startsWith("cities:"),onDrop:(I,w)=>{let v=w.slot.slice(7);p(I.si,Ih(x(I.si),I.group,I.index,v,w.index)),Uo({level:"group",key:v})},onStep:(I,w)=>{p(I.si,Ih(x(I.si),I.group,I.index,I.group,w<0?I.index-1:I.index+2)),h.level==="city"&&Uo({level:"group",key:I.group})}}),E=gh(n);E.current=n;let O=gh(()=>{});PT(()=>{u(I=>{let w=hT(I);if(!w)return;let v=E.current.findIndex(k=>k.props?.id===w.nodeId);v<0||O.current(v,{level:w.part,index:w.index})})},[u]);let C=(I,w)=>{l.current=n[I]?.props?.id??null,o.select(I),Uo(w),e.reveal();let v=n[I]?.props?.id;typeof v=="string"&&(w.level==="city"||w.level==="image"||w.level==="map")?d(mT(v,w.index,w.level)):d(null),typeof v=="string"&&o.scrollTo(v)};return O.current=C,{renderLocationTree:(I,w,{rowClick:v,isCollapsed:k,toggleCollapse:R})=>{let B=x(w),P=Wr(B),_=String(I.props.id),N=s&&r?.props.id===_,b=A=>Ze(RT,{...t?{}:g.seam({place:{...$c(w),index:A}})},`seam:${_}:groups:${A}`),F=(A,H)=>Ze(RT,{...t?{}:y.seam({place:{...bh(w,A),index:H}})},`seam:${_}:cities:${A}:${H}`);return zr(A8,{children:[Ze(bs,{icon:Ze(M8,{size:13}),name:i("Texts"),words:a,onSelect:()=>C(w,{level:"texts"}),selected:N&&h.level==="texts",rowProps:{onClick:v(()=>C(w,{level:"texts"}))}}),P.map((A,H)=>{let z=`${_}::grp::${A.key}`,Z=k(z),j=N&&h.level==="group"&&h.key===A.key,Ae=A.name||A.key?bT(A.key,A.name):i("Ungrouped"),ge={...bh(w,A.key),index:A.cards.length},Ye=y.row({item:{si:w,group:A.key,index:-1},place:ge,into:ge,canDrag:!1},{onClick:v(()=>C(w,{level:"group",key:A.key}))}),We=g.row({item:{si:w,index:H},place:{...$c(w),index:H}},Ye.rowProps);return zr(TT,{children:[H===0&&b(0),Ze(bs,{icon:Ze(L8,{size:13}),name:Ae,words:a,onSelect:()=>C(w,{level:"group",key:A.key}),selected:j,draggable:We.draggable,dragging:We.dragging,drop:We.drop??Ye.drop,fold:{open:!Z,label:i("group"),onToggle:()=>R(z)},actions:Ze(_T,{kind:"delete",label:io("Delete {label} group ({n} city)","Delete {label} group ({n} cities)",A.cards.length,{label:Ae}),onClick:()=>{p(w,kT(B,A.key)),Uo({level:"groups"})},children:Ze(OT,{size:15})}),rowProps:We.rowProps,count:A.cards.length,countLabel:io("{n} city","{n} cities",A.cards.length)}),!Z&&zr(FT,{children:[A.cards.map((Pe,ue)=>{let Ce=Uc(B,A.key,ue),Qe=N&&h.level==="city"&&h.index===Ce,so=String(Pe?.name??"")||i("City"),le=`${_}::city::${zc(Pe)}`,Le=k(le),{rowProps:po,..._e}=y.row({item:{si:w,group:A.key,index:ue},place:{...bh(w,A.key),index:ue}},{onClick:v(()=>C(w,{level:"city",index:Ce}))});return zr(TT,{children:[ue===0&&F(A.key,0),Ze(bs,{icon:Ze(D8,{size:13}),name:so,words:a,onSelect:()=>C(w,{level:"city",index:Ce}),selected:Qe,..._e,fold:{open:!Le,label:so,onToggle:()=>R(le)},actions:Ze(_T,{kind:"delete",label:i("Delete {name}",{name:so}),onClick:()=>{p(w,vT(B,A.key,ue)),Uo({level:"group",key:A.key})},children:Ze(OT,{size:15})}),rowProps:po}),!Le&&zr(FT,{children:[Ze(bs,{icon:Ze(B8,{size:13}),name:i("Image"),words:a,onSelect:()=>C(w,{level:"image",index:Ce}),selected:N&&h.level==="image"&&h.index===Ce,rowProps:{onClick:v(()=>C(w,{level:"image",index:Ce}))}}),Ze(bs,{icon:Ze(N8,{size:13}),name:i("Map"),words:a,onSelect:()=>C(w,{level:"map",index:Ce}),selected:N&&h.level==="map"&&h.index===Ce,rowProps:{onClick:v(()=>C(w,{level:"map",index:Ce}))}})]}),F(A.key,ue+1)]},zc(Pe))}),zr("button",{type:"button",className:"sf-add-card",onClick:()=>{let Pe=CT(B,A.key);p(w,Pe);let ue=Wr(Pe).find(Ce=>Ce.key===A.key);Uo(ue&&ue.cards.length?{level:"city",index:Uc(Pe,A.key,ue.cards.length-1)}:{level:"group",key:A.key})},children:[Ze("span",{className:"sf-plus sf-plus--sm",children:"+"}),i("Add city")]})]}),b(H+1)]},z)}),zr("button",{type:"button",className:"sf-add-card",onClick:()=>{let{cards:A,key:H}=wT(B);p(w,A),C(w,{level:"group",key:H})},children:[Ze("span",{className:"sf-plus sf-plus--sm",children:"+"}),i("Add group")]})]})},sectionPressed:I=>{I?.type===jc&&Uo({level:"groups"})}}}import{useEffect as dj,useRef as fj}from"react";import{createNode as kh,newId as vh}from"efficient-easel/data";import{useEaselApi as uj}from"efficient-easel/easel";import{useScreenDocument as pj}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as mj}from"efficient-easel/screen/lib/session-context";import{useEffect as nj,useRef as sj}from"react";import{useEasel as lj}from"efficient-easel/easel";import{ROOT_ZONE as wh}from"efficient-easel/draw";import{readHidable as J8}from"efficient-easel/draw";var Vt="content",re="Flex",W8="Text & media",z8="Layout & structure",BT=[{type:"Eyebrow",label:"Eyebrow",retired:!0},{type:"Heading",label:"Heading",retired:!0},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"LocationMap",label:"Map"},{type:"ButtonBlock",label:"Button"},{type:"Contents",label:"Contents"}],U8=[...BT,{type:"Form",label:"Form"},{type:"PostCard",label:"Post Card"},{type:"Stats",label:"Stats"},{type:"MenuBlock",label:"Menu"},{type:"EmailFormBlock",label:"Email Form"},{type:"SocialLogosBlock",label:"Social Logos"},{type:"PaymentLogosBlock",label:"Payment Logos"},{type:"LegalLineBlock",label:"Legal Line"},{type:"SearchBlock",label:"Search"},{type:"CartBlock",label:"Cart"},{type:"CountrySwitchBlock",label:"Country Switch"},{type:"AccountBlock",label:"Account"},{type:"ThemeSwitchBlock",label:"Theme Switch"}].map(e=>({...e,group:W8})),$8=(Kt.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:z8})),LT=[...U8,...$8],yh=[...BT,{type:"HeroGroup",label:qt}],tSe=yh.map(e=>e.type),j8=1,K8=yh.filter(e=>e.type!=="HeroGroup");function q8(e){return e<j8?yh:K8}var V8={Flex:{slot:Vt,choices:()=>LT},Grid:{slot:Vt,choices:()=>LT},HeroGroup:{slot:Vt,choices:q8}};function DT(e,o=0){let t=V8[e];return t?{slot:t.slot,choices:t.choices(o)}:null}var vo=()=>({tag:"h2",_partStyles:{text:{textStyle:"heading-2"}}}),yo=()=>({_partStyles:{text:{textStyle:"body-5",color:"accent",letterSpacing:.3,case:"upper",lineHeight:1.5}}});var Y8="inline",X8=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];var fo={ProductGrid:{num:"num",title:"title",description:"description",headRows:["num","title","titleSize","description","linkText","linkHref"],renderer:"ProductGridSection",padKey:"padTop",linkProp:"link"},TyreSizes:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreSizes"},FitmentFinder:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentFinder"},TyreFitment:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreFitment"},BundleOffer:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicBundleOffer"},CompatibleTyres:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},RelatedProducts:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},SpecTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"SpecTable"},FAQ:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"FAQ"},GalleryB:{num:"num",title:"title",headRows:["num","title","linkText","linkHref"],renderer:"GalleryGrid"},FitmentTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentTable"},Events:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"Events"},ProcessSteps:{num:"num",title:"title",description:"description",headRows:["num","title","description"],headStyle:"editorial",renderer:"ProcessSteps",padKey:"padTop"},LongRead:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"LongRead"},Series:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Series"},TimelineTrack:{num:"eyebrow",title:"title",description:"intro",headRows:["eyebrow","title","intro"],headStyle:"editorial",renderer:"TimelineTrack",padKey:"padTop"},StatsParagraph:{num:"eyebrow",title:"title",description:"desc",headRows:["eyebrow","title","desc"],headStyle:"editorial",renderer:"StatsParagraph"},Footprint:{num:"sectionNumber",title:"heading",description:"tagline",headRows:["sectionNumber","heading","tagline"],headStyle:"editorial",renderer:"Footprint",padKey:"padTop"},Collections:{num:"eyebrow",title:"heading",headRows:["eyebrow","heading"],renderer:"Collections"},Cards:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Cards"},Testimonials:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Testimonials"},Reviews:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Reviews"},Prose:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"essay",renderer:"Prose"},ReviewForm:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"simple",renderer:"ReviewForm"},DeliveryOptions:{num:"eyebrow",title:"title",description:"body",headRows:["eyebrow","title","body"],headStyle:"natural",headRowGap:"gap-3",headDescriptionSize:"text-[15px]",renderer:"DeliveryOptions"}},ja="SectionHeader";function NT(e){return e in fo}function MT(e){return mo(X8,Y8,e)}var Z8=new Set(["Flex"]);function lSe(e){return!!e?.type&&Z8.has(e.type)}var HT={not:{field:"headPlacement",is:"own-box"}},iSe={not:HT};function cSe(e,o,t){return uf(e,t,HT)}var at=re,nt=Vt;function Kc(e){if(e.theme)return eo(e.theme);let o=e.site?.themePresets;return o?eo({selected:e.site?.selectedPreset??0,themes:[...o]}):void 0}function Q8(e,o){return o===0?`${e}~box`:`${e}~box-${o+1}`}var WT=new Set(["id"]),Ka={},qc=[];function $o(e){for(let[o,t]of Object.entries(e)){if(o in Ka&&Ka[o]!==t)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);Ka[o]=t}}function Vc(e){return Ka[e]}function zT(e){return e in Ka&&qc.includes(e)}function gSe(e){let o=fo[e];if(!o)throw new Error(`lib/sections/section-to-box: "${e}" has no head row in SPLITTABLE_SECTIONS`);let t=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&t.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&t.push({kind:"button",key:"linkText",href:"linkHref"}),t}var Sh=e=>J8(e),Ue=e=>Sh(e).text.trim()!=="";function ej(e){if(e.includes("=="))return e;let o=e.indexOf("/"),t=o===-1?e:e.slice(0,o),r=t.trim();if(!r)return e;let a=t.indexOf(r);return`${t.slice(0,a)}==${r}==${t.slice(a+r.length)}${o===-1?"":e.slice(o)}`}var oj=e=>e==="heading"?vo():e==="eyebrow"?yo():{};function tj(e,o,t,r){let a={...e._partStyles?.text??{},...o??{},...t??{}};return(r==="center"||r==="right")&&a.align===void 0&&(a.align=r),Object.keys(a).length?{_partStyles:{text:a}}:{}}function rj(e,o){if(e===void 0)return{};if(typeof e=="string")return{variant:e};let t=o[e.key];return{variant:typeof t=="string"&&Object.hasOwn(e.map,t)?e.map[t]:e.fallback}}function GT(e,o,t,r,a={}){let n={...o};for(let s of e){let[l,c,d]=typeof s=="string"?[s,s,void 0]:s;if(t[l]===void 0)continue;let u=d?d(t[l],t,a):t[l];u===void 0?delete n[c]:n[c]=u,r(l,c,u===void 0)}return n}function aj(e){let o=new Set([...WT,"headPlacement","_partStyles",...Object.keys(e.drop??{}),...Object.keys(e.reads??{})]),t=a=>{for(let n of a??[])o.add(typeof n=="string"?n:n[0])},r=a=>{for(let n of a)switch(n.kind){case"text":case"image":o.add(n.key),n.kind==="image"&&n.alt&&o.add(n.alt);break;case"button":o.add(n.key),o.add(n.href),typeof n.variant=="object"&&o.add(n.variant.key);break;case"list":o.add(n.key);break;case"group":case"block":t(n.box),r(n.parts??[]);break;case"core":n.keep!=="rest"&&n.keep.forEach(s=>o.add(s)),Object.keys(n.rename??{}).forEach(s=>o.add(s));for(let s of Object.values(n.slots??{}))for(let l of s)"kind"in l&&o.add(l.key);break}};for(let a of[e,...e.also??[]])t(a.box),r(a.parts);return o}function Ch(e,o,t={}){let r=e.props,a=o.skip?.(r);if(a!==void 0)return{node:e,nodes:[e],carried:[],dropped:[],siteWrites:[],restyled:[],skipped:a};let n=String(r.id??e.type),s=[],l=[],c=[],d=new Set,u=(v,k)=>{s.push({key:v,home:k}),d.add(v)},h=r._partStyles??{},p=aj(o),x=0,g=(v,k)=>({type:v,props:{...k,id:`${n}~${v}-${++x}`}}),y=(v,k,R,B,P,_,N)=>{if(P){for(let F of v??[]){let A=typeof F=="string"?F:F[0];R[A]!==void 0&&N(A,`nothing \u2014 the ${B} has no parts, so it is not drawn`)}return}let b=typeof k=="function"?k(r,t):k??{};return GT(v??[],b,R,(F,A,H)=>N(F,H?`nothing \u2014 the old value draws nothing (${B}: no ${A})`:`${_}${B}: ${A}`),t)},E=v=>v.map(k=>{let R={...k.props??{}};for(let[B,P]of Object.entries(k.slots??{}))R[B]=E(P);return g(k.type,R)}),O=(v,k,R)=>{let B=v.of?v.of(k):Array.isArray(k[v.key])?k[v.key]:[],P=typeof v.props=="function"?v.props(r,t):v.props??{},_=B.map((H,z)=>{let Z=H??{},j=v.item?.(Z,z,r)??{},Ae=C(j.reverse?[...v.parts].reverse():v.parts,Z,!1,`item ${z+1}: `);return v.flat?j.props?Ae.map(ge=>({...ge,props:{...ge.props,...j.props,id:ge.props.id}})):Ae:[g(at,{name:`${v.name} ${z+1}`,...P,...j.props??{},[nt]:Ae})]});if(v.groups){let H=v.groups;return R(v.key,B.length?`one Box per item (${B.length}), in a Box per group`:"nothing \u2014 the list is empty"),Wc(B.map(z=>z??{}),H.of,H.of).map((z,Z)=>{let j=z.items.map(ue=>ue.item),Ae=H.parts?C(H.parts,H.head?.(j,r)??{},!1,`group ${Z+1}: `):[],ge=z.items.map(ue=>_[ue.index]),Ye=H.perRow?.(j.length,r),We=Number.isInteger(Ye)&&Ye>=1?Ye:1,Pe=[];if(H.perRow&&We<ge.length)for(let ue=0;ue*We<ge.length;ue++)Pe.push(ge.slice(ue*We,(ue+1)*We).flat());return g(at,{name:`${H.name} ${Z+1}`,...H.props??{},[nt]:[...Ae,g(at,{name:`${H.itemsName} ${Z+1}`,...H.itemsProps?.(j.length,r)??{},[nt]:Pe.length?Pe.map((ue,Ce)=>g(at,{name:`${H.rowName??`${H.itemsName} row`} ${Ce+1}`,...H.rowProps??{},[nt]:ue})):ge.flat()})]})})}let N=v.perRow?.(r),b=v.perRow?Number.isInteger(N)&&N>=1?N:1:0;if(R(v.key,(B.length?v.flat?`each item's parts (${B.length} items), in order`:`one Box per item (${B.length}), its parts inside`:"nothing \u2014 the list is empty")+(b&&B.length?`, in rows of ${b}`:"")),!b)return _.flat();let F=typeof v.rowProps=="function"?v.rowProps(r,t):v.rowProps??{},A=[];for(let H=0;H*b<_.length;H++){let z=_.slice(H*b,(H+1)*b).flat(),Z=v.rowFiller?b-_.slice(H*b,(H+1)*b).length:0;A.push(g(at,{name:`${v.rowName??`${v.name} row`} ${H+1}`,...F,[nt]:[...z,...Array.from({length:Z},(j,Ae)=>g(at,{name:`Empty ${Ae+1}`,...v.rowFiller,[nt]:[]}))]}))}return A},C=(v,k,R,B)=>{let P=[],_=(b,F)=>R?u(b,F):void 0,N=b=>R?h[b]:void 0;for(let b of v)if(!(b.when&&!b.when(r,R?void 0:k)))switch(b.kind){case"text":{let F=Sh(k[b.key]);if(!F.text.trim()){_(b.key,"nothing \u2014 empty words draw nothing, so no block");break}let A=oj(b.role??"body"),{_partStyles:H,...z}=A,Z=tj(A,b.styleFrom?{...b.style,...b.styleFrom(r,t)}:b.style,N(b.key),b.props?.align);if(b.was&&R){let j=Z._partStyles?.text??{};c.push({key:b.key,was:b.was,...typeof j.textStyle=="string"?{textStyle:j.textStyle}:{},...K(j.size)!==void 0?{size:K(j.size)}:{},...K(j.sizePhone)!==void 0?{sizePhone:K(j.sizePhone)}:{}})}P.push(g("Text",{text:b.mark==="accentLead"?ej(F.text):F.text,...z,...b.props??{},...Z,...F.hidden?{_hidden:!0}:{}})),_(b.key,`${B}Text block: its words${F.hidden?", hidden":""}`);break}case"button":{let F=Sh(k[b.key]);if(!F.text.trim()){_(b.key,"nothing \u2014 no words, no button"),_(b.href,"nothing \u2014 no button to link"),typeof b.variant=="object"&&_(b.variant.key,"nothing \u2014 no button to style");break}let A=typeof k[b.href]=="string"&&k[b.href]?k[b.href]:"#",H={...b.style??{},...N(b.key)??{}};P.push(g("ButtonBlock",{label:F.text,href:A,...typeof b.props=="function"?b.props(k,t):b.props??{},...rj(b.variant,k),...Object.keys(H).length?{_partStyles:{label:H}}:{},...F.hidden?{_hidden:!0}:{}})),_(b.key,`${B}Button block: its words`),_(b.href,`${B}Button block: its link`),typeof b.variant=="object"&&_(b.variant.key,`${B}Button block: its Style`);break}case"image":{let F=k[b.key];if(typeof F!="string"||!F){_(b.key,"nothing \u2014 no picture, no block"),b.alt&&_(b.alt,"nothing \u2014 no picture to describe");break}let A=b.alt&&typeof k[b.alt]=="string"?k[b.alt]:"";P.push(g("ImageBlock",{src:F,alt:A,...b.props??{}})),_(b.key,`${B}Image block: its picture`),b.alt&&_(b.alt,`${B}Image block: its alt text`);break}case"list":{P.push(...O(b,k,_));break}case"group":{let F=C(b.parts,k,R,B),A=y(b.box,b.props,k,`${b.name} Box`,!F.length&&!b.keepEmpty,B,_);A&&P.push(g(at,{name:b.name,...A,[nt]:F}));break}case"block":{let F=b.parts?C(b.parts,k,R,B):[],A=y(b.box,b.props,k,`${b.type} block`,!!b.parts&&!F.length&&!b.keepEmpty,B,_);A&&P.push(g(b.type,{...A,...b.slot?{[b.slot]:F}:{}}));break}case"core":{let F=b.as??e.type,A={headPlacement:"own-box",...b.props??{}},H=b.keep==="rest"?Object.keys(k).filter(z=>!p.has(z)&&!(z in A)):b.keep;for(let z of H)k[z]!==void 0&&(A[z]=k[z],_(z,`the ${F} block inside the Box`));if(b.keep==="rest"){for(let Z of Object.keys(b.props??{}))k[Z]!==void 0&&!p.has(Z)&&_(Z,`nothing \u2014 the ${F} block inside the Box has the row's own value`);k.headPlacement!==void 0&&_("headPlacement",`the ${F} block inside the Box: own-box`);let z=Object.fromEntries(Object.entries(h).filter(([Z])=>!p.has(Z)));Object.keys(z).length&&(A._partStyles=z)}for(let[z,Z]of Object.entries(b.rename??{}))k[z]!==void 0&&(A[Z]=k[z],_(z,`the ${F} block inside the Box: ${Z}`));for(let[z,Z]of Object.entries(b.slots??{}))A[z]=Z.flatMap(j=>"kind"in j?O(j,k,_):E([j]));P.push(g(F,A));break}}return P},I=(v,k)=>{let R=k===0?"Box":`${v.name} Box`,B=C(v.parts,r,!0,k===0?"":`${R}: `),P=typeof v.boxProps=="function"?v.boxProps(r,t):v.boxProps??{},_=GT(v.box??[],P,r,(N,b,F)=>u(N,F?`nothing \u2014 the old value draws nothing (${R}: no ${b})`:`${R}: ${b}`),t);return{type:at,props:{name:v.name,..._,[nt]:B,id:Q8(n,k)}}},w=[o,...o.also??[]].map(I);r._partStyles!==void 0&&u("_partStyles","each old part's style moved to its new part");for(let[v,k]of Object.entries(o.reads??{}))r[v]!==void 0&&u(v,k);for(let[v,k]of Object.entries(o.drop??{}))v in r&&(l.push({key:v,why:k}),d.add(v));for(let v of Object.keys(r))WT.has(v)||d.has(v)||l.push({key:v,why:"not in the row \u2014 not carried"});return{node:w[0],nodes:w,carried:s,dropped:l,siteWrites:[...o.site?.(e,t)??[]],restyled:c}}function UT(e,o=qc,t={}){if(!Array.isArray(e))return[];let r=[];return e.forEach((a,n)=>{let s=a&&typeof a.type=="string"&&o.includes(a.type)?Ka[a.type]:void 0;if(!s)return;let l=Ch(a,s,t);l.skipped===void 0&&r.push({index:n,node:l.node,nodes:l.nodes})}),r}function $T(e){let o=lj(s=>s.appState.data.content),{theme:t,themeRow:r,themeFromDocument:a}=ne(),n=sj(new Set);nj(()=>{let s=ij({theme:t,themeRow:r,themeFromDocument:a});s&&cj(UT(o,void 0,s),e,n.current)},[o,e,t,r,a])}function ij(e){return e.themeFromDocument||e.themeRow==="none"?{}:e.themeRow==="read"?{theme:e.theme}:null}function cj(e,o,t){for(let{index:r,nodes:a}of[...e].sort((n,s)=>s.index-n.index)){let n=String(a[0].props.id);t.has(n)||(t.add(n),o.replaceComponent(wh,r,a[0]),a.slice(1).forEach((s,l)=>{o.insertNode(wh,r+1+l,s),o.replaceComponent(wh,r+1+l,s)}))}}import{ROOT_ZONE as qa,missingPinnedTypes as hj,pinnedDuplicateIds as Th}from"efficient-easel/draw";function jT(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}function KT(e,o){let t=e.some(l=>l?.type===ve),r=e[e.length-1],a=!t&&r?.type===Fe?r:null,n=e.filter(l=>l?.type===Fe&&l!==a).map(l=>String(l.props?.id??"")).filter(Boolean),s=o.hasChromeDoc&&!t&&!a;return{remove:n,seedHeader:!e.some(l=>l?.type===ho),seedFooter:s,seedSiteHeader:s&&!e.some(l=>l?.type===Oe)}}async function qT(e){let o=e.blocks?.seeds?.siteHeader;if(!o)return!1;let t;try{t=await o({make:e.make,id:e.id,siteId:e.siteId,token:e.token})}catch{return!1}if(!t||t.type!==Oe||!e.stillOpen())return!1;let r=e.latest();return r.some(a=>a?.type===Oe)?!1:(e.write(Ec(r,t)),!0)}function VT(e,o){let{adapter:t,capabilities:r,currentSlug:a,docId:n,data:s,saveStatus:l,siteId:c,tokenRef:d}=pj(),u=mj(),{hasSiteSettings:h,hasPinnedChrome:p}=r;$T(e);let x=!!r.editsPinnedInPlace&&a!==Ao,g=a===Ao,y=uj().getState,E=fj(null);dj(()=>{if(!jT({docId:n,saveStatus:l,seededDocId:E.current})||(E.current=n,!p))return;let O=y().appState.data,C=O.content,I=s?.content??[],w=(B,P)=>B.some(_=>_?.type===P);if(!h){let B=new Set(Th(C)),P=B.size?C.filter(N=>!B.has(N.props.id)):C;if(B.size&&e.setDocument({...O,content:P}),g)return;let _=hj(P,I);if(_.includes(Fe)){let N=P.length,b=e.insertSection(Fe,N);e.replaceComponent(qa,N,{type:Fe,props:{id:b,blocks:Bc()}})}_.includes(ho)&&e.insertNode(qa,0,Lc());return}if(g){let B=Wa(C);if(B!==C&&e.setDocument({...O,content:[...B]}),!B.find(P=>P.type===Fe)&&!w(I,Fe)&&!w(B,ve)&&!w(I,ve)){let P=(N,b)=>kh(o,N,b),_={type:Fe,props:{blocks:Bc()}};e.insertNode(qa,B.length,ms(_,P,vh(ve)))}return}if(x){let B=!!t?.pinnedChrome?.state().docId,P=KT(C,{hasChromeDoc:B}),_=new Set([...P.remove,...Th(C.filter(b=>!P.remove.includes(String(b.props.id))))]),N=_.size?C.filter(b=>!_.has(String(b.props.id))):C;if(N.length!==C.length&&e.setDocument({...O,content:N}),P.seedFooter&&!w(I,Fe)&&!w(I,ve)){let b=(A,H)=>kh(o,A,H),F={type:Fe,props:{blocks:Bc()}};e.insertNode(qa,N.length,ms(F,b,vh(ve)))}if(P.seedHeader&&!w(I,ho)){let b=N[0]?.type===Oe?1:0;e.insertNode(qa,b,Lc())}if(P.seedSiteHeader&&!w(I,Oe)&&!w(I,Fe)&&!w(I,ve)){let b=n;qT({blocks:xl(u),make:(F,A)=>kh(o,F,A),id:vh(Oe),siteId:c??null,token:d.current,latest:()=>y().appState.data.content,stillOpen:()=>E.current===b,write:F=>{let A=y().appState.data;e.setDocument({...A,content:[...F]})}})}return}let v=C.filter(B=>B.type!==Fe),k=new Set(Th(v)),R=k.size?v.filter(B=>!k.has(B.props.id)):v;R.length!==C.length&&e.setDocument({...O,content:R}),!w(R,ho)&&!w(I,ho)&&e.insertNode(qa,0,Lc())},[n,l,s,y,e,h,p,g,x,t,u,c,d])}import{useEffect as oP,useMemo as Cj,useRef as tP}from"react";import{useEasel as wj}from"efficient-easel/easel";import{useEaselHost as kj}from"efficient-easel/screen/lib/host";import{FIELD_DESCRIPTION_MARKER as xj}from"efficient-easel/screen/lib/host";import{isNode as Ph}from"efficient-easel/data";function Eh(e,o){let t=e.components[o]?.label;return typeof t=="string"&&t.trim()?t.trim():o}function Ij(e){return e.length>3&&e.endsWith("s")?e.slice(0,-1):e}function Oh(e,o,t,r){e.forEach((a,n)=>{if(Ph(a)){r.push({node:a,list:e,index:n,parent:o,slot:t});for(let[s,l]of Object.entries(a.props))Array.isArray(l)&&l.some(Ph)&&Oh(l,a,s,r)}})}function gj(e){let o=[];Oh(Array.isArray(e.content)?e.content:[],null,"",o);for(let t of Object.values(e.zones??{}))Array.isArray(t)&&Oh(t,null,"",o);return o}function XT(e,o){return gj(e).find(t=>String(t.node.props.id)===o)}function ZT(e,o,t){if(!t)return null;let r=XT(o,t);if(!r)return null;let a=Eh(e,r.node.type),n=r.parent?`${Eh(e,r.parent.type)} \xB7 ${Ij(r.slot)} ${r.index+1}`:a;return{blockId:t,type:r.node.type,label:n,path:""}}var bj=e=>e.filter(o=>!!o&&typeof o=="object"&&"value"in o).map(o=>typeof o.label=="string"?{value:o.value,label:o.label}:{value:o.value});function yj(e){if(!e||typeof e!="object")return null;let o=e;if(typeof o.type!="string")return null;let t=o.type==="custom"?o[xj]:void 0,r={type:t?.type??o.type},a=t?.label??o.label;typeof a=="string"&&(r.label=a);let n=t?.options??o.options;Array.isArray(n)&&(r.options=bj(n));for(let s of["arrayFields","objectFields"]){let l=t?.[s]??o[s];l&&typeof l=="object"&&(r[s]=JT(l))}return r}function JT(e){let o={};for(let[t,r]of Object.entries(e??{})){let a=yj(r);a&&(o[t]=a)}return o}function QT(e){let o={};for(let[t,r]of Object.entries(e.components))r&&(o[t]={label:Eh(e,t),fields:JT(r.fields)});return o}function Sj(e,o){let t=e;for(let r of o?o.split("."):[]){let a=/^([A-Za-z_][A-Za-z0-9_]*)(?:\[(\d+)\])?$/.exec(r);if(!a||!t||typeof t!="object")return null;t=t[a[1]],a[2]!==void 0&&(t=Array.isArray(t)?t[Number(a[2])]:void 0)}return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Fh(e,o){return e.findIndex(t=>Ph(t)&&String(t.props.id)===o)}function YT(e,o,t){let r=o||t;if(!r)return e.length;let a=Fh(e,r);if(a<0)throw new Error(`there is no top-level block ${r}`);return o?a+1:a}function eP(e,o,t,r){let a=structuredClone(o),n=Array.isArray(a.content)?a.content:a.content=[];try{t.forEach((s,l)=>{let c=d=>{throw new Error(`change ${l+1}: ${d}`)};switch(s.op){case"set_props":{let d=XT(a,s.block_id)??c(`there is no block ${s.block_id}`);"id"in s.props&&c("a block's id is never changed");let u=Sj(d.node.props,s.path)??c(`there is no ${s.path} in that block`);Object.assign(u,structuredClone(s.props));break}case"insert_block":{let d=e.components[s.type]??c(`there is no block type ${s.type}`),u=d.defaultProps&&typeof d.defaultProps=="object"?d.defaultProps:{},h={type:s.type,props:{...structuredClone(u),...structuredClone(s.props),id:r(s.type)}};n.splice(YT(n,s.after,s.before),0,h);break}case"remove_block":{let d=Fh(n,s.block_id);d<0&&c(`there is no top-level block ${s.block_id}`),n.splice(d,1);break}case"move_block":{let d=Fh(n,s.block_id);d<0&&c(`there is no top-level block ${s.block_id}`);let[u]=n.splice(d,1);n.splice(YT(n,s.after,s.before),0,u);break}default:c(`"${s.op}" is not a change this editor makes`)}})}catch(s){return{ok:!1,reason:s instanceof Error?s.message:String(s)}}return{ok:!0,document:a}}var _h=e=>we(e.requestId)??null;function rP(){let e=kj(),{appState:o,selectedItem:t,dispatch:r,history:a,config:n}=wj(p=>p),s=n,l=tP({appState:o,dispatch:r,history:a,blockConfig:s});l.current={appState:o,dispatch:r,history:a,blockConfig:s};let c=tP(new Map),d=t?.props?.id,u=Cj(()=>ZT(s,o.data,d),[s,o.data,d]),h=u?JSON.stringify(u):"";oP(()=>{e.connected&&e.send("storefront-editor:selection",{selection:u})},[e,h]),oP(()=>e.subscribe(p=>{let{appState:x,dispatch:g,history:y,blockConfig:E}=l.current;switch(p.type){case"storefront-editor:request-document":{let O=_h(p);if(!O)return;e.send("storefront-editor:document",{requestId:O,document:x.data,blocks:QT(E)});return}case"storefront-editor:apply-page-edits":{let O=_h(p);if(!O)return;let C=Array.isArray(p.ops)?p.ops:[],I=C.length?eP(E,x.data,C,w=>`${w}-${crypto.randomUUID()}`):{ok:!1,reason:"no changes"};I.ok&&(g({type:"setData",data:I.document,recordHistory:!0}),c.current.set(O,JSON.stringify(I.document.content??[]))),e.send("storefront-editor:page-edits-result",{requestId:O,applied:I.ok,reason:I.ok?null:I.reason});return}case"storefront-editor:undo-page-edits":{let O=_h(p);if(!O)return;let C=c.current.get(O),I=C!==void 0&&C===JSON.stringify(x.data.content??[]);I&&y.hasPast&&(y.back(),c.current.delete(O)),e.send("storefront-editor:page-edits-result",{requestId:O,applied:I&&y.hasPast,reason:I?null:"the page has changed since"});return}case"storefront-editor:set-right-panel":typeof p.shown=="boolean"&&g({type:"setUi",ui:{rightSideBarVisible:p.shown}});return;default:return}}),[e])}import{useEffect as sP,useState as lP}from"react";var Yc=new Map;async function vj(e,o){try{return(await Ne().site.get({siteId:o})).slug?.trim()||null}catch(t){return console.warn("[editor-site-slug] could not resolve the site slug",t),null}}function aP(e,o){let t=Yc.get(o);return t||(t=vj(e,o),Yc.set(o,t),t.catch(()=>{Yc.get(o)===t&&Yc.delete(o)})),t}var Tj=/^(localhost|(?:[a-z0-9-]+\.)+localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\]|::1)$/i;function Rh(e){return!!e&&Tj.test(e)}function nP(e){let{pageSlug:o,siteSlug:t,hostname:r}=e,a=o===ul?"/":`/${encodeURIComponent(o)}`;if(!Rh(r))return a;let n=t?.trim();return n?`${a}?site=${encodeURIComponent(n)}`:a}function iP(e){let{pageSlug:o,siteId:t,token:r}=e,[a,n]=lP(null),[s,l]=lP(null),c=ea();sP(()=>l(c?new URL(c).hostname:window.location.hostname),[c]),sP(()=>{if(!Rh(s)||!t||!r){n(null);return}let u=!1;return aP(r,t).then(h=>{u||n(h)}),()=>{u=!0}},[s,t,r]);let d=nP({pageSlug:o,siteSlug:a,hostname:s});return c?`${c}${d}`:d}import{jsx as ys}from"react/jsx-runtime";import{useEffect as Pj,useRef as cP,useState as Ej}from"react";import{ExternalIcon as dP}from"efficient-easel/icons";import{EaselIconButton as Oj}from"efficient-easel/chrome";import{Tooltip as Fj,iconButtonClasses as _j}from"efficient-shell/ui";import{useSettledPress as Rj}from"efficient-easel/easel";import{useScreenDocument as Aj}from"efficient-easel/screen/components/ScreenDocumentContext";async function Lj({pageId:e,liveHref:o,draftLink:t,ready:r=async()=>!0,win:a=window}){let n=a.open("","_blank");if(n)try{n.opener=null}catch{}let s=l=>{n&&!n.closed?n.location.href=l:a.open(l,"_blank","noopener,noreferrer")};try{await r()}catch{}return t(e).then(l=>s(l.url??o),()=>s(o))}function fP({liveHref:e,pageId:o,draftLink:t}){let{flushSave:r}=Aj(),a=cP(r);a.current=r;let n=Rj(),[s,l]=Ej(!1),c=cP(null);if(Pj(()=>()=>c.current?.(),[]),t&&o){let d=()=>new Promise((h,p)=>{c.current=()=>h(!1),n.run(()=>{c.current=null,a.current().then(h,p)})}),u=()=>{s||n.waiting||(l(!0),Lj({pageId:o,liveHref:e,draftLink:t,ready:d}).finally(()=>l(!1)))};return ys(Oj,{label:i("Preview your saved draft in a new tab"),tip:i("Open your saved draft in a new tab. Visitors don't see it."),disabled:s||n.waiting,onClick:u,children:ys(dP,{})})}return ys(Fj,{content:i("Preview the live site (opens in a new tab)"),side:"bottom",children:ys("a",{className:_j({className:"es-iconbtn"}),href:e,target:"_blank",rel:"noopener noreferrer","aria-label":i("Preview the live site in a new tab"),children:ys(dP,{})})})}import{createElement as Hj,useCallback as Gj,useEffect as EP,useRef as OP,useState as Wj}from"react";import{ClockIcon as zj}from"efficient-shell/icons/efficient";import{useScreenDocument as Uj}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSyncExternalStore as Bj}from"react";import{useScreenDocument as Dj}from"efficient-easel/screen/components/ScreenDocumentContext";var Nj=()=>()=>{},uP=()=>null;function Xc(e){return Bj(e?e.subscribe:Nj,e?e.state:uP,e?e.state:uP)}function Zc(){let{adapter:e}=Dj();return e?.pinnedChrome}import{useSyncExternalStore as hP}from"react";var Ss=!1,Va=null,Ah=new Set;function ws(){for(let e of Ah)e()}function xP(e){return Ah.add(e),()=>{Ah.delete(e)}}function IP(){Ss||(Ss=!0,ws())}function gP(){Ss&&(Ss=!1,ws())}function pP(){return Ss}function bP(){return hP(xP,pP,pP)}function mP(){return Va}function Jc(){Va&&(Va=null,ws())}function yP(){return hP(xP,mP,mP)}var Cs=class extends Error{constructor(){super("The editor's last changes could not be saved, so nothing was restored."),this.name="HeldEditsNotSaved"}};async function SP(e,o,t,{flushSave:r,reload:a}){if(!await r())throw new Cs;let n=await e.restore(o,t);return kl(n.liveState),a(),n}async function CP({access:e,version:o,page:t,...r}){let a=await SP(e,o.id,t?{page:t.id}:{},r);Va={title:Mj(o,t??null),undo:a.undo},ws()}async function wP({access:e,...o}){let t=Va?.undo;t&&(await SP(e,t,{},o),Va=null,ws())}function kP(e){return e.name?e.name:e.kind==="draft_before_restore"?i("Draft before restore"):i("Version {n}",{n:e.number})}function Mj(e,o){return e.kind==="draft_before_restore"?i("Your drafts from before the restore are back"):o?i("{page} from version {n} is now your draft",{page:o.name,n:e.number}):i("Version {n} is now your draft",{n:e.number})}function vP(e){let o=e.changes.filter(r=>r.kind==="page").length,t=[...o?[io("{n} page","{n} pages",o)]:[],...e.changes.filter(r=>r.kind!=="page").map(r=>r.name)];if(!t.length)return"";try{return new Intl.ListFormat(Ud(),{type:"conjunction"}).format(t)}catch{return t.join(", ")}}function TP(e){return e.change==="take_down"?i("{name} (taken down)",{name:e.name}):e.name}function PP(e,o=new Date){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let r=Ud(),a=new Intl.DateTimeFormat(r,{hour:"numeric",minute:"2-digit"}).format(t);if(t.toDateString()===o.toDateString())return i("Today, {time}",{time:a});let n=new Intl.DateTimeFormat(r,{day:"numeric",month:"short",...t.getFullYear()===o.getFullYear()?{}:{year:"numeric"}}).format(t);return i("{day}, {time}",{day:n,time:a})}function FP(e){let{docId:o,capabilities:t,hasUnsavedEdits:r,onPublish:a,adapter:n}=Uj(),s=p0(u0(o??null),r),l=Xc(Zc()),c=n.siteLiveState;EP(()=>{if(c)return zf(c),pt(0),()=>zf(null)},[c]);let d=vl(),[u,h]=Wj(!1),p=OP(e);p.current=e;let x=OP(!0);EP(()=>(x.current=!0,()=>{x.current=!1}),[]);let g=Gj(()=>{h(!0),a(p.current).then(()=>{Jc()}).finally(()=>{x.current&&h(!1)})},[a]);if(t.canPublish){if(c){let y=d===void 0?void 0:r||d.state==="changed"?"changed":"live",E=jm({live:y,onPress:g,busy:u,goingLive:m0(d?.changes??[])});return n.siteVersions?{...E,menuItems:$j()}:E}return jm({live:s,onPress:g,busy:u,pinnedUnpublished:l?.unpublished??!1})}}function $j(){return[{key:"version-history",label:i("Version history"),icon:Hj(zj),onSelect:IP}]}import{jsx as q,jsxs as So,Fragment as Ts}from"react/jsx-runtime";import{useCallback as jj,useEffect as Kj,useId as AP,useRef as qj,useState as To}from"react";import{useSettledAction as Vj}from"efficient-easel/easel";import{Avatar as Yj,Banner as ks,Button as Ur,ColoredBadge as Lh,Dialog as LP,Drawer as Xj,DropdownMenu as Zj,FormField as BP,iconButtonClasses as Jj,Inline as Bh,Input as Qj,ListRow as e7,Select as o7,SortableList as t7,Stack as vs}from"efficient-shell/ui";import{EditIcon as r7,EyeIcon as _P,MenuIcon as a7,MoreIcon as n7,PageIcon as DP,RevertIcon as RP,StylesIcon as s7}from"efficient-shell/icons/efficient";import{useScreenDocument as NP}from"efficient-easel/screen/components/ScreenDocumentContext";var l7={page:DP,menu:a7};function i7(e,o){return e.pages.find(t=>t.id===o)??e.pages[0]??null}function c7(e,o){let t=window.open("","_blank");if(t)try{t.opener=null}catch{}return e.preview(o).then(({url:r})=>{t&&!t.closed?t.location.href=r:window.open(r,"_blank","noopener,noreferrer")},r=>{throw t?.close(),r})}function d7({version:e,page:o,waiting:t,busy:r,error:a,onCancel:n,onConfirm:s,onPage:l}){let c=AP();if(!e)return null;let d=e.kind==="draft_before_restore",u=e.number,h=vP(e),p=d?i("Put your drafts back?"):o?i("Restore {page} from version {n}?",{page:o.name,n:u}):i("Restore version {n}?",{n:u}),x=d?i("Your drafts go back to how they were before the restore."):o?i("{page} goes back to version {n} as a draft. Nothing else on your website changes.",{page:o.name,n:u}):h?i("The whole website goes back to version {n} as a draft: {what}.",{n:u,what:h}):i("The whole website goes back to version {n} as a draft.",{n:u}),g=e.deletedPictures??0;return q(LP,{open:!0,onClose:()=>{r||n()},size:"sm",title:p,footer:So(Ts,{children:[q(Ur,{variant:"secondary",onClick:n,disabled:r,children:i("Cancel")}),q(Ur,{onClick:s,loading:r,disabled:r,children:i("Restore as draft")})]}),children:So(vs,{gap:4,children:[o&&e.pages.length>1?q(BP,{label:i("Page"),htmlFor:c,children:q(o7,{id:c,value:o.id,options:e.pages.map(y=>({value:y.id,label:y.name})),onChange:l,disabled:r})}):null,q("p",{children:x}),q("p",{children:i("Your live website does not change until you press Publish.")}),g>0?q(ks,{tone:"warning",children:io("{n} picture in this version was deleted from the media library. It stays empty.","{n} pictures in this version were deleted from the media library. They stay empty.",g)}):null,t?q(ks,{tone:"info",title:i("Your unpublished changes are kept"),children:i("They are saved in Version history as \u201CDraft before restore\u201D, so you can get them back.")}):null,a?q(ks,{tone:"danger",children:a}):null]})})}function f7({version:e,onCancel:o,onSave:t}){let r=AP(),[a,n]=To(null),[s,l]=To(""),[c,d]=To(!1),[u,h]=To(null);if(e!==a&&(n(e),l(e?.name??""),h(null)),!e)return null;let p=s.trim()===e.name,x=async()=>{if(!(c||p)){d(!0),h(null);try{await t(s.trim())}catch{h(i("The name was not saved. Try again."))}finally{d(!1)}}};return q(LP,{open:!0,onClose:()=>{c||o()},size:"sm",title:i("Name this version"),footer:So(Ts,{children:[q(Ur,{variant:"secondary",onClick:o,disabled:c,children:i("Cancel")}),q(Ur,{onClick:()=>{x()},loading:c,disabled:c||p,children:i("Save")})]}),children:q(BP,{label:i("Name"),htmlFor:r,hint:i("Named versions are always kept. Leave it empty to take the name away."),error:u??void 0,children:q(Qj,{id:r,value:s,invalid:!!u,onChange:g=>l(g.target.value),onKeyDown:g=>{g.key==="Enter"&&x()}})})})}function u7({version:e,expanded:o,onToggle:t,onPreview:r,onRestore:a,onRestorePage:n,onName:s}){let l=e.kind==="draft_before_restore",c=!e.live,d=e.changes.length,u=[...l?[]:[{key:"preview",label:i("Preview"),icon:q(_P,{}),onSelect:r}],...c?[{key:"restore",label:l?i("Put these drafts back"):i("Restore whole website"),icon:q(RP,{}),onSelect:a}]:[],...c&&!l&&e.pages.length?[{key:"restore-page",label:i("Restore one page only"),icon:q(DP,{}),onSelect:n}]:[],...l?[]:[{type:"divider",key:"divider"},{key:"name",label:i("Name this version"),icon:q(r7,{}),onSelect:s}]];return q(e7,{title:So("span",{className:"sf-version-title",children:[q("span",{children:kP(e)}),e.live?q(Lh,{tone:"success",size:"xs",children:i("Live")}):null,e.name?q(Lh,{tone:"neutral",size:"xs",children:i("Version {n}",{n:e.number})}):null,l?q(Lh,{tone:"warning",size:"xs",children:i("Not published")}):null]}),expanded:o,onToggle:t,actions:q(Zj,{align:"end","aria-label":i("More"),items:u,triggerClassName:Jj({variant:"ghost",size:"sm"}),trigger:q(n7,{})}),below:So(vs,{gap:3,children:[So(Bh,{gap:2,align:"center",wrap:!0,className:"sf-version-meta",children:[q(Yj,{name:e.createdBy,size:"xs"}),q("span",{children:e.createdBy}),q("span",{"aria-hidden":"true",children:"\xB7"}),q("span",{children:PP(e.createdAt)}),d?So(Ts,{children:[q("span",{"aria-hidden":"true",children:"\xB7"}),q("span",{children:io("{n} change","{n} changes",d)})]}):null]}),o?So(vs,{gap:3,children:[d?q(vs,{gap:2,children:e.changes.map(h=>{let p=l7[h.kind]??s7;return So(Bh,{gap:2,align:"center",children:[q(p,{size:16}),q("span",{children:TP(h)})]},`${h.kind}:${h.id}`)})}):null,So(Bh,{gap:2,children:[l?null:q(Ur,{variant:"secondary",size:"sm",leftIcon:q(_P,{}),onClick:r,children:i("Preview")}),c?q(Ur,{variant:"secondary",size:"sm",leftIcon:q(RP,{}),onClick:a,children:i("Restore")}):null]})]}):null]})})}function p7({open:e,onClose:o,access:t,waiting:r}){let{flushSave:a,reloadFromServer:n,docId:s}=NP(),[l,c]=To(null),[d,u]=To(!1),[h,p]=To(null),[x,g]=To(null),[y,E]=To(!1),[O,C]=To(null),[I,w]=To(null),[v,k]=To(!1),R=qj(0),B=jj(()=>{let b=++R.current;u(!1),t.list().then(F=>{b===R.current&&c(F)},()=>{b===R.current&&u(!0)})},[t]);Kj(()=>{e&&B()},[e,B]);let P=b=>{k(!1),c7(t,b.id).catch(()=>k(!0))},_=async()=>{if(!(!x||y)){E(!0),C(null);try{await CP({access:t,version:x.version,page:x.page,flushSave:a,reload:n}),g(null),o()}catch(b){C(b instanceof Cs?i("Your last changes did not save, so nothing was restored. Try again."):i("The version was not restored. Nothing changed. Try again."))}finally{E(!1)}}},N=Vj({onPress:()=>{_()},busy:y});return So(Ts,{children:[q(Xj,{open:e,onClose:o,side:"right",size:"md",title:i("Version history"),description:So(Ts,{children:[i("Every Publish keeps a copy of the whole website: pages, menus and site styles.")," ",i("Products, prices and forms always show as they are now.")]}),footer:q("span",{className:"sf-version-foot",children:i("The newest 30 are kept. Named versions are always kept.")}),children:So(vs,{gap:3,children:[v?q(ks,{tone:"danger",onDismiss:()=>k(!1),children:i("The preview did not open. Try again.")}):null,d?q(ks,{tone:"danger",action:q(Ur,{variant:"secondary",size:"sm",onClick:B,children:i("Try again")}),children:i("Version history did not load.")}):l===null?q("p",{className:"sf-version-foot",children:i("Loading versions")}):l.length===0?q("p",{className:"sf-version-foot",children:i("No versions yet. Every Publish from now on keeps one.")}):q(t7,{"aria-label":i("Versions"),spacing:"comfortable",children:l.map(b=>q(u7,{version:b,expanded:h===b.id,onToggle:()=>p(F=>F===b.id?null:b.id),onPreview:()=>P(b),onRestore:()=>{C(null),g({version:b,page:null})},onRestorePage:()=>{C(null),g({version:b,page:i7(b,s)})},onName:()=>w(b)},b.id))})]})}),q(d7,{version:x?.version??null,page:x?.page??null,waiting:r,busy:N.busy===!0,error:O,onCancel:()=>g(null),onConfirm:N.onPress,onPage:b=>g(F=>F&&{...F,page:F.version.pages.find(A=>A.id===b)??F.page})}),q(f7,{version:I,onCancel:()=>w(null),onSave:async b=>{await t.name(I.id,b),w(null),B()}})]})}function MP(){let{adapter:e,hasUnsavedEdits:o}=NP(),t=e.siteVersions,r=bP(),a=vl();return t?q(p7,{open:r,onClose:gP,access:t,waiting:o||a?.state==="changed"}):null}import{useEaselSession as FF}from"efficient-easel/screen/lib/session-context";import{buildPaletteSections as YCe,categoryLabel as XCe,paletteWithoutPinned as ZCe,pinnedSection as JCe}from"efficient-easel/screen/lib/document/palette-sections";var m7={openers:{label:"Hero & intros",icon:"image"},shop:{label:"Shop & galleries",icon:"bag"},product:{label:"Product page",icon:"box"},checkout:{label:"Checkout & ordering",icon:"bag"},about:{label:"About & brand story",icon:"book"},content:{label:"Text & content",icon:"type"},proof:{label:"Stats & social proof",icon:"star"},promo:{label:"Promotions & sign-ups",icon:"sparkles"},blog:{label:"Blog & journal",icon:"newspaper"},navigation:{label:"Navigation & wayfinding",icon:"bookmark"},legal:{label:"Legal & documents",icon:"file"},contact:{label:"Contact, FAQ & forms",icon:"mail"},structure:{label:"Layout, structure & embeds",icon:"grid"},layouts:{label:"Layouts",icon:"layers"}};function HP(e){return m7[e]?.label}var GP=Hm;import{currentEaselSession as LO}from"efficient-easel/screen/lib/session";var WP=[{text:"Ticker item"},{text:"Ticker item"},{text:"Ticker item"},{text:"Ticker item"}],rwe={label:"Scrolling Bar",defaultProps:{items:[],tone:"scrim",borders:!0,size:iu,separator:cu,scrollDirection:qn}};var zP=()=>[{text:i("Spec label"),tone:"normal"},{text:i("Spec value"),tone:"muted"},{text:i("Spec label"),tone:"normal"},{text:i("Spec value"),tone:"muted"}],swe={label:"Spec Strip",defaultProps:{cells:[{text:"",tone:"normal"},{text:"",tone:"normal"}],fill:"dark"}};var Qc={direction:"column",justify:"between",gap:14,sectionPaddingLeft:14,sectionPaddingRight:14,sectionPaddingLeftPhone:0,sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},Ps={name:"Year and title",direction:"column",gap:14};var $r={direction:"row",share:"content",align:"center"},Es={top:14,bottom:14,topPhone:12,bottomPhone:12},ed={wrap:"nowrap",loop:"scroll",sectionAccent:Kf,gap:60,gapPhone:32,separator:"dot",sectionBorder:{top:1,bottom:1}},UP={gap:120,gapPhone:64},od={textStyle:"body-5",sizeToken:{step:"label",px:14,pxPhone:12},letterSpacing:.25,case:"upper",lineHeight:1.5},$P={textStyle:"heading-3",letterSpacing:.005,case:"upper",lineHeight:1},Os={top:16,bottom:16,topPhone:12,bottomPhone:12},td={justify:"between",wrap:"wrap",gap:32,separator:"none"},Fs={textStyle:"body-5",letterSpacing:.1,case:"upper",lineHeight:1.5};function te(e,o,t,r={}){return{type:e,props:{...o(e),id:t(e),...r}}}function jP(e,o,t){return te(re,e,o,{...t,sectionPaddingTop:void 0,sectionPaddingBottom:void 0})}var qP={Manifesto:(e,o)=>({type:re,props:{...e(re),id:o(re),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[te(re,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[te("Text",e,o,yo()),te("Text",e,o,vo()),te("Text",e,o),te("Stats",e,o)]}),jP(e,o,{direction:"column",name:"Picture",content:[]})]}}),Split:(e,o)=>({type:re,props:{...e(re),id:o(re),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[te(re,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[te("Text",e,o,yo()),te("Text",e,o,vo()),te("Text",e,o),te("ButtonBlock",e,o)]}),jP(e,o,{direction:"column",name:"Image",content:[te("ImageBlock",e,o)]})]}}),Subscribe:(e,o)=>({type:re,props:{...e(re),id:o(re),direction:"column",name:"Subscribe",content:[te("Text",e,o,vo()),te("Text",e,o),te("Form",e,o)]}}),Ticker:(e,o)=>KP("Scrolling Bar",ed,Es,WP.map(t=>({text:t.text,style:od,muted:!0})),e,o),SpecStrip:(e,o)=>KP("Spec Strip",{...td,sectionBorder:{top:1}},Os,zP().map(t=>({text:t.text??"",style:Fs,muted:t.tone==="muted"})),e,o),TimelineTrack:(e,o)=>{let t=r=>te(re,e,o,{...Qc,name:"Year",sectionPaddingTop:0,sectionPaddingBottom:0,...r?{upcoming:!0}:{},content:[te(re,e,o,{...Ps,sectionPaddingTop:0,sectionPaddingBottom:0,content:[te("Text",e,o,yo()),te("Text",e,o,vo())]}),te("Text",e,o)]});return{type:re,props:{...e(re),id:o(re),direction:"column",gap:48,name:"Milestone Timeline",content:[te(re,e,o,{direction:"row",align:"end",justify:"between",share:"content",name:"Heading",content:[te("Text",e,o,yo()),te("Text",e,o,vo()),te("Text",e,o)]}),te(re,e,o,{direction:"row",share:"equal",gap:0,line:!0,name:"Years",content:[t(!1),t(!1),t(!0)]}),te("ButtonBlock",e,o)]}}},Timeline:(e,o)=>{let t=()=>te(re,e,o,{direction:"row",share:"biggerRight",gap:24,name:"Chapter",content:[te("Text",e,o,yo()),te(re,e,o,{direction:"column",gap:12,name:"Words",content:[te("Text",e,o,vo()),te("Text",e,o)]})]});return{type:re,props:{...e(re),id:o(re),direction:"row",share:"bigRight",gap:48,name:"Story Timeline",content:[te(re,e,o,{direction:"column",gap:24,name:"Heading",content:[te("Text",e,o,yo()),te("Text",e,o,vo()),te("Text",e,o),te("ImageBlock",e,o),te("ButtonBlock",e,o)]}),te(re,e,o,{direction:"column",gap:48,line:!1,name:"Chapters",content:[t(),t(),t()]})]}}}};function KP(e,o,t,r,a,n){return te(re,a,n,{...$r,...o,blockSpacing:"gap",padV2:!0,name:e,sectionPaddingTop:t.top,sectionPaddingBottom:t.bottom,sectionPaddingTopPhone:t.topPhone,sectionPaddingBottomPhone:t.bottomPhone,content:r.map(s=>te("Text",a,n,{text:s.text,...s.muted?{tone:"dim"}:{},_partStyles:{text:s.style}}))})}function VP(e){return qP[e]??null}import{phoneKey as S7}from"efficient-easel/draw";var YP={label:"Button",defaultProps:{label:"",href:"#",variant:"primary",align:"left",contained:!0}};var XP={label:"Text",defaultProps:{text:"",align:"left",tone:"default",tag:"p",contained:!0}};import{jsx as x7}from"react/jsx-runtime";function rd(e){return`color-mix(in srgb, var(--overlay-scrim) ${Math.round(Math.min(1,Math.max(0,e))*1e3)/10}%, transparent)`}var Cwe="sf-card",ZP={min:0,max:100,step:5,fallback:0,unit:"%"},wwe=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],h7="68%",kwe={desktop:20,phone:20,side:40,sidePhone:24},vwe="sf-box-sides";function JP(e){return typeof e=="string"&&e.trim()!==""}function Twe(e,o){let t=typeof e=="number"?e:Number.parseFloat(String(e??""));if(!Number.isFinite(t)||t<=0)return null;let r=(Math.min(ZP.max,Math.max(ZP.min,t))/100).toFixed(2);return o!=="bottom"?{background:rd(Number(r))}:{background:`linear-gradient(0deg, ${rd(Number(r))} 0%, ${rd(0)} ${h7})`}}function Pwe(e,o){let t={"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"]},[r,a]=t[e]??t.center,[n,s]=o==="column"?[a,r]:[r,a],l={start:"justify-start",center:"justify-center",end:"justify-end"},c={start:"items-start",center:"items-center",end:"items-end"};return`${l[n]} ${c[s]}`}var ad={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120},DetailRows:{top:100,bottom:100}},QP=new Set(Object.keys(ad)),o1=new Set(["Flex","Text","Heading","ImageBlock"]),I7=new Set(["Divider"]),g7=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),e1=new Set(["ProductGrid"]);function Dh(e,o,t=!1){let r=e.render;e.render=a=>{if(o?.(a))return r(a);let n=Rl(ey(a,ou,t)),s=r(a),l=dy(a);return n?x7("div",{className:l?`${n.className} ${l}`:n.className,style:n.style,children:s}):s}}var Awe={name:"sectionPadding",applies:(e,o,t)=>o.isSection(e)&&!g7.has(e)&&!!t&&typeof t.render=="function",panel(e,o,t){QP.has(o)||e1.has(o)||(e.fields={...e.fields,...t.sidesPaddingFields({tablet:!0})})},draw(e,o){if(QP.has(o)){let t=e.render,r=ad[o];e.render=a=>{let n=Al(a,r);return t({...a,padTop:n.top,padBottom:n.bottom})};return}if(e1.has(o)){Dh(e);return}o1.has(o)||I7.has(o)||Dh(e,o==="Flex"?t=>JP(t.bgImage):void 0,!0)}},b7=["Heading","Text","ImageBlock"],y7=["LogoBlock"],Lwe={name:"blockPadding",applies:(e,o,t)=>(b7.includes(e)||y7.includes(e))&&!!t&&typeof t.render=="function",panel(e,o,t){e.fields={...e.fields,...t.sidesPaddingFields({tablet:!0})}},draw(e,o){o1.has(o)||Dh(e,void 0,!0)}};var{text:qwe,tag:Vwe,...C7}=XP.defaultProps,X=C7,nd={...X,[Dr]:""},me={...X,tone:"dim"},{label:Ywe,href:Xwe,...w7}=YP.defaultProps,lo=w7,vt={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},t1={justify:"start",align:"stretch",wrap:!1,blockSpacing:"gap",padV2:!0},D={...t1,direction:"column",...bn},de={...t1,sectionAccent:0},he=["gridSpan","sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderPhone","sectionAccent","stickTop","stickTopDistance","stickTopPhone","stickTopDistancePhone","anchor","sectionAnimation","_hidden",...Object.values(ke).flatMap(e=>[e,S7(e)]),"widthFit","widthFitPhone","width","widthPhone","minWidth","minWidthPhone","maxWidth","maxWidthPhone"],Ya="a section width key, ignored since efficient-web-builder 45 (every section, and a section's root Box, follows Site styles only; Lewis 2026-10-29), so dropping it changes nothing",xe={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:Ya,fullWidth:Ya,pageWidth:Ya,backgroundWidth:Ya,contentWidth:Ya,contentMax:Ya},Te=Object.fromEntries(["sectionPaddingLeft","sectionPaddingRight","sectionPaddingLeftTablet","sectionPaddingRightTablet","sectionPaddingLeftPhone","sectionPaddingRightPhone"].map(e=>[e,"needs Box side padding outside its gutter: the old section added it outside its frame, a Box's side padding replaces the gutter. 0 live nodes store it (JJ's read-only export, 2026-10-24)"]));function Se(e,o){let t=K(e.sectionPaddingTop)??0,r=K(e.sectionPaddingBottom)??0,a=K(e.sectionPaddingTopTablet),n=K(e.sectionPaddingBottomTablet);return{sectionPaddingTop:t+o.top,sectionPaddingBottom:r+o.bottom,...a===void 0?{}:{sectionPaddingTopTablet:a+o.top},...n===void 0?{}:{sectionPaddingBottomTablet:n+o.bottom},sectionPaddingTopPhone:(K(e.sectionPaddingTopPhone)??a??t)+o.topPhone,sectionPaddingBottomPhone:(K(e.sectionPaddingBottomPhone)??n??r)+o.bottomPhone}}var He=e=>["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(t,r)=>Se(r,typeof e=="function"?e(r):e)[o]]);function xo(e,o){let t=Al(e,ad[o]);return{sectionPaddingTop:t.top,sectionPaddingBottom:t.bottom}}var Yt=e=>[["padTop","sectionPaddingTop",(o,t)=>xo(t,e).sectionPaddingTop],["padBottom","sectionPaddingBottom",(o,t)=>xo(t,e).sectionPaddingBottom],["sectionPaddingTop","sectionPaddingTop",(o,t)=>xo(t,e).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,t)=>xo(t,e).sectionPaddingBottom]],k7={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},Zwe=e=>o=>Ue(o.props[e])?[k7]:[],Ie=(e,o)=>({kind:"text",key:e,role:"eyebrow",props:X,...o?{style:o}:{}}),r1=e=>e.background!=="transparent",v7=(e,o)=>{let[t,r]=[e,o].map(a=>typeof a=="string"?a.trim():"");return t?r?`[${t} ]{color=text}${r}`:`[${t}]{color=text}`:r},_s={align:"right",alignPhone:"left"},Nh=(e,o,t)=>{let r=a=>v7(a[e],a[o]);return{kind:"block",type:"Text",when:(a,n)=>n!==void 0&&r(n)!=="",box:[[e,"text",(a,n)=>r(n)],[o,"text",(a,n)=>r(n)]],props:t}},Rs=(e,o,t,r={})=>Nh(e,o,{...nd,..._s,...r,_partStyles:{text:{textStyle:"body-5",color:"labels",...t,case:"upper",..._s}}}),As=(e,o)=>typeof e=="number"&&Number.isInteger(e)&&e>=0?e:Kc(o)?.selected??0,sd=(e,o)=>Kc(o)?.themes[As(e.sectionAccent??0,o)],jo=e=>(o,t)=>{let r=sd(o,t)?.[e];return r?{fillColor:r}:{}},Ls=(e,o)=>{let t=sd(e,o)?.line;return t?{buttonBorder:{width:1,color:t}}:{}},jr=(e,o)=>{let t=Kc(o)?.themes;return t&&r1(e)?jx(t,As(e.sectionAccent,o)):-1},Xt=(e,o,t)=>{let r=jr(o,t);return r>=0?r:e},Kr=(e,o)=>{let t=jr(e,o);return t>=0?{sectionAccent:t}:{}},Zt=(e,o)=>r1(e.props)&&jr(e.props,o)<0?[{kind:"band-preset",page:As(e.props.sectionAccent,o)}]:[];import{phoneKey as xK,readHidable as W1}from"efficient-easel/draw";import{parseHexColor as IK}from"efficient-shell/format";import{jsx as Ja,Fragment as nK,jsxs as qh}from"react/jsx-runtime";import{jsx as jh,jsxs as oK}from"react/jsx-runtime";import{jsx as T7}from"react/jsx-runtime";function a1(){return T7("span",{className:"block h-px w-[30px] bg-current"})}import{jsxs as Hs,jsx as Ge}from"react/jsx-runtime";import{Fragment as g1}from"react";import{parseHexColor as K7}from"efficient-shell/format";import{Fragment as $7,jsx as Uh}from"react/jsx-runtime";import{Fragment as i1,jsx as Ds,jsxs as D7}from"react/jsx-runtime";import{createContext as zh,useContext as Ns,useEffect as N7,useId as M7,useMemo as H7,useRef as G7}from"react";import{armEntrance as W7}from"efficient-shell/format";import{jsx as _7}from"react/jsx-runtime";import{useEffect as l1,useRef as s1,useState as R7}from"react";import{armEntrance as A7,entranceAttrs as L7,playEntrance as B7}from"efficient-shell/format";import{jsx as Bs}from"react/jsx-runtime";import{createContext as n1,useContext as Xa}from"react";var P7={stretchedRow:!1,fillingColumn:!1},Za=n1(null),E7=()=>Xa(Za)!==null,ake=()=>Xa(Za),ld=n1(!1);function O7(){let e=Xa(Za)?.stretchedRow===!0,o=Xa(ld);return e&&!o}var F7=()=>Xa(ld);function Mh(){let e=Xa(Za),o=O7(),t=F7();return{fill:t?` ${cy}`:"",inner:r=>{let a=o||t?Bs(ld.Provider,{value:!0,children:r}):r;return e?.columnsRow?Bs(Za.Provider,{value:{...e,columnsRow:!1},children:a}):a}}}function nke({className:e,style:o,attrs:t,children:r}){let{fill:a,inner:n}=Mh();return Bs("div",{className:`${e}${a}`,...o?{style:o}:{},...t,children:n(r)})}function ske({children:e}){let o=E7();return Bs(Za.Provider,{value:o?P7:null,children:Bs(ld.Provider,{value:!1,children:e})})}function mke({desktop:e,phone:o,editing:t,boxClass:r,boxAttrs:a,boxStyle:n,children:s}){let l=s1(null),c=Mh(),d=Gh(l),u=d?o:e,{attrs:h,style:p}=L7(u),x=s1(Hh.seed(e,o)),g=JSON.stringify(e),y=JSON.stringify(o);return l1(()=>{let E=l.current;if(E){if(t){let O=Hh.next(x.current,e,o,d);x.current=O.seen,O.play&&B7(E);return}return A7(E)}},[g,y,d,t]),_7("div",{ref:l,className:`${ac}${c.fill}${r?` ${r}`:""}`,...a,...h,...Object.keys(p).length||n?{style:{...n,...p}}:{},children:c.inner(s)})}var Hh={seed(e,o){return{desktop:JSON.stringify(e),phone:JSON.stringify(o)}},next(e,o,t,r){let a=Hh.seed(o,t);return{play:r?a.phone!==e.phone:a.desktop!==e.desktop,seen:a}}};function Gh(e,o=!0){let[t,r]=R7(!1);return l1(()=>{if(!o)return;let a=e.current?.ownerDocument?.defaultView??(typeof window>"u"?null:window);if(!a?.matchMedia)return;let n=a.matchMedia(ia),s=()=>r(n.matches);return s(),n.addEventListener("change",s),()=>n.removeEventListener("change",s)},[e,o]),t}var id=zh(null),d1=zh(null),f1=zh(null);function wke({needles:e,styles:o,motions:t=Jk,type:r,children:a}){let n=M7(),s=JSON.stringify([n,e,o,t,r]),l=H7(()=>{let d=Object.keys(t).filter(u=>ev(t[u]));return _C(e,o,n,u=>as(r,u),u=>FC(r,u),u=>d.includes(u)?ym(t[u]):null,d)},[s]);if(!l)return Ds(i1,{children:a});let c=RC(l);return D7(i1,{children:[c&&Ds("style",{href:`${z7}${n}-${U7(c)}`,precedence:p1,dangerouslySetInnerHTML:{__html:c.replace(/</g,"\\3c ")}}),Ds(id.Provider,{value:l,children:a})]})}var Wh=new WeakMap;function c1(e,o){let t=tv(o.filter(r=>r.arm));for(let r of o)r===t||!r.undo||(r.undo(),r.undo=void 0);t?.arm&&!t.undo&&(t.undo=t.arm()),o.some(r=>r.lift)?(av(e.ownerDocument),e.setAttribute(fc,"")):e.removeAttribute(fc)}function u1(e){let o=G7(null),t=e?.motion?.entrance??null,r=e?.motion?.hover==="lift",a=Gh(o,t!==null),n=JSON.stringify(t);return N7(()=>{let s=o.current,l=rv(s?.parentElement??null);if(!t&&!r||!s||!l)return;let c=t?()=>{let h=ov(l,a?t.phone:t.desktop),p=W7(l);return()=>{p?.(),h()}}:null,d=Wh.get(l)??[];Wh.set(l,d);let u={element:s,arm:c,lift:r};return d.push(u),c1(l,d),()=>{let h=d.indexOf(u);h<0||(d.splice(h,1),u.undo?.(),u.undo=void 0,c1(l,d),d.length||Wh.delete(l))}},[n,r,a]),o}var p1="sf-part-styles",z7=`${p1}-`;function U7(e){let o=2166136261;for(let t=0;t<e.length;t+=1)o^=e.charCodeAt(t),o=Math.imul(o,16777619);return(o>>>0).toString(36)}function m1(e){let o=Ns(id),t=Ns(d1),r=AC(o,e);return r&&r.stamp!==t?r:null}function kke(e){return np(Ns(id),e)}function h1({stamp:e,children:o}){return Ds(d1.Provider,{value:e,children:o})}function vke({children:e}){let o=Ns(id);return Ds(f1.Provider,{value:o,children:e})}function Tke(e){return np(Ns(f1),e)}function Ms({value:e,children:o}){let t=m1(e),r=u1(t);return t?Uh(h1,{stamp:t.stamp,children:Uh("span",{ref:r,[Ju]:t.stamp,...t.textStyle?{[Ca]:t.textStyle}:{},children:o})}):Uh($7,{children:o})}import{jsx as $h,Fragment as j7}from"react/jsx-runtime";function x1({className:e=""}){return $h("sup",{className:`text-accent tracking-normal text-[length:min(1em,max(0.75em,11px))] ${e}`,children:"\xAE"})}function cd(e){if(!e.includes("\xAE"))return e;let o=e.split("\xAE"),t=[];return o.forEach((r,a)=>{r&&t.push(r),a<o.length-1&&t.push($h(x1,{},`r${a}`))}),$h(j7,{children:t})}var Ake=x1;function uo(e,o=!1,t){let r=eK(o),a=pn(e);if(a.length===1){let[s]=a,l=Of(s),c=l?J7(l,s.children):s.children;return Hs(Ms,{value:e,children:[t,dd(c,r)]})}let n=[];return a.forEach((s,l)=>{if(s.bullet){n.push(Ge("span",{"data-sf-bullet":"",className:q7,children:dd(s.children,r)},l));return}if(s.number!=null){n.push(Hs("span",{"data-sf-number":s.number,className:V7,children:[Hs("span",{className:Y7,children:[s.number,"."]}),dd(s.children,r)]},l));return}l>0&&!X7(a[l-1])&&n.push(Ge("br",{},`br${l}`)),n.push(Ge(g1,{children:dd(s.children,r)},l))}),Hs(Ms,{value:e,children:[t,n]})}var q7="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['\xB7']",V7="relative block pl-[2em]",Y7="absolute left-0 w-[1.6em] text-right tabular-nums";function X7(e){return e.bullet||e.number!=null}var Z7="text-accent underline underline-offset-[0.18em]";function J7(e,o){let[t,...r]=o;return t?.kind==="text"?[{kind:"text",text:`${e}${t.text}`},...r]:[{kind:"text",text:e},...o]}function Q7(e){if(e)return K7(e)===e.toLowerCase()?e:Object.hasOwn(ut,e)?ut[e]:void 0}function dd(e,o){let t=[],r=!1;return e.forEach((a,n)=>{if(a.kind==="text"){t.push(Ge("span",{children:cd(a.text)},n)),r=!0;return}r||t.push(Ge("span",{},`e${n}`)),t.push(b1(a,n,o)),r=!1}),r||t.push(Ge("span",{},"end")),t}function I1(e,o){return e.length===1&&e[0].kind==="text"?cd(e[0].text):e.map((t,r)=>t.kind==="text"?Ge(g1,{children:cd(t.text)},r):b1(t,r,o))}function eK(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function zke(e){return Ge(Ms,{value:e,children:Ge("span",{children:e})})}function b1(e,o,t){if(e.kind==="link")return Ge("a",{href:e.href,className:Z7,children:I1(e.children,t)},o);let r=I1(e.children,t),a=Bg[e.kind];if(a)return Ge("span",{[Dg]:a,children:r},o);switch(e.kind){case"underline":return Ge("u",{children:r},o);case"sup":return Ge("sup",{children:r},o);case"sub":return Ge("sub",{children:r},o);case"color":{let n=Q7(e.color);return n?Ge("span",{style:{color:n},children:r},o):Ge("span",{children:r},o)}case"accent":case"highlight":return Ge("em",{className:t,children:r},o);case"bold":return Ge("strong",{className:"font-semibold",children:r},o);case"italic":return Ge("em",{className:"italic",children:r},o);case"strike":return Ge("s",{className:"line-through",children:r},o);default:return Ge("span",{children:r},o)}}function y1(e,o=!0){let t=e.split(`
|
|
22
|
+
`);return Ge(Ms,{value:e,children:t.map((r,a)=>Hs("span",{children:[uo(r,o),a<t.length-1?Ge("br",{}):null]},a))})}function S1(e){return e.split(/\n\s*\n/).map(o=>o.trim()).filter(Boolean)}var Kh={labelUpTo800:"max-[800px]:text-[length:var(--size-label,12px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,14px)]"};function tK(e,o){return`font-mono text-[length:var(--size-label,${e}px)] uppercase tracking-[0.3em] text-accent`}var rK=`inline-block w-fit bg-accent px-3.5 py-1.5 font-mono ${Kh.labelSmall} font-semibold uppercase tracking-[0.16em] text-bg`,aK=`flex items-center gap-3.5 font-mono ${Kh.labelLarge} uppercase tracking-[0.3em] opacity-80 ${Kh.labelUpTo800} max-[800px]:tracking-[0.25em]`;function C1({text:e,look:o="plain",size:t=13,scaled:r=!0,className:a="",classNameAfter:n=""}){if(o==="line")return oK("div",{className:[a,aK,n].filter(Boolean).join(" "),children:[jh(a1,{}),jh("span",{children:uo(e)})]});let s=o==="filled"?rK:tK(t,r);return jh("span",{className:[a,s,n].filter(Boolean).join(" "),children:uo(e)})}var fd={headingMediumUpTo800:"max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMedium:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]",body:"text-[length:var(--size-body,15px)]",headingSmall:"text-[length:var(--size-headingSmall,20px)]"},sK="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] py-[72px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",lK="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-0 pb-[72px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]";function Vh(e){return Math.min(4,Math.max(2,e??3))}function Jke({look:e,eyebrow:o,title:t,items:r,columns:a,omitHead:n=!1,editing:s=!1}={}){let l=Vh(a),c=(r??[]).filter(u=>s||(u.title??"").trim()||(u.body??"").trim()),d=!!(o??"").trim()||!!(t??"").trim();return!s&&!d&&c.length===0?null:Ja("section",{className:"relative z-[2] bg-surface",children:qh("div",{className:n?lK:sK,children:[n?null:qh(nK,{children:[(o??"").trim()&&Ja(C1,{text:o??"",look:e,className:"mb-4 block"}),(t??"").trim()&&Ja("h2",{className:`mb-9 font-heading2 ${fd.headingMedium} font-medium uppercase leading-none tracking-[-0.02em] text-fg max-[800px]:mb-7 ${fd.headingMediumUpTo800}`,children:y1(t??"",!1)})]}),c.length>0&&Ja("div",{className:"sf-card grid grid-cols-1 gap-px border border-line bg-line min-[700px]:[grid-template-columns:repeat(var(--cd-cols),minmax(0,1fr))]",style:{"--cd-cols":String(l)},children:c.map((u,h)=>{let p=(u.title??"").trim()||(s?i("Card title"):""),x=(u.body??"").trim()||(s?i("A short line about this card."):"");return qh("div",{className:"bg-bg p-8 max-[800px]:p-7",children:[p&&Ja("div",{className:`mb-3 font-heading3 ${fd.headingSmall} font-medium uppercase tracking-[0.02em] text-fg`,children:uo(p)}),x&&Ja("p",{className:`${fd.body} leading-[1.6] text-fg-dim`,children:uo(x)})]},h)})})]})})}var eve={eyebrow:"Label",title:"Section *heading.*"},w1={label:"Cards",defaultProps:{eyebrow:"",title:"",items:[],columns:3}};var rve={eyebrow:"Highlight",title:"Key *features.*"},ave=()=>[{label:i("Feature label one")},{label:i("Feature label two")},{label:i("Feature label three")},{label:i("Feature label four")},{label:i("Feature label five")},{label:i("Feature label six")}],k1={label:"Key Features",defaultProps:{eyebrow:"",title:"",items:[],columns:3}};import{readHidable as iK}from"efficient-easel/draw";function Xh(e){if(e==="ProductGrid")return"shelf";let o=fo[e]?.headStyle;return o==="editorial"||o==="simple"||o==="essay"?o:"standard"}var P1={standard:64,editorial:60,simple:36,essay:28,shelf:20},cK={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function dK(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};let o=fo[e];if(!o)throw new Error(`section-head-looks: "${e}" has no head row in SPLITTABLE_SECTIONS`);return{num:o.num,title:o.title,description:o.description,link:o.headRows.includes("linkText")&&o.headRows.includes("linkHref")}}function E1(e,o,t){let r=`editorial:${e}|${o}|${t}`,a=pd.get(r);if(a)return a;let n=F1({num:e,title:o,description:t,link:!1});return pd.set(r,n),n}var Zh={top:0,right:0,bottom:1,left:0},$=(e,o,t,r)=>({sizeToken:{step:e,px:o,...r?{stepPhone:r}:{},...t?{pxPhone:t}:{}}}),st=(e,o,t,r)=>({sizeToken:{step:e,px:r,fluid:{minPx:o,vw:t}}}),md=(e,o,t={})=>Ie(e,{...$("label",o),...t}),fK=(e,o)=>{let t=iK(e).text.trim();return/\s/.test(t)?{minWidth:Math.ceil(t.length*o*.9),minWidthPhone:0,widthFitPhone:"fill"}:{}},hd=(e,o)=>({kind:"text",key:e,role:"heading",props:X,style:{textStyle:"heading-2",...o}}),Jh=800,Qh=(e,o,t,r)=>({kind:"text",key:e,props:{...me,align:"right",alignPhone:"left",...t?{maxWidth:t,maxWidthPhone:Jh}:{}},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...$("body",o),...r}}),O1={...lo,align:"right",alignPhone:"left",...vt,icon:"arrow-right",iconPosition:"after"},Yh=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:O1,style:{textStyle:"body-5",color:"labels",...$("label",e),letterSpacing:.2,case:"upper"}}),v1=(e,o,t)=>{let r=t.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:a=>a[e]===void 0,props:{...X,...r,...t.props,text:o,_partStyles:{text:{...t.role==="eyebrow"?uK(yo()):{},...t.style}}}}},uK=e=>e._partStyles.text??{},ud={widthFitPhone:"fill"};function pK(e,o){let t=cK[e],r=t==="accent",a=md(o.num,14,{color:r?"accent":"labels"}),n=t==="accentNum"&&a.kind==="text"?{...a,mark:"accentLead"}:a,s=hd(o.title,r?{...st("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...$("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),l=e==="Collections";return{kind:"group",name:"Header",props:{...D,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:Zh,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...D,...ud,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...D,...ud,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},n,...l?[v1(o.num,"==01== / Collections",n)]:[]]},{kind:"group",name:"Heading",props:{...D,...ud},parts:[s,...l?[v1(o.title,`Three ranges,
|
|
23
|
+
one standard.`,s)]:[]]}]},{kind:"group",name:"Words",props:{...D,...ud,gap:12,maxWidth:340,maxWidthPhone:Jh},parts:[...o.description?[Qh(o.description,14,void 0,{lineHeight:1.5})]:[],...o.link?[Yh(14)]:[],...l?[{kind:"block",type:"ButtonBlock",props:{...O1,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:Yh(14).style}}}]:[]]}]}}function F1(e){return{kind:"group",name:"Header",props:{...D,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:Zh,sectionPaddingBottom:32},parts:[{kind:"group",name:"Title",props:{...D,direction:"row",align:"end",gap:40,gapPhone:14,share:"content"},parts:[{kind:"group",name:"Number",props:o=>({...D,sectionPaddingBottom:8,...fK(o[e.num],13)}),parts:[md(e.num,13)]},hd(e.title,{...st("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03})]},{kind:"group",name:"Words",props:{...D,sectionPaddingBottom:4,maxWidth:360,maxWidthPhone:Jh},parts:e.description?[Qh(e.description,14,void 0,{lineHeight:1.5})]:[]}]}}function T1(e,o){return{kind:"group",name:"Header",props:{...D,gap:16,gapPhone:16},parts:[md(e.num,13),hd(e.title,o)]}}var _1=[["para",{textStyle:"body-5",...$("label",13),case:"upper",weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...$("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...$("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...$("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...$("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],mK=e=>_1.some(([o])=>o===e.titleSize)?e.titleSize:"lg";function hK(e){return{kind:"group",name:"Header",props:{...D,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:Zh,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...D,direction:"row",align:"end",gap:24,share:"content"},parts:[md(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),..._1.map(([o,t])=>({...hd(e.title,t),when:r=>mK(r)===o}))]},{kind:"group",name:"Words",props:{...D,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[Qh(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[Yh(13)]:[]]}]}}var pd=new Map;function lt(e){let o=pd.get(e);if(o)return o;let t=dK(e),r=Xh(e),a=r==="editorial"?F1(t):r==="simple"?T1(t,{...$("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}):r==="essay"?T1(t,{...$("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):r==="shelf"?hK(t):pK(e,t);return pd.set(e,a),a}var xd={Series:"transparent",StatsParagraph:"transparent",TimelineTrack:Bo,Stats:void 0};var Jt=(e,o,t,r)=>({sectionBorder:{top:e,right:o,bottom:t,left:r}}),z1=(e,o=e)=>({sectionPaddingTop:e,sectionPaddingRight:e,sectionPaddingBottom:e,sectionPaddingLeft:e,sectionPaddingTopPhone:o,sectionPaddingRightPhone:o,sectionPaddingBottomPhone:o,sectionPaddingLeftPhone:o}),U1=e=>o=>Vh(K(o.columns)??K(e.columns)),$1=e=>({kind:"group",name:"Grid",props:{...D,gap:0,...Jt(1,0,0,1)},parts:[e]}),Id={...D,direction:"row",gap:0,share:"equal"},j1="its head sits in a Box of its own above it (own-box): the row draws the head inline",K1=e=>MT(e.headPlacement)==="own-box",q1="inline is the head the row draws; an own-box node is skipped (`skip`)",gK=e=>({kind:"group",name:"Heading",props:e,parts:[Ie("eyebrow"),{kind:"text",key:"title",role:"heading",props:X,style:{textStyle:"heading-3",case:"upper"},was:{size:44}}]}),R1={top:72,bottom:72,topPhone:72,bottomPhone:72},bK={...D,gap:12,gapPhone:12,...z1(32,28),...Jt(0,1,1,0)},yK={name:"Cards",boxProps:(e,o)=>({...de,direction:"column",gap:36,gapPhone:28,...jo("surface")(e,o),...Se(e,R1)}),box:[...he,...He(R1)],skip:e=>K1(e)?j1:typeof e.dataSource=="string"&&e.dataSource?"its cards come from a source: a data list, which waits for the card template on Cards":e.cardStyle==="label-only"?"Label only is Key Features' look: no live node holds it, so it has no row of its own yet":void 0,parts:[lt("Cards"),$1({kind:"list",key:"items",name:"Card",perRow:U1(w1.defaultProps),rowName:"Row",rowProps:Id,props:(e,o)=>({...bK,...jo("background")(e,o)}),parts:[{kind:"text",key:"title",props:X,style:{textStyle:"heading-3",...$("headingSmall",20),weight:500,case:"upper",lineHeight:1.5,letterSpacing:.02}},{kind:"text",key:"body",props:me,style:{textStyle:"body-1",...$("body",15),lineHeight:1.6}}]})],drop:{...xe,...Te,columns:"the rows of N: one Row Box per `columns` cards, which the Box draws as N equal blocks",cardStyle:"the standard card is what the row draws; a Label only node is skipped (0 live nodes)",dataSource:"an empty source is typed cards, what the row draws; a sourced node is skipped (0 live nodes)",dataSourceOptions:"read only with a source; a sourced node is skipped (0 live nodes)",headPlacement:q1,eyebrowLook:"needs the eyebrow's Filled look on a Text block: Plain is the eyebrow start look the row draws; 2 of 62 live nodes store it (JJ's export, 2026-10-24)"}},A1={top:76,bottom:76,topPhone:76,bottomPhone:76},SK={...D,direction:"row",align:"center",gap:16,sectionPaddingTop:32,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,...Jt(0,1,1,0)},L1={textStyle:"body-1",color:"text"},B1=(e,o)=>typeof o?.href=="string"&&o.href.trim()!=="",CK={name:"Key Features",boxProps:e=>({...de,direction:"column",gap:44,...Jt(1,0,1,0),...Se(e,A1)}),box:[...he,...He(A1)],parts:[gK({...D,direction:"row",align:"end",gap:20,wrap:!0,share:"content"}),$1({kind:"list",key:"items",name:"Feature",perRow:U1(k1.defaultProps),rowName:"Row",rowProps:Id,props:SK,parts:[{kind:"button",key:"label",href:"href",when:B1,variant:"ghost",props:{...lo,...vt,icon:"none"},style:L1},{kind:"text",key:"label",when:(e,o)=>!B1(e,o),props:X,style:L1,was:{size:17}}]})],drop:{...xe,...Te,columns:"the rows of N: one Row Box per `columns` cells, which the Box draws as N equal blocks",eyebrowLook:"needs the eyebrow's Filled look on a Text block: Filled is Key Features' own default (lib/sections/section-eyebrow-look), so 20 of 21 published nodes draw it with nothing stored; the row draws the Plain start look (JJ's export, 2026-10-24)"}},D1={top:120,bottom:120,topPhone:80,bottomPhone:80},gd=e=>{let o=jl(typeof e.background=="string"?e.background:void 0,xd.Series);return o&&o!=="transparent"?o:void 0},ex=e=>gd(e)===Bo,wK=(e,o)=>{let t=gd(e);return!t||t===Bo?{}:t==="var(--site-surface)"?jo("surface")(e,o):IK(t.trim())?{fillColor:t.trim()}:{}},N1=e=>{let o=gd(e)?1:2;return{gap:o,gapPhone:o}},kK={...D,justify:"between",gap:16,gapPhone:16,sectionHeightMode:"fixed",sectionHeightValue:340,sectionHeightUnit:"px",sectionPaddingTop:36,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:36,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},M1={...D,direction:"row",justify:"between",gap:12,share:"content",phoneRow:2,[xK("share")]:"content"},H1={textStyle:"body-5",...$("label",12),letterSpacing:.22,case:"upper",lineHeight:1.5},vK=e=>Ue(e.viewLabel)&&!W1(e.viewLabel).hidden,TK={name:"Recurring Columns",boxProps:(e,o)=>({...de,direction:"column",gap:60,gapPhone:60,...Jt(0,0,1,0),...ex(e)?Kr(e,o):{},...wK(e,o),...Se(e,D1)}),box:[...he.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,t)=>ex(o)?Xt(e,o,t):e],...He(D1)],skip:e=>K1(e)?j1:void 0,site:(e,o)=>ex(e.props)?Zt(e,o):[],parts:[lt("Series"),{kind:"group",name:"Grid",props:(e,o)=>({...D,...N1(e),...gd(e)?{}:jo("background")(e,o)}),parts:[{kind:"list",key:"cards",name:"Column",perRow:()=>4,rowName:"Row",rowProps:e=>({...Id,...N1(e)}),rowFiller:D,props:(e,o)=>({...kK,...jo("background")(e,o)}),parts:[{kind:"group",name:"Words",props:{...D,gap:16,gapPhone:16},parts:[{kind:"group",name:"Top",props:M1,parts:[Ie("num",$("label",13)),Ie("since",$("label",13))]},{kind:"text",key:"title",props:{...X,tag:"h3"},style:{textStyle:"heading-3",...$("headingSmall",28),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}},{kind:"text",key:"desc",props:me,style:{textStyle:"body-5",fontRole:"heading",...$("body",14),lineHeight:1.6}}]},{kind:"group",name:"Footer",when:(e,o)=>Ue(o?.entries)||Ue(o?.entriesLabel)||vK(e),props:{...M1,align:"center",gap:0,gapPhone:0,sectionPaddingTop:16,sectionPaddingTopPhone:16,...Jt(1,0,0,0)},parts:[Nh("entries","entriesLabel",{...me,_partStyles:{text:H1}}),{kind:"group",name:"View",props:{...D,maxWidthPhone:266},parts:[{kind:"block",type:"Text",when:e=>Ue(e.viewLabel),props:e=>{let o=W1(e.viewLabel),t=yo()._partStyles,r=e._partStyles?.viewLabel;return{...X,text:o.text,_partStyles:{text:{...t.text,...H1,...r}},...o.hidden?{_hidden:!0}:{}}}}]}]}]}]}],reads:{viewLabel:"a Text at the far end of every card's footer",background:"the Box's theme (the band preset) or its Fill; the grid's gap"},drop:{...xe,...Te,headPlacement:q1}},G1={top:60,bottom:60,topPhone:40,bottomPhone:40},PK={...D,gap:8,gapPhone:8,...z1(24),...Jt(1,1,1,1)},EK={name:"Document Detail Cards",boxProps:e=>({...de,direction:"column",gap:40,gapPhone:16,...Jt(0,0,1,0),...Se(e,G1)}),box:[...he,...He(G1)],parts:[{kind:"list",key:"cards",name:"Card",perRow:()=>3,rowName:"Row",rowProps:{...Id,gap:40,gapPhone:16},props:(e,o)=>({...PK,...jo("surface")(e,o)}),parts:[Ie("label",{...$("label",12),lineHeight:1.5}),{kind:"group",name:"Words",props:{...D,gap:14,gapPhone:14},parts:[{kind:"text",key:"value",props:X,style:{textStyle:"heading-3",...$("headingSmall",20),weight:500,letterSpacing:-.015,lineHeight:1.5}},{kind:"text",key:"desc",props:me,style:{textStyle:"body-5",fontRole:"accent",...$("body",14),italic:!0,lineHeight:1.5}}]}]}],drop:{...xe,...Te}},V1={Cards:yK,KeyFeatures:CK,Series:TK,DocMetaCards:EK};import{phoneKey as Y1}from"efficient-easel/draw";var ox=e=>typeof e=="string"?e.trim():"";function X1(e){let o=`${ox(e.prefix)}${ox(e.value)}`,t=ox(e.suffix);return e.emphasizeAll===!0?o?`==_${o}_==`:"":`${o}${t?`==_${t}_==`:""}`}var tx={kind:"block",type:"Text",props:{...nd,_partStyles:{text:{textStyle:"heading-2",...st("headingMedium",56,7,96),weight:500,case:"none",lineHeight:.9,letterSpacing:-.04}}},box:[["value","text",(e,o)=>X1(o)]],when:(e,o)=>o!==void 0&&typeof o.value=="string"&&X1(o)!==""},Z1=e=>Ue(e?.supSuffix),ax=e=>jl(e.background,xd.StatsParagraph),Gs=e=>ax(e)===Bo,rx=e=>({...e,sectionAccent:e.sectionAccent??0}),OK=(e,o)=>Gs(e)?jo("background")(e,o):{},FK={name:"Stats with Text",skip:e=>ax(e)&&ax(e)!=="transparent"&&!Gs(e)?"it paints a colour of its own, not the section band":void 0,boxProps:(e,o)=>({...de,direction:"column",gap:60,gapPhone:60,sectionBorder:{bottom:1},...xo(e,"StatsParagraph"),...Gs(e)?Kr(rx(e),o):{}}),box:[...he.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,t)=>Gs(o)?Xt(e,rx(o),t):e],...Yt("StatsParagraph")],site:(e,o)=>Gs(e.props)?Zt({props:rx(e.props)},o):[],parts:[lt("StatsParagraph"),{kind:"group",name:"Stats",props:{...D,gap:0},parts:[{kind:"list",key:"stats",name:"Stat",perRow:()=>4,rowName:"Stats row",rowProps:{...D,direction:"row",gap:0,share:"equal",phoneRow:2,[Y1("share")]:"content"},props:(e,o)=>({...D,justify:"between",gap:12,gapPhone:12,sectionHeightMode:"fixed",sectionHeightValue:242,sectionHeightUnit:"px",widthFitPhone:"fixed",widthPhone:800,sectionPaddingTop:48,sectionPaddingBottom:48,sectionPaddingLeft:32,sectionPaddingRight:32,sectionBorder:{top:1,right:1,bottom:1,left:1},...OK(e,o)}),parts:[{...tx,when:(e,o)=>!Z1(o)&&tx.when(e,o)},{kind:"group",name:"Figure",props:{...D,direction:"row",align:"start",gap:32,gapPhone:32,share:"content",phoneRow:2,[Y1("share")]:"content"},when:(e,o)=>Z1(o),parts:[tx,{kind:"text",key:"supSuffix",props:X,style:{textStyle:"body-5",...$("label",13),weight:500,color:"accent",letterSpacing:.18,lineHeight:1,padding:12}}]},{kind:"group",name:"Words",props:{...D,gap:4,gapPhone:4},parts:[{kind:"text",key:"label",props:X,style:{textStyle:"body-1",fontRole:"heading",...$("body",16),lineHeight:1.5,letterSpacing:-.01}},Ie("sub",{color:"labels",...$("label",12),lineHeight:1.5,letterSpacing:.24})]}]}]}],drop:{...xe,...Te,background:"the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write; none paints nothing, and any other colour is skipped",headPlacement:"needs a row per head placement: an own-box Stats with Text draws no head (its words sit in a Section Header above it), the row always draws the head"}},_K=new Set(["value","label",Dr]),J1={top:48,bottom:48,topPhone:48,bottomPhone:48},RK={name:"Stats",skip:e=>Ue(e.dataSource)?"its figures come from a source":Array.isArray(e.items)&&e.items.some(o=>Ue(o?.[Dr]))?"a figure names a count, and each figure Text here is typed by hand until it is linked":Array.isArray(e.items)&&e.items.some(o=>Object.keys(o??{}).some(t=>!_K.has(t)))?"a figure has a key no part here reads":Object.keys(e._partStyles??{}).some(o=>o!=="heading")?"a figure or a name has a style of its own, kept by kind, which no part here reads":void 0,boxProps:e=>({...de,direction:"column",gap:24,gapPhone:24,...Se(e,J1)}),box:[...he,...He(J1)],parts:[Ie("heading",{color:"labels",...$("label",12),letterSpacing:.2}),{kind:"group",name:"Stats",props:{...D,gap:32,gapPhone:32},parts:[{kind:"list",key:"items",name:"Stat",perRow:e=>K(e.columns)??4,rowName:"Stats row",rowProps:{...D,direction:"row",gap:32,gapPhone:32,share:"equal",phoneRow:2},props:{...D,gap:8,gapPhone:8,sectionBorder:{top:1},sectionPaddingTop:20},parts:[{kind:"text",key:"value",props:nd,style:{textStyle:"heading-2",...$("headingMedium",48,36),weight:500,case:"none",lineHeight:1,letterSpacing:-.03}},Ie("label",{color:"labels",...$("label",12),letterSpacing:.2})]}]}],drop:{...xe,...Te,columns:"the rows of N: one row Box per `columns` figures, which the Box draws",dataSource:"an empty source is typed figures, what the row draws; a sourced node is skipped (0 Hartes nodes)",dataSourceOptions:"read only with a source; a sourced node is skipped (0 Hartes nodes)",contained:"the Box draws the site frame now; each figure fills the Box's column",background:"needs a Box fill: a Box paints only its theme's page colour. 0 Hartes nodes store it (read-only, 2026-11-02)"}},Q1={StatsParagraph:FK,Stats:RK};var oE={contained:!1},tE=(e,o)=>({logos:[{kind:"list",key:e,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[o,"alt"]],when:(t,r)=>Ue(r?.src)||Ue(r?.[o])}]}]}),nx=e=>{let o=K(e.bandPadding)??40;return{top:o,bottom:o,topPhone:o,bottomPhone:o}},AK={...Ie("heading",{color:"labels",letterSpacing:.2}),props:{...X,align:"center"}},LK={name:"Logos",boxProps:e=>({...de,direction:"column",gap:32,...Se(e,nx(e))}),box:[...he,...He(nx),["bandPadding","sectionPaddingTop",(e,o)=>Se(o,nx(o)).sectionPaddingTop]],parts:[AK,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:oE,slots:tE("items","alt")}],drop:{...xe,...Te,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",headPlacement:"a Logos band has no split head (not in SPLITTABLE_SECTIONS): no stored node can hold one, and the converted block stores own-box"}},eE={top:24,bottom:24,topPhone:24,bottomPhone:24},BK={name:"Payment Methods",boxProps:e=>({...de,direction:"column",...Se(e,eE)}),box:[...he,...He(eE)],skip:e=>Ue(e.dataSource)?"its payment methods come from a data source (a venue's Setup): a sourced list needs the card template (plan \xA73.2), not built yet":void 0,parts:[{kind:"group",name:"Methods",props:{...D,align:"center",gap:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...Ie("heading",{color:"labels"}),props:{...X,align:"center"}},{kind:"core",keep:[],as:"Logos",props:{...oE,look:"cards",grayscale:!1},slots:tE("badges","label")},{kind:"group",name:"Reassurance",props:{...D,direction:"row",wrap:!0,justify:"center",gap:24},parts:[{kind:"list",key:"assurances",name:"Line",flat:!0,parts:[{kind:"text",key:"text",props:{...X,align:"center"},style:{size:13,color:"labels"}}]}]}]}],drop:{...xe,...Te,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)",dataSource:"empty: no source, so the authored badges above are the list (a node that names a source is skipped, see `skip`)"}},rE={Logos:LK,PaymentBadges:BK};import{mixHex as DK}from"efficient-shell/format";var aE=e=>e.size==="display",NK=(e,o)=>{let t=sd(e,o),r=e.tone!=="plain"&&t?.text&&t.background?DK(t.text,t.background,.3):null;return r?{color:r}:{}},MK=(e,o)=>e.tone!=="plain"&&Fo(e.sectionAccent)===null?jo("background")(e,o):{},nE=(e,o)=>({kind:"list",key:"items",name:"Item",flat:!0,when:o,parts:[{kind:"text",key:"text",props:me,style:e,styleFrom:NK}]}),HK={name:"Scrolling Bar",boxProps:(e,o)=>({...de,...$r,...ed,...Hl[gn(e.separator)]===""?UP:{},...Se(e,Es),...MK(e,o)}),box:[["scrollDirection","scrollDirection",e=>ck(e)],["speed","loopDuration",(e,o)=>o.loopDuration!=null?o.loopDuration:e],["loopDuration","loopDuration",(e,o)=>e??o.speed],["loopDelay","loopDelay",e=>e],["separator","separator",e=>gn(e)],["borders","sectionBorder",e=>e===!1?void 0:{top:1,bottom:1}],...he,["tone","sectionAccent",(e,o)=>Fo(o.sectionAccent)??na],...He(Es)],parts:[nE(od,e=>!aE(e)),nE($P,aE)],drop:{...xe,...Te,join:"the band sitting inside its neighbour: absent on all 18 live Tickers (JJ 2026-10-27), and not the separator",size:"each item's Text style: Small \u2192 Body 5, Display \u2192 Heading 3"}},sE=e=>e?.tone==="muted",GK={name:"Spec Strip",boxProps:e=>({...de,...$r,...td,...e.fill==="none"?{sectionBorder:{top:1}}:{},...Se(e,Os)}),box:[...he,...He(Os)],parts:[{kind:"list",key:"cells",name:"Cell",flat:!0,parts:[{kind:"text",key:"text",props:X,style:Fs,when:(e,o)=>!sE(o)},{kind:"text",key:"text",props:me,style:Fs,when:(e,o)=>sE(o)}]}],drop:{...xe,...Te,fill:"None \u2192 no fill and a line on top. Dark band \u2192 the Box follows its theme: the old fixed `plate-band` colour has no home (no site write adds a theme preset since 8622589f); the merchant picks a dark theme on the Box"}},lE={Ticker:HK,SpecStrip:GK};var WK="jetbrains-mono",cE="space-grotesk",Tt=(e,o,t={})=>({textStyle:"body-5",font:WK,size:e,sizePhone:e,letterSpacing:o,lineHeight:1.5,weight:400,...t}),yd=(e,o,t,r)=>({font:cE,size:e,sizePhone:o,case:"upper",weight:500,letterSpacing:t,lineHeight:r}),Ws=(e,o,t,r={})=>({textStyle:"body-1",font:cE,size:e,sizePhone:o,weight:400,case:"none",lineHeight:t,...r}),Io=(e,o,t={})=>({kind:"text",key:e,props:X,style:o,...t}),iE=(e,o)=>o?.future===!0,bd=e=>S1(typeof e?.body=="string"?e.body:""),zK={name:"Milestone Timeline",boxProps:(e,o)=>{let t=jr(e,o);return{...de,direction:"column",gap:60,sectionBorder:{bottom:1},...xo(e,"TimelineTrack"),...t>=0?{sectionAccent:t}:{}}},box:[...he.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",Xt],...Yt("TimelineTrack")],parts:[{kind:"group",name:"Heading",props:{...D,direction:"row",align:"end",justify:"between",gap:40,share:"content",sectionPaddingBottom:32,sectionBorder:{bottom:1}},parts:[{kind:"group",name:"Title",props:{...D,direction:"row",align:"end",gap:40,share:"content"},parts:[Io("eyebrow",Tt(13,.3,{case:"upper",color:"accent",padding:8}),{role:"eyebrow"}),Io("title",{textStyle:"heading-2",...yd(79,40,-.03,1)},{role:"heading"})]},Io("intro",Ws(14,14,1.5),{props:{...me,align:"right",maxWidth:360}})]},{kind:"group",name:"Years",props:{...D,direction:"row",share:"equal",gap:0,line:!0},parts:[{kind:"list",key:"entries",name:"Year",props:{...D,...Qc},item:e=>({props:e.future===!0?{upcoming:!0}:{}}),parts:[{kind:"group",name:Ps.name,props:{...D,...Ps},parts:[Io("date",Tt(13,.22,{color:"accent"}),{when:(e,o)=>!iE(e,o)}),Io("date",Tt(13,.22,{color:"labels"}),{when:iE}),Io("title",{textStyle:"heading-3",...yd(20,20,-.02,1.1)},{role:"heading"})]},Io("blurb",Ws(13,13,1.55),{props:me})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,o)=>({...lo,align:"right",...Ls(e,o)}),style:Tt(13,.3,{case:"upper"})}],site:Zt,drop:{...xe,...Te,background:"the band is the Box's theme: the site's band preset (`sectionAccent`), or a declared band-preset write (`lib/theme` `bandPresetIndex`)",headPlacement:"needs a row per head placement: an own-box Milestone Timeline draws no head (its words sit in a Section Header above it), the row always draws the head"}},UK={name:"Story Timeline",skip:e=>{let o=typeof e.layout=="string"?e.layout:"split";return o==="split"?void 0:`display "${o}": not converted (0 live pages; Spine and Alternating are not offered, a Track story is not stored anywhere)`},boxProps:e=>({...de,direction:"row",share:"twoThree",gap:80,align:"start",...xo(e,"Timeline")}),box:[...he,...Yt("Timeline")],parts:[{kind:"group",name:"Heading",props:{...D,gap:24},parts:[Io("eyebrow",Tt(12,.3,{case:"upper",color:"accent"}),{role:"eyebrow"}),Io("title",{textStyle:"heading-2",...yd(72,40,-.03,.94)},{role:"heading"}),Io("intro",Ws(14,14,1.6),{props:{...me,maxWidth:360}}),{kind:"group",name:"Picture",keepEmpty:!0,box:[["imageSrc","bgImage"]],props:{...D,sectionBorder:{top:1,right:1,bottom:1,left:1},darken:75,darkenStyle:"bottom",placement:"bottom-center",sectionHeightMode:"fixed",sectionHeightValue:667,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:419,sectionHeightUnitPhone:"px",sectionPaddingTop:12,sectionPaddingBottom:12,sectionPaddingLeft:16,sectionPaddingRight:16,sectionPaddingTopPhone:12,sectionPaddingBottomPhone:12,sectionPaddingLeftPhone:16,sectionPaddingRightPhone:16},when:e=>typeof e.imageSrc=="string"&&e.imageSrc.trim()!=="",parts:[{kind:"group",name:"Caption",props:{...D,direction:"row",justify:"between",align:"center",gap:12,share:"content",phoneRow:2},parts:[Io("imageCaption",Tt(11,.24,{case:"upper",color:"text"})),Io("imageMeta",Tt(11,.24,{case:"upper",color:"accent"}),{props:{...X,align:"right"}})]}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:(e,o)=>({...lo,...Ls(e,o)}),style:Tt(13,.3,{case:"upper"})}]},{kind:"group",name:"Chapters",props:{...D,gap:48,line:!1},parts:[{kind:"list",key:"entries",name:"Chapter",props:{...D,direction:"row",gap:24,share:"biggerRight",align:"start"},parts:[Io("date",Tt(13,.24,{color:"accent"})),{kind:"group",name:"Words",props:{...D,gap:14},parts:[Io("title",{textStyle:"heading-3",...yd(24,20,-.02,1.5)},{role:"heading"}),{kind:"block",type:"Text",props:{...X,_partStyles:{text:Ws(17,16,1.6)}},box:[["body","text",(e,o)=>bd(o)[0]??""]],when:(e,o)=>bd(o).length>0},{kind:"block",type:"Text",props:{...me,_partStyles:{text:Ws(17,16,1.6,{paragraphSpacing:14})}},box:[["body","text",(e,o)=>bd(o).slice(1).join(`
|
|
24
|
+
|
|
25
|
+
`)]],when:(e,o)=>bd(o).length>1}]}]}]}],drop:{...xe,...Te,layout:"Split is the only display converted (see skip); the Box's own arrangement replaces it"}},dE={TimelineTrack:zK,Timeline:UK};import{tabletKey as VK}from"efficient-easel/draw";import{slugify as o0e}from"efficient-shell/format";import{rootIsDark as $K}from"efficient-shell/format";function Jve(e="auto"){return e==="light"?!0:e==="dark"?!1:!$K({whenUnset:!0})}function fE(e,o){return Number.isFinite(e)&&Number.isFinite(o)&&!(e===0&&o===0)}function sx(e){let o=Number.parseFloat(e??"");return Number.isFinite(o)?o:0}var jK=["tall","square","wide"],KK="tall";function uE(e){return jK.includes(String(e??""))?String(e):KK}var r0e={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"},a0e=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
26
|
+
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
|
|
27
|
+
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""}],qK=/^https?:\/\//i;function n0e(e){let o=(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:sx(e.lat),lng:sx(e.lng),mapsUrl:qK.test(o)?o:""}}function lx(e){let o=String(e??"").split(" \xB7 ");return{state:(o[0]??"").trim(),country:(o[1]??"").trim()}}var s0e="other",l0e={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"}]};function pE(e){let o=String(e??"").replace(/[^+\d]/g,"");return o?`tel:${o}`:void 0}var Po=e=>typeof e=="string"?e:e==null?"":String(e),dx=e=>Array.isArray(e.locations)?e.locations.map(o=>o??{}):[],Qa=e=>Po(e.group),CE=e=>`loc-${e}`,wE=e=>Po(e.state).trim()||lx(Po(e.region)).state,kE=e=>Po(e.country).trim()||lx(Po(e.region)).country,mE=e=>[wE(e),kE(e)].filter(Boolean).join(" \xB7 "),YK=e=>dx(e).some(o=>Po(o.photo).trim()!==""),XK=e=>dx(e).some(o=>fE(Number(o.lat),Number(o.lng))),ZK=(e,o)=>dx(e).filter(t=>Qa(t)===Qa(o)).length,JK=(e,o)=>ZK(e,o)===1?"wide":uE(e.imageShape),ix={top:100,bottom:100,topPhone:60,bottomPhone:60},hE=48,Ko=(e,o={})=>({textStyle:"body-5",...$("label",e),case:"upper",...o}),fx={top:1,right:1,bottom:1,left:1},cx=(e,o)=>({sectionPaddingTop:e,sectionPaddingBottom:e,sectionPaddingLeft:o,sectionPaddingRight:o,sectionPaddingTopPhone:e,sectionPaddingBottomPhone:e,sectionPaddingLeftPhone:o,sectionPaddingRightPhone:o}),ux={...D,direction:"row",share:"equal",gap:0},QK=e=>o=>o>Is(o)?{...D,gap:0}:{...ux,...o>1?{phoneRow:e}:{}},eq={kind:"group",name:"Gallery",props:{...D,gap:20,_hidden:!0},when:YK,parts:[{kind:"group",name:"Gallery head",props:{...D,direction:"row",justify:"between",align:"end",gap:24,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},parts:[Ie("galleryKicker",Ko(12,{color:"accent",letterSpacing:.3})),{kind:"text",key:"galleryHint",props:{...me,align:"right",alignPhone:"left"},style:Ko(11,{letterSpacing:.22,alignPhone:"left"})}]},{kind:"group",name:"Groups",props:{...D,gap:24},parts:[{kind:"list",key:"locations",name:"City picture",props:{...D,darken:85,darkenStyle:"bottom",placement:"bottom-left",sectionBorder:fx,...cx(12,12)},item:(e,o,t)=>({props:{...Po(e.photo).trim()?{bgImage:Po(e.photo)}:{},link:`#${CE(o)}`,boxShape:JK(t,e)}}),parts:[{kind:"text",key:"name",props:X,style:Ko(11,{letterSpacing:.22,color:"text"})}],groups:{of:Qa,name:"Group",props:{...D,gap:10},head:e=>({label:Qa(e[0]??{})}),parts:[Ie("label",Ko(11,{color:"accent",letterSpacing:.3}))],itemsName:"Cities",itemsProps:QK(2),perRow:Is,rowName:"Row",rowProps:{...ux,phoneRow:2}}}]}]},oq={kind:"group",name:"Words",props:{...D,gap:12,gapPhone:12,...cx(28,28),sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},parts:[{kind:"group",name:"Name row",props:{...D,direction:"row",justify:"between",align:"start",gap:14,share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"wrap",sectionPaddingBottom:6,sectionPaddingBottomPhone:6},parts:[{kind:"group",name:"Name",props:{...D,gap:6,gapPhone:6},parts:[{kind:"text",key:"name",role:"heading",props:X,style:{textStyle:"heading-3",...$("headingSmall",30),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}},{kind:"block",type:"Text",props:{...X,_partStyles:{text:Ko(12,{color:"accent",letterSpacing:.24,lineHeight:1.5})}},box:["region","state","country"].map(e=>[e,"text",(o,t)=>mE(t)]),when:(e,o)=>mE(o??{})!==""}]},{kind:"group",name:"Time zone",props:{...D,sectionBorder:fx,...cx(6,10)},parts:[{kind:"text",key:"timezone",props:{...me,textFit:"line"},style:Ko(12,{letterSpacing:.22,lineHeight:1.5})}]}]},{kind:"text",key:"address",props:me,style:{textStyle:"body-5",fontRole:"heading",...$("body",14),lineHeight:1.5}},{kind:"block",type:"ButtonBlock",props:{...lo,...vt,variant:"ghost",arrow:!1,_partStyles:{label:Ko(13,{letterSpacing:.18,color:"text",lineHeight:24/13})}},box:[["phone","label"],["phone","href",e=>pE(Po(e))??"#"]],when:(e,o)=>Po(o?.phone).trim()!==""},{kind:"text",key:"hours",props:me,style:Ko(12,{letterSpacing:.18,lineHeight:1.7})}]},tq={kind:"block",type:"LocationMap",props:e=>({mapTheme:typeof e.mapTheme=="string"?e.mapTheme:"auto"}),box:["name","lat","lng","mapsUrl","geocode",...["region","state"].map(e=>[e,"state",(o,t)=>wE(t)]),...["region","country"].map(e=>[e,"country",(o,t)=>kE(t)])]},rq={kind:"group",name:"Map",props:{...D,sectionBorder:{top:1,right:0,bottom:0,left:0}},parts:[tq]},aq={kind:"list",key:"locations",name:"City",props:(e,o)=>({...D,gap:0,justify:"between",sectionBorder:fx,jumpHighlight:!0,sectionAccent:jr(e,o)>=0?As(e.sectionAccent,o):-1}),item:(e,o)=>({props:{anchor:CE(o)}}),parts:[oq,rq],groups:{of:Qa,name:"Group",props:{...D,gap:20},head:e=>{let o=e[0]??{};return{key:Qa(o),groupName:Po(o.groupName),count:`${e.length} location${e.length===1?"":"s"}`}},parts:[{kind:"group",name:"Group head",props:{...D,direction:"row",justify:"between",align:"end",gap:16,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},when:(e,o)=>Po(o?.key).trim()!=="",parts:[Ie("key",Ko(13,{color:"accent",letterSpacing:.3})),{kind:"text",key:"groupName",role:"heading",props:X,style:{textStyle:"heading-3",...$("headingSmall",24),case:"upper",weight:500,letterSpacing:-.01}},{kind:"text",key:"count",props:me,style:Ko(12,{letterSpacing:.22})}]}],itemsName:"Cities",itemsProps:e=>({...ux,columns:Is(e),[VK("columns")]:1})}},xE=Ko(10,{letterSpacing:.25}),nq={kind:"block",type:at,props:{...D,name:"Credit",direction:"row",justify:"end",align:"center",gap:6,share:"content",wrap:!0},when:XK,slot:nt,keepEmpty:!0,parts:[{kind:"block",type:"Text",props:{...me,text:"Location coordinates \xA9",_partStyles:{text:xE}}},{kind:"block",type:"ButtonBlock",props:{...lo,...vt,variant:"ghost",arrow:!1,label:"OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright",_partStyles:{label:{...xE,color:"labels"}}}}]},IE=(e,o)=>Object.fromEntries(o.filter(t=>e[t]!==void 0).map(t=>[t,e[t]])),gE=["sectionPaddingTop","sectionPaddingTopTablet","sectionPaddingTopPhone"],bE=["sectionPaddingBottom","sectionPaddingBottomTablet","sectionPaddingBottomPhone"],yE=e=>e.map(o=>[o,o,(t,r)=>Se(r,ix)[o]]),SE=["sectionAccent","sectionAccent",Xt],sq=["gridSpan","_hidden"],lq={name:"City pictures",skip:e=>Nr(e)?`fed by the data source "${Nr(e)}": its cities are read as the page is served, not stored on the node`:void 0,boxProps:(e,o)=>({...de,direction:"column",gap:40,anchor:"studios",...IE(Se(e,ix),gE),sectionPaddingBottom:hE,sectionPaddingBottomPhone:hE,...Kr(e,o)}),box:[...he.filter(e=>e!=="sectionAccent"&&e!=="anchor"),SE,["anchor","anchor",e=>fn(e).trim()?e:"studios"],...yE(gE)],parts:[E1("sectionNumber","heading","tagline"),eq],also:[{name:"City maps",boxProps:(e,o)=>({...de,direction:"column",gap:40,sectionBorder:{bottom:1},sectionPaddingTop:0,sectionPaddingTopPhone:0,...IE(Se(e,ix),bE),...Kr(e,o)}),box:[...sq,SE,...yE(bE)],parts:[aq,nq]}],reads:{mapTheme:"City maps Box: each Map block's Map theme",imageShape:"City pictures Box: each picture Box's Box shape"},site:Zt,drop:{...xe,...Te,apiKey:"a stored Google Maps key from before the map needed none: the website's one map (components/SiteMap) takes no key, and a key is a credential, never page content",mapId:"a Google Maps style id from the same retired map: nothing in src/ reads it",gallery:"the retired separate tile list: the wall is derived from the cities (`components/ContactLocations`), nothing in src/ reads it",dataSource:"always empty here: a node fed by a source is skipped (see skip)"}},vE={ContactLocations:lq};var iq=["Collections","Events","FAQ","FitmentFinder","FitmentTable","Footprint","GalleryB","LongRead","ProcessSteps","ProductGrid","RelatedProducts","SpecTable"],Qt=(e,o)=>()=>({top:e,topPhone:o}),TE=e=>o=>{let t=xo(o,e).sectionPaddingTop;return{top:t,topPhone:t}},cq={Collections:Qt(120,70),Events:Qt(120,70),FAQ:Qt(120,70),GalleryB:Qt(120,70),FitmentTable:Qt(120,80),SpecTable:Qt(120,80),LongRead:Qt(120,80),FitmentFinder:e=>e.layout==="bar"?{top:32,topPhone:20}:{top:80,topPhone:60},RelatedProducts:Qt(0,0),Footprint:TE("Footprint"),ProcessSteps:TE("ProcessSteps"),ProductGrid:e=>({top:K(e.padTop)??120,topPhone:0})};function dq(e){let o=fo[e],t=cq[e];if(!o||!t)throw new Error(`section-to-box-rows-head: "${e}" has no head row or no head room`);let r=o.padKey,a=lt(e),n=o.headRows.filter(s=>![o.num,o.title,o.description,"linkText","linkHref"].includes(s));return{name:c0[e]??e,boxProps:s=>{let l=t(s);return{...de,direction:"column",gap:P1[Xh(e)],sectionPaddingTop:l.top,sectionPaddingTopPhone:l.topPhone}},box:[...he,...r?[[r,"sectionPaddingTop",(s,l)=>t(l).top]]:[]],parts:[a,{kind:"core",keep:"rest",...r?{props:{[r]:0}}:{}}],...n.length?{drop:Object.fromEntries(n.map(s=>[s,"a head setting: the Header Box's Text parts draw it (lib/document/blocks/general/section-head-looks)"]))}:{}}}var PE=Object.fromEntries(iq.map(e=>[e,dq(e)]));import{BLOCK_WIDTH_LIMIT as fq}from"efficient-easel/draw";var Sd={textFit:"line",textFitPhone:"wrap"},DE={minWidth:fq.min},EE=(e,o,t)=>({...Ie(e,{...o,..._s}),props:{...X,align:"right",...Sd,...t}}),NE={top:1,bottom:0},mx=(e,o,t,r)=>({kind:"group",name:e,props:{...D,sectionPaddingBottom:o,sectionPaddingBottomPhone:t},parts:[r]}),OE={widthFit:"fill",...DE},FE={top:100,bottom:60,topPhone:60,bottomPhone:40},uq={...$("label",13),letterSpacing:.22,lineHeight:1.8},_E={textStyle:"heading-1",...st("headingLarge",56,8,128),case:"upper",weight:500,lineHeight:.88,letterSpacing:-.04},RE=e=>e.titleLevel===2,pq=()=>({name:"Document Header",boxProps:e=>({...de,direction:"column",gap:0,sectionBorder:{bottom:1},...Se(e,FE)}),box:[...he,...He(FE)],parts:[{kind:"group",name:"Header",props:{...D,direction:"row",align:"end",justify:"between",gap:40,gapPhone:16,share:"content",sectionPaddingBottom:32},parts:[mx("Eyebrow",12,0,{...Ie("eyebrow",$("label",13)),props:{...X,...Sd}}),{kind:"text",key:"title",role:"heading",props:{...X,tag:"h1",...OE},style:_E,when:e=>!RE(e)},{kind:"text",key:"title",role:"heading",props:{...X,tag:"h2",...OE},style:_E,when:RE},{kind:"group",name:"Details",props:{...D,align:"stretch",gap:0,gapPhone:0,sectionPaddingBottom:12,sectionPaddingBottomPhone:0},parts:[{kind:"list",key:"meta",name:"Detail",flat:!0,parts:[Rs("label","value",uq,Sd)]}]}]},{kind:"group",name:"Deck",props:{...D,sectionBorder:NE,sectionPaddingTop:32},parts:[{kind:"text",key:"deck",props:{...me,maxWidth:760},style:{textStyle:"body-1",fontRole:"accent",...$("body",22,19),italic:!0,lineHeight:1.5}}]}],drop:{...xe,...Te,titleLevel:"read by the title part's `when`: 2 (set by lib/document/one-h1 on a later opener) makes the Text an h2, anything else an h1"}}),AE={top:80,bottom:40,topPhone:60,bottomPhone:32},mq={...$("label",13),letterSpacing:.18,lineHeight:1.8},LE={...$("label",13),letterSpacing:.22,lineHeight:1.9},hq=()=>({name:"Issue Header",boxProps:e=>({...de,direction:"column",gap:0,sectionBorder:{bottom:1},...Se(e,AE)}),box:[...he,...He(AE)],parts:[{kind:"group",name:"Top",props:{...D,direction:"row",align:"end",justify:"between",gap:60,gapPhone:16,share:"content",sectionPaddingBottom:32},parts:[mx("Eyebrow",14,14,Ie("eyebrow",$("label",14))),{kind:"group",name:"Issue",props:{...D,align:"end",gap:0,gapPhone:0,sectionPaddingBottom:14},parts:[{kind:"list",key:"issueMeta",name:"Issue line",flat:!0,parts:[Rs("lead","rest",mq)]}]}]},{kind:"group",name:"Bottom",props:{...D,direction:"row",align:"start",justify:"between",gap:60,gapPhone:16,share:"content",sectionBorder:NE,sectionPaddingTop:32},parts:[{kind:"text",key:"lead",props:{...X,maxWidth:720,...DE},style:{textStyle:"body-1",fontRole:"heading3",...$("headingSmall",20),lineHeight:1.5,letterSpacing:-.005,paragraphSpacing:16}},{kind:"group",name:"In this issue",props:{...D,align:"stretch",gap:0},parts:[mx("Heading",6,6,{kind:"text",key:"issueHeading",props:{...X,align:"right",...Sd},style:{textStyle:"body-1",fontRole:"heading",...$("body",18),weight:400,letterSpacing:-.01,lineHeight:1.9,..._s}}),{kind:"group",name:"Lines",props:{...D,align:"stretch",gap:0},parts:[{kind:"list",key:"issueList",name:"Line",flat:!0,parts:[EE("text",{color:"labels",...LE})]}]},EE("issueTotal",LE)]}]}],drop:{...xe,...Te}}),BE={top:24,bottom:24,topPhone:16,bottomPhone:16},px={color:"labels",...$("label",13),letterSpacing:.2},ME=e=>(Array.isArray(e.items)?e.items:[]).filter(o=>o&&typeof o.label=="string"&&o.label.trim()!==""),hx=(e,o)=>o!==void 0&&ME(e).at(-1)===o,HE=(e,o)=>o!==void 0&&ME(e).includes(o),xq=(e,o)=>HE(e,o)&&!hx(e,o)&&Ue(o?.href),Iq=()=>({name:"Breadcrumb",skip:e=>Ue(e.meta)?'a trailing note after "\xB7" needs a second mark; none live':void 0,boxProps:e=>({...de,...$r,gap:16,gapPhone:16,separator:"slash",sectionBorder:{bottom:1},...Se(e,BE)}),box:[...he,...He(BE)],parts:[{kind:"list",key:"items",name:"Crumb",flat:!0,parts:[{kind:"button",key:"label",href:"href",variant:"ghost",when:xq,props:{...lo,...vt,icon:"none"},style:px},{...Ie("label",px),when:(e,o)=>HE(e,o)&&!hx(e,o)&&!Ue(o?.href)},{...Ie("label",{...px,color:"text"}),when:hx}]}],drop:{...xe,...Te,meta:"a node that stores a note is skipped (`skip`); an empty one draws nothing"}}),GE={DocMasthead:pq(),Masthead:hq(),Breadcrumb:Iq()};import{jsx as qr,jsxs as Ix}from"react/jsx-runtime";import{slugify as gq}from"efficient-shell/format";import{jsx as xx,jsxs as WE}from"react/jsx-runtime";var A0e="sticky top-[120px]";var zE=(e,o)=>e?{[bc]:o}:{},UE=(e,o)=>Yv(e?.[Rm(o)]?.role,yc[o],rn),$E=120;function jE({title:e,entries:o,stickyTop:t,sticky:r=!0,editing:a=!1,partStyles:n}){return WE("aside",{className:`${r?"sticky ":""}flex flex-col self-start max-[900px]:static`,style:r?{top:t}:void 0,children:[e&&xx("h4",{className:"mb-[18px] font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-accent",children:uo(e)}),o.map((s,l)=>WE("a",{href:`#${s.anchor}`,className:`flex items-center justify-between gap-3 border-b border-line py-2.5 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg-dim transition-colors hover:text-fg${l===0?" border-t":""}`,children:[xx("span",{...zE(a,"entry"),style:UE(n,"entry"),children:uo(s.label||"Section")}),xx("span",{...zE(a,"number"),style:UE(n,"number"),className:"text-accent",children:Na(l)})]},`${l}-${s.anchor}`))]})}function bq(e,o){return gq(e)||`section-${o+1}`}var gx=e=>typeof e=="string"&&e.trim()!=="";function bx(e){return(e??[]).filter(o=>gx(o.heading)||gx(o.label)||gx(o.body))}function yx(e){let o=new Set;return e.map((t,r)=>{let a=bq(t.label||t.heading||"",r),n=a,s=2;for(;o.has(n);)n=`${a}-${s++}`;return o.add(n),n})}function Sx(e){let o=[];for(let t of e.replace(/\r\n?/g,`
|
|
28
|
+
`).split(/\n[ \t]*\n/))t.split(`
|
|
29
|
+
`).map(r=>r.replace(/\s+$/,"")).filter(r=>r.trim()!=="").forEach((r,a)=>{let n=pn(r)[0].bullet,s=o.at(-1),l=a===0||!s||s.type==="ul"!==n;if(n){let c=r.slice(2);!l&&s?.type==="ul"?s.items.push(c):o.push({type:"ul",items:[c]})}else!l&&s?.type==="p"?s.text+=`
|
|
30
|
+
${r}`:o.push({type:"p",text:r})});return o}var yq=()=>[{label:i("First section"),heading:i("Your *first* section."),body:i(`Write the opening paragraph here.
|
|
31
|
+
|
|
32
|
+
- Start a line with a dash for a bullet.
|
|
33
|
+
- Add as many as you like.`)},{label:i("Second section"),heading:i("Your *second* section."),body:i("Leave a blank line between paragraphs to start a new one.")}],Sq=$E;function X0e({tocTitle:e,sections:o,editing:t=!1,stickyTop:r=Sq}){let a=bx(o);if(a.length===0&&!t)return null;let n=a.length===0&&t?yq():a,s=yx(n);return qr("section",{className:"relative z-[2] bg-bg",children:Ix("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[240px_1fr] items-start gap-20 border-b border-line px-[var(--sf-site-gutter,40px)] py-20 max-[900px]:grid-cols-1 max-[900px]:gap-10 max-[900px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[900px]:py-[60px]",children:[qr(jE,{title:e,entries:n.map((l,c)=>({label:l.label||"Section",anchor:s[c]})),stickyTop:r}),qr("div",{className:"flex flex-col gap-16",children:n.map((l,c)=>Ix("article",{id:s[c],className:"flex flex-col gap-[18px]",style:{scrollMarginTop:r},children:[Ix("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-accent",children:[Na(c)," \xB7 ",uo(l.label||"Section")]}),l.heading&&qr("h2",{className:"mb-2 border-b border-line pb-[18px] font-heading2 text-[length:min(var(--size-headingMedium,clamp(28px,3.5vw,44px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[1.04] tracking-[-0.025em]",children:uo(l.heading)}),Sx(l.body??"").map((d,u)=>d.type==="ul"?qr("ul",{className:"flex max-w-[680px] list-none flex-col gap-2.5 pl-0",children:d.items.map((h,p)=>qr("li",{className:"relative pl-6 font-serif text-[length:var(--size-body,17px)] leading-[1.65] text-fg-dim before:absolute before:-top-0.5 before:left-1.5 before:text-[length:var(--size-body,24px)] before:leading-none before:text-accent before:content-['\xB7']",children:uo(h)},p))},u):qr("p",{className:"max-w-[680px] font-serif text-[length:var(--size-body,17px)] leading-[1.7] text-fg-dim",children:uo(d.text)},u))]},s[c]))})]})})}var KE={top:80,bottom:80,topPhone:60,bottomPhone:60},qE=18,VE=18,YE=8,Cq=10,Cx=e=>typeof e=="string"&&e.trim()!=="",XE=e=>bx(e.sections),wq=e=>Sx(typeof e.body=="string"?e.body:"").map(o=>o.type==="ul"?{kind:"ul",text:o.items.map(t=>`- ${t}`).join(`
|
|
34
|
+
`)}:{kind:"p",text:o.text}),wx={textStyle:"body-5",...$("label",12),case:"upper",letterSpacing:.3,color:"accent",lineHeight:1.5},ZE={textStyle:"body-1",fontRole:"accent",...$("body",17)},kq=[Ie("label",wx),{...Ie("title",wx),when:(e,o)=>!Cx(o?.label)},{kind:"block",type:"Text",when:(e,o)=>!Cx(o?.label)&&!Cx(o?.title),props:{...X,text:"Section",_partStyles:{text:wx}}},{kind:"group",name:"Heading",props:{...D,sectionPaddingBottom:YE,sectionPaddingBottomPhone:YE},parts:[{kind:"group",name:"Heading line",props:{...D,sectionBorder:{bottom:1},sectionPaddingBottom:VE,sectionPaddingBottomPhone:VE},parts:[{kind:"text",key:"heading",role:"heading",props:X,style:{textStyle:"heading-2",...st("headingMedium",28,3.5,44),case:"upper",weight:500,lineHeight:1.04,letterSpacing:-.025}}]}]},{kind:"list",key:"body",name:"Body",flat:!0,of:wq,parts:[{kind:"text",key:"text",props:me,style:{...ZE,lineHeight:1.7},when:(e,o)=>o?.kind==="p"},{kind:"text",key:"text",props:me,style:{...ZE,lineHeight:1.65,paragraphSpacing:Cq},when:(e,o)=>o?.kind==="ul"}]}],vq={name:"Document Text",boxProps:e=>({...de,direction:"row",gap:80,gapPhone:40,sectionBorder:{bottom:1},...Se(e,KE)}),box:["anchor","sectionAccent","_hidden",...He(KE)],parts:[{kind:"block",type:"Contents",props:e=>({title:e.tocTitle??"",sticky:!0,widthFit:"fixed",width:240,widthFitPhone:"fill"})},{kind:"group",name:"Sections",props:{...D,gap:64,gapPhone:64,widthFit:"fill"},parts:[{kind:"list",key:"sections",name:"Section",of:e=>XE(e),props:{...D,gap:qE,gapPhone:qE},item:(e,o,t)=>({props:{anchor:yx(XE(t))[o]??`section-${o+1}`}}),parts:kq}]}],reads:{tocTitle:"the Contents block's Heading"},drop:{...xe,stickyTop:"the Contents block draws DocBody's default (120px); 0 live nodes store it"}},JE={DocBody:vq};var QE={top:72,bottom:72,topPhone:72,bottomPhone:72},Tq={name:"Editorial Text",boxProps:e=>({...de,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...Se(e,QE)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...he,...He(QE)],parts:[lt("Prose"),{kind:"text",key:"body",props:me,style:{textStyle:"body-1",...$("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...xe,...Te,headPlacement:"needs a row per head placement: an own-box Prose draws no head (its words sit in a Section Header above it), the row always draws the head. 0 of 123 live nodes store it (the live export, 2026-10-24)"}},eO={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},oO=(e,o)=>o?.variant==="primary",tO=(e,o)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:oO,variant:"primary",style:{letterSpacing:.3},props:{...lo,...eO,...o}},{kind:"button",key:"label",href:"href",when:(t,r)=>!oO(t,r),variant:"ghost",style:{letterSpacing:.3},props:(t,r)=>({...lo,...eO,...o,...Ls(t,r)})}]}),Cd=e=>Ue(e.title),Pq={name:"Call-to-Action Heading",boxProps:e=>({...de,direction:"row",align:"center",justify:Cd(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...xo(e,"TitleWithButtons")}),box:[...he,...Yt("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...D,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:X,style:{textStyle:"heading-1",...st("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035}}]},{kind:"group",name:"Buttons",props:e=>({...D,gap:14,gapPhone:14,widthFitPhone:"fill",...Cd(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[tO(Cd,{widthFit:"fill",iconPosition:"end"}),tO(e=>!Cd(e),{})]}],drop:{...xe,buttonsAlign:"moves the buttons only when there is no heading (4 of 128 live nodes), where the Box puts them at the end. 0 of 128 live nodes store it (the live export, 2026-10-24)",buttonsAlignPhone:"the phone's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Phone view's Block alignment row), so nothing moves"}};function Eq(e){let{siteGutter:o,siteGutterPhone:t}=e.site??{},r=bi(o),a=Math.min(20,yi(t)??Si(o));return{sectionPaddingLeft:r,sectionPaddingRight:r,sectionPaddingLeftPhone:a,sectionPaddingRightPhone:a}}var rO={top:40,bottom:64,topPhone:24,bottomPhone:36},Oq={name:"Section Header",boxProps:(e,o)=>({...de,direction:"column",gap:0,...Se(e,rO),...Eq(o)}),box:[...he,...He(rO)],parts:[lt("SectionHeader")],drop:{...xe,...Te,headStyle:"needs a row per head look: the row draws the standard look; the editorial, simple, statement, natural and essay looks are other layouts. 0 of 69 live nodes store it (the live export, 2026-10-24)",eyebrowLook:"read only by the simple, statement, natural and essay looks, which this row does not draw. 0 of 69 live nodes store it",rowGap:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",descriptionSize:"read only by the natural look, which this row does not draw. 0 of 69 live nodes store it",numStyle:"Solid (the default; 4 of 69 live nodes store it) IS the eyebrow Text the row draws; Outlined (0 live) needs an outlined-number text look"}},aO={...D,direction:"row",share:"bigLeft",gap:30},nO={...D,sectionPaddingLeft:30,sectionPaddingLeftPhone:0},sO=(e,o,t)=>({kind:"group",name:e,props:o,parts:[t]}),Fq={name:"Lead Text",boxProps:e=>({...de,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...xo(e,"ParagraphsA")}),box:[...he,...Yt("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...aO,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...D,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[Ie("eyebrow",{color:"labels",...$("label",12),letterSpacing:.24})]},sO("Stats column",D,{kind:"group",name:"Stats",props:{...nO,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[Rs("value","label",{...$("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...aO,gapPhone:28},parts:[{kind:"group",name:"Lead",props:D,parts:[{kind:"group",name:"Measure",props:{...D,maxWidth:780},parts:[{kind:"text",key:"lead",props:X,style:{textStyle:"heading-3",...$("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},sO("Note column",{...D,justify:"end",widthFit:"fill"},{kind:"group",name:"Founders",props:{...nO,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...D,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:X,style:{textStyle:"body-1",fontRole:"heading",...$("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:me,style:{textStyle:"body-5",fontRole:"heading",...$("body",14,12),lineHeight:1.7}}]},Ie("attribution",{...$("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...xe}},lO={top:24,bottom:24,topPhone:24,bottomPhone:24},_q={name:"Banner",boxProps:e=>({...de,direction:"column",gap:0,...Se(e,lO)}),box:[...he,"contained",...He(lO)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...D,gap:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},sectionPaddingTop:64,sectionPaddingBottom:64,sectionPaddingTopPhone:40,sectionPaddingBottomPhone:40,sectionPaddingLeft:40,sectionPaddingRight:40,sectionPaddingLeftPhone:24,sectionPaddingRightPhone:24},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(K(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...D,gap:20},parts:[Ie("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...X,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none"}},{kind:"text",key:"body",props:{...me,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6},was:{size:16}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:lo}]}],drop:{...xe,...Te}},kx={Prose:Tq,TitleWithButtons:Pq,SectionHeader:Oq,ParagraphsA:Fq,Banner:_q};function xTe(){$o(kx),$o(Q1),$o(rE),$o(V1),$o(lE),$o(dE),$o(vE),$o(PE),$o(GE),$o(JE)}import{isNodeList as Rq}from"efficient-easel/data";var Aq=Object.keys(kx);function iO(e,o,t){let r={};for(let a of Object.keys(o(e.type)))r[a]=void 0;for(let[a,n]of Object.entries(e.props))r[a]=Rq(n)?n.map(s=>iO(s,o,t)):n;return r.id=t(e.type),{type:e.type,props:r}}function vx(e,o,t=0){return(r,a)=>{let{nodes:n}=Ch({type:e,props:{...r(e),id:a(e)}},o);return iO(n[t],r,a)}}function Lq(e){return Aq.includes(e)}function Bq(e){if(!Lq(e)||!zT(e))return null;let o=Vc(e);return o?vx(e,o):null}function wd(e){return VP(e)??Bq(e)}import{blockTypesIn as _O}from"efficient-easel/screen/lib/document/block-types-in";import{jsx as Us,jsxs as f9}from"react/jsx-runtime";import{createContext as u9,useContext as p9}from"react";import{jsx as en,jsxs as bO}from"react/jsx-runtime";import{useEffect as Px,useRef as Jq,useState as zs}from"react";import{jsx as cO}from"react/jsx-runtime";import{createContext as Dq,lazy as PTe,Suspense as ETe,useContext as Nq}from"react";var Mq={Link:aI,Image:rI},Hq=Dq(Mq);function dO(){return Nq(Hq)}function OTe(e){let{Link:o}=dO();return cO(o,{...e})}function fO(e){let{Image:o}=dO();return cO(o,{...e})}import{jsx as uO,Fragment as Gq,jsxs as Wq}from"react/jsx-runtime";import{useEffect as zq,useRef as pO,useState as Uq}from"react";var $q="#t=0.001",jq=2;function Kq(e,o){if(e.readyState<jq||!e.videoWidth||!e.videoHeight)return!1;let t=o.getContext("2d");return t?(o.width=e.videoWidth,o.height=e.videoHeight,t.drawImage(e,0,0,o.width,o.height),!0):!1}function mO({src:e,objectPosition:o="50% 50%",onError:t}){let r=pO(null),a=pO(null),[n,s]=Uq(!1);return zq(()=>{let l=r.current,c=a.current;if(n||!l||!c)return;let d=()=>{Kq(l,c)&&s(!0)};return d(),l.addEventListener("loadeddata",d),l.addEventListener("seeked",d),()=>{l.removeEventListener("loadeddata",d),l.removeEventListener("seeked",d)}},[n]),Wq(Gq,{children:[uO("canvas",{ref:a,"aria-hidden":!0,className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:o,visibility:n?"visible":"hidden"}}),!n&&uO("video",{ref:r,src:`${e}${$q}`,muted:!0,playsInline:!0,preload:"auto",className:"hidden",onError:t})]})}import{imageCopyUrl as xO,imageSrcSet as qq}from"efficient-shell/image-copies";var hO;function Tx(){return hO===void 0?{}:{host:hO}}var BTe="(max-width: 800px) 100vw, min(100vw, 1600px)";function IO(e,{fallbackWidth:o=1280,maxWidth:t}={}){let r=qq(e,{...Tx(),...t===void 0?{}:{maxWidth:t}});return r?{src:xO(e,o,Tx()),srcSet:r}:{src:e}}function DTe(e){let o=xO(e,1920,Tx());return o===e?`url(${e})`:`url("${o}")`}import{formatFocal as Vq,parseFocal as Yq}from"efficient-shell/format";var Xq="sf-focus-phone",Zq="--sf-focus-phone";function gO(e){if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return{className:"",style:{}};let{x:o,y:t}=Yq(e);return{className:Xq,style:{[Zq]:Vq(o,t)}}}var Qq=.5;function yO({videoSrc:e,posterSrc:o,showVideo:t=!0,playbackRate:r=Qq,objectPosition:a="50% 50%",objectPositionPhone:n,quiet:s=!1}){let l=gO(n),c=o||"",d=e||"",[u,h]=zs(!1),[p,x]=zs(!1),[g,y]=zs(!1),[E,O]=zs(!1),[C,I]=zs(!1),w=Jq(null);Px(()=>{h(!1),x(!1),y(!1),O(!1)},[e,o]),Px(()=>{if(typeof window>"u")return;let R=()=>{let B=window;B.requestIdleCallback?B.requestIdleCallback(()=>I(!0),{timeout:2e3}):setTimeout(()=>I(!0),800)};if(document.readyState==="complete"){R();return}return window.addEventListener("load",R,{once:!0}),()=>window.removeEventListener("load",R)},[]),Px(()=>{let R=w.current;if(!R)return;let B=()=>{R.playbackRate=r};return B(),R.addEventListener("loadedmetadata",B),()=>R.removeEventListener("loadedmetadata",B)},[e,r]);let v=nI(c),k=c&&v&&!p?IO(c):{src:c};return bO("div",{className:"absolute inset-0 z-[1]",children:[en("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),c&&(v?en("img",{src:k.src,...k.srcSet?{srcSet:k.srcSet,sizes:"100vw"}:{},alt:"",className:`absolute inset-0 z-[2] h-full w-full object-cover ${l.className}`.trim(),style:{display:u?"none":"block",objectPosition:a,...l.style},onError:()=>k.srcSet?x(!0):h(!0)},c):en(fO,{src:c,alt:"",fill:!0,priority:!0,sizes:"100vw",className:`z-[2] object-cover ${l.className}`.trim(),style:{display:u?"none":"block",objectPosition:a,...l.style},onError:()=>h(!0)},c)),t&&!s&&d&&C&&!g&&bO("video",{ref:w,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:a},onError:()=>y(!0),children:[sI(d)&&en("source",{src:d.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),en("source",{src:d,type:"video/mp4"})]},d),t&&s&&d&&C&&!E&&(!c||u)&&en(mO,{src:d,objectPosition:a,onError:()=>O(!0)},d)]})}var SO=["top","middle","bottom"],CO=["left","center","right"],wO="bottom",kO="left",e9={top:"Top",middle:"Middle",bottom:"Bottom"},o9={left:"Left",center:"Center",right:"Right"},VTe="Up and down",YTe="Sideways",t9={top:"flex-start",middle:"center",bottom:"flex-end"},r9={left:"flex-start",center:"center",right:"flex-end"},a9="--sf-hero-phone-y",n9="--sf-hero-phone-x";function s9(e){return SO.includes(e)?e:wO}function l9(e){return CO.includes(e)?e:kO}function vO(e,o){let t=s9(e),r=l9(o),a={};return t!==wO&&(a[a9]=t9[t]),r!==kO&&(a[n9]=r9[r]),a}function XTe(){return SO.map(e=>({label:e9[e],value:e}))}function ZTe(){return CO.map(e=>({label:o9[e],value:e}))}import{hexToRgb as i9}from"efficient-shell/format";var c9=!0;var d9=[[0,".5"],[30,".1"],[60,".1"],[100,".85"]];function TO(e){let o=i9(e);return o?`${o.r},${o.g},${o.b}`:null}function PO(e){return e==null?c9:e!==!1}function EO(e){let o=(e?TO(e):null)??TO(la);return`linear-gradient(180deg, ${d9.map(([t,r])=>`rgba(${o},${r}) ${t}%`).join(", ")})`}var m9=u9({});function dPe({name:e,process:o,mediaType:t="video",mediaSrc:r,videoSpeed:a,poster:n,objectPosition:s,objectPositionPhone:l,tintColor:c=la,tintOpacity:d=0,groups:u,editing:h=!1,themeClassName:p,themeStyle:x}){let{alignment:g="left",textureOpacity:y,textureOn:E,textureColor:O,quietVideo:C,phoneUpDown:I,phoneSideways:w}=p9(m9),v=t==="video",k=v?nn(r):void 0,R=v?nn(n):nn(r)??nn(n),B=typeof a=="number"?a/100:1;return f9("section",{className:p?`relative h-full w-full overflow-hidden ${p}`:"relative h-full w-full overflow-hidden",style:x,"data-slide-name":e??"","data-slide-process":o??"","data-slide-media":k?"video":"still",children:[Us(yO,{videoSrc:k,posterSrc:R,showVideo:v,playbackRate:B,objectPosition:s,objectPositionPhone:v?void 0:l,quiet:C}),d>0&&Us("div",{className:"absolute inset-0 z-[2]",style:{background:c,opacity:Math.min(Math.max(d,0),100)/100}}),PO(E)&&Us("div",{className:"absolute inset-0 z-[2]",style:{background:EO(O),...y!==void 0?{opacity:y/100}:null}}),Us("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",h?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...pb,...vO(I,w)},children:u&&Us(u,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}var OO=Array.from({length:3},(e,o)=>({name:`Slide ${o+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));import{newNodeId as FO}from"efficient-easel/draw";var h9="ImageBlock",x9=3,kd=(e,o,t={})=>({type:e,props:{...o?.(e)??{},id:FO(e),...t}}),I9=e=>({...e?.(re)??{},direction:"column",[Vt]:[kd(h9,e),kd(re,e,{direction:"column",[Vt]:[kd("Text",e,vo()),kd("Text",e)]})]}),it={Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>OO.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${qt.toLowerCase()}`,seeds:()=>[],addBlocked:dl,notice:bf},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${qt.toLowerCase()}`,seeds:()=>[],addBlocked:dl,notice:bf},ProcessSteps:{slot:"boxes",childType:re,addLabel:`Add ${qt.toLowerCase()}`,seeds:e=>Array.from({length:x9},()=>I9(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}};function gPe(e){for(let[o,t]of Object.entries(e)){if(o in it&&it[o]!==t)throw new Error(`lib/document/slot-specs: "${o}" already has a slot spec`);it[o]=t}}function bPe(e,o){let t=it[e];return t?{slot:t.slot,children:t.seeds(o).map(r=>({type:t.childType,props:{id:FO(t.childType),...r}}))}:null}var RO=()=>({}),AO=new Map;function g9(e){let o=AO.get(e);if(o)return o;let t=new Set,r=it[e];if(r)for(let s of r.seeds(RO))for(let l of _O({type:r.childType,props:s}))t.add(l);let a=wd(e);if(a){let s=0;for(let l of _O(a(RO,c=>`${c}-${s+=1}`)))t.add(l)}t.delete(e);let n=[...t].sort();return AO.set(e,n),n}function b9(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;let o=Wm(e),t=e.allow?new Set(e.allow):null,r=new Set(e.deny??[]),a=new Set(Object.keys(e.host??{})),n=c=>{if(r.has(c))return!1;if(a.has(c))return!0;let d=d0(c);return!d||!o[d]?!1:t?t.has(c):!0},s=new Map,l=c=>{let d=s.get(c);if(d!==void 0)return d;s.set(c,!1);let u=n(c)&&g9(c).every(l);return s.set(c,u),u};return{sets:o,offers:l}}var y9="block-offer";function Ex(e=LO()){return e.cache(y9,()=>b9(xl(e)))}function BO(e,o=LO()){let t=Ex(o);return t?t.offers(e):!0}function DO(e,o=0,t){let r=C9(w9(e,o),t),a=r?Ex():null;return r&&a?S9(r,a):r}function S9(e,o){if(e.spec)return o.offers(e.spec.childType)?e:null;let t=e.choices??[],r=t.filter(a=>o.offers(a.type));return r.length===t.length?e:r.length>0?{...e,choices:r}:null}function C9(e,o){if(!e||e.source!=="container"||!o||!dv())return e;let t=hv({data:o.data},o.id),r=typeof t?.type=="string"?fv(t.type):[],a=e.choices??[],n=r.filter(s=>!a.some(l=>l.type===s.type));return n.length?{...e,choices:[...a,...n.map(s=>({type:s.type,label:s.label}))]}:e}function w9(e,o){let t=it[e];if(t)return{source:"section",slot:t.slot,choices:null,spec:t};let r=DT(e,o);if(r)return{source:"container",slot:r.slot,choices:r.choices,spec:null};let a=H0(e);return a?{source:"footer",slot:M0,choices:a,spec:null}:null}function NO(e){return km(e.type)?[{slot:wm,label:i(cv),rung:!0}]:null}import{useSyncExternalStore as k9}from"react";var Ox=null,Fx=new Set;function MO(e){if(Ox!==e){Ox=e;for(let o of Fx)o()}}function v9(e){return Fx.add(e),()=>{Fx.delete(e)}}function GPe(){return k9(v9,()=>Ox,()=>null)}function HO(e){return cn(e)?.ownerId??null}function GO(e,o){let t=e.props;if(e.type==="FooterMenu"){let r=t.menu;return t.heading||r?.name||i("Menu")}if(e.type==="FooterText"){let r=typeof t.text=="string"?t.text.trim():"";return r?r.length>28?`${r.slice(0,28)}\u2026`:r:i("Text")}return e.type==="FooterEmailSignup"?t.heading||i("Email signup"):o(e.type)}var WO=(e,o,t)=>{if(o!=="block"||e.props?.fromProduct!==!0)return t;let r=e.props.product;return!r?.code||typeof r.name!="string"?t:r.name.trim()||t};var zO="sf-editor-left-view";function UO(){if(typeof window>"u")return"pages";try{let e=window.localStorage.getItem(zO);return e==="sections"||e==="styles"?e:"pages"}catch{return"pages"}}function $O(e){if(!(typeof window>"u"))try{window.localStorage.setItem(zO,e)}catch{}}function jO(e,o){return e==="styles"&&!o?"sections":e}function KO(e,o){return e?"sections":o}var T9=new Set(["BookingBox","SubmitBox"]);function P9(e){return typeof e=="string"&&T9.has(e)}var E9=k0(P9,R0);function qO(e,o){return E9(e)||Zf(o)}import{copyNode as O9}from"efficient-easel/data";function VO(e){let o=typeof e?.props?.id=="string"?e.props.id:null,t=Ct(),r=o&&t?t.sectionOf(o):null;if(!t||!r)return null;let a=t.usedOn(r);return a?a.length===1?i("On 1 page"):i("On {count} pages",{count:a.length}):i("On other pages")}var YO={usedOn:e=>{let o=Ct(),t=o?.sectionOf(e.props.id)??null;return!o||!t?null:o.usedOn(t)??[]},openPage:e=>Fc()?.openPage(e),adopt:(e,o)=>Ct()?.adopt(e.props.id,o),nodeOf:e=>Ct()?.place(e)??null,detach:e=>{let o=Fc()?.config;return o?O9(e,o):e},removed:()=>Fc()?.reload()};import{sharedSectionsOf as DV}from"efficient-easel/screen/lib/shared-sections";import{scrollPreviewToSection as NV,scrollPreviewToTop as wF}from"efficient-easel/screen/lib/document/preview-dom";import{jsx as Ax,Fragment as rV,jsxs as aV}from"react/jsx-runtime";import{useEffect as nV,useMemo as lF,useRef as iF}from"react";import{EaselCanvas as sV,useEaselApi as lV}from"efficient-easel/easel";import{jsx as eF,Fragment as M9,jsxs as H9}from"react/jsx-runtime";import{useEffect as oF,useLayoutEffect as G9}from"react";var vd="data-theme",XO="light";function F9(e){return e.getAttribute(vd)===XO?"light":"dark"}function _9(e,o){return F9(e)===o?!1:(o==="light"?e.setAttribute(vd,XO):e.removeAttribute(vd),!0)}function R9(e){return zd(e).getItem(Ad)}function t1e(e,o){zd(e).setItem(Ad,o)}function A9(e,o,t=new Date().getHours()){return Gx({mode:o.mode,override:R9(e),switchShown:o.switchShown,hour:t})}function ZO(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>_9(t,A9(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[vd]}),()=>n.disconnect()}var L9="style";function B9(e,o){let t=qx(o),r=!1;for(let a of Kx){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function JO(e,o){let t=e.body;if(!t)return()=>{};let r=()=>B9(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[L9]}),()=>n.disconnect()}var D9=String.raw`(function (doc) {
|
|
35
|
+
if (doc.__sfFitWords) return;
|
|
36
|
+
var win = doc.defaultView;
|
|
37
|
+
var SELECTOR = "h1,h2,h3,h4,h5,h6,[class*='font-heading'],[class*='font-display']";
|
|
38
|
+
// Body text a block asked to shrink (its Text group's Shrink to fit), beside
|
|
39
|
+
// the headings: what this script may fit at all. modeOf() decides each one.
|
|
40
|
+
var SHRINK_BODY = "[data-fit] p,[data-fit] li,[data-fit-phone] p,[data-fit-phone] li";
|
|
41
|
+
var CANDIDATES = SELECTOR + "," + SHRINK_BODY;
|
|
42
|
+
var MIN_SCALE = 0.3, MIN_PX = 16, SLACK = 1, PHONE_BELOW = 800;
|
|
43
|
+
|
|
44
|
+
// A block's own answer (lib/content/block-size, the wrapper's attributes):
|
|
45
|
+
// data-fit "wrap" | "shrink" | "line" and data-fit-min, each with its phone twin read
|
|
46
|
+
// under 800px. With none, a heading shrinks and body text wraps, as always.
|
|
47
|
+
function phone() { return win.innerWidth < PHONE_BELOW; }
|
|
48
|
+
function own(el, attr) {
|
|
49
|
+
var holder = el.closest("[" + attr + "],[" + attr + "-phone]");
|
|
50
|
+
if (!holder) return null;
|
|
51
|
+
return (phone() && holder.getAttribute(attr + "-phone")) || holder.getAttribute(attr);
|
|
52
|
+
}
|
|
53
|
+
function modeOf(el) {
|
|
54
|
+
var mode = own(el, "data-fit");
|
|
55
|
+
if (mode === "wrap" || mode === "shrink") return mode;
|
|
56
|
+
if (mode === "line") return "wrap"; // One line: the block keeps its words whole, nothing shrinks
|
|
57
|
+
return el.matches(SELECTOR) ? "shrink" : "wrap";
|
|
58
|
+
}
|
|
59
|
+
function floorOf(el, set) {
|
|
60
|
+
var min = parseFloat(own(el, "data-fit-min"));
|
|
61
|
+
return min >= 0 ? min : Math.max(set * MIN_SCALE, MIN_PX);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function measure(el) {
|
|
65
|
+
var widest = 0, current = 0, last = null, split = false, lastBlock = null;
|
|
66
|
+
function blockOf(n) {
|
|
67
|
+
for (var p = n.parentElement; p && p !== el; p = p.parentElement) {
|
|
68
|
+
var d = win.getComputedStyle(p).display;
|
|
69
|
+
if (d.indexOf("inline") !== 0 && d !== "contents") return p;
|
|
70
|
+
}
|
|
71
|
+
return el;
|
|
72
|
+
}
|
|
73
|
+
function close() { if (current > widest) widest = current; current = 0; last = null; }
|
|
74
|
+
var walker = doc.createTreeWalker(el, 5), range = doc.createRange(), node;
|
|
75
|
+
while ((node = walker.nextNode())) {
|
|
76
|
+
if (node.nodeType === 1) {
|
|
77
|
+
if (node.tagName === "BR" || node.tagName === "WBR") close();
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
var block = blockOf(node);
|
|
81
|
+
if (block !== lastBlock) close();
|
|
82
|
+
lastBlock = block;
|
|
83
|
+
var re = /(\S+)|(\s+)/g, m;
|
|
84
|
+
while ((m = re.exec(node.data))) {
|
|
85
|
+
if (m[2]) { close(); continue; }
|
|
86
|
+
range.setStart(node, m.index);
|
|
87
|
+
range.setEnd(node, m.index + m[0].length);
|
|
88
|
+
var rects = range.getClientRects();
|
|
89
|
+
for (var i = 0; i < rects.length; i++) {
|
|
90
|
+
var r = rects[i];
|
|
91
|
+
if (r.width <= 0) continue;
|
|
92
|
+
current += r.width;
|
|
93
|
+
if (last && r.top > last.top + last.height / 2) split = true;
|
|
94
|
+
last = r;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
close();
|
|
99
|
+
return { widest: widest, split: split };
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function lineWidth(el) {
|
|
103
|
+
var cs = win.getComputedStyle(el);
|
|
104
|
+
return el.getBoundingClientRect().width - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight)
|
|
105
|
+
- parseFloat(cs.borderLeftWidth) - parseFloat(cs.borderRightWidth);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// ⚠️ THE HEADING ELEMENT IS NEVER TOUCHED — no style="", no data-*. This
|
|
109
|
+
// runs before React hydrates, and React 19 in development reports ANY
|
|
110
|
+
// attribute that differs from what it rendered ("a tree hydrated but some
|
|
111
|
+
// attributes didn't match"): first our inline font-size on the hero (which
|
|
112
|
+
// React owns via --heading-size), then, when that moved to a data-sf-fit
|
|
113
|
+
// attribute, the attribute itself. So the fitted size lives only in this
|
|
114
|
+
// script's own stylesheet, in <head>, addressed to each heading by its
|
|
115
|
+
// POSITION (":root>*:nth-child(2)>…"). A position goes stale when the page's
|
|
116
|
+
// structure changes, so the rules are rewritten in the MutationObserver
|
|
117
|
+
// callback, which runs before the next paint. !important so the size also
|
|
118
|
+
// beats a part's own inline size.
|
|
119
|
+
var head = doc.head || doc.documentElement;
|
|
120
|
+
var fitEl = doc.createElement("style");
|
|
121
|
+
fitEl.id = "storefront-fit-words-sizes";
|
|
122
|
+
head.appendChild(fitEl);
|
|
123
|
+
// heading -> [[element, fitted size]]: the heading and each Text part inside
|
|
124
|
+
// it that holds its own size (a span [data-sf-part-styled]), e.g.
|
|
125
|
+
// [[h2, "43.8px"], [span, "43.8px"]]. Sizing the heading alone leaves such
|
|
126
|
+
// a part at its own size, and the word still breaks (card C25, Spec Table).
|
|
127
|
+
var fitted = new Map();
|
|
128
|
+
|
|
129
|
+
function pathOf(el) {
|
|
130
|
+
var parts = [];
|
|
131
|
+
for (var e = el; e && e.parentElement; e = e.parentElement) {
|
|
132
|
+
var i = 1, s = e;
|
|
133
|
+
while ((s = s.previousElementSibling)) i++;
|
|
134
|
+
parts.unshift("*:nth-child(" + i + ")");
|
|
135
|
+
}
|
|
136
|
+
return ":root>" + parts.join(">");
|
|
137
|
+
}
|
|
138
|
+
function writeRules() {
|
|
139
|
+
var css = "";
|
|
140
|
+
fitted.forEach(function (sizes, el) {
|
|
141
|
+
if (!el.isConnected) { fitted.delete(el); return; }
|
|
142
|
+
for (var i = 0; i < sizes.length; i++) css += pathOf(sizes[i][0]) + "{font-size:" + sizes[i][1] + " !important}";
|
|
143
|
+
});
|
|
144
|
+
if (fitEl.textContent !== css) fitEl.textContent = css;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function unfit(el) {
|
|
148
|
+
if (fitted.delete(el)) writeRules();
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function fits(el) {
|
|
152
|
+
var m = measure(el);
|
|
153
|
+
return !m.split && m.widest <= lineWidth(el) + SLACK;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function fit(el) {
|
|
157
|
+
unfit(el);
|
|
158
|
+
if (modeOf(el) !== "shrink") return; // the block's own Wrap
|
|
159
|
+
if (lineWidth(el) <= 0) return; // hidden, or not laid out yet
|
|
160
|
+
if (fits(el)) return;
|
|
161
|
+
var set = parseFloat(win.getComputedStyle(el).fontSize);
|
|
162
|
+
if (!set) return;
|
|
163
|
+
var floor = floorOf(el, set);
|
|
164
|
+
if (floor >= set) return;
|
|
165
|
+
function size(px) { return Math.floor(px * 10) / 10 + "px"; }
|
|
166
|
+
// The SEARCH tries sizes on the element's own style and then puts that
|
|
167
|
+
// attribute back byte for byte (or removes it, if it had none), so nothing
|
|
168
|
+
// is left for React to see. A trial in a stylesheet instead restyles the
|
|
169
|
+
// whole page per step: a full pass on the Hartes home took 75–160ms at 4x
|
|
170
|
+
// CPU that way.
|
|
171
|
+
// Every trial scales the heading AND each part inside it that holds its
|
|
172
|
+
// own size, by the same ratio, so a part keeps its proportion to the
|
|
173
|
+
// heading.
|
|
174
|
+
var carriers = [el].concat(Array.prototype.slice.call(el.querySelectorAll("[data-sf-part-styled]")));
|
|
175
|
+
var base = carriers.map(function (c) { return parseFloat(win.getComputedStyle(c).fontSize) || set; });
|
|
176
|
+
var saved = carriers.map(function (c) { return c.hasAttribute("style") ? c.getAttribute("style") : null; });
|
|
177
|
+
function attempt(px) {
|
|
178
|
+
for (var i = 0; i < carriers.length; i++) carriers[i].style.setProperty("font-size", size(base[i] * px / set), "important");
|
|
179
|
+
}
|
|
180
|
+
function done() {
|
|
181
|
+
for (var i = 0; i < carriers.length; i++) {
|
|
182
|
+
if (saved[i] !== null) carriers[i].setAttribute("style", saved[i]); else carriers[i].removeAttribute("style");
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
attempt(floor);
|
|
186
|
+
if (!fits(el)) { done(); return; } // even the floor does not fit: leave it as set
|
|
187
|
+
var lo = floor, hi = set;
|
|
188
|
+
for (var i = 0; i < 8; i++) {
|
|
189
|
+
var mid = (lo + hi) / 2;
|
|
190
|
+
attempt(mid);
|
|
191
|
+
if (fits(el)) lo = mid; else hi = mid;
|
|
192
|
+
}
|
|
193
|
+
done();
|
|
194
|
+
fitted.set(el, carriers.map(function (c, i) { return [c, size(base[i] * lo / set)]; }));
|
|
195
|
+
writeRules();
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// What each heading measured right after we last fitted it, so the
|
|
199
|
+
// ResizeObserver below can tell a real change (a font swap, a rotate, a
|
|
200
|
+
// container that moved) from the size change our own write just caused.
|
|
201
|
+
var seen = new WeakMap();
|
|
202
|
+
function remember(el) {
|
|
203
|
+
var b = el.getBoundingClientRect();
|
|
204
|
+
seen.set(el, b.width + "x" + b.height);
|
|
205
|
+
}
|
|
206
|
+
function fitAndRemember(el) { fit(el); remember(el); }
|
|
207
|
+
|
|
208
|
+
// ⚠️ A ResizeObserver, NOT fonts.ready or a resize event, and the reason is
|
|
209
|
+
// WHEN it runs: after layout, BEFORE paint. The web font arriving re-wraps a
|
|
210
|
+
// fitted heading, and fonts.ready resolves only after that frame is painted —
|
|
211
|
+
// measured on the Hartes hero: a 42px jump in 2 of 3 loads. A size change
|
|
212
|
+
// reported here is fitted in the same frame, so the broken state is never
|
|
213
|
+
// drawn. It also covers a container that resizes.
|
|
214
|
+
var ro = new win.ResizeObserver(function (entries) {
|
|
215
|
+
for (var i = 0; i < entries.length; i++) {
|
|
216
|
+
var el = entries[i].target;
|
|
217
|
+
var b = el.getBoundingClientRect();
|
|
218
|
+
if (seen.get(el) === b.width + "x" + b.height) continue; // our own write
|
|
219
|
+
fitAndRemember(el);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
// Its own set, not seen: fitAndRemember has written seen by the
|
|
223
|
+
// time watch runs, so a seen test observed no heading at all, and a
|
|
224
|
+
// heading fitted in the fallback face was never fitted again when the web
|
|
225
|
+
// font arrived (hartesmetal.com.au, "FusionForge." with its "." alone).
|
|
226
|
+
var watched = new WeakSet();
|
|
227
|
+
function watch(el) { if (!watched.has(el)) { watched.add(el); ro.observe(el); } }
|
|
228
|
+
|
|
229
|
+
function fitAll() {
|
|
230
|
+
var els = doc.querySelectorAll(CANDIDATES);
|
|
231
|
+
for (var i = 0; i < els.length; i++) {
|
|
232
|
+
if (modeOf(els[i]) === "shrink") { fitAndRemember(els[i]); watch(els[i]); }
|
|
233
|
+
else unfit(els[i]); // Wrap here (a phone value may differ from the desktop's)
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
var queued = 0, all = false, touched = new Set();
|
|
238
|
+
function run() {
|
|
239
|
+
queued = 0;
|
|
240
|
+
if (all) { all = false; touched.clear(); fitAll(); return; }
|
|
241
|
+
var els = Array.from(touched);
|
|
242
|
+
touched.clear();
|
|
243
|
+
for (var i = 0; i < els.length; i++) {
|
|
244
|
+
if (!els[i].isConnected) continue;
|
|
245
|
+
if (modeOf(els[i]) === "shrink") { fitAndRemember(els[i]); watch(els[i]); }
|
|
246
|
+
else unfit(els[i]);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
function schedule() { if (!queued) queued = win.requestAnimationFrame(run); }
|
|
250
|
+
function scheduleAll() { all = true; schedule(); }
|
|
251
|
+
|
|
252
|
+
fitAll();
|
|
253
|
+
// A backstop only: a font that changes widths without changing any
|
|
254
|
+
// heading's box is not seen by the ResizeObserver.
|
|
255
|
+
if (doc.fonts && doc.fonts.ready) doc.fonts.ready.then(scheduleAll, function () {});
|
|
256
|
+
|
|
257
|
+
// …and the viewport WIDTH, which the ResizeObserver cannot stand in for: a
|
|
258
|
+
// heading sized to its own text (fit-content, a flex item) keeps the SAME box
|
|
259
|
+
// when the phone turns to 844, so nothing reports a change and it would stay
|
|
260
|
+
// shrunk. The probe's rotate check caught exactly that.
|
|
261
|
+
var lastWidth = win.innerWidth;
|
|
262
|
+
function onResize() {
|
|
263
|
+
if (win.innerWidth === lastWidth) return; // a phone's toolbar changing HEIGHT is not our business
|
|
264
|
+
lastWidth = win.innerWidth;
|
|
265
|
+
scheduleAll();
|
|
266
|
+
}
|
|
267
|
+
win.addEventListener("resize", onResize);
|
|
268
|
+
|
|
269
|
+
var mo = new win.MutationObserver(function (records) {
|
|
270
|
+
// Positions first: a node added or removed anywhere can shift the
|
|
271
|
+
// nth-child path of a fitted heading, and this callback runs before paint.
|
|
272
|
+
if (fitted.size) {
|
|
273
|
+
for (var q = 0; q < records.length; q++) if (records[q].type === "childList") { writeRules(); break; }
|
|
274
|
+
}
|
|
275
|
+
for (var i = 0; i < records.length; i++) {
|
|
276
|
+
var r = records[i];
|
|
277
|
+
// A block's text fit (Wrap / Shrink to fit / One line) or Min font size changed in the editor:
|
|
278
|
+
// only a data-fit attribute moved, so every heading is measured again.
|
|
279
|
+
if (r.type === "attributes") { scheduleAll(); continue; }
|
|
280
|
+
var target = r.target.nodeType === 1 ? r.target : r.target.parentElement;
|
|
281
|
+
var owner = target && target.closest(CANDIDATES);
|
|
282
|
+
if (owner) touched.add(owner);
|
|
283
|
+
for (var j = 0; j < r.addedNodes.length; j++) {
|
|
284
|
+
var n = r.addedNodes[j];
|
|
285
|
+
if (n.nodeType !== 1) continue;
|
|
286
|
+
if (n.matches(CANDIDATES)) touched.add(n);
|
|
287
|
+
var inner = n.querySelectorAll(CANDIDATES);
|
|
288
|
+
for (var k = 0; k < inner.length; k++) touched.add(inner[k]);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
if (touched.size) schedule();
|
|
292
|
+
});
|
|
293
|
+
mo.observe(doc.body, {
|
|
294
|
+
childList: true,
|
|
295
|
+
subtree: true,
|
|
296
|
+
characterData: true,
|
|
297
|
+
attributes: true,
|
|
298
|
+
attributeFilter: ["data-fit", "data-fit-phone", "data-fit-min", "data-fit-min-phone"],
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
doc.__sfFitWords = function stop() {
|
|
302
|
+
win.removeEventListener("resize", onResize);
|
|
303
|
+
ro.disconnect();
|
|
304
|
+
mo.disconnect();
|
|
305
|
+
if (queued) win.cancelAnimationFrame(queued);
|
|
306
|
+
fitted.clear();
|
|
307
|
+
fitEl.remove();
|
|
308
|
+
delete doc.__sfFitWords;
|
|
309
|
+
};
|
|
310
|
+
// For the probe and for debugging: which headings are fitted, at what size,
|
|
311
|
+
// and the sheet that holds it (disable it to read a heading's set size).
|
|
312
|
+
doc.__sfFitWords.fitted = fitted;
|
|
313
|
+
doc.__sfFitWords.sheet = fitEl;
|
|
314
|
+
// …and the two questions a block's own answer changes, for the guard
|
|
315
|
+
// (scripts/test-block-size.tsx §5): which mode an element is in, and its floor.
|
|
316
|
+
doc.__sfFitWords.modeOf = modeOf;
|
|
317
|
+
doc.__sfFitWords.floorOf = floorOf;
|
|
318
|
+
})(document);`,N9="storefront-fit-words";function QO(e){let o=e.createElement("script");return o.id=N9,o.textContent=D9,(e.head??e.documentElement).appendChild(o),()=>{e.__sfFitWords?.(),o.remove()}}var W9=`
|
|
319
|
+
[${Go}][${Go}] { cursor: text; }
|
|
320
|
+
`;function tF({children:e,document:o}){let{theme:t,themeMode:r,themeSwitchShown:a}=ne(),n=eo(t);return oF(()=>{if(o)return ZO(o,{mode:r,switchShown:a})},[o,r,a]),oF(()=>{if(o)return JO(o,n)},[o,n]),G9(()=>{if(o)return QO(o)},[o]),H9(M9,{children:[eF(bI,{}),eF("style",{children:W9}),e]})}import{jsx as _x}from"react/jsx-runtime";import{useEffect as z9,useState as U9}from"react";import{Banner as $9}from"efficient-shell/ui";var Td={load:"The header and footer could not load. They are hidden for now and nothing in them is saved. Reload to try again.",lock:"{name} is editing the header and footer. Nothing you change in them here is saved.",conflict:"The header and footer were changed somewhere else. Nothing you change in them here is saved. Reload to get the latest.",save:"The header and footer did not save. They are sent again with your next change."},j9={load:"{section} could not load. It stays on the page as it was. Reload to try again.",lock:"{name} is editing {section}. Nothing you change in it here is saved.",conflict:"{section} was changed somewhere else. Nothing you change in it here is saved. Reload to get the latest.",save:"{section} did not save. It is sent again with your next change."},K9=Td.load,q9=Td.lock,V9=Td.conflict,Y9=Td.save;function X9(e){if(!e)return null;if(e.loadFailed)return i(K9);if(e.lockHolder)return i(q9,{name:e.lockHolder.name||i("Somebody else")});if(e.conflict)return i(V9);if(e.saveFailed)return i(Y9);let o=e.sections?.[0];if(!o)return null;let t=o.title||i("A shared section"),r=o.holder?.name||i("Somebody else");return i(j9[o.problem],{section:t,name:r})}function Z9({report:e}){let o=X9(Xc(e)),[t,r]=U9(null);return z9(()=>{o||r(null)},[o]),!o||t===o?null:_x("aside",{className:"sf-canvas-notice",children:_x($9,{tone:"warning",onDismiss:()=>r(o),children:o})})}function rF(){return _x(Z9,{report:Zc()})}import{jsx as Pd}from"react/jsx-runtime";import{useState as aF}from"react";import{Banner as J9,Button as Q9}from"efficient-shell/ui";import{UndoIcon as eV}from"efficient-shell/icons/efficient";import{useScreenDocument as oV}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSettledAction as tV}from"efficient-easel/easel";function nF(){let e=yP(),{adapter:o,flushSave:t,reloadFromServer:r}=oV(),a=o.siteVersions,[n,s]=aF(!1),[l,c]=aF(!1),d=async()=>{if(!(!a||n)){s(!0),c(!1);try{await wP({access:a,flushSave:t,reload:r})}catch{c(!0)}finally{s(!1)}}},u=tV({onPress:()=>{d()},busy:n});return e?Pd("aside",{className:"sf-canvas-notice",children:Pd(J9,{tone:l?"danger":"info",title:e.title,onDismiss:Jc,action:a&&e.undo?Pd(Q9,{variant:"secondary",size:"sm",leftIcon:Pd(eV,{}),loading:u.busy,disabled:u.busy,onClick:u.onPress,children:i("Undo")}):void 0,children:l?i("Undo did not work. Nothing changed. Try again."):i("Check it with Preview. Press Publish to put it live.")})}):null}import{usePreviewParts as iV}from"efficient-easel/draw/client";import{useSectionOps as cV}from"efficient-easel/screen/lib/document/use-section-ops";var sF=null;function Rx(e){sF=e}function O1e(){return sF}function cF(e){let{mirrorHostStyles:o}=jd(),t=SI(),{sectionBackgroundWidth:r,themeFromDocument:a}=ne(),n=iI(),s=lF(()=>({...e.metadata??t??{},...zy(a?null:r,n)}),[e.metadata,t,r,n,a]);nV(()=>(Rx(n),()=>Rx(null)),[n]);let l=iF(null),c=dV(l),{onDocument:d}=e,u=h=>{l.current=h,d?.(h)};return aV(rV,{children:[Ax(nF,{}),Ax(rF,{}),Ax(sV,{...e,onDocument:u,typing:c,metadata:s,height:"fill",mirrorStyles:o,frameWrapper:tF})]})}function dV(e){let o=lV(),t=cV(),r=iV(),a=iF({ops:t,parts:r});return a.current={ops:t,parts:r},lF(()=>{let n={getItemById:l=>o.getState().getItemById(l),getSelectorForId:l=>o.getState().getSelectorForId(l),get components(){return o.getState().config.components},replace:(l,c,d)=>a.current.ops.replaceComponent(l,c,d)},s=(l,c)=>{let d=_v(l,n);if(!d)return null;let u=c,h=()=>(u=Rv(u,u?.ownerDocument??e.current,l),u),p=h();return p?{element:h,value:d.value,rules:d.rules,multiline:d.multiline,skip:d.skip,write:d.write,toolbar:{offered:d.offered,colors:d.offered.length>0?Ic(zv(p)):void 0}}:null};return{at:l=>{let c=l.closest(`[${Go}]`),d=c?.getAttribute(Go);return c&&d?s(d,c):null},atSelection:()=>{let l=a.current.parts.selectedPartId;return l?s(l,null):null},onChange:l=>{if(!l.typing){Fm(null);return}let c=l.element.closest(`[${Go}]`)?.getAttribute(Go)??null;Fm(c),c&&a.current.parts.selectedPartId!==c&&a.current.parts.select(c)}}},[o,e])}var fV=lI.mediaFields,uV=/video|poster|focal|phone/i;function dF(e){return(fV[e]??[]).find(o=>!o.includes("[]")&&!uV.test(o))??null}var fF={adds:{kind:"block",type:"ImageBlock"},takes:e=>dF(e.type)!==null,replace:(e,o)=>{let t=dF(e.type);return t?{...e.props,[t]:o.url}:{...e.props}},create:(e,o)=>({type:"ImageBlock",props:{...o.nodeDefaults("ImageBlock"),id:o.newNodeId("ImageBlock"),src:e.url}})};var uF={Hero:"Full-screen opener with rotating slides.",HeroSingle:"Full-screen image or video with a headline.",IntroBleed:"Full-bleed intro image the next section scrolls over.",Collections:"Product collections in a tidy grid.",AlloyWheelsListing:"A full product-listing page: filter rail, sortable card grid and pagination, from the live catalog. Choose which product types it shows.",CatalogFilterBar:"Filters the collection grids below it \u2014 a sticky row of Pills (the default), or Columns, one per filter you switch on.",ProductGrid:"Hand-picked products in a tidy grid.",FitmentFinder:"A vehicle picker \u2014 make, model, year and trim resolve the OEM stock fitment live.",Gallery:"Two image galleries with tabs and filters.",GalleryB:"Customer photos in a card grid with a click-to-open lightbox.",SpecStrip:"A thin one-line spec strip \u2014 small-caps items spread across the width, as a dark band or a bare hairline row.",ProductHero:"A product hero \u2014 image beside price, bullets and a buy button.",SpecTable:"A spec sheet \u2014 labeled rows of product specifications.",ProcessSteps:"A heading over columns of image, title, blurb and specs.",DetailRows:"Repeating full-width rows \u2014 eyebrow, title and copy beside a numbered close-up image, alternating sides each row.",FitmentTable:"A fitment table \u2014 per-size bolt patterns, offsets and load ratings, filterable by diameter.",CompatibleTyres:"The current product's compatible tyres \u2014 image, size, key specs and price per tyre, with an inquiry link. Display only.",RelatedProducts:"The current product's related items in a tidy row \u2014 the product page's built-in 'Pair with' cross-sell.",OrderSummary:"A display order-summary panel \u2014 items, totals and a note.",DeliveryOptions:"Delivery tiers as cards \u2014 name, window and price, one highlighted.",PaymentBadges:"A payment-methods trust strip with reassurance lines.",CheckoutCTA:"A centered 'ready to order?' headline with the checkout button.",Manifesto:"A bold brand statement beside a full-height image, with a stat strip.",ParagraphsA:"An editorial text panel with a stat strip and founders' note.",StatsParagraph:"An editorial heading and paragraph over a row of theme-color-accented stat cards.",Chart:"A titled chart \u2014 bars, line or donut \u2014 drawn from your own labeled data points.",Mockup:"A headline beside a stylized product-UI mockup card \u2014 spec sheet, fitment, portal, kanban and more.",Prose:"A plain editorial text section \u2014 eyebrow, heading and body copy.",Timeline:"An editorial aside beside a rail-marked timeline of dated entries.",TimelineTrack:"A horizontal year track of milestones \u2014 company history or roadmap.",Footprint:"A world map of your locations with a legend \u2014 designed here, sold worldwide.",TitleWithButtons:"A big headline beside a stack of call-to-action buttons.",Split:"Side-by-side image and text in two columns.",Cards:"A heading over a grid of free-text title-and-blurb cards.",FAQ:"A frequently-asked-questions accordion with a header.",Testimonials:"Customer quotes in a grid \u2014 the quote, a name and a role.",Masthead:"A journal issue header with a lead statement and contents.",Breadcrumb:"A slim trail showing where the reader is (Home / Journal\u2026).",CategoryBar:"A sticky row of category tabs with counts and links.",FeaturedCover:"A featured article \u2014 big cover image beside a headline and dek.",LongRead:"A long-form article spread with a pull-quote and cover image.",Series:"A section heading over a grid of column cards.",Subscribe:"A newsletter signup beside a list of recent issues.",SubscribeBlogs:"A newsletter signup beside your latest blog posts, pulled live.",Events:"Latest journal posts in a three-card row.",DocMasthead:"A document header \u2014 headline, metadata and standfirst.",DocTabs:"A sticky tab bar to switch between documents.",DocBody:"Long-form document body with an 'On this page' contents list.",DocMetaCards:"A three-up meta strip for the foot of a document.",Banner:"Wide promo strip with background image.",Stats:"Highlight key numbers \u2014 years, designs.",Countdown:"Hours, minutes and seconds to a set date and time, then one line.",KeyFeatures:"A theme-color chip and heading over a grid of short feature labels.",Logos:"A row of partner or brand logos.",Ticker:"A scrolling marquee of short phrases, full width.",Reviews:"Approved customer reviews in a star-rated card grid, pulled live.",SubmitBuild:"A 'Show us yours.' headline with a photo-submission form.",ReviewForm:"A write-a-review form \u2014 submissions wait for your approval before they show.",ContactRouting:"Pick who to reach, then a form that routes the message.",ContactLocations:"Your locations as a city gallery plus address and map cards.",SectionHeader:"A numbered section title with optional link.",Grid:"Multi-column container for blocks.",Flex:"An empty section. Add whatever you want inside.",Spacer:"Vertical breathing room between sections.",Divider:"A thin horizontal rule between sections.",CustomHTML:"Drop in your own sanitized HTML.",Heading:"A single heading line.",Text:"A paragraph of body copy.",ImageBlock:"A standalone image, at the width you set.",ButtonBlock:"A call-to-action button."};import{jsx as Ed}from"react/jsx-runtime";import{useState as pV}from"react";import{Button as mV,Tooltip as hV,toast as pF}from"efficient-shell/ui";import{TemplateIcon as xV}from"efficient-easel/icons";import{useSettledAction as IV}from"efficient-easel/easel";import{useScreenDocument as gV}from"efficient-easel/screen/components/ScreenDocumentContext";function hF({enabled:e,reason:o,onSaved:t}){let{flushSave:r}=gV(),[a,n]=pV(!1),s=async()=>{if(!a){n(!0);try{await r()?t():pF.error(i(mF))}catch{pF.error(i(mF))}finally{n(!1)}}},l=IV({onPress:()=>{s()},busy:a});return Ed(hV,{side:"bottom",content:e?i("Save this website as a platform template"):i(o),children:Ed("span",{className:"sf-tip-disabled",tabIndex:e?void 0:0,children:Ed(mV,{variant:"secondary",disabled:!e||l.busy,loading:l.busy,onClick:l.onPress,rightIcon:Ed(xV,{size:15}),children:i("Save as Template")})})})}var mF="Your last changes did not save, so the template was not made. Try again.";var bV="Save your page changes first";function xF(e){return e.hasTrustedConsole?e.canCreatePlatformTemplate?!e.capabilities.canPublish||!e.capabilities.hasSiteSettings?{visible:!1,hiddenReason:"not-a-site-page"}:e.siteId?e.hasUnsavedEdits?{visible:!0,enabled:!1,disabledReason:bV}:{visible:!0,enabled:!0}:{visible:!1,hiddenReason:"no-site"}:{visible:!1,hiddenReason:"not-operator"}:{visible:!1,hiddenReason:"no-console"}}var IF="storefront-editor:save-as-template";var $s="ContactLocations",yV="CityPictures",SV="CityMaps",CV=[{key:yV,label:"City pictures",desc:"A wall of city photos, grouped by region. Each photo links to its city's card."},{key:SV,label:"City maps",desc:"A card per city, grouped by region: address, phone, hours and a map."}];function gF(e=qc){let o=Kt.find(t=>t.sections.some(r=>r.type===$s))?.key;return!e.includes($s)||!o?[]:CV.map(({key:t,label:r,desc:a},n)=>({key:t,label:r,cat:o,after:$s,desc:a,alias:"locations offices stores branches",insert:s=>{let l=Vc($s);return l?vx($s,l,n)(s.nodeDefaults,s.newNodeId):null}}))}var wV="plain",bF=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],kV="line",vV={KeyFeatures:"filled"};function js(e){return vV[e]??wV}function fEe(e,o){return mo(bF,js(o),e)}function uEe(e){return mo(bF,kV,e)}function yF(e,{nodeDefaults:o,newNodeId:t,sectionLabel:r,blockIsOffered:a}){let n=wd(e);return n?n(o,t):NT(e)&&a(re)&&a(ja)?{type:re,props:{...o(re),id:t(re),direction:"column",name:`${r(e)} section`,content:[{type:ja,props:{...o(ja),id:t(ja),...fo[e]?.headStyle?{headStyle:fo[e].headStyle}:{},...fo[e]?.headRowGap?{rowGap:fo[e].headRowGap}:{},...fo[e]?.headDescriptionSize?{descriptionSize:fo[e].headDescriptionSize}:{},...js(e)!==js(ja)?{eyebrowLook:js(e)}:{}}},{type:e,props:{...o(e),id:t(e),headPlacement:"own-box"}}]}}:it[e]?.fixed===!0?{type:e,props:{...o(e),id:t(e),layout:"boxes"}}:null}import{useEffect as TV,useState as PV}from"react";import{useEaselSession as EV}from"efficient-easel/screen/lib/session-context";function SF(){let e=EV().chrome?.products?.list,[o,t]=PV(null);return TV(()=>{if(!e)return;let r=!1;return e().then(a=>{r||t(a)}),()=>{r=!0}},[e]),o}function _F({mode:e,open:o}){let{setSelectedHeroId:t,setSelectHandler:r}=Nw(),a=OF().tree,n=e,s=n.kind==="ticker"?n.heroId:null,l=qs(c=>{c&&(o({kind:"ticker",heroId:c}),NV(c))},[o]);return ct(()=>{t(s)},[s,t]),ct(()=>{r(l)},[r,l]),{partRows:(c,{rowClick:d})=>{let u=String(c.props.id);return c.type==="Hero"&&Je(PF,{icon:Je(Fr,{type:"ticker",size:13}),name:i(Gn),onSelect:()=>l(u),selected:s===u,rowProps:{onClick:d(()=>l(u))},words:a})}}}function RF({mode:e,select:o}){let{setSelectedHeroPart:t,setSelectHandler:r}=Xi(),a=OF().tree,{appState:n}=EF(p=>p),s=n.data.content??[],l=OV(s);l.current=s;let c=e,d=Wn.find(p=>zn[p]===c.kind),u=d&&"nodeId"in c?Un(String(c.nodeId),d):null,h=qs(p=>{let x=$w(p);if(!x)return;let g=l.current.findIndex(E=>String(E.props.id)===x.nodeId);if(g<0)return;let y={kind:zn[x.part],nodeId:x.nodeId};o({index:g},y)},[o]);return ct(()=>{t(u)},[u,t]),ct(()=>{r(h)},[r,h]),{partRows:(p,{rowClick:x})=>{let g=String(p.props.id),y=Uw(p);if(y.length===0)return null;let E=I=>{let w=Un(g,I.part);return Je(PF,{icon:Je(Fr,{type:I.part==="media"?"heroMedia":"heroImage",size:13}),name:i(I.label),onSelect:()=>h(w),selected:u===w,rowProps:{onClick:x(()=>h(w))},words:a},w)},[O,...C]=y;return Ks(TF,{children:[E(O),C.length>0&&Je(LV,{children:C.map(E)})]})}}}function AF(e,o){return{partRows:(t,r)=>Ks(TF,{children:[e.partRows?.(t,r),o.partRows?.(t,r)]})}}function MV(e){let{adapter:o,capabilities:t,currentSlug:r,siteId:a,docId:n,hasUnsavedEdits:s,bridgeCapabilities:l,notifyParent:c,token:d}=Od(),{hasPreviewLink:u}=t,h=Ne(FF()).preview?.draftLink,p=FP(e.data),x=xF({hasTrustedConsole:!!d,canCreatePlatformTemplate:l.canCreatePlatformTemplate,capabilities:t,siteId:a,hasUnsavedEdits:s}),g=qs(()=>{!a||!r||c(IF,{siteId:a,slug:r})},[c,a,r]),y=iP({pageSlug:r,siteId:a,token:d}),E=o.previewHref?.(r)??y;return{barLead:()=>x.visible&&Je(hF,{enabled:x.enabled,reason:x.enabled?"":x.disabledReason,onSaved:g}),barView:()=>u&&r&&Je(fP,{liveHref:E,pageId:n??null,draftLink:h}),mainAction:p}}function HV(e,o){let{capabilities:t,templateId:r,siteId:a,tokenRef:n,navigate:s}=Od(),{hasSiteTheme:l,explainsSiteSettings:c}=t,d=I=>o.setView(I),[u,h]=CF(Pa[0].id),[p,x]=CF(!1),{surface:g,setSurface:y}=Dw(),E=()=>{if(l){d("styles"),o.reveal(),wF();return}e.show(ch),e.reveal(),wF()},O={id:"pages",label:i("Pages"),icon:Je(_V,{}),panel:({onHide:I})=>Je(Tw,{activeSurface:g,onPreviewSurface:y,onNavigate:w=>{y(null),s(r?{kind:"template",id:r,pageSlug:w}:{kind:"page",slug:w,siteId:a??void 0})},onClose:I})},C=[];return!l&&c&&C.push({id:"appearance",label:i("Appearance"),icon:Je(AV,{}),active:e.kind==="website",onSelect:E}),l&&C.push({id:"styles",label:i("Styles"),icon:Je(RV,{}),panel:({onHide:I,notify:w})=>Je(uT,{tokenRef:n,siteId:a??void 0,onClose:I,onNotify:w,tab:u,onTabChange:h,revealPageGroup:p,onPageGroupRevealed:()=>x(!1)})}),{railLead:[O],railTrail:C,resolveLeftView:I=>jO(I,l),openSettings:E,openStyles:()=>{h(lw),d("styles")},openPageStyles:l?()=>{h(Ea),x(!0),d("styles"),o.reveal()}:c?()=>{e.show(oT),e.reveal()}:void 0}}function GV(){let{navigate:e,siteId:o,reloadFromServer:t,docId:r}=Od(),a=EF(s=>s.config),n=FF();ct(()=>(Zm({openPage:s=>e({kind:"page",slug:s.slug,siteId:o??void 0}),reload:()=>{t()},config:a}),()=>Zm(null)),[e,o,t,a]),ct(()=>{let s=Ct();if(!s||!r)return;let l=!1;return DV(n).list().then(c=>{l||s.learn(c)}).catch(()=>{}),()=>{l=!0}},[r,n])}function WV(e,o,t,r){let{kind:a,open:n}=e,{selected:s,zoneOf:l}=o;ct(()=>{MO(s?.type==="BookingBox"&&s.props.region==="confirm"?HO(l(String(s.props.id))):null)},[s?.props.id]);let c=AT(e,o),{capabilities:{hasSiteSettings:d}}=Od();GV();let{chat:u,setChat:h,setSelected:p,setSelectHandler:x}=Yi(),g=qs(()=>n(tT),[n]),y=a==="chat";ct(()=>{p(y)},[y,p]),ct(()=>{x(g)},[x,g]);let{setOpenHandler:E}=Hn(),O=qs(()=>n(rT),[n]);ct(()=>{E(O)},[E,O]);let C=AF(_F(e),RF(e)),I=MV(o),w=HV(e,r),v=t.device;return{...C,...I,...w,hasOwnRows:k=>k.type===jc,ownRows:c.renderLocationTree,sectionPressed:c.sectionPressed,wrap:k=>Je(Kd.Provider,{value:!0,children:Ks(BV.Provider,{value:v,children:[k,Je(MP,{})]})}),addPanelRow:k=>d?Ks("div",{className:"sf-addside-sitewide",children:[Je("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:Je(Fr,{type:"chat",size:16})}),Ks("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{k(),g()},children:[i("Live chat"),Je("span",{className:"sf-addside-sitewide-desc",children:i("A chat bubble on every page")})]}),Je(FV,{checked:u.enabled,onChange:R=>h({enabled:R}),ariaLabel:i("Show the chat bubble on the whole site")})]}):void 0}}var kF=null,Lx=new WeakMap;function zV(e){let o=II();if(!e||!o)return e;kF!==o&&(kF=o,Lx=new WeakMap);let t=Lx.get(e);return t||(t={...e,choices:e.choices?e.choices.map(r=>({...r,label:i(r.label)})):null,spec:e.spec?{...e.spec,addLabel:i(e.spec.addLabel)}:null},Lx.set(e,t)),t}var UV={isLockedBlock:(e,o)=>qO(e,o)||!!(o&&Ct()?.heldElsewhere(o.props.id)),duplicateBlocked:Dc,nestDepth:(e,o,t)=>o===fl?cg(e,t):0,newSectionNode:yF,canAddTo:(e,o,t,r)=>zV(DO(e,o,r)),blockIsOffered:BO,slotsOf:NO},$V=new Proxy(uF,{get:(e,o)=>{let t=Reflect.get(e,o);return typeof t=="string"?i(t):t}}),jV={labelAtLevel:(e,o,t)=>i(Gm(e,o,t)),descriptions:$V,categoryLabel:e=>{let o=HP(e);return o===void 0?void 0:i(o)},firstSection:GP,blockRowName:GO,rowName:WO,plainText:pr,Icon:Fr,Thumbnail:fT,useProducts:SF,presets:gF()},KV={desktop:2e3,tablet:800,mobile:390},vF="desktop",qV={options:Rw,initial:vF,fluid:vF,widths:KV},VV={read:UO,write:e=>$O(e),forSelection:(e,o)=>KO(e,o)},YV={first:ho,last:Fe,firstGroup:Oe,lastGroup:ve,isSectionGroup:Ga,sectionGroupZone:h0,panelOf:e=>e===ho?eT:null,get sharedReach(){return Hr()?ZV:void 0},get shared(){return Ct()?YO:void 0},get groupTab(){return Hr()?G0:void 0},get groupBadge(){return Hr()?ah({type:ve})??void 0:void 0},get changeNotice(){return Hr()?W0():void 0},get band(){return Hr()?XV:void 0},get groupAccepts(){return Hr()?g0:void 0}},XV={foldable:!0},ZV=e=>ah(e)??VO(e);function JV(e){return{...AF(_F(e),RF(e)),openSettings:()=>e.show(ch)}}function QV(e,o){VT(e,o),rP()}var ROe={useOwnerName:Oa,useDocumentLabel:mw,useBridges:WV,useStandaloneBridges:JV,useDocumentPass:QV,blockRules:UV,blockLook:jV,devices:qV,leftView:VV,pinned:YV,Canvas:cF,canvasDrag:{media:fF},Inspector:nT};export{wm as a,uc as b,_z as c,bhe as d,yhe as e,fv as f,She as g,km as h,Che as i,whe as j,Ba as k,khe as l,Az as m,vhe as n,hv as o,The as p,YIe as q,XIe as r,ZIe as s,c0 as t,qt as u,Wm as v,Ne as w,xl as x,re as y,LT as z,tSe as A,DT as B,mo as C,df as D,IR as E,gR as F,ff as G,uf as H,Oo as I,oZ as J,we as K,fo as L,MT as M,lSe as N,HT as O,iSe as P,cSe as Q,K as R,Wc as S,Nye as T,at as U,nt as V,$o as W,gSe as X,iu as Y,cu as Z,FD as _,Hl as $,mte as aa,gn as ba,hte as ca,hy as da,Xue as ea,ec as fa,qn as ga,ck as ha,Zue as ia,dk as ja,Jue as ka,zG as la,fk as ma,Que as na,xk as oa,WP as pa,rwe as qa,tY as ra,i as sa,io as ta,zP as ua,swe as va,pb as wa,na as xa,hb as ya,JQ as za,qf as Aa,FL as Ba,QQ as Ca,Vn as Da,hk as Ea,fpe as Fa,pc as Ga,Lz as Ha,Dr as Ia,Qn as Ja,Ohe as Ka,Fhe as La,xv as Ma,_he as Na,Nr as Oa,Gz as Pa,Rhe as Qa,gte as Ra,xy as Sa,da as Ta,bte as Ua,yte as Va,Ste as Wa,kte as Xa,vte as Ya,DD as Za,Tte as _a,pu as $a,wy as ab,Pte as bb,Ete as cb,jD as db,Ote as eb,KD as fb,Fte as gb,ia as hb,Dt as ib,Rl as jb,ey as kb,$oe as lb,joe as mb,YP as nb,XP as ob,rd as pb,Cwe as qb,ZP as rb,wwe as sb,kwe as tb,vwe as ub,JP as vb,Twe as wb,Pwe as xb,pD as yb,Dl as zb,rte as Ab,nu as Bb,ate as Cb,bD as Db,yD as Eb,cy as Fb,dy as Gb,ad as Hb,o1 as Ib,Awe as Jb,Lwe as Kb,X as Lb,me as Mb,D as Nb,de as Ob,he as Pb,xe as Qb,Te as Rb,Se as Sb,He as Tb,Zwe as Ub,CJ as Vb,wJ as Wb,pr as Xb,zu as Yb,mn as Zb,Uu as _b,Ku as $b,Ei as ac,Go as bc,Ole as cc,Fle as dc,_le as ec,Rle as fc,zH as gc,UH as hc,Ale as ic,ba as jc,qu as kc,Lle as lc,Ble as mc,Ju as nc,Ca as oc,_n as pc,Kle as qc,Di as rc,FC as sc,ap as tc,qle as uc,Vle as vc,Yle as wc,Xle as xc,R5 as yc,Za as zc,E7 as Ac,ake as Bc,ld as Cc,O7 as Dc,F7 as Ec,nke as Fc,ske as Gc,mke as Hc,Hh as Ic,rs as Jc,Uv as Kc,$v as Lc,as as Mc,Jk as Nc,$me as Oc,bm as Pc,ym as Qc,ov as Rc,tv as Sc,dz as Tc,rv as Uc,fc as Vc,av as Wc,wke as Xc,u1 as Yc,kke as Zc,vke as _c,Tke as $c,Ms as ad,cd as bd,Ake as cd,uo as dd,zke as ed,y1 as fd,S1 as gd,C1 as hd,Vh as id,Jke as jd,$l as kd,jl as ld,eve as md,w1 as nd,rve as od,ave as pd,k1 as qd,xd as rd,hH as sd,Mu as td,xH as ud,_se as vd,Mo as wd,Ase as xd,Lse as yd,bi as zd,Bse as Ad,yi as Bd,Dse as Cd,Nse as Dd,qS as Ed,VS as Fd,wH as Gd,kH as Hd,Wse as Id,Use as Jd,$se as Kd,jse as Ld,Kse as Md,ug as Nd,Jve as Od,fE as Pd,sx as Qd,uE as Rd,r0e as Sd,a0e as Td,n0e as Ud,lx as Vd,s0e as Wd,l0e as Xd,pE as Yd,Na as Zd,A0e as _d,bc as $d,Yv as ae,Rm as be,wU as ce,$E as de,jE as ee,X0e as fe,xTe as ge,OTe as he,fO as ie,BTe as je,IO as ke,DTe as le,gO as me,yO as ne,wO as oe,kO as pe,VTe as qe,YTe as re,XTe as se,ZTe as te,la as ue,c9 as ve,m9 as we,dPe as xe,oa as ye,ng as ze,ag as Ae,RR as Be,AR as Ce,LR as De,EZ as Ee,BR as Fe,OZ as Ge,dn as He,FZ as Ie,_Z as Je,fl as Ke,cg as Le,gPe as Me,bPe as Ne,b9 as Oe,PD as Pe,Ml as Qe,fte as Re,og as Se,kR as Te,IZ as Ue,il as Ve,rg as We,vR as Xe,TR as Ye,PR as Ze,yZ as _e,SZ as $e,CZ as af,wZ as bf,Oe as cf,ve as df,cge as ef,x0 as ff,Ec as gf,kX as hf,EX as if,U_ as jf,lX as kf,Nl as lf,lte as mf,ite as nf,cte as of,Rte as pf,Ate as qf,Lte as rf,Gy as sf,yr as tf,uN as uf,Yte as vf,pN as wf,Xte as xf,Yl as yf,Zte as zf,O1e as Af,zv as Bf,Axe as Cf,Gv as Df,lr as Ef,$X as Ff,sf as Gf,fR as Hf,KI as If,hR as Jf,YX as Kf,XX as Lf,ll as Mf,ZX as Nf,pf as Of,VI as Pf,iZ as Qf,Hw as Rf,qde as Sf,Gw as Tf,I6 as Uf,Op as Vf,_a as Wf,Zde as Xf,Jde as Yf,g6 as Zf,Qde as _f,Un as $f,$w as ag,efe as bg,Gn as cg,Hde as dg,Nw as eg,Gde as fg,Wde as gg,zde as hg,Aye as ig,pT as jg,mT as kg,hT as lg,kN as mg,ot as ng,Do as og,Xl as pg,ha as qg,cre as rg,dre as sg,ure as tg,pre as ug,mre as vg,hre as wg,xre as xg,gre as yg,Jl as zg,bre as Ag,$_ as Bg,j_ as Cg,dX as Dg,K_ as Eg,q_ as Fg,fX as Gg,uX as Hg,pX as Ig,mX as Jg,hX as Kg,xX as Lg,IX as Mg,gX as Ng,bX as Og,yX as Pg,fZ as Qg,hZ as Rg,cl as Sg,ul as Tg,un as Ug,Ig as Vg,WZ as Wg,zZ as Xg,wf as Yg,mA as Zg,iJ as _g,fJ as $g,gJ as ah,bJ as bh,r_ as ch,Lf as dh,Bf as eh,sQ as fh,lQ as gh,Zg as hh,iQ as ih,cQ as jh,dQ as kh,rb as lh,nb as mh,pt as nh,ib as oh,ML as ph,pee as qh,yb as rh,yee as sh,Cb as th,Tb as uh,Pb as vh,Eb as wh,Ob as xh,Fb as yh,_b as zh,Yf as Ah,Ab as Bh,Lb as Ch,zee as Dh,sB as Eh,Uee as Fh,$ee as Gh,Db as Hh,Yee as Ih,lB as Jh,Xee as Kh,Zee as Lh,cB as Mh,Xf as Nh,fB as Oh,ooe as Ph,uB as Qh,toe as Rh,pB as Sh,Ao as Th,aoe as Uh,noe as Vh,soe as Wh,loe as Xh,El as Yh,ioe as Zh,Qf as _h,xoe as $h,zb as ai,IB as bi,goe as ci,_B as di,Noe as ei,cD as fi,Joe as gi,fD as hi,Qoe as ii,ete as ji,ote as ki,zl as li,yn as mi,Dte as ni,Nte as oi,Mte as pi,Py as qi,Ey as ri,Oy as si,Hte as ti,ma as ui,ql as vi,Ute as wi,$te as xi,jte as yi,My as zi,qte as Ai,Wt as Bi,xt as Ci,Cr as Di,jae as Ei,Kae as Fi,qae as Gi,Vae as Hi,Yae as Ii,Xae as Ji,Zae as Ki,one as Li,tne as Mi,G2 as Ni,rne as Oi,ane as Pi,nne as Qi,sne as Ri,lne as Si,ine as Ti,cne as Ui,dne as Vi,$2 as Wi,fne as Xi,vu as Yi,une as Zi,li as _i,Sr as $i,Mf as aj,kS as bj,ci as cj,pne as dj,mne as ej,iM as fj,hne as gj,xne as hj,Ine as ij,gne as jj,bne as kj,yne as lj,Sne as mj,Ql as nj,fi as oj,ui as pj,Eu as qj,pi as rj,Cne as sj,TS as tj,wne as uj,kne as vj,vne as wj,OS as xj,Tne as yj,Pne as zj,Ene as Aj,One as Bj,Fne as Cj,_ne as Dj,Ou as Ej,Rne as Fj,_S as Gj,RS as Hj,AS as Ij,Ane as Jj,_u as Kj,FM as Lj,Lne as Mj,Bne as Nj,Xk as Oj,bo as Pj,Xn as Qj,OW as Rj,_k as Sj,Hpe as Tj,Gpe as Uj,Wpe as Vj,zpe as Wj,Upe as Xj,$pe as Yj,jpe as Zj,Bk as _j,Kpe as $j,qpe as ak,Vpe as bk,qi as ck,Pw as dk,Ew as ek,Fw as fk,Vi as gk,Sde as hk,Cde as ik,Yi as jk,c6 as kk,Rde as lk,Hn as mk,Dde as nk,Dw as ok,os as pk,zz as qk,Nhe as rk,Mhe as sk,Age as tk,Lge as uk,Bge as vk,jde as wk,Xi as xk,pY as yk,LC as zk,cie as Ak,die as Bk,fie as Ck,uie as Dk,ew as Ek,ow as Fk,Bie as Gk,Die as Hk,u4 as Ik,Nie as Jk,Mie as Kk,Hie as Lk,Gie as Mk,p4 as Nk,Wie as Ok,zie as Pk,Uie as Qk,$ie as Rk,I4 as Sk,jie as Tk,tce as Uk,rce as Vk,Cp as Wk,wp as Xk,Kw as Yk,Due as Zk,Qw as _k,ak as $k,nk as al,exe as bl,oxe as cl,Tv as dl,txe as el,rxe as fl,ls as gl,kU as hl,vU as il,Qxe as jl,e0 as kl,Fe as ll,Bc as ml,Uo as nl,gT as ol,gs as pl,bT as ql,yT as rl,Gye as sl,Wye as tl,aP as ul,Rh as vl,nP as wl,DO as xl,GPe as yl,WO as zl,qO as Al,vd as Bl,F9 as Cl,_9 as Dl,t1e as El,sY as Fl,dY as Gl,wV as Hl,bF as Il,kV as Jl,js as Kl,fEe as Ll,uEe as Ml,ROe as Nl};
|