efficient-storefront-blocks 0.108.0 → 0.110.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 +49 -0
- package/dist/chunks/EditorPreviewCheckout-2JRQSG4O.js +4 -0
- package/dist/chunks/{SiteEditorProvider-HUBOWTZX.js → SiteEditorProvider-P4HVFXUX.js} +1 -1
- package/dist/chunks/chunk-CPAF23MT.js +1 -0
- package/dist/chunks/chunk-FRCI3FAV.js +80 -0
- package/dist/chunks/{chunk-S63IHMZT.js → chunk-GB6OHYUY.js} +1 -1
- package/dist/chunks/{chunk-QRXGHD3Z.js → chunk-MVJVIU2F.js} +1 -1
- package/dist/chunks/chunk-RFFTWKCU.js +340 -0
- package/dist/chunks/{fitment-data-SMH4TOUX.js → fitment-data-EGBXHTFW.js} +1 -1
- package/dist/contract.js +8 -2
- package/dist/editor/components/BlogSource.d.ts +1 -1
- package/dist/editor/components/BlogSource.js +1 -1
- package/dist/editor/lib/efficient-backend.js +1 -1
- package/dist/index.js +32 -32
- package/dist/links.js +1 -1
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/CartContext.d.ts +3 -0
- package/dist/render/components/CartContext.js +1 -1
- package/dist/render/components/Events.d.ts +2 -1
- package/dist/render/components/Events.js +1 -1
- package/dist/render/components/FooterLogo.js +1 -1
- package/dist/render/components/ProductHeroPanel.js +1 -1
- package/dist/render/components/cart/drawer-parts.js +1 -1
- package/dist/render/components/checkout/CheckoutPageClient.js +1 -1
- package/dist/render/components/checkout/checkout-parts.d.ts +11 -0
- package/dist/render/components/checkout/checkout-parts.js +1 -1
- package/dist/render/components/checkout/checkout-state.d.ts +5 -0
- package/dist/render/components/checkout/checkout-state.js +3 -3
- package/dist/render/lib/checkout/checkout-memory.d.ts +62 -0
- package/dist/render/lib/checkout/checkout-memory.js +1 -0
- package/dist/render/lib/content/event-post.d.ts +5 -0
- package/dist/render/lib/content/event-post.js +1 -0
- package/dist/render/lib/document/blocks/service/Events/render.js +1 -1
- package/dist/render/lib/wheels/price-display.d.ts +2 -0
- package/dist/render/lib/wheels/price-display.js +1 -1
- package/dist/render/lib/wheels/selected-ranges.d.ts +1 -0
- package/dist/render/lib/wheels/selected-ranges.js +1 -1
- package/dist/words.d.ts +1 -0
- package/dist/words.js +1 -1
- package/package.json +3 -3
- package/dist/chunks/EditorPreviewCheckout-R7YOGDSN.js +0 -4
- package/dist/chunks/chunk-3PIAT5RJ.js +0 -339
- package/dist/chunks/chunk-5VKKFDMK.js +0 -74
- package/dist/chunks/chunk-CS32ZWYC.js +0 -1
- /package/dist/chunks/{chunk-3PIAT5RJ.js.LEGAL.txt → chunk-RFFTWKCU.js.LEGAL.txt} +0 -0
|
@@ -1,339 +0,0 @@
|
|
|
1
|
-
import{$ as Pa,$a as Ea,$c as vh,$d as Lv,Ac as Sh,Ae as Hv,Ag as Ik,B as bC,Ba as lh,Bc as R,Ca as RC,Cb as Gr,Cc as Do,Cd as wv,Cf as tk,Ch as $h,Da as FC,Dc as Cr,De as Kr,Df as Dh,Dg as Uh,E as Kd,Ea as so,Ec as iv,Ed as No,Ee as Ah,Eg as Tr,F as yC,Fa as BC,Fb as wl,Fc as W,Fd as Ft,Fg as fc,G as SC,Ga as DC,Gc as Ko,Gg as qo,H as bl,Ha as NC,Hb as $n,Hc as dv,Hg as we,Hh as Ek,I as th,Ia as MC,Ib as Lt,Ic as Rt,Id as Cv,Ig as pc,Ih as xc,J as He,Ja as HC,Jb as hh,Jc as Gn,Jd as Ph,Jg as gk,K as oe,Ka as UC,Kc as jr,Ke as Uv,Kg as Pl,La as WC,Lc as vr,Le as Wv,Lg as tt,Ma as zC,Me as Lh,Mg as El,N as wC,Na as $C,Nc as qe,Nd as vv,Ne as xo,Nf as La,Ng as uc,O as $r,Oa as GC,Oc as cv,Od as kv,Oe as zv,Og as Qn,Oh as Ic,P as Hn,Pa as Xd,Pd as Tv,Pe as $v,Pf as rk,Pg as Wh,Q as CC,Qa as Zd,Qc as fv,Qd as Pv,Qe as Yn,R as yr,Ra as jC,Rc as pv,Re as Vo,Rf as ak,Rg as mc,S as rh,Sa as KC,Sb as Oa,Sc as wh,Sd as Ev,T as Un,Tc as uv,Te as Xn,Tf as nk,Th as os,Ua as VC,Ub as xh,Ud as Ov,Ue as Zn,Uf as sk,Va as qC,Vb as Ih,Vd as _v,Vf as lk,Wa as ih,Wf as ik,X as yl,Xb as ec,Xc as mv,Xd as Av,Xe as Gv,Xh as qr,Ya as YC,Yc as hv,Yf as er,Z as vC,Za as dh,Zc as Ch,Zf as dk,Zh as Yr,_ as kC,_a as zn,_e as Tl,_h as gc,a as jd,ab as ch,ac as gh,ad as kh,af as jv,ag as ck,ah as zh,ai as Ok,b as Se,bb as fh,bc as oc,be as Jt,bf as Rh,bg as or,c as yo,ca as TC,cb as ph,cc as rv,cd as _a,ce as kl,cg as Nh,d as br,da as Vd,db as XC,dc as av,dd as jn,de as Eh,ea as PC,eb as ZC,ec as nv,ed as oo,ee as Rv,ef as ic,ei as _k,f as At,fa as qd,fb as JC,fc as bh,ff as Kv,fg as fk,g as gl,ga as EC,gb as uh,gc as sv,gd as Cl,gf as Vv,gi as Ak,ha as OC,hb as QC,hd as kr,he as ac,hf as qv,i as uC,ia as _C,ib as Jd,id as Kn,ie as Fv,if as dc,ja as Sl,jd as xv,je as Oh,jf as Yv,k as mC,ka as Sr,kb as Qd,kd as Iv,kf as Xv,ki as ue,la as AC,lh as bk,me as nc,mf as Zv,mh as yk,n as hC,na as q,nb as io,ne as Bv,nf as Fh,nh as Sk,oa as Yd,ob as ev,oe as _h,oi as Bk,pb as ov,pd as tc,pf as Jv,ph as wk,pi as Dk,qd as gv,qe as Dv,qf as Uo,qh as Ck,r as xC,ra as ft,rb as tv,rd as rc,re as sc,rf as Vr,rg as pk,rh as vk,ri as Cc,sa as wr,sc as lv,sd as Vn,sf as Qv,sg as Mh,si as Nk,t as Zt,ta as Wn,tb as mh,tc as yh,td as Th,te as Ue,tf as ek,tg as uk,th as kk,ti as Mk,ua as ah,ud as vl,ue as ve,uf as Qt,ug as Hh,va as LC,ve as Nv,vf as Jn,vg as mk,vh as es,w as j,wa as nh,we as qn,wg as hk,wh as Tk,x as $e,xa as sh,xd as bv,xe as Mv,xg as xk,xh as hc,y as IC,yc as K,yd as yv,ye as lc,yf as ok,yg as cc,yh as Pk,z as gC,zc as se,zd as Sv,ze as Aa,zf as Bh}from"./chunk-5VKKFDMK.js";import{c as Lk,d as bc,e as yc,i as Rk,j as pt,k as Sc,l as wc,m as Fk,q as Gh}from"./chunk-S63IHMZT.js";var Uk="en",vc=null,Wk=Uk,zk=null;function Kfe(e,o,t){vc=e??null,Wk=o||Uk,zk=t??null}function le(){return zk}function jh(){return Wk}function $k(){return vc}function Hk(e,o){return o?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,r)=>$e(o,r)?String(j(o,r)):t):e}function i(e,o){let t=vc?j(vc,e):void 0;if(typeof t=="function"){try{let r=Se(t(o??{}));if(r)return r}catch{}return Hk(e,o)}return Hk(Se(t)??e,o)}function Wo(e,o,t,r){return i(t===1?e:o,{...r,n:t})}import{jsx as Kh,Fragment as o3,jsxs as t3}from"react/jsx-runtime";import{createContext as r3,useContext as a3}from"react";var n3={mirrorHostStyles:!0,css:null,fontHrefs:[]},Gk=r3(n3);function Xfe({value:e,children:o}){return Kh(Gk.Provider,{value:e,children:o})}function Vh(){return a3(Gk)}function jk(){let{css:e,fontHrefs:o}=Vh();return t3(o3,{children:[o.map(t=>Kh("link",{rel:"stylesheet",href:t},t)),e?Kh("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as s3}from"react/jsx-runtime";import{createContext as l3,useContext as i3}from"react";var Kk=l3(void 0);function epe({metadata:e,children:o}){return s3(Kk.Provider,{value:e,children:o})}var Vk=()=>i3(Kk);import{jsx as To,Fragment as D5,jsxs as zd}from"react/jsx-runtime";import{useCallback as hl,useEffect as hr,useRef as bfe,useState as L5}from"react";import{SettingsSwitch as yfe}from"efficient-easel/panel";import{PagesIcon as Sfe,StylesIcon as wfe}from"efficient-easel/rail";import{PaletteIcon as Cfe}from"efficient-shell/icons/efficient";import{Subtree as vfe,TreeRow as N5}from"efficient-easel/tree";import{useEasel as M5}from"efficient-easel/easel";import{useEaselStrings as H5}from"efficient-easel/strings";import{createContext as d3,useContext as c3}from"react";var qh=d3(!1),rpe=()=>c3(qh);import{useMemo as f3,useRef as p3}from"react";import{useEaselApi as u3}from"efficient-easel/easel";import{useSectionOps as m3}from"efficient-easel/screen/lib/document/use-section-ops";function kc(){let e=u3(),o=m3(),t=p3(o);return t.current=o,f3(()=>({getItemById:r=>e.getState().getItemById(r),getSelectorForId:r=>e.getState().getSelectorForId(r),get components(){return e.getState().config.components},replace:(r,a,n)=>t.current.replaceComponent(r,a,n)}),[e])}import{encodePartId as i7}from"efficient-easel/draw";import{insertAt as d7,moveTo as c7,removeAt as f7}from"efficient-easel/fields";import{useSyncExternalStore as o7}from"react";import{isNodeList as Xh}from"efficient-easel/data";import{isNodeList as h3}from"efficient-easel/data";function ts(e,o){let t=null;return e.forEach((r,a)=>{let n=o(r,a);n!==r&&((t??=e.slice())[a]=n)}),t??e}function rs(e,o){let t=null;for(let[r,a]of Object.entries(e.props??{})){if(!h3(a))continue;let n=o(a,r);n!==a&&((t??={...e.props})[r]=n)}return t?{...e,props:t}:e}var qk="Flex";function as(e,o){return Jt(e)?typeof e?.[At]=="string"?Yh(o?.[At]):"":Yh(e?.[At])}var Yh=e=>typeof e=="string"?e.trim():"",x3=e=>e.type===Ft&&Array.isArray(e.props?.[Ph])&&e.props[Ph].some(o=>Yh(o?.[At])!==""),I3=new Intl.NumberFormat("en-US");function g3(e){return/^\d+$/.test(e)?I3.format(Number(e)):e}function hpe(e,o){let t=o?o.find(r=>r.key===e)?.value:xC(gl).find(r=>r.key===e)?.value;return t===void 0?null:g3(t)}var b3={[At]:"any"};function Zh(e,o=!1){let t=e.props;if(!t)return{node:e,names:!1};let r=e.type==="Text"&&(as(t)!==""||o&&as(t,b3)!==""),a=o||x3(e),n=rs(e,l=>ts(l,d=>{let c=Zh(d,a);return c.names&&(r=!0),c.node})).props;if(e.type!==qk)return{node:n===t?e:{...e,props:n},names:r};let s=Zt(n);if(r&&!s&&(n={...n,[yo]:gl}),!r&&s===gl){let{[yo]:l,...d}=n;n=d}return{node:n===t?e:{...e,props:n},names:!1}}function Yk(e,o,t){for(let r of e){if(r?.props?.id===o)return t;for(let a of Object.values(r?.props??{})){if(!Xh(a))continue;let n=Yk(a,o,r.type===qk?r:t);if(n!==void 0)return n}}}function xpe(e,o){if(!Xh(e))return!0;let t=Yk(e,o,null);if(t===void 0)return!0;if(t===null)return!1;let r=Zt(t.props);return!r||r===gl}function Xk(e){let o=e?.content;if(!Xh(o))return e;let t=o.map(r=>Zh(r));return t.every((r,a)=>r.node===o[a])?e:{...e,content:t.map(r=>r.node)}}function Zk(e){return Zh(e).node}import{jsx as k,jsxs as Lr,Fragment as Fr}from"react/jsx-runtime";import{cloneElement as sg,createContext as uj,useContext as lO,useEffect as mj,useId as iO,useRef as si,useState as li}from"react";import{useEasel as Gf,useSelectedHost as Ya}from"efficient-easel/easel";import{PIN_LENGTH as Uf,toDateKey as nwe,fromDateKey as swe}from"efficient-shell/format";function y3(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function zo(e){return typeof e=="string"?e:y3(e)?e.src:""}function gpe(e,o,t){return Jh(e,o.split("."),t)}function Jh(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 d=l[s];if(n){if(!Array.isArray(d))return e;let f=!1,u=d.map(p=>{let h=Jh(p,a,t);return h!==p&&(f=!0),h});return f?{...l,[s]:u}:e}let c=Jh(d,a,t);return c===d?e:{...l,[s]:c}}var S3=["upload","youtube"],w3="upload",Spe={upload:"Upload",youtube:"YouTube"},C3=["background","click"],v3="background",wpe={background:"Background",click:"Click to play"};function Qk(e){return S3.includes(e)?e:w3}function eT(e){return C3.includes(e)?e:v3}var Jk=/^[A-Za-z0-9_-]{11}$/,k3=/^(?:www\.|m\.|music\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.be)$/;function oT(e){let o=typeof e=="string"?e.trim():"";if(!o)return null;if(Jk.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:"||!k3.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&&Jk.test(a)?a:null}function Qh(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 tT(e){return`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`}function rT(e){return`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}var ex="Play video";var ox={frame:"Video frame",image:"Image"},Cpe={any:[{field:"loadingShows",is:"image"},{all:[{not:{field:"loadingShows",set:!0}},{field:"poster",set:!0}]}]};function Ol(e){let o=e.loadingShows;return o==="image"?"image":o!=null&&o!==""?"frame":zo(e.poster)?"image":"frame"}function vpe(e,o="desktop"){let[t,r]=o==="phone"?[e.posterPhone,e.videoFramePhone]:[e.poster,e.videoFrame],[a,n]=Ol(e)==="image"?[t,r]:[r,t];return zo(a)||zo(n)||void 0}function aT(e){if(zo(e.mediaVideo)){if(Ol(e)==="frame")return zo(e.videoFrame)?void 0:zo(e.poster)?"frame-missing-image":"frame-missing-surface";if(!zo(e.poster))return zo(e.videoFrame)?"image-missing-frame":"image-missing-surface"}}var Tc="videoFrames",tx="videoFramesNotOwn";function nT(e,o,t){let r=zo(e.mediaVideo);if(!r||!o||Ol(e)!=="frame"||zo(e.videoFrame))return;let a=o[r],n=!!zo(e.poster);if(a?.state==="ready")return null;if(n)return!a||a.state==="pending"?void 0:"image-no-frame";if(!a)return t?"save-makes-frame":void 0;switch(a.state){case"pending":return a.noted!=="save"&&t?"save-makes-frame":null;case"dark":return"starts-dark";case"outside":return"outside";case"unsupported":return"unsupported";case"failed":return"failed";default:return null}}function T3(e,o){let t=zo(e),r=t&&o?o[t]:void 0;return r?.state==="ready"&&r.frame?r.frame:void 0}function kpe(e,o,t){let r=t?.[tx];if(!(Array.isArray(r)&&r.includes(e)))return T3(o,t?.[Tc])}import{useSyncExternalStore as P3}from"react";function Pc(){let e=new Map,o=new Set,t=r=>(o.add(r),()=>{o.delete(r)});return{get:r=>e.get(r),has:r=>e.has(r),set(r,a){if(!(e.has(r)&&e.get(r)===a)){e.set(r,a);for(let n of o)n()}},use(r){let a=()=>r?e.get(r):void 0;return P3(t,a,a)}}}var Ye="SiteHeader",We="SiteFooter",rx="sections",Ope=[Ye,We],ns=e=>e===Ye||e===We,sT=e=>`${e}:${rx}`;function lT(e,o,t=[]){return{type:e,props:{id:o,[rx]:t}}}var E3=new Set(["Footer",Ye,We]);function ss(e){let o=new Set,t=!1,r=e.filter(a=>{let n=a?.type??"";return n==="Header"?(t=!0,!1):E3.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===Ye?[o,...e]:[...e,o]}var iT={[Ye]:{max:3,takes:["Flex","Ticker"]},[We]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function dT(e,o,t){if(!ns(e))return!0;let r=iT[e];return t<r.max&&r.takes.includes(o)}function cT(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(!ns(n?.type))continue;let s=n.props?.[rx];if(!Array.isArray(s)||!s.some(d=>d?.props?.id===r))continue;let l=iT[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{locateNode as O3}from"efficient-easel/draw";function _l(e){if(!e)return null;let o=e.lastIndexOf(":");return o>0?{ownerId:e.slice(0,o),slot:e.slice(o+1)}:null}function Oc(e,o,t){let r=_l(t?.zone),a=r?O3(e,o,r.ownerId):null;return a&&r?{...a,slot:r.slot}:null}import{isNode as _3}from"efficient-easel/data";var fT="Footer",pT=[Ye,fT,We],Ra=e=>{let o=e?.content;return Array.isArray(o)?o:[]},Xr=e=>{let o=e?.zones;return o&&typeof o=="object"&&!Array.isArray(o)?o:null},ls=e=>{let o=e?.props?.id;return typeof o=="string"?o:void 0},uT=e=>_l(e)?.ownerId??"";function mT(e){let o=ss(Ra(e)),t=o.some(r=>r?.type===We);return o.filter(r=>r?.type===Ye||r?.type===We||r?.type===fT&&!t)}function _c(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(_3(a)){let n=ls(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(uT(s))||(n.add(s),r(l),a=!0)}}return t}function hT(e,o){let t=Ra(e).filter(r=>{let a=ls(r);return typeof r?.type=="string"&&pT.includes(r.type)||a!==void 0&&o(a)});return t.length?_c(t,Xr(e)):new Set}function ax(e,o){let t={},r={};for(let[a,n]of Object.entries(e??{}))(o.has(uT(a))?t:r)[a]=n;return{owned:t,rest:r}}function xT(e,o){if(!o)return e;let t=mT(o);if(!t.length)return e;let r=t.filter(l=>l.type===Ye),a=t.filter(l=>l.type!==Ye),n={...e,content:[...r,...Ra(e),...a]},{owned:s}=ax(Xr(o),_c(t,Xr(o)));return Object.keys(s).length&&(n.zones={...Xr(e)??{},...s}),n}function nx(e,o){if(!o)return{page:e,chrome:null};let t=mT(o),r=new Set(t.map(ls).filter(T=>!!T)),a=[],n=[];for(let T of Ra(e)){let y=ls(T);y&&r.has(y)||ns(T?.type)?n.push(T):a.push(T)}let s=new Map(n.map(T=>[ls(T),T])),l=new Set,d=ss(Ra(o)).flatMap(T=>{let y=ls(T);if(!y||!r.has(y))return[T];let b=s.get(y);return b?(l.add(b),[b]):[]});for(let T of n)l.has(T)||d.some(y=>y?.type===T.type)||(d=T.type===Ye?[T,...d]:[...d,T]);d=ss(d);let c=d.length===Ra(o).length&&d.every((T,y)=>T===Ra(o)[y]),f=Xr(e),u=_c(d,f),{owned:p,rest:h}=ax(f,u),I=ax(Xr(o),_c(t,Xr(o))).owned,g={...o,content:c?o.content:[...d]},C=Xr(o);if(C||Object.keys(p).length){let T={};for(let[y,b]of Object.entries(C??{}))y in I?y in p&&(T[y]=p[y]):T[y]=b;for(let[y,b]of Object.entries(p))y in T||(T[y]=b);g.zones=T,C&&A3(g.zones,C)&&(g.zones=C)}let w={...e,content:a};return f&&(Object.keys(h).length||!Object.keys(I).length?w.zones=h:delete w.zones),{page:w,chrome:g}}function A3(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 IT(e,o){return t=>e(t)||t!==void 0&&pT.includes(t)&&o()}var gT=null;function sx(e){gT=e}function Bt(){return gT}var bT=null;function lx(e){bT=e}function Ac(){return bT}var ix=Pc();function yT(e,o,t){if(!o)return;let r={...ix.get(e)};for(let[a,n]of Object.entries(o))r[a]={...n,noted:t};ix.set(e,r)}function ST(e,o){yT(e,o,"load")}function wT(e,o){yT(e,o,"save")}function Lc(e){return ix.use(e)}var dx=e=>!!Bt()?.sectionOf(e);function CT(e,o=dx){return hT(e,o)}function vT(e,o,t,r=dx){if(t)return e&&CT(o,r).has(e)?void 0:t}function kT(e,o,t=dx){if(!e)return{};let r=[...CT(o,t)];return r.length?{[Tc]:e,[tx]:r}:{[Tc]:e}}import{ScreenDocumentContext as hj}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as la,hidableText as xj}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as dO,LINK_FIELD_MARKER as Ij,MEDIA_FIELD_MARKER as gj,SCAFFOLD_FIELD_MARKER as bj,TEXT_FIELD_MARKER as Rr,foldMetaOf as ia,textFieldIdentifier as mwe}from"efficient-easel/draw";import{jsx as LT}from"react/jsx-runtime";import{useCallback as D3}from"react";import{useEasel as N3}from"efficient-easel/easel";import{SettingsAction as M3}from"efficient-easel/panel";import{isLengthUnit as F3}from"efficient-easel/screen/lib/content/length-units";import{CORNER_SIDES as Rc,hasCornerSubset as Al,normalizeCornerSides as tr}from"efficient-easel/screen/lib/content/style-keys";import{isLengthUnit as L3}from"efficient-easel/screen/lib/content/length-units";var Ll={kind:"radius",unitKey:"sectionCornersUnit"};function cx(e){return typeof e=="number"&&Number.isFinite(e)}function Kpe(e,o,t){if(!cx(e))return;let r=L3(t)&&t!=="px"?Jn(e,t):Jn(Qt(e));if(Object.keys(r).length===0)return;let a=r[fx];if(typeof a!="string")return r;let n=Al(o)?Fa(a,tr(o)??[]):a;return{...r,[R3]:n}}var R3="--sf-section-radius",fx="--sf-card-radius";function Fa(e,o){return Rc.map(t=>o.includes(t)?e:"0").join(" ")}var TT=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var Rl={kind:"radius",unitKey:"cardCornersUnit"},B3="--sf-card-box-radius";function px(e){return typeof e=="number"&&Number.isFinite(e)}function Zpe(e,o,t){if(!px(e))return;let r=(F3(t)&&t!=="px"?Jn(e,t):Jn(Qt(e)))[fx];if(typeof r!="string")return;let a=Al(o)?Fa(r,tr(o)??[]):r;return{[B3]:a}}function PT(e,o){let t=e.find(s=>s?.props?.id===o);if(!t)return[...e];let r=t.props?.cardCorners,a=t.props?.cardCornerSides,n=t.props?.[Rl.unitKey];return e.map(s=>s?.props?.id===o?s:{...s,props:{...s.props,cardCorners:r,cardCornerSides:a,[Rl.unitKey]:n}})}function ET(e,o,t){let r=Oc(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,d=l?.props?.id?String(l.props.id):"",c=Math.max(n.length-1,0);return!r||!d?{can:!1,reason:"unreachable",others:0}:n.length<=1?{can:!1,reason:"alone",others:c}:px(l?.props?.cardCorners)?{can:!0,others:c,zone:r.zone,index:r.index,data:{...r.item,props:{...r.item.props,[a]:PT(n,d)}}}:{can:!1,reason:"unset",others:c}}function OT(e){return e.can?Wo("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 _T(e){return Wo("Applied to {n} card","Applied to {n} cards",e)}function AT(e,o){e.can&&o(e.zone,e.index,e.data)}import{useSectionOps as H3}from"efficient-easel/screen/lib/document/use-section-ops";var U3="apply-corners-to-siblings",W3="Apply to all cards";function z3({plan:e,onPress:o}){return LT(M3,{id:U3,label:i(W3),note:OT(e),disabled:!e.can,doneLabel:_T(e.others),onPress:o})}function RT(){let{appState:e,config:o}=N3(n=>n),t=H3(),r=ET(o,e.data.content??[],e.ui.itemSelector),a=D3(()=>{AT(r,t.replaceComponent)},[r,t]);return LT(z3,{plan:r,onPress:a})}import{isShown as $T,lazyShowWhenContext as o6}from"efficient-shell/format";var Zr="product",Fc="recordType",FT={key:Zr,label:"Product",fields:[]},$3=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,G3=/^[a-z][A-Za-z0-9]*$/,j3=["text","date","images"],ux=new Map,BT=0;function K3(e){if(typeof e.key!="string"||!$3.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===Zr)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"||!G3.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(!j3.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 fue(e){let o=e.map(K3);for(let t of o)ux.set(t.key,t);o.length&&(BT+=1)}function mx(){return[FT,...ux.values()]}function V3(e){return e===Zr?FT:ux.get(e)??null}function hx(){return BT}function Fl(e){let o=e?.[Fc];return typeof o!="string"?Zr:o.trim()||Zr}function xx(e){return Fl(e)===Zr}function pue(e,o){let t=V3(e)?.fields??[];return o?t.filter(r=>o.includes(r.kind)):t}var Bc="product",DT="tyre",q3=[Bc,DT];function hue(e){return q3.includes(e)}var Y3="productType",X3={[Bc]:"alloy-wheel",[DT]:"tyre"},Z3=["alloy-wheel","tyre"];function NT(e,o){return xx(o)?MT(o)??X3[e]??null:null}function MT(e){if(!xx(e))return null;let o=e?.[Y3];return typeof o=="string"&&Z3.includes(o)?o:null}function xue(e){let o=e?.root;return MT(o?.props)}var Ix="Main Pages",J3="Dynamic Pages",gx="dynamic",Q3="dynamic";function Ba(e){return e.kind===Q3}var bx="lightbox";function HT(e){return e.kind===bx}function UT(e){let o=[],t=[];for(let r of e){if(Ba(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??Ix,rows:[r]})}if(t.length){let r=o.findIndex(a=>a.key.startsWith("system:"));o.splice(r===-1?o.length:r,0,{key:gx,label:J3,rows:t})}return o}var Dc=null,WT=null;function e6(e,o){Dc=e,WT=o}function wue(e){e6(e,null)}function Cue(){return Dc}function Bl(){return Ba({kind:WT})||Dc===Bc}function vue(e){return NT(Dc??"",e)??"alloy-wheel"}function kue(e){return Bl()?Fl(e):null}function yx(e,o,t){let r=!1,a={};for(let[n,s]of Object.entries(e)){if(!$T(vh(s),o??{},t)){r=!0;continue}let l=t6(s,o?.[n],o??{},t);l!==s&&(r=!0),a[n]=l}return r?a:e}function t6(e,o,t,r){let a=e?.options;if(!Array.isArray(a))return e;let n=a.filter(s=>s?.value===o||!s?.showWhen||$T(s.showWhen,t,r));return n.length===a.length?e:{...e,options:n}}function GT(e,o,t,r){let a=Oc(o,t,r);return{device:e,parentType:a?.item.type,parent:a?.item.props}}function zT(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 zT(t.not,o);for(let r of[t.all,t.any])if(Array.isArray(r)&&r.some(a=>zT(a,o)))return!0;return!1}function Rue(e,o={}){return o6({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>Bl(),root:()=>e.appState?.data?.root?.props,...o})}import{isLengthUnit as r6}from"efficient-easel/screen/lib/content/length-units";var jT=1,a6="cardImageUnit",Sx={kind:"radius",unitKey:a6},KT={kind:"radius"};function n6(e){return Qt(e)}function Hue(e,o){if(r6(o)&&o!=="px"){let r=q(e);return r!==void 0&&r>=0?{"--sf-card-image-radius":Ue(r,o)}:{}}let t=n6(e);return t===null?{}:{"--sf-card-image-radius":`${t}px`}}import{isLengthUnit as s6}from"efficient-easel/screen/lib/content/length-units";var VT={kind:"radius",unitKey:"cornersUnit"},qT=1,YT="Corners";function l6(e){return Qt(e)}function Kue(e,o,t){let r=s6(t)&&t!=="px"?q(e):void 0,a=r===void 0?l6(e):null;if(r===void 0&&a===null)return null;let n=r!==void 0?Ue(Math.max(0,r),t):`${a}px`;return{borderRadius:Al(o)?Fa(n,tr(o)??[]):n}}var ZT=12,is=6,i6=800,Nc={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]},twoThenThrees:{label:"Two, then threes",across:3,acrossPhone:3,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],leadPhone:[[3,1],[3,1]],phone:[[2,1],[2,1],[2,1]]},twoThenThreesPhoto:{label:"Two, then threes \xB7 photo",across:3,acrossPhone:1,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],phone:[[6,1]],ratio:"landscape"}},JT=["phone","acrossPhone","leadPhone"];var d6=new Set(JT),Dl=Object.fromEntries(Object.entries(Nc).map(([e,o])=>[e,Object.fromEntries(Object.entries(o).filter(([t])=>!d6.has(t)))])),wx=Object.keys(Nc),QT=[2,3,4,6];function Cx(e,o){return wx.filter(t=>t===o||e===null||Dl[t].across===e)}function eP(e){let o=e.layout;return typeof o=="string"&&$e(Nc,o)?o:null}function vx(e){let o=eP(e);return o?c6(o,e.layoutPhone):null}var Mc={oneAcross:{label:"One across",phone:[[is,2]],acrossPhone:1}};function oP(e){return typeof e=="string"&&$e(Mc,e)?e:null}function XT(e,o){return o?is/e.acrossPhone:ZT/e.across}function kx(e){return e.ratio?Ik.find(o=>o.shape===e.ratio)?.ratio??null:null}function tP(e){return[...e.lead??[],...e.desktop]}function c6(e,o){let t=Nc[e],r=oP(o);if(!r)return t;let{phone:a,acrossPhone:n}=Mc[r],s=Object.fromEntries(JT.map(l=>[l,void 0]));return{...t,...s,phone:a,acrossPhone:n}}var f6="sf-wall--";function p6(e){let o=eP(e);if(!o)return"";let t=oP(e.layoutPhone);return`${f6}${o}${t?`--${t}`:""}`}function Xue(e){let o=vx(e);if(!o)return"";let t=`.${p6(e)}`,r=[],a=(l,d,c)=>`${t}:has(> :nth-child(${l}n+${d+c}):last-child) > :nth-last-child(-n+${c})`,n=(l,d,c=[])=>{let f=[],u=l.length,p=c.length;c.forEach(([h,I],g)=>{f.push(`${t} > :nth-child(${g+1}){grid-column:span ${h};grid-row:span ${I}}`)}),l.forEach(([h,I],g)=>{f.push(`${t} > :nth-child(${u}n+${p+g+1}){grid-column:span ${h};grid-row:span ${I}}`)});for(let h=1;h<u;h+=1)f.push(`${a(u,p,h)}{grid-column:span ${d};grid-row:span 1}`);return f};r.push(`${t}{grid-template-columns:repeat(${ZT},minmax(0,1fr))}`);let s=kx(o);if(s&&(r.push(`${t}${t}{grid-auto-rows:auto}`),r.push(`${t}${t} > *{aspect-ratio:${s[0]}/${s[1]};height:auto}`)),r.push(...n(o.desktop,XT(o,!1),o.lead)),r.push(`@media (max-width:${i6}px){`),r.push(`${t}{grid-template-columns:repeat(${is},minmax(0,1fr))}`),r.push(...n(o.phone,XT(o,!0),o.leadPhone)),o.phone.length===1&&!o.leadPhone?.length){let[l,d]=o.phone[0],c=o.lead?.length??0;for(let f=1;f<o.desktop.length;f+=1)r.push(`${a(o.desktop.length,c,f)}{grid-column:span ${l};grid-row:span ${d}}`)}return r.push("}"),r.join("")}var Hc=12,rP=1,u6=3;var m6=3;function Uc(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 h6(e){return Uc(e,1,Hc)??m6}function Que(e,o){return Uc(e,rP,u6)??(h6(o)===4?2:rP)}function eme(e){return e==null||e===""?null:Uc(e,1,Hc)}var ome="data-sf-span",Tx=4;function tme(e){return e==null||e===""?null:Uc(e,1,Tx)}var rme="data-sf-row-span",Jr=["gridSpan","gridRowSpan"];function ame(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if(vx(e.props??{}))return!1;let o=e.props?.columns;return o!=null&&o!==""}return!1}import{jsx as x6}from"react/jsx-runtime";import*as I6 from"efficient-easel/icons";function Wc(e){let o=e.replace(/(^|-)([a-z])/g,(r,a,n)=>n.toUpperCase()),t=I6[`${o}Icon`];return t?x6(t,{size:16}):null}import{jsx as Qr,Fragment as y6,jsxs as fP}from"react/jsx-runtime";import{useContext as S6,useEffect as w6,useId as C6,useState as pP}from"react";import{SettingsField as v6,SettingsSwitch as k6}from"efficient-easel/panel";import{AnchorIcon as T6}from"efficient-easel/icons";import{ScreenDocumentContext as P6}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as E6}from"efficient-shell/ui";import{slugify as O6}from"efficient-shell/format";import{slugify as g6}from"efficient-shell/format";function Nl(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}var zc=e=>g6(Nl(e));var $c="homepage";import{slugify as b6}from"efficient-shell/format";var aP=[{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 nP(e){return e.offersCommerce&&e.offersService?aP:aP.filter(o=>!o.needs||(o.needs==="commerce"?e.offersCommerce:e.offersService))}var Px="#popup:";function sP(e){return`${Px}${e}`}function lP(e){return e.startsWith(Px)&&e.slice(Px.length).trim()||null}function Ml(e){return e===$c?"/":`/${e}`}function iP(e){return`/journal/${e}`}function mme(e){return`/wheels/${e}`}function Gc(e,o){return`${Ml(e)}#${o}`}function dP(...e){let o=new Set,t=[];for(let r of e)for(let a of r?.content??[]){let n=Nl(a?.props?.anchor);if(!n)continue;let s=b6(n);!s||o.has(s)||(o.add(s),t.push({slug:s,name:n}))}return t}function hme(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 cP(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as _6}from"efficient-easel/draw";function uP({value:e,onChange:o,nameBox:t}){let r=_6(e).text,[a,n]=pP(!1),s=a||r.trim()!=="",l=C6();return fP(y6,{children:[Qr(v6,{label:i("Add an anchor"),labelId:l,icon:Qr(T6,{}),action:Qr(k6,{checked:s,ariaLabelledBy:l,onChange:d=>{n(d),!d&&r!==""&&o("")}})}),s&&t(e,o),s&&Qr(A6,{name:r})]})}function A6({name:e}){let o=S6(P6),t=o?.templateId?"":o?.currentSlug??"",[r,a]=pP("");w6(()=>a(bc()),[]);let n=O6(e);if(!n||!t)return null;let s=`${r}${Gc(t,n)}`,l=s.replace(/^https?:\/\//,""),d=l.lastIndexOf("#");return Qr("div",{className:"sf-anchor-link",children:Qr(E6,{value:s,label:i("link"),size:"sm",children:fP("span",{className:"sf-anchor-link-text",children:[Qr("span",{className:"sf-anchor-link-path",children:l.slice(0,d)}),Qr("span",{className:"sf-anchor-link-hash",children:l.slice(d)})]})})})}import{jsx as rr,jsxs as L6}from"react/jsx-runtime";import{Fragment as R6}from"react";import{Button as jc,Tooltip as F6}from"efficient-shell/ui";function mP({status:e,statusText:o,onRefresh:t,busy:r=!1,edit:a,hint:n,spaced:s=!0,compact:l=!1,oneLine:d=!1}){return l?rr("div",{className:`sf-blogsource sf-blogsource--compact${d?" sf-blogsource--line":""}`,style:s?{marginTop:8}:void 0,children:rr(F6,{content:n,className:d?"sf-name-tip":void 0,children:rr("p",{className:"sf-blogsource-status","data-state":e,children:[o?rr(R6,{children:o},"status"):null,t?rr(jc,{variant:"link",size:"sm",className:"sf-blogsource-link",onClick:t,disabled:r,children:i("Refresh now")},"refresh"):null,a?rr(jc,{variant:"link",size:"sm",className:"sf-blogsource-link",onClick:a.onClick,children:a.label},"edit"):null].filter(Boolean).flatMap((c,f)=>f?[" \xB7 ",c]:[c])})})}):L6("div",{className:"sf-blogsource",style:s?{marginTop:9}:void 0,children:[rr("p",{className:"sf-blogsource-status","data-state":e,children:o}),t?rr(jc,{variant:"secondary",className:"sf-blogsource-action",onClick:t,disabled:r,children:i("Refresh now")}):null,a?rr(jc,{variant:"secondary",className:"sf-blogsource-action",onClick:a.onClick,children:a.label}):null,rr("p",{className:"es-field-hint",children:n})]})}import{AdjustIcon as yj,EyeIcon as Sj,AnimationIcon as wj,BackgroundIcon as YE,BorderAllIcon as Cj,BlockSectionIcon as vj,ColumnWidthsIcon as lg,ColumnsIcon as cO,CornerIcon as fO,DirectionDownIcon as kj,DirectionLeftIcon as Tj,DirectionRightIcon as Pj,DirectionUpIcon as Ej,EditIcon as Oj,GapIcon as _j,GridIcon as pO,GroundIcon as rg,HashIcon as Aj,HeightIcon as ig,ImageIcon as Lj,ListIcon as Rj,LocationIcon as XE,PaddingBottomIcon as uO,PaddingLeftIcon as mO,PaddingRightIcon as hO,PaddingTopIcon as dg,PageIcon as Fj,StickyIcon as xO,SearchIcon as Bj,SquareIcon as Dj,TypeIcon as Nj,WidthIcon as Mj}from"efficient-easel/icons";import{jsx as Je,Fragment as Da,jsxs as Na}from"react/jsx-runtime";import{CaptionIcon as B6,DateIcon as D6,FlagIcon as N6,TitleIcon as M6,ButtonIcon as H6,DollarIcon as U6,HashIcon as W6,LinkIcon as z6,NoteIcon as $6,TagIcon as G6,TextLinesIcon as j6}from"efficient-easel/icons";var hP={body:j6,button:H6,link:z6,label:G6,number:W6,price:U6,note:$6,name:N6,date:D6,caption:B6,title:M6},xP={eyebrow:Na(Da,{children:[Je("path",{d:"M5 6.5h5"}),Je("path",{d:"M5 12.5h14"}),Je("path",{d:"M5 18h11"})]}),heading:Na(Da,{children:[Je("path",{d:"M6.5 5v14"}),Je("path",{d:"M17.5 5v14"}),Je("path",{d:"M6.5 12h11"})]}),intro:Na(Da,{children:[Je("path",{d:"M4 5.5v13"}),Je("path",{d:"M8 7.5h12"}),Je("path",{d:"M8 12h12"}),Je("path",{d:"M8 16.5h8"})]}),value:Na(Da,{children:[Je("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),Je("path",{d:"M6.5 12h7"})]}),quote:Na(Da,{children:[Je("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),Je("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:Na(Da,{children:[Je("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),Je("path",{d:"M8 9.5h8"}),Je("path",{d:"M12 9.5v5"})]}),meta:Na(Da,{children:[Je("path",{d:"M4 7h16"}),Je("path",{d:"M4 14h3.5"}),Je("path",{d:"M10.5 14h3"}),Je("path",{d:"M17 14h3"})]})};function Ex({noun:e,size:o=14,strokeWidth:t=1.8,className:r,style:a}){let n=hP[e];return n?Je("span",{className:r,style:{display:"inline-flex",...a},"aria-hidden":"true",children:Je(n,{size:o})}):Je("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:xP[e]})}var Dme=Object.keys(hP);var Nme=Object.keys(xP);import{parseHexColor as Q6}from"efficient-shell/format";import{parseHexColor as SP}from"efficient-shell/format";import{COLOR_SLOTS as wP,FILL_COLOR_SLOTS as X6,colorRole as Z6,fillColorRole as CP}from"efficient-shell/markup";import{parseHexColor as IP}from"efficient-shell/format";import{FILL_COLOR_SLOTS as K6}from"efficient-shell/markup";var Kc=e=>{let o=sk.find(t=>t.role===e);return o?`var(${o.token})`:""},V6=e=>Kc(e)?`var(--theme-${e})`:"",q6={main:{ink:Pa.accent,page:Pa.accent,key:"accent",label:()=>i("Main"),words:e=>i("Theme {n} main color",{n:e})},text:{ink:Pa.text,page:Pa.text,key:"text",label:()=>i("Text"),words:e=>i("Theme {n} text color",{n:e})},background:{ink:Kc("bg"),page:V6("bg"),key:"background",label:()=>i("Background"),words:e=>i("Theme {n} background",{n:e})},muted:{ink:Pa.labels,page:Pa.labels,key:"muted",label:()=>i("Muted"),words:e=>i("Theme {n} muted color",{n:e})},surface:{ink:Kc("surface"),page:Kc("surface"),key:"surface",label:()=>i("Surface"),words:e=>i("Theme {n} surface color",{n:e})}};function ea(e){return j(q6,e)}var Ox="#9ca3af";function ds(e,o,t){let r=ea(e);return r?{hex:IP(o[r.key]??"")??"",words:r.words(t)}:null}function gP(e,o){return K6.flatMap(t=>{let r=ds(t,e,o);return r&&ea(t)?.ink?[{name:t,label:r.words,value:r.hex||Ox}]:[]})}var Y6=["main","text","background"];function bP(e){let o=new Set,t=[];return xo(e).themes.forEach((r,a)=>{for(let n of Y6){let s=ea(n),l=s?r[s.key]:void 0,d=typeof l=="string"&&l?IP(l):null;!s||!d||o.has(d)||(o.add(d),t.push({value:d,label:s.words(a+1)}))}}),t}function Pr(e){return ea(e)?.ink??""}function ar(e){if(typeof e!="string")return null;let o=CP(e.trim());return o?.kind==="slot"&&Pr(o.slot)?o.slot:null}var J6={accent:"main",labels:"muted"};function rt(e){return j(J6,e)??e}function cs(e){if(!e)return"";if(e.startsWith("#"))return SP(e)===e.toLowerCase()?e:"";let o=Z6(rt(e));return o?.kind==="slot"?Pr(o.slot):""}function fs(e,o=wP){return o.flatMap(t=>{let r=ea(t);return r?.ink?[{name:t,label:r.label(),value:e?.[t]||Ox}]:[]})}function vP(e){let o=CP(rt(e));return o?.kind==="slot"?Pr(o.slot):""}function _x(e){let o=e?.trim();return o?X6.find(t=>Pr(t)===o)??null:null}function kP(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 wP){let l=Pr(s);if(!l)continue;let d=l.replace(/^var\((--[\w-]+)\)$/,"$1"),c=a.getPropertyValue(d).trim();if(!c)continue;let f=yP(c);!f&&n&&(n.fillStyle="#000000",n.fillStyle=c,f=yP(String(n.fillStyle))),f&&(o[s]=f)}return o}function yP(e){let o=e.trim().toLowerCase();if(o.startsWith("#"))return SP(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 eU="#ffffff";function Ax(e){return TP(e)||(oU(e)?e:eU)}function TP(e){let o=ar(e);return o?ea(o)?.page??"":""}function oU(e){return typeof e=="string"&&Q6(e)===e.toLowerCase()||TP(e)!==""}function ohe(e){return{"--bg":Ax(e)}}import{parseHexColor as tU}from"efficient-shell/format";import{fillColorRole as rU}from"efficient-shell/markup";function Ma(e,o,t,r){let a=r??t??o,n=t!==null&&t!==o,s=a!==null&&a!==o;return{className:[n?e.tabletClass:"",s?e.phoneClass:""].filter(Boolean).join(" "),style:{...n?{[e.tabletVar]:t}:{},...s?{[e.phoneVar]:a}:{}}}}var fhe="sf-card",phe="[--sf-card-lift:none] [--sf-card-shadow-hover:var(--sf-card-shadow,none)]",oa={min:0,max:100,step:5,fallback:0,unit:"%"},aU=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],nU="68%",uhe={desktop:20,phone:20,side:40,sidePhone:24},mhe="sf-box-sides";function Rx(e){return typeof e=="string"&&e.trim()!==""}function hhe(e){return Rx(typeof e?.bgImage=="string"?e.bgImage:null)||Vc(e)}function Vc(e){return Jt(e,Jd)!==""}function xhe(e,o){return o||!Vc(e)?e:{...e,[Jd]:""}}function Ihe(e,o){return Oh(o,Jt(e,Jd))?.trim()||null}function PP(e,o){let t=typeof e=="number"?e:Number.parseFloat(String(e??""));if(!Number.isFinite(t)||t<=0)return null;let r=(Math.min(oa.max,Math.max(oa.min,t))/100).toFixed(2);return o!=="bottom"?{background:cc(Number(r))}:{background:`linear-gradient(0deg, ${cc(Number(r))} 0%, ${cc(0)} ${nU})`}}var qc=[{label:"Flat",value:"",hint:"One colour from top to bottom"},{label:"Fade",value:"down",hint:"The colour fades into the page colour at the bottom"}],EP="fillFade",Lx=qc[1].value,Yc=e=>e===Lx?Lx:qc[0].value,sU=[{mix:"12%",at:"50%"},{mix:"19%",at:"70%"},{mix:"50%",at:"95%"}];function ghe(e){return Yc(e)!==Lx?null:{backgroundImage:`linear-gradient(to bottom, transparent, ${sU.map(o=>`color-mix(in srgb, var(--bg) ${o.mix}, transparent) ${o.at}`).join(", ")})`}}var Xc=e=>typeof e=="string"?tU(e.trim()):null,Hl=e=>{let o=Xc(e);if(o!==null||typeof e!="string")return o;let t=e.trim();return t&&!t.startsWith("#")&&vP(t)||null},Zc=e=>{if(typeof e!="string")return null;let o=rU(rt(e.trim()));return o?.kind==="slot"?o.slot:null},Fx="swatch";function bhe(e,o){if(!o)return null;let t=Oh(o,Jt(e,Fx)),r=ar(t);return Xc(t)??(r&&Pr(r)||null)}var lU={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function yhe(e,o,t){return Ma(lU,Hl(e),Hl(o),Hl(t))}var iU={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function She(e){let o=PP(e.darken,e.darkenStyle);if(!o)return{className:"",style:{}};let t=(u,p)=>String(PP(u,p)?.background??"none"),r=u=>(typeof u=="number"||typeof u=="string"&&u.trim()!=="")&&Number.isFinite(Number(u))?u:void 0,a=u=>aU.some(p=>p.value===u)?u:void 0,[n,s,l,d]=[r(e.darkenTablet),a(e.darkenStyleTablet),r(e.darkenPhone),a(e.darkenStylePhone)],c=n??e.darken,f=s??e.darkenStyle;return Ma(iU,String(o.background),n!==void 0||s!==void 0?t(c,f):null,l!==void 0||d!==void 0?t(l??c,d??f):null)}function whe(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"},d={start:"items-start",center:"items-center",end:"items-end"};return`${l[n]} ${d[s]}`}function OP(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(Bx(r,o,0))return{type:typeof a=="string"?a:"",props:n??{}}}return null}function Bx(e,o,t){if(t>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>Bx(a,o,t+1));let r=e.props;return r&&typeof r=="object"&&r.id===o?!0:Object.values(e).some(a=>Bx(a,o,t+1))}function _P(e,o){let t=e?.content;return Array.isArray(t)?Jc(t,o,0)??[]:[]}function Jc(e,o,t){if(t>12||!e||typeof e!="object")return null;if(Array.isArray(e)){for(let a of e){let n=Jc(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=Jc(a,o,t+1);if(n)return[r,...n]}return null}for(let a of Object.values(e)){let n=Jc(a,o,t+1);if(n)return n}return null}import{SettingsDefaultReset as Ho,SettingsDrill as Hj,SettingsField as mo,SettingsGroup as Uj,SettingsSegmented as Wj,SettingsBorder as zj,SettingsSidesEach as $j,SettingsSwitch as cg,borderSides as Gj,borderStartEach as jj}from"efficient-easel/panel";import{ListField as Kj}from"efficient-easel/fields";import{DisplayChips as Vj}from"efficient-shell/ui";import{HIDDEN_KEY as dU,hiddenInEveryView as cU,hiddenInView as Dx,hiddenKeyOf as AP}from"efficient-easel/screen/lib/content/view-hide";var fU={"000":"",100:"view-desktop:hidden","010":"view-wide:max-view-desktop:hidden","001":"max-view-wide:hidden",110:"view-wide:hidden","011":"max-view-desktop:hidden",101:"view-desktop:hidden max-view-wide:hidden",111:"hidden"},pU={"000":"",100:"view-desktop:hidden","010":"view-tablet:max-view-desktop:hidden","001":"max-view-tablet:hidden",110:"view-tablet:hidden","011":"max-view-desktop:hidden",101:"view-desktop:hidden max-view-tablet:hidden",111:"hidden"},LP=e=>(e.desktop?"1":"0")+(e.tablet?"1":"0")+(e.mobile?"1":"0");function Qc(e,{atSectionLine:o=!1}={}){return(o?pU:fU)[LP(e)]}var ps=[dU,AP("tablet"),AP("mobile")];function RP(e){return{desktop:Dx(e,"desktop"),tablet:Dx(e,"tablet"),mobile:Dx(e,"mobile")}}function Ul(e){return cU(e)}function The(e){let o=RP(e);return["desktop","tablet","mobile"].filter(t=>o[t]).join(" ")}var uU={"000":"",100:"view-desktop:hidden!","010":"view-wide:max-view-desktop:hidden!","001":"max-view-wide:hidden!",110:"view-wide:hidden!","011":"max-view-desktop:hidden!",101:"view-desktop:hidden! max-view-wide:hidden!",111:"hidden!"},mU={"000":"",100:"view-desktop:hidden!","010":"view-tablet:max-view-desktop:hidden!","001":"max-view-tablet:hidden!",110:"view-tablet:hidden!","011":"max-view-desktop:hidden!",101:"view-desktop:hidden! max-view-tablet:hidden!",111:"hidden!"};function Phe(e,{atSectionLine:o=!1}={}){return(o?mU:uU)[LP(RP(e))]}function us(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 ef(e,o){return us(e)[o]!==!1}function Nx(e,o,t){let r=us(o)[t];return typeof r=="boolean"?r:ef(e,t)}function FP(e){return Object.values(us(e)).some(o=>o===!1)}function BP(e){return Object.keys(us(e)).length>0}function DP(e,o,t){let r={...us(e)};return t?delete r[o]:r[o]=!1,Object.keys(r).length?r:void 0}function NP(e,o,t){return{...us(e),[o]:t}}function _he(e,o,t,{atSectionLine:r=!0}={}){let a=!ef(e,t);return Qc({desktop:a,tablet:a,mobile:!Nx(e,o,t)},{atSectionLine:r})}import{ColorSwatch as qj,CornersInput as Yj,DatePicker as Nwe,DateTimePicker as Xj,FOCAL_DEFAULT as Mwe,IconPicker as IO,COLUMN_COUNT_MAX as ZE,COLUMN_SHARE_MIN as Zj,COLUMN_SHARES_EQUAL as Jj,resolveColumnShares as gO,WidthsBar as Qj,useShellStrings as eK,IconButton as bO,InputNumber as JE,Slider as oK,Tooltip as fg}from"efficient-shell/ui";import{backendOf as hU}from"efficient-easel/screen/lib/session";var to=hU,of=e=>e.blocks;async function MP(e){let o=e.trim();if(!o)return null;let t=to().geocode;if(!t)throw new Error("geocode_unavailable");return t.locate(o)}var Mx="Lookup busy \u2014 try again in a moment.",tf=e=>typeof e=="number"&&Number.isFinite(e);function Nhe(e){return e.some(o=>{let t=o?.geocode;return t?t.pending||t.manual&&t.lat===void 0&&t.lng===void 0?!0:tf(t.lat)&&t.lat!==o.lat||tf(t.lng)&&t.lng!==o.lng:!1})}async function Mhe(e,o,{geocode:t=MP,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 d of e){if(!d?.geocode?.pending){s.push(d);continue}l&&r>0&&await a(r),l=!0;try{let c=await t(o(d));s.push(c?{...d,lat:c.lat,lng:c.lng,geocode:{...d.geocode,pending:!1,ok:!0,status:`Found \u2014 ${c.label.split(",").slice(0,3).join(",").trim()}`,lat:c.lat,lng:c.lng}}:{...d,geocode:{...d.geocode,pending:!1,ok:!1,status:"No match \u2014 check the address and try again."}})}catch{s.push({...d,geocode:{...d.geocode,pending:!1,ok:!1,status:Mx}})}}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 d=tf(l.lat)&&l.lat!==s.lat?l.lat:s.lat,c=tf(l.lng)&&l.lng!==s.lng?l.lng:s.lng;return d!==s.lat||c!==s.lng?{...s,lat:d,lng:c}:s})}import{jsx as $o,jsxs as Ux}from"react/jsx-runtime";import{useRef as xU}from"react";import{ColorPicker as IU,ColorPickerPanel as gU,ColorSwatch as bU,HexInput as yU,Popover as SU,Tooltip as wU,colorFill as CU,colorSwatchClasses as vU,useShellStrings as kU}from"efficient-shell/ui";import{SettingsDefaultReset as TU,SettingsField as PU}from"efficient-easel/panel";import{typedHex as Hx}from"efficient-easel/pick";var HP="Not set";function UP({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,ariaLabel:s,choices:l}){return $o(OU,{value:e,onChange:o,label:i(s??t),id:r,caption:a,inherited:n,choices:l})}function EU(){let{theme:e}=ue();return bP(e)}function OU({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,choices:s}){let l=EU(),d=e?null:Hx(n??""),c=a!==void 0&&(!e||Hx(a)!==Hx(e))?a:null,f=u=>{u!==e&&o(u)};return Ux("div",{className:"sf-colour",children:[s?$o(_U,{id:r,value:e,onChange:o,label:t,presets:l,follows:d,choices:s}):$o(IU,{id:r,value:e,onChange:f,label:t,presets:l,fallback:d??void 0,size:"md",align:"start"}),c!==null?$o("span",{className:"sf-colour-caption",children:c}):$o("span",{className:"sf-colour-hexwrap",children:$o(yU,{value:e||d||"",onChange:f,label:i("{label} hex code",{label:t}),placeholder:e||d?void 0:i(HP),className:d?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function _U({value:e,onChange:o,label:t,id:r,presets:a,follows:n,choices:s}){let l=kU().color,d=e||n||"",c=s.findIndex(p=>p.selected),f=c>=0,u=xU(c);return f&&(u.current=c),$o(SU,{id:r,trigger:$o("span",{"aria-hidden":"true",className:"absolute inset-0",style:CU(d)}),triggerLabel:l.swatch(t,d.toUpperCase()||l.none),triggerClassName:vU({size:"md"}),"aria-label":l.panel(t),align:"start",children:Ux("div",{className:"sf-colour-window",children:[$o("div",{role:"group","aria-label":t,className:"sf-colour-choices",children:s.map(p=>$o(wU,{content:p.label,children:$o(bU,{color:p.color,"aria-label":p.label,selected:p.selected,onClick:()=>{p.selected||p.onPick()}})},p.label))}),$o(gU,{value:f?"":e,onChange:o,label:t,presets:a,fallback:(f?d:n)??void 0},u.current)]})})}function Yo({label:e,icon:o,changed:t,hint:r,onReset:a,resetTo:n,children:s,...l}){return $o(PU,{label:e,icon:o,htmlFor:l.id,changed:t,hint:r,action:a?$o(TU,{words:le()?.panel,label:e,changed:!!t,detail:n,onReset:a}):void 0,children:s?Ux("div",{className:"es-width-stack",children:[UP({...l,label:e}),s]}):UP({...l,label:e})})}function Wl({label:e,icon:o,value:t,inherited:r,resetTo:a,onChange:n,onReset:s,hint:l,choices:d,children:c}){let f=!!t;return $o(Yo,{label:e,icon:o,value:t,inherited:f?void 0:r,onChange:n,changed:f,onReset:s,resetTo:a,hint:l,choices:d,children:c})}import{keptByRow as ag}from"efficient-easel/screen/lib/document/style-fields";import{jsx as AU}from"react/jsx-runtime";import{useEffect as LU,useState as RU}from"react";import{clearRangeOf as FU,markSelection as BU,useCaretEdit as DU}from"efficient-easel/copy";import{TextToolbar as NU}from"efficient-shell/ui";function MU(e,o,t){return BU(e,o,t,OC)}function WP(e,o){let t=FU(o,e.length),r=AC(e,t.start,t.end);return r.text===e?null:r}function HU(e){let[o,t]=RU(null);return LU(()=>{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(d=>d&&d.start===s&&d.end===l?d:{start:s,end:l})};return r.addEventListener("selectionchange",a),()=>r.removeEventListener("selectionchange",a)},[e]),[o,t]}function UU({target:e,value:o,onChange:t,disabled:r=!1,label:a="Formatting"}){let n=DU({target:e,onChange:t}),[s,l]=HU(e),d=p=>n(h=>{let I=MU(o,p,h);return l({start:I.selectionStart,end:I.selectionEnd}),I}),c=EC(),f={};if(s)for(let p of c)f[p.style]=_C(o,s.start,s.end,p.style);let u=r?null:WP(o,s);return AU(NU,{offered:new Set(c.map(p=>p.style)),onMark:p=>d(p),pressed:f,disabled:r,"aria-label":i(a),className:"sf-markup-bar",clear:u?{onClear:()=>n(()=>{let p=e.current,h=p&&p.ownerDocument.activeElement===p?{start:p.selectionStart??0,end:p.selectionEnd??0}:null,I=WP(o,h)??{text:o,selectionStart:h?.start??0,selectionEnd:h?.end??0};return l({start:I.selectionStart,end:I.selectionEnd}),I})}:void 0})}var Wx=UU;import{deviceField as lt}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as tK,NoControlMark as rK,noControlField as yO}from"efficient-easel/screen/lib/document/panel-no-control-mark";var zx="__ownBox";function zP(e){return!!e&&typeof e=="object"&&e[zx]===!0}var $x="sfPanelOnly";function ms(e){return!!e&&typeof e=="object"&&e[$x]===!0}function rf(e,o,t){return typeof e=="number"?e:typeof o=="number"?o:t}var af=void 0;import{phoneKey as vs,tabletKey as pg,viewKeyAt as ug}from"efficient-easel/draw";import{jsx as nf,Fragment as WU,jsxs as zU}from"react/jsx-runtime";import{useRef as $U}from"react";import{SettingsDefaultReset as GU}from"efficient-easel/panel";import{effectTiles as jU}from"efficient-easel/screen/lib/document/effect-tiles";import{VIEW_KEY_ACCESS as $P,describedAs as KU,onDesktopWords as VU,phoneTwinFields as GP}from"efficient-easel/screen/lib/document/box-fields";function qU({row:e,read:o,...t}){let r=o(Po(),t.followsView??"desktop");return e({...t,follows:r})}function Er(e,o){return Object.fromEntries(qo.map(t=>{let r=we(e,t);return[r,GP(e,o(t),$P)[r]]}))}function sf(e,o,t){let r=o.render,a={...o,render:n=>nf(qU,{...n,row:r,read:t})};return Er(e,n=>n==="desktop"?o:a)}function YU({spec:e,...o}){let t=e.values.includes(o.value),r="follows"in o,a=e.read(Po(),o.followsView??"desktop"),n=t?o.value:a,s=$U(null),{preview:l}=e,d=jU({label:i(e.label),options:e.values.map(f=>({value:f,label:i(e.word(f)),picture:e.picture(f)})),fallback:e.fallback,onPreview:l?f=>s.current&&l(s.current,f):void 0}).render,c=d({value:n,onChange:f=>o.onChange(f??e.fallback)});return zU(WU,{children:[l?nf("div",{ref:s,style:{display:"contents"},children:c}):c,r&&t&&nf(GU,{words:le()?.panel,label:i(e.tileWord),changed:!0,detail:VU(f=>i(f),i(e.word(a)),o.followsView),onReset:()=>o.onChange(void 0)})]})}function lf(e,o){let t=KU({type:"custom",render:r=>nf(YU,{...r,spec:o})},{type:"select",label:o.label,options:o.values.map(r=>({value:r,label:o.word(r)}))});return GP(e,t,$P)}import{jsx as jx,Fragment as JU}from"react/jsx-runtime";import{createContext as QU,useContext as eW}from"react";var df={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},cf={Events:["posts"],SubscribeBlogs:["posts"]};var XU=["anchor"],ZU=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function zl(e){return XU.includes(e)||ZU.test(e)}var Gx={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"}}};Gx.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var gxe=Object.fromEntries(Object.entries(df).map(([e,o])=>[e,Object.keys(o)])),bxe=Object.fromEntries(Object.entries(cf).map(([e,o])=>[e,[...o]]));import{NoControlMark as oW}from"efficient-easel/screen/lib/document/panel-no-control-mark";var jP=QU(!1);function KP({children:e}){return jx(jP.Provider,{value:!0,children:e})}function tW(){return eW(jP)}function VP({name:e,children:o}){return!tW()||!e||!rW(e)||zl(e)?jx(JU,{children:o}):jx(oW,{})}function rW(e){return/^[A-Za-z0-9_$]+$/u.test(e)}var Kx="off",YP="none",Vx=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],XP=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function Pxe(e){return io(Vx,Kx,e)}var qP="sf-card-index",$l="sf-card-index",Exe="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",aW={plain:`counter(${$l})`,padded:`counter(${$l}, decimal-leading-zero)`,numero:`"N\xB0" counter(${$l}, decimal-leading-zero)`};function Oxe(e,o){return o==="off"?"":`.${e}{counter-reset:${$l}}.${e} .${qP}{counter-increment:${$l}}.${e} .${qP}::before{content:${aW[o]}}`}function _xe(e){return e==="hairline"?"border border-line hover:border-accent":""}var ZP=[{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 aK}from"efficient-easel/draw";import{jsx as Xo}from"react/jsx-runtime";import{SettingsDefaultReset as pW,SettingsField as qx}from"efficient-easel/panel";import{useSelectedHost as uW}from"efficient-easel/easel";import{FOCAL_DEFAULT as mW}from"efficient-shell/format";import{ImageIcon as Yx,PlayIcon as QP}from"efficient-easel/icons";import{ImageFocusPoint as hW,MediaUploadField as xW}from"efficient-shell/ui";import{useContext as IW}from"react";import{ScreenDocumentContext as gW}from"efficient-easel/screen/components/ScreenDocumentContext";import{tabletKey as bW,viewKeyAt as yW}from"efficient-easel/draw";import{usePreviewDevice as SW}from"efficient-easel/draw/client";import{formatFocal as nW,parseFocal as sW}from"efficient-shell/format";var lW="sf-focus-phone",iW="--sf-focus-phone",dW="sf-focus-tablet",cW="--sf-focus-tablet",Gl=e=>{if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return null;let{x:o,y:t}=sW(e);return nW(o,t)};function JP(e,o){return Ma(fW,null,Gl(o),Gl(e))}var fW={tabletClass:dW,tabletVar:cW,phoneClass:lW,phoneVar:iW};import{shownTier as Xx}from"efficient-easel/screen/lib/document/device-fields";import{onDesktopWords as wW}from"efficient-easel/screen/lib/document/box-fields";import{requestMediaPick as CW}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as vW}from"efficient-easel/screen/lib/host";import{useEaselSession as kW}from"efficient-easel/screen/lib/session-context";function TW(e,o,t,r=!0){let a=Xx(t),n=typeof e[o]=="string"&&e[o]?String(e[o]):mW;if(a==="desktop")return{ownView:!1,followed:n,followsView:"desktop",own:void 0,focus:n,key:o};let s=yW(o,a),l=Gl(e[s])??void 0,d=a==="mobile"&&r?Gl(e[bW(o)])??void 0:void 0,c=d??n;return{ownView:!0,followed:c,followsView:d?"tablet":"desktop",own:l,focus:l??c,key:s}}function PW(e,o,t){let r=uW();if(!o||!r)return null;let a=r.values??{};if(t&&!t(a,Xx(e)))return null;let n=TW(a,o,e,t?t(a,"tablet"):!0),s=r.onChange;return{...n,set:l=>s(n.key,l),clear:()=>s(n.key,af)}}function e0({value:e,onChange:o,label:t,accept:r,placeholder:a,focusKey:n,focusWhen:s,frameKey:l,fieldKey:d}){let c=vW(),f=kW(),u=i(t),p=SW(),h=r.startsWith("video"),I=PW(p,h?void 0:n,s),g=!!n&&Xx(p)!=="desktop",C=IW(gW),w=ta(),T=l&&d?{video:d,frame:l}:null,y=E=>CW(c,{accept:r,title:u,...E?{file:E}:{}}).then(U=>!U||!T?U?.url??null:(w({[T.video]:U.url,[T.frame]:U.posterUrl??""}),null)),b=T?E=>E?o(E):w({[T.video]:"",[T.frame]:""}):o,P=zo(e);if(g&&(!I||!P))return null;if(C&&!C.capabilities.mediaEditing)return Xo(qx,{label:u,icon:h?Xo(QP,{}):Xo(Yx,{}),children:Xo("div",{className:"sf-image-slot-inert",children:h?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 H=I?.ownView&&P?Xo(pW,{words:le()?.panel,label:i("Image focus"),changed:!!I.own,detail:wW(E=>i(E),I.followed,I.followsView),onReset:I.clear}):void 0;return g&&I?Xo(qx,{label:u,icon:Xo(Yx,{}),action:H,children:Xo("div",{style:{flex:"1 1 auto",minWidth:0},children:Xo(hW,{value:I.focus,onChange:I.set,label:i("Image focus"),image:P,hint:null})})}):Xo(qx,{label:u,icon:h?Xo(QP,{}):Xo(Yx,{}),children:Xo("div",{style:{flex:"1 1 auto",minWidth:0},children:Xo(xW,{value:P,onChange:b,onPick:y,accept:h?"video/*":"image/*",kind:h?"video":"image",placeholder:a===void 0?void 0:i(a),maxSizeBytes:to(f).media.maxUploadBytes,...I?{focus:I.focus,onFocusChange:I.set}:{}})})})}import{jsx as o0}from"react/jsx-runtime";import{useId as EW}from"react";import{FieldSelect as OW}from"efficient-easel/fields";import{SettingsField as _W}from"efficient-easel/panel";function AW(e){return e.map(({value:o,label:t,note:r})=>({value:o,label:t,...r?{meta:r}:{}}))}function t0({label:e,options:o,value:t,onChange:r,emptyLabel:a,icon:n,hint:s}){let l=EW(),d=`${l}-label`,c=`${l}-button`,f=Array.isArray(t)?t:[];return o0(_W,{label:i(e),labelId:d,icon:n,hint:s,children:o0(OW,{id:c,multiple:!0,value:f,options:AW(o),onChange:r,placeholder:a===void 0?i("None"):i(a),ariaLabelledBy:`${d} ${c}`,inline:!0})})}import{jsx as Io,jsxs as Ua,Fragment as sz}from"react/jsx-runtime";import{useCallback as h0,useContext as lz,useId as g0,useRef as x0,useState as I0}from"react";import{ThemeIcon as iz}from"efficient-easel/icons";import{Button as dz,useClickOutside as cz}from"efficient-shell/ui";import{SettingsField as fz}from"efficient-easel/panel";import{ScreenDocumentContext as pz}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as fe,jsxs as aa,Fragment as UW}from"react/jsx-runtime";import{parseHexColor as WW}from"efficient-shell/format";import{Button as Jx,IconButton as zW,Tooltip as $W}from"efficient-shell/ui";import{jsx as ra,jsxs as LW}from"react/jsx-runtime";import{AccentIcon as RW}from"efficient-easel/icons";import{Button as FW,Tooltip as BW}from"efficient-shell/ui";function Zx(e){return Vo(e).background}function DW(e){let o=Kr(e.accent,Zx(e));return o===null?null:{ratio:o,grade:Zn(o)}}function NW(e){let o=Zx(e),t=Kr(e.accent,o);return t===null?[]:Gv(e.accent).filter(r=>{let a=Kr(r,o);return a!==null&&a>t&&Zn(a)==="good"})}var MW={good:"Easy to read","large-only":Xn["large-only"],hard:Xn.hard};function r0({value:e,onChange:o}){let t=DW(e),r=t?.grade,a=t&&t.grade!=="good"?NW(e):[];return ra(Yo,{label:i("Main color"),icon:ra(RW,{}),hint:t?i(MW[t.grade]):void 0,value:e.accent,onChange:n=>o({...e,accent:n}),children:a.length>0?ra("div",{className:"w-full min-w-0",children:LW("div",{className:"sf-readability",children:[ra("p",{className:"sf-readability-advice",children:HW(r,!0)}),ra("div",{className:"sf-readability-suggestions",children:a.map(n=>{let s=Kr(n,Zx(e));return ra(BW,{content:i("Use {colour}",{colour:n.toUpperCase()}),children:ra(FW,{variant:"secondary",className:"sf-readability-suggestion",leftIcon:ra("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 HW(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 GW,ChevronDownIcon as n0,ChevronUpIcon as jW,GroundIcon as KW,LayoutIcon as VW,SquareIcon as qW,TextSmallIcon as YW,TypeIcon as a0}from"efficient-easel/icons";var jl=e=>i("Theme {n}",{n:e+1});function s0({colors:e}){let o=Vo(e),t=Tl(e)??o.accent;return aa("span",{className:"sf-theme-page",style:{background:o.background,color:o.text},"aria-hidden":!0,children:[fe("span",{className:"sf-theme-eyebrow",style:{color:o.muted},children:i("label")}),aa("span",{className:"sf-theme-headline",children:[i("Heading")," ",fe("span",{style:{color:o.accent},children:i("main")})]}),fe("span",{className:"sf-theme-body",children:i("body text")}),aa("span",{className:"sf-theme-row",children:[fe("span",{className:"sf-theme-btn",style:{background:t,color:Rh(e,o.accent)},children:i("button")}),fe("span",{className:"sf-theme-mini",style:{background:o.surface,borderColor:o.line},children:i("card")})]})]})}var Qx={"Text color":fe(a0,{}),"Label color":fe(YW,{}),Background:fe(KW,{}),"Panels & cards":fe(VW,{}),Borders:fe(qW,{}),"Button color":fe(GW,{}),"Button text color":fe(a0,{})};function XW({label:e,colorKey:o,value:t,onChange:r,idPrefix:a="sf-theme-ink"}){let n=`${a}-${o}`;return fe(Yo,{label:i(e),icon:Qx[e],id:n,value:t,onChange:s=>r(o,s)})}function ZW({value:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button`,n=e!==void 0&&WW(e)===e.toLowerCase(),s=n?e:o;return fe(Yo,{label:i("Button color"),icon:Qx["Button color"],id:a,value:s,caption:n?s:i("Main"),onChange:t})}function JW({colors:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button-ink`,n=jv(e),s=Rh(e,o),l=Tl(e)??o,d=Zn(Kr(s,l)??0);return fe(Yo,{label:i("Button text color"),icon:Qx["Button text color"],hint:n&&d!=="good"?i("{grade} on the button",{grade:i(Xn[d])}):void 0,id:a,value:s,caption:n?s:i("Auto"),onChange:t})}var QW=[{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 eI({colors:e,onChange:o,idPrefix:t}){let r=Vo(e);return fe(UW,{children:QW.map(a=>"colour"in a?fe(r0,{value:e,onChange:o},"colour"):"moduleBreak"in a?fe("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in a?fe(ZW,{value:e.button,accent:r.accent,onChange:n=>o({...e,button:n}),idPrefix:t},"button"):"buttonInk"in a?fe(JW,{colors:e,accent:r.accent,onChange:n=>o({...e,buttonInk:n}),idPrefix:t},"buttonInk"):fe(XW,{label:a.label,colorKey:a.key,value:r[a.key],onChange:(n,s)=>o({...e,[n]:s}),idPrefix:t},a.key))})}function ff({index:e,colors:o,selected:t,role:r="radio",open:a,editable:n=!0,onPick:s,onEdit:l,onChangeColors:d}){let c=Vo(o),f=jl(e),u=e<Lh.length&&!o.brandInk?Lh[e]:null,p=Zn(Kr(c.text,c.background)??0),h=u?JSON.stringify(o)!==JSON.stringify(u):!1,I=a!==void 0;return aa("div",{className:`sf-theme-card${t?" is-selected":""}`,children:[fe("button",{type:"button",role:r,"aria-checked":r==="radio"?t:void 0,"aria-selected":r==="option"?t:void 0,"aria-label":f,className:"sf-theme-pick",onClick:s,children:fe(s0,{colors:o})}),aa("div",{className:"sf-theme-foot",children:[fe("span",{className:"sf-theme-name",children:f}),p!=="good"&&fe("span",{className:"sf-theme-warn",children:i(Xn[p])}),n&&l&&I&&fe("span",{className:"sf-theme-edit",children:fe($W,{content:a?i("Collapse"):i("Edit colors"),children:fe(zW,{size:"sm","aria-expanded":a,"aria-controls":`sf-theme-colours-${e}`,"aria-label":a?i("Collapse {name}",{name:f}):i("Edit colors for {name}",{name:f}),onClick:l,children:a?fe(jW,{size:14}):fe(n0,{size:14})})})}),n&&l&&!I&&fe(Jx,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":i("Edit {name}",{name:f}),onClick:l,children:i("Edit")})]}),a&&aa("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[fe(eI,{colors:o,onChange:g=>d?.(g)}),u&&fe(Jx,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!h,onClick:()=>d?.({...u}),children:h?i("Reset {name} to the preset",{name:f}):i("Not changed")})]})]})}function l0({colors:e,name:o,nameId:t,open:r,menuId:a,labelId:n,buttonRef:s,onClick:l,onKeyDown:d,onEdit:c}){return aa("div",{className:"sf-secttheme-btn",children:[fe("button",{ref:s,type:"button",className:"sf-theme-pick","aria-expanded":r,"aria-controls":a,"aria-labelledby":`${n} ${t}`,onClick:l,onKeyDown:d,children:e?fe(s0,{colors:e}):fe("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),aa("div",{className:"sf-theme-foot",children:[fe("span",{id:t,className:"sf-theme-name",children:o}),c&&fe(Jx,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":i("Edit {name}",{name:o}),onClick:c,children:i("Edit")}),fe("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:l,children:fe(n0,{size:12,className:"sf-multi-caret","aria-hidden":"true"})})]})]})}import{useCallback as sI,useEffect as p0,useRef as hf}from"react";import{currentEaselSession as tz}from"efficient-easel/screen/lib/session";import{useEaselSession as rz}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as ez}from"react";var d0,oI=null,Ha=null,pf=0,tI=new Set;function rI(e){d0=e;for(let o of tI)o()}function aI(e){oI=e,pf+=1,Ha&&clearTimeout(Ha),Ha=null,rI(void 0)}function uf(e){pf+=1,rI(e)}function Or(e=250){oI&&(Ha&&clearTimeout(Ha),Ha=setTimeout(()=>{Ha=null;let o=oI;if(!o)return;let t=++pf;o().then(r=>{t===pf&&rI(r)}).catch(()=>{})},e))}function i0(){return d0}function oz(e){return tI.add(e),()=>{tI.delete(e)}}function mf(){return ez(oz,i0,i0)}var nI=new Set;function c0(e){return nI.add(e),()=>{nI.delete(e)}}async function f0(){let e=(await Promise.allSettled([...nI].map(async o=>o()))).find(o=>o.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as az}from"efficient-easel/screen/lib/backend-error";function u0(e=tz()){return(o,t,r)=>{let a=to(e).theme;return a?a.update(o,r?{siteId:r}:void 0):Promise.reject(new az("invalid","This backend stores no site theme."))}}function m0(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function nz(e,o=u0()){let{themeFromDocument:t,token:r,siteId:a,patch:n}=e,s=m0({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 hs({themeFromDocument:e,tokenRef:o,siteId:t,onResult:r}){let a=hf(null),n=hf({}),s=rz(),l=hf(r);l.current=r;let d=hf(null),c=sI(p=>{if(p.status==="skipped"){let h=`skipped:${p.reason}`;if(d.current===h)return;d.current=h}else d.current=null;l.current?.(p)},[]),f=sI(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let p=n.current;n.current={};let h=await nz({themeFromDocument:e,token:o?.current,siteId:t,patch:p},u0(s));return c(h),h.status==="saved"&&Or(),h.status==="failed"&&(n.current={...p,...n.current}),h},[e,o,t,c,s]),u=sI((p,h=!1)=>{let I=m0({themeFromDocument:e,token:o?.current});if(I){c(I);return}n.current={...n.current,...p},a.current&&clearTimeout(a.current),h?f():a.current=setTimeout(()=>{f()},500)},[e,o,f,c]);return p0(()=>()=>{f()},[f]),p0(()=>c0(async()=>{if(!a.current&&Object.keys(n.current).length===0)return;let p=await f();if(p.status==="failed")throw p.error}),[f]),{persist:u,flush:f}}var uz="Follow the page",YIe="Follow the slideshow",mz=e=>i("Editing {name} changes it everywhere.",{name:e});function hz({colors:e}){if(!e)return Io("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let o=Vo(e);return Ua("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[Io("i",{style:{background:o.background}}),Io("i",{className:"sf-secttheme-chip-accent",style:{background:o.accent}})]})}function xz({themes:e,value:o,onPick:t,onEdit:r,menuId:a,followLabel:n}){return Ua("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[n!==void 0&&Ua(sz,{children:[Ua("button",{type:"button",role:"option","aria-selected":o===null,className:`sf-secttheme-item${o===null?" is-active":""}`,onClick:()=>t(er),children:[Io(hz,{}),Io("span",{className:"sf-secttheme-name",children:i(n)})]}),Io("div",{className:"sf-secttheme-sep",role:"presentation"})]}),o!==null&&e[o]&&Io("p",{className:"sf-secttheme-oncard",role:"presentation",children:i("{name} is on this section",{name:jl(o)})}),e.map((s,l)=>l===o?null:Io(ff,{role:"option",index:l,colors:s,selected:!1,onPick:()=>t(l),onEdit:()=>r(l)},l))]})}function Iz({index:e,colors:o,onChange:t,onDone:r}){let a=jl(e),n=g0();return Ua("div",{className:"sf-secttheme-sheet",children:[Ua("div",{className:"sf-secttheme-sheet-head",children:[Io("span",{children:a}),Io(dz,{variant:"secondary",className:"sf-secttheme-done",onClick:r,children:i("Done")})]}),Io("div",{className:"sf-secttheme-rows",children:Io(eI,{colors:o,onChange:t,idPrefix:n})}),Io("p",{className:"sf-secttheme-warn",children:mz(a)})]})}function b0({value:e,onChange:o,followLabel:t,hint:r}){let{theme:a,setTheme:n}=ue(),s=xo(a),l=lz(pz),d=l?.tokenRef,c=l?.siteId??null,f=!l?.capabilities?.hasSiteTheme,{persist:u,flush:p}=hs({themeFromDocument:f,tokenRef:d,siteId:c}),h=xo(s),I=h.themes,g=or(e),C=g!==null?I[g]:void 0,w=C??(I.length?Yn(h):void 0),[T,y]=I0(!1),[b,P]=I0(null),H=x0(null),E=x0(null),U=g0(),O=h0(()=>{y(!1),P(null)},[]),D=h0(()=>{!T&&b===null||(p(),O())},[T,b,O,p]);cz(H,D);let v=A=>{o(A),O()},_=A=>{if(b===null)return;let F=I.map(($,X)=>X===b?A:$),z={...h,themes:F};n(z),u({selected_preset:z.selected,theme_presets:z.themes})};return Ua("div",{className:"sf-secttheme",ref:H,children:[Io(fz,{label:i("Theme"),icon:Io(iz,{}),labelId:`${U}-label`,hint:r,children:Io(l0,{colors:w,onEdit:g!==null?()=>{P(g),y(!1)}:void 0,name:C?jl(g):i(t??uz),nameId:`${U}-value`,labelId:`${U}-label`,open:T,menuId:U,buttonRef:E,onClick:()=>{P(null),y(A=>!A)},onKeyDown:A=>{A.key==="Escape"&&(T||b!==null)&&(A.preventDefault(),O())}})}),T&&b===null&&Io("div",{onKeyDown:A=>{A.key==="Escape"&&(A.preventDefault(),O(),E.current?.focus())},children:Io(xz,{themes:I,value:g,onPick:v,onEdit:A=>{P(A),y(!1)},menuId:U,followLabel:t})}),b!==null&&I[b]&&Io(Iz,{index:b,colors:I[b],onChange:_,onDone:()=>{p(),O(),E.current?.focus()}})]})}import{jsx as y0}from"react/jsx-runtime";import{useId as gz}from"react";import{FieldSelect as bz}from"efficient-easel/fields";import{SettingsField as yz}from"efficient-easel/panel";function Sz(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 tge({label:e,options:o,fallback:t,value:r,onChange:a,placeholder:n,bare:s=!1,icon:l}){let d=gz(),c=`${d}-label`,f=`${d}-button`,u=r??"",p=o.some(C=>C.value===u)?u:t,h=i(e),I=n===void 0?void 0:i(n),g=y0(bz,{id:f,value:p,options:Sz(o),onChange:a,placeholder:I,searchPlaceholder:I,...s?{ariaLabel:h}:{ariaLabelledBy:`${c} ${f}`},searchable:!0,groupCount:!0,inline:!0});return s?g:y0(yz,{label:h,labelId:c,icon:l,children:g})}import{jsx as za,jsxs as e$}from"react/jsx-runtime";import{SettingsField as $0}from"efficient-easel/panel";import{LinkIcon as o$}from"efficient-easel/icons";import{LinkPicker as t$,TextLinkField as r$}from"efficient-shell/ui";import{useEffect as z0,useMemo as yf,useRef as a$,useState as bf}from"react";import{currentEaselSession as wz}from"efficient-easel/screen/lib/session";function S0(){return wz().auth.token}import{currentEaselSession as n$}from"efficient-easel/screen/lib/session";import{useScreenDocument as s$}from"efficient-easel/screen/components/ScreenDocumentContext";var Cz=()=>({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 w0(e,o,t){if(!e)return"page";if(lP(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(cP(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 lI(e,o){let t=Cz(),r=e.pages.map(f=>({value:Ml(f.slug),label:f.title})),a=o?.pageOptions?o.pageOptions(r):r,n=a.map(f=>f.value),s=e.pages.map(f=>({label:f.title,options:dP(...f.docs).map(u=>({value:Gc(f.slug,u.slug),label:u.name}))})).filter(f=>f.options.length>0),l=f=>{switch(f){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(u=>({value:iP(u.slug),label:u.title||u.slug})),placeholder:t.choosePost};case"product":return{type:"select",options:e.products.map(u=>({value:u.href,label:u.name||u.href})),placeholder:t.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(u=>({value:sP(u.slug),label:u.title||u.slug})),placeholder:t.choosePopup};case"custom":return{type:"text"}}},d=nP(e.offers).map(f=>({value:f.value,label:i(f.label),target:l(f.value),...f.value==="anchor"?{hint:t.sectionHint}:{},...f.value==="blog"||f.value==="product"||f.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!o)return{kinds:d,rules:{kindOf:f=>w0(f,n),targetOf:f=>f,readFilter:()=>null,withFilter:f=>f}};let c=f=>{let u=o.withFilter(f,null);return o.listingPaths.includes(u)?u:f};return{kinds:d,rules:{kindOf:f=>w0(f,n,{listingPaths:o.listingPaths,targetOf:c}),targetOf:c,readFilter:o.readFilter,withFilter:o.withFilter},filtersFor:f=>o.listingPaths.includes(f)?o.filtersFor(f):null}}import{useEaselSession as l$}from"efficient-easel/screen/lib/session-context";function Eo(e,o){if(typeof e=="string")return e||o;if(e&&typeof e=="object"&&"text"in e){let t=e.text;return Se(t)??o}return o}function C0(e,o){return q(e)??o}function _r(e,o){return typeof e=="boolean"?e:o}function xf(e,o){if(!Array.isArray(e))return o;let t=e.map(r=>typeof r=="string"?r:Eo(r?.text,"")).map(r=>r.trim()).filter(Boolean);return t.length?t:o}var k0=["delay","scroll","exit"],T0=["all","chosen","except"],P0=["visit","days","never","once"],vz=["all","desktop","phone"],kz=["stop","continue"],E0={min:0,max:60},O0={min:10,max:90},_0={min:1,max:90},Dt={autoOpen:!1,trigger:"delay",autoOpenDelaySec:15,scrollPercent:50,showOn:"all",showOnPages:[],devices:"all",hideAfter:"days",hideDays:7,afterSubmit:"stop",startDate:null,endDate:null};function at(e,o,t){return typeof o=="string"&&e.includes(o)?o:t}function xs(e,o,t){let r=C0(e,t);return Math.min(o.max,Math.max(o.min,Math.round(r)))}function Tz(e){return typeof e.hideAfter=="string"?at(P0,e.hideAfter,Dt.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":Dt.hideAfter}function Pz(e){return Array.isArray(e)?e.map(o=>typeof o=="string"?o.trim():"").filter(Boolean).map(o=>o.startsWith("/")?o:`/${o}`):[]}function v0(e){if(typeof e!="string")return null;let o=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(o)?o:null}function A0(e){let o=e??{},t=Dt;return{autoOpen:_r(o.autoOpen,t.autoOpen),trigger:at(k0,o.trigger,t.trigger),autoOpenDelaySec:xs(o.autoOpenDelaySec,E0,t.autoOpenDelaySec),scrollPercent:xs(o.scrollPercent,O0,t.scrollPercent),showOn:at(T0,o.showOn,t.showOn),showOnPages:Pz(o.showOnPages),devices:at(vz,o.devices,t.devices),hideAfter:Tz(o),hideDays:xs(o.hideDays,_0,t.hideDays),afterSubmit:at(kz,o.afterSubmit,t.afterSubmit),startDate:v0(o.startDate),endDate:v0(o.endDate)}}import{parseHexColor as Ez}from"efficient-shell/format";var Nt="#000000";var iI="popup",Oz=fk,_z=["auto","full"],Az=["inside","outside","none"],Lz={min:240,max:1440},Rz={min:0,max:100},Kl={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:Nt,tintOpacity:60,outsideClick:!0,closeButton:"inside"};function Fz(e,o){let t=typeof e=="string"?e.trim():"";return t&&Ez(t)===t.toLowerCase()?t:o}function dI(e,o=Kl){let t=e??{},r=o;return{placement:at(Oz,t.placement,r.placement),fullWidth:_r(t.fullWidth,r.fullWidth),width:xs(t.width,Lz,r.width),height:at(_z,t.height,r.height),tintColor:Fz(t.tintColor,r.tintColor),tintOpacity:xs(t.tintOpacity,Rz,r.tintOpacity),outsideClick:_r(t.outsideClick,r.outsideClick),closeButton:at(Az,t.closeButton,r.closeButton)}}var L0="cart-drawer",vge="cart-drawer",Bz={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 kge(e,o){return o===0?e.subtitleEmpty:o===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(o))}function Tge(e){let o=e??{},t=Bz;return{kickerBadge:Eo(o.kickerBadge,t.kickerBadge),kickerText:Eo(o.kickerText,t.kickerText),titleLead:Eo(o.titleLead,t.titleLead),titleAccent:Eo(o.titleAccent,t.titleAccent),subtitleEmpty:Eo(o.subtitleEmpty,t.subtitleEmpty),subtitleOne:Eo(o.subtitleOne,t.subtitleOne),subtitleMany:Eo(o.subtitleMany,t.subtitleMany),leadTimeValue:Eo(o.leadTimeValue,t.leadTimeValue),shipsToFallback:Eo(o.shipsToFallback,t.shipsToFallback),promises:xf(o.promises,t.promises),emptyKicker:Eo(o.emptyKicker,t.emptyKicker),emptyBody:Eo(o.emptyBody,t.emptyBody)}}var Dz=["right","left"],Nz={...Kl,width:520,tintOpacity:68};function Pge(e){let o=e??{};return{...dI(o,Nz),placement:at(Dz,o.placement,"right"),height:"full",fullWidth:!1,autoOpen:_r(o.autoOpen,!0)}}var F0="consent-banner",Age="consent-banner";var Mz=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],Lge="Layout",R0={layout:"bar"},Hz=e=>Mz.some(o=>o.value===e);function Rge(e){let o=Eo((e??{}).layout,R0.layout);return{layout:Hz(o)?o:R0.layout}}var Fge={...Kl,placement:"bottom-center",fullWidth:!0,width:440,tintOpacity:0,outsideClick:!1,closeButton:"none"};var Uz="consentWords",Wz=["eyebrow","notice","accept","reject","choose"];function cI(e){let o=(e??{})[Uz];return typeof o=="string"&&Wz.includes(o)?o:null}function fI(e){let o=e?.props;return o?cI(o)!==null?!0:Object.values(o).some(t=>Array.isArray(t)&&t.some(r=>r&&typeof r=="object"&&"props"in r&&fI(r))):!1}var zz=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],Nge={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"},$z={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"},Mge={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 B0(e){let o={};for(let t of zz){let r=yr(e[$z[t]]);r&&(o[t]=r)}return o}var D0={heading:"Join our email list",placeholder:"Email address",buttonLabel:"Subscribe"},Gz={lead:"We accept"},gf={...Gz,methods:[],size:"sm",align:"start",dataSource:uC},Mt="site-footer";var Wge=Mt,zge={desktop:!0,tablet:!0,mobile:!0},$ge={desktop:!1,tablet:!1,mobile:!1},pI=1,N0=6,Gge=Array.from({length:N0-pI+1},(e,o)=>pI+o),If={desktop:6,tablet:3,mobile:2},jz={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}},Wa=e=>Math.min(Math.max(Math.round(e),pI),N0);function jge(e){if(typeof e=="number")return jz[Wa(e)]??{desktop:Wa(e),tablet:Wa(e),mobile:Wa(e)};if(e&&typeof e=="object"){let o=e;return{desktop:Wa(o.desktop??If.desktop),tablet:Wa(o.tablet??If.tablet),mobile:Wa(o.mobile??If.mobile)}}return{...If}}var uI="subscribe-popup",Qge="subscribe-popup",Kz=[uI,Mt,L0,F0];function H0(e){return Kz.includes(e)}var Vz=["right","left"],qz={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
|
|
2
|
-
*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:Dt.autoOpen,autoOpenDelaySec:Dt.autoOpenDelaySec,formSlug:"",trigger:Dt.trigger,scrollPercent:Dt.scrollPercent,showOn:Dt.showOn,showOnPages:[],hideAfter:Dt.hideAfter,hideDays:Dt.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},ro=Eo,Yz=_r,U0=xf;function M0(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 Xz(e,o){return Array.isArray(e)?U0(e,[]):o}function Zz(e,o){return Array.isArray(e)?e.map(t=>{let r=t??{};return{label:ro(r.label,""),value:ro(r.value,"")}}).filter(t=>t.label||t.value):o}function obe(e){let o=e??{},t=qz,r=A0(o);return{metaLabel:ro(o.metaLabel,t.metaLabel),issueLabel:M0(o.issueLabel,t.issueLabel),issueNumber:M0(o.issueNumber,t.issueNumber),kicker:ro(o.kicker,t.kicker),heading:ro(o.heading,t.heading),deck:ro(o.deck,t.deck),stats:Zz(o.stats,t.stats),formLabel:ro(o.formLabel,t.formLabel),formHeading:ro(o.formHeading,t.formHeading),formIntro:ro(o.formIntro,t.formIntro),firstNameLabel:ro(o.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:ro(o.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:ro(o.emailLabel,t.emailLabel),emailPlaceholder:ro(o.emailPlaceholder,t.emailPlaceholder),interestsLabel:ro(o.interestsLabel,t.interestsLabel),interests:U0(o.interests,t.interests),frequencyLabel:ro(o.frequencyLabel,t.frequencyLabel),frequencies:Xz(o.frequencies,t.frequencies),submitText:ro(o.submitText,t.submitText),finePrint:ro(o.finePrint,t.finePrint),dismissText:ro(o.dismissText,t.dismissText),emailInvalidText:ro(o.emailInvalidText,t.emailInvalidText),submitErrorText:ro(o.submitErrorText,t.submitErrorText),successHeading:ro(o.successHeading,t.successHeading),successBody:ro(o.successBody,t.successBody),keepBrowsingText:ro(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:at(Vz,o.formSide,t.formSide),valuePanelOnPhone:Yz(o.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:o.sectionAccent,sectionCorners:o.sectionCorners,sectionCornerSides:o.sectionCornerSides,textStyles:B0(o)}}function Jz(e,o=Math.random){for(;;){let t=`popup-${Math.floor(o()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(t))return t}}function Qz(e){return{root:{props:{title:e,kind:iI}},content:[],zones:{}}}function W0(e,o,t){return{slug:Jz(o,t),title:e,kind:bx,layout:Qz(e)}}function Vl(e){return e?.root?.props?.kind===iI}function G0(e){let o=new Map;return(t="")=>{let r=S0(),a=o.get(t);if(!a||a.token===null&&r!==null){let n=r||!n$().usesBridgedToken?e(r??"",t).catch(()=>[]):Promise.resolve([]);return o.set(t,{promise:n,token:r}),n}return a.promise}}var i$=G0(async(e,o)=>{let t=o?{siteId:o}:void 0,{pages:r}=to();return r.linkTargets?r.linkTargets(t):(await r.list(t)).map(a=>({id:a.id,slug:a.slug,label:a.label,layout:null}))}),d$=G0(async(e,o)=>await to().blog?.posts(o?{siteId:o}:void 0)??[]);function c$({value:e,onChange:o,label:t="Link",data:r,filters:a}){let n=yf(()=>lI(r,a),[r,a]),s=i(t);return za($0,{label:s,icon:za(o$,{}),children:za(t$,{value:e,onChange:l=>o(l),kinds:n.kinds,rules:n.rules,filtersFor:n.filtersFor,label:s})})}function j0(){let{siteId:e,capabilities:o}=s$(),{offersCommerce:t,hasBlog:r}=o,[a,n]=bf([]),[s,l]=bf([]),[d,c]=bf([]),[f,u]=bf(null),p=l$().chrome,h=p?.products?.list,I=p?.linkFilters,g=I?void 0:p?.linkRow,C=a$(!0);z0(()=>(C.current=!0,()=>{C.current=!1}),[]),z0(()=>{let y=!0;return i$(e??void 0).then(b=>y&&C.current&&n(b)),r&&d$(e??void 0).then(b=>y&&C.current&&l(b)),t&&h?.().then(b=>y&&C.current&&c(b)),t&&I?I.load(e).catch(()=>null).then(b=>y&&C.current&&u(()=>b)):u(null),()=>{y=!1}},[e,t,r,h,I]);let w=yf(()=>({pages:a.filter(y=>!H0(y.slug)&&!Vl(y.layout)).map(y=>({slug:y.slug,title:y.label,docs:[y.layout]})),popups:a.filter(y=>y.slug===uI||Vl(y.layout)).map(y=>({slug:y.slug,title:y.label})),posts:r?s.map(y=>({slug:y.slug,title:y.title})):[],products:t?d.map(y=>({href:y.href,name:y.name})):[],offers:{offersCommerce:t,offersService:r}}),[a,s,d,t,r]),T=yf(()=>f?f(w.pages):null,[f,w]);return{data:w,filters:T,pages:a,offersCommerce:t,HostLinkRow:g}}function Sbe({label:e,icon:o,text:t,onTextChange:r,link:a,onLinkChange:n}){let{data:s,filters:l}=j0(),d=yf(()=>lI(s,l),[s,l]),c=i(e);return za($0,{label:c,icon:o,children:za(r$,{label:c,text:t,onTextChange:r,link:a,onLinkChange:f=>n(f),kinds:d.kinds,rules:d.rules,filtersFor:d.filtersFor})})}function K0({value:e,onChange:o,label:t="Link"}){let r=typeof e=="string"?e:"",{data:a,filters:n,pages:s,offersCommerce:l,HostLinkRow:d}=j0(),c=a.pages.map(u=>Ml(u.slug)),f=l&&d&&(r==="/"||c.includes(r))?d:void 0;return e$("div",{children:[za(c$,{value:r,onChange:o,label:t,data:a,filters:n}),f&&za(f,{value:r,onChange:o,pages:s})]})}import{UiIcon as QE}from"efficient-easel/draw/client";import{phoneKey as oE,resolveViewValue as v$,tabletKey as tE,viewKeyAt as $a}from"efficient-easel/draw";import{SECTION_PAD_UNIT_KEY as aE,SITE_SIDE as k$,convertLength as T$,isLengthUnit as P$,isSiteSide as nE,sideLengthAt as E$,sideValueAt as O$,withLength as bI}from"efficient-easel/screen/lib/content/length-units";import{convertLength as f$}from"efficient-easel/screen/lib/content/length-units";var uo={min:1e3,max:2e3,step:50,default:1600};function p$(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var mI="--sf-site-width",xI=`var(${mI},${uo.default}px)`,kbe="100vw",Tbe=`max-w-[${xI}]`,Pbe=`max-w-[${uo.default}px]`;function X0(e){return typeof e!="number"||!Number.isFinite(e)?uo.default:Math.round(Math.min(Math.max(e,uo.min),uo.max))}function Ebe(e,o){let t=Aa(e,o,"size",uo);if(t!==null)return{[mI]:t};let r=X0(e);return r===uo.default?{}:{[mI]:`${r}px`}}var Go={min:0,max:80,step:4,default:40},hI="--sf-site-gutter",Ht={min:0,max:24,step:4},V0="--sf-site-gutter-phone",u$="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",m$="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-site-gutter:var(--sf-site-gutter-phone)]",nt=`var(${hI},${Go.default}px)`,h$=`px-[${nt}]`;var nr={md:`min(24px,${nt})`,sm:`min(20px,${nt})`,frame:`min(24px,${nt})`,tabs:`min(16px,${nt})`},Obe=[[`max-view-desktop:px-[${nr.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${nr.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${nr.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${nr.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${nr.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${nr.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${nr.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${nr.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${nt}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${nt})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${nt})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${nt})]`,"max-view-tablet:-mx-5"],[`-mx-[${nt}]`,"-mx-10"],[h$,"px-10"]];var Z0="max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function II(e){return x$[e??"box"]}var q0="var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))",Y0="[--sf-edge-g:var(--sf-pad-site)]",x$={box:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-[960px]:[--sf-pad-site:min(24px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:q0,edge:Y0,frame:"max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]"},site:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:q0,edge:Y0,frame:Z0}},_be=`mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] ${Z0}`,Abe="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]";var Lbe="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";function Sf(e){return typeof e!="number"||!Number.isFinite(e)?Go.default:Math.round(Math.min(Math.max(e,Go.min),Go.max))}function Rbe(e,o){let t=Aa(e,o,"spacing",Go);if(t!==null)return{[hI]:t};let r=Sf(e);return r===Go.default?{}:{[hI]:`${r}px`}}function wf(e){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,Ht.min),Ht.max))}function J0(e){return typeof e=="number"&&Number.isFinite(e)?X0(e):null}function Fbe(e,o){let t=Aa(e,o,"spacing",Ht);if(t!==null)return{[V0]:t};let r=wf(e);return r===null?{}:{[V0]:`${r}px`}}function Bbe(e){return wf(e)===null?"":`${u$} ${m$}`}function Cf(e,o){let t=lc(e,o,"spacing",Go),r=t===null?Sf(e):f$(t,ve(o),"px","mobile",Ht);return Math.min(Ht.max,r)}var Q0=xI,Dbe=`max-w-[${Q0}]`,Nbe=`max-w-[min(var(--sf-page-cap,${uo.default}px),${uo.default}px)]`,eE="--sf-hero-cap",I$=`var(${eE},none)`,Mbe=`max-w-[${I$}]`,g$="--sf-hero-bleed-m",b$="--sf-hero-bleed-w",y$="--sf-hero-chrome-x",S$="--sf-hero-chrome-cap";function Hbe(e){return e===!0?{[eE]:Q0,[g$]:"auto",[b$]:"100%",[y$]:"24px",[S$]:"none"}:{}}var gI=`calc(${xI} - ${nt}*2)`,Ube=`max-w-[${gI.replace(/ /g,"_")}]`;var w$="--sf-chrome-cap",C$=`var(${w$},${gI})`,Wbe="data-page-width";function zbe(e){return e==="full"?"full":null}function $be(e){return e==="full"?null:p$(e==="content"?gI:C$)}function Gbe(e){if(e==="full")return"full";if(e==="content")return"content"}var ut={min:10,max:200,step:10};function _$(e,o,t,r=0){let a=q(e),n=q(o);if(a===void 0&&n===void 0)return;let s=vf(t),l=d=>d===void 0?void 0:s==="px"?d:bI(d,s,r);return{paddingTop:l(a),paddingBottom:l(n)}}var vf=e=>ve(e),A$="sf-pad-top-phone",L$="sf-pad-bottom-phone",R$="--sf-pad-t-phone",F$="--sf-pad-b-phone",B$="sf-pad-left-phone",D$="sf-pad-right-phone",N$="--sf-pad-l-phone",M$="--sf-pad-r-phone",H$="sf-pad-top-tablet",U$="sf-pad-bottom-tablet",W$="sf-pad-left-tablet",z$="sf-pad-right-tablet",$$="--sf-pad-t-tablet",G$="--sf-pad-b-tablet",j$="--sf-pad-l-tablet",K$="--sf-pad-r-tablet",sE="sf-section-pad";function Yl(e){let o={desktop:e.unit,tablet:e.unitTablet,phone:e.unitPhone},t=_$(e.top,e.bottom,e.unit,e.frame),r=yI({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},o,e.frame,e.sideSpace);return t===void 0&&!r.classes.length&&!Object.keys(r.style).length?null:{className:[sE,...r.classes].join(" "),style:{...t,...r.style}}}var V$=e=>nE(e)?e:q(e),q$=[["top","paddingTop",[H$,$$],[A$,R$]],["bottom","paddingBottom",[U$,G$],[L$,F$]],["left","paddingLeft",[W$,j$],[B$,N$]],["right","paddingRight",[z$,K$],[D$,M$]]];function rE(e,o,t){return!P$(o)||o==="px"?e:T$(e,"px",o,t,{min:0,max:ut.max,step:1})}function Y$(e,o,t,r={},a=0){let n=(h,I)=>{if(I==="px")return`${h}px`;let g=bI(h,I,a);return typeof g=="number"?`${g}px`:g},s={n:e,[tE("n")]:o,[oE("n")]:t,u:r.desktop,[tE("u")]:r.tablet,[oE("u")]:r.phone},l=v$("spacing",q(e),q(o),q(t),$n()),d=(h,I,g)=>{if(O$(s,{side:"n"},h,"side",["side"])?.value===k$)return II().value;let C=E$(s,{side:"n"},"u",h,"side");if(!C)return;let w=I!==null&&!g&&C.unit==="px"&&typeof l[I]=="number";return n(w?l[I]:C.value,C.unit)},c=d("desktop",null,!0),f={},u=d("tablet","tablet",o!==void 0);u!==void 0&&(o!==void 0||u!==c)&&(f.tablet=u);let p=d("mobile","phone",t!==void 0);return p!==void 0&&(t!==void 0||p!==c)&&(f.phone=p),f}function yI(e,o,t={},r=e,a={},n=0,s="box"){let l={},d={},c=[],f=II(s),u=!1;for(let[p,h,...I]of q$){let g=p==="left"||p==="right"?V$:q,C=g(e[p]),w=p==="top"||p==="bottom"?n:0;nE(C)?(l[h]=f.value,u=!0):C!==void 0&&(l[h]=vf(a.desktop)==="px"?C:bI(C,vf(a.desktop),w));let T=Y$(g(r[p]),g(t[p]),g(o[p]),a,w);for(let[y,[b,P]]of[["tablet",I[0]],["phone",I[1]]]){let H=T[y];H!==void 0&&(c.push(b),d[P]=H,H===f.value&&(u=!0))}}return u&&c.push(...f.className.split(" ")),{classes:c,style:{...l,...d}}}var sr={top:"padTop",bottom:"padBottom",left:"padLeft",right:"padRight"},Ga="padUnit";function Xl(e,o){let t=e[Ga],r=(a,n,s)=>{let l=q(a)??(s===void 0?void 0:rE(s,t,"desktop")),d=q(n);return d===void 0?l:(l??0)+rE(d,t,"desktop")};return{top:r(e.padTop,e.sectionPaddingTop,o.top),bottom:r(e.padBottom,e.sectionPaddingBottom,o.bottom)}}function Jbe(e,o,t={}){let r=Xl(e,o),a={...wI(e,sr,!0,Ga),top:r.top,bottom:r.bottom};t.noTop&&Object.assign(a,{top:0,topTablet:void 0,topPhone:void 0});let n=Yl(a),s=n?n.className.split(" ").filter(l=>l!==sE):[];return{...s.length?{className:s.join(" ")}:{},style:n?.style??{}}}var ql={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"},SI=[...["top","bottom","left","right"].map(e=>[sr[e],ql[e]]),[Ga,aE]].flatMap(([e,o])=>[[e,o],...["tablet","mobile"].map(t=>[$a(e,t),$a(o,t)])]);function wI(e,o=ql,t=!0,r=o===ql?aE:void 0){let a={};if(r){e[r]!==void 0&&(a.unit=e[r]);for(let n of["tablet","mobile"])e[$a(r,n)]!==void 0&&(a[$a("unit",n)]=e[$a(r,n)])}for(let n of t?["top","bottom","left","right"]:["top","bottom"]){a[n]=e[o[n]];for(let s of["tablet","mobile"])a[$a(n,s)]=e[$a(o[n],s)]}return a}function Qbe(e){return Yl(e)}function eye(e,o){let t=(r,a)=>typeof r!="number"?void 0:vf(a)==="px"?r+o:r;return Yl({...e,frame:o,top:t(e.top,e.unit),bottom:t(e.bottom,e.unit),topTablet:t(e.topTablet,e.unitTablet),bottomTablet:t(e.bottomTablet,e.unitTablet),topPhone:t(e.topPhone,e.unitPhone),bottomPhone:t(e.bottomPhone,e.unitPhone)})}import{BUTTON_PAD_KEYS as kf,buttonBorderOf as X$,buttonFillOpacityOf as Z$,buttonPadSidesOf as J$,viewKeyAt as Q$}from"efficient-easel/draw";import{BUTTON_PAD_UNIT_KEY as CI,lengthOf as eG}from"efficient-easel/screen/lib/content/length-units";var oG="px-6 py-4",tG=4,Tf=e=>{let o=new RegExp(`\\bp${e}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(oG);if(!o)throw new Error(`BUTTON_PAD_CLASSES has no p${e}`);return o[1]!==void 0?Number(o[1]):Number(o[2])*tG},dye={top:Tf("y"),right:Tf("x"),bottom:Tf("y"),left:Tf("x")},iE="var(--btn)";function rG(e){let o=e.variant==="ghost",t=Z$(e.buttonFillOpacity),r=X$(e.buttonBorder),a=Se(e.buttonColor);return{fillOpacity:t??(o?0:100),border:{width:r?.width??1,color:r?.color??a??(o?"currentColor":iE)},changed:t!==void 0||r!==void 0}}function cye(e){let o=rG(e);if(!o.changed)return null;let t=Se(e.buttonColor)??iE;return{background:o.fillOpacity===0?"transparent":o.fillOpacity===100?t:`color-mix(in srgb, ${t} ${o.fillOpacity}%, transparent)`,borderWidth:eG(o.border.width,ve(e.buttonBorderUnit)),borderStyle:"solid",borderColor:o.border.color}}var aG="var(--sf-button-radius, 0)";function fye(e){let o=q(e.buttonCorners),t=tr(e.buttonCornerSides);if(o===void 0&&t===null)return null;let r=o===void 0?aG:Ue(Math.max(0,o),e.buttonCornersUnit);return{borderRadius:t===null?r:Fa(r,t)}}function pye(e){let o=(s,l)=>e[Q$(s,l)],t=s=>J$({top:o(kf.top,s),right:o(kf.right,s),bottom:o(kf.bottom,s),left:o(kf.left,s)})??{},r={desktop:o(CI,"desktop"),tablet:o(CI,"tablet"),phone:o(CI,"mobile")},{classes:a,style:n}=yI(t("desktop"),t("mobile"),t("tablet"),void 0,r);return Object.keys(n).length?{className:a.join(" "),style:n}:null}var lE="upper";function dE(e,o,t){let r=e&&typeof e=="object"?e:{},a=Se(r.textStyle),n=a?Se(o?.find(f=>f?.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:d}=t,c=Se(r.case)??lE;return`${l} \xB7 ${d[c]??d[lE]}`}import{usePreviewParts as nK}from"efficient-easel/draw/client";import{encodePartId as sK}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as lK,useEaselStrings as iK}from"efficient-easel/strings";import{PIN_STICK_VAR as nG,PIN_TRACK_POSITION_VAR as sG,pinAttrs as cE,pinStickVars as lG,readPin as TI}from"efficient-shell/format";var gye="Stick to top",mt={min:0,max:200,step:4,fallback:0},Zl={kind:"position",unitKey:"stickTopDistanceUnit"},fE=qn(Zl),[iG,dG,cG]=fE,PI="Pin while scrolling",pE="Scroll",Ut={distance:"--sf-pin-distance",position:"--sf-pin-position",on:"--sf-pin-on",length:"--sf-pin-length",stick:"--sf-pin-stick",trackPosition:"--sf-pin-track-position",header:"--sf-pin-header"},ja="stickTopScreens",fG=[ja,"stickTopScreensTablet","stickTopScreensPhone"],EI="Screens",OI="stickTopStop",Is="screen",uE="Pin stops at",mE=[{value:"header",label:"Under the header"},{value:Is,label:"Screen top"}],hE="header",xE="Under the header: the section stops below the site header. Screen top: it stops at the top edge of the screen, under a see-through header.";function _I(e){return e===Is?Is:"header"}function IE(e){return e===Is?Is:void 0}var Jl="stickAbove",gE="Stays above",bE="On: the pinned box stays on top, and the sections after it scroll under it.";function pG(e){return e.stickAbove===!0}var yE=["stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone",...fE,...fG,OI,Jl],bye=new Set(["IntroBleed"]),yye=new Set(["CategoryBar","DocTabs","Contents"]);function uG(e){return typeof e.stickTop=="boolean"?e.stickTop:e.sticky!==!1}var vI=e=>TI(!0,e).length,AI={any:["stickTop","stickTopTablet","stickTopPhone"].map(e=>({field:e,is:!0}))},SE={all:[{not:{field:"stickTop",in:[!0,!1]}},{not:{field:"sticky",is:!1}}]};function kI(e,o="px"){let t=q(e)??mt.fallback;return o!=="px"?Math.max(mt.min,t):Math.min(mt.max,Math.max(mt.min,Math.round(t)))}function LI(e){return typeof e.stickTopTablet=="boolean"}function RI(e){return typeof e.stickTopPhone=="boolean"}function gs(e,o={}){let t=o.intro?uG(e):e.stickTop===!0,r=e,a=ve(r[iG]),n=kI(e.stickTopDistance,a),s=vI(e.stickTopScreens),l=LI(e),d=l?e.stickTopTablet===!0:t,c=l?ve(r[dG]):a,f=l?kI(e.stickTopDistanceTablet,c):n,u=l?vI(e.stickTopScreensTablet):s,p=RI(e),h=p?e.stickTopPhone===!0:d,I=p?ve(r[cG]):c,g=p?kI(e.stickTopDistancePhone,I):f,C=p?vI(e.stickTopScreensPhone):u;return{desktop:t,desktopDistance:n,desktopUnit:a,desktopScreens:s,tablet:d,tabletDistance:f,tabletUnit:c,tabletScreens:u,ownTablet:l,phone:h,phoneDistance:g,phoneUnit:I,phoneScreens:C,ownPhone:p}}function Sye(e,o={}){let t=gs(e,{intro:o.atScreenTop});if(!t.desktop&&!t.tablet&&!t.phone)return null;let r=o.atScreenTop===!0&&typeof e.stickTop!="boolean",a=t.desktop&&t.desktopScreens>0||t.tablet&&t.tabletScreens>0||t.phone&&t.phoneScreens>0,n=o.above===!0&&pG(e),s=o.track===!0&&!r&&a&&!n,l=(u,p,h,I)=>Ma({tabletClass:"",tabletVar:`${u}-tablet`,phoneClass:"",phoneVar:`${u}-phone`},p,h,I).style,d={...o.atScreenTop||_I(e.stickTopStop)===Is?{[Ut.header]:"0px"}:{},[Ut.distance]:Ue(t.desktopDistance,t.desktopUnit),...l(Ut.distance,Ue(t.desktopDistance,t.desktopUnit),Ue(t.tabletDistance,t.tabletUnit),Ue(t.phoneDistance,t.phoneUnit))};if(s){let u=h=>h?"1":"0",p={...d,...t.desktop?{}:{[Ut.on]:"0"},...l(Ut.on,u(t.desktop),u(t.tablet),u(t.phone)),[Ut.length]:String(t.desktopScreens),...l(Ut.length,String(t.desktopScreens),String(t.tabletScreens),String(t.phoneScreens)),...mG(t.desktop&&t.desktopScreens===0,t.tablet&&t.tabletScreens===0,t.phone&&t.phoneScreens===0,l)};return{attrs:cE(TI(!0),"track").attrs,style:p}}let c=u=>u?"sticky":"static",f={...d,...t.desktop?{}:{[Ut.position]:"static"},...l(Ut.position,c(t.desktop),c(t.tablet),c(t.phone))};return{attrs:cE(TI(!0),"stick",n?{above:n}:{}).attrs,style:f}}function mG(e,o,t,r){let a=[[Ut.stick,nG],[Ut.trackPosition,sG]],[n,s,l]=[e,o,t].map(lG);return Object.fromEntries(a.flatMap(([d,c])=>[...e?[[d,n[c]]]:[],...Object.entries(r(d,n[c],s[c],l[c]))]))}var hG=["column","row","tabs","accordion"];var xG={column:"Stacked",row:"One row",tabs:"Tabs",accordion:"Accordion"},wE={Flex:hG,HeroGroup:["column","row"]},IG={Flex:"row",HeroGroup:"column"},gG={column:"flex-col",row:"flex-row",tabs:"flex-col",accordion:"flex-col"};function bs(e,o){return wE[e].includes(o)?o:IG[e]}function Cye(e,o){return gG[bs(e,o)]}function CE(e){return wE[e].map(o=>({label:xG[o],value:o}))}import{viewKeyAt as FI}from"efficient-easel/screen/lib/content/view-tiers";var Ef=20,bG=["solid","dashed","dotted"],Of=["top","right","bottom","left"],Pye="sf-section-border",Eye="sf-section-border-self",yG=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,SG=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(Ef,Math.max(0,Math.round(e)))}px`:void 0,Ql={kind:"border",unitKey:"sectionBorderUnit"},kE=qn(Ql);function Oye(e){let o=Ql.unitKey;return{desktop:e[FI(o,"desktop")],tablet:e[FI(o,"tablet")],phone:e[FI(o,"mobile")]}}var vE=(e,o)=>o==="px"?SG(e):typeof e=="number"&&Number.isFinite(e)?Ue(Math.max(0,e),o):void 0;function Pf(e,{phone:o=!1,tablet:t=!1,unit:r}={}){if(!e||typeof e!="object")return;let a=o?"-phone":t?"-tablet":"",n={},s=ve(r);for(let l of Of){let d=vE(e[l],s)??vE(e.width,s);d!==void 0&&(n[`--sf-border-${l}-width${a}`]=d)}return typeof e.style=="string"&&bG.includes(e.style)&&(n[`--sf-border-style${a}`]=e.style),typeof e.color=="string"&&yG.test(e.color)&&(n[`--sf-border-color${a}`]=e.color.toLowerCase()),Object.keys(n).length?n:void 0}function BI(e){let{width:o,...t}=e;return typeof o!="number"?e:{...t,...Object.fromEntries(Of.map(r=>[r,t[r]??o]))}}function _ye(e,o,t,r={}){let a=Pf(e,{unit:r.desktop}),n=Pf(t,{tablet:!0,unit:r.tablet}),s=Pf(t,{phone:!0,unit:r.tablet}),l=Pf(o,{phone:!0,unit:r.phone}),d=s||l?{...s,...l}:void 0;return a||n||d?{...a,...n,...d}:void 0}var _f="sf.gapContainer",Ar={min:-32,max:64,step:2},LE={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},ys={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},wG=new Set(["Events","GalleryB"]);function Ka(e,o,t){if(typeof o=="number"&&Number.isFinite(o)&&o>=Ar.min)return o;if(typeof o=="string"){let r=LE[e]?.[o];if(typeof r=="number")return r}return typeof t=="number"&&Number.isFinite(t)?t:ys[e]}var CG="sf-gap-overlap",vG="--sf-gap-overlap",DI="--sf-block-gap",TE="--sf-block-gap-rem",ht={min:0,max:Ar.max,step:Ar.step};function ei(e){if(typeof e!="number"||!Number.isFinite(e))return null;let o=Math.min(Math.max(Math.round(e),ht.min),ht.max);return o-o%ht.step}function Rye(e,o){let t=Aa(e,o,"gap",ht);if(t!==null)return{[DI]:t,[TE]:t};let r=ei(e);return r===null?{}:{[DI]:`${r}px`,[TE]:`${r/16}rem`}}var PE="--sf-block-gap-phone",EE="--sf-block-gap-phone-rem",kG="--sf-block-gap-on-phone",TG="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]",PG="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function Fye(e,o){let t=Aa(e,o,"gap",ht);if(t!==null)return{[PE]:t,[EE]:t};let r=ei(e);return r===null?{}:{[PE]:`${r}px`,[EE]:`${r/16}rem`}}function Bye(e){return ei(e)===null?"":`${TG} ${PG}`}var OE="sf-gap-zone",_E="--sf-gap-len";function Af(e,o){return typeof o=="number"&&Number.isFinite(o)&&o>=Ar.min?!0:typeof o=="string"&&typeof LE[e]?.[o]=="number"}var AE="--sf-gap-len-phone",EG="--sf-gap-len-tablet",oi={min:0,max:Ar.max,step:Ar.step};function na(e){return typeof e=="number"&&Number.isFinite(e)&&e>=oi.min}function NI(e){return e/2}function MI(e,o,t){return na(t)&&!Af(e,o)}function HI(e,o,t,r,a){return na(o)?o:MI(e,t,a)?a:NI(Ka(e,t,r))}var OG={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function Dye(e,o,t,r,a){let n={...na(r)?{[AE]:`${r}px`}:null,...na(a)?{[EG]:`${a}px`}:null};if(!Af(e,o)){let l=`${ys[e]}px`,d=wG.has(e)?`var(--sf-card-gap, ${l})`:l;return{className:` ${OE}`,style:{[_E]:`var(${DI}, ${d})`,[AE]:`var(${kG})`,...n}}}let s=Ka(e,o);return s>=0?{className:` ${OE}`,style:{[_E]:`${s}px`,...n}}:{className:` ${CG} ${OG[t]}`,style:{gap:"0px",[vG]:`${-s/2}px`}}}import{parseHexColor as _G}from"efficient-shell/format";var Mo="var(--section-bg)",ti="inherit";function lr(e,o){return e===ti?Mo:e===void 0?o:Lf(e)}var AG=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function Lf(e){let o=ar(e);return o?Pr(o):e.replace(AG,"var(--site-$1")}var LG={"var(--section-bg)":"band","var(--site-surface)":"surface","var(--site-surface-2)":"surface2"};function UI(e,o,t){let r=lr(e,o);if(!r||r==="transparent")return t.background.toLowerCase();let a=r.trim(),n=a.startsWith("#")?_G(a):null;if(n)return n.toLowerCase();let s=LG[a.replace(/\s+/g,"")];return(s?t[s]:t.background).toLowerCase()}var WI="transparent";function RE(e,o){let t=lr(e,o);return!t||t===WI?"none":t===Mo?"band":null}function FE(e,o,t=o){let r=n=>!n||n==="transparent",a=lr(e,o);return a===t||r(a)&&r(t)}var BE=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],DE={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Ss="var(--wheel-stage)",Rf="transparent",ri="inherit";function zye(e,o){return Lf(zI(e,o))}function zI(e,o){return e===ri?Ss:e==null?o:e===!0?Ss:e===!1?Rf:e}function $ye(e){return typeof e=="string"&&e!==ri?Lf(e):Ss}function Gye(e){return e!==Rf&&e!=="none"&&e!==""}function NE(e,o){return e===ri||e===!0?!0:e==null?o===Ss:!1}var ME="inherit",Ff="fixed",HE=e=>typeof e!="number"&&e!==Ff,RG="var(--sf-heading-max, 9999px)";function Vye(e,o,t,r,a){if(typeof e=="number")return Ue(e,a);if(e===Ff)return o;let n=r?`var(--size-${r}, ${o})`:o;return t==="heading"?`min(${n}, ${RG})`:n}var $I={kind:"fontSize",unitKey:"titleSizeUnit"},GI={kind:"fontSize",unitKey:"bodySizeUnit"},FG=["desktop","mobile"],UE=[$I,GI].flatMap(e=>qn(e,FG));function jI(e){let o=(t,r)=>Nv(e,t,r);return{titleDesktop:o($I,"desktop"),titleMobile:o($I,"mobile"),bodyDesktop:o(GI,"desktop"),bodyMobile:o(GI,"mobile")}}var BG=["page","full"],WE=["full","page"],Va={full:"Full",page:"Content"},KI="inherit",DG=e=>typeof e=="string"&&BG.includes(e),NG=e=>e===KI;function MG(e,o){return NG(e.widthMode)?{mode:"full",inherited:!0}:DG(e.widthMode)?{mode:e.widthMode,inherited:!1}:{mode:o,inherited:o==="full"}}function Jye(e){return MG(e,"page").mode==="full"}var HG={CustomHTML:"rawMarkup",Hero:"hero",HeroSingle:"hero",IntroBleed:"scrollOver",SpecStrip:"background",Timeline:"background",Footprint:"background",Prose:"background",ParagraphsA:"background",Cards:"background",KeyFeatures:"background",Chart:"background",Mockup:"background",Testimonials:"background",TitleWithButtons:"background",Countdown:"background",DocMasthead:"background",DocBody:"background",DocMetaCards:"background",Gallery:"background",GalleryB:"background",Reviews:"background",ReviewForm:"background",Form:"background",AppointmentBooking:"background",FAQ:"background",Events:"background",Split:"both",Breadcrumb:"both",Collections:"both",CatalogFilterBar:"both",AlloyWheelsListing:"both",Banner:"contained",Stats:"contained",Logos:"contained",Divider:"contained",OrderSummary:"contained",DeliveryOptions:"contained",PaymentBadges:"contained",CheckoutCTA:"contained",Flex:"contained",Grid:"contained",ContactCards:"contained",MessagingCards:"contained",OpeningHours:"contained",RateTable:"contained",Manifesto:"contentColumn",SectionHeader:"contentFull",ProductHero:"contentFull",ProductGrid:"productGrid",TimelineTrack:"capped",DetailRows:"capped",FitmentTable:"capped",TyreSizes:"capped",TyreFitment:"capped",EuTyreLabel:"capped",BundleOffer:"capped",CompatibleTyres:"capped",RelatedProducts:"capped",ProcessSteps:"capped",StatsParagraph:"capped",Masthead:"capped",FeaturedCover:"capped",LongRead:"capped",Series:"capped",ContactLocations:"capped",FitmentFinder:"capped",SpecTable:"capped",Subscribe:"capped",SubscribeBlogs:"capped",ContactRouting:"capped",SubmitBuild:"capped"};function Qye(e){return $e(HG,e)}var lo={background:"sectionBackgroundWidth",content:"sectionContentWidth",contentMax:"sectionContentMax",contentMaxUnit:"sectionContentMaxUnit"},eSe={kind:"size",unitKey:lo.contentMaxUnit};function UG(e){let o=e[lo.contentMaxUnit],t=ve(o),r=e[lo.contentMax],a=t==="px"?J0(r):typeof r=="number"&&Number.isFinite(r)&&r>0?r:null,n=ws(e[lo.content])??(a===null?null:"content");return{background:ws(e[lo.background]),content:n,contentMax:n==="content"?a:null,contentMaxUnit:t}}function oSe(e){let o=UG(e);return o.content===null&&e.fullWidth===!0?{...o,content:"full"}:o}function tSe(e){return e.background!==null||e.content!==null}var rSe=e=>({[lo.background]:e}),aSe=e=>e==="full"?{[lo.content]:e,[lo.contentMax]:void 0,[lo.contentMaxUnit]:void 0}:{[lo.content]:e},nSe=e=>({[lo.content]:"content",[lo.contentMax]:e}),sSe=e=>e==="background"?{[lo.background]:void 0}:{[lo.content]:void 0,[lo.contentMax]:void 0,[lo.contentMaxUnit]:void 0},zE="siteWidths",WG=e=>e==="full"||e==="content";function ws(e){return WG(e)?e:null}function $E(e,o){return{[zE]:{background:ws(e),content:ws(o)}}}function lSe(e){let o=e.editor?.metadata?.[zE];return{background:ws(o?.background),content:ws(o?.content)}}import{useEaselSession as dK}from"efficient-easel/screen/lib/session-context";import{BOX_GAP as cK,describedAs as sa,group as $t,iconOf as ks,sharedStyleKinds as ci}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as SO,onDesktopWords as Xa,phoneTwinFields as ng,saidAlignmentGrid as fK,useLengthUnit as pK}from"efficient-easel/screen/lib/document/box-fields";import{createElement as xt}from"react";import{SettingsDefaultReset as zG,SettingsField as $G}from"efficient-easel/panel";import{boxFieldBuilders as GG,describedAs as jG,iconOf as KG,onDesktopWords as VG}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_KIND_UNITS as qG}from"efficient-easel/screen/lib/content/length-units";import{IconPicker as YG,Tooltip as XG,useShellStrings as ZG}from"efficient-shell/ui";import{RotateIcon as JG}from"efficient-easel/icons";var GE=e=>i(e),qa=qG,So=GG(GE,{lengthUnits:qa}),Oo=So.slider,st=So.select,ai=So.Segmented,Cs=So.segmented,ISe=So.alignmentField,gSe=So.alignmentFields,bSe=So.blockAlignmentField,ySe=So.blockAlignmentFields,SSe=So.boxJustifyField,wSe=So.boxAlignField,CSe=So.boxWrapField,jE=So.directionField,Bf=So.gapField,vSe=So.placementField,kSe=So.PlacementGridView,TSe=So.positionFields,Df=So.sidesPaddingFields,ni=So.lengthUnitFields;function KE(e,o){return Oo("Angle",xt(JG),Yd.min,Yd.max,Yd.step,e,"\xB0",o)}var VI=Symbol("efficient-web-builder.picture-picker-row"),QG={width:"3.5rem",height:"2.75rem",words:!0};function qI({value:e}){return ZG().iconNames[e]??e}function YI(e,o,t){return xt(XG,{content:t,className:"sf-pick-tip",children:xt("span",{className:"sf-pick"},xt("span",{className:"sf-pick-pic"},e),xt("span",{className:"sf-pick-cap"},o))})}function ej(e){let o=t=>t.label===void 0?xt(qI,{value:t.value}):i(t.label);return e.map(t=>({value:t.value,...t.label===void 0?{}:{label:i(t.hint??t.label)},icon:YI(t.picture,o(t),t.hint===void 0?o(t):i(t.hint))}))}function VE(e,o){return xt("span",{className:"sf-pick"},xt("span",{className:"sf-pick-pic"},e),xt("span",{className:"sf-pick-cap sf-pick-cap-closed"},o))}function XI(e,o,t,r,a={}){let n=d=>t.some(c=>c.value===d),s=d=>a.resolve?a.resolve(d):n(d)?d:void 0,l=t.map(d=>({value:d.value,...d.label===void 0?{}:{label:d.label},...d.showWhen?{showWhen:d.showWhen}:{}}));return{type:"custom",[VI]:!0,...jG({},{type:"radio",label:e,options:l}),options:l,render:d=>{let{value:c,onChange:f,field:u}=d,p=u?.options,h=ej(t.filter(b=>!p||p.some(P=>P.value===b.value))),I="follows"in d,g=I?s(a.phoneRest?a.phoneRest(d.follows):d.follows)??r:void 0,C=u?.currentValue,w=s(c)??g??s(C)??r,T=c!=null&&c!=="",y=g===void 0?void 0:t.find(b=>b.value===g);return xt($G,{label:i(e),icon:KG(o),action:I?xt(zG,{words:le()?.panel,label:i(e),changed:T,detail:y?.label!==void 0?VG(GE,i(y.label),d.followsView):void 0,disabled:d.readOnly===!0,onReset:()=>f(void 0)}):void 0},xt(YG,{label:i(e),value:w,options:h,onChange:f,columns:a.columns,cell:a.cell??QG,tooltips:!1,disabled:d.readOnly===!0}))}}}import{VIEW_ABOVE as QI}from"efficient-easel/screen/lib/content/length-units";import{jsx as S,jsxs as be}from"react/jsx-runtime";import{NoSymbolIcon as dj}from"efficient-easel/icons";import{useId as cj}from"react";var oj="line",tj=[{label:"None",value:"none"},{label:"Line",value:"line"},{label:"Stripes \xB7 fine",value:"stripes-fine"},{label:"Stripes \xB7 medium",value:"stripes-medium"},{label:"Stripes \xB7 bold",value:"stripes-bold"}],ZI={"stripes-fine":{ink:4,period:12},"stripes-medium":{ink:8,period:18},"stripes-bold":{ink:14,period:28}},OSe=28,rj="-45deg",aj="color-mix(in oklab, var(--accent) 50%, var(--bg))";function nj(e){return e!=="line"&&e!=="none"}var sj={sm:24,md:48,lg:80},lj="md",ij=Object.keys(sj);function _Se(e){return io(ij,lj,e)}function ASe(e){return io(tj,oj,e)}function LSe(e){if(!nj(e))return null;let{ink:o,period:t}=ZI[e];return`repeating-linear-gradient(${rj}, ${aj} 0 ${o}px, transparent ${o}px ${t}px)`}var RSe={kind:"border",unitKey:"thicknessUnit"},FSe={kind:"size",base:"%",unitKey:"lengthPctUnit"};var Nf=44,Mf=28;function me({children:e}){return S("svg",{width:Nf,height:Mf,viewBox:`0 0 ${Nf} ${Mf}`,"aria-hidden":"true",fill:"currentColor",stroke:"currentColor",strokeWidth:1.25,children:e})}var B=({x:e,y:o,w:t,t:r=2,faint:a=!1})=>S("rect",{x:e,y:o,width:t,height:r,rx:r/2,stroke:"none",opacity:a?.45:1}),ke=({x:e,y:o,w:t,h:r})=>S("rect",{x:e,y:o,width:t,height:r,rx:2,fill:"none"}),Wt=({x:e,y:o})=>S("circle",{cx:e,cy:o,r:1.75,stroke:"none"}),_o=({x1:e,y1:o,x2:t,y2:r})=>S("line",{x1:e,y1:o,x2:t,y2:r});function JI(e){let o=20/is,t=5,r=1,a=[],n=0,s=0,l=0;for(let[f,u]of e)n+f>is&&(s+=l*(t+r),n=0,l=0),a.push({x:12+n*o,y:s,w:f*o-r,h:u*t+(u-1)*r}),n+=f,l=Math.max(l,u);let d=s+l*(t+r)-r,c=(Mf-d)/2;return S(me,{children:a.map((f,u)=>S("rect",{x:f.x,y:c+f.y,width:f.w,height:f.h,rx:1,stroke:"none",opacity:.6},u))})}var WSe={bars:be(me,{children:[S(B,{x:8,y:14,w:5,t:10}),S(B,{x:16,y:8,w:5,t:16}),S(B,{x:24,y:18,w:5,t:6}),S(B,{x:32,y:11,w:5,t:13})]}),line:be(me,{children:[S("polyline",{points:"6,22 14,15 22,18 30,8 38,11",fill:"none",strokeWidth:1.75,strokeLinejoin:"round"}),S(_o,{x1:6,y1:25,x2:38,y2:25})]}),donut:be(me,{children:[S("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,opacity:.45}),S("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,strokeDasharray:"34 57",transform:"rotate(-90 22 14)"})]})};function zSe(e){if(e==="none")return S("span",{style:{display:"flex",width:Nf,height:Mf,alignItems:"center",justifyContent:"center"},children:S(dj,{size:20})});if(e==="line")return S(me,{children:S(_o,{x1:4,y1:14,x2:40,y2:14})});let{ink:o,period:t}=ZI[e],r=.4,a=[];for(let n=-12;n<Nf;n+=t*r)a.push(S("polygon",{points:`${n},22 ${n+o*r},22 ${n+o*r+10},6 ${n+10},6`,stroke:"none"},n));return S(fj,{children:a})}function fj({children:e}){let o=`sf-div-${cj().replace(/[^\w-]/g,"")}`;return be(me,{children:[S("clipPath",{id:o,children:S("rect",{x:4,y:6,width:36,height:16,rx:2})}),S("g",{clipPath:`url(#${o})`,children:e})]})}var Hf=({x:e,y:o,w:t,h:r})=>S("rect",{x:e,y:o,width:t,height:r,rx:2,stroke:"none",opacity:.3}),$Se={tabs:be(me,{children:[S(B,{x:5,y:10,w:9}),S(B,{x:18,y:10,w:9,faint:!0}),S(B,{x:31,y:10,w:9,faint:!0}),S(_o,{x1:4,y1:17,x2:40,y2:17}),S(B,{x:4,y:16,w:11,t:2})]}),largeTabs:be(me,{children:[S(_o,{x1:4,y1:5,x2:40,y2:5}),S(Wt,{x:7,y:10}),S(B,{x:11,y:9,w:16}),S(B,{x:31,y:9,w:9,faint:!0}),S(_o,{x1:4,y1:14,x2:40,y2:14}),S(Wt,{x:7,y:19}),S(B,{x:11,y:18,w:13,faint:!0}),S(B,{x:31,y:18,w:9,faint:!0}),S(_o,{x1:4,y1:23,x2:40,y2:23})]})},GSe={card:be(me,{children:[S(ke,{x:10,y:3,w:24,h:22}),S(Hf,{x:12,y:5,w:20,h:10}),S(B,{x:13,y:18,w:16}),S(B,{x:13,y:21,w:11,t:1.5,faint:!0})]}),cover:be(me,{children:[S(Hf,{x:10,y:3,w:24,h:22}),S(ke,{x:10,y:3,w:24,h:22}),S(B,{x:13,y:17,w:16}),S(B,{x:13,y:21,w:11,t:1.5})]})},jSe={cards:be(me,{children:[S(ke,{x:3,y:5,w:11,h:18}),S(ke,{x:17,y:5,w:11,h:18}),S(ke,{x:31,y:5,w:11,h:18}),S(B,{x:5,y:9,w:7}),S(B,{x:19,y:9,w:7}),S(B,{x:33,y:9,w:7}),S(B,{x:5,y:13,w:5,t:1.5,faint:!0}),S(B,{x:19,y:13,w:5,t:1.5,faint:!0}),S(B,{x:33,y:13,w:5,t:1.5,faint:!0})]}),"label-only":be(me,{children:[S("path",{d:"M8.5 7l3 3-3 3-3-3zM22.5 7l3 3-3 3-3-3zM36.5 7l3 3-3 3-3-3z",stroke:"none"}),S(B,{x:5,y:18,w:7}),S(B,{x:19,y:18,w:7}),S(B,{x:33,y:18,w:7})]})},KSe={table:be(me,{children:[S(ke,{x:3,y:5,w:38,h:18}),S(_o,{x1:15.7,y1:5,x2:15.7,y2:23}),S(_o,{x1:28.3,y1:5,x2:28.3,y2:23}),S("path",{d:"M15.7 5v18M28.3 5v18",fill:"none",strokeWidth:2.5}),S(B,{x:6,y:9,w:6,t:3}),S(B,{x:19,y:9,w:6,t:3}),S(B,{x:31,y:9,w:6,t:3}),S(B,{x:6,y:18,w:7,t:1.5,faint:!0}),S(B,{x:19,y:18,w:7,t:1.5,faint:!0}),S(B,{x:31,y:18,w:7,t:1.5,faint:!0})]}),list:be(me,{children:[S(_o,{x1:3,y1:7,x2:13,y2:7}),S(_o,{x1:17,y1:7,x2:27,y2:7}),S(_o,{x1:31,y1:7,x2:41,y2:7}),S(B,{x:3,y:11,w:6,t:3}),S(B,{x:17,y:11,w:6,t:3}),S(B,{x:31,y:11,w:6,t:3}),S(B,{x:3,y:17,w:8,t:1.5,faint:!0}),S(B,{x:17,y:17,w:8,t:1.5,faint:!0}),S(B,{x:31,y:17,w:8,t:1.5,faint:!0})]})},VSe={plain:be(me,{children:[S(B,{x:5,y:12,w:9,t:4}),S(B,{x:18,y:12,w:9,t:4}),S(B,{x:31,y:12,w:9,t:4})]}),cards:be(me,{children:[S(ke,{x:3,y:7,w:11,h:14}),S(ke,{x:17,y:7,w:11,h:14}),S(ke,{x:31,y:7,w:11,h:14}),S(B,{x:5,y:13,w:7}),S(B,{x:19,y:13,w:7}),S(B,{x:33,y:13,w:7})]}),marks:be(me,{children:[S(B,{x:8,y:12,w:6,t:4}),S(B,{x:17,y:12,w:6,t:4}),S(B,{x:26,y:12,w:6,t:4}),S(B,{x:35,y:12,w:3,t:4})]})},qSe={overlay:be(me,{children:[S(Hf,{x:4,y:3,w:36,h:22}),S(ke,{x:4,y:3,w:36,h:22}),S(B,{x:8,y:15,w:18,t:3}),S(B,{x:8,y:20,w:12})]}),stacked:be(me,{children:[S(B,{x:4,y:3,w:18,t:3}),S(B,{x:4,y:8,w:12}),S(Hf,{x:4,y:13,w:36,h:12}),S(ke,{x:4,y:13,w:36,h:12})]})},YSe={split:be(me,{children:[S(B,{x:4,y:6,w:12,t:3}),S(B,{x:4,y:11,w:9,faint:!0}),S(_o,{x1:20,y1:4,x2:20,y2:24}),S(B,{x:24,y:6,w:16}),S(B,{x:24,y:10,w:11,faint:!0}),S(B,{x:24,y:17,w:16}),S(B,{x:24,y:21,w:11,faint:!0})]}),spine:be(me,{children:[S(_o,{x1:9,y1:4,x2:9,y2:24}),S(Wt,{x:9,y:8}),S(B,{x:14,y:7,w:24}),S(Wt,{x:9,y:14}),S(B,{x:14,y:13,w:20}),S(Wt,{x:9,y:20}),S(B,{x:14,y:19,w:24})]}),alternating:be(me,{children:[S(_o,{x1:22,y1:4,x2:22,y2:24}),S(Wt,{x:22,y:8}),S(B,{x:4,y:7,w:14}),S(Wt,{x:22,y:14}),S(B,{x:26,y:13,w:14}),S(Wt,{x:22,y:20}),S(B,{x:4,y:19,w:14})]}),track:be(me,{children:[S(_o,{x1:4,y1:12,x2:40,y2:12}),S(Wt,{x:8,y:12}),S(Wt,{x:22,y:12}),S(Wt,{x:36,y:12}),S(B,{x:4,y:17,w:8}),S(B,{x:18,y:17,w:8}),S(B,{x:32,y:17,w:8}),S(B,{x:4,y:21,w:6,faint:!0}),S(B,{x:18,y:21,w:6,faint:!0}),S(B,{x:32,y:21,w:6,faint:!0})]})},XSe={standard:be(me,{children:[S(B,{x:4,y:5,w:10,t:1.5,faint:!0}),S(B,{x:4,y:10,w:28,t:4}),S(B,{x:4,y:18,w:34,faint:!0}),S(B,{x:4,y:22,w:24,faint:!0})]}),editorial:be(me,{children:[S(B,{x:4,y:5,w:5,t:1.5,faint:!0}),S(B,{x:4,y:10,w:20,t:5}),S(B,{x:28,y:11,w:12,faint:!0}),S(B,{x:28,y:15,w:9,faint:!0}),S(_o,{x1:4,y1:22,x2:40,y2:22})]}),simple:be(me,{children:[S(B,{x:4,y:8,w:10,t:1.5,faint:!0}),S(B,{x:4,y:13,w:26,t:4})]}),statement:be(me,{children:[S(B,{x:4,y:6,w:36,t:7}),S(B,{x:4,y:16,w:24,t:7})]}),natural:be(me,{children:[S(B,{x:4,y:8,w:22,t:3}),S(B,{x:4,y:15,w:34,faint:!0}),S(B,{x:4,y:19,w:28,faint:!0})]}),essay:be(me,{children:[S(B,{x:4,y:5,w:24,t:4}),S(B,{x:4,y:13,w:36,faint:!0}),S(B,{x:4,y:17,w:36,faint:!0}),S(B,{x:4,y:21,w:30,faint:!0})]})},ZSe={"spec-card":be(me,{children:[S(ke,{x:4,y:3,w:36,h:22}),S(B,{x:8,y:7,w:14}),S(ke,{x:8,y:12,w:8,h:9}),S(ke,{x:18,y:12,w:8,h:9}),S(ke,{x:28,y:12,w:8,h:9})]}),fitment:be(me,{children:[S(ke,{x:4,y:4,w:10,h:5}),S(ke,{x:16,y:4,w:10,h:5}),S(ke,{x:28,y:4,w:10,h:5}),S(B,{x:4,y:14,w:34,faint:!0}),S(B,{x:4,y:18,w:34,faint:!0}),S(B,{x:4,y:22,w:34,faint:!0})]}),portal:be(me,{children:[S(ke,{x:4,y:3,w:36,h:22}),S(B,{x:8,y:7,w:10,t:4}),S(B,{x:8,y:14,w:16,faint:!0}),S(B,{x:26,y:18,w:10,t:4})]}),kanban:be(me,{children:[S(ke,{x:4,y:3,w:10,h:22}),S(ke,{x:17,y:3,w:10,h:22}),S(ke,{x:30,y:3,w:10,h:22}),S(B,{x:6,y:6,w:6,t:4}),S(B,{x:6,y:12,w:6,t:4}),S(B,{x:19,y:6,w:6,t:4}),S(B,{x:32,y:6,w:6,t:4}),S(B,{x:32,y:12,w:6,t:4})]}),claims:be(me,{children:[S(B,{x:4,y:5,w:12,faint:!0}),S(B,{x:20,y:4,w:18,t:4}),S(B,{x:4,y:12,w:12,faint:!0}),S(B,{x:20,y:11,w:10,t:4}),S(B,{x:4,y:19,w:12,faint:!0}),S(B,{x:20,y:18,w:14,t:4})]}),browser:be(me,{children:[S(ke,{x:4,y:3,w:36,h:22}),S(_o,{x1:4,y1:8,x2:40,y2:8}),S(B,{x:8,y:11,w:28,t:5,faint:!0}),S(ke,{x:8,y:18,w:8,h:4}),S(ke,{x:18,y:18,w:8,h:4}),S(ke,{x:28,y:18,w:8,h:4})]}),terminal:be(me,{children:[S(ke,{x:4,y:3,w:36,h:22}),S("polyline",{points:"8,9 11,11 8,13",fill:"none"}),S(B,{x:13,y:10,w:14}),S(B,{x:8,y:16,w:22,faint:!0}),S(B,{x:8,y:20,w:16,faint:!0})]})},qE={width:"5.75rem",height:"3.75rem",words:!0},JSe={width:"8.5rem",height:"3.75rem",words:!0},QSe={columns:be(me,{children:[S(ke,{x:3,y:4,w:11,h:8}),S(ke,{x:17,y:4,w:11,h:8}),S(ke,{x:31,y:4,w:11,h:8}),S(B,{x:3,y:16,w:9}),S(B,{x:17,y:16,w:9}),S(B,{x:31,y:16,w:9}),S(B,{x:3,y:20,w:7,t:1.5,faint:!0}),S(B,{x:17,y:20,w:7,t:1.5,faint:!0}),S(B,{x:31,y:20,w:7,t:1.5,faint:!0})]}),"rows-left":be(me,{children:[S(ke,{x:6,y:3,w:14,h:9}),S(B,{x:24,y:5,w:14}),S(B,{x:24,y:9,w:10,t:1.5,faint:!0}),S(ke,{x:24,y:16,w:14,h:9}),S(B,{x:6,y:18,w:14}),S(B,{x:6,y:22,w:10,t:1.5,faint:!0})]}),"rows-right":be(me,{children:[S(ke,{x:24,y:3,w:14,h:9}),S(B,{x:6,y:5,w:14}),S(B,{x:6,y:9,w:10,t:1.5,faint:!0}),S(ke,{x:6,y:16,w:14,h:9}),S(B,{x:24,y:18,w:14}),S(B,{x:24,y:22,w:10,t:1.5,faint:!0})]})};import{TEXT_CONTROL_KINDS as jCe,SCALAR_TEXT_CONTROLS as KCe}from"efficient-easel/draw";function Za(e,o){return i("{value} from {from}",{value:e,from:o})}function uK(){let{blockGap:e}=ue();return e===null?i("this container's own spacing"):Za(`${e}px`,i("Styles"))}function mK({inherited:e,onReset:o,label:t}){return k(Ho,{words:le()?.panel,label:i(t),changed:!e,detail:uK(),onReset:o})}function hK(e){return Bf({...cK,builtIn:ys[e],resolve:(o,t)=>Ka(e,o,t?.siteGap),action:(o,t)=>k(mK,{inherited:!Af(e,o),onReset:()=>t(void 0),label:"Gap"}),mark:{[_f]:e}})}function xK(e){return oo(lt("mobile",{[_f]:e,type:"custom",render:o=>k(bK,{container:e,...o})}),wO)}function IK(e){return oo(lt("tablet",{[_f]:e,type:"custom",render:o=>k(gK,{container:e,...o})}),wO)}var wO={not:{field:"gap",in:Array.from({length:-Ar.min},(e,o)=>Ar.min+o)}};function NCe(e){return{gap:lt("desktop",hK(e)),[pg("gap")]:IK(e),[vs("gap")]:xK(e)}}function gK({container:e,...o}){let[t]=zt("gap"),{siteGap:r}=o.field??{},a=Math.max(oi.min,Ka(e,t,r));return Bf({...oi,builtIn:a,resolve:n=>na(n)?n:a,action:(n,s)=>k(Ho,{words:le()?.panel,label:i("Gap"),changed:na(n),detail:Xa(l=>i(l),`${a}px`),onReset:()=>s(void 0)})}).render(o)}function bK({container:e,...o}){let[t]=zt("gap"),{siteGap:r,siteGapPhone:a}=o.field??{},n=HI(e,void 0,t,r,a);return Bf({...oi,builtIn:n,resolve:s=>HI(e,s,t,r,a),action:(s,l)=>k(Ho,{words:le()?.panel,label:i("Gap"),changed:na(s),detail:Za(`${n}px`,MI(e,t,a)?i("Styles"):i("Desktop")),onReset:()=>l(void 0)})}).render(o)}function MCe(e){return jE({offered:CE(e),fallback:bs(e,void 0),resolve:o=>bs(e,o)})}function HCe(e,o){return pk(o?hk(e,o):[],o)}function yK({inherited:e,onReset:o,label:t}){return k(Ho,{words:le()?.panel,label:i(t),changed:!e,detail:Za(i("Full"),i("the page")),onReset:o})}function Ja({value:e,onChange:o,label:t,placeholder:r,hint:a,multiline:n,hideable:s=!0,markup:l=!0}){let{text:d,hidden:c}=la(e),f=si(null),u=si(null),p=T=>o(s?{text:T,hidden:c}:T),h=()=>o({text:d,hidden:!c}),I=s&&c,g=iO(),C=a?kK(a)?k("span",{className:"sf-hint-while-typing",children:i(a)}):i(a):void 0,w=c?i("Show {label} on the slide",{label:i(t)}):i("Hide {label} on the slide",{label:i(t)});return k(mo,{label:i(t),icon:k(Nj,{}),htmlFor:g,className:I?"is-hidden":void 0,hint:C,action:s?k(fg,{content:w,children:k(bO,{"aria-pressed":c,"aria-label":w,onClick:h,children:c?k(QE,{name:"eye-off",size:14}):k(QE,{name:"eye",size:14})})}):void 0,children:Lr("div",{className:"sf-copybox",children:[l&&k(Wx,{target:n?u:f,value:d,onChange:p}),n?k("textarea",{id:g,ref:u,value:d,placeholder:r===void 0?void 0:i(r),onChange:T=>p(T.target.value)}):k("input",{id:g,ref:f,type:"text",value:d,placeholder:r===void 0?void 0:i(r),onChange:T=>p(T.target.value)})]})})}function UCe(e,o){return{...e,[bj]:o}}function WCe(e){let o=e[Rr];if(!o)throw new Error("withOffPage: the field holds no authored text");return{...e,[Rr]:{...o,offPage:!0}}}function jf(e){return!e||typeof e!="object"?!1:e[Rr]?.offPage===!0}function zCe(e){if(!e[Rr])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[$x]:!0}}function CO(e){return ms(e)}function $Ce(e){let o=e[Rr];if(!o)throw new Error("withIdentifier: the field holds no authored text");return{...e,[Rr]:{...o,identifier:!0}}}function VCe(e,o){if(!e[Rr])throw new Error("inOwnBox: the field holds no authored text");let{[tK]:t,...r}=e;return{...r,[zx]:!0,render:o}}var SK=new Set(aK),$f={type:"radio",options:[{value:!0},{value:!1}]},vO={text:{type:"object",objectFields:{text:{type:"text"},hidden:$f}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:$f}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},Qa=(e,o)=>{let t=sa({...o,[Rr]:e},{...vO[e.control],label:e.label});if(!SK.has(e.control))return t;let r=o.render;return{...yO(t,"authored-copy"),render:a=>k(VP,{name:a.name,children:r(a)})}},qCe="Everything else on this block comes from the linked post. Unlink it to edit by hand.",wK={field:"source.slug",set:!0},YCe={not:wK},CK="Select a word, then press the highlighter.",vK=new Set([CK]),kK=e=>vK.has(e);function XCe(e,o,t){return Qa({control:"text",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>k(Ja,{value:r,onChange:a,label:e,placeholder:o,hint:t})})}function ZCe(e,o,t){return Qa({control:"textarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>k(Ja,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0})})}function JCe(e,o,t){return Qa({control:"plainText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>k(Ja,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1,markup:!1})})}function QCe(e,o,t){return Qa({control:"copyText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>k(Ja,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1})})}function eve(e){return{type:"custom",[Ij]:{label:e},...sa({},{type:"text",label:e}),render:({value:o,onChange:t})=>k(K0,{value:xj(o),onChange:t,label:e})}}function ove(e,o,t){return Qa({control:"plainTextarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>k(Ja,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0,hideable:!1})})}var kO={Design:yj,Animation:wj};function tve(e,o){return{type:"custom",render:()=>k(TK,{text:e,values:o})}}function TK({text:e,values:o}){return k("p",{className:"sf-note",children:i(e,o)})}function rve(e){return ia(e)!==null&&e?.tabs!==void 0}var eO=new Map;function Kf(e,o){let t=`${e}\0${o?o.join(""):""}`,r=eO.get(t)??{type:"custom",tabs:o,[dO]:{label:e,level:1},bucket:e,marker:!0,render:()=>k(Fr,{})};return eO.set(t,r),r}var oO=new Map;function mg(e){let o=oO.get(e)??{type:"custom",[dO]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>k(Fr,{})};return oO.set(e,o),o}function PK(e){let o=e;return o?.marker===!0&&typeof o.fold=="string"?o.fold:null}function TO(e,o){return PK(e)===o?e:{...e,marker:!0,fold:o,render:()=>k(Fr,{})}}function PO(e){let o=e;if(o.marker===!0&&o.fold===void 0)return e;let{fold:t,...r}=e;return{...r,marker:!0,render:()=>k(Fr,{})}}function hg({title:e,children:o}){let[t,r]=li(()=>!eg.has(e));return k(Uj,{title:e,open:t,onToggle:a=>{r(a),a?eg.delete(e):eg.add(e)},children:o})}var eg=new Set;function EK({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 Lr("div",{className:"sf-swatches",children:[e.map(l=>{let d=r?.[l]?i(r[l]):l;return k(fg,{content:d,children:k(qj,{color:l,selected:o.toLowerCase()===l.toLowerCase(),onClick:()=>t(l),"aria-label":d})},l)}),k("span",{className:"sf-swatch-hex",children:s})]})}function ave(e,o,t=!1){return{type:"custom",render:({value:r,onChange:a})=>k(OK,{label:e,builtIn:o,followsBand:t,value:r,onChange:a})}}function OK({label:e,builtIn:o,followsBand:t,value:r,onChange:a}){let n=typeof r=="string"?r:void 0,{colors:s,n:l}=Sg(),d={background:s.background,surface:s.surface,surface2:ic(s),band:Kv(s)},c=t?Mo:o,f=FE(n,o,c),u=UI(void 0,c,d),p=t?ti:void 0,h=c===Mo?i("the theme's section background"):i("Theme {n} background",{n:l}),I=_K(n,o,s,l,d,a),g=Za(u.toUpperCase(),h),C=ar(n),w=C?ds(C,s,l):null;return w?k(Yo,{label:i(e),icon:k(YE,{}),value:w.hex,caption:w.words,onChange:a,changed:!0,onReset:()=>a(p),resetTo:g,choices:I}):k(Wl,{label:i(e),icon:k(YE,{}),value:f?"":UI(n,o,d),inherited:u,resetTo:g,onChange:a,onReset:()=>a(p),choices:I})}function _K(e,o,t,r,a,n){let s=RE(e,o);return[{label:i("No fill"),color:"",selected:s==="none",onPick:()=>n(WI)},{label:`${i("Section band")} \xB7 ${a.band.toUpperCase()}`,color:a.band,selected:s==="band",onPick:()=>n(Mo)},...yg(ar(e)??"",t,r,n)]}function AK(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=t,n=NE(a,o);return k(mo,{label:i(e),icon:k(rg,{}),changed:!n,action:k(Ho,{words:le()?.panel,label:i(e),changed:!n,detail:i("the theme's image stage"),onReset:()=>r(ri)}),children:EK({swatches:BE,current:n?Ss:zI(a,o),onPick:r,names:DE})})}}}function Vf(e=t=>t,o){return ci({_gSectionTheme:$t(dk),sectionAccent:{type:"custom",render:({value:t,onChange:r})=>k(b0,{value:e(t),onChange:r,followLabel:o})}})}function qf(e){let o=Po(),t=Tr(e?.view),r=s=>ug(e.valueKey,s),a=e.numbersIn??(s=>q(o[r(s)])!==void 0),n=e.followsView??KK(t,a);return pK({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:qa,label:i(e.label),grid:e.grid,hasOwn:a(t),view:{tier:t,numbersIn:a,followsView:n},convertTo:e.convertTo??(s=>{let l=q(o[r(t)]);return l===void 0?{}:{[r(t)]:s(l)}})})}function Zo({min:e,max:o,step:t,value:r,onChange:a,suffix:n="",readout:s=!0,notch:l,ariaLabel:d,disabled:c=!1,placeholder:f,placeholderWord:u,onClear:p,units:h}){let I=l!==void 0&&Number.isFinite(l)&&l>=e&&l<=o;return k("div",{className:I?"sf-slider has-notch":"sf-slider",style:I?{"--sf-notch":(l-e)/(o-e)}:void 0,children:k(oK,{min:e,max:o,step:t,value:r,...r===null&&f!==void 0?{placeholderValue:f}:{},...u?{emptyLabel:i(u)}:{},suffix:n||void 0,...h?{units:h}:{},showInput:s,label:d===void 0?void 0:i(d),disabled:c,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:g=>{g===null?p?.():g!==r&&a(g)}})})}function LK(e,o){let{min:t,max:r,step:a=1,unsetLabel:n,hint:s,restTrack:l,unsetMark:d,icon:c,unit:f="px"}=o;return{type:"custom",render:({value:u,onChange:p})=>{let h=typeof u=="number"?u:null,I=h===null;return k(mo,{label:i(e),icon:c?ks(c):void 0,value:I?d||n===void 0?void 0:i(n):`${h}${f}`,changed:!I,action:d?sg(d,{changed:!I,onReset:()=>p(null)}):k(Ho,{words:le()?.panel,label:i(e),changed:!I,onReset:()=>p(null)}),hint:typeof s=="string"?i(s):s,children:l?l({min:t,max:r,step:a,px:h,label:e,onChange:p}):Zo({min:t,max:r,step:a,value:h??t,readout:!1,ariaLabel:e,onChange:p})})}}}var ii="Corners",RK={kind:"radius"};function xg(e){return{type:"custom",render:o=>{let{value:t,onChange:r}=o,a=typeof t=="number"&&Number.isFinite(t)?t:null,n=a!==null;return k(mo,{label:i(ii),icon:k(fO,{}),changed:n,action:sg(e.mark,{changed:n,onReset:()=>r(null)}),hint:e.hint,children:k(FK,{tier:e,px:a,name:o.name,onRadius:r})})}}}function zt(e){let o=Ya();return[o?.values?.[e],t=>o?.onChange(e,t)]}function EO(){return yO({type:"custom",render:()=>k(rK,{})},"always")}function ta(){let e=Ya();return o=>e?.onChangeMany(o)}function FK({tier:e,px:o,name:t,onRadius:r}){let a=e.useFollowed(),[n,s]=zt(e.sidesKey),l=ta(),d=qf({row:e.row??RK,label:ii,grid:{min:Uo,max:Vr,step:e.step??1},valueKey:t??"",view:"desktop"}),c=tr(n)??[...Rc];return k(Yj,{label:i(ii),value:c,corners:TT,onChange:f=>{let u=tr(f)??[];s(u.length===Rc.length?null:u)},radius:o,onRadiusChange:d&&t?f=>l({[t]:f,...d.unitPatch(f===null)}):r,radiusMin:d?.grid.min??Uo,radiusMax:d?.grid.max??Vr,radiusStep:d?.grid.step??e.step??1,radiusPlaceholder:d&&d.unit!=="px"?"\u2013":String(a),...d?{radiusUnit:d.unit,units:d.units}:{}})}function OO(e,o){return ni(e,o)}function _O(){return EO()}function BK({label:e,changed:o=!1,onReset:t=()=>{}}){let{cornerRadiusPx:r}=ue(),a=typeof r=="number"?`${r}px`:i("not set");return k(Ho,{words:le()?.panel,label:i(e),changed:o,detail:r==null?i("the built-in corners"):Za(a,i("Styles")),onReset:t})}function DK(){let{cornerRadiusPx:e}=ue();return typeof e=="number"?e:Uo}function NK(){return xg({sidesKey:"sectionCornerSides",row:Ll,useFollowed:DK,mark:k(BK,{label:ii}),hint:MK})}var MK="Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here.";function Yf(){return ci({_gShape:$t("Shape"),sectionCorners:NK(),...OO(Ll,"sectionCorners"),sectionCornerSides:_O(),...Er("sectionBorder",jK),...ni(Ql,"sectionBorder",{tablet:!0,phone:!0})})}var HK=()=>({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 UK(e){let o=Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""));return Object.keys(o).length?o:void 0}function WK(){let e;try{let o=xo(ue().theme);e=o.themes[o.selected]?.line}catch{e=void 0}return e||Wv.line}function zK({value:e,onChange:o,placeholder:t,presets:r,sides:a=!0,styles:n=!0,above:s={},length:l}){let d=e&&typeof e=="object"?e:{},[c,f]=li(()=>a?jj(d,s):!1),u=HK(),p=h=>UK(a&&n?h:{width:h.width,color:h.color,...n?{style:h.style}:{}});return k(mo,{label:i("Border"),icon:k(Cj,{}),action:a?k($j,{each:c,label:i("Each side"),onChange:f}):void 0,children:k(zj,{label:i("Border"),value:d,each:c,onChange:h=>o(p(h)),placeholder:t,presets:r,words:l?{...u,unit:l.unit}:u,styles:n,max:l?.grid.max??Ef,...l?{step:l.grid.step,units:l.units}:{}})})}function $K({value:e,onChange:o,view:t}){let[r]=zt("sectionBorder"),[a]=zt(pg("sectionBorder")),n=WK(),s=p=>p&&typeof p=="object"?p:{},l=t==="phone"?{...BI(s(r)),...BI(s(a))}:t==="tablet"?s(r):{},d=Po(),c=ta(),f=we("sectionBorder",t),u=qf({row:Ql,label:"Border",grid:{min:0,max:Ef,step:1},valueKey:"sectionBorder",view:t,numbersIn:p=>og(d[ug("sectionBorder",p)]),convertTo:p=>{let h=s(d[f]);return og(h)?{[f]:GK(h,p)}:{}}});return k(zK,{value:e,length:u,onChange:u?p=>c({[f]:p,...u.unitPatch(!og(p))}):o,placeholder:{sides:Gj(l),style:l.style??"solid",color:l.color||n},presets:[n],above:l})}var AO=["width",...Of];function og(e){if(!e||typeof e!="object")return!1;let o=e;return AO.some(t=>q(o[t])!==void 0)}function GK(e,o){let t={...e};for(let r of AO){let a=q(t[r]);a!==void 0&&(t[r]=o(a))}return t}function jK(e){return{type:"custom",render:({value:o,onChange:t})=>k($K,{value:o,onChange:t,view:e})}}function KK(e,o){let t=QI[e];for(;t&&QI[t]!==null&&!o(t);)t=QI[t];return t??e}function nve(e){return{type:"custom",render:()=>k(VK,{partKey:e})}}function VK({partKey:e}){let[o]=zt("id"),[t]=zt("_partStyles"),{textStyles:r}=ue(),a=iK(),n=null;try{n=nK().select}catch{n=null}let s=t&&typeof t=="object"?t[e]:void 0,l=Array.isArray(r)?r:null;return k(Hj,{name:i("Text"),preview:dE(s,l,{noStyle:i("No style"),styleName:a.textStyles.styleName,cases:(a.copy.panel??lK.copy.panel).cases}),onOpen:()=>{n&&typeof o=="string"&&n(sK(o,e))}})}function LO(e){let{cornerRadiusPx:o}=ue(),t=typeof o=="number"?o:e,r=null;try{let{appState:n,selectedItem:s}=Gf(d=>d),l=s?.props?.id?String(s.props.id):void 0;r=l?OP(n?.data,l)?.props??null:null}catch{r=null}if(!r)return t;let a=r.sectionCorners;return cx(a)?a:t}function qK({label:e,changed:o=!1,onReset:t=()=>{}}){let r=LO(Uo);return k(Ho,{words:le()?.panel,label:i(e),changed:o,detail:Za(`${r}px`,i("the section")),onReset:t})}function YK(){return k(Fr,{children:i("Follows the section's Corners until you set a number here.")})}function XK(){return xg({sidesKey:"cardCornerSides",row:Rl,useFollowed:()=>LO(Uo),mark:k(qK,{label:ii}),hint:k(YK,{})})}function ZK(){return{type:"custom",render:()=>k(RT,{})}}function sve(){return{_gShape:$t("Shape"),cardCorners:XK(),...OO(Rl,"cardCorners"),cardCornerSides:_O(),cardCornersApplyAll:ZK()}}function JK(){return sa({type:"custom",[VI]:!0,render:e=>k(e8,{...e})},{type:"select",label:Oa,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function QK(e,o){let t=Ih(e);if(t!=="custom")return i(xh.find(a=>a.value===t)?.label??"");let r=gO(ec(e,o),o);return r?[...r,100-r.reduce((a,n)=>a+n,0)].join(" / "):i("Custom")}function e8(e){let{value:o,onChange:t}=e,[r]=zt("content"),a=Array.isArray(r)?r.length:0,n="follows"in e,s=o!=null,l=s?o:n?e.follows:void 0,d=Ih(l),c=a>=2&&a<=ZE,f=()=>[...Jj[a]??[]],u=si(null),p=w=>{let T=u.current;T&&JSON.stringify(w)===JSON.stringify(T.shares)?t(T.value):w&&t(w)},h=w=>{w===d||w==="custom"&&!c||t(w==="custom"?f():w)},I=i("The width bar works for 2 to {count} blocks.",{count:ZE}),g=s&&(n||o!=="content"),C=eK().widths.hint(a,Zj);return k(mo,{label:i(Oa),icon:k(lg,{}),changed:g,hint:d!=="custom"?void 0:c?C:I,action:k(Ho,{words:le()?.panel,label:i(Oa),changed:g,disabled:e.readOnly===!0,detail:n?Xa(w=>i(w),QK(e.follows,a),e.followsView):i("Fit content"),onReset:()=>t(void 0)}),children:Lr("div",{className:"sf-share-row",children:[k("div",{className:"sf-share-pick",children:k(IO,{label:i(Oa),value:d,options:xh.map(w=>({value:w.value,label:w.value==="custom"&&!c?I:i(w.label),icon:YI(k("span",{className:"sf-gallery-pic sf-share-pic",children:RO(w.weights).map((T,y)=>k("i",{style:{gridColumn:`span ${T}`}},y))}),i(w.label),w.value==="custom"&&!c?I:i(w.label))})),onChange:h,columns:3,cell:FO,tooltips:!1,disabled:e.readOnly===!0})}),d==="custom"&&c?k("div",{onFocus:()=>{u.current={value:o,shares:gO(ec(l,a),a)}},onBlur:()=>{u.current=null},children:k(Qj,{label:i(Oa),count:a,value:ec(l,a),onChange:p,readOnly:e.readOnly===!0})}):null]})})}function RO(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 lve(){return st(lv,k(_j,{}),yh,yh[0].value)}function ive(){return lt("mobile",XI(Oa,k(lg,{}),av.map(e=>({label:e.label,value:e.value,picture:k("span",{className:"sf-gallery-pic sf-share-pic",children:RO(e.weights).map((o,t)=>k("i",{style:{gridColumn:`span ${o}`}},t))})})),nv,{columns:2,cell:FO}))}var FO={width:"5.75rem",height:"3.25rem",words:!0};function dve(){return ng("share",JK(),SO)[pg("share")]}function o8(){return lt("mobile",Oo(gh,k(cO,{}),oc,rv,1,oc,"",{clear:{phoneFollows:!1,hint:oc}}))}var tO={read:e=>e.phoneRow,write:(e,o,t)=>({phoneRow:t}),fieldKey:()=>"phoneRow",ownField:!0};function cve(){let e=Oo(gh,k(cO,{}),bh,sv,1,bh,"",{clear:{emptyLabel:"Auto"}}),o=ng("columns",e,{...tO,tablet:SO.tablet}),t=ng("columns",e,tO,{phoneRow:o8()});return{...o,phoneRow:t.phoneRow}}function fve(e,o,t,r,a,n,s){return{type:"custom",render:({value:l,onChange:d,name:c})=>k(t8,{label:e,min:o,max:t,step:r,fallback:a,role:n,value:l,onChange:d,name:c??"",length:s})}}function t8({label:e,min:o,max:t,step:r,fallback:a,role:n,value:s,onChange:l,name:d,length:c}){let f=Po(),u=ta(),p=Tr(c?.view),h=qf({row:c?.row??{kind:"fontSize"},label:e,grid:{min:o,max:t,step:r},valueKey:c?d:"",view:c?.view??"desktop",numbersIn:g=>g===p&&typeof f[d]=="number",followsView:p,convertTo:g=>typeof f[d]=="number"?{[d]:g(f[d])}:{}}),I=g=>h?u({[d]:g,...h.unitPatch(typeof g!="number")}):l(g);return k(mo,{label:i(e),icon:k(Ex,{noun:n}),action:k(Ho,{words:le()?.panel,label:i(e),changed:!HE(s),detail:i("the Text style in Styles"),onReset:()=>I(ME),defaultAction:{onPress:()=>I(Ff),title:i("Keep this section's own built-in size"),icon:k(vj,{})}}),children:Zo({min:h?.grid.min??o,max:h?.grid.max??t,step:h?.grid.step??r,value:typeof s=="number"?s:a,...h?{suffix:h.unit,units:h.units}:{suffix:"px"},ariaLabel:e,onChange:I})})}function rO(e,o,t){return[{label:"Auto",value:""},...Array.from({length:e},(r,a)=>({label:a===0?`1 ${o}`:`${a+1} ${t}`,value:String(a+1)}))]}function pve(){return{_gCellWidth:$t("Cell size"),gridSpan:st("Positions",k(lg,{}),rO(Hc,"position","positions"),""),gridRowSpan:st("Rows tall",k(ig,{}),rO(Tx,"row","rows"),"")}}function Po(){let e=null,o=null;try{e=lO(Ig),o=Gf(t=>t).selectedItem}catch{o=null}return e??o?.props??{}}var Ig=uj(null);function r8({min:e,max:o,step:t,px:r,label:a,onChange:n,desktopKey:s,fallback:l}){let d=Po()[s],c=rf(void 0,d,l);return k(Fr,{children:Zo({min:e,max:o,step:t,value:rf(r,d,l),readout:!1,ariaLabel:a,notch:c,onChange:n})})}function a8({label:e,desktopKey:o,fallback:t,unit:r="px",changed:a=!1,onReset:n=()=>{}}){let s=Po()[o],l=rf(void 0,s,t);return k(Ho,{words:le()?.panel,label:i(e),changed:a,detail:Xa(d=>i(d),`${l}${r}`),onReset:n})}function n8(e){return LK(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:k(a8,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:o=>k(r8,{...o,desktopKey:e.desktopKey,fallback:e.fallback})})}var s8={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},l8={Top:dg,Bottom:uO,Left:mO,Right:hO},i8=e=>{let o=l8[e];return k(o,{})};function uve(e={}){let o=e.keys?.top??"sectionPaddingTop",t=e.keys?.bottom??"sectionPaddingBottom",r=e.group!==!1,a=C=>s8[C],n=C=>Oo(a("Top"),k(dg,{}),ut.min,ut.max,ut.step,C,"px"),s=(C,w,T,y=ut)=>lt("mobile",n8({label:a(C),icon:i8(C),desktopKey:w,min:y.min,max:y.max,step:y.step,fallback:T})),l=e.top??ut.min,d=e.bottom??ut.min,c="sectionPaddingLeft",f="sectionPaddingRight",u=e.sideBounds??ut,p=e.side??u.min,h=e.sidePhone??p,I=e.phone===!0,g=C=>I?lt("desktop",C):C;return ci({...r?{_gSpacing:$t("Padding")}:{},[o]:g(n(l)),...I?{[vs(o)]:s("Top",o,l)}:{},...e.only==="top"?{}:{[t]:g(Oo(a("Bottom"),k(uO,{}),ut.min,ut.max,ut.step,d,"px")),...I?{[vs(t)]:s("Bottom",t,d)}:{}},...e.sides?{[c]:g(Oo(a("Left"),k(mO,{}),u.min,u.max,u.step,p,"px")),...I?{[vs(c)]:s("Left",c,h,u)}:{},[f]:g(Oo(a("Right"),k(hO,{}),u.min,u.max,u.step,p,"px")),...I?{[vs(f)]:s("Right",f,h,u)}:{}}:{}})}function mve(e,o){let t=Object.fromEntries(Object.entries(o).map(([n,s])=>[n,n in e&&ia(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 Wf="Width";function Xf(e,o=WE,t=!0){let r=o.map(a=>({label:Va[a],value:a}));return ci({...t?{_gWidth:$t(Wf)}:{},widthMode:{type:"custom",render:({onChange:a,field:n})=>k(mo,{label:i(Wf),icon:k(Mj,{}),action:t?k(yK,{inherited:n?.inherited??!1,onReset:()=>a(KI),label:Wf}):void 0,children:ai({options:r,value:n?.currentValue||e,onChange:a,ariaLabel:Wf})})}})}function Zf({fill:e=!1}={}){let o=(a,n)=>({type:"custom",render:({value:s,onChange:l})=>k(d8,{value:s,onChange:l,view:a,badge:n,fill:e})}),t=()=>ag("sectionHeightMode"),r=()=>ag("sectionHeightMode");return ci({_gHeight:$t(es),...Er("sectionHeightMode",a=>a==="desktop"?o(a):o(a,n=>k(u8,{view:a,onClear:()=>n(void 0)}))),...Er("sectionHeightValue",t),...Er("sectionHeightUnit",r)})}function d8({value:e,onChange:o,view:t,badge:r,fill:a=!1}){let n=Po(),{mode:s,number:l,unit:d}=c8(t,n,e);return k(mo,{label:es,icon:ks(k(ig,{})),action:r?r(o):void 0,children:Lr("div",{className:"es-width-stack",children:[ai({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...a?[{label:"Fill",value:"fill"}]:[]],value:s,onChange:o,ariaLabel:es}),l?k(p8,{view:t,mode:s,menu:d}):null]})})}function BO(e,o){return e==="phone"&&hc(o)?Pk(o):kk(o)}function Jf(e,o){return e==="desktop"||(e==="tablet"?hc(o):Tk(o))?null:BO(e,o)}function c8(e,o,t){let r=(a=>wk.includes(a))(t)?t:Jf(e,o)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function f8(e,o,t,r){let a=Jf(e,o);return!a||e==="desktop"?null:r===void 0?{}:{[we("sectionHeightMode",e)]:a.mode,...a.mode==="fixed"?{[we("sectionHeightUnit",e)]:a.unit}:{},...t==="sectionHeightUnit"?{[we("sectionHeightValue",e)]:a.value}:{},[we(t,e)]:r}}function aO(e,o,t){let r=Ya(),a=Jf(e,Po());return!r||!a?{followed:null,write:t}:{followed:a,write:n=>r.onChangeMany(s=>{let l=f8(e,s,o,n);return l===null?{[we(o,e)]:n}:Object.keys(l).length?l:null})}}function p8({view:e,mode:o,menu:t}){let r=Ya(),a=Po(),n=we("sectionHeightValue",e),s=we("sectionHeightUnit",e),l=C=>w=>r?.onChangeMany(()=>({[C]:w})),{followed:d,write:c}=aO(e,"sectionHeightValue",l(n)),{write:f}=aO(e,"sectionHeightUnit",l(s)),u=o==="screen"?"%":a[s],p=(d?d.unit:u)==="%"?"%":"px",h=p==="%"?vk:Ck,I=a[n],g=t?{options:["px","%"],label:i("Unit"),onChange:C=>f(C)}:void 0;return Zo({min:h.min,max:h.max,step:h.step,value:d?null:typeof I=="number"?I:h.fallback,...d?{placeholder:d.value}:{},suffix:p,...g?{units:g}:{},ariaLabel:es,onChange:c})}function u8({view:e,onClear:o}){let t=Po(),r=Jf(e,t)===null,a=e==="phone"&&hc(t),n=BO(e,t),s=Xa(l=>i(l),n.mode==="auto"?i("Auto"):`${n.value}${n.unit}`,a?"tablet":"desktop");return k(Ho,{words:le()?.panel,label:i(es),changed:r,detail:s,onReset:o})}function gg(e={}){let o=e.intro===!0,t=n=>({type:"custom",render:({value:s,onChange:l,id:d,name:c})=>k(y8,{value:s,onChange:l,labelId:`${d??c??"stickTop"}-label`,view:n,intro:o})}),r=n=>({type:"custom",render:({value:s,onChange:l})=>k(I8,{value:s,onChange:l,view:n,intro:o})}),a=n=>({type:"custom",render:({value:s,onChange:l})=>k(g8,{value:s,onChange:l,view:n,intro:o})});return{_gStick:$t(pE,{dot:o?x8:AI}),...Er("stickTop",t),...Er("stickTopDistance",r),...ni(Zl,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?Er(ja,a):{},...o?{}:{[OI]:m8()},...o||e.above===!1?{}:{[Jl]:h8()}}}function m8(){let e=st(uE,k(dg,{}),mE,hE);return lt("desktop",{...e,render:o=>{let t=e.render({...o,value:_I(o.value),onChange:r=>o.onChange(IE(r))});return sg(t,{hint:i(xE)})}})}function h8(){let e=NO(gE,!1,k(xO,{}),bE);return lt("desktop",{...e,render:o=>e.render({...o,onChange:t=>o.onChange(t===!0?!0:void 0)})})}var x8={any:[AI,SE]};function DO(e,o,t,r,a){let n=Ya(),s=Po(),l=e==="desktop"||di(e,s)?null:bg(e,gs(s,{intro:r}));return{followed:l,write:(l||a)&&n?d=>n.onChangeMany(c=>{let f=b8(e,c,d,o,r),u=f===null?{[we(o,e)]:d}:f;return Object.keys(u).length?{...u,...a?.(d)??{}}:null}):t}}function I8({value:e,onChange:o,view:t,intro:r}){let a=Po(),n=gs(a,{intro:r}),s=f=>{let u=fc(f);return u==="desktop"||di(u,a)},l=qf({row:Zl,label:"Distance from top",grid:{min:mt.min,max:mt.max,step:mt.step},valueKey:"stickTopDistance",view:t,numbersIn:f=>s(f)&&q(a[ug("stickTopDistance",f)])!==void 0,followsView:t==="phone"&&n.ownTablet?"tablet":"desktop"}),{followed:d,write:c}=DO(t,"stickTopDistance",o,r,l?f=>l.unitPatch(f===void 0):void 0);return k("div",{className:"sf-field",children:Zo({min:l?.grid.min??mt.min,max:l?.grid.max??mt.max,step:l?.grid.step??mt.step,value:d?null:typeof e=="number"?e:mt.fallback,...d?{placeholder:d.distance}:{},...l?{suffix:l.unit,units:l.units}:{suffix:"px"},ariaLabel:i("Distance from top"),onChange:c})})}function g8({value:e,onChange:o,view:t,intro:r}){let{followed:a,write:n}=DO(t,ja,o,r);return k(mo,{label:i(EI),icon:ks(k(ig,{})),children:Zo({min:Uf.min,max:Uf.max,step:Uf.step,value:a?null:q(e)??Uf.default,...a?{placeholder:a.screens}:{},ariaLabel:i(EI),onChange:n})})}function di(e,o){return e==="tablet"?LI(o):RI(o)}function bg(e,o){return e==="phone"?{on:o.tablet,distance:o.tabletDistance,unit:o.tabletUnit,screens:o.tabletScreens}:{on:o.desktop,distance:o.desktopDistance,unit:o.desktopUnit,screens:o.desktopScreens}}function b8(e,o,t,r="stickTopDistance",a=!1){if(e==="desktop"||di(e,o))return null;if(t===void 0)return{};let n=bg(e,gs(o,{intro:a})),s=e==="phone"&&di("tablet",o)?f=>we(f,"tablet"):f=>f,l=(f,u)=>o[s(f)]==null?{}:{[we(f,e)]:u},d=Zl.unitKey,c=o[s(d)]==null?{}:{[we(d,e)]:n.unit};return{[we("stickTop",e)]:!0,...l("stickTopDistance",n.distance),...c,...l(ja,n.screens),[we(r,e)]:t}}function y8({value:e,onChange:o,labelId:t,view:r,intro:a}){let n=Po(),s=gs(n,{intro:a}),l=r==="phone"?s.phone:r==="tablet"?s.tablet:a?s.desktop:e===!0,d=r==="phone"&&s.ownTablet,c=r==="desktop"?null:bg(r,s),f=c?.on?Ue(c.distance,c.unit):i("Off");return k(mo,{label:i(PI),labelId:t,icon:ks(k(xO,{})),action:Lr(Fr,{children:[r!=="desktop"?k(Ho,{words:le()?.panel,label:i(PI),changed:di(r,n),detail:Xa(u=>i(u),f,d?"tablet":"desktop"),onReset:()=>o(void 0)}):null,k(cg,{checked:l,onChange:o,ariaLabelledBy:t})]})})}var nO="e.g. about";function Qf(){return{_gAnchor:$t("Anchor"),anchor:Qa({control:"plainText",label:"Name",placeholder:nO},{type:"custom",render:({value:e,onChange:o})=>k(uP,{value:e,onChange:o,nameBox:(t,r)=>k(Ja,{value:t,onChange:r,label:"Name",placeholder:nO,hideable:!1,markup:!1})})})}}function hve(e,o,t){return{type:"custom",render:({value:r,onChange:a,id:n,name:s})=>{let l=`${n??s??e}-datetime`,d=Date.parse(typeof r=="string"?r:"");return k(mo,{label:i(e),icon:o,htmlFor:l,hint:t===void 0?void 0:i(t),children:k(Xj,{id:l,value:Number.isFinite(d)?new Date(d):null,onChange:c=>a(c?c.toISOString():"")})})}}}function NO(e,o,t,r){return{type:"custom",...sa({},{...$f,label:e}),render:a=>{let{value:n,onChange:s,id:l,name:d}=a,c="follows"in a,f=a,u=typeof n=="boolean",p=typeof f.follows=="boolean"?f.follows:o,h=u?n:c?p:o,I=`${l??d??e}-label`,g=f.readOnly===!0,C=k(cg,{checked:h,onChange:s,disabled:g,ariaLabelledBy:I});return k(mo,{label:i(e),labelId:I,icon:t,hint:r===void 0?void 0:i(r),action:c?Lr(Fr,{children:[k(Ho,{words:le()?.panel,label:i(e),changed:u,detail:f.followsNoView?i(p?"On":"Off"):Xa(w=>i(w),i(p?"On":"Off"),f.followsView),disabled:g,onReset:()=>s(void 0)}),C]}):C})}}}function MO(){return{type:"custom",render:({value:e,onChange:o,id:t,name:r})=>{let a=`${String(t??r??"pageBackground")}-colour`;return k(S8,{label:"Background",icon:k(Fj,{}),id:a,value:e,shown:Ax(e),onChange:o})}}}function xve(e,o,t){return{type:"custom",render:({value:r,onChange:a})=>k(Yo,{label:i(e),icon:t,value:r||o,onChange:a})}}function S8({label:e,icon:o,id:t,value:r,shown:a,onChange:n}){let{colors:s,n:l}=Sg(),d=ar(r),c=d?ds(d,s,l):null;return k(Yo,{label:i(e),icon:o,id:t,value:c?c.hex:a,caption:c?.words,onChange:n,choices:yg(d??"",s,l,n)})}function Ive(){return{type:"custom",render:e=>{let{value:o,onChange:t}=e,r=e;return k(w8,{value:typeof o=="string"?o:"",onChange:t,twin:"follows"in e?{follows:r.follows,view:r.followsView}:void 0})}}}function yg(e,o,t,r){let a=Zc(e);return gP(o,t).map(n=>({label:n.label,color:n.value,selected:a===n.name,onPick:()=>r(n.name)}))}function w8({value:e,onChange:o,twin:t}){let{colors:r,n:a}=Sg(),n=r.background,s=Za(n.toUpperCase(),i("Theme {n} background",{n:a})),[l,d]=zt(EP),[c]=zt(Fx),f=typeof c=="string"&&c.trim()!=="",u=Yc(l),p=b=>d(Yc(b)||void 0),h=Zc(e),I=h?ds(h,r,a):null,g=yg(e,r,a,o),C=t?()=>o(void 0):()=>o(""),w=n,T=s;if(t){let b=Zc(t.follows),P=Xc(t.follows),H=b?ds(b,r,a):P?{hex:P,words:P.toUpperCase()}:null;w=H?.hex??n,T=Xa(E=>i(E),H?H.words:s,t.view)}let y=!t&&(Hl(e)||f)?k(C8,{value:u,onChange:p}):null;return I?k(Yo,{label:i("Fill"),icon:k(rg,{}),value:I.hex,caption:I.words,onChange:o,changed:!0,onReset:C,resetTo:T,choices:g,children:y}):k(Wl,{label:i("Fill"),icon:k(rg,{}),value:e,inherited:w,resetTo:T,onChange:o,onReset:C,choices:g,children:y})}function C8({value:e,onChange:o}){return ai({options:qc.map(t=>({label:t.label,value:t.value,hint:t.hint})),value:e,onChange:o,ariaLabel:i("Fill")})}function v8(e,o,t){if((e?.content??[]).some(n=>n?.props?.id===o))return or(t);let r=_P(e,o);if(r.length===0)return null;let a=or(Nh(t));if(a!==null)return a;for(let n=r.length-1;n>0;n-=1){let s=or(Nh(r[n].sectionAccent));if(s!==null)return s}return or(r[0].sectionAccent)}function Sg(){let e=xo(ue().theme),[o]=zt("sectionAccent"),t=null;try{let{appState:a,selectedItem:n}=Gf(l=>l),s=n?.props?.id?String(n.props.id):void 0;t=s?v8(a?.data,s,o):null}catch{t=null}let r=t!==null&&e.themes[t]?t:e.selected;return{colors:Vo(e.themes[r]),n:r+1}}function gve(){return EO()}var HO={top:k(Ej,{}),right:k(Pj,{}),bottom:k(kj,{}),left:k(Tj,{})};function UO(e,o,t,r,a,n,s){let l=u=>o.find(p=>p.value===u),d=u=>({value:u,label:"",disabled:!0,title:r}),c=u=>{let p=o.find(I=>I.cell===u);if(!p)return d(`missing-${u}`);let h=n?.[u];return h?{value:p.value,label:p.label,icon:h}:{value:p.value,label:p.label}},f=[d("corner-top-left"),c("top"),d("corner-top-right"),c("left"),d("centre"),c("right"),d("corner-bottom-left"),c("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:u,onChange:p})=>{let h=o.some(I=>I.value===u)?u:t;return k(mo,{label:i(e),icon:a,value:l(h)?.label?i(l(h).label):s?i(s):"",children:fK(i,{label:e,value:h,onChange:p,points:f})})}}}function bve(e,o,t){return{type:"custom",options:o,render:({value:r,onChange:a,field:n})=>k(t0,{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 yve(e,o={}){return{type:"custom",render:({value:t,onChange:r})=>{let a={value:t,onChange:r,...o};return k(e,{...a})}}}var Sve=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function wve(e,o,t){let r=Object.keys(ox).map(a=>({label:ox[a],value:a,picture:t[a]}));return{type:"custom",...sa({},{type:"radio",label:e,options:r.map(a=>({value:a.value,label:a.label}))}),render:({onChange:a})=>k(T8,{label:e,icon:o,options:r,onChange:a})}}function k8(e,o,t){let r=nT(e,o,t);if(r!==void 0)return r==="save-makes-frame"?i("A frame is made from this video when you save the page."):r==="starts-dark"?i("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):r==="outside"?i("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):r==="unsupported"?i("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):r==="failed"?i("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):r==="image-no-frame"?i("The slide shows your Image while the video loads, because this video has no frame."):void 0;let a=aT(e);return a==="frame-missing-image"?i("This video has no frame yet. The slide shows its image until one is made."):a==="frame-missing-surface"?i("This video has no frame yet. The slide shows its background colour until one is made."):a==="image-missing-frame"?i("No image yet. The slide shows the video's frame until you choose one."):a==="image-missing-surface"?i("No image yet. The slide shows its background colour until you choose one."):void 0}function T8({label:e,icon:o,options:t,onChange:r}){let a=Ya(),n=a?.values??{},s=Ol(n),l=lO(hj),d=Lc(l?.docId??null),c=null;try{c=Gf(u=>u.appState.data)}catch{c=null}let f=vT(a?.id,c,d);return k(mo,{label:i(e),icon:ks(o),hint:k8(n,f,l?.hasUnsavedEdits??!1),children:ai({options:t,value:s,onChange:r,ariaLabel:e})})}function Cve(e,o,t,r={}){let a={type:"custom",[gj]:!0,render:({value:n,onChange:s,name:l})=>k(e0,{value:n||"",onChange:s,fieldKey:l,label:e,accept:o,placeholder:t,focusKey:r.focus,focusWhen:r.focusWhen,frameKey:r.frame}),...r.focus?{focusKey:r.focus}:{},...r.focusWhen?{focusWhen:r.focusWhen}:{}};return r.focus?lt("each",a):a}function P8(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 vve({value:e,onChange:o,label:t}){let r=e||{},a=Ya(),n=a?a.values!==a.node.props:!0,s=!!r.pending&&n,l=!!r.pending&&!n,d=!!to(dK()).geocode,c=iO(),f=(u,p)=>o({...r,[u]:p??void 0});return Lr(Fr,{children:[k(mo,{label:i(t),icon:k(XE,{}),action:d?k(fg,{content:i("Find from the address (OpenStreetMap)"),children:k(bO,{"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:k(Bj,{})})}):void 0,children:d&&r.status?k(mP,{compact:!0,oneLine:!0,spaced:!1,status:s?"busy":r.ok&&!l?"found":"notfound",statusText:s?i("Finding\u2026"):l?i(Mx):i(r.status),hint:P8(r)}):null}),k(mo,{label:i("Enter by hand"),labelId:c,icon:k(Oj,{}),action:k(cg,{checked:!!r.manual,onChange:u=>o({...r,manual:u}),ariaLabelledBy:c})}),r.manual&&k(mo,{label:i("Latitude, longitude"),icon:k(XE,{}),children:Lr("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[k(JE,{value:typeof r.lat=="number"?r.lat:null,onChange:u=>f("lat",u),min:-90,max:90,step:1e-4,placeholder:i("Latitude")}),k(JE,{value:typeof r.lng=="number"?r.lng:null,onChange:u=>f("lng",u),min:-180,max:180,step:1e-4,placeholder:i("Longitude")})]})})]})}function E8(e,o){return o===null||o<0||o>=e.length?"":e[o]?.text??""}function O8(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 _8(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 wg={label:"Ticker items",icon:k(Rj,{})};function kve(e,o,t,r){return{type:"custom",[Rr]:{control:"textList",label:e,placeholder:t,itemKey:"text",rendering:r},...sa({},{...vO.textList,label:e}),render:({value:a,onChange:n})=>k(Cg,{label:e,icon:ks(o),items:Array.isArray(a)?a:[],placeholder:t,onChange:n,markup:r==="markup"})}}function Cg({label:e,icon:o,items:t,placeholder:r,onChange:a,markup:n=!1}){let s=si(null),[l,d]=li(null),c=u=>u.map(p=>({text:p?.text??""})),f=u=>{let p=_8(t,u,l);p===null&&(s.current=null),d(p),a(c(u))};return k(Kj,{label:i(e),icon:o,noun:i("item"),items:t,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:n?k(Wx,{target:s,value:E8(t,l),onChange:u=>a(O8(t,l??-1,u)),disabled:l===null,label:l===null?i("Formatting \u2014 click a row first"):i("Formatting \u2014 row {n}",{n:l+1})}):void 0,renderRow:(u,p,h)=>k("input",{type:"text",className:n&&l===p?"sf-list-marking":void 0,value:u?.text??"",placeholder:i(r),"aria-label":i("{label} {n}",{label:i(e),n:p+1}),onChange:I=>h({text:I.target.value}),onFocus:I=>{s.current=I.currentTarget,d(p)}})})}function WO(e,o){let t=`${e.label} \u2014 row ${o+1}`;return Qa({control:"plainText",label:t,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:r,onChange:a})=>k(Ja,{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 zO(e){return{_gCards:$t("Cards"),coverIndex:st("Cover image",k(Lj,{}),ZP,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:AK("Image background",Rf),cardImage:GO()}}function Tve(){return{outline:st("Card outline",k(Dj,{}),XP,YP),indexBadge:st("Card number",k(Aj,{}),Vx,Kx),showBadge:NO("Product badge",!0,k(Ex,{noun:"tag"}))}}function $O(e){let o=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},t=a=>({...$f,label:zf.find(n=>n.id===a).label}),r=a=>sa(ag(tg),t(a));return{_gShowOnCard:$t("Show on a card"),[tg]:sa({type:"custom",render:()=>k(A8,{rest:{showCardPrice:!0,showCardFinishes:!0,...o}})},t(tg)),showCardFinishes:r("showCardFinishes"),showCardSizes:r("showCardSizes"),showCardBuy:r("showCardBuy"),showCardPage:r("showCardPage")}}var tg="showCardPrice",zf=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function A8({rest:e}){let o=Po(),t=ta(),r=s=>typeof o[s]=="boolean"?o[s]:void 0,a=s=>r(s)??e[s],n=zf.some(({id:s})=>r(s)!==void 0&&r(s)!==e[s]);return k(Ts,{parts:zf,changed:n,shown:a,onPress:(s,l)=>t({[s]:l}),onReset:()=>t(Object.fromEntries(zf.map(({id:s})=>[s,void 0])))})}function Pve(e,o="display"){let t=vs(o);return{[o]:lt("desktop",{type:"custom",render:({value:r,onChange:a})=>k(Ts,{parts:e,changed:FP(r),shown:n=>ef(r,n),onPress:(n,s)=>a(DP(r,n,s)),onReset:()=>a(void 0)})}),[t]:lt("mobile",{type:"custom",render:({value:r,onChange:a})=>k(L8,{parts:e,desktopKey:o,value:r,onChange:a})})}}function Ts({parts:e,changed:o,shown:t,onPress:r,onReset:a,detail:n,disabledReason:s}){let l=i("Display");return k(mo,{label:l,icon:k(Sj,{}),changed:o,action:k(Ho,{words:le()?.panel,label:l,changed:o,detail:n,onReset:a}),children:k(Vj,{label:l,items:e.map(d=>({id:d.id,label:i(d.label),shown:t(d.id),...s?{disabled:!0,disabledReason:i(s)}:{}})),onChange:r})})}function L8({parts:e,desktopKey:o,value:t,onChange:r}){let a=Po()[o];return k(Ts,{parts:e,changed:BP(t),shown:n=>Nx(a,t,n),onPress:(n,s)=>r(NP(t,n,s)),onReset:()=>r(af),detail:i("the same as Desktop")})}function GO(e=KT){return Oo("Card image",k(fO,{}),Uo,Vr,jT,Uo,e,{clear:{hint:Uo},hint:"Rounds the picture. The card's own corner is in Styles."})}function R8(){return ni(Sx,"cardImage")}function Eve(){return{cardImage:GO(Sx),...R8()}}function Ove(){return xg({sidesKey:"cornerSides",row:VT,step:qT,useFollowed:()=>Uo,mark:k(F8,{label:YT}),hint:i("Rounds the picture. Left alone it stays square.")})}function F8({label:e,changed:o=!1,onReset:t=()=>{}}){return k(Ho,{words:le()?.panel,label:i(e),changed:o,onReset:t})}function _ve(){return{type:"custom",render:({value:e,onChange:o})=>k(M8,{value:typeof e=="string"?e:"",onChange:o})}}var sO="own";function Ave(){let e=[{value:sO,label:"Layout's own",picture:JI(Array.from({length:8},()=>[3,1]))},...Object.entries(Mc).map(([o,t])=>({value:o,label:t.label,picture:JI([...t.phone,...t.phone])}))];return lt("mobile",XI("Layout",k(pO,{}),e,sO,{columns:2,cell:qE}))}function B8({layout:e,width:o}){let t=kx(e),r=t?`${t[0]}/${t[1]}`:void 0;return k("span",{"aria-hidden":"true",style:{display:"grid",width:o,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:r?"auto":6,gridAutoFlow:"row dense",gap:2},children:tP(e).map(([a,n],s)=>k("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${a}`,gridRow:`span ${n}`,aspectRatio:r}},s))})}var D8={width:"3.5rem",height:"2.5rem",words:!1},N8=200;function M8({value:e,onChange:o}){let[t,r]=li(null),[a,n]=li(4),s=si(null);mj(()=>{let h=s.current;if(!h||typeof ResizeObserver!="function")return;let I=()=>n(h.getBoundingClientRect().width>=N8?4:3);I();let g=new ResizeObserver(I);return g.observe(h),()=>g.disconnect()},[]);let l=e?j(Dl,e):void 0,d=l?e:"",c=Cx(t,d),f=Cx(t,"").length,u=Wc("no-symbol"),p=[{value:"",label:i("Not chosen"),icon:VE(u,i("Not chosen"))},...c.map(h=>({value:h,label:i(Dl[h].label),icon:k(B8,{layout:Dl[h],width:40})}))];return k(mo,{label:i("Layout"),icon:k(pO,{}),value:l?i(l.label):void 0,children:k("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:k(IO,{label:i("Layout"),value:d,options:p,onChange:o,columns:a,cell:D8,header:Lr("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[k("span",{className:"text-2xs text-ink-faint",children:i("Photos in a row")}),k(Wj,{options:[{id:"all",label:i("All")},...QT.map(h=>({id:String(h),label:String(h)}))],value:t===null?"all":String(t),ariaLabel:i("Photos in a row"),onChange:h=>r(h==="all"?null:Number(h))}),k("span",{className:"text-2xs text-ink-faint",children:i("{n} of {total} layouts",{n:f,total:wx.length})})]})})})})}import{decodePartId as t7}from"efficient-easel/draw";import{decodePartId as Pg,encodePartId as ap}from"efficient-easel/draw";import{LINK_FIELD_MARKER as e_,SCAFFOLD_FIELD_MARKER as JO,TEXT_FIELD_MARKER as np}from"efficient-easel/draw";import{readHidable as o_}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as j8}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as G8}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as jO}from"efficient-easel/draw";import{readHidable as KO}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as H8}from"efficient-easel/draw";var U8=H8,W8=["text","textarea"],z8=["textarea","plainTextarea"];function $8(e){return!e||typeof e!="object"?null:e[jO]?.control??null}function Ps(e){let o=$8(e);return o&&U8.includes(o)?o:null}function ep(e){return z8.includes(e)}function VO(e){return!e||typeof e!="object"?void 0:e[jO]?.placeholder}function op(e){return KO(e).text}function vg(e,o,t){return W8.includes(e)?{text:t,hidden:KO(o).hidden}:t}function qO(e,o,t,r){return op(e[o])===r?null:{...e,[o]:vg(t,e[o],r)}}function Es(e,o){return o?`${e}[${o.index}].${o.rowKey}`:e}function Gt(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}}function tp(e){if(!(!e||typeof e!="object"))return e[G8]}function kg(e){if(!e||typeof e!="object")return null;let o=e.arrayFields;return o&&typeof o=="object"?o:null}function YO(e,o){if(!Array.isArray(o))return[];let t=tp(e),r=[];if(t?.control==="textList"){let n=t.itemKey??"text";return o.forEach((s,l)=>{let d=Se(s?.[n]);d&&r.push({row:{index:l,rowKey:n},text:d})}),r}let a=kg(e);return a?(o.forEach((n,s)=>{for(let[l,d]of Object.entries(a)){if(!Ps(d))continue;let c=op(n?.[l])||tp(d)?.placeholder||"";c&&r.push({row:{index:s,rowKey:l},text:c})}}),r):[]}function fi(e,o){if(Array.isArray(e))return e[o.index]?.[o.rowKey]}function Tg(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 XO(e,o,t,r,a){let n=fi(e[o],t);return op(n)===a?null:Tg(e,o,t,vg(r,n,a))}function ZO(e,o){return o?`${e} \xB7 row ${o.index+1}`:e}var jt="data-sf-part",Qve="data-sf-region-part",eke="data-sf-part-row";function oke(e,o){return`${e}[${o}]`}var tke="data-sf-part-kind",K8="data-sf-part-style-owner",V8="data-sf-part-style-kind";function rke(e){for(let o=e;o;o=o.parentElement){let t=o.getAttribute(K8),r=o.getAttribute(V8);if(t&&r)return{owner:t,kind:r};if(o.getAttribute("data-easel-block"))return null}return null}var QO=2;function Os(e){return Sr(e).replace(/\s+/gu,"")}function rp(e,o,t){let r=e[np];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}=o_(o);a?t.push(a):r.placeholder&&t.push(r.placeholder);return}if(!e[e_]){if(e.type==="text"||e.type==="textarea"){let a=Se(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))rp(s,a?.[n],t);return}if(e.objectFields&&o&&typeof o=="object")for(let[a,n]of Object.entries(e.objectFields))rp(n,o[a],t)}}function Eg(e){if(!e||typeof e!="object")return!1;let o=e;return o[e_]?!1:!!o[np]||o.type==="text"||o.type==="textarea"}function sp(e,o){let t=e[np];return t?.label?t.label:typeof e.label=="string"?e.label:o}function Og(e){let o=e.indexOf(" (");return(o>0?e.slice(0,o):e).trim()}function ake(e,o,t){if(!e)return[];let r=[];for(let[a,n]of Object.entries(e)){if(!n||typeof n!="object"||zl(a))continue;let s=n,l=[];rp(s,o?.[a],l),!l.length&&s[JO]!==void 0&&rp(s,s[JO],l);let d=sp(s,a);if(t?.(a)&&Eg(s)){l.length&&r.push({key:a,label:d,texts:[],keyed:!0});continue}let c=new Set;for(let{row:p,text:h}of YO(s,o?.[a])){let I=Os(h);I.length<QO||(c.add(I),r.push({key:a,label:d,texts:[I],row:p}))}let f=new Set(c),u=[];for(let p of l){let h=Os(p);h.length<QO||f.has(h)||(f.add(h),u.push(h))}u.length&&r.push({key:a,label:d,texts:u})}return r}function _g(e){return!e.offPage&&!e.hidden&&e.panelOnly!==!0}var q8=j8;function t_(e,o){if(!o||typeof o!="object"||zl(e)||zP(o))return null;let t=o[np];return!t||!q8.includes(t.control)?null:t}function nke(e,o){let t=t_(e,o);return t!==null&&t.identifier!==!0}function r_(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){let n=t_(r,a);if(!n)continue;let{text:s,hidden:l}=o_(o?.[r]);if(_g({offPage:n.offPage===!0,hidden:!!l,panelOnly:ms(a)}))continue;let d=s||n.placeholder||"",c=Sr(d).replace(/\s+/gu," ").trim();t.push({key:r,label:Og(sp(a,r)),preview:c,offPage:n.offPage===!0,identifier:n.identifier===!0,hidden:!!l})}return t}function _s(e,o){let t=tp(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?WO(t,o.index):null:kg(e)?.[o.rowKey]??null}function lp(e,o,t){let r=e.node.props,{key:a,row:n}=Gt(e.propKey),s=n?XO(r,a,n,e.kind,o):qO(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}import{readHidable as l_}from"efficient-easel/draw";import{isNodeList as Y8}from"efficient-easel/data";var Ag=e=>String(e+1).padStart(2,"0"),uke=[{label:"01 \xB7",value:"two-digit"},{label:"1.",value:"plain"}],Lg="two-digit",a_=e=>e==="plain"?"plain":Lg,ip=(e,o)=>e==="plain"?`${o+1}.`:Ag(o);var Fg="Contents",Rg="Flex",n_="Text",X8="numberForm",vke="_contentsEntries",kke="_kickerNumber",i_="data-sf-kicker-number",Z8=e=>l_(e).text.trim(),d_=e=>zc(e?.anchor),s_=e=>String(e.props?.id??""),J8=e=>!l_(e.props?.text).hidden&&!as(e.props)&&!Jt(e.props);function pi(e){return Object.values(e.props??{}).filter(Y8)}function c_(e){for(let o of pi(e))for(let t of o){if(Ul(t.props??{}))continue;if(t.type===n_&&J8(t))return t;if(t.type===n_)continue;let r=c_(t);if(r)return r}}function f_(e){return pi(e).some(o=>o.some(t=>t&&!Ul(t.props??{})&&(t.type===Fg||f_(t))))}var p_=e=>e.type===Rg&&bs(Rg,e.props?.direction)==="row";function u_(e){return pi(e).some(o=>o.some(t=>t&&!Ul(t.props??{})&&(t.type===Fg||!p_(t)&&u_(t))))}function Q8(e){let o=[],t=(r,a)=>{for(let n of r){if(!n||Ul(n.props??{}))continue;if(n.type===Fg){a.open={contents:n,sections:a.waiting??[]},a.waiting=null,o.push(a.open);continue}if(p_(n)&&u_(n)){let l={inRow:!0,open:null,waiting:[]};for(let d of pi(n))t(d,l);a.inRow||(a.open=null);continue}let s=a.open?.sections??a.waiting;if(n.type===Rg&&d_(n.props)&&s&&!f_(n)){s.push({box:n,kicker:c_(n)});continue}for(let l of pi(n))t(l,a)}};return t(e,{inRow:!1,open:null,waiting:null}),o}function e7(e){return e.map(o=>({label:o.kicker?Sr(Z8(o.kicker.props?.text)):"",anchor:d_(o.box.props)}))}function Tke(e){let o=e?.length?Q8(e):[];if(!o.length)return null;let t=new Map,r=new Map;for(let a of o){let n=s_(a.contents);n&&t.set(n,e7(a.sections));let s=a_(a.contents.props?.[X8]);a.sections.forEach((l,d)=>{let c=l.kicker?s_(l.kicker):"";c&&r.set(c,ip(s,d))})}return{entries:t,numbers:r}}var Pke=e=>e.endsWith(".")?`${e} `:`${e} \xB7 `;var r7=`[${i_}]`,a7=["bold","italic","underline","strike","link","sup","sub"],n7=["bullet","number"];function Ng(e,o){return e?[...a7,...o?n7:[]]:[]}function m_(e,o){let t=t7(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:d}=Gt(a),c=o.components[n.type]?.fields?.[l],f=d?_s(c,d):c,u=Ps(f);if(!u)return null;let p=n.props??{};if(cI(p)!==null||!d&&ac(n.type,p,l)||n.type==="Text"&&l==="text"&&as(p)||d&&!(Array.isArray(p[l])&&d.index<p[l].length))return null;let h=d?fi(p[l],d):p[l];return{node:n,selector:s,propKey:a,kind:u,stored:h,offPage:jf(f),panelOnly:ms(f)}}function dp(e,o){let t=m_(e,o);if(!t)return null;let{text:r,hidden:a}=la(t.stored);if(!_g({offPage:t.offPage,hidden:!!a,panelOnly:t.panelOnly}))return null;let n=ep(t.kind);return{partId:e,value:r,rules:Vd,multiline:n,skip:r7,offered:Ng(t.kind!=="plainText",n),write:s=>{let l=m_(e,o);l&&lp({node:l.node,propKey:l.propKey,kind:l.kind,zone:l.selector.zone,index:l.selector.index},s,o.replace)}}}function Mg(e,o,t){return e?.isConnected&&e.getAttribute(jt)===t?e:o?.querySelector(`[${jt}="${cp(t)}"]`)??null}function cp(e){return e.replace(/["\\]/g,"\\$&")}function h_(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var Bg=null,Dg=new Set;function s7(){return Bg}function Hg(e){if(e!==Bg){Bg=e;for(let o of Dg)o()}}function l7(e){return Dg.add(e),()=>{Dg.delete(e)}}function x_(){return o7(l7,s7,()=>null)}function I_(e,o){if(e.outer)return null;let t=o.getItemById(e.ownerId);if(!t)return null;let r=Ev(t.type);return!r||Zt(t.props)?null:{node:t,rows:r}}function p7(e,o){let t=I_(e,o),r=o.getItemById(e.nodeId);if(!t||!r)return null;let a=Fv(r.type,r.props,e.key);if(!a)return null;let n=t.node.props[t.rows];return!Array.isArray(n)||e.index<0||e.index>=n.length?null:i7(e.ownerId,Es(t.rows,{index:e.index,rowKey:a}))}function fp(e,o){let t=p7(e,o);return t?dp(t,o):null}function g_(e,o){return fp(e,o)?.value}function b_(e,o){let t=fp(e,o);return t?(t.write(e.text),!0):!1}function y_(e,o){let t=I_(e,o),r=t&&o.getSelectorForId(e.ownerId);if(!t||!r)return!1;let a=t.node.props,n=a[t.rows],s=e.index;if(!Array.isArray(n)||s<0||s>=n.length)return!1;let l;switch(e.action){case"addAfter":{let d=o.components[t.node.type]?.fields?.[t.rows];l=d7(n,s+1,{...d?.defaultItemProps??{}});break}case"moveEarlier":case"moveLater":{let d=e.action==="moveEarlier"?s-1:s+1;if(d<0||d>=n.length)return!1;l=c7(n,s,d);break}case"delete":l=f7(n,s);break;default:return!1}return o.replace(r.zone,r.index,{...t.node,props:{...a,[t.rows]:l}}),!0}import{jsx as Pe,Fragment as tA,jsxs as vi}from"react/jsx-runtime";import{Fragment as Gq,useEffect as jq,useId as Kq,useMemo as rA,useRef as Vq,useState as da}from"react";import{useScreenDocument as fA}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Lb}from"efficient-easel/draw/client";import qq from"efficient-easel/screen/components/SidePanelHead";import{jsx as Ce,Fragment as Ms,jsxs as sn}from"react/jsx-runtime";import{useEasel as Y1,useRootFields as oq}from"efficient-easel/easel";import{Inspector as tq}from"efficient-easel/fields";import{SettingsGroup as rq}from"efficient-easel/panel";import{useEffect as aq,useRef as nq,useState as Ob}from"react";import{jsx as en,Fragment as x7,jsxs as I7}from"react/jsx-runtime";import{useState as v_}from"react";import{SettingsDefaultReset as g7,SettingsField as b7}from"efficient-easel/panel";import{useEaselStrings as y7}from"efficient-easel/strings";import{AddIcon as S7}from"efficient-easel/icons";import{Button as w7}from"efficient-shell/ui";import{iconOf as C7,noGlyph as v7}from"efficient-easel/screen/lib/document/box-fields";import{jsx as pp,Fragment as u7,jsxs as S_}from"react/jsx-runtime";import{Button as w_,Dialog as m7}from"efficient-shell/ui";function h7(e){return Wo("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 C_({count:e,onCancel:o,onConfirm:t}){return S_(m7,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:i("Clear this site\u2019s colors?"),footer:S_(u7,{children:[pp(w_,{variant:"secondary",onClick:o,children:i("Cancel")}),pp(w_,{variant:"danger",onClick:t,children:i("Clear colors")})]}),children:[pp("p",{children:h7(e)}),pp("p",{className:"mt-2 font-medium",children:i("This cannot be undone.")})]})}var k7=v7("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"),T7="Reset color",P7={selected:0,themes:[]};function E7(e){e(P7)}function k_({value:e,onChange:o}){let t=e?.themes??[],r=t.length===0,a=xo(e),[n,s]=v_(!1),l=y7(),[d,c]=v_(null),f=(w,T)=>{o({...a,themes:a.themes.map((y,b)=>b===w?T:y)})},u=Yn(a).accent,p=new Set(a.themes.map(w=>w.brandInk).filter(Boolean)),h=zv.filter(w=>!p.has(w)).map(w=>$v(u,w)),I=[...a.themes,...h],g=w=>{if(w<a.themes.length)return o({...a,selected:w});let T=[...a.themes,I[w]];o({...a,themes:T,selected:T.length-1})},C=()=>{let w=[...a.themes,{...Vo(a.themes[a.selected])}];o({...a,themes:w,selected:w.length-1}),c(w.length-1)};return I7(x7,{children:[r?null:en(b7,{label:i(T7),icon:C7(k7),labelId:"sf-theme-reset",action:en(g7,{label:i("all theme colors"),words:l.panel,changed:!0,onReset:()=>s(!0)})}),n&&en(C_,{count:t.length,onCancel:()=>s(!1),onConfirm:()=>{s(!1),E7(o)}}),en("div",{className:"sf-theme-list",role:"radiogroup","aria-label":i("Theme"),children:I.map((w,T)=>en(ff,{index:T,colors:w,selected:T===a.selected,open:d===T&&T<a.themes.length,editable:T<a.themes.length,onPick:()=>g(T),onEdit:()=>c(y=>y===T?null:T),onChangeColors:y=>f(T,y)},T))}),en(w7,{variant:"secondary",leftIcon:en(S7,{}),onClick:C,className:"sf-theme-add",children:i("Add new theme")})]})}import{jsx as up}from"react/jsx-runtime";import{SettingsDefaultReset as O7,SettingsField as _7}from"efficient-easel/panel";import{SquareIcon as A7}from"efficient-easel/icons";var L7="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",Ug="Corners";function T_({value:e,onChange:o,length:t}){let r=e===null;return up(_7,{label:i(Ug),icon:up(A7,{}),changed:!r,action:up(O7,{words:le()?.panel,label:i(Ug),changed:!r,detail:i("the built-in corners"),onReset:()=>o(null)}),hint:i(L7),children:up(Zo,{min:t?.grid.min??Uo,max:t?.grid.max??Vr,step:t?.grid.step??1,value:e,...e===null?{}:{suffix:t?.unit??"px",...t?{units:t.units}:{}},placeholder:Uo,placeholderWord:"Auto",onClear:()=>o(null),ariaLabel:i(Ug),onChange:o})})}import{jsx as ui}from"react/jsx-runtime";import{SettingsDefaultReset as R7,SettingsField as F7}from"efficient-easel/panel";import{IconPicker as B7}from"efficient-shell/ui";import{ShadowIcon as D7}from"efficient-easel/icons";import{SHADOW_PREVIEW as N7}from"efficient-easel/screen/lib/document/shadow-values";var Wg={none:"None",soft:"Soft",lifted:"Lifted"},M7="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.";function P_({value:e,onChange:o}){let t=e===null,r=e??Bh;return ui(F7,{label:i("Card shadow"),icon:ui(D7,{}),value:i(Wg[r]),changed:!t,action:ui(R7,{words:le()?.panel,label:i("Card shadow"),changed:!t,detail:i(Wg[Bh]),onReset:()=>o(null)}),hint:i(M7),children:ui(B7,{label:i("Card shadow"),value:r,options:ok.map(a=>({value:a,label:i(Wg[a]),icon:ui("span",{className:"sf-shadow-chip border border-line bg-surface",style:{boxShadow:N7[a]}})})),onChange:o})})}import{jsx as E_}from"react/jsx-runtime";import{ShadowIcon as H7}from"efficient-easel/icons";import{DEFAULT_SHADOW_COLOR as O_}from"efficient-easel/screen/lib/document/shadow-values";var U7="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 __({value:e,onChange:o}){let t=e===null;return E_(Wl,{label:i("Shadow color"),icon:E_(H7,{}),value:e??"",inherited:O_,resetTo:O_,onChange:o,onReset:()=>o(null),hint:i(U7)})}import{jsx as hp}from"react/jsx-runtime";import{SettingsDefaultReset as W7,SettingsField as z7}from"efficient-easel/panel";import{AlignSeparateIcon as $7}from"efficient-easel/icons";function mp(e,o){return e==="tablet"?null:e==="mobile"?o.phone:o.desktop}var G7="The space between the blocks inside a row, a grid or a box. Auto means each one keeps the spacing it already has.",j7="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.",zg="Block gap",A_=ys.Grid;function L_(e,o){return mp(e,{desktop:{key:"block_gap",value:o.gap,followsPx:null},phone:{key:"block_gap_phone",value:o.phone,followsPx:o.gap===null?null:NI(o.gap)}})}function R_({value:e,onChange:o,followsPx:t=null,length:r,followsUnit:a="px"}){let n=e===null,s=t===null?null:`${t}${a}`,l=a==="px"&&(r?.unit??"px")==="px",d=t===null?A_:l?ei(t)??A_:t;return hp(z7,{label:i(zg),labelId:"sf-block-gap",icon:hp($7,{}),changed:!n,action:hp(W7,{words:le()?.panel,label:i(zg),changed:!n,detail:s??i("each block's own spacing"),onReset:()=>o(null)}),hint:i(s===null?G7:j7),children:hp(Zo,{min:(r?.grid??ht).min,max:(r?.grid??ht).max,step:(r?.grid??ht).step,value:e,...e===null&&t===null?{}:{suffix:r?.unit??"px",...r?{units:r.units}:{}},placeholder:d,...t===null?{placeholderWord:"Auto"}:l&&t===d?{}:{placeholderWord:String(t)},onClear:()=>o(null),ariaLabel:i(zg),onChange:o})})}import{jsx as xp}from"react/jsx-runtime";import{SettingsDefaultReset as K7,SettingsField as V7,SettingsSegmented as q7}from"efficient-easel/panel";import{HoverIcon as Y7}from"efficient-easel/icons";var $g={none:Wn.none,lift:Wn.lift,highlight:LC},X7="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 F_({value:e,onChange:o}){let t=e===null,r=e??Dh;return xp(V7,{label:i("Hover effect"),icon:xp(Y7,{}),value:i($g[r]),changed:!t,action:xp(K7,{words:le()?.panel,label:i("Hover effect"),changed:!t,detail:i($g[Dh]),onReset:()=>o(null)}),hint:i(X7),children:xp(q7,{options:tk.map(a=>({id:a,label:i($g[a])})),value:r,ariaLabel:i("Hover effect"),onChange:o})})}import{jsx as Ip}from"react/jsx-runtime";import{SettingsDefaultReset as Z7,SettingsField as J7,SettingsSegmented as Q7}from"efficient-easel/panel";import{DropIcon as eV}from"efficient-easel/icons";var Gg="Photography",B_={shot:"As shot",mono:"Black and white"},jg=[{grayscale:!1,label:B_.shot},{grayscale:!0,label:B_.mono}],oV="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function D_({value:e,onChange:o}){let t=e===null,r=e??!1;return Ip(J7,{label:i(Gg),icon:Ip(eV,{}),value:i(jg.find(a=>a.grayscale===r).label),changed:!t,action:Ip(Z7,{words:le()?.panel,label:i(Gg),changed:!t,detail:i(jg.find(a=>!a.grayscale).label),onReset:()=>o(null)}),hint:i(oV),children:Ip(Q7,{options:jg.map(a=>({id:a.grayscale,label:i(a.label)})),value:r,ariaLabel:i(Gg),onChange:o})})}import{jsx as Kg}from"react/jsx-runtime";import{useId as tV}from"react";import{SettingsField as rV,SettingsSwitch as aV}from"efficient-easel/panel";import{ShareIcon as nV}from"efficient-easel/icons";var sV="Share button",lV="On every blog post.";function N_({value:e,onChange:o}){let t=tV();return Kg(rV,{label:i(sV),labelId:t,icon:Kg(nV,{}),action:Kg(aV,{checked:e===!0,onChange:o,ariaLabelledBy:t}),hint:i(lV)})}import{usePreviewDevice as _b}from"efficient-easel/draw/client";import{jsx as gp}from"react/jsx-runtime";import{SettingsDefaultReset as iV,SettingsField as dV}from"efficient-easel/panel";import{PaddingXIcon as cV}from"efficient-easel/icons";var Vg="Side space",M_=Go.default,fV="The room left at the left and right edge of every page.";function H_(e,o){return mp(e,{desktop:{key:"site_gutter",value:o.gutter,unsetPx:M_,bounds:Go},phone:{key:"site_gutter_phone",value:o.phone,unsetPx:Cf(o.gutter,o.gutterUnit),bounds:Ht}})}function U_({value:e,onChange:o,unsetPx:t=M_,bounds:r=Go,length:a,restsOn:n=t}){let s=e===null;return gp(dV,{label:i(Vg),labelId:"sf-side-space",icon:gp(cV,{}),changed:!s,action:gp(iV,{words:le()?.panel,label:i(Vg),changed:!s,detail:`${t}px`,onReset:()=>o(null)}),hint:i(fV),children:gp(Zo,{min:(a?.grid??r).min,max:(a?.grid??r).max,step:(a?.grid??r).step,value:e,suffix:a?.unit??"px",...a?{units:a.units}:{},placeholder:n,onClear:()=>o(null),ariaLabel:i(Vg),onChange:o})})}import{jsx as qg}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as IPe,SettingsBackgroundWidth as pV,SettingsContentWidth as uV}from"efficient-easel/panel";var mV="Background width",hV="Content width";var bp=e=>i(Va[e==="content"?"page":"full"]),W_="The width of every section's background.",z_="The width of every section's content.";function $_({value:e,changed:o,detail:t,onChange:r,onReset:a,hint:n,labelId:s}){return qg(pV,{value:e,changed:o,detail:t,onChange:r,onReset:a,hint:n?i(n):void 0,labelId:s,words:{label:i(mV),full:bp("full"),content:bp("content")},resetWords:le()?.panel})}function G_({mode:e,px:o,max:t=uo.max,min:r=uo.min,changed:a,detail:n,fullClosed:s,onMode:l,onPx:d,onReset:c,hint:f,labelId:u,length:p}){let h=i(hV),I=p?.grid.min??r,g=p?.grid.max??t,C=e!=="full"?qg(Zo,{min:I,max:g,step:p?.grid.step??uo.step,value:Math.min(Math.max(o,I),g),onChange:d,...p?{suffix:p.unit,units:p.units}:{suffix:"px"},ariaLabel:h}):null;return qg(uV,{mode:e,onMode:l,number:C,changed:a,detail:n,fullClosed:s,onReset:c,hint:f?i(f):void 0,labelId:u,words:{label:h,full:bp("full"),content:bp("content")},resetWords:le()?.panel})}import{jsx as _1}from"react/jsx-runtime";import{TextStyleItem as v9,TextStylesGroup as k9}from"efficient-easel/text-styles";import{jsx as g9}from"react/jsx-runtime";import{useState as b9}from"react";import{TextStylesList as y9}from"efficient-easel/text-styles";import{usePreviewDevice as S9}from"efficient-easel/draw/client";import{defaultTextStyles as x1,textStyleCaseCss as p9}from"efficient-easel/text-styles/model";import{resolveViewValue as I1}from"efficient-easel/draw";import{VIEW_DESKTOP_MIN as j_,VIEW_TABLET_MIN as K_}from"efficient-easel/draw";var yp=.02,V_=`(min-width: ${Gr}px) and (max-width: ${j_-yp}px)`,mi=`(max-width: ${Gr-yp}px)`,Sp=`(min-width: ${K_}px) and (max-width: ${j_-yp}px)`,wp=`(max-width: ${K_-yp}px)`;import{textStyleCaseCss as xV,textStyleCaseOfCss as IV,viewKeyAt as e1}from"efficient-easel/draw";function As(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Ls(e,o){return As(e?.[o])??{}}function Cp(e,o,t){let r=Ls(e,o);return As(j(r,t))??{}}function vp(e,o,t,r){let{[t]:a,...n}=Ls(e,o),s=r?{...n,[t]:r}:n,{[o]:l,...d}=e;return Object.keys(s).length?{...d,[o]:s}:d}import{isLengthUnit as eb}from"efficient-easel/screen/lib/content/length-units";var Ii="_partStyles",ob="data-sf-part-styled",Rs="data-sf-text-style",gV=/^(heading|body)-[1-7]$/;function rn(e){return typeof e=="string"&&gV.test(e)}var kp={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function bV(e){if(!e)return null;for(let[o,t]of Object.entries(kp))if(t===e)return o;return null}function tb(e){if(rn(e.textStyle))return e.textStyle;let o=yr(e.role);return o?kp[o]:void 0}var yV=[400,500,600,700],xi=["left","center","right","justify"],Yg=5,Xg=1e3,SV=-5,wV=10,rb=0,ab=64,nb=2,q_={size:{min:Yg,max:Xg,step:1},sizeTablet:{min:Yg,max:Xg,step:1},sizePhone:{min:Yg,max:Xg,step:1},padding:{min:rb,max:ab,step:nb}},CV=.05,vV=.01,kV=["line","letter"],TV=.5,PV=2.5,EV=-1,OV=1,_V=0,AV=400,LV=[...new Set(Object.values(Un))];function o1(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 WPe(e){return Ls(e,Ii)}function gi(e,o){return Cp(e,Ii,o)}function t1(e,o,t){return vp(e,Ii,o,RV(t).length?t:null)}function RV(e){return Object.entries(e).filter(([,o])=>o!==void 0)}function FV(e){return kV.includes(e)}var hi=(e,o,t)=>Math.min(t,Math.max(o,e)),BV=["sizeUnit","sizeUnitTablet","sizeUnitPhone"];function Zg(e){let o=e1("sizeUnit",e),t=BV.find(r=>r===o);if(!t)throw new Error(`a part stores no unit key ${o}`);return t}var It={size:Zg("desktop"),sizeTablet:Zg("tablet"),sizePhone:Zg("mobile"),paragraphSpacing:"paragraphSpacingUnit",padding:"paddingUnit"},r1=Object.values(It);function ir(e,o){return ve(e[It[o]])}function DV(e,o,t={}){if(r1.includes(e))return eb(o)&&o!=="px"?o:null;if($e(It,e)&&ir(t,e)!=="px"){let r=tn(Number(o),2);return!Number.isFinite(r)||r<0||r===0&&e!=="padding"?null:r}if(FV(e)){let r=Math.round(Number(o));return!Number.isFinite(r)||r===0?null:hi(r,SV,wV)}if(e==="lineHeight"){let r=Number(o);return Number.isFinite(r)?tn(hi(r,TV,PV),3):null}if(e==="letterSpacing"){let r=Number(o);return Number.isFinite(r)?tn(hi(r,EV,OV),4):null}if(e==="paragraphSpacing"){let r=Math.round(Number(o));return!Number.isFinite(r)||r<=0?null:hi(r,_V,AV)}if($e(q_,e)){let{min:r,max:a}=q_[e],n=Math.round(Number(o));return Number.isFinite(n)?hi(n,r,a):null}return e==="italic"?typeof o=="boolean"?o:null:e==="role"||e==="fontRole"?yr(o)?o:null:e==="sizeToken"?sb(o)?o:null:e==="textStyle"?rn(o)?o:null:e==="alignPhone"||e==="alignTablet"?xi.includes(o)?o:null:o}var NV=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function Fs(e){let o=null,t=r=>{o??={...e},delete o[r]};for(let r of NV){let a=e[r];a!==void 0&&!(typeof a=="number"&&Number.isFinite(a))&&t(r)}e.align!==void 0&&!xi.includes(e.align)&&t("align"),e.alignTablet!==void 0&&!xi.includes(e.alignTablet)&&t("alignTablet"),e.alignPhone!==void 0&&!xi.includes(e.alignPhone)&&t("alignPhone"),e.textStyle!==void 0&&!rn(e.textStyle)&&t("textStyle"),e.sizeToken!==void 0&&!sb(e.sizeToken)&&t("sizeToken"),e.fontRole!==void 0&&!yr(e.fontRole)&&t("fontRole");for(let r of r1)e[r]!==void 0&&!eb(e[r])&&t(r);return o??e}function sb(e){if(!e||typeof e!="object")return!1;let{step:o,px:t,stepPhone:r,pxPhone:a,fluid:n}=e,s=d=>typeof d=="number"&&Number.isFinite(d)&&d>0,l=d=>typeof d=="string"&&LV.includes(d);return l(o)&&s(t)&&(r===void 0||l(r))&&(a===void 0||s(a))&&(n===void 0||MV(n,t))}function MV(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 lb(e){return e?.pxPhone&&sb(e)?{step:e.stepPhone??e.step,px:e.pxPhone}:null}function a1({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 HV=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function UV(e){let o=[];for(let[t,r]of HV)t===e?o.push(r):r===e&&o.push(t);return o}function an(e,o,t,r){let a={...gi(e,o)},n=r==null?null:DV(t,r,a);if(n===null)delete a[t];else{a[t]=n;for(let s of UV(t))delete a[s]}return t1(e,o,a)}function n1(e,o){return t1(e,o,{})}function WV(e){return IV(e)??"none"}function zV(e){return xV(e)??""}var Y_={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 $V(e,o){return yr(e.role)||(o?.blockDrawsStyle?null:bV(e.textStyle))}function s1(e,o){return e==="Text"&&o==="text"}var GV={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 jV(e){let o=Un[e],t=j(GV,o);return t?`var(--size-${o}, ${t})`:`var(--size-${o})`}function bi(e){let o={};return typeof e.lineHeight=="number"?o.lineHeight=e.lineHeight:e.line&&(o.lineHeight=tn(KV+e.line*CV,3)),typeof e.letterSpacing=="number"?o.letterSpacingEm=e.letterSpacing:e.letter&&(o.letterSpacingEm=tn(e.letter*vV,4)),o}var KV=1,on="--sf-part-para";function VV(e){e=Fs(e);let o={};if(typeof e.sizePhone=="number"&&e.sizePhone>0)o.fontSize=Ue(e.sizePhone,ir(e,"sizePhone"));else{let r=lb(e.sizeToken);if(r)o.fontSize=a1(r);else{let a=Pp(e);a!==void 0&&(o.fontSize=Ue(a,ir(e,"sizeTablet")))}}let t=e.alignPhone??Tp(e);return t&&(o.textAlign=t),o}function Tp(e){return e.alignTablet&&e.alignTablet!==e.align?e.alignTablet:void 0}function Pp(e){let o=e.sizeTablet!==void 0&&ir(e,"sizeTablet")!==ir(e,"size")?e.sizeTablet:Lt("textSize",e.size,e.sizeTablet,void 0).tablet;return o&&o>0?o:void 0}function qV(e){let o=Fs(e),t={},r=Pp(o);r!==void 0&&(t.fontSize=Ue(r,ir(o,"sizeTablet")));let a=Tp(o);return a&&(t.textAlign=a),t}function l1(e,o){if(o==="desktop")return;let t=Fs(e);return(o==="mobile"?Tp(t):void 0)??t.align}function YV(e,o){if(o==="desktop")return e;let t=Fs(e),r=Pp(t),a=Tp(t);if(o==="tablet"){let l=e;return r!==void 0&&(l={...l,size:r,sizeUnit:t[It.sizeTablet]}),a&&(l={...l,align:a}),l}let n=e;if(typeof t.sizePhone=="number"&&t.sizePhone>0)n={...n,size:t.sizePhone,sizeUnit:t[It.sizePhone]};else{let l=lb(t.sizeToken);l?n={...n,size:void 0,sizeToken:l}:r!==void 0&&(n={...n,size:r,sizeUnit:t[It.sizeTablet]})}let s=t.alignPhone??a;return s&&(n={...n,align:s}),n}function ib(e,o,t){return cb(YV(e,o),Ep,t)}function db(e){return e1("size",e)}function i1(e,o){if(o==="desktop")return null;let t=Fs(e);if(o==="mobile"){if(lb(t.sizeToken))return null;let r=Pp(t);if(r!==void 0)return{px:r,view:"tablet"}}return typeof t.size=="number"&&t.size>0?{px:t.size,view:"desktop"}:null}function d1(e,o){let t=db(o);if(!$e(e,t))return e;let r={...e};return delete r[t],r}function zPe(e,o,t){let r=ib(d1(e,o),o,t);return{fontFamily:r.fontFamily,fontSize:r.fontSize}}function cb(e,o,t){e=Fs(e);let r=$V(e,t),a=bi(e),n=e.size?Ue(e.size,ir(e,"size")):e.sizeToken?a1(e.sizeToken):r?jV(r):"";return{fontFamily:e.font?QV(e.font):e.fontRole?`var(${Y_[e.fontRole]})`:r?`var(${Y_[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`:"",[on]:e.paragraphSpacing?Ue(e.paragraphSpacing,ir(e,"paragraphSpacing")):"",textTransform:zV(e.case),textAlign:e.align??"",paddingTop:X_(e.padding,ir(e,"padding")),paddingBottom:X_(e.padding,ir(e,"padding")),color:XV(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var XV=e=>cs(e),X_=(e,o)=>e===void 0?"":Ue(e,o),tn=(e,o)=>Number(e.toFixed(o));function $Pe(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:ZV(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(r)?tn(r/t,3):1.2,letterEm:Number.isFinite(a)?tn(a/t,4):0,align:JV(e.textAlign),case:WV(e.textTransform),paddingPx:Number.isFinite(n)?Math.round(n):0}}function ZV(e){return Number.isFinite(e)?yV.reduce((o,t)=>Math.abs(t-e)<Math.abs(o-e)?t:o):400}function JV(e){for(let o of xi)if(o===e)return o;return e==="end"?"right":"left"}function GPe(e,o){let t=Z_(e);if(!t)return"";for(let r of $r)if(Z_(o(r.cssVar))===t)return r.key;return""}var Z_=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function QV(e){let o=Hn(e);return o?`var(${o.cssVar})`:""}function jPe(e,o,t,r){return!o||Pg(o)?.nodeId!==e?null:t.find(a=>r(a.getAttribute("class")))??t[0]??null}function e9(e,o){return As(j(e,o))??{}}function KPe(e,o,t=()=>Ep,r=l=>l,a=r9,n="desktop",s=()=>!1){let l=0;for(let{element:d,partId:c}of e){let f=Pg(c)?.propKey;if(!f)continue;let u=e9(o,r(f)),p=ib(u,n,{blockDrawsStyle:s(f)});rn(u.textStyle)?d.setAttribute?.(Rs,u.textStyle):d.removeAttribute?.(Rs);let h=Jg.some(g=>d.style[g]),I=!1;for(let[g,C]of Object.entries(p))s9(d,g,C),C&&(I=!0);if(h||Jg.some(g=>p[g]))for(let g of o9(d,a))for(let C of Jg)g.style[C]=p[C]??"";I&&(l+=1)}return l}function o9(e,o){let t=Os(e.textContent??""),r=[],a=e;for(let n=0;n<t9&&o(a);n+=1){let s=a.parentElement;if(!s||Os(s.textContent??"")!==t)break;r.push(s),a=s}return r}var t9=8;function r9(e){let o=e;return typeof window>"u"||!o?.ownerDocument?!1:window.getComputedStyle(o).display==="inline"}var Ep={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function a9(e){if(!e||typeof e!="object")return null;let o={};rn(e.textStyle)&&(o.textStyle=e.textStyle),typeof e.size=="number"&&e.size>0&&(o.size=e.size),typeof e.sizeTablet=="number"&&e.sizeTablet>0&&(o.sizeTablet=e.sizeTablet),typeof e.sizePhone=="number"&&e.sizePhone>0&&(o.sizePhone=e.sizePhone);for(let t of["size","sizeTablet","sizePhone"]){let r=It[t];o[t]!==void 0&&eb(e[r])&&(o[r]=e[r])}return Object.keys(o).length?o:null}function n9(e,o){let t=a9(e);if(!t)return{};let r=ib(t,o);return{...r.fontFamily?{fontFamily:r.fontFamily}:{},...r.fontSize?{fontSize:r.fontSize}:{}}}function c1(e){return rn(e?.textStyle)||!!e?.role||typeof e?.size=="number"&&e.size>0}function VPe(e,o,t){if(!e||typeof e!="object")return{};let r=rc(e.role,o,Un)??{},a=o.sized?n9(d1(e,t),t):{};return{...r,...a}}function qPe(e,o,t){t.fontFamily&&e.fontFamily===t.fontFamily&&(e.fontFamily=o.fontFamily),t.fontSize&&e.fontSize===t.fontSize&&(e.fontSize=o.fontSize)}function s9(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===on&&(t?a.setAttribute?.(J_,""):a.removeAttribute?.(J_))}var J_="data-sf-part-para",l9=Object.keys(cb({},Ep)),Qg=new Set(["color","overflowWrap",on,"fontStyle"]),Jg=l9.filter(e=>!Qg.has(e));function f1(e,o,t,r=l=>l,a=()=>!1,n=()=>null,s=[]){let l=new Map;for(let u of e){let p=Es(u.key,u.row);for(let h of u.texts){let I=l.get(h);I?(I.keys.add(u.key),I.partKeys.add(p)):l.set(h,{keys:new Set([u.key]),partKeys:new Set([p])})}}let d=new Map;for(let u of new Set([...Object.keys(o),...s])){if(!i9(u))continue;let p=Q_(t,u,As(o[u])??{},!1,n(u));p&&d.set(u,p)}let c=u=>{let p=r(u),h=n(p);if(!$e(o,p)&&!h)return null;let I=As(o[p])??{};return Q_(t,u,I,a(u),h)},f=new Map;for(let[u,{keys:p,partKeys:h}]of l){let I=h.size===1?[...h][0]:p.size===1?[...p][0]:null;if(!I)continue;let g=c(I);g&&f.set(u,g)}for(let u of e){if(!u.keyed)continue;let p=c(Es(u.key,u.row));p&&d.set(u.key,p)}return f.size||d.size?{rules:f,kindRules:d,drawn:new Set(l.keys())}:null}function Q_(e,o,t,r,a){let n=cb(t,Ep,{blockDrawsStyle:r}),s=qV(t),l=VV(t),d=rn(t.textStyle)?t.textStyle:void 0;return!Object.values(n).some(Boolean)&&!Object.keys(s).length&&!Object.keys(l).length&&!d&&!a?null:{stamp:d9(e,o),declarations:n,...Object.keys(s).length?{tablet:s}:{},...Object.keys(l).length?{phone:l}:{},...d?{textStyle:d}:{},...a?{motion:a}:{}}}function i9(e){return e.startsWith("@")}function fb(e,o){return e?.kindRules.get(o)??null}function d9(e,o){let t=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${t(e)}~${t(o)}`}function pb(e){return e?{tablet:V_,phone:mi}:{tablet:Sp,phone:wp}}function p1(e,{inBox:o=!1}={}){let{tablet:t,phone:r}=pb(o),a=[],n=new Set,s=l=>{let{stamp:d,declarations:c}=l;if(n.has(d))return;n.add(d);let f=Object.entries(c).filter(([,w])=>w!==""),u=w=>w.map(([T,y])=>`${c9(T)}: ${y}`).join("; "),p=`[${ob}="${d}"]`,h=f.filter(([w])=>!Qg.has(w)),I=f.filter(([w])=>Qg.has(w));h.length&&a.push(`${p}, *:has(> ${p}) { ${u(h)} }`),I.length&&a.push(`${p} { ${u(I)} }`),c[on]&&(a.push(`*:has(> ${p}) { ${on}: ${c[on]} }`),a.push(...Op(p,`*:has(> ${p})`)));let g=Object.entries(l.tablet??{}).filter(([,w])=>w!=="");g.length&&a.push(`@media ${t} { ${p}, *:has(> ${p}) { ${u(g)} } }`);let C=Object.entries(l.phone??{}).filter(([,w])=>w!=="");C.length&&a.push(`@media ${r} { ${p}, *:has(> ${p}) { ${u(C)} } }`)};for(let l of e.rules.values())s(l);for(let l of e.kindRules.values())s(l);return a.join(`
|
|
3
|
-
`)}function Op(e,o){let t=`var(${on})`,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 c9=e=>e.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);function u1(e,o){if(!e)return null;let t=Os(o),r=e.rules.get(t);if(r)return r;if(t.length<f9||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 f9=8;function m1(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 ub=e=>e==="sentence"?"none":void 0,g1=["font","color","size","sizeTablet","sizePhone","weight","italic","lineHeight","lineHeightTablet","lineHeightPhone","letterSpacing","letterSpacingTablet","letterSpacingPhone","paragraphSpacing","paragraphSpacingTablet","paragraphSpacingPhone","letterCase","largestSize","largestSizeTablet","largestSizePhone"],Bs=["desktop","tablet","phone"],nn=(e,o)=>we(e,o);function xb(e,o,t,r=$n()){return I1("textSize",o,e.sizeTablet,e.sizePhone,r)[t]}var u9=[["lineSpacing","lineHeight","line"],["letterSpacing","letterSpacing","letter"]];function mb(e){for(let[o,t,r]of u9)for(let a of Bs)if(e===nn(o,a))return{key:we(t,a),view:a,spacing:r};return{key:e,view:"desktop",spacing:null}}function dr(e){let o={};for(let t of g1)e[t]!==void 0&&(o[t]=e[t]);return o}function Ib(e,o){let{auto:t,...r}=e,a=new Set(o??[]),n=g1.filter(s=>a.has(s)&&e.values[s]===void 0);return n.length?{...r,auto:n}:r}function b1(e){let o=e.fonts,t=e.sizes,r=e.typography,a=rk(e.compression),n={"heading-1":{font:Se(o.heading),size:q(t.headingLarge),weight:q(r.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:ub(r.case),largestSize:q(r.maxPx)},"heading-2":{font:Se(o.heading2),size:q(t.headingMedium),weight:q(r.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:ub(r.case2)},"heading-3":{font:Se(o.heading3),size:q(t.headingSmall),weight:q(r.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:ub(r.case3)},"body-1":{font:Se(o.body),size:q(t.body)},"body-5":{font:Se(o.label),size:q(t.label)}};return x1().map(({id:s,kind:l,name:d})=>({id:s,kind:l,name:d,values:dr(n[s]??{})}))}function gb(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=>Ib({...o,values:dr(o.values??{})},Array.isArray(o.auto)?o.auto:void 0)):null}function i0e(e){return gb(e)??[]}function y1(e){return gb(e)??x1().map(({id:o,kind:t,name:r})=>({id:o,kind:t,name:r,values:{}}))}function Br(e,o){let t=b1(o),r=gb(e);return r?r.map(a=>{let n={...hb(t,a.id)};for(let s of a.auto??[])delete n[s];return{...a,values:dr({...n,...a.values})}}):t}var hb=(e,o)=>e.find(t=>t.id===o)?.values??{},h1=["heading-1","heading-2","heading-3"];function S1({saved:e,old:o,cur:t,next:r,sizeOf:a,panelView:n="desktop"}){let s=b1(o),l=y1(e),d=Br(l,o),c=[],f=r.map(p=>{let h=t.find(P=>P.id===p.id),I=l.find(P=>P.id===p.id);if(!h||!I){let P=m9([p],a,n)[0],H=P.values.color;return H===void 0?P:{...P,values:{...P.values,color:rt(H)}}}let g={...I.values},C=new Set(I.auto??[]),w=p.values,T=h.values,y=[...new Set([...Object.keys(w),...Object.keys(T)])].filter(P=>JSON.stringify(w[P])!==JSON.stringify(T[P])),b=P=>mb(P).spacing==="letter";y.sort((P,H)=>Number(b(P))-Number(b(H)));for(let P of y){let{key:H,view:E,spacing:U}=mb(P),O=H,D=w[P];if(D===void 0){delete g[O],hb(s,p.id)[O]!==void 0&&(c.push([p.id,O]),C.add(O));continue}if(C.delete(O),U==="line")g[O]=Ds(D/100,3);else if(U==="letter"){let v={...d.find(F=>F.id===p.id)?.values??{}};for(let F of y)w[F]===void 0&&delete v[mb(F).key];let _=dr({...v,...g}),A=xb(_,a({...p,values:_}),E);g[O]=A?Ds(D/A,4):0}else g[O]=D}return Ib({id:p.id,kind:p.kind,name:p.name,values:dr(g)},C)}),u=o.compression;if(c.some(([p,h])=>(h==="lineHeight"||h==="letterSpacing")&&h1.includes(p))&&La(u)!=="normal"){for(let p of h1){let h=f.find(g=>g.id===p);if(!h)continue;let I={...h.values};for(let g of["lineHeight","letterSpacing"])c.some(([C,w])=>C===p&&w===g)||I[g]===void 0&&!(h.auto??[]).includes(g)&&(I[g]=hb(s,p)[g]);h.values=dr(I)}u="normal"}return{saved:f,old:{...o,compression:u}}}function w1(e,o){let t={text_styles:e.saved};return e.old.compression!==o.compression&&(t.heading_compression=La(e.old.compression)),t}var Ds=(e,o)=>Number(e.toFixed(o)),C1=(e,o)=>Bs.indexOf(e)<Bs.indexOf(o)?o:e;function v1(e,o,t="desktop"){return e.map(r=>{let a={...r.values},n=o(r);for(let s of Bs){let l=we("lineHeight",s),d=r.values[l],c=r.values[we("letterSpacing",s)];delete a[l],d!==void 0&&(a[nn("lineSpacing",s)]=Ds(d*100,1));let f=C1(s,t);c!==void 0&&(a[nn("letterSpacing",s)]=Ds(c*xb(r.values,n,f),f===s?2:4))}return{id:r.id,kind:r.kind,name:r.name,values:a}})}function m9(e,o,t="desktop"){return e.map(r=>{let a=r.values,n={...a};for(let c of Bs)delete n[nn("lineSpacing",c)],delete n[nn("letterSpacing",c)];let s={id:r.id,kind:r.kind,name:r.name,values:dr(n)},l={...s.values},d=o({...s,values:{...s.values}});for(let c of Bs){let f=a[nn("lineSpacing",c)],u=a[nn("letterSpacing",c)];if(typeof f=="number"&&(l[we("lineHeight",c)]=Ds(f/100,3)),typeof u=="number"){let p=xb(s.values,d,C1(c,t));l[we("letterSpacing",c)]=p?Ds(u/p,4):0}}return{...s,values:dr(l)}})}function d0e(e){let o={fonts:yl({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:Fh({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:La(e.heading_compression),typography:nk(e)},t=e.text_styles??null,r=Array.isArray(t)?bb(Br(t,o),o):o;return{fonts:yl(r.fonts),sizes:Fh(r.sizes),compression:La(r.compression),typography:r.typography,textStyles:t}}function bb(e,o){let t=p=>e.find(h=>h.id===p)?.values??{},r=t("heading-1"),a=t("heading-2"),n=t("heading-3"),s=t("body-1"),l=t("body-5"),d=o.fonts,c=o.sizes,f=o.typography,u=p=>p==="none"?"sentence":"authored";return{fonts:{...d,heading:r.font??d.heading,heading2:a.font??r.font??d.heading2,heading3:n.font??r.font??d.heading3,body:s.font??d.body,label:l.font??d.label},sizes:{...c,headingLarge:r.size??null,headingMedium:a.size??null,headingSmall:n.size??null,body:s.size??null,label:l.size??null},compression:o.compression,typography:{...f,case:u(r.letterCase),weight:r.weight??null,maxPx:r.largestSize??null,weight2:a.weight??null,weight3:n.weight??null,case2:u(a.letterCase),case3:u(n.letterCase)}}}function c0e(e){let o=[];for(let t of e){let r=t.values,a=`.${m1(t)}`,n=`[${Rs}="${t.id}"]`,s=`${a}, ${n}`,l=[],d=r.font!==void 0?$r.find(p=>p.key===r.font)?.cssVar:void 0;if(d&&l.push(`font-family: var(${d})`),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 c=cs(r.color);c&&l.push(`color: ${c}`),r.italic===!0&&l.push("font-style: italic"),r.weight!==void 0&&l.push(`font-weight: ${r.weight}`);let f=[];r.lineHeight!==void 0&&f.push(`line-height: ${r.lineHeight}`),r.letterSpacing!==void 0&&f.push(`letter-spacing: ${r.letterSpacing}em`),t.kind==="body"&&l.push(...f);let u=p9(r.letterCase);u&&t.kind==="body"&&l.push(`text-transform: ${u}`),r.paragraphSpacing&&l.push(`--sf-part-para: ${r.paragraphSpacing}px`),l.length&&o.push(`${s} { ${l.join("; ")} }`),t.kind==="heading"&&f.length&&o.push(`${s}, ${a}:is(h1, h2, h3, h4), ${n}:is(h1, h2, h3, h4) { ${f.join("; ")} }`),t.kind==="heading"&&u&&o.push(`${n}, ${a}:is(h1, h2, h3, h4) { text-transform: ${u} }`),r.paragraphSpacing&&(o.push(`*:has(> ${n}) { --sf-part-para: ${r.paragraphSpacing}px }`),o.push(...Op(`:is(${s})`,`*:has(> ${n})`))),o.push(...h9(t,s,a,n))}return o.join(`
|
|
4
|
-
`)}function h9(e,o,t,r){let a=e.values,n=Lt("textSize",a.size,a.sizeTablet,a.sizePhone),s=Lt("textSize",a.largestSize,a.largestSizeTablet,a.largestSizePhone),l=Lt("same",a.lineHeight,a.lineHeightTablet,a.lineHeightPhone),d=Lt("same",a.letterSpacing,a.letterSpacingTablet,a.letterSpacingPhone),c=Lt("spacing",a.paragraphSpacing,a.paragraphSpacingTablet,a.paragraphSpacingPhone),f=I1("textSize",a.size,a.sizeTablet,a.sizePhone,$n()),u=x9[e.id],p=[];for(let[h,I]of[["tablet",Sp],["phone",wp]]){let g=[],C=[],w=f[h],T=s[h],y=n[h]===void 0&&T===void 0||w===void 0?void 0:T===void 0?w:Math.min(w,T);y!==void 0&&C.push(`font-size: ${y}px`);let b=[];l[h]!==void 0&&b.push(`line-height: ${l[h]}`),d[h]!==void 0&&b.push(`letter-spacing: ${d[h]}em`),e.kind==="body"&&C.push(...b),c[h]!==void 0&&C.push(`--sf-part-para: ${c[h]}px`),C.length&&g.push(`${o} { ${C.join("; ")} }`),e.kind==="heading"&&b.length&&g.push(`${o}, ${t}:is(h1, h2, h3, h4), ${r}:is(h1, h2, h3, h4) { ${b.join("; ")} }`),c[h]!==void 0&&g.push(`*:has(> ${r}) { --sf-part-para: ${c[h]}px }`),c[h]!==void 0&&!a.paragraphSpacing&&g.push(...Op(`:is(${o})`,`*:has(> ${r})`)),y!==void 0&&u&&g.push(`.sf-themed-content { --size-${u}: ${y}px !important }`),g.length&&p.push(`@media ${I} { ${g.join(" ")} }`)}return p}var x9={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function f0e(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function k1(e){return e?kp[e]:void 0}function yb(e){let o=bi(e);return dr({font:e.font,color:e.color===void 0?void 0:rt(e.color),size:e.size,weight:e.weight,italic:e.italic,lineHeight:o.lineHeight,letterSpacing:o.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function T1(e){return Object.keys(yb(e)).length>0}function P1({saved:e,old:o,styleId:t,values:r}){let a=y1(e);return{saved:I9(a,t,r),old:o}}function I9(e,o,t){return e.map(r=>r.id===o?Ib({...r,values:dr({...r.values,...t})},r.auto):r)}var E1=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],w9=["size","lineSpacing","letterSpacing","letterCase"],C9=500,Sb=$r.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function O1({saved:e,old:o,colours:t,colourNameOf:r,sizeOf:a,onChange:n,openId:s,onOpenChange:l,readOnly:d=!1,withoutSize:c=!1}){let f=S9(),[u,p]=b9(null),h=Br(e,o),I=fc(f),g=v1(h,a,I);return g9(y9,{styles:g,onChange:C=>n(S1({saved:e,old:o,cur:g,next:C,sizeOf:a,panelView:I})),fonts:Sb,colours:t,colourNameOf:r,settings:c?E1.filter(C=>C!=="size"):E1,auto:w9,openId:s===void 0?u:s,onOpenChange:l??p,readOnly:d,device:I,fallback:C=>{let w=h.find(y=>y.id===(C.kind==="heading"?"heading-1":"body-1")),T={};return w?.values.font&&C.id!==w.id&&(T.font=w.values.font),C.kind==="heading"&&(T.weight=C9),T}})}var A1=["font","size","weight","emphasis"],T9=500;function P9({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("Emphasis"),values:a}}function E9(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 L1(e){let{headingWeight:o,open:t,onOpenChange:r,onChange:a,withoutSize:n=!1}=e,s=P9(e);return _1(k9,{label:i("Emphasis"),children:_1(v9,{style:s,fonts:Sb,settings:n?A1.filter(l=>l!=="size"):A1,auto:["size"],fallback:()=>({weight:o??T9}),open:t,onOpenChange:r,onChange:l=>E9(s,l).forEach(a)})})}import{viewKeyAt as N1}from"efficient-easel/draw";import{shownUnitAt as F9,unitKeyOnWrite as B9}from"efficient-easel/screen/lib/content/length-units";import{convertRowLength as O9,rowUnits as _9,unitPickPatch as A9}from"efficient-easel/screen/lib/content/length-units";import{viewKeyAt as L9}from"efficient-easel/draw";var R9=["cornerRadius","siteWidth","siteGutter","siteGutterPhone","blockGap","blockGapPhone"],_p={cornerRadius:{number:"corner_radius_px",kind:"radius",grid:Qv,tier:"desktop"},siteWidth:{number:"site_width",kind:"size",grid:uo,tier:"desktop"},siteGutter:{number:"site_gutter",kind:"spacing",grid:Go,tier:"desktop"},siteGutterPhone:{number:"site_gutter_phone",kind:"spacing",grid:Ht,tier:"mobile"},blockGap:{number:"block_gap",kind:"gap",grid:ht,tier:"desktop"},blockGapPhone:{number:"block_gap_phone",kind:"gap",grid:ht,tier:"mobile"}};function Ap(e){return{number:_p[e].number,unit:Hv[`${e}Unit`]}}function R1(e,o,t){let r=ve(t),{number:a,unit:n}=Ap(e);return{[a]:o,[n]:o===null||r==="px"?null:r}}function Lp(e,o,t,r){let{kind:a,grid:n,tier:s}=_p[e],l=ve(t),d=ve(r);return l===d?o:O9(o,l,d,s,{kind:a},n)}function F1(e,o,t,r){let{number:a,unit:n}=Ap(e),s=A9({[a]:o},l=>Lp(e,l,t,r),n,ve(r),"px");return{[a]:s[a],[n]:s[n]??null}}function B1(e,o){let{kind:t,grid:r}=_p[e];return Mv(t,ve(o),r)}function D1(e){return _9({kind:_p[e].kind},qa)}function wb(e,o){let t=L9(e,o);if(!R9.includes(t))throw new Error(`no site length row ${t}`);return t}function yi(e,o,t,r,a){let{siteLengthUnits:n,setSiteLengthUnits:s}=ue(),l=`${e}Unit`,d=n[l],c=F9({n:a?.figure??null,u:a?.unit??null,[N1("n","mobile")]:o,[N1("u","mobile")]:d??null},{n:"n"},"u","mobile"),f=I=>s({[l]:I==="px"?null:I}),u=I=>{t(I);let g=B9(l,d,c,"px",I===null);l in g&&f(g[l]==null?null:ve(g[l])),r(R1(e,I,c),I===null)},p=I=>{let g=ve(I);if(g===c||(f(g),o===null))return;let C=F1(e,o,c,g);t(C[Ap(e).number]),r(C,!0)},h=a?a.unit===c?a.figure:Lp(e,a.figure,a.unit,c):null;return{length:{unit:c,grid:B1(e,c),units:{options:D1(e),onChange:p,label:i("Unit")}},write:u,rest:h,shown:I=>Lp(e,I,"px",c)}}import{EmptyState as sq,SliderGroup as lq,Tabs as iq,Tooltip as ZEe,tabButtonId as dq,tabPanelId as cq}from"efficient-shell/ui";import{ContrastIcon as fq,SettingsIcon as pq,TypeIcon as uq}from"efficient-easel/icons";function M1(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 Tb}from"react/jsx-runtime";import{ListIcon as q9,PaddingTopIcon as Y9}from"efficient-easel/icons";import{jsx as Rp}from"react/jsx-runtime";import{SettingsDefaultReset as D9,SettingsField as N9,SettingsSegmented as M9}from"efficient-easel/panel";import{WidthIcon as H9}from"efficient-easel/icons";function H1({value:e,resolved:o,onChange:t,label:r="Width",labelId:a,followsLabel:n,hint:s}){let l=e===void 0,d=l?o:e,c=i(r);return Rp(N9,{label:c,labelId:a,icon:Rp(H9,{}),value:l?n:void 0,changed:!l,action:Rp(D9,{words:le()?.panel,label:c,changed:!l,onReset:()=>t(void 0)}),hint:s,children:Rp(M9,{options:[{label:i(Va.full),id:"full"},{label:i(Va.page),id:"content"}],value:d,ariaLabel:c,onChange:t})})}import{HEADER_TYPE as Cb,FOOTER_TYPE as U9}from"efficient-easel/draw";var W9=new Set(["Hero","HeroSingle","IntroBleed"]),U1={min:56,max:140,default:88},X0e={min:0,max:120,step:2,default:32},Z0e=`var(--sf-header-h, ${U1.default}px)`,z9="--sf-header-set-h",J0e="--sf-header-h",Q0e=`var(${z9}, ${U1.default}px)`,eEe="sf-header-clearance",oEe="sf-sticky-underheader";function $9(e){return e?.find(o=>o?.type&&o.type!==Cb)??null}function W1(e){let o=$9(e)?.type;return!o||!W9.has(o)}function tEe(e){return!W1(e)}function rEe(e){return!!e?.some(o=>o?.type===Cb)}function aEe(e){return!e||e.length===0?!1:!e.some(o=>o?.type===Cb||o?.type===U9)}var G9=["auto","shared","own"],vb="auto",j9="topSpace",nEe="data-top-space";function K9(e){return G9.includes(e)?e:vb}function V9(e,o){let t=K9(e?.props?.[j9]);return t==="own"?!0:t==="shared"?!1:W1(o)}function sEe(e,o){return V9(e,o)?"own":null}function X9(){return{type:"custom",render:({value:e,onChange:o})=>Tb(H1,{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 Z9=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],IEe={pageBackground:MO(),topSpace:st("Top space",Tb(Y9,{}),Z9,vb),widthChoice:X9()},Si=["pageBackground","topSpace","widthChoice"],J9="Record type",kb=new Map,z1=-1;function Q9(e){z1!==hx()&&(kb.clear(),z1=hx());let o=mx(),t=o.some(a=>a.key===e)?"":e,r=kb.get(t);return r||(r=st(J9,Tb(q9,{}),[...o.map(a=>({label:a.label,value:a.key})),...t?[{label:t,value:t}]:[]],Zr),kb.set(t,r)),r}var $1=new WeakMap;function gEe(e,o){if(!Bl()||mx().length<2||Fc in e)return e;let t=Q9(Fl(o)),r=$1.get(e);if(r&&r.row===t)return r.fields;let a={[Fc]:t,...e};return $1.set(e,{row:t,fields:a}),a}import{previewFrame as mq}from"efficient-easel/screen/lib/document/preview-dom";var G1="background";function j1(e){let o=Vo(Yn(e));return fs({main:o.accent,text:o.text,background:o.background,muted:o.muted}).map(t=>({key:t.name,name:t.label??t.name,value:t.value}))}function K1(e){return j1(e).filter(o=>o.key!==G1)}function V1(e){let o=j1(e).filter(t=>t.key===G1);return t=>{let r=rt(t);return o.find(a=>a.key===r)?.value??r}}import{useEasel as eq}from"efficient-easel/easel";function Fp({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=eq(E=>E),{fonts:a,setFonts:n,sizes:s,setSizes:l,headingCompression:d,setHeadingCompression:c,headingTypography:f,setHeadingTypography:u,textStyles:p,setTextStyles:h}=ue(),I=t.data,g=I.root?.props??{},C=e?yl(g.fonts):a,w=e?Zv:s,T=e?La(g.headingCompression):d,y=e?ak(g.headingTypography):f,b={fonts:C,sizes:w,compression:T,typography:y},P=e?g.textStyles:p,H=E=>r({type:"replaceRoot",root:{...I.root,props:{...g,...E}},recordHistory:!0});return{fonts:C,sizes:w,compression:T,typography:y,old:b,saved:P,write:(E,U)=>{let O=bb(Br(E.saved,E.old),E.old);e?H({textStyles:E.saved,fonts:O.fonts,headingCompression:O.compression,headingTypography:O.typography}):(h(E.saved),n(O.fonts),l(O.sizes),c(O.compression),u(O.typography)),o(w1(E,b),U)},writeRoot:H}}import{pictureShadowColor as hq}from"efficient-easel/screen/lib/document/shadow-values";var Eb="sf-site-styles",xq="sf-site-styles-tabpanel",X1="text",Hs="basics",q1="this-page-group",Ns=[{id:Hs,label:"Basics",icon:Ce(pq,{})},{id:"theme",label:"Theme",icon:Ce(fq,{})},{id:"text",label:"Text",icon:Ce(uq,{})}];function Iq({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=Y1(c=>c),{theme:a,setTheme:n}=ue(),s=t.data,l=s.root?.props??{},d=c=>{if(e){let f={...l,theme:c};r({type:"replaceRoot",root:{...s.root,props:f},recordHistory:!0})}else n(c);o({selected_preset:c.selected,theme_presets:c.themes})};return Ce(k_,{value:e?l.theme:a,onChange:d})}function gq({themeFromDocument:e,persist:o}){let[t,r]=Ob(null),{theme:a,setFonts:n,setSizes:s,setHeadingTypography:l}=ue(),d=Fp({themeFromDocument:e,persist:o}),{old:c,saved:f,writeRoot:u}=d,p=d.fonts,h=d.sizes,I=d.typography,g=E=>E.values.size??wq(bq[E.id]??"body")??yq[E.kind],C=E=>d.write(E),w=K1(a),T=V1(a),y=E=>{let U={...p,accent:E};e?u({fonts:U}):n(U),o({accent_font:E})},b=E=>{s({...h,accent:E}),o({accent_size_px:E})},P=E=>{let U={...I,weightStrong:E};e?u({headingTypography:U}):l(U),o({heading_weight_strong:E})},H=E=>{let U={...I,italicStrong:E};e?u({headingTypography:U}):l(U),o({accent_italic:E})};return sn(Ms,{children:[Ce(O1,{saved:f,old:c,colours:w,colourNameOf:T,sizeOf:g,onChange:C,openId:t===Pb?null:t,onOpenChange:r,withoutSize:e}),Ce(L1,{font:p.accent,size:h.accent,weight:I.weightStrong,italic:I.italicStrong,headingWeight:I.weight,open:t===Pb,onOpenChange:E=>r(E?Pb:null),onChange:E=>{E.key==="font"?y(E.value):E.key==="size"?b(E.value):E.key==="weight"?P(E.value):H(E.value)},withoutSize:e})]})}var Pb="accent",bq={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},yq={heading:32,body:14},Sq={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 wq(e){if(typeof document>"u")return null;let o=(mq()?.contentDocument??document).querySelector(Sq[e]);if(!o)return null;let t=parseFloat(getComputedStyle(o).fontSize);return Number.isFinite(t)?t:null}function Cq({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=Y1(p=>p),{cornerRadiusPx:a,setCornerRadiusPx:n}=ue(),s=t.data,l=s.root?.props??{},d=l.cornerRadiusPx===void 0?ek[Jv(l.cornerStyle)]:Qt(l.cornerRadiusPx),c=e?d:a,f=yi("cornerRadius",a,n,o),u=p=>r({type:"replaceRoot",root:{...s.root,props:{...l,...p}},recordHistory:!0});return Ce(T_,{value:c,onChange:p=>{e?(u({cornerRadiusPx:p}),o({corner_radius_px:p})):f.write(p)},...e?{}:{length:f.length}})}function vq({persist:e}){let{siteWidth:o,setSiteWidth:t,sectionBackgroundWidth:r,setSectionBackgroundWidth:a,sectionContentWidth:n,setSectionContentWidth:s}=ue(),l=_b(),d=yi("siteWidth",o??null,t,e);if(l!=="desktop")return null;let c=typeof o=="number"?o:d.shown(uo.default),f=d.write,u=h=>{a(h),e({section_background_width:h},!0)},p=h=>{s(h),e({section_content_width:h},!0)};return sn(Ms,{children:[Ce($_,{value:r??"full",changed:r!==null,detail:i("Full width"),onChange:u,onReset:()=>u(null),hint:W_}),Ce(G_,{mode:n??"content",px:c,min:uo.min,max:uo.max,changed:typeof o=="number"||n!==null,detail:`${i("Content width")} ${uo.default}px`,onMode:p,onPx:h=>f(h),onReset:()=>{p(null),f(null)},hint:z_,length:d.length})]})}function kq({persist:e}){let{siteGutter:o,siteGutterPhone:t,setSiteGutter:r,setSiteGutterPhone:a,siteLengthUnits:n}=ue(),s=H_(_b(),{gutter:o,phone:t,gutterUnit:n.siteGutterUnit}),l=s?.key==="site_gutter_phone",d=yi(wb("siteGutter",l?"mobile":"desktop"),s?.value??null,l?a:r,e);return s?Ce(U_,{value:s.value,onChange:d.write,unsetPx:s.unsetPx,restsOn:d.shown(s.unsetPx),bounds:s.bounds,length:d.length}):null}function Tq({persist:e}){let{blockGap:o,blockGapPhone:t,setBlockGap:r,setBlockGapPhone:a,siteLengthUnits:n}=ue(),s=L_(_b(),{gap:o,phone:t}),l=s?.key==="block_gap_phone",d=s?.followsPx==null?null:{figure:s.followsPx,unit:ve(n.blockGapUnit)},c=yi(wb("blockGap",l?"mobile":"desktop"),s?.value??null,l?a:r,e,d);return s?Ce(R_,{value:s.value,onChange:c.write,followsPx:c.rest,followsUnit:c.length.unit,length:c.length}):null}function Pq({persist:e}){return sn(Ms,{children:[Ce(vq,{persist:e}),Ce(kq,{persist:e}),Ce(Tq,{persist:e})]})}function Eq(e){return{card_shadow:e}}function Oq(e){return e===null?{shadow_color:null}:{shadow_color:hq(e)}}function _q(e){return{hover_effect:e}}function Aq({persist:e}){let{cardShadow:o,setCardShadow:t,shadowColor:r,setShadowColor:a,hoverEffect:n,setHoverEffect:s}=ue();return sn(Ms,{children:[Ce(P_,{value:o,onChange:l=>{t(l),e(Eq(l),!0)}}),Ce(__,{value:r,onChange:l=>{a(l),e(Oq(l),l===null)}}),Ce(F_,{value:n,onChange:l=>{s(l),e(_q(l),!0)}})]})}function Lq(e){return{photography_grayscale:e}}function Rq({persist:e}){let{photographyGrayscale:o,setPhotographyGrayscale:t}=ue();return Ce(D_,{value:o,onChange:r=>{t(r),e(Lq(r),!0)}})}function Fq({persist:e}){return Ce(Ms,{children:Ce(Rq,{persist:e})})}function Bq(e){return{share_button_on_posts:e}}function Dq({persist:e}){let{shareButtonOnPosts:o,setShareButtonOnPosts:t}=ue();return Ce(N_,{value:o,onChange:r=>{t(r),e(Bq(r),!0)}})}function Us(){let{websiteName:e}=ue();return e?.trim()||Dk}function Bp({themeFromDocument:e=!1,tokenRef:o,siteId:t,onNotify:r,tab:a,onTabChange:n,initialTab:s,revealPageGroup:l=!1,onPageGroupRevealed:d}){let{persist:c}=hs({themeFromDocument:e,tokenRef:o,siteId:t,onResult:C=>{let w=M1(C);w&&r?.(w.msg,w.tone)}}),[f,u]=Ob(s??Ns[0].id),p=a!==void 0,h=p?a:f,I=p?n??(()=>{}):u,g=Ns.find(C=>C.id===h)??Ns[0];return sn(lq,{children:[Ce(Hq,{activeId:g.id,onSelect:I}),sn("div",{id:cq(Eb,g.id),className:xq,role:"tabpanel","aria-labelledby":dq(Eb,g.id),children:[h===Hs&&sn(Ms,{children:[Ce(Cq,{themeFromDocument:e,persist:c}),!e&&Ce(Aq,{persist:c}),!e&&Ce(Pq,{persist:c}),!e&&Ce(Fq,{persist:c}),!e&&Ce(Dq,{persist:c}),Ce(Nq,{reveal:l,onRevealed:d})]}),h==="theme"&&Ce(Iq,{themeFromDocument:e,persist:c}),h==="text"&&Ce(gq,{themeFromDocument:e,persist:c})]})]})}function Nq({reveal:e,onRevealed:o}){let[t,r]=Ob(!0),a=nq(o);return a.current=o,aq(()=>{if(!e)return;r(!0);let n=requestAnimationFrame(()=>{document.getElementById(q1)?.scrollIntoView({block:"start"}),a.current?.()});return()=>cancelAnimationFrame(n)},[e]),Ce(rq,{title:i("This page"),open:t,onToggle:r,id:q1,children:Ce(Mq,{})})}function Mq(){let{fields:e,values:o,readOnly:t,onChange:r}=oq(),a=Object.fromEntries(Si.filter(n=>n in e).map(n=>[n,e[n]]));return Object.keys(a).length===0?Ce(sq,{variant:"none",icon:!1,message:i("This page has no look of its own to set.")}):Ce(tq,{fields:a,values:o,onChange:r,readOnly:t,tabs:!1,idPrefix:"this-page",ariaLabel:i("This page")})}function Hq({activeId:e,onSelect:o}){return Ce("div",{className:"es-insp-tabs",children:Ce(iq,{variant:"underline",block:!0,labelsFit:!0,"aria-label":i("Styles"),idPrefix:Eb,value:e,onChange:o,items:Ns.map(t=>{let r=i(t.label);return{id:t.id,icon:t.icon,label:r}})})})}import{InspectorIconButton as Yq}from"efficient-easel/chrome";import{Button as aA,Dialog as Xq,FormField as Zq,Input as nA,PopupMenu as Jq,PopupMenuItem as sA,toast as lA}from"efficient-shell/ui";import{LayersTree as Qq,TreeGroupLabel as eY,TreeRow as iA,TreeRowAction as Hp}from"efficient-easel/tree";import{AddIcon as oY,DuplicateIcon as tY,PageIcon as rY,SettingsIcon as aY}from"efficient-easel/icons";import{PagesIcon as nY}from"efficient-easel/rail";import{useEaselHost as sY}from"efficient-easel/screen/lib/host";import{useEaselSession as pA}from"efficient-easel/screen/lib/session-context";import{useCallback as Dp,useEffect as Uq,useSyncExternalStore as Wq}from"react";import{useScreenDocument as eA}from"efficient-easel/screen/components/ScreenDocumentContext";var Z1=new WeakMap;function wi(e){let o=Z1.get(e);return o||(o={rows:null,loading:null,listeners:new Set},Z1.set(e,o)),o}function Ab(e,o){e.rows=o;for(let t of e.listeners)t()}var Np=new Set;function Mp(e,o){o?Np.add(e):Np.delete(e)}function J1(e){let o=wi(e),t=e.listPages().then(r=>Ab(o,Np.size?r.filter(a=>!Np.has(a.id)):r),()=>Ab(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var Q1=()=>null,zq=()=>()=>{};function Ci(){let{adapter:e,ready:o}=eA(),t=Dp(l=>{let{listeners:d}=wi(e);return d.add(l),()=>d.delete(l)},[e]),r=Dp(()=>wi(e).rows,[e]),a=Wq(o?t:zq,o?r:Q1,Q1);Uq(()=>{if(!o)return;let l=wi(e);l.rows===null&&!l.loading&&J1(e)},[e,o]);let n=Dp(()=>o?J1(e):Promise.resolve(),[e,o]),s=Dp(l=>Ab(wi(e),l),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function $q(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function oA(){let{currentSlug:e}=eA(),{rows:o}=Ci();return $q(o,e)}import{canDuplicatePage as lY,DuplicatePageDialog as iY,uniqueSlug as dA}from"efficient-easel/page-copy";var cA="sf-editor-pages-collapsed-groups";function dY(){let e=pA(),{siteId:o,templateId:t}=fA(),r=to(e).pages;if(!(!r.duplicate||t))return(a,n)=>r.duplicate(a.id,{...n,...o?{siteId:o}:{}})}function uA({onNavigate:e,onClose:o,activeSurface:t,onPreviewSurface:r}){let a=pA().chrome?.pageRows,n=sY(),{adapter:s,capabilities:l,ready:d,currentSlug:c}=fA(),f=Us(),{rows:u,reload:p,setRows:h,getRows:I}=Ci(),[g,C]=da(""),[w,T]=da(!1),[y,b]=da(null),[P,H]=da(!1),[E,U]=da(""),O=Kq(),D=dY(),[v,_]=da(null),[A,F]=da(()=>{if(typeof window>"u")return new Set;try{let M=window.localStorage.getItem(cA);return new Set(M?JSON.parse(M):[])}catch{return new Set}});jq(()=>{try{window.localStorage.setItem(cA,JSON.stringify([...A]))}catch{}},[A]);let z=M=>F(Re=>{let ye=new Set(Re);return ye.has(M)?ye.delete(M):ye.add(M),ye}),$=rA(()=>UT(u??[]),[u]),X=g.trim().toLowerCase(),Q=M=>!X||M.toLowerCase().includes(X),Fe=M=>X?!0:!A.has(M),Oe=rA(()=>new Set((u??[]).map(M=>M.slug)),[u]),ze=()=>{if(l.pageCreationInAdminForm){n.send("storefront-editor:new-page");return}U(""),b(null),H(!0)},Ke=async()=>{let M=E.trim();if(!(!M||!d||w||!s.createPage)){T(!0),b(null);try{let Re=await s.createPage({slug:dA(M,Oe),title:M,layout:{}});await p(),H(!1),U(""),e(Re.slug)}catch{b(i("Couldn\u2019t add the page \u2014 please retry."))}finally{T(!1)}}},ge=l.hasSiteSettings&&!!s.createPage,Te=async()=>{if(!(!d||w||!s.createPage)){T(!0),b(null);try{let M=await s.createPage(W0(i("New popup"),Oe));await p(),e(M.slug)}catch{b(i("Couldn\u2019t add the popup \u2014 please retry."))}finally{T(!1)}}},_e=Vq(null),[Ne,ao]=da(null),bo=()=>{if(!ge)return ze();if(Ne)return ao(null);let M=_e.current?.getBoundingClientRect();M&&ao({top:M.bottom+6,right:Math.max(8,window.innerWidth-M.right)})},ne=M=>{let Re=u??[],ye=s.deletePage;if(!d||w||!ye||Re.length<=1)return;let po=Re.findIndex(Ze=>Ze.id===M.id),Be=Re.filter(Ze=>Ze.id!==M.id),Ot=M.slug===c;Mp(M.id,!0),h(Be),b(null),Ot&&Be[0]&&e(Be[0].slug);let xr=()=>{Mp(M.id,!1);let Ze=I()??[];if(Ze.some(ya=>ya.id===M.id))return;let Ir=[...Ze];Ir.splice(Math.max(0,Math.min(po,Ir.length)),0,M),h(Ir)};lA.undoable(i("Deleted \u201C{name}\u201D",{name:M.label}),{actionLabel:i("Undo"),commit:async Ze=>{await ye(M.id,Ze),Mp(M.id,!1)},undo:()=>{xr(),Ot&&e(M.slug)},onFail:()=>{xr(),lA.error(i("Couldn\u2019t delete the page \u2014 please retry."))}})},Me=M=>n.send("storefront-editor:open-page",{slug:M}),Ve=M=>{if(!Q(M.label))return null;let Re=!t&&M.slug===c,ye=l.canDeletePagesInline&&(u??[]).length>1,po=Ba(M),Be=HT(M),Ot=[...po?[{label:i("Dynamic"),tone:"info"}]:[],...Be?[{label:i("Lightbox"),tone:"success"}]:[],...M.draft?[{label:i("draft"),tone:"draft"}]:[]],xr=Ot.length>0?Ot:void 0,Ze=!!D&&lY(M),Ir=Ze||l.pageCreationInAdminForm||ye?vi(tA,{children:[Ze&&Pe(Hp,{kind:"plain",label:i("Duplicate \u201C{name}\u201D",{name:M.label}),disabled:w,onClick:()=>_(M),children:Pe(tY,{size:13})}),l.pageCreationInAdminForm&&Pe(Hp,{kind:"plain",label:i("Page settings for \u201C{name}\u201D",{name:M.label}),onClick:()=>Me(M.slug),children:Pe(aY,{size:13})}),ye&&Pe(Hp,{kind:"delete",label:i("Delete \u201C{name}\u201D",{name:M.label}),disabled:w,onClick:()=>ne(M),children:Pe(Lb,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return Pe(iA,{icon:Pe(rY,{size:14}),name:M.label,selected:Re,onSelect:()=>e(M.slug),badge:xr,actions:Ir,rowProps:{"data-page-slug":M.slug}},M.id)},Z=(M,Re,ye)=>{let po=ye.filter(Boolean);if(po.length===0)return null;let Be=Fe(M);return vi(Gq,{children:[Pe(eY,{count:po.length,countLabel:Wo("{n} page","{n} pages",po.length),expanded:Be,onToggle:()=>z(M),children:Re}),Be&&po]},M)},Ae=(a?.rows??[]).filter(M=>Q(M.label)).map(M=>{let Re=t===M.key;return Pe(iA,{icon:M.icon,name:M.label,selected:Re,onSelect:()=>r(M.key),badge:{label:i("Preview"),tone:"warning"},actions:Pe(Hp,{kind:"plain",label:i("Open the {name} in a new tab",{name:M.label}),onClick:()=>window.open(M.href,"_blank","noopener,noreferrer"),children:Pe(Lb,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":M.key}},M.key)}),ct=l.hasSiteSettings&&!!a,fo=(()=>{if(u===null)return null;let M=[],Re=!1;for(let ye of $){ct&&!Re&&ye.key.startsWith("system:")&&(M.push(Z("shop",a.title,Ae)),Re=!0);let po=ye.key===gx||ye.label===Ix?i(ye.label):ye.label;M.push(Z(ye.key,po,ye.rows.map(Ve)))}return ct&&!Re&&M.push(Z("shop",a.title,Ae)),M})();return vi("div",{className:"sf-pages",children:[Pe(qq,{icon:Pe(nY,{}),title:i("Pages"),context:f,actions:Pe(Yq,{buttonRef:_e,label:ge?i("Add"):i("New page"),hasPopup:ge?"menu":void 0,expanded:ge?Ne!==null:void 0,onClick:bo,children:Pe(oY,{size:15})})}),Ne&&Pe(Jq,{portal:!0,style:{top:Ne.top,right:Ne.right},onClose:()=>ao(null),children:vi("div",{role:"menu","aria-label":i("Add"),children:[Pe(sA,{role:"menuitem",onClick:()=>{ao(null),ze()},children:i("Page")}),Pe(sA,{role:"menuitem",disabled:w,onClick:()=>{ao(null),Te()},children:i("Popup")})]})}),Pe("div",{className:"sf-pages-find",children:Pe(nA,{type:"search",leftIcon:Pe(Lb,{name:"search",size:14,rounded:!0}),placeholder:i("Search all pages\u2026"),value:g,onChange:M=>C(M.target.value),"aria-label":i("Search all pages")})}),y&&!P&&Pe("div",{className:"sf-note sf-note--error",role:"alert",children:y}),fo===null?Pe("div",{className:"sf-note",children:i("Loading\u2026")}):fo.some(Boolean)?Pe(Qq,{ariaLabel:i("Pages"),className:"sf-scroll",children:fo}):Pe("div",{className:"sf-note",children:g.trim()?i("No pages match your search"):i("No pages yet. Add one with + above.")}),D&&v&&Pe(iY,{source:{title:v.label,slug:v.slug},taken:Oe,host:yc(),duplicate:M=>D(v,M),onClose:()=>_(null),onDuplicated:M=>{_(null),p(),e(M.slug)}},v.id),Pe(Xq,{open:P,onClose:()=>H(!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:vi(tA,{children:[Pe(aA,{variant:"secondary",onClick:()=>H(!1),children:i("Cancel")}),Pe(aA,{onClick:()=>{Ke()},disabled:w||!E.trim(),loading:w,children:i("Add page")})]}),children:Pe(Zq,{label:i("Page name"),htmlFor:O,hint:E.trim()?i("URL: /{slug}",{slug:dA(E,Oe)}):void 0,error:y??void 0,children:Pe(nA,{id:O,value:E,invalid:!!y,onChange:M=>U(M.target.value),onKeyDown:M=>{M.key==="Enter"&&Ke()},placeholder:i("e.g. About")})})})]})}import{jsx as xA}from"react/jsx-runtime";import{createContext as fY,useCallback as pY,useContext as uY,useMemo as mY,useState as hY}from"react";import{CanvasChromeContext as xY}from"efficient-easel/easel";import{useSelectHandler as IY}from"efficient-easel/draw/client";import{parseHexColor as cY}from"efficient-shell/format";var Up=["chat-bubble-left-right","chat-bubble-oval-left-ellipsis","chat","megaphone","phone","sparkles"],Ws=Up[0];var ln="right";function Wp(e){return Up.includes(e??"")?e:Ws}function mA(e){return e==="left"?"left":ln}function hA(e){return e&&cY(e)===e.toLowerCase()?e.toLowerCase():""}var IA="chat",zp={enabled:!0,title:"",subtitle:"",greeting:"",launcherColor:"",launcherIcon:"",launcherPosition:ln,launcherLabel:"",showOnPhones:!0};function $Oe(e){return{enabled:e.enabled,title:e.title,subtitle:e.subtitle,greeting:e.greeting,launcherColor:hA(e.launcherColor),launcherIcon:e.launcherIcon?Wp(e.launcherIcon):"",launcherPosition:mA(e.launcherPosition),launcherLabel:e.launcherLabel??"",showOnPhones:e.showOnPhones!==!1}}var gA=fY({chat:zp,setChat:()=>{},setSelected:()=>{},setSelectHandler:()=>{}});function GOe({children:e,chat:o=zp,onChatChange:t}){let[r,a]=hY(!1),n=pY(c=>t?.(c),[t]),{select:s,setSelectHandler:l}=IY(),d=mY(()=>({selected:()=>r?IA:null,select:c=>c===IA&&s()}),[r,s]);return xA(gA.Provider,{value:{chat:o,setChat:n,setSelected:a,setSelectHandler:l},children:xA(xY.Provider,{value:d,children:e})})}var $p=()=>uY(gA);import{jsx as Rb}from"react/jsx-runtime";import{DesktopIcon as gY,PhoneIcon as bY,TabletIcon as yY}from"efficient-easel/icons";import{VIEW_TIERS as SY,VIEW_TIER_LABEL as wY}from"efficient-easel/draw";var CY={desktop:Rb(gY,{}),tablet:Rb(yY,{}),mobile:Rb(bY,{})},bA=SY.map(e=>({id:e,get label(){return i(wY[e])},icon:CY[e]}));import{PreviewDeviceContext as kfe}from"efficient-easel/draw/client";import{jsx as vY}from"react/jsx-runtime";import{createContext as kY,useCallback as yA,useContext as TY,useMemo as PY,useRef as EY}from"react";var OY=Object.fromEntries(Cc.map(e=>[e,{value:"",error:null}])),SA=kY({links:Mk,rows:OY,canSave:!1,saveLink:async()=>({ok:!1,error:"There is no website to save to."}),openPanel:()=>{},setOpenHandler:()=>{}});function e_e({children:e,value:o}){let t=EY(()=>{}),r=yA(()=>t.current(),[]),a=yA(s=>{t.current=s},[]),n=PY(()=>({...o,openPanel:r,setOpenHandler:a}),[o,r,a]);return vY(SA.Provider,{value:n,children:e})}var ki=()=>TY(SA);import{jsx as _Y}from"react/jsx-runtime";import{createContext as AY,useContext as LY,useMemo as RY,useState as FY}from"react";var wA=AY(null);function a_e({children:e}){let[o,t]=FY(null),r=RY(()=>({surface:o,setSurface:t}),[o]);return _Y(wA.Provider,{value:r,children:e})}function CA(){return LY(wA)??{surface:null,setSurface:()=>{}}}import{createPreviewSelectionContext as BY}from"efficient-easel/draw/client";var Ti="Scrolling Bar",{Provider:l_e,useSelection:vA}=BY("selectedHeroId"),i_e="data-sf-hero-ticker";function d_e(e){return`${e}::ticker`}function c_e(e){return!e||!e.endsWith("::ticker")?null:e.slice(0,-8)||null}var kA=["","","","","",""],TA="#ticker",Pi="strip",Fb={sectionAccent:er,line:!1};function DY(e){return(Array.isArray(e.tickerItems)?e.tickerItems:[]).map(o=>typeof o?.text=="string"?o.text:"").filter(o=>o.trim()!=="")}function Bb(e){return DY(e).length>0}function u_e(e){return e.showTicker!==!1&&Bb(e)}import{createPreviewSelectionContext as NY}from"efficient-easel/draw/client";var{Provider:x_e,useSelection:Gp}=NY("selectedHeroPart");var EA=["one","side","stacked"];var g_e={one:"One",side:"Side by side",stacked:"Stacked"};function jp(e){return EA.includes(e)?e:"one"}function PA(e){return e==="one"?1:2}function Db(e,o){if(EA.includes(e))return e;let t=jp(o);return t==="side"?"stacked":t}function Ei(e){let o=jp(e.mediaLayout);return Math.max(PA(o),PA(Db(e.mediaLayoutPhone,o)))}var dn=["media","image","image2"],cn={media:"Media",image:"Image",image2:"Image 2"},Oi={media:"heroMedia",image:"heroImage",image2:"heroImage2"};function Kp(e,o){return e==="image"&&Ei(o)>1?"Image 1":cn[e]}var w_e="Video file",C_e="Upload a video file",v_e="AV1 file",k_e="Upload an AV1 file";function MY(e,o){return{field:"mediaType",is:e,default:o}}var HY=new Set(["HeroSingle"]),OA="heroPart";function UY(e,o){return{...o,[OA]:e}}function T_e(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],MY(s,r));for(let[s,l]of Object.entries(a??{}))l&&(n[s]=oo(n[s],l));for(let s of dn)for(let l of o[s]??[])n[l]=UY(s,n[l]);return n}function WY(e){let o=e?.[OA];return dn.includes(o)?o:null}function _A(e,o){let t={};for(let[r,a]of Object.entries(e))WY(a)===o&&(t[r]=a);return t}function AA(e){if(!HY.has(e.type))return[];let o=[{part:"media",label:cn.media,depth:0}];return(e.props.mediaType??"image")!=="video"&&(o.push({part:"image",label:Kp("image",e.props),depth:1}),Ei(e.props)>1&&o.push({part:"image2",label:Kp("image2",e.props),depth:1})),o}function _i(e,o){return`${e}::${o}`}function LA(e){if(!e)return null;let o=e.lastIndexOf("::");if(o<=0)return null;let t=e.slice(o+2);return dn.includes(t)?{nodeId:e.slice(0,o),part:t}:null}var RA="data-sf-hero-part";import{jsx as Ee,jsxs as Ia,Fragment as V2}from"react/jsx-runtime";import{useEasel as Qse,useRootFields as ele}from"efficient-easel/easel";import{Button as ole,EmptyState as tle}from"efficient-shell/ui";function FA({kind:e,pageName:o}){return{name:o?.trim()||i("This page"),kindLabel:Ba({kind:e})?i("Template"):i("Page")}}import{headWords as Z2,InspectorHead as rle,InspectorIconButton as q2}from"efficient-easel/chrome";import{DuplicateIcon as ale,TrashIcon as nle}from"efficient-easel/icons";import{panelFieldsOf as sle}from"efficient-easel/screen/lib/document/panel-fields";import{jsx as N,Fragment as he,jsxs as xe}from"react/jsx-runtime";import{BlockBannerIcon as GY,BlockBoxIcon as jY,BlockButtonIcon as KY,BlockDividerIcon as DA,BlockFooterIcon as NA,BlockHeadingIcon as VY,BlockProductIcon as qY,BlockSocialIcon as YY,BlockTextIcon as XY,CardPaymentIcon as ZY,ChatIcon as JY,AccountIcon as QY,GlobeIcon as eX,GridIcon as oX,ImageIcon as Mb,MapIcon as tX,MediaIcon as rX,PageIcon as aX}from"efficient-easel/icons";import{jsx as Nb,Fragment as zY,jsxs as $Y}from"react/jsx-runtime";var BA=$Y(zY,{children:[Nb("circle",{cx:"9",cy:"20",r:"1.3"}),Nb("circle",{cx:"18",cy:"20",r:"1.3"}),Nb("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 nX={header:xe(he,{children:[N("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),N("path",{d:"M3 9.5h18"})]}),social:xe(he,{children:[N("circle",{cx:"6",cy:"12",r:"2.5"}),N("circle",{cx:"18",cy:"6",r:"2.5"}),N("circle",{cx:"18",cy:"18",r:"2.5"}),N("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:xe(he,{children:[N("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),N("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:xe(he,{children:[N("path",{d:"M4 15.5h6M4 18h4"}),N("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:N("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:xe(he,{children:[N("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),N("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:N("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:xe(he,{children:[N("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),N("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:xe(he,{children:[N("circle",{cx:"11",cy:"11",r:"6"}),N("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:BA,CountrySwitchBlock:xe(he,{children:[N("circle",{cx:"12",cy:"12",r:"8.5"}),N("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:xe(he,{children:[N("circle",{cx:"12",cy:"12",r:"8.5"}),N("path",{d:"M12 3.5v17M12 5.5l6 6M12 10.5l5.2 5.2M12 15.5l2.8 2.8"})]}),LegalLineBlock:xe(he,{children:[N("path",{d:"M3 9h18"}),N("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:xe(he,{children:[N("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),N("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:xe(he,{children:[N("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),N("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:xe(he,{children:[N("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),N("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),N("path",{d:"M7 17h7"})]}),Collections:xe(he,{children:[N("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),N("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),N("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:xe(he,{children:[N("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),N("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:xe(he,{children:[N("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),N("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),N("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),N("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),N("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:xe(he,{children:[N("path",{d:"M3 7h9M15.5 7H21"}),N("circle",{cx:"13.5",cy:"7",r:"1.7"}),N("path",{d:"M3 12h4M10.5 12H21"}),N("circle",{cx:"8.5",cy:"12",r:"1.7"}),N("path",{d:"M3 17h9M15.5 17H21"}),N("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:xe(he,{children:[N("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),N("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),N("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),N("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),N("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),N("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:xe(he,{children:[N("path",{d:"M3 5h10"}),N("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),N("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),N("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:xe(he,{children:[N("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),N("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),N("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:xe(he,{children:[N("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),N("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),N("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),N("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:xe(he,{children:[N("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),N("circle",{cx:"9",cy:"10",r:"1.6"}),N("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:xe(he,{children:[N("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),N("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:xe(he,{children:[N("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),N("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),N("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:xe(he,{children:[N("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),N("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:xe(he,{children:[N("path",{d:"M3.5 20h17"}),N("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:xe(he,{children:[N("circle",{cx:"6",cy:"12",r:"2.6"}),N("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),N("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:xe(he,{children:[N("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),N("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:xe(he,{children:[N("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),N("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:xe(he,{children:[N("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),N("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:xe(he,{children:[N("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),N("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:xe(he,{children:[N("path",{d:"M4 8.5h4.5M11 8.5h9"}),N("path",{d:"M4 14.5h16"})]}),HeroGroup:xe(he,{children:[N("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),N("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:xe(he,{children:[N("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),N("path",{d:"M6.5 9h11M6.5 12.5h11"}),N("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:N(he,{children:N("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:xe(he,{children:[N("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),N("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:xe(he,{children:[N("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),N("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),N("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),N("path",{d:"M4 13.5h11M4 17.5h7"}),N("path",{d:"M17 15l3 2-3 2"})]}),Contents:xe(he,{children:[N("path",{d:"M4 7h2M4 12h2M4 17h2"}),N("path",{d:"M9 7h11M9 12h9M9 17h10"})]}),ListSearch:xe(he,{children:[N("path",{d:"M4 6h9M4 11h5M4 16h5"}),N("circle",{cx:"15",cy:"15",r:"4"}),N("path",{d:"M20.5 20.5l-2.7-2.7"})]}),CustomHTML:N("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},sX=N("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),lX={footer:NA,Footer:NA,Divider:DA,FooterDivider:DA,Banner:GY,Flex:jY,FooterSocial:YY,FooterPayment:ZY,page:aX,website:eX,AccountBlock:QY,chat:JY,Heading:VY,Text:XY,ImageBlock:Mb,ButtonBlock:KY,LocationMap:tX,Grid:oX,ProductRef:qY,heroMedia:rX,heroImage:Mb,heroImage2:Mb},iX={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",PaymentLogosBlock:"FooterPayment",SiteHeader:"header",SiteFooter:"footer"};function fn({type:e,size:o=16,className:t}){let r=iX[e]??e,a=lX[r];return a?N(a,{size:o,className:t}):N("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:nX[r]??sX})}import{PanelHideButton as Y2}from"efficient-easel/screen/components/SidePanelHead";import{useEaselSession as lle}from"efficient-easel/screen/lib/session-context";import{jsx as Le,jsxs as Ai,Fragment as dX}from"react/jsx-runtime";import{useEffect as cX,useId as MA,useState as fX}from"react";import{IconPicker as pX}from"efficient-shell/ui";import{SettingsDefaultReset as uX,SettingsField as Li,SettingsSegmented as mX,SettingsSwitch as HA}from"efficient-easel/panel";import{ButtonIcon as hX,ButtonIconIcon as xX,EyeIcon as IX,PhoneIcon as gX,PlacementIcon as bX,TypeIcon as yX}from"efficient-easel/icons";var SX="Chat with us",wX="We usually reply within a few minutes",CX="Hi! Ask us anything \u2014 about a wheel, an order, or fitment. Leave your details and we\u2019ll reply.";function Vp({label:e,value:o,placeholder:t,onCommit:r,multiline:a=!1,hint:n}){let[s,l]=fX(o);cX(()=>l(o),[o]);let d=()=>{s!==o&&r(s)};return Le(Li,{label:e,icon:Le(yX,{}),changed:o!=="",action:Le(Ri,{label:e,changed:o!=="",onReset:()=>r("")}),hint:n,children:a?Le("textarea",{value:s,placeholder:t,rows:3,onChange:c=>l(c.target.value),onBlur:d,"aria-label":e}):Le("input",{type:"text",value:s,placeholder:t,onChange:c=>l(c.target.value),onBlur:d,onKeyDown:c=>{c.key==="Enter"&&c.currentTarget.blur()},"aria-label":e,autoComplete:"off"})})}function Ri({label:e,changed:o,onReset:t}){return Le(uX,{words:le()?.panel,label:e,changed:o,onReset:t})}function vX({label:e,icon:o,checked:t,fallback:r,onChange:a,hint:n}){let s=MA();return Le(Li,{label:e,labelId:s,icon:o,changed:t!==r,action:Ai("span",{className:"inline-flex items-center gap-2",children:[Le(HA,{checked:t,onChange:a,ariaLabelledBy:s}),Le(Ri,{label:e,changed:t!==r,onReset:()=>a(r)})]}),hint:n})}var kX=Up.map(e=>({value:e,icon:Wc(e)}));function TX(){let{theme:e}=ue(),o=xo(e).themes[0];return Tl(o)??o?.accent??""}function UA(){let{chat:e,setChat:o}=$p(),t=MA(),r=TX(),a=e.launcherIcon?Wp(e.launcherIcon):Ws;return Ai(dX,{children:[Le(Li,{label:i("Show the chat bubble"),labelId:t,icon:Le(IX,{}),changed:!e.enabled,action:Ai("span",{className:"inline-flex items-center gap-2",children:[Le(HA,{checked:e.enabled,onChange:n=>o({enabled:n}),ariaLabelledBy:t}),Le(Ri,{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.")}),Ai(hg,{title:i("Look"),children:[Le(Yo,{label:i("Button color"),icon:Le(hX,{}),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:""})}),Le(Li,{label:i("Icon"),icon:Le(xX,{}),value:Le(qI,{value:a}),changed:a!==Ws,action:Le(Ri,{label:i("Icon"),changed:a!==Ws,onReset:()=>o({launcherIcon:""})}),children:Le(pX,{label:i("Icon"),value:a,options:kX,onChange:n=>o({launcherIcon:n===Ws?"":n})})}),Le(Li,{label:i("Position"),icon:Le(bX,{}),changed:e.launcherPosition!==ln,action:Le(Ri,{label:i("Position"),changed:e.launcherPosition!==ln,onReset:()=>o({launcherPosition:ln})}),children:Le(mX,{options:[{label:i("Right"),id:"right"},{label:i("Left"),id:"left"}],value:e.launcherPosition,ariaLabel:i("Position"),onChange:n=>o({launcherPosition:n})})}),Le(Vp,{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")}),Le(vX,{label:i("Show on phones"),icon:Le(gX,{}),checked:e.showOnPhones,fallback:zp.showOnPhones,onChange:n=>o({showOnPhones:n})})]}),Ai(hg,{title:i("Wording"),children:[Le(Vp,{label:i("Title"),value:e.title,placeholder:SX,onCommit:n=>o({title:n})}),Le(Vp,{label:i("Subtitle"),value:e.subtitle,placeholder:wX,onCommit:n=>o({subtitle:n})}),Le(Vp,{label:i("Greeting message"),value:e.greeting,placeholder:CX,onCommit:n=>o({greeting:n}),multiline:!0}),Le("p",{className:"es-field-hint",children:i("Leave a field blank to use the built-in wording.")})]})]})}import{jsx as pn,Fragment as sy,jsxs as jA}from"react/jsx-runtime";import{useEffect as tZ,useId as $A,useState as GA}from"react";import{SettingsField as rZ}from"efficient-easel/panel";import{jsx as VX}from"react/jsx-runtime";import{forwardRef as PX,createElement as Hb}from"react";var WA={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 ce=(e,o,t,r)=>{let a=PX(({color:n="currentColor",size:s=24,stroke:l=2,title:d,className:c,children:f,...u},p)=>Hb("svg",{ref:p,...WA[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${o}`,c].filter(Boolean).join(" "),...e==="filled"?{fill:n}:{strokeWidth:l,stroke:n},...u},[d&&Hb("title",{key:"svg-title"},d),...r.map(([h,I])=>Hb(h,I)),...Array.isArray(f)?f:[f]]));return a.displayName=`${t}`,a};var EX=[["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"}]],Ub=ce("outline","brand-facebook","BrandFacebook",EX);var OX=[["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"}]],Wb=ce("outline","brand-instagram","BrandInstagram",OX);var _X=[["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"}]],zb=ce("outline","brand-line","BrandLine",_X);var AX=[["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"}]],$b=ce("outline","brand-linkedin","BrandLinkedin",AX);var LX=[["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"}]],Gb=ce("outline","brand-pinterest","BrandPinterest",LX);var RX=[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]],jb=ce("outline","brand-telegram","BrandTelegram",RX);var FX=[["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"}]],Kb=ce("outline","brand-tiktok","BrandTiktok",FX);var BX=[["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"}]],Vb=ce("outline","brand-wechat","BrandWechat",BX);var DX=[["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"}]],qb=ce("outline","brand-whatsapp","BrandWhatsapp",DX);var NX=[["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"}]],Yb=ce("outline","brand-x","BrandX",NX);var MX=[["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"}]],Xb=ce("outline","brand-youtube","BrandYoutube",MX);var HX=[["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"}]],Zb=ce("filled","brand-facebook-filled","BrandFacebookFilled",HX);var UX=[["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"}]],Jb=ce("filled","brand-instagram-filled","BrandInstagramFilled",UX);var WX=[["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"}]],Qb=ce("filled","brand-linkedin-filled","BrandLinkedinFilled",WX);var zX=[["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"}]],ey=ce("filled","brand-pinterest-filled","BrandPinterestFilled",zX);var $X=[["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"}]],oy=ce("filled","brand-tiktok-filled","BrandTiktokFilled",$X);var GX=[["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"}]],ty=ce("filled","brand-whatsapp-filled","BrandWhatsappFilled",GX);var jX=[["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"}]],ry=ce("filled","brand-x-filled","BrandXFilled",jX);var KX=[["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"}]],ay=ce("filled","brand-youtube-filled","BrandYoutubeFilled",KX);var dAe="outline",qp={fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},qX={},ny={fillRule:"evenodd"},YX=[["path",{...qp,d:"M21 4L3 11L7 13L9 19L12 15L17 20z"}],["path",{...ny,d:"M21 4L3 11L7 13L9 19L12 15L17 20zM15.212 8.939 10.576 13.576 11.424 14.424 16.061 9.788z"}]],XX=[["path",{...qp,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",{...qX,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("")}]],ZX=[["path",{...qp,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",{...qp,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",{...ny,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",{...ny,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("")}]],JX=ce("filled","brand-telegram-filled","BrandTelegramFilled",YX),QX=ce("filled","brand-line-filled","BrandLineFilled",XX),eZ=ce("filled","brand-wechat-filled","BrandWechatFilled",ZX),oZ={instagram:{outline:Wb,solid:Jb},facebook:{outline:Ub,solid:Zb},tiktok:{outline:Kb,solid:oy},youtube:{outline:Xb,solid:ay},x:{outline:Yb,solid:ry},linkedin:{outline:$b,solid:Qb},pinterest:{outline:Gb,solid:ey},whatsapp:{outline:qb,solid:ty},telegram:{outline:jb,solid:JX},line:{outline:zb,solid:QX},wechat:{outline:Vb,solid:eZ}};function zA({platform:e,iconStyle:o,size:t}){let r=oZ[e][o];return VX(r,{size:t,stroke:1.75,"aria-hidden":"true",focusable:"false"})}var aZ={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 nZ({platform:e}){let{rows:o,saveLink:t}=ki(),{value:r,error:a}=o[e],[n,s]=GA(r),[l,d]=GA(!1),c=$A(),f=$A();tZ(()=>s(r),[r]);let u=async()=>{if(n.trim()===r){n!==r&&s(r);return}d(!0),await t(e,n),d(!1)},p=Nk[e];return jA(sy,{children:[pn(rZ,{label:i(p),htmlFor:c,icon:pn(zA,{platform:e,iconStyle:"outline",size:18}),children:pn("input",{id:c,type:"text",inputMode:"url",value:n,placeholder:aZ[e],onChange:h=>s(h.target.value),onBlur:()=>{u()},onKeyDown:h=>{h.key==="Enter"&&h.currentTarget.blur(),h.key==="Escape"&&(s(r),h.currentTarget.blur())},"aria-invalid":a?!0:void 0,"aria-describedby":a?f:void 0,"aria-busy":l||void 0,autoComplete:"off",spellCheck:!1})}),a&&pn("p",{id:f,className:"sf-note sf-note--error",role:"alert",children:a})]})}function KA({unavailable:e}){let{canSave:o}=ki();return!o&&e?pn(sy,{children:e}):jA(sy,{children:[pn("p",{className:"es-field-hint",children:i("Paste a link to each profile. A platform left empty shows nothing on the site.")}),Cc.map(t=>pn(nZ,{platform:t},t))]})}import{jsx as gn,Fragment as dee,jsxs as cee}from"react/jsx-runtime";import{useId as fee,useMemo as pee}from"react";import{useEasel as uee}from"efficient-easel/easel";import{SettingsField as mee,SettingsSwitch as hee}from"efficient-easel/panel";import{EyeIcon as xee}from"efficient-easel/icons";import{fieldShownInView as Iee}from"efficient-easel/fields";import{usePreviewDevice as gee}from"efficient-easel/draw/client";import{jsx as mn,Fragment as nJ,jsxs as sJ}from"react/jsx-runtime";import{createContext as lJ,useContext as iJ,useLayoutEffect as yL,useMemo as tu,useRef as SL,useState as my}from"react";import{useEasel as wL,useSelectedFields as dJ}from"efficient-easel/easel";import{fieldShownInView as cJ,Inspector as fJ,planFields as hy}from"efficient-easel/fields";function VA({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 KZ}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as VZ,deviceMetaOf as dL}from"efficient-easel/screen/lib/document/device-fields";import{jsx as wo}from"react/jsx-runtime";import{DirectionDownIcon as pZ,DirectionIcon as uZ,DirectionLeftIcon as mZ,DirectionRightIcon as hZ,DirectionUpIcon as xZ,EntranceBounceIcon as IZ,EntranceFadeIcon as gZ,EntranceFlipIcon as bZ,EntranceGlideIcon as yZ,EntranceRevealIcon as SZ,EntranceRiseIcon as wZ,EntranceScaleIcon as CZ,EntranceSpinIcon as vZ,NoSymbolIcon as kZ}from"efficient-easel/icons";import{NoControlMark as TZ,noControlField as PZ}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{customize as EZ,group as OZ}from"efficient-easel/screen/lib/document/box-fields";import{ENTRANCE_FROM as _Z,ENTRANCE_FROM_DEFAULT as tL,ENTRANCE_KINDS as rL,ENTRANCE_KINDS_WITH_FROM as AZ,entranceAttrs as LZ,playEntrance as RZ,readEntrance as FZ}from"efficient-shell/format";import{jsx as dy}from"react/jsx-runtime";import{ClockIcon as dZ,DurationIcon as cZ}from"efficient-easel/icons";import{MOTION_TIMING as QA}from"efficient-shell/format";import{useSelectedHost as fZ}from"efficient-easel/easel";import{MOTION_EASING as sZ,MOTION_TIMING as qA,motionSeconds as YA}from"efficient-shell/format";var ly="none",Yp=[{label:"None",value:"none"},{label:"Marquee",value:"scroll"}];function wAe(e){return io(Yp,ly,e)}var Xp="_gLoop",Fi={field:"loop",is:"scroll"},Bi="left",iy=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],lZ={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function XA(e){return io(iy,Bi,e)}function CAe(e){return e==="up"||e==="down"}function ZA(e){return YA("loop","duration",e.loopDuration!=null?e.loopDuration:e.speed)}var vAe=qA.loop.duration.default,iZ=qA.loop.delay.default;function JA(e){return YA("loop","delay",e.loopDelay)}function kAe(e,o,t=iZ){return`${lZ[e]} ${o}s ${sZ.loop}${t?` ${t}s`:""} infinite`}function zs(e){let{min:o,max:t,step:r,default:a}=QA[e].duration;return Oo("Duration",dy(cZ,{}),o,t,r,a,"s")}function $s(e){let{min:o,max:t,step:r,default:a}=QA[e].delay;return Oo("Delay",dy(dZ,{}),o,t,r,a,"s")}function Gs(e,o){let t=e.render,r=a=>{let n=fZ();return t({...a,value:o(a.value,n?.values)})};return{...e,render:a=>dy(r,{...a})}}function Zp({readsSpeed:e}){return Gs(zs("loop"),(o,t)=>ZA({loopDuration:o,speed:e?t?.speed:void 0}))}function Jp(){return Gs($s("loop"),e=>JA({loopDelay:e}))}var eL="_gEntrance";var BZ={none:"None",fade:"Fade",rise:"Rise",scale:"Scale",glide:"Glide",bounce:"Bounce",flip:"Flip",reveal:"Reveal",spin:"Spin"},DZ={top:"Top",bottom:"Bottom",left:"Left",right:"Right"},NZ={top:()=>wo(pZ,{}),bottom:()=>wo(xZ,{}),left:()=>wo(hZ,{}),right:()=>wo(mZ,{})},aL="Entrance",fy=rL.filter(e=>e!=="none"),nL=e=>({any:[{field:tt.kind,in:e},{all:[{field:tt.kind,set:!1},{field:El,in:e}]}]}),oL=(e,o)=>Cl(qo.slice(0,qo.indexOf(e)+1).reverse().map(t=>we(tt.kind,t)),t=>({field:t,set:!0}),t=>t===tt.kind?nL(o):{field:t,in:o}),MZ={any:[nL(fy),...qo.slice(1).map(e=>({field:we(tt.kind,e),in:fy}))]},HZ=qo.flatMap(e=>[[[we(tt.from,e)],oL(e,AZ)],[[we(tt.duration,e),we(tt.delay,e)],oL(e,fy)]]),UZ={none:()=>wo(kZ,{}),fade:()=>wo(gZ,{}),rise:()=>wo(wZ,{}),scale:()=>wo(CZ,{}),glide:()=>wo(yZ,{}),bounce:()=>wo(IZ,{}),flip:()=>wo(bZ,{}),reveal:()=>wo(SZ,{}),spin:()=>wo(vZ,{})},sL="data-entrance-tile";function WZ({kind:e}){let{attrs:o}=LZ(FZ(e,tL));return wo("span",{className:"sf-entrance-stage",[sL]:e,children:wo("i",{...o,children:UZ[e]()})})}var zZ=(e,o)=>{let t=e.querySelector(`[${sL}="${o}"] > i`);t&&RZ(t)},$Z="Effect",GZ=()=>lf(tt.kind,{label:aL,tileWord:$Z,values:rL,fallback:"none",word:e=>BZ[e],picture:e=>wo(WZ,{kind:e}),read:(e,o)=>Wh(e,o).kind,preview:zZ}),cy=(e,o)=>sf(tt[e],o,(t,r)=>Wh(t,r)[e]),jZ=_Z.map(e=>({label:DZ[e],value:e,picture:NZ[e]()}));function Kt(){let e={[eL]:OZ(aL,{dot:MZ}),...GZ(),[El]:PZ({type:"custom",render:()=>wo(TZ,{})},"always"),_cEntrance:EZ(),...cy("from",Cs("From",wo(uZ,{}),jZ,tL)),...cy("duration",zs("entrance")),...cy("delay",$s("entrance"))};return _a(e,HZ)}import{DESIGN_GROUPS as py,SETTINGS_BUCKETS as qZ}from"efficient-easel/panel";import{BUCKET_KEY as gt,DESIGN_GROUP_KEY as Qp}from"efficient-easel/screen/lib/document/field-buckets";var Di=qZ;var YZ="Editor only \u2014 not shown live",uy={"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","Card list":"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",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"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",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell size":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[YZ]:"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"},cL={"AlloyWheelsListing._gCards":"Design"},fL={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function lL(e,o,t){let r=`${e}.${o}`;return j(fL,r)??j(cL,r)??j(uy,t)}function XZ(e){return e==="Animation"?[gt.Animation]:[gt.Design,Qp[e]]}function eu(...e){let o=[];for(let t of e)for(let r of Object.values(t)){let a=dL(r),n=ia(a?a.inner:r),s=n?j(uy,n.label):void 0;if(s)for(let l of XZ(s))o.includes(l)||o.push(l)}return o}var rLe=[...eu(Df({tablet:!0,siteSide:!0}),Xf("full"),Zf(),Qf(),gg()),...Object.keys(Df({tablet:!0,siteSide:!0})),...Object.keys(Xf("full")),...Object.keys(Zf()),...Object.keys(Qf()),...Object.keys(gg())],aLe=[...eu(Vf()),...Object.keys(Vf())],nLe=[...eu(Yf()),...Object.keys(Yf())],sLe=[...eu(Kt()),...Object.keys(Kt())],lLe=Object.keys(zO()),iLe=Object.keys($O()),ZZ={"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)","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)"},pL={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},uL={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{let e={...Df({tablet:!0,siteSide:!0}),...Xf("full"),...Zf(),...Qf(),...Vf(),...Yf(),...Kt()};for(let o of Object.keys(uL)){let t=ia(e[o]),r=t?j(uy,t.label):void 0;if(!t||t.level!==2||!r||!pL[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 JZ=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),QZ=new Map([[gt.Design,"Content"],[gt.Animation,"Animation"],...py.map(e=>[Qp[e],e])]);function eJ(e){let o=`${e}.`;return Object.keys(ZZ).filter(t=>t.startsWith(o)).map(t=>t.slice(o.length))}function oJ(e,o){let t=dL(e),r=KZ(o);return t?VZ(t.tier,r):r}function tJ(e,o){let t=ia(o);return t?e==="Content"||e==="Animation"?TO(o,t.label):PO(o):o}function iL(e){return e==="Design"?py:["Animation"]}function mL(e,o){let t=[],r=new Set(eJ(o)),a=new Set,n=!1,s=null;for(let[p,h]of Object.entries(e)){let I=ia(h);if(JZ.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 g=QZ.get(p);if(g!==void 0){if(I?.level!==1)throw new Error(`${o}.${p}: that key is reserved for the ${g} heading of the settings panel, but this field is ${I?`a level-${I.level} "${I.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(p===gt.Design||p===gt.Animation)&&(n=!0),t.push(s={place:g,entries:[],adopted:!0});continue}if(!I){s||t.push(s={place:"Content",entries:[]}),s.entries.push([p,h]);continue}if(r.has(p)||$e(uL,p)){let w=lL(o,p,I.label);if(I.level!==2||!w||!pL[w].includes(I.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-${I.level} "${I.label}" header in the ${w??"(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:w,entries:[]});continue}let C=lL(o,p,I.label);if(!C)throw new Error(`${o}.${p}: the inspector group "${I.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...py,"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:C,entries:[[p,I.level===2?h:oJ(h,I.label)]]})}let l=new Set(Object.entries(e).filter(([,p])=>ia(p)).map(([p])=>p));for(let[p,h]of[["BLOCK_KEY_GROUP",fL],["KEY_GROUP",cL]]){let I=Object.keys(h).filter(g=>g.startsWith(`${o}.`)).filter(g=>!l.has(g.slice(o.length+1)));if(I.length)throw new Error(`${o}: ${p} (lib/document/field-groups.ts) lists ${JSON.stringify(I)}, 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 d=n?[]:[...r].filter(p=>!a.has(p));if(d.length)throw new Error(`${o}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(d)}, but this section has no such fold header${d.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 c=new Set(t.filter(p=>p.entries.length>0).map(p=>p.place)),f=Di.filter(p=>iL(p).some(h=>c.has(h))),u={};for(let p of f){u[gt[p]]=Kf(p,p===f[0]?f:null);for(let h of iL(p)){if(!c.has(h))continue;let I=t.filter(C=>C.place===h),g=I.findIndex(C=>C.adopted);g>0&&I.unshift(...I.splice(g,1)),p==="Design"&&(u[Qp[h]]=mg(h));for(let C of I)for(let[w,T]of C.entries)u[w]=tJ(h,T)}}return u}function dLe(e){return gt.Design in e?e:{[gt.Design]:Kf("Design",null),[Qp.Content]:mg("Content"),...e}}function cLe(e){return Di.some(o=>gt[o]in e)}function fLe(e){let o=Di.filter(r=>gt[r]in e);if(o.length===0)return e;let t={...e};for(let r of o)t[gt[r]]=Kf(r,r===o[0]?o:null);return t}import{jsx as rJ}from"react/jsx-runtime";import{EmptyState as aJ}from"efficient-shell/ui";function un(){return rJ(aJ,{variant:"none",icon:!1,message:i("These settings apply to every view.")})}import{usePreviewDevice as pJ}from"efficient-easel/draw/client";import{deviceField as uJ}from"efficient-easel/screen/lib/document/device-fields";var ou=" text",hL="Text";function Ni(e){let o=e.rows.filter(t=>t.shown);return o.length===0||o.length===1&&o[0].labelled}function xL(e){return e.filter(Ni).map(o=>o.key)}function IL(e,o){let t=e.filter(a=>!Ni(a));if(t.length!==1)return null;let r=e.filter(Ni).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 gL(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 bL(e,o){if(e.size!==o.size)return!1;for(let t of e)if(!o.has(t))return!1;return!0}var xy=new Map,ru=new Set;function CL(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),d=!!l&&[...l.children].some(f=>!f.hidden),c=l?.querySelector(".es-field-label, .es-list-label")?.textContent?.trim();return{shown:d,labelled:d&&!!c}})});return r}var mJ=Object.fromEntries(Di.map(e=>{let o=kO[e];return[e,mn(o,{},e)]})),vL=lJ(null),hJ={_partBody:uJ("each",{type:"custom",render:()=>mn(xJ,{})})};function xJ(){return mn(nJ,{children:iJ(vL)})}function Vt({entries:e,entryCount:o=0,part:t=null,omit:r,motion:a,body:n,itemWord:s}){let{id:l,fields:d,values:c,readOnly:f,onChange:u}=dJ(),p=tu(()=>a?{...c,...a.values}:c,[c,a?.values]),h=(ne,Me)=>a?.keys.has(ne)?a.onChange(ne,Me):u(ne,Me),I=pJ(),{appState:g,config:C}=wL(ne=>ne),w=GT(I,C,g.data.content??[],g.ui.itemSelector),T=n===void 0?_A(d,t):hJ,y=tu(()=>{let ne=r?.length?Object.fromEntries(Object.entries(T).filter(([Me])=>!r.includes(Me))):T;return a?{...ne,...a.fields}:ne},[T,r,a?.fields]),b=yx(y,p,w),[P,H]=my(()=>new Set(ru)),[E,U]=my(()=>new Set),O=SL(null),{bandRows:D,designBands:v,looseRows:_}=tu(()=>{let ne=new Map,Me=new Set,Ve=[];for(let Z of hy(b).rows){if(!Z.fold){Z.bucket==="Design"&&Ve.push(Z.name);continue}let Ae=ne.get(Z.fold.key)??[];Ae.push(Z.name),ne.set(Z.fold.key,Ae),Z.bucket==="Design"&&Me.add(Z.fold.key)}return{bandRows:ne,designBands:Me,looseRows:new Map([["",Ve]])}},[b]),A=cJ({},I),F={key:ou,rows:Array.from({length:A?o:0},()=>({shown:!0,labelled:!0}))};yL(()=>{let ne=O.current?.parentElement;if(!ne)return;let Me=CL(ne,D),Ve=new Set(xL(Me)),Z=IL([F,...Me.filter(Ae=>v.has(Ae.key))],CL(ne,_)[0].rows);Z&&Ve.add(Z),U(Ae=>bL(Ae,Ve)?Ae:Ve)});let z=tu(()=>gL(b,E),[b,E]),$=!Ni(F)&&!E.has(ou)?{key:ou,title:hL}:void 0,X=wL(ne=>ne.selectedItem)!==null,Q=a?.part??t??"",Fe=`${l}:${Q}:${String(I)}`,[Oe,ze]=my(()=>({tab:xy.get(Fe)})),Ke=`${l}:${Q}`,ge=SL(null),Te={...w,node:p},_e=hy(b,{values:p,context:Te}).buckets,Ne=VA({allTabs:X,remembered:xy.get(Fe),inherited:ge.current?.panel===Ke?ge.current.tab:Oe.tab,buckets:_e,hasText:A&&o>0}),ao=!A&&!_e.includes(Ne)&&(hy(yx(y,p,{...w,device:"desktop"}),{values:p,context:{...Te,device:"desktop"}}).buckets.includes(Ne)||Ne==="Design"&&o>0);yL(()=>{ge.current={panel:Ke,tab:Ne}});let bo=Ne==="Design";return mn(vL.Provider,{value:n??null,children:mn(Ig.Provider,{value:a?p:null,children:sJ(fJ,{fields:z,values:p,onChange:h,readOnly:f,allTabs:X,showWhenContext:Te,context:{itemWord:s},tab:Ne,onTab:ne=>{xy.set(Fe,ne),ze({tab:ne})},tabIcons:mJ,idPrefix:l,ariaLabel:i("Section settings"),lead:bo?e:null,leadFold:$,closedFolds:P,onFold:(ne,Me)=>{Me?ru.delete(ne):ru.add(ne),H(new Set(ru))},children:[mn("span",{ref:O,hidden:!0}),ao&&mn(un,{})]})})})}import{useMemo as oee}from"react";import{useEasel as tee}from"efficient-easel/easel";import{useSectionOps as ree}from"efficient-easel/screen/lib/document/use-section-ops";import{jsx as bt}from"react/jsx-runtime";import{EntranceRevealIcon as CJ,NoSymbolIcon as vJ,PercentIcon as OL,ScrollFadeInIcon as kJ,ScrollFadeOutIcon as TJ,ScrollMoveDownIcon as PJ,ScrollMoveUpIcon as EJ,ScrollParallaxIcon as OJ,ScrollZoomInIcon as _J,ScrollZoomOutIcon as AJ,ZoomInIcon as LJ}from"efficient-easel/icons";import{customize as RJ,group as FJ}from"efficient-easel/screen/lib/document/box-fields";import{SCROLL_EFFECTS as AL,SCROLL_EFFECTS_WITH_ZOOM as BJ,SCROLL_END as DJ,SCROLL_START as NJ,SCROLL_ZOOM as MJ}from"efficient-shell/format";import{parseFocal as yJ,formatFocal as SJ,readScroll as wJ}from"efficient-shell/format";import{phoneKey as IJ,tabletKey as gJ}from"efficient-easel/screen/lib/content/view-tiers";var bJ=[{block:"HeroSlide",upload:"mediaImage",focus:"imageFocal"},{block:"HeroSingle",upload:"mediaImage",focus:"imageFocal"},{block:"HeroSingle",upload:"mediaImage2",focus:"imageFocal2"},{block:"ImageBlock",upload:"src",focus:"focal"}],kL=e=>[e,gJ(e),IJ(e)],FLe=[...new Set(bJ.flatMap(e=>kL(e.focus)))].sort();function TL(e,o){let[t,r,a]=kL(o).map(n=>typeof e[n]=="string"&&e[n]?e[n]:void 0);return{desktop:t,tablet:r,phone:a}}var Ao={effect:"scroll",zoom:"scrollZoom",start:"scrollStart",end:"scrollEnd"},PL="_gScroll",EL="_cScroll",au=pc(Object.values(Ao));function js(e,o){return wJ(Pl(e,Ao.effect,o),Pl(e,Ao.zoom,o),Pl(e,Ao.start,o),Pl(e,Ao.end,o))}function nu(e){let o={desktop:js(e,"desktop"),tablet:js(e,"tablet"),phone:js(e,"phone")};return qo.every(t=>o[t].effect==="none")?null:o}function Iy(e){let o=gk(e.desktop,e.tablet,e.phone),t=r=>{let a=o[r];if(typeof a!="string")return;let{x:n,y:s}=yJ(a);return SJ(n,s)};return{desktop:t("desktop"),tablet:t("tablet"),phone:t("phone")}}function HLe(e,o){return Iy(TL(e,o))}var LL="Scroll",HJ={none:"None","zoom-in":"Zoom in","zoom-out":"Zoom out","fade-in":"Fade in","fade-out":"Fade out","move-up":"Move up","move-down":"Move down",reveal:"Reveal",parallax:"Parallax"},UJ={none:()=>bt(vJ,{}),"zoom-in":()=>bt(_J,{}),"zoom-out":()=>bt(AJ,{}),"fade-in":()=>bt(kJ,{}),"fade-out":()=>bt(TJ,{}),"move-up":()=>bt(EJ,{}),"move-down":()=>bt(PJ,{}),reveal:()=>bt(CJ,{}),parallax:()=>bt(OJ,{})},WJ="Effect",RL=AL.filter(e=>e!=="none"),_L=(e,o)=>Cl(qo.slice(0,qo.indexOf(e)+1).reverse().map(t=>we(Ao.effect,t)),t=>({field:t,set:!0}),t=>({field:t,in:o})),zJ={any:qo.map(e=>({field:we(Ao.effect,e),in:RL}))},$J=qo.flatMap(e=>[[[we(Ao.zoom,e)],_L(e,BJ)],[[we(Ao.start,e),we(Ao.end,e)],_L(e,RL)]]),GJ=()=>lf(Ao.effect,{label:LL,tileWord:WJ,values:AL,fallback:"none",word:e=>HJ[e],picture:e=>UJ[e](),read:(e,o)=>js(e,o).effect}),gy=(e,o,t,r,a)=>sf(e,Oo(t,r,a.min,a.max,a.step,a.default,"%"),(n,s)=>js(n,s)[o]);function hn(){let e={[PL]:FJ(LL,{dot:zJ}),...GJ(),[EL]:RJ(),...gy(Ao.zoom,"zoom","Zoom",bt(LJ,{}),MJ),...gy(Ao.start,"start","Start",bt(OL,{}),NJ),...gy(Ao.end,"end","End",bt(OL,{}),DJ)};return _a(e,$J)}import{jsx as jo}from"react/jsx-runtime";import{AccentIcon as jJ,ContrastIcon as KJ,EyeIcon as VJ,ExpandIcon as qJ,FinishIcon as YJ,ImagesIcon as XJ,NoSymbolIcon as BL,HoverLiftIcon as ZJ,HoverNextImageIcon as JJ,HoverRotateIcon as QJ,HoverZoomIcon as DL,OpacityIcon as eQ}from"efficient-easel/icons";import{customize as oQ,describedAs as NL,group as tQ}from"efficient-easel/screen/lib/document/box-fields";import{effectTiles as ML}from"efficient-easel/screen/lib/document/effect-tiles";import{deviceField as Lo}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as rQ,noControlField as aQ}from"efficient-easel/screen/lib/document/panel-no-control-mark";var su=e=>Lo("desktop",tQ("Hover",{dot:e})),HL=()=>Lo("desktop",oQ()),nQ="What this does when a shopper points at it, or taps it on a phone.",sQ="What this picture does when a shopper points at it. Black and white shows it in grey until then. A phone shows its colour.",lQ="What this picture does when a shopper points at the card. Show next image covers the card or the picture with this product's photos, with arrows; a phone shows the picture as it is. Black and white shows it in grey until then.",iQ="What this picture does when a shopper points at the card. Show next image covers the picture with the card's photos, with arrows; a phone shows the picture as it is. Black and white shows it in grey until then.",dQ="When this shows. On card hover shows it while a shopper points at the card. A phone always shows it.",cQ="What each card does when a shopper points at it. Show next image covers the card with this product's photos, with arrows; a phone shows the card as it is. Rotate turns the wheel picture.",fQ="Which of the product's pictures the card shows.",pQ="Same finish shows the photos of the finish the card shows, else the first group.",uQ="Whole card hides the words under the photo. Picture keeps the words and swatches in view.",mQ={none:()=>jo(BL,{}),nextImage:()=>jo(JJ,{}),rotate:()=>jo(QJ,{}),zoom:()=>jo(DL,{}),lift:()=>jo(ZJ,{}),mono:()=>jo(KJ,{})};function by(e,o){let t=ML({label:i("Hover effect"),options:e.map(r=>({value:r,label:i(Wn[r]),picture:mQ[r]()})),fallback:o});return NL(t,{type:"select",label:"Hover effect",options:e.map(r=>({value:r,label:Wn[r]}))})}function UL(){return{[wr]:su({field:ft,in:lh.filter(e=>e!=="none")}),[ft]:Lo("desktop",{...by(lh,"none"),description:nQ})}}function WL(e){let o=VC(e),t=Zd(),r=KE(MC);return{[wr]:su({any:[o,t]}),[so.kind]:Lo("desktop",{...Gs(by(FC,e),(a,n)=>jC(n??{},e)),description:cQ}),...yy(t),[BC]:aQ({type:"custom",render:()=>jo(rQ,{})},"always"),_cHover:HL(),[so.angle]:Lo("desktop",oo(Gs(r,a=>KC(a)),o)),[so.duration]:Lo("desktop",oo(zs("hover"),o)),[so.delay]:Lo("desktop",oo($s("hover"),o))}}function yy(e){let o=st("Type",jo(XJ,{}),HC.map(a=>({value:a,label:UC[a]})),Xd.kind),t=Cs("Group",jo(YJ,{}),WC.map(a=>({value:a,label:zC[a]})),Xd.group),r=Cs("Covers",jo(qJ,{}),$C.map(a=>({value:a,label:GC[a]})),Xd.cover);return{[so.mediaKind]:Lo("desktop",oo({...o,description:fQ},e)),[so.mediaGroup]:Lo("desktop",oo({...t,description:pQ},e)),[so.cover]:Lo("desktop",oo({...r,description:uQ},e))}}function Sy(e,o="",t=ph.includes(o)){let r=uh(e),a=QC(e);return{[wr]:su(r),[so.kind]:wy(qC,e,sQ),...ph.includes(o)?yy(Zd()):{},_cHover:HL(),...t?zL():{},[so.duration]:Lo("desktop",oo(zs("hover"),a)),[so.delay]:Lo("desktop",oo($s("hover"),a))}}function zL(e=!1){let o=a=>e?a:oo(a,JC()),t=Oo("Zoom",jo(DL,{}),zn.min,zn.max,zn.step,zn.min,zn.unit),r=Oo("Darken on hover",jo(eQ,{}),oa.min,oa.max,oa.step,oa.fallback,oa.unit);return{[dh.zoom]:Lo("desktop",o(t)),[dh.darken]:Lo("desktop",o(r))}}function wy(e,o,t){let r=Lo("desktop",{...Gs(by(e,o),a=>XC({[ft]:a},o,e)),description:t});return Object.assign(r,{[$L]:o})}var $L="sfPictureResting",FL=new WeakMap;function cRe(e,o,t){let r=e[so.kind],a=r?.[$L];if(!r||!a)return e;let n=o.props?.[ft]==="nextImage",s=n?null:nc(t.appState,o.props?.id);if(!n&&!DC.includes(String(s?.type??"")))return e;let l=FL.get(e);return l||(l={...e,[so.kind]:wy(ih,a,lQ)},FL.set(e,l)),l}var hQ="What this card does when a shopper points at it, or taps it on a phone. Highlight fills it with the surface color and turns its text the main color.",xQ={none:()=>jo(BL,{}),[ah]:()=>jo(jJ,{})},fRe=Lo("desktop",{...NL(ML({label:i("Hover effect"),options:nh.map(e=>({value:e,label:i(sh[e]),picture:xQ[e]()})),fallback:"none"}),{type:"select",label:"Hover effect",options:nh.map(e=>({value:e,label:sh[e]}))}),description:hQ}),IQ=Lo("desktop",{...Cs("Show",jo(VJ,{}),[{value:fh,label:"Always"},{value:ch,label:"On card hover"}],fh),description:dQ});function GL(){let e={any:[uh("none"),{field:ft,is:ah},{field:Ea,is:ch}]},{[wr]:o,[so.kind]:t,...r}=Sy("none","",!0);return{[wr]:su(e),[so.kind]:t,[Ea]:IQ,...yy(Zd()),...r,...zL(!0)}}var pRe=wy(ih,"none",iQ);import{jsx as Mi}from"react/jsx-runtime";import{isNodeList as SQ}from"efficient-easel/data";import{useEasel as wQ}from"efficient-easel/easel";import{hiddenInView as CQ,hiddenKeyOf as vy,hidePatch as vQ,slotChildName as kQ,slotChildRowName as TQ}from"efficient-easel/draw";var lu=null;function Cy(e){lu=e}function jL(){return!!(lu&&lu.state().lockHolder)}function xn(){return lu!==null}var gQ=new Set(["BookingBox","SubmitBox"]);function bQ(e){return typeof e=="string"&&gQ.has(e)}var yQ=IT(bQ,jL);function iu(e,o){return yQ(e)||fI(o)}var du=(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};import{deviceField as PQ}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as EQ}from"efficient-easel/screen/lib/document/panel-no-control-mark";var KL="notCardOfTemplate",VL={not:{context:KL,is:!0}},ky={any:[Qd,VL]},RRe={[KL]:(e,o)=>{let t=_h(o.appState,e.props?.id);return t===void 0?void 0:t===null}};function cu(e){let o=e.props?.content;return SQ(o)?o:[]}var pu=(e,o)=>CQ(e.props??{},o),OQ=(e,o)=>e.props?.[vy(o)]!==void 0;function qL(e,o=()=>!1,t="desktop"){return cu(e).flatMap(r=>typeof r?.props?.id!="string"?[]:cu(r).length&&!pu(r,t)?qL(r,o,t):o(r)?[]:[r])}function _Q(e,o,t,r="desktop"){let a=qL(e,t,r).map(l=>({child:l,name:o(l)})),n=new Set(a.map(l=>l.name)),s=new Set;return a.map(({child:l,name:d})=>{let c=d;if(s.has(d)){let f=2;for(;n.has(`${d} ${f}`);)f+=1;c=`${d} ${f}`,n.add(c)}return s.add(d),{id:l.props.id,label:c,shown:!pu(l,r)}})}function fu(e,o,t){let r=a=>t==="desktop"?pu(a,t):OQ(a,t);return cu(e).flatMap(a=>r(a)?o(a)?[]:[a,...fu(a,o,t)]:fu(a,o,t))}function AQ(e,o){let t={...e};for(let[r,a]of Object.entries(o))a===void 0||r===vy("desktop")&&a===!1?delete t[r]:t[r]=a;return Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>t[r]===e[r])?e:t}function Ty(e,o,t){let r=cu(e),a=!1,n=r.map(s=>{if(a)return s;let l=s;if(s?.props?.id===o){let d=AQ(s.props,t(s.props));d!==s.props&&(l={...s,props:d})}else l=Ty(s,o,t);return a=l!==s,l});return a?{...e,props:{...e.props,content:n}}:e}function YL(e,o,t,r="desktop"){return Ty(e,o,a=>r==="desktop"&&pu({props:a},r)===!t?{}:vQ(a,r,!t))}function LQ(e,o,t){return t==="desktop"?YL(e,o,!0,t):Ty(e,o,()=>({[vy(t)]:void 0}))}function RQ(e,o,t,r,a,n){return kQ(e).trim()?t(e):Lv({ownerType:o,owner:r,fields:a,slot:n},Jt(e.props))?.label??t(e)}var FQ="This page is read-only.";function BQ({card:e,ownerType:o,owner:t,fields:r,slot:a,labelOf:n,write:s,readOnly:l,view:d="desktop"}){let c=p=>TQ(p,n,Sr,void 0,du),f=p=>iu(p.type,p),u=_Q(e,p=>RQ(p,o,c,t,r,a),f,d);return u.length?Mi(Ts,{parts:u,changed:fu(e,f,d).length>0,shown:p=>u.find(h=>h.id===p)?.shown??!0,disabledReason:l?FQ:void 0,onPress:(p,h)=>s(I=>YL(I,p,h,d)),onReset:()=>s(p=>fu(p,f,d).reduce((h,I)=>LQ(h,String(I.props.id),d),p))}):Mi(EQ,{})}function DQ(){try{let e=wQ(a=>a),o=e.config.components??{},t=e.selectedItem;if(!t)return null;let r=_h(e.appState,t.props?.id);return{labelOf:a=>o[a]?.label??a,card:t,ownerType:typeof r?.type=="string"?r.type:void 0,owner:r,fields:Dv(e.appState,r),slot:Bv(e.appState,t.props?.id)??void 0}}catch{return null}}function NQ({readOnly:e,view:o}){let t=DQ(),r=ta();return t?Mi(BQ,{...t,view:o,readOnly:e,write:a=>{e||r(n=>{let s={...t.card,props:n},l=a(s);return l===s?null:{content:l.props.content}})}}):Mi(Ts,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function FRe(e){return oo(PQ(e,{type:"custom",render:({readOnly:o})=>Mi(NQ,{readOnly:o,view:e})}),VL)}import{customize as VQ}from"efficient-easel/screen/lib/document/box-fields";import{jsx as Py}from"react/jsx-runtime";import{DirectionIcon as MQ,LoopMarqueeIcon as HQ,NoSymbolIcon as UQ}from"efficient-easel/icons";import{customize as WQ,describedAs as zQ,group as $Q}from"efficient-easel/screen/lib/document/box-fields";import{effectTiles as GQ}from"efficient-easel/screen/lib/document/effect-tiles";function Ey(){return UO("Direction",iy,Bi,"A marquee cannot run diagonally, so the corners are not answers.",Py(MQ,{}),HO)}var Oy=e=>$Q("Loop",e?{dot:e}:void 0),jQ={none:()=>Py(UQ,{}),scroll:()=>Py(HQ,{})};function KQ(){let e=GQ({label:i("Loop"),options:Yp.map(({value:o,label:t})=>({value:o,label:i(t),picture:jQ[o]()})),fallback:ly});return zQ(e,{type:"select",label:"Loop",options:Yp.map(({value:o,label:t})=>({value:o,label:t}))})}function XL(){return{[Xp]:Oy(Fi),loop:KQ(),_cLoop:WQ(),scrollDirection:oo(Ey(),Fi),loopDuration:oo(Zp({readsSpeed:!1}),Fi),loopDelay:oo(Jp(),Fi)}}var ZL={field:Ea,set:!0};function qQ(){let e=GL(),o=[wr,ft],t=jn(e,Object.keys(e).filter(n=>!o.includes(n)&&n!==Ea),Qd),r=jn(t,[Ea],ZL),a=jn(r,[ft],ky);return jn(a,[wr],{any:[ky,ZL]})}function JL(e,o=""){switch(e){case"section":case"block":return{...Kt(),...hn()};case"box":return{...Kt(),...hn(),...XL(),...qQ()};case"picture":return{...Kt(),...hn(),...Sy(YC(o),o)};case"textPart":return{...Kt(),...hn(),...UL()};case"cards":return{...Kt(),...hn(),...WL(NC(o))};case"marquee":return{...Kt(),...hn(),[Xp]:Oy(),_cLoop:VQ(),scrollDirection:Ey(),loopDuration:Zp({readsSpeed:!0}),loopDelay:Jp()}}}import{ENTRANCE_STATE_ATTR as YQ,entranceAttrs as XQ,scrollAttrs as ZQ}from"efficient-shell/format";var eR={},_y="_partMotion",Ay=[...uc,ft,so.duration,so.delay,...au];function cFe(e){return Ls(e,_y)}function In(e,o){return Cp(e,_y,o)}var JQ=new Set([tt.kind,ft,Ao.effect]);function oR(e,o,t,r){let{[t]:a,...n}=In(e,o),s=r==null||r===""||r==="none"&&JQ.has(t)?n:{...n,[t]:r};return vp(e,_y,o,Object.keys(s).length?s:null)}function Ly(e){return{entrance:mc(e),hover:RC(e),scroll:nu(e)}}function tR(e){let o=Ly(e);return o.entrance!==null||o.hover!=="none"||o.scroll!==null}function rR(e,o){let{attrs:t,style:r}=XQ(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(YQ)}}function aR(e,o){let{attrs:t,style:r}=ZQ(o);for(let[a,n]of Object.entries(t))e.setAttribute(a,n);for(let[a,n]of Object.entries(r))e.style.setProperty(a,n);return()=>{for(let a of Object.keys(t))e.removeAttribute(a);for(let a of Object.keys(r))e.style.removeProperty(a)}}var QQ=4;function Ry(e){let o;for(let t of e)(!o||t.element.compareDocumentPosition(o.element)&QQ)&&(o=t);return o}var eee="data-sf-part-host";function nR(e){let o=e?.ownerDocument.defaultView,t=e;for(;t&&!t.hasAttribute(eee)&&!t.classList.contains(Qn);){let r=o?.getComputedStyle(t).display??"";if(r==="contents")return null;if(r!=="inline")return t;t=t.parentElement}return null}var uu="data-sf-part-lift",QL="sf-part-lift";function sR(e){if(e.getElementById(QL))return;let o=e.createElement("style");o.id=QL,o.textContent=o1(`[${uu}]`).join(`
|
|
5
|
-
`),e.head.appendChild(o)}var lR=new Map,aee=e=>{let o=lR.get(e);return o||lR.set(e,o=mL(JL(e),`part:${e}`)),o},nee=new Set(Ay);function Ks(e,o,t){let{getItemById:r,getSelectorForId:a}=tee(f=>f),n=ree(),s=r(e)?.props??{},l=In(s,o),d=JSON.stringify(l),c=oee(()=>Object.fromEntries(Ay.map(f=>[f,l[f]])),[d]);return{part:o,fields:aee(t),values:c,keys:nee,onChange:(f,u)=>{let p=a(e),h=r(e);if(!p||!h)return;let I=oR(h.props??{},o,f,u);n.replaceComponent(p.zone,p.index,{...h,props:I})}}}import{Fragment as see,createElement as lee}from"react";import{deviceField as Fy}from"efficient-easel/screen/lib/document/device-fields";var Ro=()=>({type:"custom",render:()=>lee(see)});var By={words:Ro(),sourceNote:Ro(),style:Ro(),font:Ro(),italic:Ro(),fontSize:Fy("each",Ro()),lineHeight:Ro(),letterSpacing:Ro(),paragraphSpacing:Ro(),padding:Ro(),align:Fy("each",Ro()),letterCase:Ro(),fixedSizeHint:Fy("each",Ro()),regionNote:Ro(),regionStyle:Ro()},iee=["fontSize","align"];function iR(e){return iee.includes(e)}var dR={showTicker:Ro(),items:Ro()};var bee="root:default-zone";function cR({heroId:e}){let{appState:o,dispatch:t}=uee(h=>h),r=o.data.content??[],a=r.findIndex(h=>h.props.id===e),n=a>=0?r[a]:null,s=n?n.props.showTicker??!0:!0,l=pee(()=>{let h=n?.props.tickerItems;return Array.isArray(h)?h:kA.map(I=>({text:I}))},[n]),d=fee(),c=gee(),f=h=>Iee(dR[h],c),u=Ks(e,TA,"block");if(!n)return gn("p",{className:"sf-note",children:i("This ticker\u2019s hero is no longer on the page.")});let p=h=>t({type:"replace",destinationZone:bee,destinationIndex:a,data:{...n,props:{...n.props,...h}}});return gn(Vt,{motion:u,body:cee(dee,{children:[!f("showTicker")&&!f("items")&&gn(un,{}),f("showTicker")&&gn(mee,{label:i("Show ticker"),labelId:d,icon:gn(xee,{}),action:gn(hee,{checked:s,onChange:h=>p({showTicker:h}),ariaLabelledBy:d})}),f("items")&&gn(Cg,{label:wg.label,icon:wg.icon,items:l,placeholder:"item",onChange:h=>p({tickerItems:h}),markup:!0})]})})}import{jsx as ee,Fragment as Gi,jsxs as yt}from"react/jsx-runtime";import{useContext as zee,useEffect as Dy,useRef as $ee,useState as _R}from"react";import{FieldSelect as Gee,InspectorField as jee,fieldShownInView as Kee}from"efficient-easel/fields";import{InertHint as HR,SettingsField as Vee}from"efficient-easel/panel";import{InspectorUpLevel as Su}from"efficient-easel/chrome";import{StylesIcon as qee,TypeIcon as Yee}from"efficient-easel/icons";import{useEasel as Xee}from"efficient-easel/easel";import{TextPartPanel as AR}from"efficient-easel/copy";import{Button as Zee,IconButton as Jee,Tooltip as Qee}from"efficient-shell/ui";import{jsx as uR,jsxs as yee}from"react/jsx-runtime";import{DEFAULT_EASEL_STRINGS as See}from"efficient-easel/strings";import{COPY_CELLS as Vs,COPY_CELL_LENGTHS as fR,CopyBox as wee,lengthCellUnits as Cee}from"efficient-easel/copy";import{PaddingYIcon as vee}from"efficient-easel/icons";import{onDesktopWords as kee}from"efficient-easel/screen/lib/document/box-fields";var pR=See.copy.cells,Tee={kind:"spacing"},Pee=["left","center","right","justify"];function mu(e,o,t,r="desktop"){let a=bi(e),n=db(r),s=e[n]??e.size??o.sizePx,l=i1(e,r),d=(f,u,p,h,I)=>{let g=It[p];return Cee({preset:f,row:u,table:qa,unit:e[g],value:e[p],tier:r,styleValue:h,label:i(I),onPick:(C,w)=>t({[g]:C??null,[p]:w??null}),onChange:(C,w)=>t({...w?{[g]:w.unit??null}:{},[p]:C??null})})},c={key:"padding",name:i("Padding"),icon:uR(vee,{}),unit:"px",step:nb,shiftStep:10,min:rb,max:ab};return[{...Vs.fontSize,key:"fontSize",value:e[n],styleValue:Math.round(o.sizePx),onChange:f=>t({[n]:f??null}),...d(Vs.fontSize,fR.fontSize,n,Math.round(o.sizePx),pR.fontSize),...n==="size"?{}:{reset:{detail:l?kee(f=>i(f),`${l.px}px`,l.view):void 0}}},{...Vs.lineHeight,key:"lineHeight",value:a.lineHeight,styleValue:o.lineRatio,onChange:f=>t(f===void 0?{lineHeight:null,line:null}:{lineHeight:f})},{...Vs.letterSpacing,key:"letterSpacing",scale:s,value:a.letterSpacingEm,styleValue:o.letterEm,onChange:f=>t(f===void 0?{letterSpacing:null,letter:null}:{letterSpacing:f})},{...Vs.paragraphSpacing,key:"paragraphSpacing",value:e.paragraphSpacing,styleValue:0,onChange:f=>t({paragraphSpacing:f??null}),...d(Vs.paragraphSpacing,fR.paragraphSpacing,"paragraphSpacing",0,pR.paragraphSpacing)},{...c,value:e.padding,styleValue:o.paddingPx,onChange:f=>t({padding:f??null}),...d(c,Tee,"padding",o.paddingPx,"Padding")}]}function mR({text:e,onTextChange:o,multiline:t,markup:r=!0,styled:a=!0,style:n,base:s,setValue:l,colors:d,placeholder:c,ariaLabel:f,head:u,typedOnCanvas:p=!1}){let h=mu(n,s,l),I=Ng(r,t);return yee("div",{className:"sf-part-textbox",children:[u,uR(wee,{value:e,onChange:o,multiline:t,placeholder:c,ariaLabel:f,rules:Vd,tools:I,barShows:p?"focus":"always",colors:r?d:[],colorNameOf:rt,align:a?{value:n.align??s.align,allow:Pee,onChange:g=>l({align:g})}:void 0,letterCase:a?{value:n.case==="capitalize"?"":n.case??"",onChange:g=>l({case:g||null})}:void 0,cells:a?h:void 0})]})}import{UiIcon as LR}from"efficient-easel/draw/client";import{jsx as hu,Fragment as Eee,jsxs as Oee}from"react/jsx-runtime";import{Button as hR,Dialog as _ee}from"efficient-shell/ui";function xR({styleName:e,onCancel:o,onConfirm:t}){return hu(_ee,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:i("Update {style}?",{style:e}),footer:Oee(Eee,{children:[hu(hR,{variant:"secondary",onClick:o,children:i("Cancel")}),hu(hR,{variant:"primary",onClick:t,children:i("Update style")})]}),children:hu("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 eoe}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewDevice as ooe}from"efficient-easel/draw/client";import{shownTier as bu}from"efficient-easel/screen/lib/document/device-fields";import{jsx as Aee}from"react/jsx-runtime";import{createContext as Lee,useContext as Ree,useMemo as Fee,useState as Bee}from"react";var Dee={partStyle:null,setPartStyle:()=>{}},IR=Lee(Dee);function tBe({children:e}){let[o,t]=Bee(null),r=Fee(()=>({partStyle:o,setPartStyle:t}),[o]);return Aee(IR.Provider,{value:r,children:e})}function gR(){return Ree(IR)}import{TEXT_FIELD_MARKER as toe,viewKeyAt as roe}from"efficient-easel/draw";import{useSectionOps as aoe}from"efficient-easel/screen/lib/document/use-section-ops";var Hi="@name",bR="@body",yR="@value",SR={[Hi]:"Name",[bR]:"Body",[yR]:"Value"},Nee={TimelineTrack:{"entries.date":Hi,"entries.title":Hi,"entries.blurb":bR},Footprint:{"offices.city":Hi},Stats:{"items.label":Hi,"items.value":yR}};function Mee(e){let{key:o,row:t}=Gt(e);return t?`${o}.${t.rowKey}`:null}function Ui(e,o){if(!e)return o;let t=Mee(o);return t?j(Nee,e)?.[t]??o:o}import{useEaselHost as noe}from"efficient-easel/screen/lib/host";function Hee(e){let o=new Set([...Object.keys(j(df,e)??{}),...j(cf,e)??[]]);for(let[t,r]of Object.entries(j(Gx,e)??{}))r.verb==="snapshot"&&o.add(t);return[...o].sort()}var Uee={CollectionCard:"product",FooterMenu:"menu",Gallery:"product",GalleryItem:"product",ProductGrid:"product",ProductHero:"product",SpecTable:"product",Events:"blog",FeaturedCover:"blog",LongRead:"blog",SubscribeBlogs:"blog"},wR={product:"Synced from the product.",blog:"Synced from the blog post.",menu:"Synced from the site menu."},CR="Open",vR={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 qs(e){let o=e?.source?.slug;return Se(o)}function Wi(e){return j(Uee,e)??null}function kR(e,o){let t=Wi(e);return t&&Hee(e).includes(o)?t:null}function xu(e){let o=e?.menu?.id;return Se(o)}var zi={tag:"text-[length:var(--size-label,13px)]",name:"text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))]",namePhone:"max-view-wide: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)]"},Wee={tag:{label:"Tag",follows:"Labels",builtIn:Vn(zi.tag),writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:Vn(zi.name),writable:!0},body:{label:"Body",follows:"Body",builtIn:Vn(zi.body),writable:!0},price:{label:"Price",follows:"Labels",builtIn:Vn(zi.price),writable:!0},link:{label:"Link",follows:"Labels",builtIn:Vn(zi.link),writable:!0}},TR=Wee;var Iu={entry:{label:"Entry",follows:"Labels",builtIn:"13px",writable:!0},number:{label:"Entry number",follows:"Labels",builtIn:"13px",writable:!0}};var gBe=tc,PR={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 ER={SpecTable:PR,FAQ:bv,Collections:TR,Contents:Iu};function OR(){return jd("efficient.section-text-regions",()=>new Map)}function TBe(e){let o=OR();for(let[t,r]of Object.entries(e)){if($e(ER,t))throw new Error(`lib/sections/section-text-regions: "${t}" is a builder section; its table is the builder's`);let a=o.get(t);if(a&&a!==r)throw new Error(`lib/sections/section-text-regions: "${t}" already has a table`);o.set(t,r)}}function gu(e){return e?j(ER,e)??OR().get(e)??null:null}function Ny(e){return e?i(e):null}function RR(e){return e.kind==="role"?rh[e.role]:e.kind==="custom"?"Custom":null}function soe(e){let o=yr(e.role);return o?{kind:"role",role:o}:null}function loe(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 yu(e,o,t,r){return soe(gi(e,o))??loe(t,r)}function ioe(e,o){if(!e.length)return null;let t=o(e[0]);return e.every(r=>o(r)===t)?t:null}function FR(e){return[{value:$i,label:i("No style"),description:i("Section\u2019s own")},...e.map(o=>({value:o.id,label:o.name,description:o.values.font?Hn(o.values.font)?.label:void 0}))]}var $i="";function doe({face:e,base:o,onPick:t}){let r=e.kind==="role"?e.role:$i,a=[{label:i("No style"),value:$i},...CC.map(n=>({label:i(rh[n]),value:n}))];return ee(Gee,{ariaLabel:i("Style"),value:r,options:a,inline:!0,onChange:n=>t(n===$i?null:n),renderOption:n=>n.value===$i?yt(Gi,{children:[ee("span",{className:"es-fsel-label sf-part-style-keep",children:n.label}),ee("span",{className:"sf-part-style-aside","aria-hidden":"true",children:i("Section\u2019s own")})]}):ee("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${n.value})`},children:n.label}),renderValue:()=>ee("span",{style:{fontFamily:o?.fontKey?`var(${Hn(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:Ny(RR(e))}),valueText:n=>Ny(RR(e))??n?.label??""})}var UR=["regionNote","regionStyle"],coe=Object.keys(By).filter(e=>!UR.includes(e));function WR(e,o){return!e.some(o)}function foe({sectionName:e,onBack:o,textEditor:t,styleRow:r,children:a,tabs:n}){let s=yt(Gi,{children:[t,r,a]});return yt("div",{className:"sf-part-panel",children:[ee(Su,{inline:!0,name:i(e),onSelect:o}),n?n(s):s]})}function wu({source:e,slug:o,menuId:t}){let r=noe(),a=vR[e],n=!a.needsSlug||!!o;return ee("div",{className:"sf-note sf-note--source",children:yt(HR,{children:[i(wR[e]),n?yt(Gi,{children:[" ",ee(Zee,{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(CR)})]}):null]})})}var BR=4,poe=120;function DR(e){return 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()})}function NR({region:e,sizePx:o,face:t,base:r,onFollowStyle:a,source:n,slug:s,onBack:l,shows:d,sizedStyle:c,ownLook:f}){let u=e.follows;return yt("div",{className:"sf-note",children:[ee("p",{children:ee("strong",{children:i(e.label)})}),d("regionNote")&&!f&&ee("p",{children:o?i("Its size follows Styles \u25B8 {follows} \u2014 {px}px right now.",{follows:i(u),px:Math.round(o)}):i("Its size follows Styles \u25B8 {follows}.",{follows:i(u)})}),c?yt(Gi,{children:[c,d("regionStyle")&&ee("p",{className:"es-field-hint",children:DR(e)})]}):a?d("regionStyle")?ee(Gi,{children:ee(Vee,{label:i("Style"),icon:ee(qee,{}),hint:DR(e),children:ee(doe,{face:t,base:r,onPick:a})})}):null:d("regionNote")&&ee("p",{className:"es-field-hint",children:i("Only the size follows a site style. This section sets its own font, weight and letter case.")}),n&&d("sourceNote")?ee(wu,{source:n,slug:s}):null,WR([...UR,"sourceNote",...c?["fontSize"]:[]],p=>d(p)&&(p!=="sourceNote"||!!n))&&ee(un,{}),ee(Su,{inline:!0,name:i("Page"),onSelect:l})]})}function uoe({onBack:e}){return yt("div",{className:"sf-note",children:[ee("p",{children:ee("strong",{children:i("This part is no longer here.")})}),ee("p",{children:i("The section it belonged to has been changed or removed.")}),ee(Su,{inline:!0,name:i("Page"),onSelect:e})]})}function moe({onBack:e,partId:o,why:t}){return yt("div",{className:"sf-note",children:[ee("p",{children:ee("strong",{children:i("This part's settings did not open.")})}),ee("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.")}),ee("p",{className:"sf-note-detail",children:yt("code",{children:[o," \u2014 ",t]})}),ee(Su,{inline:!0,name:i("Page"),onSelect:e})]})}function zR({nodeId:e,propKey:o,onBack:t,onEditStyle:r}){let{getItemById:a,getSelectorForId:n,config:s}=Xee(V=>V),l=aoe(),d=x_(),{partStyle:c}=gR(),{fonts:f,textStyles:u}=ue(),p=zee(eoe),h=!p?.capabilities?.hasSiteTheme,{persist:I}=hs({themeFromDocument:h,tokenRef:p?.tokenRef,siteId:p?.siteId??null}),g=Fp({themeFromDocument:h,persist:I}),[C,w]=_R(!1),T=ooe(),y=V=>(bu(T)!=="tablet"||iR(V))&&Kee(By[V],T),b=$ee(null),P=a(e),H=n(e),E=P?s.components[P.type]:void 0,{key:U,row:O}=Gt(o),D=E?.fields?.[U],v=O?_s(D,O):D,_=ap(e,o),A=P?.props??{},F=Ps(v),z=jf(v),$=Eg(v),X=P?Wi(P.type):null,Q=P?kR(P.type,U):null,Fe=O?fi(A[U],O):A[U],Oe=!!O&&!(Array.isArray(A[U])&&O.index<A[U].length);Dy(()=>{h_(document)||b.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[_]);let[ze,Ke]=_R(0);Dy(()=>Ke(0),[_]);let ge=!!P&&!Oe&&(!H||!v);Dy(()=>{if(!ge||ze>=BR)return;let V=setTimeout(()=>Ke(no=>no+1),poe);return()=>clearTimeout(V)},[ge,ze]);let Te=ge&&ze<BR,_e=Ks(e,Ui(P?.type,o),"textPart");if(!P||Oe)return ee(uoe,{onBack:t});let Ne=gu(P.type),ao=Ne?vl(Ne,o):null;if(Ne&&ao){let V=c?.partId===_?c:null,no=Ne[ao],_t=no.writable===!0&&!!H,zr=ka=>{H&&l.replaceComponent(H.zone,H.index,{...P,props:an(A,o,"role",ka)})};if(_t&&gv(no)){let ka=gi(A,o),pC=Ta=>{if(!H)return;let oh=A;for(let[Q5,e3]of Object.entries(Ta))oh=an(oh,o,Q5,e3??null);l.replaceComponent(H.zone,H.index,{...P,props:oh})},X5=Br(g.saved,g.old),Z5=tb(ka)??"",J5=mu(ka,V?.base??MR,pC,bu(T)).filter(Ta=>Ta.key==="fontSize"&&y(Ta.key));return ee(Vt,{motion:_e,body:ee(NR,{region:no,sizePx:V?.base.sizePx??null,face:yu(A,o,V,f),base:V?.base??null,source:X,slug:qs(A),onBack:t,shows:y,ownLook:c1(ka),sizedStyle:ee(AR,{style:y("style")?{value:Z5,options:FR(X5),onChange:Ta=>pC(Ta?{textStyle:Ta}:{textStyle:null,role:null}),onEditStyles:r}:void 0,cells:J5})})})}return ee(Vt,{motion:_e,body:ee(NR,{region:no,sizePx:V?.base.sizePx??null,face:yu(A,o,V,f),base:V?.base??null,onFollowStyle:_t?zr:void 0,source:X,slug:qs(A),onBack:t,shows:y})})}if(!H||!v)return Te?ee("div",{className:"sf-note","aria-busy":"true"}):ee(moe,{onBack:t,partId:_,why:H?"no field":"no selector"});let bo=V=>{l.replaceComponent(H.zone,H.index,{...P,props:V})},ne=V=>{if(la(V).hidden!==la(Fe).hidden||!F){let no=O?Tg(A,U,O,V):{...A,[U]:V};no&&bo(no);return}lp({node:P,propKey:o,kind:F,zone:H.zone,index:H.index},la(V).text,l.replaceComponent)},Me=Fe,Ve=c?.partId===_?c:null,Z=Ve?.styleOwner,Ae=Z?a(Z.owner):null,ct=Z&&Ae?n(Z.owner):null,fo=!!(Z&&Ae&&ct),M=fo?Ae.props??{}:A,Re=fo?V=>l.replaceComponent(ct.zone,ct.index,{...Ae,props:V}):bo,ye=fo?Z.kind:Ui(P?.type,o),po=gi(M,ye),Be=[{partKey:ye,face:yu(M,ye,Ve,f),sizeGroup:Ve?.sizeGroup??null,base:Ve?.base??MR,style:po}],Ot=ioe(Be,V=>V.sizeGroup),xr=fs(Ve?.inks),Ze=(V,no)=>{let _t=M;for(let zr of Be)_t=an(_t,zr.partKey,V,no);Re(_t)},Ir=V=>V?Ze("textStyle",V):ya({textStyle:null,role:null}),ya=V=>{let no=M;for(let _t of Be)for(let[zr,ka]of Object.entries(V))no=an(no,_t.partKey,zr,ka??null);Re(no)},Nn=F==="text"||F==="textarea",{text:Mn,hidden:gr}=la(Fe),Wr=v?.[toe]?.label??o,Sa=gr?i("Show {label} on the slide",{label:i(Wr)}):i("Hide {label} on the slide",{label:i(Wr)}),xl=yt("div",{className:"sf-field-head",children:[ee(Yee,{}),ee("span",{className:"sf-field-label sf-field-label--inline",children:i(Wr)}),Nn&&ee(Qee,{content:Sa,children:ee(Jee,{"aria-pressed":gr,"aria-label":Sa,onClick:()=>ne({text:Mn,hidden:!gr}),children:gr?ee(LR,{name:"eye-off",size:14}):ee(LR,{name:"eye",size:14})})})]}),wa=!z&&$,$d=!!F&&(CO(v)||z||gr||!$),Il=yu(M,ye,Ve,f),Gd=Il.kind==="role"?Il.role:null,Ca=tb(po)??k1(Gd),fC=Br(g.saved,g.old),j5=Object.entries(po).filter(([V,no])=>V!=="role"&&V!=="textStyle"&&no!==void 0).length,K5=()=>{let V=M;for(let no of Be){let{role:_t,textStyle:zr}=no.style;V=n1(V,no.partKey),_t&&(V=an(V,no.partKey,"role",_t)),zr&&(V=an(V,no.partKey,"textStyle",zr))}Re(V)},va=Ca,V5=T1(Be[0].style),q5=va?fC.find(V=>V.id===va)?.name??va:"",Y5=()=>{w(!1),va&&(g.write(P1({saved:g.saved,old:g.old,styleId:va,values:yb(Be[0].style)}),!0),K5())};return yt(foe,{sectionName:E?.label??P.type,onBack:t,tabs:V=>ee(Vt,{motion:_e,body:V}),textEditor:y("words")?ee("div",{ref:b,className:"sf-part-text",children:$d?ee(mR,{text:Mn,onTextChange:V=>ne(Nn?{text:V,hidden:gr}:V),multiline:ep(F),markup:F!=="plainText",styled:!1,style:Be[0].style,base:Be[0].base,setValue:ya,colors:xr,placeholder:Ny(VO(v))??void 0,ariaLabel:i(Wr),head:xl,typedOnCanvas:d===_}):F?Nn?xl:null:ee(jee,{field:v,name:o,value:Me,onChange:ne,id:`sf-part-${e}-${o}`})}):void 0,children:[Q&&y("sourceNote")&&ee(wu,{source:Q,slug:qs(A),menuId:xu(A)}),wa&&ee(AR,{style:y("style")?{value:Ca??"",options:FR(fC),onChange:V=>Ir(V||null),changed:j5>0,onEditStyles:r,onUpdateStyle:va&&V5?()=>w(!0):void 0}:void 0,font:y("font")?{value:po.font??"",styleValue:Hn(Be[0].base.fontKey)?.label,options:$r.map(V=>({label:V.label,value:V.key})),onChange:V=>Ze("font",V||null)}:void 0,italic:y("italic")?{value:po.italic,styleValue:xoe(u,Ca),onChange:V=>Ze("italic",V??null)}:void 0,cells:mu(Be[0].style,Be[0].base,ya,bu(T)).filter(V=>y(V.key)),align:y("align")?hoe(po,Be[0].base.align,bu(T),Ze):void 0,letterCase:y("letterCase")?{value:po.case??"",styleValue:Be[0].base.case,onChange:V=>Ze("case",V||null)}:void 0}),C&&va&&ee(xR,{styleName:q5,onCancel:()=>w(!1),onConfirm:Y5}),wa&&Ot===null&&y("fixedSizeHint")&&ee(HR,{children:i("Fixed size \u2014 the site\u2019s Text setting doesn\u2019t resize this.")}),WR(coe,V=>y(V)&&(V==="words"||(V==="sourceNote"?!!Q:V==="fixedSizeHint"?wa&&Ot===null:wa)))&&ee(un,{})]})}function hoe(e,o,t,r){let a=roe("align",t),n=l1(e,t);return{value:e[a]??"",styleValue:n??o,onChange:s=>r(a,s||null)}}function xoe(e,o){return!o||!Array.isArray(e)?!1:e.find(t=>t?.id===o)?.values?.italic===!0}var MR={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0};import{jsx as qt,jsxs as jy,Fragment as voe}from"react/jsx-runtime";import{useCallback as koe,useRef as Toe,useState as Vi}from"react";import{InspectorIconButton as Poe}from"efficient-easel/chrome";import{useEasel as Eoe}from"efficient-easel/easel";import{PopupMenu as Ooe,PopupMenuItem as _oe,PopupMenuLabel as Ou}from"efficient-shell/ui";import{CopyToPageIcon as Aoe}from"efficient-easel/icons";import{useEaselSession as Loe}from"efficient-easel/screen/lib/session-context";import{cloneNodeWithFreshIds as Roe}from"efficient-easel/screen/lib/document/section-doc";import{FOOTER_TYPE as Foe}from"efficient-easel/draw";import{currentEaselSession as Ioe}from"efficient-easel/screen/lib/session";var goe={general:!0,commerce:!0,service:!0};function My(e){let o=e?.sets;return o?Object.fromEntries(IC.map(t=>[t,o.includes(t)])):goe}function Hy(e=Ioe()){return My(e.blocks)}import{isBackendError as Ys}from"efficient-easel/screen/lib/backend-error";import{isEfficientBackend as JR}from"efficient-easel/screen/lib/session";var Cu=Pc(),Uy=Cu.set;function vu(e,o){Uy(e,o)}function ku(e,o){let t=Cu.get(e);Uy(e,o??(t==="live"?"changed":t))}function Tu(e,o){Uy(e,o??"live")}function $R(e){return Cu.get(e)}function GR(e){return Cu.use(e)}function jR(e,o){return e==="live"&&o?"changed":e}function Wy({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 KR(e){return e.map(o=>o.change==="take_down"?i("{name} (taken down)",{name:o.name}):o.name)}var VR="SharedSection",boe=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,ji=e=>{let o=e?.content;return Array.isArray(o)?o:[]},Ki=e=>{let o=e?.props?.id;return typeof o=="string"?o:void 0};function qR(e){if(e?.type!==VR)return null;let o=e.props?.section;return typeof o=="string"&&boe.test(o)?o.toLowerCase():null}function YR(e){let o=[];for(let t of ji(e)){let r=qR(t),a=Ki(t);r&&a&&o.push({refId:a,section:r})}return o}function Pu(e){let o=ji(e)[0];return o&&typeof o=="object"&&Ki(o)?o:null}function yoe(e,o){return{type:VR,props:{id:e,section:o}}}function XR(e,o){let t=new Map,r=new Set,a=!1,n=ji(e).map(s=>{let l=qR(s),d=Ki(s);if(!l||!d||r.has(l))return s;let c=Pu(o.get(l)),f=Ki(c??void 0);return!c||!f||t.has(f)?s:(r.add(l),t.set(f,{section:l,refId:d,reference:s}),a=!0,c)});return{working:a?{...e,content:n}:e,held:t}}function ZR(e,o,t){let r=new Map,a=!1,n=ji(e).map(s=>{let l=Ki(s),d=l?o.get(l):void 0,c=d?t.get(d.section):void 0;if(!d||!c||r.has(d.section))return s;let f=ji(c).slice(1),u=Pu(c);return r.set(d.section,u===s?c:{...c,content:[s,...f]}),a=!0,d.reference??yoe(d.refId,d.section)});return{page:a?{...e,content:n}:e,docs:r}}function Gy(e){return!!(e?.publish&&e.liveState)}function Soe(e,o){if(!Gy(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 woe(e,o){return async(t,r)=>{try{await f0()}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"?uf({state:"live",changes:[]}):Or(0),{version:r??null}}}function $y(e,o,t){let r=o?{siteId:o}:void 0;return{resolve:a=>e.load({slug:a,...r}).then(n=>(n&&(vu(n.id,n.live),ST(n.id,n.videoFrames)),n)),saveLayout:(a,n,s,l)=>e.save(a,{layout:n},{version:s,clientId:l??""}).then(d=>(ku(a,d.live),wT(a,d.videoFrames),Or(),d)),rereadVersion:e.version?a=>e.version(a):void 0,publish:Gy(t)?woe(t,r):e.publish?(a,n)=>e.publish(a,n?{version:n}:void 0).then(s=>(Tu(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 Coe(e,o,t,r,a=!1){let n=null,s=new Set,l=!1,d=new Map,c=new Map,f=new Map,u=new Map,p={docId:null,lockHolder:null,conflict:null,saveFailed:!1,unpublished:!1,loadFailed:!1,sections:[]},h=new Set,I=()=>{if(!n)return!1;let O=$R(n.id);return O==="changed"||O==="never"||O===void 0&&l},g=O=>{p={...p,...O,docId:n?.id??null,unpublished:I(),sections:[...f.values()]};for(let D of h)D()},C=(O,D,v)=>{D?f.set(O,{section:O,title:d.get(O)?.title??"",problem:D,holder:v}):f.delete(O)},w=O=>O&&typeof O=="object"&&!Array.isArray(O)?O:{},T=O=>s.has(O),y=()=>new Map([...d].map(([O,D])=>[O,D.layout])),b=()=>`SharedSection-${typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2)}`,P=(O,D,v,_)=>{let A=w(D);d.set(O,{layout:A,version:v,savedJson:JSON.stringify(A),title:_})},H={state:()=>p,subscribe:O=>(h.add(O),()=>{h.delete(O)})},E={sectionOf:O=>c.get(O)?.section??null,heldElsewhere:O=>{let D=c.get(O)?.section;return!!(D&&f.get(D)?.problem==="lock")},adopt:(O,D)=>{P(D.id,D.layout,D.layout_updated_at,D.title),c.set(O,{section:D.id,refId:b()}),u.set(D.id,D.used_on),g({})},place:O=>{if([...c.values()].some(_=>_.section===O.id))return null;let D=Pu(w(O.layout)),v=typeof D?.props?.id=="string"?D.props.id:null;return!D||!v||!D.type?null:(P(O.id,O.layout,O.layout_updated_at,O.title),c.set(v,{section:O.id,refId:b()}),u.set(O.id,O.used_on),D)},usedOn:O=>u.get(O)??null,learn:O=>{for(let D of O){u.set(D.id,D.used_on);let v=d.get(D.id);v&&(v.title=D.title);let _=f.get(D.id);_&&f.set(D.id,{..._,title:D.title})}g({})}},U=async(O,D)=>{for(let[v,_]of O){let A=d.get(v),F=JSON.stringify(_);if(!(!A||F===A.savedJson||f.get(v)?.problem==="lock"))try{let z=await e.save(v,{layout:_},{version:A.version,clientId:D??""});ku(v,z.live),A.layout=_,A.version=z.version,A.savedJson=F,C(v,null)}catch(z){Ys(z,"changed-elsewhere")?C(v,"conflict"):Ys(z,"lock-taken")?C(v,"lock",z.holder??void 0):C(v,"save")}}O.size&&Or(),g({})};return{resolve:async O=>{if(Cy(O===Mt?null:H),sx(O===Mt?null:E),d=new Map,c=new Map,f=new Map,u=new Map,O===Mt)return t.resolve(O);let D=!1,[v,_]=await Promise.all([t.resolve(O),e.load({slug:Mt,...o}).catch(()=>(D=!0,null))]);if(_&&!Vl(v?.layout)){vu(_.id,_.live);let Q=w(_.layout);n={id:_.id,layout:Q,version:_.version,savedJson:""}}else n=null;if(l=!1,!v)return g({conflict:null,saveFailed:!1,loadFailed:D}),v;let A=w(v.layout),F=YR(A),z=await Promise.all(F.map(Q=>e.load({id:Q.section,...o}).catch(()=>null)));F.forEach((Q,Fe)=>{let Oe=z[Fe];Oe?(vu(Oe.id,Oe.live),P(Q.section,Oe.layout,Oe.version,"")):(d.delete(Q.section),f.set(Q.section,{section:Q.section,title:"",problem:"load"}))});let $=XR(A,y());if(c=$.held,!n)return c.size&&s.add(v.id),g({conflict:null,saveFailed:!1,loadFailed:D}),c.size?{...v,layout:$.working}:v;let X=xT($.working,n.layout);return n.savedJson=JSON.stringify(nx(X,n.layout).chrome),s.add(v.id),g({conflict:null,saveFailed:!1,loadFailed:!1}),{...v,layout:X}},saveLayout:async(O,D,v,_)=>{if(!T(O))return t.saveLayout(O,D,v,_);let A=n,F=A?nx(D,A.layout):{page:D,chrome:null},z=ZR(F.page,c,y()),$=await t.saveLayout(O,z.page,v,_);if(await U(z.docs,_),!A)return $;let X=JSON.stringify(F.chrome);if(!F.chrome||X===A.savedJson||p.lockHolder)return $;try{let Q=await e.save(A.id,{layout:F.chrome},{version:A.version,clientId:_??""});ku(A.id,Q.live),Or(),A.layout=F.chrome,A.version=Q.version,A.savedJson=X,l=!0,g({conflict:null,saveFailed:!1})}catch(Q){Ys(Q,"changed-elsewhere")?g({conflict:Q.conflict??{savedBy:"",savedByYou:!1,secondsAgo:0}}):Ys(Q,"lock-taken")?g({lockHolder:Q.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}}):g({saveFailed:!0})}return $},publish:t.publish?async(O,D)=>{let v=await t.publish(O,D),_=n;if(_&&T(O)&&!a&&e.publish&&I()&&!p.lockHolder){let A=await e.publish(_.id,_.version?{version:_.version}:void 0);Tu(_.id,A.live),A.version!==null&&(_.version=A.version),l=!1,g({})}if(T(O)&&!a&&e.publish)for(let[A,F]of d){if(f.get(A)?.problem==="lock")continue;let z=await e.publish(A,F.version?{version:F.version}:void 0);Tu(A,z.live),z.version!==null&&(F.version=z.version)}return v}:void 0,lock:r?{claim:async(O,D,v)=>{let _=await r.claim(O,D,v);if(!T(O))return _;let A=n;if(A)try{await r.claim(A.id,D,!1),p.lockHolder&&g({lockHolder:null})}catch(F){Ys(F,"lock-taken")&&g({lockHolder:F.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}})}for(let F of d.keys())try{await r.claim(F,D,!1),f.get(F)?.problem==="lock"&&C(F,null)}catch(z){Ys(z,"lock-taken")&&C(F,"lock",z.holder??void 0)}return d.size&&g({}),_},release:async(O,D)=>{if(await r.release(O,D),!T(O))return;let v=n;v&&!p.lockHolder&&await r.release(v.id,D).catch(()=>{});for(let _ of d.keys())f.get(_)?.problem!=="lock"&&await r.release(_,D).catch(()=>{})}}:void 0,pinnedChrome:H}}function Eu(e){let o=(t,r,a)=>e.save(t,r.layout?{...r,layout:Xk(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 UDe(e,o,t){return e.update(o,Zk(t))}function WDe(e,o=to(),t=Hy(),r={}){let a=JR(o),n=e?{siteId:e}:void 0,s=a?!!e:!0,l=o.site.update,d=a&&t.commerce&&t.service,c=!!r.editsPinnedInPlace&&d,f=Gy(o.site)?o.site:void 0,u=Eu(o.pages),p=$y(u,e,f),h=c?Coe(u,n,p,o.lock,!!f):null;return{capabilities:{canPublish:!!f||!!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:d,editsPinnedInPlace:c,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,...QR(p.resolve),lock:o.lock,...h,site:s?()=>o.site.get(n):void 0,siteLiveState:f?()=>f.liveState(n):void 0,siteVersions:Soe(f,n),updateSite:s&&l?I=>l(I,n):void 0,previewHref:o.preview?I=>o.preview.href(I):void 0}}function zDe(e,o=to(),t=Hy()){let r=JR(o),a=o.templates,n=a?Eu(a.pages(e)):{list:()=>Promise.reject(new Error(zy)),load:()=>Promise.reject(new Error(zy)),save:()=>Promise.reject(new Error(zy))};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},...$y(n,void 0),...QR($y(n,void 0).resolve),publish:void 0,templateName:a?()=>a.get(e).then(s=>s.name):void 0}}function QR(e){return{resolve:o=>(Cy(null),sx(null),e(o))}}var zy="This editor's backend has no website templates.";function Boe(e,o,t){let r=Roe(e,void 0,o);return t?.(r)??r}function eF({node:e,currentSlug:o,siteId:t,tokenRef:r,runAuthed:a,onNotify:n}){let[s,l]=Vi(!1),[d,c]=Vi(null),f=Loe(),u=Eoe(E=>E.config.components),[p,h]=Vi(!1),[I,g]=Vi(null),C=Toe(null),[w,T]=Vi(null),y=koe(async()=>{if(f.usesBridgedToken&&!r.current){h(!0);return}try{c(await to(f).pages.list(t?{siteId:t}:void 0))}catch{h(!0)}},[r,t,f]),b=()=>{if(s){l(!1);return}let E=C.current?.getBoundingClientRect();E&&T({top:E.bottom+6,right:Math.max(8,window.innerWidth-E.right)}),c(null),h(!1),y(),l(!0)},P=(d??[]).filter(E=>E.slug!==o),H=async E=>{if(I)return;g(E.slug);let U=Boe(e,u,f.documentHooks?.storedNode),O=await a(()=>Doe(to(f).pages,E,U));g(null),l(!1),n?.(O?i("Duplicated to \u201C{name}\u201D",{name:E.label}):i("Couldn\u2019t duplicate the section \u2014 please retry"),O?"success":"error")};return jy(voe,{children:[qt("span",{"data-menu-toggle":!0,style:{display:"contents"},children:qt(Poe,{buttonRef:C,label:i("Duplicate to another page"),hasPopup:"menu",expanded:s,onClick:b,children:qt(Aoe,{size:15})})}),s&&w&&qt(Ooe,{portal:!0,style:{top:w.top,right:w.right},onClose:()=>l(!1),children:jy("div",{role:"menu","aria-label":i("Duplicate to page"),children:[qt(Ou,{children:i("Duplicate to page")}),p?qt(Ou,{children:i("Couldn\u2019t load pages")}):d===null?qt(Ou,{children:i("Loading\u2026")}):P.length===0?qt(Ou,{children:i("No other pages")}):P.map(E=>jy(_oe,{role:"menuitem",disabled:I!==null,onClick:()=>{H(E)},children:[qt("span",{className:"min-w-0 flex-1 truncate",children:E.label}),I===E.slug?qt("span",{className:"shrink-0 text-xs",children:i("Copying\u2026")}):E.draft&&qt("span",{className:"shrink-0 text-xs",children:i("draft")})]},E.id))]})})]})}async function Doe(e,o,t){let r=Eu(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(d=>d?.type===Foe);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 ile}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSectionOps as dle}from"efficient-easel/screen/lib/document/use-section-ops";import{SELECTION_MODE as y$e,isSelectionMode as Sw}from"efficient-easel/screen/lib/screen-parts";import{usePreviewParts as cle}from"efficient-easel/draw/client";import{jsx as qi,jsxs as Noe}from"react/jsx-runtime";import{SettingsDrill as Moe}from"efficient-easel/panel";import{UiIcon as Hoe}from"efficient-easel/draw/client";var Uoe="Not shown on the page";function Woe({part:e,onOpen:o}){return qi(Moe,{name:i(e.label),preview:e.offPage?i(Uoe):e.preview||i("Empty"),offPage:e.offPage,status:e.hidden?qi("span",{className:"sf-entry-eye",role:"img","aria-label":i("Hidden on the page"),children:qi(Hoe,{name:"eye-off",size:14})}):void 0,onOpen:()=>o(e.key)})}function Ky(e){return e.filter(o=>!o.identifier)}function oF({parts:e,onOpen:o,heading:t=!0}){let r=Ky(e);return r.length?Noe("div",{className:"sf-entries",children:[t?qi("h3",{className:"sf-entries-head",children:i("Text")}):null,r.map(a=>qi(Woe,{part:a,onOpen:o},a.key))]}):null}import{HEADER_TYPE as fle,ROOT_ZONE as X2}from"efficient-easel/draw";import{HEADER_TYPE as Jo,FOOTER_TYPE as Xe,newNodeId as zoe}from"efficient-easel/draw";function _u(){return{type:Jo,props:{id:zoe(Jo)}}}var tF=[{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"}],$oe=tF.filter(e=>e.type!=="FooterLogo"&&e.type!=="FooterGroup"),Goe="FooterGroup",rF="blocks";function aF(e){return e===Xe?tF:e===Goe?$oe:null}function Au(){let e=(o,t)=>({type:o,props:{id:`${o}-${crypto.randomUUID()}`,...t}});return[e("FooterLogo",{widthPct:100,align:"left",tagline:""}),e("FooterEmailSignup",{...D0}),e("FooterPayment",{...gf})]}function Vy(e){switch(e?.type){case Ye:case We:return i("On every page");case Jo:case Xe:return i("On every page \xB7 old style");default:return null}}var nF=()=>null,sF=()=>i("Changed on every page");function Lu(e,o){let t=mk(e,o);if(t)return t;let r=cT(e,o);if(!r)return null;let a=r.group===Ye;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 Em,Fragment as Gse,jsxs as jse}from"react/jsx-runtime";import{useState as Kse}from"react";import{createNode as Vse,newId as qse}from"efficient-easel/data";import{useEasel as Yse}from"efficient-easel/easel";import{Banner as Xse,Button as bw}from"efficient-shell/ui";import{useScreenDocument as Zse}from"efficient-easel/screen/components/ScreenDocumentContext";import{isNodeList as joe}from"efficient-easel/data";import{hiddenKeyOf as Koe}from"efficient-easel/screen/lib/content/view-hide";var Ru="Flex",Voe={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock"},qoe={FooterPayment:"PaymentLogosBlock"},Yoe=e=>{let{id:o,...t}=e;return t},lF=e=>typeof e=="string"?e:"",Xs={sm:12,md:13,lg:15},iF={sm:{mark:16,words:Xs.sm},md:{mark:20,words:Xs.md}},Xoe="md",dF=1.5,Zoe={size:13,lineHeight:dF,width:280},Joe=14,Qoe=40,ete=e=>e==="center"||e==="right"?e:"left";function ote(e){let o={},t=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(let[r,a]of t){let n=q(e[r]);n&&(o[a]=n)}return o}function tte(e,o,t){let r=t(e,Yoe(o));if(Array.isArray(o.template))return{...r,props:{...r.props,template:cF(o.template,String(r.props.id))}};if(o.template!==void 0)return r;let a=kv(e,r.props);return a===r.props?r:{...r,props:a}}function cF(e,o,t={at:0}){return e.map(r=>{let a={...r.props,id:`${o}~t${t.at++}`};for(let[n,s]of Object.entries(a))joe(s)&&(a[n]=cF(s,o,t));return{...r,props:a}})}function fF(e,o,t){let r=e.props??{},a=t?.(e,o);if(a)return a;let n=j(Voe,e.type)??j(qoe,e.type);if(n)return[tte(n,r,o)];switch(e.type){case"FooterLogo":{let s=ete(r.align),l=o("LogoBlock",{...r.reverse?{reverse:r.reverse}:{},...typeof r.customColor=="string"&&r.customColor?{customColor:r.customColor}:{},heightPx:Math.round(Ok*((q(r.widthPct)??100)/100)),href:"/",align:s,...ote(r)}),d=lF(r.tagline).trim();return d?[l,o("Text",{text:d,tone:"dim",align:s,_partStyles:{text:{...Zoe}}})]:[l]}case"FooterText":{let s=typeof r.size=="string"&&$e(Xs,r.size)?r.size:Xoe;return[o("Text",{text:lF(r.text),tone:typeof r.tone=="string"?r.tone:"default",_partStyles:{text:{size:Xs[s],lineHeight:dF}}})]}case"FooterDivider":{let s=q(r.thickness),l=q(r.lengthPct);return[o("Divider",{...s!==void 0?{thickness:s}:{},...l!==void 0?{lengthPct:l}:{},...r.hideOnMobile===!0?{[Koe("mobile")]:!0}:{}})]}case"FooterGroup":{let s=Array.isArray(r.blocks)?r.blocks:[];return[o(Ru,{direction:r.direction==="horizontal"?"row":"column",gap:Ka("FooterGroup",r.gap),align:r.align==="center"||r.align==="end"||r.align==="stretch"?r.align:"start",...hh,content:s.flatMap(l=>fF(l,o,t))})]}default:return[]}}function Yi(e,o,t,r){let a=e&&Array.isArray(e.props?.blocks)?e.props.blocks:[],n=f=>o(Ru,{direction:"row",wrap:!0,share:"equal",gap:Qoe,content:f}),s=[],l=[];for(let f of a){let u=fF(f,o,r);if(f.type==="FooterDivider"){l.length&&s.push(n(l)),l=[],s.push(...u);continue}u.length<=1?l.push(...u):l.push(o(Ru,{direction:"column",gap:Joe,align:"stretch",...hh,content:u}))}(l.length||!s.length)&&s.push(n(l));let d=o(Ru,{direction:"column",content:[o("LegalLineBlock")]}),c=lT(We,t,[...s,d]);return{...c,props:{...c.props,...e?.props?.width==="full"?{fullWidth:!0}:{}}}}import{isNodeList as zse}from"efficient-easel/data";import{readHidable as ate}from"efficient-easel/draw";function Fu(e,o,t){let r=[];return e.forEach((a,n)=>{let s=o(a),l=r.find(d=>d.key===s);l||(l={key:s,name:t(a),items:[]},r.push(l)),l.items.push({item:a,index:n})}),r}function TNe(e){return rte[Xi(e)]}var rte={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"};function Xi(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 cr=oe,fr=He;function yn(e){if(e.theme)return xo(e.theme);let o=e.site?.themePresets;return o?xo({selected:e.site?.selectedPreset??0,themes:[...o]}):void 0}function nte(e,o){return o===0?`${e}~box`:`${e}~box-${o+1}`}var uF=new Set(["id"]),bn={},mF=[],ste={ProductGrid:["ProductColour","ProductEyebrow","ProductName","ProductPicture","ProductPrice","ProductRef","ProductSpecs"],Events:[],Collections:["CollectionCard"],GalleryB:["GalleryItem"],ContactRouting:[],ReviewForm:[],AppointmentBooking:["BookingBox"],Reviews:["RatingBlock"],CheckoutCTA:[],AlloyWheelsListing:["ProductBuy","ProductColour","ProductEyebrow","ProductName","ProductPicture","ProductPrice","ProductSpecs"],SpecTable:["EuTyreLabelBlock","WheelDiagram"]},lte=Object.keys(ste),Zi=["Breadcrumb","DocBody","Form","SubmitBuild","Footprint","FAQ","ProcessSteps",...lte,"Stats","Logos","PaymentBadges","PaymentLogosBlock","FitmentFinder","DocMasthead","DocTabs","Timeline","TimelineTrack","OrderSummary","Chart","Mockup","Countdown","FeaturedCover","SectionHeader","TitleWithButtons","Prose","ParagraphsA","Banner","Cards"];function Co(e){for(let[o,t]of Object.entries(e)){if($e(bn,o)&&j(bn,o)!==t)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);bn[o]=t}}function ca(e){return j(bn,e)}function ite(e){return $e(bn,e)&&mF.includes(e)}function hF(e,o=Zi){return $e(bn,e)&&(o.includes(e)||ite(e))}function NNe(e){let o=j(kr,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 qy=e=>ate(e),Qe=e=>qy(e).text.trim()!=="";function dte(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 cte=e=>e==="heading"?jr():e==="eyebrow"?vr():{};function fte(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 pte(e,o){if(e===void 0)return{};if(typeof e=="string")return{variant:e};let t=o[e.key];return{variant:(typeof t=="string"?j(e.map,t):void 0)??e.fallback}}function pF(e,o,t,r,a={}){let n={...o};for(let s of e){let[l,d,c]=typeof s=="string"?[s,s,void 0]:s;if(t[l]===void 0)continue;let f=c?c(t[l],t,a):t[l];f===void 0?delete n[d]:n[d]=f,r(l,d,f===void 0)}return n}function ute(e){let o=new Set([...uF,"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":if(n.keep!=="rest"&&n.keep.forEach(s=>o.add(s)),Object.keys(n.rename??{}).forEach(s=>o.add(s)),n.derive?.reads.forEach(s=>o.add(s)),typeof n.slots!="function")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}var Yy=e=>Iv(e.headPlacement)==="own-box";function mte(e){return Yy(e)?"its head sits in a Box of its own above it (own-box): the row draws the head inline":void 0}function hte(e,o){let t=e[o];return Array.isArray(t)&&t.some(r=>!!r&&typeof r=="object"&&typeof r.type=="string")?"already on the Box path: its items draw from a filled card template":void 0}function xte(e){let o=new Set,t=r=>{for(let a of r)if(a.kind==="group"||a.kind==="block")t(a.parts??[]);else if(a.kind==="core"&&a.slots&&typeof a.slots!="function")for(let[n,s]of Object.entries(a.slots))s.length>0&&s.every(l=>!("kind"in l))&&o.add(n)};for(let r of[e,...e.also??[]])t(r.parts);return[...o]}function Ite(e,o,t){if(!t.press)for(let r of xte(e)){let a=hte(o,r);if(a!==void 0)return a}}function Zs(e,o,t={}){let r=e.props,a=(o.ownBoxConverts?void 0:mte(r))??Ite(o,r,t)??o.skip?.(r);if(a!==void 0)return{node:e,nodes:[e],carried:[],dropped:[],siteWrites:[],skipped:a};let n=String(r.id??e.type),s=[],l=[],d=new Set,c=(b,P)=>{s.push({key:b,home:P}),d.add(b)},f=r._partStyles??{},u=ute(o),p=0,h=(b,P)=>({type:b,props:{...P,id:`${n}~${b}-${++p}`}}),I=(b,P,H,E,U,O,D)=>{if(U){for(let _ of b??[]){let A=typeof _=="string"?_:_[0];H[A]!==void 0&&D(A,`nothing \u2014 the ${E} has no parts, so it is not drawn`)}return}let v=typeof P=="function"?P(r,t):P??{};return pF(b??[],v,H,(_,A,F)=>D(_,F?`nothing \u2014 the old value draws nothing (${E}: no ${A})`:`${O}${E}: ${A}`),t)},g=b=>Gn(b,P=>`${n}~${P}-${++p}`),C=(b,P,H)=>{let E=b.of?b.of(P):Array.isArray(P[b.key])?P[b.key]:[],U=typeof b.props=="function"?b.props(r,t):b.props??{},O=E.map((F,z)=>{let $=F??{},X=b.item?.($,z,r)??{},Q=w(X.reverse?[...b.parts].reverse():b.parts,$,!1,`item ${z+1}: `);return b.flat?X.props?Q.map(Fe=>({...Fe,props:{...Fe.props,...X.props,id:Fe.props.id}})):Q:[h(cr,{name:`${b.name} ${z+1}`,...U,...X.props??{},[fr]:Q})]});if(b.groups){let F=b.groups;return H(b.key,E.length?`one Box per item (${E.length}), in a Box per group`:"nothing \u2014 the list is empty"),Fu(E.map(z=>z??{}),F.of,F.of).map((z,$)=>{let X=z.items.map(ge=>ge.item),Q=F.parts?w(F.parts,F.head?.(X,r)??{},!1,`group ${$+1}: `):[],Fe=z.items.map(ge=>O[ge.index]),Oe=F.perRow?.(X.length,r),ze=Number.isInteger(Oe)&&Oe>=1?Oe:1,Ke=[];if(F.perRow&&ze<Fe.length)for(let ge=0;ge*ze<Fe.length;ge++)Ke.push(Fe.slice(ge*ze,(ge+1)*ze).flat());return h(cr,{name:`${F.name} ${$+1}`,...F.props??{},[fr]:[...Q,h(cr,{name:`${F.itemsName} ${$+1}`,...F.itemsProps?.(X.length,r)??{},[fr]:Ke.length?Ke.map((ge,Te)=>h(cr,{name:`${F.rowName??`${F.itemsName} row`} ${Te+1}`,...F.rowProps??{},[fr]:ge})):Fe.flat()})]})})}let D=b.perRow?.(r),v=b.perRow?Number.isInteger(D)&&D>=1?D:1:0;if(H(b.key,(E.length?b.flat?`each item's parts (${E.length} items), in order`:`one Box per item (${E.length}), its parts inside`:"nothing \u2014 the list is empty")+(v&&E.length?`, in rows of ${v}`:"")),!v)return O.flat();let _=typeof b.rowProps=="function"?b.rowProps(r,t):b.rowProps??{},A=[];for(let F=0;F*v<O.length;F++){let z=O.slice(F*v,(F+1)*v).flat(),$=b.rowFiller?v-O.slice(F*v,(F+1)*v).length:0;A.push(h(cr,{name:`${b.rowName??`${b.name} row`} ${F+1}`,..._,[fr]:[...z,...Array.from({length:$},(X,Q)=>h(cr,{name:`Empty ${Q+1}`,...b.rowFiller,[fr]:[]}))]}))}return A},w=(b,P,H,E)=>{let U=[],O=(v,_)=>H?c(v,_):void 0,D=v=>H?f[v]:void 0;for(let v of b)if(!(v.when&&!v.when(r,H?void 0:P)))switch(v.kind){case"text":{let _=qy(P[v.key]);if(!_.text.trim()&&!(H&&t.press&&o.pressKeepsEmpty?.includes(v.key))){O(v.key,"nothing \u2014 empty words draw nothing, so no block");break}let A=cte(v.role??"body"),{_partStyles:F,...z}=A,$=fte(A,v.styleFrom?{...v.style,...v.styleFrom(r,t)}:v.style,D(v.key),v.props?.align);U.push(h("Text",{text:v.mark==="accentLead"?dte(_.text):v.mark==="accentItalic"?Sl(_.text):_.text,...z,...v.props??{},...$,..._.hidden?{_hidden:!0}:{}})),O(v.key,`${E}Text block: its words${_.hidden?", hidden":""}`);break}case"button":{let _=qy(P[v.key]);if(!_.text.trim()){O(v.key,"nothing \u2014 no words, no button"),O(v.href,"nothing \u2014 no button to link"),typeof v.variant=="object"&&O(v.variant.key,"nothing \u2014 no button to style");break}let A=typeof P[v.href]=="string"&&P[v.href]?P[v.href]:"#",F={...v.style??{},...D(v.key)??{}};U.push(h("ButtonBlock",{label:_.text,href:A,...typeof v.props=="function"?v.props(P,t):v.props??{},...pte(v.variant,P),...Object.keys(F).length?{_partStyles:{label:F}}:{},..._.hidden?{_hidden:!0}:{}})),O(v.key,`${E}Button block: its words`),O(v.href,`${E}Button block: its link`),typeof v.variant=="object"&&O(v.variant.key,`${E}Button block: its Style`);break}case"image":{let _=P[v.key];if(typeof _!="string"||!_){O(v.key,"nothing \u2014 no picture, no block"),v.alt&&O(v.alt,"nothing \u2014 no picture to describe");break}let A=v.alt&&typeof P[v.alt]=="string"?P[v.alt]:"";U.push(h("ImageBlock",{src:_,alt:A,...v.props??{}})),O(v.key,`${E}Image block: its picture`),v.alt&&O(v.alt,`${E}Image block: its alt text`);break}case"list":{U.push(...C(v,P,O));break}case"group":{let _=w(v.parts,P,H,E),A=I(v.box,v.props,P,`${v.name} Box`,!_.length&&!v.keepEmpty,E,O);A&&U.push(h(cr,{name:v.name,...A,[fr]:_}));break}case"block":{let _=v.parts?w(v.parts,P,H,E):[],A=I(v.box,v.props,P,`${v.type} block`,!!v.parts&&!_.length&&!v.keepEmpty,E,O);A&&U.push(h(v.type,{...A,...v.slot?{[v.slot]:_}:{}}));break}case"core":{let _=v.as??e.type,A={...v.headless?{}:{headPlacement:"own-box"},...v.props??{}},F=v.keep==="rest"?Object.keys(P).filter($=>!u.has($)&&!($ in A)):v.keep;for(let $ of F)P[$]!==void 0&&(A[$]=P[$],O($,`the ${_} block inside the Box`));if(v.keep==="rest"){for(let X of Object.keys(v.props??{}))P[X]!==void 0&&!u.has(X)&&O(X,`nothing \u2014 the ${_} block inside the Box has the row's own value`);P.headPlacement!==void 0&&O("headPlacement",`the ${_} block inside the Box: own-box`);let $=Object.fromEntries(Object.entries(f).filter(([X])=>!u.has(X)));Object.keys($).length&&(A._partStyles=$)}for(let[$,X]of Object.entries(v.rename??{}))P[$]!==void 0&&(A[X]=P[$],O($,`the ${_} block inside the Box: ${X}`));if(v.derive){Object.assign(A,v.derive.props(P,t));for(let $ of v.derive.reads)P[$]!==void 0&&O($,`the ${_} block inside the Box`)}let z=typeof v.slots=="function"?v.slots(P,t):v.slots??{};for(let[$,X]of Object.entries(z))A[$]=X.flatMap(Q=>"kind"in Q?C(Q,P,O):g([Q]));U.push(h(_,A));break}}return U},T=(b,P)=>{let H=P===0?"Box":`${b.name} Box`,E=w(b.parts,r,!0,P===0?"":`${H}: `),U=typeof b.boxProps=="function"?b.boxProps(r,t):b.boxProps??{},O=pF(b.box??[],U,r,(D,v,_)=>c(D,_?`nothing \u2014 the old value draws nothing (${H}: no ${v})`:`${H}: ${v}`),t);return{type:cr,props:{name:b.name,...O,[fr]:E,id:nte(n,P)}}},y=[o,...o.also??[]].map(T);r._partStyles!==void 0&&c("_partStyles","each old part's style moved to its new part");for(let[b,P]of Object.entries(o.reads??{}))r[b]!==void 0&&c(b,P);for(let[b,P]of Object.entries(o.drop??{}))b in r&&(l.push({key:b,why:P}),d.add(b));for(let b of Object.keys(r))uF.has(b)||d.has(b)||l.push({key:b,why:"not in the row \u2014 not carried"});return{node:y[0],nodes:y,carried:s,dropped:l,siteWrites:[...o.site?.(e,t)??[]]}}function xF(e,o=mF,t={}){if(!Array.isArray(e))return[];let r=[];return e.forEach((a,n)=>{let s=a&&typeof a.type=="string"&&o.includes(a.type)?j(bn,a.type):void 0;if(!s)return;let l=Zs(a,s,t);l.skipped===void 0&&r.push({index:n,node:l.node,nodes:l.nodes})}),r}import{BLOCK_FIXED_WIDTH as Cte,BLOCK_SIZE_KEYS as vte,parseBlockWidthFit as Du,phoneKey as gF,parseTextFit as Bu,tabletKey as bF,viewKeyAt as yF}from"efficient-easel/draw";import{sideLengthAt as kte}from"efficient-easel/screen/lib/content/length-units";import{VIEW_DESKTOP_MIN as gte,VIEW_TABLET_MIN as bte}from"efficient-easel/screen/lib/content/view-tiers";var Dr={fit:"data-fit",fitTablet:"data-fit-tablet",fitPhone:"data-fit-phone",min:"data-fit-min",minTablet:"data-fit-min-tablet",minPhone:"data-fit-min-phone",edge:"data-fit-edge"},it=Dr,yte=e=>e.flatMap(o=>[`[${o}] p`,`[${o}] li`]).join(","),Ste=String.raw`(function (doc) {
|
|
6
|
-
if (doc.__sfFitWords) return;
|
|
7
|
-
var win = doc.defaultView;
|
|
8
|
-
var SELECTOR = "h1,h2,h3,h4,h5,h6,[class*='font-heading'],[class*='font-display']";
|
|
9
|
-
// Body text a block asked to shrink (its Text group's Shrink), beside
|
|
10
|
-
// the headings: what this script may fit at all. modeOf() decides each one.
|
|
11
|
-
var SHRINK_BODY = ${JSON.stringify(yte([it.fit,it.fitTablet,it.fitPhone]))};
|
|
12
|
-
var CANDIDATES = SELECTOR + "," + SHRINK_BODY;
|
|
13
|
-
var MIN_SCALE = 0.3, MIN_PX = 16, SLACK = 1, PHONE_BELOW = ${Gr};
|
|
14
|
-
var TABLET_MIN = ${bte}, DESKTOP_MIN = ${gte};
|
|
15
|
-
|
|
16
|
-
// A block's own answer (lib/content/block-size, the wrapper's attributes):
|
|
17
|
-
// the fit "wrap" | "shrink" | "line" | "ellipsis" and the floor, each with a tablet and a
|
|
18
|
-
// phone twin. From 1100 the desktop's; from the tablet line (800 for a holder
|
|
19
|
-
// in a Box, marked edge; 720 outside one) the tablet's where it has one;
|
|
20
|
-
// under it the phone's, else the tablet's, else the desktop's. With no
|
|
21
|
-
// tablet answer the phone's is read under 800, as before (the edge moves with
|
|
22
|
-
// F1). With none, a heading shrinks and body text wraps, as always.
|
|
23
|
-
// A holder with any tablet attribute takes the three views (its line and 1100)
|
|
24
|
-
// for its fit AND its floor together; one with none keeps the 800 edge.
|
|
25
|
-
var TABLET_ATTRS = [${JSON.stringify(it.fitTablet)}, ${JSON.stringify(it.minTablet)}];
|
|
26
|
-
function own(el, attr, tabletAttr, phoneAttr) {
|
|
27
|
-
var holder = el.closest("[" + attr + "],[" + tabletAttr + "],[" + phoneAttr + "]");
|
|
28
|
-
if (!holder) return null;
|
|
29
|
-
var w = win.innerWidth, d = holder.getAttribute(attr);
|
|
30
|
-
if (w >= DESKTOP_MIN) return d;
|
|
31
|
-
var t = holder.getAttribute(tabletAttr), p = holder.getAttribute(phoneAttr);
|
|
32
|
-
if (w < (holder.hasAttribute(${JSON.stringify(it.edge)}) ? PHONE_BELOW : TABLET_MIN)) return p || t || d;
|
|
33
|
-
if (holder.hasAttribute(TABLET_ATTRS[0]) || holder.hasAttribute(TABLET_ATTRS[1])) return t || d;
|
|
34
|
-
return (w < PHONE_BELOW && p) || d;
|
|
35
|
-
}
|
|
36
|
-
function modeOf(el) {
|
|
37
|
-
var mode = own(el, ${JSON.stringify(it.fit)}, ${JSON.stringify(it.fitTablet)}, ${JSON.stringify(it.fitPhone)});
|
|
38
|
-
if (mode === "wrap" || mode === "shrink") return mode;
|
|
39
|
-
// One line and Shorten (stored "ellipsis", which cuts its words with "..."):
|
|
40
|
-
// the block keeps its words at their set size, nothing shrinks.
|
|
41
|
-
if (mode === "line" || mode === "ellipsis") return "wrap";
|
|
42
|
-
return el.matches(SELECTOR) ? "shrink" : "wrap";
|
|
43
|
-
}
|
|
44
|
-
function floorOf(el, set) {
|
|
45
|
-
var raw = own(el, ${JSON.stringify(it.min)}, ${JSON.stringify(it.minTablet)}, ${JSON.stringify(it.minPhone)});
|
|
46
|
-
var min = parseFloat(raw);
|
|
47
|
-
// A Min font size in vw (block-size.ts): a share of the window's width.
|
|
48
|
-
if (/vw$/.test(String(raw))) min = min * win.innerWidth / 100;
|
|
49
|
-
return min >= 0 ? min : Math.max(set * MIN_SCALE, MIN_PX);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function measure(el) {
|
|
53
|
-
var widest = 0, current = 0, last = null, split = false, lastBlock = null;
|
|
54
|
-
function blockOf(n) {
|
|
55
|
-
for (var p = n.parentElement; p && p !== el; p = p.parentElement) {
|
|
56
|
-
var d = win.getComputedStyle(p).display;
|
|
57
|
-
if (d.indexOf("inline") !== 0 && d !== "contents") return p;
|
|
58
|
-
}
|
|
59
|
-
return el;
|
|
60
|
-
}
|
|
61
|
-
function close() { if (current > widest) widest = current; current = 0; last = null; }
|
|
62
|
-
var walker = doc.createTreeWalker(el, 5), range = doc.createRange(), node;
|
|
63
|
-
while ((node = walker.nextNode())) {
|
|
64
|
-
if (node.nodeType === 1) {
|
|
65
|
-
if (node.tagName === "BR" || node.tagName === "WBR") close();
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
var block = blockOf(node);
|
|
69
|
-
if (block !== lastBlock) close();
|
|
70
|
-
lastBlock = block;
|
|
71
|
-
var re = /(\S+)|(\s+)/g, m;
|
|
72
|
-
while ((m = re.exec(node.data))) {
|
|
73
|
-
if (m[2]) { close(); continue; }
|
|
74
|
-
range.setStart(node, m.index);
|
|
75
|
-
range.setEnd(node, m.index + m[0].length);
|
|
76
|
-
var rects = range.getClientRects();
|
|
77
|
-
for (var i = 0; i < rects.length; i++) {
|
|
78
|
-
var r = rects[i];
|
|
79
|
-
if (r.width <= 0) continue;
|
|
80
|
-
current += r.width;
|
|
81
|
-
if (last && r.top > last.top + last.height / 2) split = true;
|
|
82
|
-
last = r;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
close();
|
|
87
|
-
return { widest: widest, split: split };
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function lineWidth(el) {
|
|
91
|
-
var cs = win.getComputedStyle(el);
|
|
92
|
-
return el.getBoundingClientRect().width - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight)
|
|
93
|
-
- parseFloat(cs.borderLeftWidth) - parseFloat(cs.borderRightWidth);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// ⚠️ THE HEADING ELEMENT IS NEVER TOUCHED — no style="", no data-*. This
|
|
97
|
-
// runs before React hydrates, and React 19 in development reports ANY
|
|
98
|
-
// attribute that differs from what it rendered ("a tree hydrated but some
|
|
99
|
-
// attributes didn't match"): first our inline font-size on the hero (which
|
|
100
|
-
// React owns via --heading-size), then, when that moved to a data-sf-fit
|
|
101
|
-
// attribute, the attribute itself. So the fitted size lives only in this
|
|
102
|
-
// script's own stylesheet, in <head>, addressed to each heading by its
|
|
103
|
-
// POSITION (":root>*:nth-child(2)>…"). A position goes stale when the page's
|
|
104
|
-
// structure changes, so the rules are rewritten in the MutationObserver
|
|
105
|
-
// callback, which runs before the next paint. !important so the size also
|
|
106
|
-
// beats a part's own inline size.
|
|
107
|
-
var head = doc.head || doc.documentElement;
|
|
108
|
-
var fitEl = doc.createElement("style");
|
|
109
|
-
fitEl.id = "storefront-fit-words-sizes";
|
|
110
|
-
head.appendChild(fitEl);
|
|
111
|
-
// heading -> [[element, fitted size]]: the heading and each Text part inside
|
|
112
|
-
// it that holds its own size (a span [data-sf-part-styled]), e.g.
|
|
113
|
-
// [[h2, "43.8px"], [span, "43.8px"]]. Sizing the heading alone leaves such
|
|
114
|
-
// a part at its own size, and the word still breaks (card C25, Spec Table).
|
|
115
|
-
var fitted = new Map();
|
|
116
|
-
|
|
117
|
-
function pathOf(el) {
|
|
118
|
-
var parts = [];
|
|
119
|
-
for (var e = el; e && e.parentElement; e = e.parentElement) {
|
|
120
|
-
var i = 1, s = e;
|
|
121
|
-
while ((s = s.previousElementSibling)) i++;
|
|
122
|
-
parts.unshift("*:nth-child(" + i + ")");
|
|
123
|
-
}
|
|
124
|
-
return ":root>" + parts.join(">");
|
|
125
|
-
}
|
|
126
|
-
function writeRules() {
|
|
127
|
-
var css = "";
|
|
128
|
-
fitted.forEach(function (sizes, el) {
|
|
129
|
-
if (!el.isConnected) { fitted.delete(el); return; }
|
|
130
|
-
for (var i = 0; i < sizes.length; i++) css += pathOf(sizes[i][0]) + "{font-size:" + sizes[i][1] + " !important}";
|
|
131
|
-
});
|
|
132
|
-
if (fitEl.textContent !== css) fitEl.textContent = css;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
function unfit(el) {
|
|
136
|
-
if (fitted.delete(el)) writeRules();
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
function fits(el) {
|
|
140
|
-
var m = measure(el);
|
|
141
|
-
return !m.split && m.widest <= lineWidth(el) + SLACK;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function fit(el) {
|
|
145
|
-
unfit(el);
|
|
146
|
-
if (modeOf(el) !== "shrink") return; // the block's own Wrap
|
|
147
|
-
if (lineWidth(el) <= 0) return; // hidden, or not laid out yet
|
|
148
|
-
if (fits(el)) return;
|
|
149
|
-
var set = parseFloat(win.getComputedStyle(el).fontSize);
|
|
150
|
-
if (!set) return;
|
|
151
|
-
var floor = floorOf(el, set);
|
|
152
|
-
if (floor >= set) return;
|
|
153
|
-
function size(px) { return Math.floor(px * 10) / 10 + "px"; }
|
|
154
|
-
// The SEARCH tries sizes on the element's own style and then puts that
|
|
155
|
-
// attribute back byte for byte (or removes it, if it had none), so nothing
|
|
156
|
-
// is left for React to see. A trial in a stylesheet instead restyles the
|
|
157
|
-
// whole page per step: a full pass on the Hartes home took 75–160ms at 4x
|
|
158
|
-
// CPU that way.
|
|
159
|
-
// Every trial scales the heading AND each part inside it that holds its
|
|
160
|
-
// own size, by the same ratio, so a part keeps its proportion to the
|
|
161
|
-
// heading.
|
|
162
|
-
var carriers = [el].concat(Array.prototype.slice.call(el.querySelectorAll("[data-sf-part-styled]")));
|
|
163
|
-
var base = carriers.map(function (c) { return parseFloat(win.getComputedStyle(c).fontSize) || set; });
|
|
164
|
-
var saved = carriers.map(function (c) { return c.hasAttribute("style") ? c.getAttribute("style") : null; });
|
|
165
|
-
function attempt(px) {
|
|
166
|
-
for (var i = 0; i < carriers.length; i++) carriers[i].style.setProperty("font-size", size(base[i] * px / set), "important");
|
|
167
|
-
}
|
|
168
|
-
function done() {
|
|
169
|
-
for (var i = 0; i < carriers.length; i++) {
|
|
170
|
-
if (saved[i] !== null) carriers[i].setAttribute("style", saved[i]); else carriers[i].removeAttribute("style");
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
attempt(floor);
|
|
174
|
-
if (!fits(el)) { done(); return; } // even the floor does not fit: leave it as set
|
|
175
|
-
var lo = floor, hi = set;
|
|
176
|
-
for (var i = 0; i < 8; i++) {
|
|
177
|
-
var mid = (lo + hi) / 2;
|
|
178
|
-
attempt(mid);
|
|
179
|
-
if (fits(el)) lo = mid; else hi = mid;
|
|
180
|
-
}
|
|
181
|
-
done();
|
|
182
|
-
fitted.set(el, carriers.map(function (c, i) { return [c, size(base[i] * lo / set)]; }));
|
|
183
|
-
writeRules();
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// What each heading measured right after we last fitted it, so the
|
|
187
|
-
// ResizeObserver below can tell a real change (a font swap, a rotate, a
|
|
188
|
-
// container that moved) from the size change our own write just caused.
|
|
189
|
-
var seen = new WeakMap();
|
|
190
|
-
function remember(el) {
|
|
191
|
-
var b = el.getBoundingClientRect();
|
|
192
|
-
seen.set(el, b.width + "x" + b.height);
|
|
193
|
-
}
|
|
194
|
-
function fitAndRemember(el) { fit(el); remember(el); }
|
|
195
|
-
|
|
196
|
-
// ⚠️ A ResizeObserver, NOT fonts.ready or a resize event, and the reason is
|
|
197
|
-
// WHEN it runs: after layout, BEFORE paint. The web font arriving re-wraps a
|
|
198
|
-
// fitted heading, and fonts.ready resolves only after that frame is painted —
|
|
199
|
-
// measured on the Hartes hero: a 42px jump in 2 of 3 loads. A size change
|
|
200
|
-
// reported here is fitted in the same frame, so the broken state is never
|
|
201
|
-
// drawn. It also covers a container that resizes.
|
|
202
|
-
var ro = new win.ResizeObserver(function (entries) {
|
|
203
|
-
for (var i = 0; i < entries.length; i++) {
|
|
204
|
-
var el = entries[i].target;
|
|
205
|
-
var b = el.getBoundingClientRect();
|
|
206
|
-
if (seen.get(el) === b.width + "x" + b.height) continue; // our own write
|
|
207
|
-
fitAndRemember(el);
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
// Its own set, not seen: fitAndRemember has written seen by the
|
|
211
|
-
// time watch runs, so a seen test observed no heading at all, and a
|
|
212
|
-
// heading fitted in the fallback face was never fitted again when the web
|
|
213
|
-
// font arrived (hartesmetal.com.au, "FusionForge." with its "." alone).
|
|
214
|
-
var watched = new WeakSet();
|
|
215
|
-
function watch(el) { if (!watched.has(el)) { watched.add(el); ro.observe(el); } }
|
|
216
|
-
|
|
217
|
-
function fitAll() {
|
|
218
|
-
var els = doc.querySelectorAll(CANDIDATES);
|
|
219
|
-
for (var i = 0; i < els.length; i++) {
|
|
220
|
-
if (modeOf(els[i]) === "shrink") { fitAndRemember(els[i]); watch(els[i]); }
|
|
221
|
-
else unfit(els[i]); // Wrap here (a phone value may differ from the desktop's)
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
var queued = 0, all = false, touched = new Set();
|
|
226
|
-
function run() {
|
|
227
|
-
queued = 0;
|
|
228
|
-
if (all) { all = false; touched.clear(); fitAll(); return; }
|
|
229
|
-
var els = Array.from(touched);
|
|
230
|
-
touched.clear();
|
|
231
|
-
for (var i = 0; i < els.length; i++) {
|
|
232
|
-
if (!els[i].isConnected) continue;
|
|
233
|
-
if (modeOf(els[i]) === "shrink") { fitAndRemember(els[i]); watch(els[i]); }
|
|
234
|
-
else unfit(els[i]);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
function schedule() { if (!queued) queued = win.requestAnimationFrame(run); }
|
|
238
|
-
function scheduleAll() { all = true; schedule(); }
|
|
239
|
-
|
|
240
|
-
fitAll();
|
|
241
|
-
// A backstop only: a font that changes widths without changing any
|
|
242
|
-
// heading's box is not seen by the ResizeObserver.
|
|
243
|
-
if (doc.fonts && doc.fonts.ready) doc.fonts.ready.then(scheduleAll, function () {});
|
|
244
|
-
|
|
245
|
-
// …and the viewport WIDTH, which the ResizeObserver cannot stand in for: a
|
|
246
|
-
// heading sized to its own text (fit-content, a flex item) keeps the SAME box
|
|
247
|
-
// when the phone turns to 844, so nothing reports a change and it would stay
|
|
248
|
-
// shrunk. The probe's rotate check caught exactly that.
|
|
249
|
-
var lastWidth = win.innerWidth;
|
|
250
|
-
function onResize() {
|
|
251
|
-
if (win.innerWidth === lastWidth) return; // a phone's toolbar changing HEIGHT is not our business
|
|
252
|
-
lastWidth = win.innerWidth;
|
|
253
|
-
scheduleAll();
|
|
254
|
-
}
|
|
255
|
-
win.addEventListener("resize", onResize);
|
|
256
|
-
|
|
257
|
-
var mo = new win.MutationObserver(function (records) {
|
|
258
|
-
// Positions first: a node added or removed anywhere can shift the
|
|
259
|
-
// nth-child path of a fitted heading, and this callback runs before paint.
|
|
260
|
-
if (fitted.size) {
|
|
261
|
-
for (var q = 0; q < records.length; q++) if (records[q].type === "childList") { writeRules(); break; }
|
|
262
|
-
}
|
|
263
|
-
for (var i = 0; i < records.length; i++) {
|
|
264
|
-
var r = records[i];
|
|
265
|
-
// A block's text fit (Wrap / Shrink / One line) or Min font size changed in the editor:
|
|
266
|
-
// only a data-fit attribute moved, so every heading is measured again.
|
|
267
|
-
if (r.type === "attributes") { scheduleAll(); continue; }
|
|
268
|
-
var target = r.target.nodeType === 1 ? r.target : r.target.parentElement;
|
|
269
|
-
var owner = target && target.closest(CANDIDATES);
|
|
270
|
-
if (owner) touched.add(owner);
|
|
271
|
-
for (var j = 0; j < r.addedNodes.length; j++) {
|
|
272
|
-
var n = r.addedNodes[j];
|
|
273
|
-
if (n.nodeType !== 1) continue;
|
|
274
|
-
if (n.matches(CANDIDATES)) touched.add(n);
|
|
275
|
-
var inner = n.querySelectorAll(CANDIDATES);
|
|
276
|
-
for (var k = 0; k < inner.length; k++) touched.add(inner[k]);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
if (touched.size) schedule();
|
|
280
|
-
});
|
|
281
|
-
mo.observe(doc.body, {
|
|
282
|
-
childList: true,
|
|
283
|
-
subtree: true,
|
|
284
|
-
characterData: true,
|
|
285
|
-
attributes: true,
|
|
286
|
-
attributeFilter: ${JSON.stringify(Object.values(it))},
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
doc.__sfFitWords = function stop() {
|
|
290
|
-
win.removeEventListener("resize", onResize);
|
|
291
|
-
ro.disconnect();
|
|
292
|
-
mo.disconnect();
|
|
293
|
-
if (queued) win.cancelAnimationFrame(queued);
|
|
294
|
-
fitted.clear();
|
|
295
|
-
fitEl.remove();
|
|
296
|
-
delete doc.__sfFitWords;
|
|
297
|
-
};
|
|
298
|
-
// For the probe and for debugging: which headings are fitted, at what size,
|
|
299
|
-
// and the sheet that holds it (disable it to read a heading's set size).
|
|
300
|
-
doc.__sfFitWords.fitted = fitted;
|
|
301
|
-
doc.__sfFitWords.sheet = fitEl;
|
|
302
|
-
// …and the two questions a block's own answer changes, for the guard
|
|
303
|
-
// (scripts/test-block-size.tsx §5): which mode an element is in, and its floor.
|
|
304
|
-
doc.__sfFitWords.modeOf = modeOf;
|
|
305
|
-
doc.__sfFitWords.floorOf = floorOf;
|
|
306
|
-
})(document);`,wte="storefront-fit-words";function IF(e){let o=e.createElement("script");return o.id=wte,o.textContent=Ste,(e.head??e.documentElement).appendChild(o),()=>{e.__sfFitWords?.(),o.remove()}}var Tte="sf-block-size",Ji=["width","minWidth","maxWidth"],Nu=e=>`${e}Unit`,fa=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0?e:void 0,Pte={desktop:{fill:"view-wide:w-full view-wide:[.flex-row>&]:grow",fixed:"view-wide:w-[min(var(--sf-bw),100%)] view-wide:basis-auto! view-wide:grow-0! view-wide:shrink-0"},phone:{fill:"max-view-wide:w-full",fixed:"max-view-wide:w-[min(var(--sf-bw-p),100%)] max-view-wide:basis-auto! max-view-wide:grow-0! max-view-wide:shrink-0"}},vF={desktop:{fill:"view-desktop:w-full view-desktop:[.flex-row>&]:grow",fixed:"view-desktop:w-[min(var(--sf-bw),100%)] view-desktop:basis-auto! view-desktop:grow-0! view-desktop:shrink-0"},tablet:{fill:"view-wide:max-view-desktop:w-full view-wide:max-view-desktop:[.flex-row>&]:grow",fixed:"view-wide:max-view-desktop:w-[min(var(--sf-bw-t),100%)] view-wide:max-view-desktop:basis-auto! view-wide:max-view-desktop:grow-0! view-wide:max-view-desktop:shrink-0"},phone:{fill:"max-view-wide:w-full",fixed:"max-view-wide:w-[min(var(--sf-bw-p),100%)] max-view-wide:basis-auto! max-view-wide:grow-0! max-view-wide:shrink-0"}},Ete={desktop:vF.desktop,tablet:{fill:"view-tablet:max-view-desktop:w-full view-wide:max-view-desktop:[.flex-row>&]:grow",fixed:"view-tablet:max-view-desktop:w-[min(var(--sf-bw-t),100%)] view-tablet:max-view-desktop:basis-auto! view-tablet:max-view-desktop:grow-0! view-tablet:max-view-desktop:shrink-0"},phone:{fill:"max-view-tablet:w-full",fixed:"max-view-tablet:w-[min(var(--sf-bw-p),100%)] max-view-tablet:basis-auto! max-view-tablet:grow-0! max-view-tablet:shrink-0"}},Ote={two:{desktop:"view-wide:[.flex-row>*>&]:grow"},three:{desktop:"view-desktop:[.flex-row>*>&]:grow",tablet:"view-wide:max-view-desktop:[.flex-row>*>&]:grow"}},_te={desktop:"--sf-bw",tablet:"--sf-bw-t",phone:"--sf-bw-p"},Ate={fill:"data-sf-width-fill",fixed:"data-sf-width-fixed"},Lte="data-sf-min-width",SF={two:{desktop:"wide",phone:Uh.phone},three:Uh},Rte={minWidth:{desktop:["--sf-bmin","view-wide:min-w-[var(--sf-bmin)]!"],phone:["--sf-bmin-p","max-view-wide:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:["--sf-bmax","view-wide:max-w-[var(--sf-bmax)]"],phone:["--sf-bmax-p","max-view-wide:max-w-[var(--sf-bmax-p)]"]}},Xy={minWidth:{desktop:["--sf-bmin","view-desktop:min-w-[var(--sf-bmin)]!"],tablet:["--sf-bmin-t","view-wide:max-view-desktop:min-w-[var(--sf-bmin-t)]!"],phone:["--sf-bmin-p","max-view-wide:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:["--sf-bmax","view-desktop:max-w-[var(--sf-bmax)]"],tablet:["--sf-bmax-t","view-wide:max-view-desktop:max-w-[var(--sf-bmax-t)]"],phone:["--sf-bmax-p","max-view-wide:max-w-[var(--sf-bmax-p)]"]}},Fte={minWidth:{desktop:Xy.minWidth.desktop,tablet:["--sf-bmin-t","view-tablet:max-view-desktop:min-w-[var(--sf-bmin-t)]!"],phone:["--sf-bmin-p","max-view-tablet:min-w-[var(--sf-bmin-p)]!"]},maxWidth:{desktop:Xy.maxWidth.desktop,tablet:["--sf-bmax-t","view-tablet:max-view-desktop:max-w-[var(--sf-bmax-t)]"],phone:["--sf-bmax-p","max-view-tablet:max-w-[var(--sf-bmax-p)]"]}},Bte=["widthFit",...Ji],wF={desktop:"view-wide:whitespace-nowrap view-wide:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"},Zy={desktop:"view-desktop:whitespace-nowrap view-desktop:[&_*]:whitespace-nowrap!",tablet:"view-wide:max-view-desktop:whitespace-nowrap view-wide:max-view-desktop:[&_*]:whitespace-nowrap!",phone:"max-view-wide:whitespace-nowrap max-view-wide:[&_*]:whitespace-nowrap!"},Dte={desktop:Zy.desktop,tablet:"view-tablet:max-view-desktop:whitespace-nowrap view-tablet:max-view-desktop:[&_*]:whitespace-nowrap!",phone:"max-view-tablet:whitespace-nowrap max-view-tablet:[&_*]:whitespace-nowrap!"},kF={desktop:"view-wide:min-w-0 view-wide:[&_*]:overflow-hidden view-wide:[&_*]:text-ellipsis",phone:"max-view-wide:min-w-0 max-view-wide:[&_*]:overflow-hidden max-view-wide:[&_*]:text-ellipsis"},Nte={desktop:"view-desktop:min-w-0 view-desktop:[&_*]:overflow-hidden view-desktop:[&_*]:text-ellipsis",tablet:"view-wide:max-view-desktop:min-w-0 view-wide:max-view-desktop:[&_*]:overflow-hidden view-wide:max-view-desktop:[&_*]:text-ellipsis",phone:kF.phone},TF={desktop:"view-wide:max-w-full",phone:"max-view-wide:max-w-full"},CF={desktop:"view-desktop:max-w-full",tablet:"view-wide:max-view-desktop:max-w-full",phone:TF.phone};function VNe(e){let o=Jy(e);return o.sides.filter(t=>o.mode[t]==="fill").map(t=>Ote[o.three?"three":"two"][t]).filter(Boolean).join(" ")}function qNe(e){let{three:o,sides:t,mode:r,lengthPerSide:a}=Jy(e),n=c=>o?SF.three[c]:SF.two[c],s={fill:[],fixed:[],min:[]},l=a("minWidth");for(let c of t){let f=r[c];(f==="fill"||f==="fixed")&&s[f].push(n(c)),l[c]!==void 0&&s.min.push(n(c))}let d={};for(let c of["fill","fixed"])s[c].length&&(d[Ate[c]]=s[c].join(" "));return s.min.length&&(d[Lte]=s.min.join(" ")),d}function Jy(e){let o=Bte.some(a=>{let n=e[a]?.tablet;return a==="widthFit"?Du(n)!==void 0:fa(n)!==void 0}),t=o?["desktop","tablet","phone"]:["desktop","phone"],r=(a,n)=>{let s=a(n?.desktop),l=o?a(n?.tablet)??s:s;return{desktop:s,tablet:l,phone:a(n?.phone)??l}};return{three:o,sides:t,perSide:r,lengthPerSide:a=>{let n=Nu(a),s={};for(let d of t)s[yF(a,Tr(d))]=fa(e[a]?.[d]),s[yF(n,Tr(d))]=e.units?.[a]?.[d];let l=d=>kte(s,{length:a},n,Tr(d),"length")??void 0;return{desktop:l("desktop"),tablet:l("tablet"),phone:l("phone")}},mode:r(Du,e.widthFit)}}function YNe(e,{atSectionLine:o=!1}={}){let t=["desktop","tablet","phone"].some(_=>Bu(e.textFit?.[_])==="ellipsis"),r=o&&!t,a=r?Ete:vF,n=r?Fte:Xy,s=r?Dte:Zy,l=[],d={},c={},{three:f,sides:u,lengthPerSide:p,mode:h}=Jy(e),I=p("width");for(let _ of u){let A=h[_];!A||A==="fit"||(l.push(f?a[_][A]:Pte[_][A]),A==="fixed"&&(d[_te[_]]=Ue(I[_]?.value??Cte.fallback,I[_]?.unit)))}for(let _ of Ji.filter(A=>A!=="width")){let A=p(_);for(let F of u){let z=A[F];if(z===void 0)continue;let[$,X]=f?n[_][F]:Rte[_][F];d[$]=Ue(z.value,z.unit),l.push(X)}}let g=Bu(e.textFit?.desktop),C=Bu(e.textFit?.phone),w=_=>{let A=fa(e.minFont?.[_]);return A===void 0?void 0:e.units?.minFont?.[_]==="vw"?`${A}vw`:String(A)},T=w("desktop"),y=w("phone"),b=Bu(e.textFit?.tablet),P=b!==g||C!==void 0?b:void 0,H=w("tablet"),E=H!==T||y!==void 0?H:void 0,U=fa(e.maxWidth?.desktop),O=fa(e.maxWidth?.tablet)??U,D={desktop:U!==void 0,tablet:O!==void 0,phone:(fa(e.maxWidth?.phone)??O)!==void 0},v=(_,A,F)=>{if(A!=="line"&&A!=="ellipsis")return;let z=_==="tablet"?void 0:_,$=(X,Q)=>F||!z?X[_]:Q[z];if(A==="line"){l.push($(s,wF));return}if(l.push($(Zy,wF)),l.push($(Nte,kF)),f&&!F&&_==="desktop")for(let X of["desktop","tablet"])D[X]||l.push(CF[X]);else D[_]||l.push($(CF,TF))};return P?(v("desktop",g,!0),v("tablet",P,!0),v("phone",C??P,!0)):(v("desktop",g,!1),v("phone",C??g,!1)),g&&(c[Dr.fit]=g),P&&(c[Dr.fitTablet]=P),C&&(c[Dr.fitPhone]=C),T!==void 0&&(c[Dr.min]=T),E!==void 0&&(c[Dr.minTablet]=E),y!==void 0&&(c[Dr.minPhone]=y),!r&&(P||E!==void 0)&&(c[Dr.edge]=""),l.length===0&&Object.keys(c).length===0?null:{className:[Tte,...l].join(" "),style:d,attrs:c}}function XNe(e){if(fa(e.maxWidth?.desktop)!==void 0)return!0;let o=Du(e.widthFit?.desktop);return o==="fill"||o==="fixed"}function ZNe(e){return["desktop","tablet","phone"].some(o=>{let t=Du(e.widthFit?.[o]);return t==="fixed"||t==="fill"||fa(e.minWidth?.[o])!==void 0})}function JNe(e){let o={};for(let t of vte){let r=e[t],a=e[bF(t)],n=e[gF(t)];(r!==void 0||a!==void 0||n!==void 0)&&(o[t]={desktop:r,tablet:a,phone:n});let s=Nu(t),l={desktop:e[s],tablet:e[bF(s)],phone:e[gF(s)]};(l.desktop!==void 0||l.tablet!==void 0||l.phone!==void 0)&&((o.units??={})[t]=l)}return o}var PF={label:"Button",defaultProps:{label:"",href:"#",variant:"primary",align:"left",contained:!0}};import{jsx as AF}from"react/jsx-runtime";import{SITE_SIDE as Mte}from"efficient-easel/screen/lib/content/length-units";var EF="sideSpace",Sn=Mte,t2e=[{value:"box",label:"Box"},{value:Sn,label:"Site"}],r2e="box",a2e="Box: on small screens the Box keeps its own side space, up to 24 px. Site: it uses the site's Side space, as the site's own sections do. It has no effect when Content is Full width.";function OF(e){return e===Sn?Sn:"box"}function n2e(e){return e===Sn?Sn:void 0}import{isNodeList as Hte}from"efficient-easel/data";var Qy=new Set(["FAQ"]);function _F(e,o){if(!Qy.has(e))return!1;let t=o.template;return typeof t=="function"?(t.blockCount??0)>0:Hte(t)}var RF={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}},FF=new Set(Object.keys(RF));function eS(e,o){return o?.innerPadding??j(RF,e)}var Mu=e=>eS(e)??{};var BF=new Set(["Flex","Text","Heading","ImageBlock"]),Ute=new Set(["Divider"]),Wte=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),LF=new Set(["ProductGrid"]);function oS(e,o,t=!1){let r=e.render;e.render=a=>{if(o?.(a))return r(a);let n=Yl({...wI(a,ql,t),sideSpace:OF(a.sideSpace)}),s=r(a);if(!n)return s;let l=f=>AF(gc,{className:f?`${n.className} ${f}`:n.className,style:n.style,children:s}),d=$h(a,{atSectionLine:!0}),c=$h(a);return d===c?l(d):AF(Ek,{line:"by-box",draw:f=>l(f?c:d)})}}var g2e={name:"sectionPadding",applies:(e,o,t)=>o.isSection(e)&&!Wte.has(e)&&!!t&&typeof t.render=="function",panel(e,o,t){let r=eS(o,e);if(r){e.fields={...e.fields,...t.sidesPaddingFields({keys:sr,unitKey:Ga,fallback:r,tablet:!0,siteSide:!0})};return}if(LF.has(o))return;let a=[sr.top,sr.bottom].filter(n=>e.fields!=null&&n in e.fields);if(a.length)throw new Error(`section-padding: ${o} declares its own ${a.join(" / ")} row; declare \`innerPadding: { top, bottom }\` in its meta and the one Padding row draws on its band`);e.fields={...e.fields,...t.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,o){if(!eS(o,e)){if(LF.has(o)){oS(e);return}BF.has(o)||Ute.has(o)||oS(e,o==="Flex"?t=>Rx(t.bgImage):Qy.has(o)?t=>_F(o,t):void 0,!0)}}},zte=["Heading","Text","ImageBlock"],$te=["LogoBlock"],b2e={name:"blockPadding",applies:(e,o,t)=>(zte.includes(e)||$te.includes(e))&&!!t&&typeof t.render=="function",panel(e,o,t){e.fields={...e.fields,...t.sidesPaddingFields({tablet:!0,siteSide:!0})}},draw(e,o){BF.has(o)||oS(e,void 0,!0)}};import{parseHexColor as Gte}from"efficient-shell/format";import{convertLength as jte}from"efficient-easel/screen/lib/content/length-units";var pr=(e,o,t,r)=>o===t?e:jte(e,o,t,r,{min:0,max:200,step:4}),wn={textFit:"line",textFitPhone:"wrap"},Cn={...K,[At]:""},{label:q2e,href:Y2e,...Kte}=PF.defaultProps,vo=Kte,vn={buttonFillOpacity:0,buttonBorder:{width:0},buttonPaddingTop:0,buttonPaddingRight:0,buttonPaddingBottom:0,buttonPaddingLeft:0},J={...Sh,sectionAccent:0},Qs={sectionAccent:-1},ae=[...Jr,"sectionHeightMode","sectionHeightValue","sectionHeightUnit","sectionHeightModeTablet","sectionHeightValueTablet","sectionHeightUnitTablet","sectionHeightModePhone","sectionHeightValuePhone","sectionHeightUnitPhone","sectionCorners","sectionCornerSides","sectionBorder","sectionBorderTablet","sectionBorderPhone","sectionAccent",Ll.unitKey,...kE,...yE,"anchor",El,...ps,...uc,...au,...pc(["widthFit",...Ji,...Ji.map(Nu)]),...Object.values(lo)],Js="a section width key, ignored since efficient-web-builder 45 (an old key; a section's own width has new keys, lib/content/section-width), so dropping it changes nothing",te={sectionSurface:"read by nothing in src/ (searched 2026-10-24): a retired theme key that draws nothing today, so dropping it changes nothing",widthMode:Js,fullWidth:Js,pageWidth:Js,backgroundWidth:Js,contentWidth:Js,contentMax:Js},ie=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 de(e,o){let t=q(e.sectionPaddingTop)??0,r=q(e.sectionPaddingBottom)??0,a=q(e.sectionPaddingTopTablet),n=q(e.sectionPaddingBottomTablet),s=ve(e.sectionPaddingUnit),l=ve(e.sectionPaddingUnitTablet),d=ve(e.sectionPaddingUnitPhone),c=(u,p,h,I)=>{let g=q(u);if(g!==void 0)return g+pr(I,"px",d,"mobile");let C=p===void 0?{n:h,unit:s}:{n:p,unit:l};return pr(C.n,C.unit,d,"mobile")+pr(I,"px",d,"mobile")},f=(u,p,h,I,g)=>p!==void 0?{[u]:p+pr(g??I,"px",l,"tablet")}:g===void 0?{}:{[u]:pr(h,s,l,"tablet")+pr(g,"px",l,"tablet")};return{sectionPaddingTop:t+pr(o.top,"px",s,"desktop"),sectionPaddingBottom:r+pr(o.bottom,"px",s,"desktop"),...f("sectionPaddingTopTablet",a,t,o.top,o.topTablet),...f("sectionPaddingBottomTablet",n,r,o.bottom,o.bottomTablet),sectionPaddingTopPhone:c(e.sectionPaddingTopPhone,a,t,o.topPhone),sectionPaddingBottomPhone:c(e.sectionPaddingBottomPhone,n,r,o.bottomPhone)}}var Ie=e=>[...["sectionPaddingTop","sectionPaddingBottom","sectionPaddingTopTablet","sectionPaddingBottomTablet","sectionPaddingTopPhone","sectionPaddingBottomPhone"].map(o=>[o,o,(t,r)=>de(r,typeof e=="function"?e(r):e)[o]]),["sectionPaddingUnit","sectionPaddingUnit"],["sectionPaddingUnitTablet","sectionPaddingUnitTablet"],["sectionPaddingUnitPhone","sectionPaddingUnitPhone"]];function St(e,o){let t={};for(let[a,n]of SI)e[a]!==void 0&&(t[n]=e[a]);let r=Xl(e,Mu(o));return{...t,sectionPaddingTop:r.top,sectionPaddingBottom:r.bottom}}var pa=e=>[...SI.map(([o,t])=>[o,t,(r,a)=>St(a,e)[t]]),["sectionPaddingTop","sectionPaddingTop",(o,t)=>St(t,e).sectionPaddingTop],["sectionPaddingBottom","sectionPaddingBottom",(o,t)=>St(t,e).sectionPaddingBottom]],Vte={kind:"heading-case-upper",styles:["heading-1","heading-2","heading-3"]},X2e=e=>o=>Qe(o.props[e])?[Vte]:[],pe=(e,o)=>({kind:"text",key:e,role:"eyebrow",props:K,...o?{style:o}:{}}),Hu=e=>({kind:"group",name:"Chip",props:{...R,...Cr("main"),...Do(6,14)},parts:[pe(e,{color:"background",...W("label",12),weight:600,letterSpacing:.16})]}),DF=e=>e.background!=="transparent",qte=(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},Qi={align:"right",alignPhone:"left"},Yte=(e,o,t)=>{let r=a=>qte(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}},ed=(e,o,t,r={})=>Yte(e,o,{...Cn,...Qi,...r,_partStyles:{text:{...Ko,color:"labels",...t,case:Ko.case,...Qi}}}),el=(e,o)=>typeof e=="number"&&Number.isInteger(e)&&e>=0?e:yn(o)?.selected??0,NF="var(--site-surface-2)",Uu=(e,o)=>yn(o)?.themes[el(e.sectionAccent??0,o)],Qo=(e,o)=>(t,r)=>{if(!o?.(t,r))return Cr(e);let a=Uu(t,r)?.[e];return a?{fillColor:a}:{}},Wu=(e,o)=>ua(e,o)>=0,MF=e=>e.startsWith("#")&&Gte(e)!==null,zu=(e,o,t)=>{let r=e?.trim();if(r&&MF(r))return{fillColor:r};let a=_x(r);if(a)return Cr(a);let n=r===NF?Uu(o,t):void 0;return n?{fillColor:ic(n)}:{}},$u=e=>{let o=e?.trim();return!o||o==="transparent"||o===Mo||_x(o)||o===NF||MF(o)?void 0:"it paints a colour that no Box Fill can hold"},ua=(e,o)=>{let t=yn(o)?.themes;return t&&DF(e)?Vv(t,el(e.sectionAccent,o)):-1},ma=(e,o,t)=>{let r=ua(o,t);return r>=0?r:e},tS=(e,o)=>{let t=yn(o)?.themes,r=t?qv(t,el(e,o)):-1;return r>=0?r:e},kn=(e,o)=>{let t=ua(e,o);return t>=0?{sectionAccent:t}:{}},ha=(e,o)=>DF(e.props)&&ua(e.props,o)<0?[{kind:"band-preset",page:el(e.props.sectionAccent,o)}]:[],ol=(e,{view:o="desktop",to:t="px",maxPx:r=1/0}={})=>{let{siteGutter:a,siteGutterUnit:n,siteGutterPhone:s,siteGutterPhoneUnit:l}=e.site??{},d=Tr(o),c=(u,p,h)=>{let I=ve(p),g=lc(u,I,"spacing",h);return g===null?null:pr(g,I,"px",d)},f=o==="desktop"?c(a,n,Go)??Sf(a):c(s,l,Ht)??wf(s)??Cf(a,n);return pr(Math.min(r,f),"px",t,d)},od=Object.fromEntries(["Top","Right","Bottom","Left","TopPhone","RightPhone","BottomPhone","LeftPhone"].map(e=>[`sectionPadding${e}`,0])),td=e=>({top:0,right:0,bottom:0,left:0,...e}),rS=(e,o,t,r=[])=>({kind:"group",name:e,keepEmpty:!0,props:(a,n)=>({...R,...od,...Qo("surface")(a,n),...typeof t=="function"?t(a,n):t}),box:[[o,"bgImage"],so.kind,so.duration,so.delay],parts:r});import{phoneKey as hS,readHidable as xS}from"efficient-easel/draw";import{isNodeList as Are,newId as Lre}from"efficient-easel/data";function HF(e){return Math.min(4,Math.max(2,e??3))}var eMe={eyebrow:"Label",title:"Section *heading.*"},Xte={template:Cv()},UF={label:"Cards",fields:Xte,defaultProps:{eyebrow:"",title:"",items:[],columns:3}};var rMe={eyebrow:"Highlight",title:"Key *features.*"},aMe=()=>[{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")}],WF={label:"Key Features",defaultProps:{eyebrow:"",title:"",items:[],columns:3}};var Zte="plain",zF=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],Jte="line",Qte={KeyFeatures:"filled"};function rd(e){return j(Qte,e)??Zte}function $F(e,o){return io(zF,rd(o),e)}function iMe(e){return io(zF,Jte,e)}var aS="cardPlace";function fMe(e){return e[aS]==="top-line"?"top-line":""}var pMe="absolute left-5 top-0 z-10 -translate-y-1/2 bg-bg px-2",uMe="data-sf-top-line",ere=new Set(["Cards",Ft]);function mMe(e){return typeof e=="string"&&ere.has(e)}var ore=e=>{if(!e||typeof e!="object")return!1;let o=e,t=n=>typeof n=="number"&&n>0,r=o.width,a=n=>typeof o[n]=="number"?t(o[n]):t(r);return a("top")&&!a("right")&&!a("bottom")&&!a("left")};function hMe(e,o,t){return!t||!o?.linesBetween||o.index!==0?e:ore(e)?{...e,top:0}:e}var xMe="outsideFramedCard";function tre(e,o){let t=e.trim();if(!Gu(t))return!1;if(!o)return!0;let r;try{r=new URL(t,"https://x.invalid").host}catch{return!1}let a=n=>n.toLowerCase().replace(/^www\./,"");return a(r)!==a(o)}function bMe(e){return e.startsWith("/")||Gu(e)}function Gu(e){return/^(?:https?:)?\/\//i.test(e.trim())}var ad=Object.freeze({target:"_blank",rel:"noopener noreferrer"});function GF(e,o){return tre(e,o)?{...ad}:{}}function yMe(e){return typeof e=="string"?e.trim():""}var SMe="data-sf-box-link",jF="absolute inset-0 -z-[1] outline-none focus-visible:z-[2] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent",wMe="relative isolate pointer-events-none [&_a]:pointer-events-auto [&_button]:pointer-events-auto [&_input]:pointer-events-auto [&_select]:pointer-events-auto [&_textarea]:pointer-events-auto [&_label]:pointer-events-auto [&_summary]:pointer-events-auto [&_iframe]:pointer-events-auto [&_video]:pointer-events-auto [&_audio]:pointer-events-auto [&_[role=button]]:pointer-events-auto [&_[tabindex]:not([tabindex='-1'])]:pointer-events-auto",rre="data-sf-box-jump";function are(e){return`sf-box-jump-${e}`}function CMe(e,o){return e===!0?zc(o):""}function nre({box:e,lit:o,first:t}){let r=s=>s.join(`,
|
|
307
|
-
`),a=t(e),n=o.flatMap(t);return`
|
|
308
|
-
${e} {
|
|
309
|
-
outline: 2px solid transparent;
|
|
310
|
-
outline-offset: -2px;
|
|
311
|
-
transition: outline-color 600ms ease-out;
|
|
312
|
-
}
|
|
313
|
-
${r(a)} { transition: background-color 600ms ease-out; }
|
|
314
|
-
${r(a.map(s=>`${s} *`))} { transition: color 600ms ease-out; }
|
|
315
|
-
${r(o)} { outline-color: var(--accent); }
|
|
316
|
-
${r(n)} { background-color: var(--accent); }
|
|
317
|
-
${r([...n,...n.map(s=>`${s} *`)])} { color: var(--bg) !important; }
|
|
318
|
-
`}function vMe(e){let o=`[${rre}="${e}"]`,t=`.${are(e)}`,r=`[id="${e}"]:target`;return nre({box:o,lit:[`${r}~${o}`,`${r}~* ${o}`],first:a=>[`${a} ${t}>:first-child:not(.sf-section-anchor)`,`${a} ${t}>.sf-section-anchor:first-child+*`]})}var sre=["selected","highlighted"],KF="data-sf-card-state",OMe="pointer-events-none absolute inset-0 border border-accent",_Me="pointer-events-none absolute inset-x-0 bottom-0 border-b-2 border-accent",AMe="pointer-events-none absolute inset-0 border-2 border-accent outline outline-1 -outline-offset-1 outline-accent",LMe="absolute inset-y-0 left-0 w-[3px] bg-accent",RMe="absolute -inset-[2px] -z-[1] bg-[color-mix(in_oklab,var(--accent)_14%,transparent)]",FMe="after:pointer-events-none after:absolute after:inset-0 hover:after:border-2 hover:after:border-accent",VF=e=>{let o=lk.find(t=>t.role===e)?.token;if(!o)throw new Error(`card-state: the palette has no ink token for "${e}"`);return o},lre={[VF("muted")]:`var(${VF("fg")})`};function ire(e){return e?.selected===!0}function dre(e){return e?sre.filter(o=>e[o]===!0).join(" "):""}function BMe(e,o="frame"){let t=dre(e);return t?o==="frame"&&ire(e)?{[KF]:t,className:"relative isolate",style:{...lre}}:{[KF]:t,className:"relative"}:{}}var cre={highlighted:!0},fre={},ju="badge";function DMe(e,o=[]){return e.map((t,r)=>({...t,key:t.key||o[r]?.key||kl(t,r)}))}function NMe(e){return!e||typeof e!="object"?!1:Object.entries(e).some(([o,t])=>o==="key"||o===ju||o==="state"?!1:typeof t=="string"?t.trim()!=="":Array.isArray(t)?t.length>0:t!=null&&typeof t!="function")}function MMe(e,{chosen:o,badge:t}){let r=o.trim(),a=r?e.findIndex(n=>n.key===r):-1;return{rows:e.map((n,s)=>({...n,[ju]:s===a?t:""})),states:e.map((n,s)=>s===a?cre:fre)}}function HMe(e){return{chosen:typeof e.highlightedCard=="string"?e.highlightedCard.trim():"",badge:typeof e.highlightBadge=="string"?e.highlightBadge:""}}function UMe(e){if(!e||typeof e!="object")return;let{press:o,pressLabel:t,pressDisabled:r}=e;if(typeof o=="function")return{press:o,...typeof t=="string"&&t.trim()!==""?{label:t}:null,...r===!0?{disabled:!0}:null}}var WMe="data-sf-card-press",qF=`${jF} appearance-none bg-transparent border-0 p-0 m-0`,zMe=`${qF} cursor-pointer`,$Me=qF;var Ku={sectionBorder:{top:0,right:1,bottom:1,left:0},...Cr("background")},pre={gap:0,gapPhone:0,sectionBorder:{top:1,right:0,bottom:0,left:1},shadow:!0},Vu=e=>({direction:"row",columns:e,columnsTablet:e,...pre}),YF=(e={})=>qe(ju,{...K,tag:"p",[aS]:"top-line"},e,!0),XF=(e=cv)=>{let o=fv(e);return{...o,props:{...Ku,...o.props},slots:{[He]:[...o.slots?.[He]??[],YF()]}}},nS=(e=!1)=>{let o=uv(e);return{...o,props:{...Ku,...o.props}}},ure={name:"name",time:"time",note:"note",price:"price"},mre={textStyle:"body-1",...W("body",16),weight:500,lineHeight:1.5},hre={...Ko,...W("label",12),letterSpacing:.18,lineHeight:1.5},xre={textStyle:"body-1",...W("body",14),lineHeight:1.6},Ire={textStyle:"body-1",fontRole:"heading",...W("headingSmall",20),weight:500,color:"accent",lineHeight:1.5},gre={...W("label",11),letterSpacing:.25},bre={gap:16,gapPhone:16,sectionBorder:{top:0,right:0,bottom:0,left:0},shadow:!1},yre=e=>({direction:"row",columns:e,...bre}),XMe=[...new Set([...Object.keys(Vu(1)),...Object.keys(yre(1))])],ZMe=()=>{let e=ure,o={tag:"p",widthFit:"fill"};return{type:oe,props:{...R,name:"Card",justify:"between",gap:16,gapPhone:16,...Do(24),sectionBorder:{top:1,right:1,bottom:1,left:1},...Cr("surface"),shadow:!0},slots:{[He]:[YF(gre),{type:oe,props:{...R,name:"Words",gap:8,gapPhone:8},slots:{[He]:[qe(e.name,{...K,...o},mre),qe(e.time,{...se,...o},hre),qe(e.note,{...se,...o},xre)]}},qe(e.price,{...K,...o},Ire)]}}};import{tabletKey as eB}from"efficient-easel/draw";import{VIEW_DESKTOP_MIN as qu}from"efficient-easel/draw";var Yu=Gr,sS=qu,ZF=960,JF=Gr,QF={min:Yu,max:1600,step:10},Xu="stackBelow";function tHe(e){if(!(typeof e!="number"||!Number.isFinite(e))&&!(e<QF.min||e>QF.max))return Math.round(e)}var Sre=e=>`sf-stack-${e}`,wre=e=>`sf-stack-${e}-gutter`,Cre=e=>`sf-stack-${e}-outer`,tl=e=>`${e-.02}px`;function rHe(e,o={}){let t=o.gutter!==!1,r=`.${Sre(e)}`,a=`.${wre(e)}`,n=`.${Cre(e)}`,s=[];if(e>Yu){let l=`${r}>.sf-block-size,${r}>[data-easel-block]>[data-sf-part-host]>.sf-block-size`,d=Math.min(e,qu);s.push(`@media (min-width:${Yu}px) and (max-width:${tl(e)}){${r}${r}{flex-direction:column}.sf-gap-overlap${r}{--sf-gap-overlap-eff:calc(var(--sf-gap-overlap) / 2)}${l}{width:min(var(--sf-bw-p,100%),100%);flex-grow:0}}`,`@media (min-width:${Yu}px) and (max-width:${tl(d)}){.sf-gap-zone${r}{gap:var(--sf-gap-len-tablet,var(--sf-gap-len-phone,calc(var(--sf-gap-len) / 2)))}}`),e>qu&&s.push(`@media (min-width:${qu}px) and (max-width:${tl(e)}){.sf-gap-zone${r}{gap:var(--sf-gap-len-phone,calc(var(--sf-gap-len) / 2))}}`)}return t&&s.push(`@media (max-width:${tl(e)}){${a}${a}{padding-inline:${nr.frame}}}`),t&&e<ZF&&s.push(`@media (min-width:${e}px) and (max-width:${tl(ZF)}){${a}${a}{padding-inline:${nt}}}`),e>JF&&s.push(`@media (min-width:${JF}px) and (max-width:${tl(e)}){`+["top","bottom","left","right"].map(l=>`.sf-pad-${l}-phone:has(>${n}),.sf-pad-${l}-phone${n}{padding-${l}:var(--sf-pad-${l[0]}-phone)!important}`).join("")+"}"),s.join("")}function Tn(e){if(e==="ProductGrid")return"shelf";let o=j(kr,e)?.headStyle;return o==="editorial"||o==="simple"||o==="essay"?o:"standard"}var nd={standard:64,editorial:60,simple:36,essay:28,shelf:20},vre={SectionHeader:"accent",FAQ:"accent",FitmentFinder:"accent",FitmentTable:"accent",SpecTable:"accent",RelatedProducts:"accent",Collections:"accentNum"};function kre(e){if(e==="SectionHeader")return{num:"num",title:"title",description:"description",link:!0};let o=j(kr,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 Ju(e,o,t){let r=`editorial:${e}|${o}|${t}`,a=Zu.get(r);if(a)return a;let n=aB({num:e,title:o,description:t,link:!1});return Zu.set(r,n),n}var et={[Xu]:sS},iS={top:0,right:0,bottom:1,left:0},ot=(e,o,t,r)=>({sizeToken:{step:e,px:r,fluid:{minPx:o,vw:t}}}),Qu=(e,o,t={})=>pe(e,{...W("label",o),...t}),em=(e,o)=>({kind:"text",key:e,role:"heading",props:K,style:{textStyle:"heading-2",...o}}),dS=800,Tre=sS,cS=(e,o,t,r,a={})=>({kind:"text",key:e,props:{...se,align:"right",alignPhone:"left",...t?{maxWidth:t,maxWidthPhone:dS}:{},...a},style:{textStyle:"body-5",fontRole:"heading",alignPhone:"left",...W("body",o),...r,...a}}),rB={...vo,align:"right",alignPhone:"left",...vn},lS=e=>({kind:"button",key:"linkText",href:"linkHref",variant:"ghost",props:rB,style:{...Rt(e),color:"labels"}}),oB=(e,o,t)=>{let r=t.role==="heading"?{tag:"h2"}:{};return{kind:"block",type:"Text",when:a=>a[e]===void 0,props:{...K,...r,...t.props,text:o,_partStyles:{text:{...t.role==="eyebrow"?Pre(vr()):{},...t.style}}}}},Pre=e=>e._partStyles.text??{},rl={widthFitPhone:"fill"};function fS(e){if(e.kind!=="group")return e;if(e.name==="Words"){let o=e.props;return{...e,props:typeof o=="function"?(t,r)=>({...o(t,r),...rl}):{...o,...rl}}}return{...e,parts:e.parts.map(fS)}}function Ere(e,o){let t=j(vre,e),r=t==="accent",a=Qu(o.num,14,{color:r?"accent":"labels"}),n=t==="accentNum"&&a.kind==="text"?{...a,mark:"accentLead"}:a,s=em(o.title,r?{...ot("headingMedium",36,5,64),case:"upper",lineHeight:.95,letterSpacing:-.025}:{...W("headingMedium",56,36),case:"none",lineHeight:1,letterSpacing:-.03}),l=e==="Collections";return{kind:"group",name:"Header",props:{...R,direction:"row",align:"end",justify:"between",gap:40,gapPhone:12,share:"content",sectionBorder:iS,sectionPaddingBottom:24,sectionPaddingBottomPhone:20},parts:[{kind:"group",name:"Title",props:{...R,...rl,direction:"row",align:"end",gap:40,gapPhone:12,share:"content"},parts:[{kind:"group",name:"Number",props:{...R,...rl,align:"start",gap:12},parts:[{kind:"image",key:"logoSrc",alt:"logoAlt",props:{aspect:"auto",contained:!1}},n,...l?[oB(o.num,"==01== / Collections",n)]:[]]},{kind:"group",name:"Heading",props:{...R,...rl},parts:[s,...l?[oB(o.title,`Three ranges,
|
|
319
|
-
one standard.`,s)]:[]]}]},{kind:"group",name:"Words",props:{...R,...rl,gap:12,maxWidth:340,maxWidthPhone:dS},parts:[...o.description?[cS(o.description,14,void 0,{lineHeight:1.5})]:[],...o.link?[lS(14)]:[],...l?[{kind:"block",type:"ButtonBlock",props:{...rB,variant:"ghost",label:"View all",href:"/wheels",_partStyles:{label:lS(14).style}}}]:[]]}]}}function om(e,o){return e.kind==="text"?o.includes(e.key)?{...e,mark:"accentItalic"}:e:e.kind==="group"?{...e,parts:e.parts.map(t=>om(t,o))}:e}function aB(e){let o=em(e.title,{...ot("headingMedium",40,5.5,80),case:"upper",weight:500,lineHeight:1,letterSpacing:-.03});return{kind:"group",name:"Header",props:{...R,direction:"row",align:"end",justify:"between",gap:40,gapPhone:14,share:"content",sectionBorder:iS,sectionPaddingBottom:32,...et},parts:[{kind:"group",name:"Title",props:{...R,direction:"row",align:"end",gap:40,gapPhone:14,share:"content",...et},parts:[{kind:"group",name:"Number",props:{...R,sectionPaddingBottom:8},parts:[{...Qu(e.num,13),props:{...K,...wn}}]},om(o,[e.title])]},{kind:"group",name:"Words",props:{...R,sectionPaddingBottom:4,maxWidth:360,[eB("maxWidth")]:Tre,maxWidthPhone:dS},parts:e.description?[cS(e.description,14,void 0,{lineHeight:1.5},{[eB("align")]:"left"})]:[]}]}}function tB(e,o){return{kind:"group",name:"Header",props:{...R,gap:16,gapPhone:16},parts:[Qu(e.num,13),em(e.title,o)]}}var nB=[["para",{...Rt(13),weight:400,lineHeight:1,letterSpacing:.22}],["sm",{...W("headingMedium",40,28),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["md",{...W("headingMedium",48,32),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["lg",{...W("headingMedium",56,36),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}],["xl",{...W("headingMedium",64,40),case:"none",weight:500,lineHeight:1,letterSpacing:-.03}]],Ore=e=>nB.some(([o])=>o===e.titleSize)?e.titleSize:"lg";function _re(e){return{kind:"group",name:"Header",props:{...R,direction:"row",align:"center",justify:"between",gap:16,share:"content",stickTop:!0,sectionBorder:iS,sectionPaddingTop:12,sectionPaddingBottom:12},parts:[{kind:"group",name:"Title",props:{...R,direction:"row",align:"end",gap:24,share:"content"},parts:[Qu(e.num,13,{color:"labels",letterSpacing:.22,lineHeight:1}),...nB.map(([o,t])=>({...em(e.title,t),when:r=>Ore(r)===o}))]},{kind:"group",name:"Words",props:{...R,direction:"row",align:"center",justify:"end",gap:20,share:"content"},parts:[...e.description?[cS(e.description,13,340,{lineHeight:1.4})]:[],...e.link?[lS(13)]:[]]}]}}function tm(e){return Tn(e)==="shelf"?{titleSize:"the Header Box's title Text part: its size, as the old shelf title drew it (lib/document/blocks/general/section-head-looks)"}:{}}var Zu=new Map,pS={...W("headingMedium",44,32),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02};function wt(e){let o=Zu.get(e);if(o)return o;let t=kre(e),r=Tn(e),a=r==="editorial"?aB(t):r==="simple"?tB(t,pS):r==="essay"?tB(t,{...W("headingMedium",38,28,"headingSmall"),case:"upper",lineHeight:1,letterSpacing:-.02}):r==="shelf"?_re(t):Ere(e,t);return Zu.set(e,a),a}var Pn={Series:"transparent",StatsParagraph:"transparent",TimelineTrack:Mo,Stats:void 0};var sd=(e,o,t,r)=>({sectionBorder:{top:e,right:o,bottom:t,left:r}}),gB=e=>o=>HF(q(o.columns)??q(e.columns)),Rre="inline is the head the row draws; an own-box node is skipped (`skip`)",Fre={kind:"text",key:"title",role:"heading",props:K,style:{textStyle:"heading-3",...pS}},sB={top:120,bottom:120,topPhone:80,bottomPhone:80,topTablet:80,bottomTablet:80},am=e=>{let o=lr(typeof e.background=="string"?e.background:void 0,Pn.Series);return o&&o!=="transparent"?o:void 0},rm=e=>am(e)===Mo,Bre={...R,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},lB={...R,direction:"row",justify:"between",gap:12,share:"content",phoneRow:2,[hS("share")]:"content"},Dre=e=>{let o=am(e)?1:2;return{...R,direction:"row",columns:4,columnsTablet:2,gap:o,gapPhone:o}},uS={...Rt(12),letterSpacing:.22,lineHeight:1.5},iB=e=>Qe(e.viewLabel)&&!xS(e.viewLabel).hidden,Ct=e=>xS(e).text?.trim?.()??"",nm=e=>Object.fromEntries(Object.entries(e).filter(([,o])=>Se(o)!==void 0)),IS=e=>e.map(([o,t,r])=>({key:o,label:t,...r?{multiline:!0}:{}})),Nre=IS([["num","Number"],["since","Corner note"],["title","Card title"],["body","Card body",!0],["count","Count"],["countLabel","Count word"]]),Mre=IS([["label","Label"],["value","Value"],["body","Card body",!0]]),ld=(e,o,t,r,a,{reads:n=["cards"],keep:s=[]}={})=>({kind:"group",name:e,props:o,parts:[{kind:"core",as:Ft,headless:!0,keep:s,derive:{reads:n,props:l=>sc(r(l),t)},slots:(l,d)=>({[No]:[a(l,d)]})}]}),bB=e=>Array.isArray(e.cards)?e.cards:[],dB={top:76,bottom:76,topPhone:76,bottomPhone:76},yB=e=>(Array.isArray(e.items)?e.items:[]).map(o=>nm({title:Ct(o?.label),href:typeof o?.href=="string"?o.href.trim():""})).filter(o=>o.title!==void 0).map((o,t)=>({key:kl(Eh(o),t),...o})),Hre=e=>yB(e).some(o=>Se(o.href)!==void 0),SB=[{key:wh.label,label:"Feature label"},{key:wh.href,label:"Link",kind:"link"}],cB=e=>$F(e.eyebrowLook,"KeyFeatures")==="filled",Ure={name:"Key Features",boxProps:(e,o)=>({...J,direction:"column",gap:44,gapPhone:32,...Qo("surface")(e,o),...sd(1,0,1,0),...de(e,dB)}),box:[...ae,...Ie(dB)],parts:[{kind:"group",name:"Heading",props:{...R,direction:"row",align:"end",gap:20,wrap:!0,share:"content",phoneRow:2,[hS("share")]:"content"},parts:[{...Hu("eyebrow"),when:cB},{...pe("eyebrow"),when:e=>!cB(e)},Fre]},ld("Cards",e=>({...R,...Vu(gB(WF.defaultProps)(e))}),SB,yB,e=>nS(Hre(e)),{reads:["items"]})],drop:{...te,...ie,columns:'Box "Cards": its Columns and tablet Columns',eyebrowLook:"the Filled look is a Box in the main colour round the eyebrow Text; the plain look is the eyebrow Text"}},fB={top:72,bottom:72,topPhone:72,bottomPhone:72},pB=(e,o)=>({...Ku,...Qo("background")(e,o)}),uB=e=>{let o=gB(UF.defaultProps)(e);return{...R,...Vu(o)}},Wre=IS([["title","Card title"],["body","Card body",!0]]),wB=e=>(Array.isArray(e.items)?e.items:[]).map((o,t)=>({key:typeof o?.key=="string"&&o.key?o.key:kl(Eh(o),t),title:Ct(o?.title),body:Ct(o?.body)})),CB=e=>{let o={},t={};for(let[r,a]of Object.entries(e.props??{}))r!=="id"&&(Are(a)?t[r]=a.map(CB):o[r]=a);return{type:String(e.type),props:o,...Object.keys(t).length?{slots:t}:{}}},mB=(e,o)=>{let t=mS(e)?nS(zre(e)):XF(),r=Array.isArray(e.template)?e.template.map(CB):[t],[a]=r;return r.length===1&&a.type===oe?{...a,props:{...pB(e,o),...a.props}}:{type:oe,props:{...R,...pB(e,o),name:"Card"},slots:{[He]:r}}},mS=e=>e.cardStyle==="label-only",vB=e=>wB(e).map((o,t)=>{let r=e.items[t]?.href;return nm({key:o.key,title:o.title,href:typeof r=="string"?r.trim():""})}),zre=e=>vB(e).some(o=>Se(o.href)!==void 0),hB=e=>Array.isArray(e.template)&&e.template.length===0,xB=["dataSource","dataSourceOptions","highlightedCard","highlightBadge"];function kB(){let e=t=>({key:Lre("card"),title:i(t),body:i("A short line about this card.")}),o=[e("Card title one"),e("Card title two"),e("Card title three")];return{eyebrow:i("Label"),title:i("Section *heading.*"),items:o}}var $re={name:"Cards",ownBoxConverts:!0,boxProps:(e,o)=>({...J,direction:"column",gap:36,gapPhone:28,...Qo("surface")(e,o),...de(e,fB)}),box:[...ae,...Ie(fB)],parts:[{...wt("Cards"),when:e=>!Yy(e)},{...ld("Cards",uB,Wre,wB,mB,{reads:["items"],keep:xB}),when:e=>!hB(e)&&!mS(e)},{...ld("Cards",uB,SB,vB,mB,{reads:["items"],keep:xB}),when:e=>!hB(e)&&mS(e)}],drop:{...te,...ie,columns:'Box "Cards": its Columns and tablet Columns',cardStyle:"the Card list's template: the Cards card, or under Label only the Label only card (a cell Box, a Mark Box, the label Text)",template:"the Card list's template (the card Box takes the old cell's ground and lines)",headPlacement:"an own-box node lands without its head; inline is the head the row draws",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 (the stored-node export, 2026-10-24)"}},Gre={name:"Recurring Columns",boxProps:(e,o)=>({...J,direction:"column",gap:60,gapPhone:60,...sd(0,0,1,0),...et,...rm(e)?kn(e,o):{},...zu(am(e),e,o),...de(e,sB)}),box:[...ae.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,t)=>rm(o)?ma(e,o,t):e],...Ie(sB)],skip:e=>$u(am(e)),site:(e,o)=>rm(e.props)?ha(e,o):[],parts:[wt("Series"),ld("Cards",Dre,Nre,e=>bB(e).map(o=>nm({num:Ct(o.num),since:Ct(o.since),title:Ct(o.title),body:Ct(o.desc),count:Ct(o.entries),countLabel:Ct(o.entriesLabel)})),(e,o)=>({type:oe,props:{...Bre,...Qo("background",(t,r)=>rm(t)&&Wu(t,r))(e,o),name:"Card"},slots:{[He]:[{type:oe,props:{...R,name:"Words",gap:16,gapPhone:16},slots:{[He]:[{type:oe,props:{...lB,name:"Top"},slots:{[He]:[qe("num",K,W("label",13),!0),qe("since",K,W("label",13),!0)]}},qe("title",{...K,tag:"h3"},{textStyle:"heading-3",...W("headingSmall",28),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}),qe("body",se,{textStyle:"body-5",fontRole:"heading",...W("body",14),lineHeight:1.6})]}},{type:oe,props:{...lB,name:"Footer",align:"center",gap:0,gapPhone:0,sectionPaddingTop:16,sectionPaddingTopPhone:16,...sd(1,0,0,0),...iB(e)?{}:{[Rv]:["count","countLabel"]}},slots:{[He]:[{type:oe,props:{...R,name:"Count",direction:"row",align:"center",gap:12,gapPhone:12,share:"content",phoneRow:2,[hS("share")]:"content"},slots:{[He]:[qe("count",K,uS),qe("countLabel",se,uS)]}},...iB(e)?[{type:oe,props:{...R,name:"View",maxWidthPhone:266},slots:{[He]:[{type:"Text",props:{...K,text:xS(e.viewLabel).text,_partStyles:{text:{...vr()._partStyles.text,...uS}}}}]}}]:[]]}}]}}))],reads:{viewLabel:"a Text typed once in the card template: the far end of every card's footer",background:"the Box's theme (the band preset) or its Fill"},drop:{...te,...ie,headPlacement:Rre}},IB={top:60,bottom:60,topPhone:40,bottomPhone:40},jre={...R,direction:"row",columns:3,gap:40,gapPhone:16},Kre={...R,gap:8,gapPhone:8,...Do(24),...sd(1,1,1,1)},Vre={name:"Document Detail Cards",boxProps:e=>({...J,direction:"column",gap:40,gapPhone:16,...sd(0,0,1,0),...de(e,IB)}),box:[...ae,...Ie(IB)],parts:[ld("Cards",jre,Mre,e=>bB(e).map(o=>nm({label:Ct(o.label),value:Ct(o.value),body:Ct(o.desc)})),(e,o)=>({type:oe,props:{...Kre,...Qo("surface")(e,o),name:"Card"},slots:{[He]:[qe("label",K,{...W("label",12),lineHeight:1.5},!0),{type:oe,props:{...R,name:"Words",gap:14,gapPhone:14},slots:{[He]:[qe("value",K,{textStyle:"heading-3",...W("headingSmall",20),weight:500,letterSpacing:-.015,lineHeight:1.5}),qe("body",se,{textStyle:"body-5",fontRole:"accent",...W("body",14),italic:!0,lineHeight:1.5})]}}]}}))],drop:{...te,...ie}},TB={Cards:$re,KeyFeatures:Ure,Series:Gre,DocMetaCards:Vre};import{phoneKey as Zre}from"efficient-easel/draw";import{newId as Jre}from"efficient-easel/data";import{phoneKey as qre}from"efficient-easel/draw";import{isNode as id}from"efficient-easel/data";var al="cardStyle";function PB(e){let{widthPhone:o,...t}=e;return e.widthFitPhone==="fixed"?{...t,widthFitPhone:"fill"}:{...e}}var sm={table:{items:{gap:0,gapPhone:0,columnsTablet:2},grid:{gap:0},row:{gap:0,[qre("share")]:"content"},card:{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}}},list:{items:{gap:32,gapPhone:32,phoneRow:2},grid:{gap:32,gapPhone:32},row:{gap:32,gapPhone:32},card:{justify:"start",gap:8,gapPhone:8,sectionPaddingTop:20,sectionPaddingBottom:0,sectionBorder:{top:1,right:0,bottom:0,left:0}}}},vt={table:{...sm.table,listCard:PB(sm.table.card)},list:{...sm.list,listCard:PB(sm.list.card)}},UHe=[{label:"Table",value:"table"},{label:"List",value:"list"}],WHe=e=>e==="table"||e==="list",Yre=e=>[...new Set([...Object.keys(vt.table[e]),...Object.keys(vt.list[e])])];function dd(e,o,t){let r={...e};for(let a of Yre(o))delete r[a];return{...r,...structuredClone(vt[t][o])}}function Xre(e,o,t){let r=e.props??{},a=Array.isArray(r[No])?r[No]:[],n=a.findIndex(d=>id(d)&&d.type===t);if(n<0)return e;let s=a[n],l=a.map((d,c)=>c===n?{...s,props:dd(s.props??{},"listCard",o)}:d);return{...e,props:{...r,[No]:l}}}function zHe(e,o,t,r){let a=Array.isArray(e[r])?e[r]:[];if(a.some(s=>id(s)&&s.type===Ft)){let s=a.map(l=>id(l)&&l.type===Ft?Xre(l,o,t):l);return{...dd(e,"items",o),[al]:o,[r]:s}}let n=a.map(s=>{if(!id(s)||s.type!==t)return s;let l=s.props??{},d=(Array.isArray(l[r])?l[r]:[]).map(c=>id(c)&&c.type===t?{...c,props:dd(c.props??{},"card",o)}:c);return{...s,props:{...dd(l,"row",o),[r]:d}}});return{...dd(e,"grid",o),[al]:o,[r]:n}}var gS=e=>typeof e=="string"?e.trim():"";function EB(e){let o=`${gS(e.prefix)}${gS(e.value)}`,t=gS(e.suffix);return e.emphasizeAll===!0?o?`==_${o}_==`:"":`${o}${t?`==_${t}_==`:""}`}var AB={textStyle:"heading-2",...ot("headingMedium",56,7,96),weight:500,case:"none",lineHeight:.9,letterSpacing:-.04},bS={kind:"block",type:"Text",props:{...Cn,_partStyles:{text:AB}},box:[["value","text",(e,o)=>EB(o)]],when:(e,o)=>o!==void 0&&typeof o.value=="string"&&EB(o)!==""},OB=e=>Qe(e?.supSuffix),LB={textStyle:"body-1",fontRole:"heading",...W("body",16),lineHeight:1.5,letterSpacing:-.01},RB={color:"labels",...W("label",12),lineHeight:1.5,letterSpacing:.24},FB={...R,direction:"row",align:"start",gap:32,gapPhone:32,share:"content",phoneRow:2,[Zre("share")]:"content"},BB={textStyle:"body-5",...W("label",13),weight:500,color:"accent",letterSpacing:.18,lineHeight:1,padding:12},yS=e=>lr(e.background,Pn.StatsParagraph),cd=e=>yS(e)===Mo,lm=e=>({...e,sectionAccent:e.sectionAccent??0}),Qre=(e,o)=>cd(e)?Qo("background",(t,r)=>Wu(lm(t),r))(e,o):{},eae={name:"Stats with Text",skip:e=>yS(e)&&yS(e)!=="transparent"&&!cd(e)?"it paints a colour of its own, not the section band":void 0,boxProps:(e,o)=>({...J,direction:"column",gap:60,gapPhone:60,sectionBorder:{bottom:1},...et,...St(e,"StatsParagraph"),...cd(e)?kn(lm(e),o):{}}),box:[...ae.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,t)=>cd(o)?ma(e,lm(o),t):e],...pa("StatsParagraph")],site:(e,o)=>cd(e.props)?ha({props:lm(e.props)},o):[],parts:[wt("StatsParagraph"),{kind:"group",name:"Stats",props:{...R,...vt.table.grid,[al]:"table"},parts:[{kind:"list",key:"stats",name:"Stat",perRow:()=>4,rowName:"Stats row",rowProps:{...R,direction:"row",share:"equal",phoneRow:2,...vt.table.row},props:(e,o)=>({...R,...vt.table.card,...Qre(e,o)}),parts:[{...bS,when:(e,o)=>!OB(o)&&bS.when(e,o)},{kind:"group",name:"Figure",props:FB,when:(e,o)=>OB(o),parts:[bS,{kind:"text",key:"supSuffix",props:K,style:BB}]},{kind:"group",name:"Words",props:{...R,gap:4,gapPhone:4},parts:[{kind:"text",key:"label",props:K,style:LB},pe("sub",RB)]}]}]}],drop:{...te,...ie,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"}},oae=new Set(["value","label",At]),_B={top:48,bottom:48,topPhone:48,bottomPhone:48},tae=e=>{let o=lr(typeof e.background=="string"?e.background:void 0,Pn.Stats);return!!o&&o!=="transparent"},rae={name:"Stats",skip:e=>tae(e)?"it paints a colour inside its padding, and a Box paints its Fill over the padding too":Qe(e.dataSource)?"its figures come from a source":Array.isArray(e.items)&&e.items.some(o=>Qe(o?.[At]))?"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=>!oae.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=>({...J,direction:"column",gap:24,gapPhone:24,...de(e,_B)}),box:[...ae,...Ie(_B)],parts:[pe("heading",{color:"labels",...W("label",12),letterSpacing:.2}),{kind:"group",name:"Stats",props:{...R,...vt.list.grid,[al]:"list"},parts:[{kind:"list",key:"items",name:"Stat",perRow:e=>q(e.columns)??4,rowName:"Stats row",rowProps:{...R,direction:"row",share:"equal",phoneRow:2,...vt.list.row},props:{...R,...vt.list.card},parts:[{kind:"text",key:"value",props:Cn,style:{textStyle:"heading-2",...W("headingMedium",48,36),weight:500,case:"none",lineHeight:1,letterSpacing:-.03}},pe("label",{color:"labels",...W("label",12),letterSpacing:.2})]}]}],drop:{...te,...ie,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:"only no fill reaches here: a node that paints a colour is skipped"}},DB={StatsParagraph:eae,Stats:rae};function NB(){return{eyebrow:i("By the numbers"),title:i("What we count."),desc:i("A few numbers that matter to us."),stats:[],background:"transparent"}}var aae=[{key:"figure",label:"Figure"},{key:"superscript",label:"Superscript"},{key:"label",label:"Label"},{key:"body",label:"Text",multiline:!0}];function MB(){let e=(o,t,r,a="")=>({key:Jre("stat"),figure:o,superscript:a,label:t,body:r});return[e("28==_yr_==",i("Years in business"),i("Privately held since day one. Same two founders.")),e("==_8_==",i("Operating footprint"),i("Los Angeles \xB7 Fort Lauderdale \xB7 Bewdley \xB7 Drachten \xB7 Mumbai \xB7 Selangor \xB7 Ho Chi Minh \xB7 Sydney. Three continents covered from one California design studio."),i("cities")),e("\u221221==_%_==",i("Avg. weight saving"),i("Versus OEM equivalents, across our forged catalog.")),e("14==_\xD7_==",i("Finish steps"),i("Specified in California to a 14-step protocol. No two sets are identical."))]}function nae(e){return{type:oe,props:{...R,name:"Card",...structuredClone(vt[e].listCard)},slots:{[He]:[{type:oe,props:{...FB,name:"Figure"},slots:{[He]:[qe("figure",Cn,AB),qe("superscript",K,BB)]}},{type:oe,props:{...R,name:"Words",gap:4,gapPhone:4},slots:{[He]:[qe("label",{...K,widthFit:"fill"},LB),qe("body",{...K,widthFit:"fill"},RB,!0)]}}]}}}function SS(e,o,t=4){return{type:oe,props:{...R,name:"Stats",direction:"row",columns:t,...structuredClone(vt[o].items),[al]:o},slots:{[He]:[{type:Ft,props:sc(e,aae),slots:{[No]:[nae(o)]}}]}}}var HB={heading:"Trusted by *teams worldwide*"},UB=()=>[{src:"",alt:i("Logo one")},{src:"",alt:i("Logo two")},{src:"",alt:i("Logo three")},{src:"",alt:i("Logo four")},{src:"",alt:i("Logo five")}],sae={logos:{type:"slot",allow:["LogoBlock"]},template:{type:"slot",allow:["LogoBlock"]}},s4e={label:"Logos",drawsPictures:!0,fields:sae,defaultProps:{items:[],contained:!0}};var WB={heading:"Ways to pay"},zB=()=>[{label:"Visa"},{label:"Mastercard"},{label:"Amex"},{label:"PayPal"}],$B=()=>[{text:i("Secure encrypted checkout")},{text:i("30-day returns")}],d4e={label:"Payment Methods",drawsPictures:!0,defaultProps:{heading:"",badges:[],assurances:[],contained:!0}};var p4e={left:"justify-start",center:"justify-center",right:"justify-end"},u4e={left:"",center:"mx-auto",right:"ml-auto"},m4e={left:"",center:"text-center",right:"text-right"},lae={text:{left:"view-wide:max-view-desktop:text-left",center:"view-wide:max-view-desktop:text-center",right:"view-wide:max-view-desktop:text-right"},place:{left:"view-wide:max-view-desktop:mx-0",center:"view-wide:max-view-desktop:mx-auto",right:"view-wide:max-view-desktop:ml-auto view-wide:max-view-desktop:mr-0"},items:{left:"view-wide:max-view-desktop:grid-cols-1 view-wide:max-view-desktop:justify-items-start",center:"view-wide:max-view-desktop:grid-cols-1 view-wide:max-view-desktop:justify-items-center",right:"view-wide:max-view-desktop:justify-items-end"},justify:{left:"view-wide:max-view-desktop:justify-start",center:"view-wide:max-view-desktop:justify-center",right:"view-wide:max-view-desktop:justify-end"}},iae={text:{left:"max-view-wide:text-left",center:"max-view-wide:text-center",right:"max-view-wide:text-right"},place:{left:"max-view-wide:mx-0",center:"max-view-wide:mx-auto",right:"max-view-wide:ml-auto max-view-wide:mr-0"},items:{left:"max-view-wide:grid-cols-1 max-view-wide:justify-items-start",center:"max-view-wide:grid-cols-1 max-view-wide:justify-items-center",right:"max-view-wide:justify-items-end"},justify:{left:"max-view-wide:justify-start",center:"max-view-wide:justify-center",right:"max-view-wide:justify-end"}},dae={text:{left:"view-tablet:max-view-desktop:text-left",center:"view-tablet:max-view-desktop:text-center",right:"view-tablet:max-view-desktop:text-right"},place:{left:"view-tablet:max-view-desktop:mx-0",center:"view-tablet:max-view-desktop:mx-auto",right:"view-tablet:max-view-desktop:ml-auto view-tablet:max-view-desktop:mr-0"},items:{left:"view-tablet:max-view-desktop:grid-cols-1 view-tablet:max-view-desktop:justify-items-start",center:"view-tablet:max-view-desktop:grid-cols-1 view-tablet:max-view-desktop:justify-items-center",right:"view-tablet:max-view-desktop:justify-items-end"},justify:{left:"view-tablet:max-view-desktop:justify-start",center:"view-tablet:max-view-desktop:justify-center",right:"view-tablet:max-view-desktop:justify-end"}},cae={text:{left:"max-view-tablet:text-left",center:"max-view-tablet:text-center",right:"max-view-tablet:text-right"},place:{left:"max-view-tablet:mx-0",center:"max-view-tablet:mx-auto",right:"max-view-tablet:ml-auto max-view-tablet:mr-0"},items:{left:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-start",center:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-center",right:"max-view-tablet:justify-items-end"},justify:{left:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",right:"max-view-tablet:justify-end"}};function im(e){return e==="left"||e==="center"||e==="right"?e:void 0}function GB(e){return e==="start"?"left":e==="end"?"right":im(e)}function fae(e,o,t){let r=im(e)??"left",a=Lt("same",r,im(o),im(t)),n={};return a.tablet&&a.tablet!==r&&(n.tablet=a.tablet),a.phone&&a.phone!==r&&(n.phone=a.phone),n}function h4e(e,o,t,r,{atSectionLine:a=!1}={}){let n=fae(o,t,r),s=a?dae:lae,l=a?cae:iae;return[n.tablet?s[e][n.tablet]:"",n.phone?l[e][n.phone]:""].filter(Boolean).join(" ")}import{phoneKey as CS,readHidable as pae}from"efficient-easel/draw";var vS={contained:!1},kS=(e,o)=>({logos:[{kind:"list",key:e,name:"Logo",flat:!0,parts:[{kind:"block",type:"LogoBlock",box:["src",[o,"alt"]],when:(t,r)=>Qe(r?.src)||Qe(r?.[o])}]}]}),wS=e=>{let o=q(e.bandPadding)??40;return{top:o,bottom:o,topPhone:o,bottomPhone:o}},uae={...pe("heading",{color:"labels",letterSpacing:.2}),props:{...K,align:"center"}},mae={name:"Logos",boxProps:e=>({...J,direction:"column",gap:32,...de(e,wS(e))}),box:[...ae,...Ie(wS),["bandPadding","sectionPaddingTop",(e,o)=>de(o,wS(o)).sectionPaddingTop]],parts:[uae,{kind:"core",keep:["columns","logoHeight","grayscale"],rename:{logosPerRow:"columns"},props:vS,slots:kS("items","alt")}],drop:{...te,...ie,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"}},hae={kind:"group",name:"Mark",keepEmpty:!0,parts:[],props:iv(4,"main",{sectionCorners:2})},jB={top:24,bottom:24,topPhone:24,bottomPhone:24},xae={name:"Payment Methods",boxProps:e=>({...J,direction:"column",...de(e,jB)}),box:[...ae,...Ie(jB)],parts:[{kind:"group",name:"Methods",props:{...R,align:"center",gap:20,gapPhone:20,sectionBorder:{top:1,bottom:1},sectionPaddingTop:32,sectionPaddingBottom:32},parts:[{...pe("heading",{color:"labels"}),props:{...K,align:"center"}},{kind:"core",keep:[],as:"Logos",derive:{reads:[yo,br],props:e=>Qe(e[yo])?{[yo]:e[yo],...e[br]!==void 0?{[br]:e[br]}:{}}:{}},props:{...vS,look:"cards",grayscale:!1},slots:e=>({...kS("badges","label"),...Qe(e[yo])?{[No]:[Ch()]}:{}})},{kind:"group",name:"Reassurance",props:{...R,direction:"row",wrap:!0,justify:"center",gap:24,gapPhone:24,phoneRow:2,[CS("share")]:"content"},parts:[{kind:"list",key:"assurances",name:"Line",of:e=>(Array.isArray(e.assurances)?e.assurances:[]).filter(o=>Qe(o?.text)),props:{...R,direction:"row",align:"center",gap:8,gapPhone:8,phoneRow:2,[CS("share")]:"content"},item:e=>pae(e.text).hidden?{props:{_hidden:!0}}:{},parts:[hae,{kind:"text",key:"text",props:{...K,align:"center"},style:{...W("label",13),color:"labels",lineHeight:1.5}}]}]}]}],drop:{...te,...ie,contained:"the Box draws the site frame now; the Logos block inside it fills the Box's column (`contained: false`)"}},Iae={left:"start",center:"center",right:"end"},KB=e=>GB(e.align)??"left",VB=e=>e.size==="md"?"md":"sm",qB=12,YB={name:"Payment logos",boxProps:e=>({...R,direction:"row",wrap:!0,align:"center",justify:Iae[KB(e)],gap:qB,gapPhone:qB,phoneRow:2,[CS("share")]:"content"}),box:[...Jr],parts:[{kind:"text",key:"lead",props:se,styleFrom:e=>({size:Xs[VB(e)],lineHeight:1.5})},{kind:"core",keep:[],as:"Logos",derive:{reads:[yo,br],props:e=>({logoHeight:iF[VB(e)].mark,align:KB(e),...Qe(e[yo])?{[yo]:e[yo],...e[br]!==void 0?{[br]:e[br]}:{}}:{}})},props:{...vS,look:"marks",grayscale:!1,sectionAccent:er},slots:e=>({...kS("methods","label"),...Qe(e[yo])?{[No]:[Ch()]}:{}})}],drop:{size:"read as the wall's Logo height (S 16, M 20) and the lead's size (the footer size table, 12 / 13)",align:"read as the Box's justify and the wall's own Alignment (start is left, end is right)",editing:"the editor's preview flag, never a stored setting: the editor tells every block it is editing"}},XB={Logos:mae,PaymentBadges:xae,FooterPayment:YB,PaymentLogosBlock:YB},ZB=()=>({heading:HB.heading,items:UB()}),JB=()=>({heading:WB.heading,badges:zB(),assurances:$B()}),QB=()=>({...gf,methods:[]});import{mixHex as bae}from"efficient-shell/format";var R4e="none",F4e=[{label:"Nothing",value:"none"},{label:"Section above",value:"above"},{label:"Section below",value:"below"}];function eD(e){return e==="above"||e==="below"?e:null}var B4e="sf-ticker-join";function gae(e){return e==="above"?"sf-ticker-join-above":"sf-ticker-join-below"}function D4e(e){return`absolute inset-x-0 ${gae(e)}`}var En={direction:"row",share:"content",align:"center"},fd={top:14,bottom:14,topPhone:12,bottomPhone:12},dm={wrap:"nowrap",loop:"scroll",sectionAccent:ck,gap:60,gapPhone:32,separator:"dot",sectionBorder:{top:1,bottom:1}},oD={gap:120,gapPhone:64},cm={...Ko,sizeToken:{step:"label",px:14,pxPhone:12},letterSpacing:.25,lineHeight:1.5},tD={textStyle:"heading-3",letterSpacing:.005,case:"upper",lineHeight:1},pd={top:16,bottom:16,topPhone:12,bottomPhone:12},ud={justify:"between",wrap:"wrap",gap:32,separator:"none"},md={...Ko,letterSpacing:.1,lineHeight:1.5};var rD=e=>e.size==="display",yae=(e,o)=>{let t=Uu(e,o),r=e.tone!=="plain"&&t?.text&&t.background?bae(t.text,t.background,.3):null;return r?{color:r}:{}},Sae=(e,o)=>e.tone!=="plain"&&or(e.sectionAccent)===null?Qo("background")(e,o):{},aD=(e,o)=>({kind:"list",key:"items",name:"Item",flat:!0,when:o,parts:[{kind:"text",key:"text",props:se,style:e,styleFrom:yae}]}),wae={name:"Scrolling Bar",boxProps:(e,o)=>({...J,...En,...dm,...tv[mh(e.separator)]===""?oD:{},...de(e,fd),...Sae(e,o)}),box:[["scrollDirection","scrollDirection",e=>XA(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=>mh(e)],["join","join",e=>eD(e)??void 0],["borders","sectionBorder",e=>e===!1?void 0:{top:1,bottom:1}],...ae,["tone","sectionAccent",(e,o)=>or(o.sectionAccent)??er],...Ie(fd)],parts:[aD(cm,e=>!rD(e)),aD(tD,rD)],drop:{...te,...ie,size:"each item's Text style: Small \u2192 Body 5, Display \u2192 Heading 3"}},nD=e=>e?.tone==="muted",sD=e=>dc(yn(e)),Cae={name:"Spec Strip",boxProps:(e,o)=>({...J,...En,...ud,...e.fill==="none"?{sectionBorder:{top:1}}:{sectionAccent:sD(o)},...de(e,pd)}),box:[...ae.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,t)=>o.fill==="none"?e:sD(t)],...Ie(pd)],parts:[{kind:"list",key:"cells",name:"Cell",flat:!0,parts:[{kind:"text",key:"text",props:K,style:md,when:(e,o)=>!nD(o)},{kind:"text",key:"text",props:se,style:md,when:(e,o)=>nD(o)}]}],drop:{...te,...ie,fill:"None \u2192 no fill and a line on top. Dark band (the default) \u2192 the Box's theme is the site's first dark preset that is not its page (lib/theme `darkBandIndex`; Theme 2 with no site theme): the old fixed `plate-band` colour, as a theme"}},lD={Ticker:wae,SpecStrip:Cae};import{jsxs as _n,jsx as eo}from"react/jsx-runtime";import{Fragment as FS}from"react";import{Fragment as Nae,jsx as OS}from"react/jsx-runtime";import{Fragment as fD,jsx as Id,jsxs as Oae}from"react/jsx-runtime";import{createContext as ES,useContext as gd,useEffect as _ae,useId as Aae,useMemo as Lae,useRef as Rae}from"react";import{armEntrance as Fae}from"efficient-shell/format";import{jsx as vae}from"react/jsx-runtime";import{useEffect as dD,useRef as iD,useState as kae}from"react";import{armEntrance as Tae,entranceAttrs as Pae,playEntrance as Eae}from"efficient-shell/format";function cD({views:e,editing:o,boxClass:t,boxAttrs:r,boxStyle:a,takesViewHide:n=!1,atEdge:s=!1,children:l}){let d=iD(null),c=Ic(),f=qr(),u=n?f:os,p=hd(d,!0,s),{attrs:h,style:I}=Pae(e[p]),g=iD(TS.seed(e)),C=JSON.stringify(e);return dD(()=>{let w=d.current;if(w){if(o){let T=TS.next(g.current,e,p);g.current=T.seen,T.play&&Eae(w);return}return Tae(w)}},[C,p,o]),u.scope(vae("div",{ref:d,className:Yr(`${Qn}${c.fill}${t?` ${t}`:""}`,u.className),...r,...u.attrs,...h,...Object.keys(I).length||a?{style:{...a,...I}}:{},children:c.inner(l)}))}var TS={seed(e){return{desktop:JSON.stringify(e.desktop),tablet:JSON.stringify(e.tablet),phone:JSON.stringify(e.phone)}},next(e,o,t){let r=TS.seed(o);return{play:r[t]!==e[t],seen:r}}};function hd(e,o=!0,t=!1){return xd(e,o,t)??"desktop"}function xd(e,o=!0,t=!1){let[r,a]=kae(void 0),n=xc(t?"edge":"by-box"),{phone:s,tablet:l}=pb(n);return dD(()=>{if(!o)return;let d=e.current?.ownerDocument?.defaultView??(typeof window>"u"?null:window);if(!d?.matchMedia){a("desktop");return}let c=d.matchMedia(s),f=d.matchMedia(l),u=()=>a(c.matches?"phone":f.matches?"tablet":"desktop");return u(),c.addEventListener("change",u),f.addEventListener("change",u),()=>{c.removeEventListener("change",u),f.removeEventListener("change",u)}},[e,o,s,l]),r}var fm=ES(null),uD=ES(null),mD=ES(null);function u5e({needles:e,styles:o,motions:t=eR,type:r,atEdge:a=!1,children:n}){let s=Aae(),l=xc(a?"edge":"by-box"),d=JSON.stringify([s,e,o,t,r]),c=Lae(()=>{let u=Object.keys(t).filter(p=>tR(t[p]));return f1(e,o,s,p=>Ui(r,p),p=>s1(r,p),p=>u.includes(p)?Ly(t[p]):null,u)},[d]);if(!c)return Id(fD,{children:n});let f=p1(c,{inBox:l});return Oae(fD,{children:[f&&Id("style",{href:`${Bae}${s}-${Dae(f)}`,precedence:xD,dangerouslySetInnerHTML:{__html:f.replace(/</g,"\\3c ")}}),Id(fm.Provider,{value:c,children:n})]})}var PS=new WeakMap;function pD(e,o){let t=Ry(o.filter(a=>a.arm)),r=o.some(a=>a.entering)?void 0:Ry(o.filter(a=>a.scroll));for(let a of o)a!==t&&a.undo&&(a.undo(),a.undo=void 0),a!==r&&a.undoScroll&&(a.undoScroll(),a.undoScroll=void 0);t?.arm&&!t.undo&&(t.undo=t.arm()),r?.scroll&&!r.undoScroll&&(r.undoScroll=r.scroll()),o.some(a=>a.lift)?(sR(e.ownerDocument),e.setAttribute(uu,"")):e.removeAttribute(uu)}function hD(e){let o=Rae(null),t=e?.motion?.entrance??null,r=e?.motion?.scroll??null,a=e?.motion?.hover==="lift",n=hd(o,t!==null||r!==null),s=t?t[n]:null,l=r&&r[n].effect!=="none"?r[n]:null,d=JSON.stringify([s,l]);return _ae(()=>{let c=o.current,f=nR(c?.parentElement??null);if(!t&&!r&&!a||!c||!f)return;let u=s?()=>{let I=rR(f,s),g=Fae(f);return()=>{g?.(),I()}}:null,p=PS.get(f)??[];PS.set(f,p);let h={element:c,arm:u,entering:s!==null&&s.kind!=="none",scroll:l?()=>aR(f,l):null,lift:a};return p.push(h),pD(f,p),()=>{let I=p.indexOf(h);I<0||(p.splice(I,1),h.undo?.(),h.undo=void 0,h.undoScroll?.(),h.undoScroll=void 0,pD(f,p),p.length||PS.delete(f))}},[d,a]),o}var xD="sf-part-styles",Bae=`${xD}-`;function Dae(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 ID(e){let o=gd(fm),t=gd(uD),r=u1(o,e);return r&&r.stamp!==t?r:null}function m5e(e){return fb(gd(fm),e)}function gD({stamp:e,children:o}){return Id(uD.Provider,{value:e,children:o})}function h5e({children:e}){let o=gd(fm);return Id(mD.Provider,{value:o,children:e})}function x5e(e){return fb(gd(mD),e)}function bd({value:e,children:o}){let t=ID(e),r=hD(t);return t?OS(gD,{stamp:t.stamp,children:OS("span",{ref:r,[ob]:t.stamp,...t.textStyle?{[Rs]:t.textStyle}:{},children:o})}):OS(Nae,{children:o})}import{jsx as _S,Fragment as Mae}from"react/jsx-runtime";function bD({className:e=""}){return _S("sup",{className:`text-accent tracking-normal text-[length:min(1em,max(0.75em,11px))] ${e}`,children:"\xAE"})}function pm(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(_S(bD,{},`r${a}`))}),_S(Mae,{children:t})}var C5e=bD;import{jsx as On}from"react/jsx-runtime";import{Component as zae,createContext as $ae,lazy as L5e,Suspense as R5e,useContext as Gae,useSyncExternalStore as jae}from"react";var Hae="hrefRewrite";function Uae(){return jd("efficient.link-href-rewrites",()=>({rewrites:new Map,count:0,missed:new Set}))}function Wae(){return typeof process<"u"&&!0}function T5e(e){let o=e?.[Hae];return typeof o=="string"?o.trim():""}function yD(e){if(!e)return null;let o=Uae(),t=o.rewrites.get(e);return!t&&!Wae()&&o.missed.add(e),t??null}var Kae={Link:Ak,Image:_k},SD=$ae(Kae);function H5e({runtime:e,children:o}){return On(SD.Provider,{value:e,children:o})}function LS(){return Gae(SD)}function U5e(){return LS().pagePath??null}var Vae=()=>()=>{},qae=()=>yc()||null,Yae=()=>null;function Xae(){return jae(Vae,qae,Yae)}function wD({hrefRewrite:e,newTab:o,...t}){let{Link:r}=LS(),a=Xae(),n=o===!0?{...t,...ad}:o==="auto"?{...t,...GF(t.href,a)}:t,s=yD(e);return s?On(AS,{name:s.name,href:n.href,fallback:On(r,{...n}),children:On(Zae,{Link:r,rewrite:s.rewrite,...n})},s.key):On(r,{...n})}function Zae({Link:e,rewrite:o,...t}){let r=Se(o(t.href)),a=r&&TC(r)?r:t.href;return On(e,{...t,href:a})}var AS=class extends zae{state={failed:!1,href:this.props.href};static getDerivedStateFromProps(o,t){return o.href===t.href?null:{failed:!1,href:o.href}}static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(o){console.error(`The link href rewrite ${this.props.name} failed; the link goes where it was typed.`,o)}render(){return this.state.failed?this.props.fallback:this.props.children}};function CD(e){let{Image:o}=LS();return On(o,{...e})}function Nr(e,o=!1,t){let r=ane(o),a=qd(e);if(a.length===1){let[s]=a,l=PC(s),d=l?tne(l,s.children):s.children;return _n(bd,{value:e,children:[t,um(d,r)]})}let n=[];return a.forEach((s,l)=>{if(s.bullet){n.push(eo("span",{"data-sf-bullet":"",className:Jae,children:um(s.children,r)},l));return}if(s.number!=null){n.push(_n("span",{"data-sf-number":s.number,className:Qae,children:[_n("span",{className:ene,children:[s.number,"."]}),um(s.children,r)]},l));return}l>0&&!one(a[l-1])&&n.push(eo("br",{},`br${l}`)),n.push(eo(FS,{children:um(s.children,r)},l))}),_n(bd,{value:e,children:[t,n]})}var Jae="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['\xB7']",Qae="relative block pl-[2em]",ene="absolute left-0 w-[1.6em] text-right tabular-nums";function one(e){return e.bullet||e.number!=null}var vD="text-accent underline underline-offset-[0.18em]";function tne(e,o){let[t,...r]=o;return t?.kind==="text"?[{kind:"text",text:`${e}${t.text}`},...r]:[{kind:"text",text:e},...o]}function rne(e){return cs(e)||void 0}function um(e,o){let t=[],r=!1;return e.forEach((a,n)=>{if(a.kind==="text"){t.push(eo("span",{children:pm(a.text)},n)),r=!0;return}r||t.push(eo("span",{},`e${n}`)),t.push(TD(a,n,o)),r=!1}),r||t.push(eo("span",{},"end")),t}function RS(e,o){return e.length===1&&e[0].kind==="text"?pm(e[0].text):e.map((t,r)=>t.kind==="text"?eo(FS,{children:pm(t.text)},r):TD(t,r,o))}function ane(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function Z5e(e){return kD(e)}function kD(e,o){let t=e.split(`
|
|
320
|
-
`);return _n(bd,{value:e,children:[o,t.map((r,a)=>_n(FS,{children:[a>0?eo("br",{}):null,eo("span",{children:r})]},a))]})}function TD(e,o,t){if(e.kind==="link")return Gu(e.href)?eo(wD,{newTab:"auto",href:e.href,className:vD,children:RS(e.children,t)},o):eo("a",{href:e.href,className:vD,children:RS(e.children,t)},o);let r=RS(e.children,t),a=vC[e.kind];if(a)return eo("span",{[kC]:a,children:r},o);switch(e.kind){case"underline":return eo("u",{children:r},o);case"sup":return eo("sup",{children:r},o);case"sub":return eo("sub",{children:r},o);case"color":{let n=rne(e.color);return n?eo("span",{style:{color:n},children:r},o):eo("span",{children:r},o)}case"accent":case"highlight":return eo("em",{className:t,children:r},o);case"bold":return eo("strong",{className:"font-semibold",children:r},o);case"italic":return eo("em",{className:"italic",children:r},o);case"strike":return eo("s",{className:"line-through",children:r},o);default:return eo("span",{children:r},o)}}function J5e(e,o=!0,t=!1){let r=e.split(`
|
|
321
|
-
`);return eo(bd,{value:e,children:r.map((a,n)=>_n("span",{children:[t?kD(a):Nr(a,o),n<r.length-1?eo("br",{}):null]},n))})}function PD(e){return e.split(/\n\s*\n/).map(o=>o.trim()).filter(Boolean)}import{tabletKey as ED}from"efficient-easel/screen/lib/content/view-tiers";var OD={direction:"column",justify:"between",gap:14,gapPhone:14,sectionPaddingLeft:14,sectionPaddingRight:14,[ED("sectionPaddingLeft")]:0,sectionPaddingLeftPhone:0,sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",[ED("sectionHeightMode")]:"auto",sectionHeightModePhone:"auto"},BS={name:"Year and title",direction:"column",gap:14,gapPhone:14};import{tabletKey as nne}from"efficient-easel/draw";var co={text:"Button label",href:"#"},ur=e=>e.replace(/\*([^*]+)\*/g,"==$1=="),Ge={eyebrow:"Eyebrow",heading:"Main heading",accent:"Highlight line",body:"Add a sentence or two of supporting copy.",button:"Button label",link:"#",sectionHeading:"Section heading",slideName:"Slide name",boxName:"Box name",headingAccent:"Section heading *here.*",sectionNumber:"Section number",imageCaption:"Image caption",bookingConfirmation:"Thanks \u2014 we'll email you to confirm.",imageMeta:"Image meta",label:"Label",value:"Value",viewAll:"View all",date:"Month DD, YYYY",category:"Category"};var mm={eyebrow:Ge.eyebrow,title:`Section heading
|
|
322
|
-
*Highlight line*`,intro:Ge.body,imageCaption:Ge.imageCaption,imageMeta:Ge.imageMeta,cta:co.text},_D=()=>[{date:i("Year"),title:i("Milestone title."),body:i("Describe what happened, in a sentence or two.")},{date:i("Year"),title:i("Milestone title."),body:i("Describe what happened, in a sentence or two.")},{date:i("Year"),title:i("Milestone title."),body:i("Describe what happened, in a sentence or two.")}],n3e={label:"Story Timeline",drawsPictures:!0,defaultProps:{layout:"split",eyebrow:"",title:"",intro:"",imageSrc:"",imageCaption:"",imageMeta:"",ctaText:"",ctaHref:"",entries:[],padTop:120,padBottom:120}};var hm={eyebrow:Ge.eyebrow,title:Ge.headingAccent,intro:Ge.body,cta:co.text},AD=()=>[{date:i("Year"),title:i("Milestone"),blurb:i("A short line about this milestone."),future:!1},{date:i("Year"),title:i("Milestone"),blurb:i("A short line about this milestone."),future:!1},{date:i("Year"),title:i("Milestone"),blurb:i("A short line about this milestone."),future:!1},{date:i("Year \u2192"),title:i("Upcoming"),blurb:i("A milestone still to come."),future:!0}],c3e={label:"Milestone Timeline",defaultProps:{eyebrow:"",title:"",intro:"",entries:[],ctaText:"",ctaHref:"",background:ti,padTop:120,padBottom:120}};var ND={buttonBorder:{width:0}},gm=(e,o,t={})=>({textStyle:"body-5",...W("label",e),letterSpacing:o,lineHeight:1.5,weight:400,...t}),nl=(e,o,t={})=>({...gm(e,o),...Ko,...t}),bm=(e,o,t)=>({...e,case:"upper",weight:500,letterSpacing:o,lineHeight:t}),yd=(e,o,t={})=>({textStyle:"body-1",fontRole:"heading",...e,weight:400,case:"none",lineHeight:o,...t}),kt=(e,o,t={})=>({kind:"text",key:e,props:K,style:o,...t}),LD=(e,o)=>o?.future===!0,xm=e=>PD(typeof e?.body=="string"?e.body:""),US=e=>lr(typeof e.background=="string"?e.background:void 0,Pn.TimelineTrack),DS=e=>US(e)===Mo?e:{...e,background:"transparent"},sne={name:"Milestone Timeline",skip:e=>$u(US(e)),boxProps:(e,o)=>{let t=ua(DS(e),o);return{...J,direction:"column",gap:60,[nne("gap")]:36,gapPhone:36,sectionBorder:{bottom:1},...et,...St(e,"TimelineTrack"),...zu(US(e),e,o),...t>=0?{sectionAccent:t}:{}}},box:[...ae.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,t)=>ma(e,DS(o),t)],...pa("TimelineTrack")],parts:[fS(om(Ju("eyebrow","title","intro"),["intro"])),{kind:"group",name:"Track",props:{...R,gap:48,gapPhone:48},parts:[{kind:"group",name:"Years",props:{...R,direction:"row",share:"equal",gap:0,line:!0,...et},parts:[{kind:"list",key:"entries",name:"Year",props:{...R,...OD},item:e=>({props:e.future===!0?{upcoming:!0}:{}}),parts:[{kind:"group",name:BS.name,props:{...R,...BS},parts:[kt("date",gm(13,.22,{color:"accent"}),{when:(e,o)=>!LD(e,o)}),kt("date",gm(13,.22,{color:"labels"}),{when:LD}),kt("title",{textStyle:"heading-3",...bm(W("headingSmall",20),-.02,1.1)},{role:"heading"})]},kt("blurb",yd(W("body",13),1.55),{props:se,mark:"accentItalic"})]}]},{kind:"group",name:"Button row",props:{...R,sectionBorder:{top:1,right:0,bottom:0,left:0},sectionPaddingTop:32},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:{...vo,align:"right",...ND},style:nl(13,.3)}]}]}],site:(e,o)=>ha({props:DS(e.props)},o),drop:{...te,...ie,background:"another colour is the Box's Fill, or a skip if no Fill holds it; 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"}},zS=e=>typeof e.layout=="string"?e.layout:"split",Im=e=>zS(e)==="split",WS=e=>!Im(e),MD=e=>zS(e)==="spine",lne=e=>WS(e)&&!MD(e),RD=(e,o,t,r)=>({kind:"group",name:"Picture",keepEmpty:!0,box:[["imageSrc","bgImage"]],props:{...R,sectionBorder:{top:1,right:1,bottom:1,left:1},darken:75,darkenStyle:"bottom",placement:"bottom-center",sectionHeightMode:"fixed",sectionHeightValue:e,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:o,sectionHeightUnitPhone:"px",...Do(12,16),...t},when:a=>r(a)&&typeof a.imageSrc=="string"&&a.imageSrc.trim()!=="",parts:[{kind:"group",name:"Caption",props:{...R,direction:"row",justify:"between",align:"center",gap:12,gapPhone:12,share:"content",phoneRow:2},parts:[kt("imageCaption",nl(11,.24,{color:"text"})),kt("imageMeta",nl(11,.24,{color:"accent"}),{props:{...K,align:"right"}})]}]}),FD=(e={})=>({kind:"button",key:"ctaText",href:"ctaHref",variant:"ghost",props:{...vo,...e,...ND},style:nl(13,.3)}),NS=()=>[kt("title",{textStyle:"heading-3",...bm(W("headingSmall",24,20),-.02,1.5)},{role:"heading",mark:"accentItalic"}),{kind:"block",type:"Text",props:{...K,_partStyles:{text:yd(W("body",17,16),1.6)}},box:[["body","text",(e,o)=>Sl(xm(o)[0]??"")]],when:(e,o)=>xm(o).length>0},{kind:"block",type:"Text",props:{...se,_partStyles:{text:yd(W("body",17,16),1.6,{paragraphSpacing:14})}},box:[["body","text",(e,o)=>Sl(xm(o).slice(1).join(`
|
|
323
|
-
|
|
324
|
-
`))]],when:(e,o)=>xm(o).length>1}],MS=()=>kt("date",gm(13,.24,{color:"accent"})),HS=(e,o,t={})=>kt(e,o,{...t,props:{...K,...t.props??{},align:"center"}}),BD=ot("headingMedium",40,5,76),DD={sectionBorder:{bottom:1}},ine={name:"Story Timeline",skip:e=>zS(e)==="track"?'display "track": not converted (it draws the Milestone rail; a Track story is not stored anywhere)':void 0,boxProps:e=>Im(e)?{...J,direction:"row",share:[40],gap:80,gapPhone:48,align:"start",...DD,...St(e,"Timeline")}:{...J,direction:"column",gap:48,gapPhone:48,align:"center",...DD,...St(e,"Timeline")},box:[...ae,...pa("Timeline")],parts:[{kind:"group",name:"Heading",props:{...R,gap:24,gapPhone:24},when:Im,parts:[kt("eyebrow",nl(12,.3,{color:"accent"}),{role:"eyebrow"}),kt("title",{textStyle:"heading-2",...bm(BD,-.03,.94)},{role:"heading",mark:"accentItalic"}),kt("intro",yd(W("body",14),1.6),{props:{...se,maxWidth:360},mark:"accentItalic"}),RD(667,419,{},()=>!0),FD()]},{kind:"group",name:"Chapters",props:{...R,gap:48,gapPhone:48,line:!1},when:Im,parts:[{kind:"list",key:"entries",name:"Chapter",props:{...R,direction:"row",gap:24,gapPhone:8,share:[12],align:"start"},parts:[MS(),{kind:"group",name:"Words",props:{...R,gap:14,gapPhone:14},parts:NS()}]}]},{kind:"group",name:"Heading",props:{...R,gap:24,gapPhone:24,align:"center",maxWidth:760,widthFit:"fill"},when:WS,parts:[HS("eyebrow",nl(12,.3,{color:"accent"}),{role:"eyebrow"}),HS("title",{textStyle:"heading-2",...bm(BD,-.03,.94)},{role:"heading",mark:"accentItalic"}),HS("intro",yd(W("body",14),1.6),{props:{...se,maxWidth:520},mark:"accentItalic"}),FD({align:"center"})]},RD(506,192,{maxWidth:900,widthFit:"fill"},WS),{kind:"group",name:"Chapters",props:{...R,gap:48,gapPhone:48,line:!0,maxWidth:760,widthFit:"fill",sectionPaddingTop:16},when:MD,parts:[{kind:"list",key:"entries",name:"Chapter",props:{...R,gap:8,gapPhone:8},parts:[MS(),{kind:"group",name:"Words",props:{...R,gap:14,gapPhone:14},parts:NS()}]}]},{kind:"group",name:"Chapters",props:{...R,gap:56,gapPhone:56,maxWidth:1e3,widthFit:"fill",sectionPaddingTop:16,mirrorCards:"even"},when:lne,parts:[{kind:"list",key:"entries",name:"Chapter",props:{...R,direction:"row",gap:64,gapPhone:0,share:[50],align:"start"},parts:[{kind:"group",name:"Entry",props:{...R,gap:8,gapPhone:8},parts:[MS(),{kind:"group",name:"Words",props:{...R,gap:14,gapPhone:14},parts:NS()}]},{kind:"group",name:"Spacer",props:{...R},keepEmpty:!0,parts:[]}]}]}],drop:{...te,...ie,layout:"the Box's own arrangement replaces it: Split a row of two Boxes; Spine and Alternating a centred column (Track is skipped)"}},HD=()=>({eyebrow:mm.eyebrow,title:ur(mm.title),intro:mm.intro,ctaText:co.text,ctaHref:co.href,entries:_D()}),UD=()=>({eyebrow:hm.eyebrow,title:ur(hm.title),intro:hm.intro,ctaText:co.text,ctaHref:co.href,entries:AD()}),WD={TimelineTrack:sne,Timeline:ine};import{tabletKey as une}from"efficient-easel/draw";import{rootIsDark as dne}from"efficient-shell/format";function T3e(e="auto"){return e==="light"?!0:e==="dark"?!1:!dne({whenUnset:!0})}function zD(e,o){return Number.isFinite(e)&&Number.isFinite(o)&&!(e===0&&o===0)}function $S(e){let o=Number.parseFloat(e??"");return Number.isFinite(o)?o:0}var cne=["tall","square","wide"],fne="tall";function $D(e){return cne.includes(String(e??""))?String(e):fne}var O3e={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"},_3e=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
325
|
-
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
|
|
326
|
-
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""}],pne=/^https?:\/\//i;function A3e(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:$S(e.lat),lng:$S(e.lng),mapsUrl:pne.test(o)?o:""}}function GS(e){let o=String(e??"").split(" \xB7 ");return{state:(o[0]??"").trim(),country:(o[1]??"").trim()}}var L3e="other",R3e={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 GD(e){let o=String(e??"").replace(/[^+\d]/g,"");return o?`tel:${o}`:void 0}var Tt=e=>typeof e=="string"?e:e==null?"":String(e),KS=e=>Array.isArray(e.locations)?e.locations.map(o=>o??{}):[],sl=e=>Tt(e.group),QD=e=>`loc-${e}`,eN=e=>Tt(e.state).trim()||GS(Tt(e.region)).state,oN=e=>Tt(e.country).trim()||GS(Tt(e.region)).country,jD=e=>[eN(e),oN(e)].filter(Boolean).join(" \xB7 "),mne=e=>KS(e).some(o=>Tt(o.photo).trim()!==""),hne=e=>KS(e).some(o=>zD(Number(o.lat),Number(o.lng))),xne=(e,o)=>KS(e).filter(t=>sl(t)===sl(o)).length,Ine=(e,o)=>xne(e,o)===1?"wide":$D(e.imageShape),jS={top:100,bottom:100,topPhone:60,bottomPhone:60},KD=48,Yt=(e,o={})=>({...Rt(e),...o}),VS={top:1,right:1,bottom:1,left:1},qS={...R,direction:"row",share:"equal",gap:0},gne=e=>o=>o>Xi(o)?{...R,gap:0}:{...qS,...o>1?{phoneRow:e}:{}},bne={kind:"group",name:"Gallery",props:{...R,gap:20,_hidden:!0},when:mne,parts:[{kind:"group",name:"Gallery head",props:{...R,direction:"row",justify:"between",align:"end",gap:24,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},parts:[pe("galleryKicker",Yt(12,{color:"accent",letterSpacing:.3})),{kind:"text",key:"galleryHint",props:{...se,align:"right",alignPhone:"left"},style:Yt(11,{letterSpacing:.22,alignPhone:"left"})}]},{kind:"group",name:"Groups",props:{...R,gap:24},parts:[{kind:"list",key:"locations",name:"City picture",props:{...R,darken:85,darkenStyle:"bottom",placement:"bottom-left",sectionBorder:VS,...Do(12,12)},item:(e,o,t)=>({props:{...Tt(e.photo).trim()?{bgImage:Tt(e.photo),hover:"mono"}:{},link:`#${QD(o)}`,boxShape:Ine(t,e)}}),parts:[{kind:"text",key:"name",props:K,style:Yt(11,{letterSpacing:.22,color:"text"})}],groups:{of:sl,name:"Group",props:{...R,gap:10},head:e=>({label:sl(e[0]??{})}),parts:[pe("label",Yt(11,{color:"accent",letterSpacing:.3}))],itemsName:"Cities",itemsProps:gne(2),perRow:Xi,rowName:"Row",rowProps:{...qS,phoneRow:2}}}]}]},yne={kind:"group",name:"Words",props:{...R,gap:12,gapPhone:12,...Do(28,28),sectionHeightMode:"fixed",sectionHeightValue:280,sectionHeightUnit:"px",sectionHeightModePhone:"auto"},parts:[{kind:"group",name:"Name row",props:{...R,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:{...R,gap:6,gapPhone:6},parts:[{kind:"text",key:"name",role:"heading",props:K,style:{textStyle:"heading-3",...W("headingSmall",30),case:"upper",weight:500,lineHeight:1,letterSpacing:-.02}},{kind:"block",type:"Text",props:{...K,_partStyles:{text:Yt(12,{color:"accent",letterSpacing:.24,lineHeight:1.5})}},box:["region","state","country"].map(e=>[e,"text",(o,t)=>jD(t)]),when:(e,o)=>jD(o??{})!==""}]},{kind:"group",name:"Time zone",props:{...R,sectionBorder:VS,...Do(6,10)},parts:[{kind:"text",key:"timezone",props:{...se,textFit:"line"},style:Yt(12,{letterSpacing:.22,lineHeight:1.5})}]}]},{kind:"text",key:"address",props:se,style:{textStyle:"body-5",fontRole:"heading",...W("body",14),lineHeight:1.5}},{kind:"block",type:"ButtonBlock",props:{...vo,...vn,variant:"ghost",arrow:!1,_partStyles:{label:Yt(13,{letterSpacing:.18,color:"text",lineHeight:24/13})}},box:[["phone","label"],["phone","href",e=>GD(Tt(e))??"#"]],when:(e,o)=>Tt(o?.phone).trim()!==""},{kind:"text",key:"hours",props:se,style:Yt(12,{letterSpacing:.18,lineHeight:1.7})}]},Sne={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)=>eN(t)]),...["region","country"].map(e=>[e,"country",(o,t)=>oN(t)])]},wne={kind:"group",name:"Map",props:{...R,sectionBorder:{top:1,right:0,bottom:0,left:0}},parts:[Sne]},Cne={kind:"list",key:"locations",name:"City",props:(e,o)=>({...R,gap:0,justify:"between",sectionBorder:VS,jumpHighlight:!0,sectionAccent:ua(e,o)>=0?el(e.sectionAccent,o):-1}),item:(e,o)=>({props:{anchor:QD(o)}}),parts:[yne,wne],groups:{of:sl,name:"Group",props:{...R,gap:20},head:e=>{let o=e[0]??{};return{key:sl(o),groupName:Tt(o.groupName),count:`${e.length} location${e.length===1?"":"s"}`}},parts:[{kind:"group",name:"Group head",props:{...R,direction:"row",justify:"between",align:"end",gap:16,share:"content",sectionBorder:{bottom:1},sectionPaddingBottom:16},when:(e,o)=>Tt(o?.key).trim()!=="",parts:[pe("key",Yt(13,{color:"accent",letterSpacing:.3})),{kind:"text",key:"groupName",role:"heading",props:K,style:{textStyle:"heading-3",...W("headingSmall",24),case:"upper",weight:500,letterSpacing:-.01}},{kind:"text",key:"count",props:se,style:Yt(12,{letterSpacing:.22})}]}],itemsName:"Cities",itemsProps:e=>({...qS,columns:Xi(e),[une("columns")]:1})}},VD=Yt(10,{letterSpacing:.25}),vne={kind:"block",type:cr,props:{...R,name:"Credit",direction:"row",justify:"end",align:"center",gap:6,share:"content",wrap:!0},when:hne,slot:fr,keepEmpty:!0,parts:[{kind:"block",type:"Text",props:{...se,text:"Location coordinates \xA9",_partStyles:{text:VD}}},{kind:"block",type:"ButtonBlock",props:{...vo,...vn,variant:"ghost",arrow:!1,label:"OpenStreetMap contributors",href:"https://www.openstreetmap.org/copyright",_partStyles:{label:{...VD,color:"labels"}}}}]},qD=(e,o)=>Object.fromEntries(o.filter(t=>e[t]!==void 0).map(t=>[t,e[t]])),YD=["sectionPaddingTop","sectionPaddingTopTablet","sectionPaddingTopPhone"],XD=["sectionPaddingBottom","sectionPaddingBottomTablet","sectionPaddingBottomPhone"],ZD=e=>e.map(o=>[o,o,(t,r)=>de(r,jS)[o]]),JD=["sectionAccent","sectionAccent",ma],kne=[...Jr,...ps,...Object.values(lo)],Tne={name:"City pictures",skip:e=>Zt(e)?`fed by the data source "${Zt(e)}": its cities are read as the page is served, not stored on the node`:void 0,boxProps:(e,o)=>({...J,direction:"column",gap:40,anchor:"studios",...et,...qD(de(e,jS),YD),sectionPaddingBottom:KD,sectionPaddingBottomPhone:KD,...kn(e,o)}),box:[...ae.filter(e=>e!=="sectionAccent"&&e!=="anchor"),JD,["anchor","anchor",e=>Nl(e).trim()?e:"studios"],...ZD(YD)],parts:[Ju("sectionNumber","heading","tagline"),bne],also:[{name:"City maps",boxProps:(e,o)=>({...J,direction:"column",gap:40,sectionBorder:{bottom:1},...et,sectionPaddingTop:0,sectionPaddingTopPhone:0,...qD(de(e,jS),XD),...kn(e,o)}),box:[...kne,JD,...ZD(XD)],parts:[Cne,vne]}],reads:{mapTheme:"City maps Box: each Map block's Map theme",imageShape:"City pictures Box: each picture Box's Box shape"},site:ha,drop:{...te,...ie,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)"}},tN={ContactLocations:Tne};import{SITE_SIDE as aN,sideLengthAt as Pne}from"efficient-easel/screen/lib/content/length-units";var ym="boxes",YS=3,XS=()=>({type:oe,props:{direction:"column"},slots:{[He]:[{type:"ImageBlock"},{type:oe,props:{direction:"column"},slots:{[He]:[{type:"Text",props:jr()},{type:"Text"}]}}]}}),rN=()=>Array.from({length:YS},XS);import{viewKeyAt as ZS}from"efficient-easel/draw";var Ene=["FAQ","Footprint","LongRead","ProcessSteps","RelatedProducts"];var xa=(e,o)=>()=>({top:e,topPhone:o}),nN=e=>o=>{let t=Mu(e),r={...o,[sr.top]:Xl(o,t).top},a=d=>{let c=Pne(r,sr,Ga,d,"top");return c?.unit==="px"?c.value:void 0},n=d=>q(o[ZS(sr.top,d)])===void 0?void 0:a(d),s=n("tablet"),l=n("mobile");return{top:a("desktop")??t.top??0,...s!==void 0?{topTablet:s}:{},...l!==void 0?{topPhone:l}:{}}},One={Collections:xa(120,70),Events:xa(120,70),FAQ:xa(120,70),GalleryB:xa(120,70),FitmentTable:xa(120,80),SpecTable:xa(120,80),LongRead:xa(120,80),RelatedProducts:xa(0,0),Footprint:nN("Footprint"),ProcessSteps:nN("ProcessSteps"),ProductGrid:e=>({top:q(e.padTop)??120,topPhone:0})};function _ne(e,o={}){let t=j(kr,e),r=j(One,e);if(!t||!r)throw new Error(`section-to-box-rows-head: "${e}" has no head row or no head room`);let a=t.padKey,n=wt(e),s=tm(e),l=t.headRows.filter(c=>![t.num,t.title,t.description,"linkText","linkHref"].includes(c)),d={...Object.fromEntries(l.filter(c=>!(c in s)).map(c=>[c,"a head setting no Header Box part reads (lib/document/blocks/general/section-head-looks `headReads`)"])),...o.drop};return{name:j(Kd,e)??e,boxProps:(c,f)=>{let u=r(c),p=o.roomBelow?{sectionPaddingBottom:o.roomBelow.bottom,sectionPaddingBottomPhone:o.roomBelow.bottomPhone}:{},h=typeof o.boxProps=="function"?o.boxProps(c,f):o.boxProps??{},I=Tn(e)==="editorial"?et:{};return{...J,direction:"column",gap:nd[Tn(e)],sectionPaddingTop:u.top,...u.topTablet!==void 0?{sectionPaddingTopTablet:u.topTablet}:{},...u.topPhone!==void 0?{sectionPaddingTopPhone:u.topPhone}:{},...I,...p,...h}},box:[...ae,...a?[[a,"sectionPaddingTop",(c,f)=>r(f).top]]:[]],parts:[n,...(()=>{let c=a&&FF.has(e)?{[ZS(a,"tablet")]:0,[ZS(a,"mobile")]:0}:{},f={...a?{[a]:0}:{},...c,...o.coreProps},u={kind:"core",keep:"rest",...Object.keys(f).length?{props:f}:{},...o.slots?{slots:o.slots}:{}};return[o.coreBox?{kind:"group",name:o.coreBox.name,props:o.coreBox.props,parts:[u]}:u]})(),...o.partsAfter??[]],...Object.keys(s).length?{reads:s}:{},...Object.keys(d).length?{drop:d}:{},...o.pressHeading?{pressKeepsEmpty:[t.title]}:{},...o.skip?{skip:o.skip}:{}}}var Ane={...R,direction:"accordion",rowStyle:"numbered"},Lne={sectionPaddingLeft:aN,sectionPaddingRight:aN},Rne={Footprint:{slots:{[No]:[wv()]},pressHeading:!0},ProcessSteps:{slots:(e,o)=>o.press?{[ym]:rN().map(t=>({...t,props:{...t.props,...Lne}}))}:{},boxProps:{gapPhone:nd.editorial}},FAQ:{slots:{[No]:[Sv()]},pressHeading:!0,coreBox:{name:"Questions",props:Ane},coreProps:{sectionAccent:er},roomBelow:{bottom:120,bottomPhone:70},boxProps:(e,o)=>o.press?{}:{[EF]:Sn},skip:e=>{let o=e._partStyles??{},t=yv().filter(r=>o[r]!==void 0);return t.length?`held: its rows carry their own run style (_partStyles ${t.map(r=>`"${r}"`).join(", ")}), which the Box path does not draw the same`:void 0}}},sN=Object.fromEntries(Ene.map(e=>[e,_ne(e,j(Rne,e))]));import{BLOCK_WIDTH_LIMIT as Bne}from"efficient-easel/draw";var Sm={eyebrow:Ge.eyebrow,title:Ge.headingAccent,deck:"Add a sentence or two introducing this document."},b6e={label:"Document masthead",defaultProps:{eyebrow:"",title:"",deck:"",meta:[]}};var JS="titleLevel",Fne=e=>e===2?"h2":"h1",QS=e=>Fne(e?.[JS])==="h2";var mN={minWidth:Bne.min},lN=(e,o,t)=>({...pe(e,{...o,...Qi}),props:{...K,align:"right",...wn,...t}}),hN={top:1,bottom:0},ow=(e,o,t,r)=>({kind:"group",name:e,props:{...R,sectionPaddingBottom:o,sectionPaddingBottomPhone:t},parts:[r]}),iN={widthFit:"fill",...mN},dN={top:100,bottom:60,topPhone:60,bottomPhone:40},Dne={...W("label",13),letterSpacing:.22,lineHeight:1.8},cN={textStyle:"heading-1",...ot("headingLarge",56,8,128),case:"upper",weight:500,lineHeight:.88,letterSpacing:-.04},Nne=()=>({name:"Page Header",boxProps:e=>({...J,direction:"column",gap:0,sectionBorder:{bottom:1},...de(e,dN)}),box:[...ae,...Ie(dN)],parts:[{kind:"group",name:"Header",props:{...R,direction:"row",align:"end",justify:"between",gap:40,gapPhone:16,share:"content",sectionPaddingBottom:32},parts:[ow("Eyebrow",12,0,{...pe("eyebrow",W("label",13)),props:{...K,...wn}}),{kind:"text",key:"title",role:"heading",props:{...K,tag:"h1",...iN},style:cN,mark:"accentItalic",when:e=>!QS(e)},{kind:"text",key:"title",role:"heading",props:{...K,tag:"h2",...iN},style:cN,mark:"accentItalic",when:QS},{kind:"group",name:"Details",props:{...R,align:"stretch",gap:0,gapPhone:0,sectionPaddingBottom:12,sectionPaddingBottomPhone:0},parts:[{kind:"list",key:"meta",name:"Detail",flat:!0,parts:[ed("label","value",Dne,wn)]}]}]},{kind:"group",name:"Deck",props:{...R,maxWidth:760,sectionBorder:hN,sectionPaddingTop:28},parts:[{kind:"text",key:"deck",props:se,style:{textStyle:"body-1",fontRole:"accent",...W("body",22,19),italic:!0,lineHeight:1.5}}]}],drop:{...te,...ie,[JS]:"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"}}),xN=()=>({eyebrow:Sm.eyebrow,title:ur(Sm.title),deck:Sm.deck,meta:[{label:Ge.label,value:Ge.value},{label:Ge.label,value:Ge.value}]}),fN={top:80,bottom:40,topPhone:60,bottomPhone:32},Mne={...W("label",13),letterSpacing:.18,lineHeight:1.8},pN={...W("label",13),letterSpacing:.22,lineHeight:1.9},Hne=()=>({name:"Issue Header",boxProps:e=>({...J,direction:"column",gap:0,sectionBorder:{bottom:1},...de(e,fN)}),box:[...ae,...Ie(fN)],parts:[{kind:"group",name:"Top",props:{...R,direction:"row",align:"end",justify:"between",gap:60,gapPhone:16,share:"content",sectionPaddingBottom:32},parts:[ow("Eyebrow",14,14,pe("eyebrow",W("label",14))),{kind:"group",name:"Issue",props:{...R,align:"end",gap:0,gapPhone:0,sectionPaddingBottom:14},parts:[{kind:"list",key:"issueMeta",name:"Issue line",flat:!0,parts:[ed("lead","rest",Mne)]}]}]},{kind:"group",name:"Bottom",props:{...R,direction:"row",align:"start",justify:"between",gap:60,gapPhone:16,share:"content",sectionBorder:hN,sectionPaddingTop:32},parts:[{kind:"text",key:"lead",props:{...K,maxWidth:720,...mN},style:{textStyle:"body-1",fontRole:"heading3",...W("headingSmall",20),lineHeight:1.5,letterSpacing:-.005,paragraphSpacing:16}},{kind:"group",name:"In this issue",props:{...R,align:"stretch",gap:0},parts:[ow("Heading",6,6,{kind:"text",key:"issueHeading",props:{...K,align:"right",...wn},style:{textStyle:"body-1",fontRole:"heading",...W("body",18),weight:400,letterSpacing:-.01,lineHeight:1.9,...Qi}}),{kind:"group",name:"Lines",props:{...R,align:"stretch",gap:0},parts:[{kind:"list",key:"issueList",name:"Line",flat:!0,parts:[lN("text",{color:"labels",...pN})]}]},lN("issueTotal",pN)]}]}],drop:{...te,...ie}}),uN={top:24,bottom:24,topPhone:16,bottomPhone:16},ew={color:"labels",...W("label",13),letterSpacing:.2},IN=e=>(Array.isArray(e.items)?e.items:[]).filter(o=>o&&typeof o.label=="string"&&o.label.trim()!==""),tw=(e,o)=>o!==void 0&&IN(e).at(-1)===o,gN=(e,o)=>o!==void 0&&IN(e).includes(o),Une=(e,o)=>gN(e,o)&&!tw(e,o)&&Qe(o?.href),Wne=()=>({name:"Breadcrumb",skip:e=>Qe(e.meta)?'a trailing note after "\xB7" needs a second mark; none live':void 0,boxProps:e=>({...J,...En,wrap:"wrap",gap:16,gapPhone:16,separator:"slash",sectionBorder:{bottom:1},...de(e,uN)}),box:[...ae,...Ie(uN)],parts:[{kind:"list",key:"items",name:"Crumb",flat:!0,parts:[{kind:"button",key:"label",href:"href",variant:"ghost",when:Une,props:{...vo,...vn,icon:"none"},style:ew},{...pe("label",ew),when:(e,o)=>gN(e,o)&&!tw(e,o)&&!Qe(o?.href)},{...pe("label",{...ew,color:"text"}),when:tw}]}],drop:{...te,...ie,meta:"a node that stores a note is skipped (`skip`); an empty one draws nothing"}}),bN={DocMasthead:Nne(),Masthead:Hne(),Breadcrumb:Wne()};import{BLOCK_WIDTH_LIMIT as $ne,hiddenKeyOf as Gne}from"efficient-easel/draw";import{readHidable as rw}from"efficient-easel/draw";function zne(e,o,t){return e||(t?.isEditing?i(o):void 0)}function F6e(e,o,t){let r=Array.isArray(e)?e:[];return r.length?r:t?.isEditing?o:[]}function yN(e,o,t){let r=rw(e);if(!r.hidden)return zne(r.text,o,t)}function SN(e){if(e==null)return;let o=rw(e);return o.hidden?"":o.text}function B6e(e,o,t){return rw(e).hidden?"":yN(e,o,t)}function D6e(e,o,t){return{text:yN(e,co.text,t),href:o||co.href}}var kN="MenuBlock",aw=e=>(Array.isArray(e)?e:[]).filter(o=>o&&Qe(o.label)),wN=e=>{let[o,t]=[e.metaLabel,e.metaValue].map(a=>(SN(a)??"").trim());if(!t)return o;let r=t.includes("==")?t:`==${t}==`;return o?`${o} ${r}`:r},CN={top:0,bottom:0,topPhone:0,bottomPhone:0},jne={...Ko,color:"labels",...W("label",12),letterSpacing:.24},Kne={kind:"group",name:"Note",props:{...R,justify:"center",sectionBorder:{top:0,right:0,bottom:0,left:1},sectionPaddingLeft:28,[Gne("mobile")]:!0},parts:[{kind:"block",type:"Text",when:e=>wN(e)!=="",props:e=>({...K,textFit:"line",text:wN(e),[Ii]:{text:jne}})}]},TN=()=>({tabs:[],metaLabel:Ge.label,metaValue:Ge.value}),vN="the note Text inside the Box (the label, then the value in the accent); no words, no Text",PN={direction:"row",menuStyle:"tabs",currentPage:!0,minWidth:$ne.min},EN=e=>({...e,boxProps:o=>({...J,direction:"row",align:"stretch",justify:"between",gap:0,stickTop:!0,[ja]:0,[Jl]:!0,sectionBorder:{bottom:1},...de(o,CN)}),box:[...ae,...Ie(CN)]}),Vne=()=>EN({name:"Tab Bar",skip:e=>aw(e.tabs).length?"its tabs need a Console menu first: they are typed labels and links, and the Menu block draws only a Console menu":void 0,reads:{metaLabel:vN,metaValue:vN},parts:[{kind:"block",type:kN,props:PN},Kne],drop:{...te,...ie,tabs:"a node whose tabs hold words is skipped (`skip`): typed tabs are not a Console menu; a list of blank tabs draws nothing, so nothing is lost"}}),qne=()=>EN({name:"Category Bar",skip:e=>{if(aw(e.tabs).length)return"its tabs are typed words with typed counts, not the blog's categories: a Blog categories Menu would replace them";if(aw(e.links).length)return"its right-hand links are typed words: the bar holds the Menu only"},parts:[{kind:"block",type:kN,props:{...PN,[yo]:mC}}],drop:{...te,...ie,tabs:"a node whose tabs hold words is skipped (`skip`); blank tabs draw nothing on a page, so nothing is lost. The Menu draws the blog's own categories",activeTab:"the Menu marks the page's own entry (Current page), not a typed active tab",links:"a node whose links hold words is skipped (`skip`); blank links draw nothing",sticky:"the bar is always pinned (the Box's own pin, Stays above): the merchant turns the Box's pin off",editing:"the editor's preview flag, never a stored setting: the editor tells every block it is editing"}}),ON={DocTabs:Vne(),CategoryBar:qne()};import{jsx as An,jsxs as sw}from"react/jsx-runtime";import{slugify as Yne}from"efficient-shell/format";import{jsx as nw,jsxs as _N}from"react/jsx-runtime";var q6e="sticky top-[120px]";var AN=(e,o)=>e?{[tc]:o}:{},LN=(e,o)=>rc(e?.[Th(o)]?.role,Iu[o],Un),RN=120;function FN({title:e,entries:o,stickyTop:t,sticky:r=!0,editing:a=!1,partStyles:n,numberForm:s=Lg,takesViewHide:l=!1}){let d=s==="plain",c=qr(),f=l?c:os;return f.scope(_N("aside",{className:Yr(`${r?"sticky ":""}flex flex-col self-start max-[900px]:static`,f.className),style:r?{top:t}:void 0,...f.attrs,children:[e&&nw("h4",{className:"mb-[18px] font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-accent",children:Nr(e)}),o.map((u,p)=>{let h=nw("span",{...AN(a,"number"),style:LN(n,"number"),className:"text-accent",children:ip(s,p)});return _N("a",{href:`#${u.anchor}`,className:`flex items-center ${d?"justify-start gap-1":"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${p===0?" border-t":""}`,children:[d&&h,nw("span",{...AN(a,"entry"),style:LN(n,"entry"),children:Nr(u.label||"Section")}),!d&&h]},`${p}-${u.anchor}`)})]}))}function Xne(e,o){return Yne(e)||`section-${o+1}`}var lw=e=>typeof e=="string"&&e.trim()!=="";function iw(e){return(e??[]).filter(o=>lw(o.heading)||lw(o.label)||lw(o.body))}function dw(e){let o=new Set;return e.map((t,r)=>{let a=Xne(t.label||t.heading||"",r),n=a,s=2;for(;o.has(n);)n=`${a}-${s++}`;return o.add(n),n})}function cw(e){let o=[];for(let t of e.replace(/\r\n?/g,`
|
|
327
|
-
`).split(/\n[ \t]*\n/))t.split(`
|
|
328
|
-
`).map(r=>r.replace(/\s+$/,"")).filter(r=>r.trim()!=="").forEach((r,a)=>{let n=qd(r)[0].bullet,s=o.at(-1),l=a===0||!s||s.type==="ul"!==n;if(n){let d=r.slice(2);!l&&s?.type==="ul"?s.items.push(d):o.push({type:"ul",items:[d]})}else!l&&s?.type==="p"?s.text+=`
|
|
329
|
-
${r}`:o.push({type:"p",text:r})});return o}var Zne=()=>[{label:i("First section"),heading:i("Your *first* section."),body:i(`Write the opening paragraph here.
|
|
330
|
-
|
|
331
|
-
- Start a line with a dash for a bullet.
|
|
332
|
-
- 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.")}],Jne=RN;function uUe({tocTitle:e,sections:o,editing:t=!1,stickyTop:r=Jne}){let a=iw(o);if(a.length===0&&!t)return null;let n=a.length===0&&t?Zne():a,s=dw(n);return An(gc,{as:"section",className:"relative z-[2] bg-bg",children:sw("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:[An(FN,{title:e,entries:n.map((l,d)=>({label:l.label||"Section",anchor:s[d]})),stickyTop:r}),An("div",{className:"flex flex-col gap-16",children:n.map((l,d)=>sw("article",{id:s[d],className:"flex flex-col gap-[18px]",style:{scrollMarginTop:r},children:[sw("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-accent",children:[Ag(d)," \xB7 ",Nr(l.label||"Section")]}),l.heading&&An("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:Nr(l.heading)}),cw(l.body??"").map((c,f)=>c.type==="ul"?An("ul",{className:"flex max-w-[680px] list-none flex-col gap-2.5 pl-0",children:c.items.map((u,p)=>An("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:Nr(u)},p))},f):An("p",{className:"max-w-[680px] font-serif text-[length:var(--size-body,17px)] leading-[1.7] text-fg-dim",children:Nr(c.text)},f))]},s[d]))})]})})}var BN={top:80,bottom:80,topPhone:60,bottomPhone:60},DN=18,NN=18,MN=8,Qne=10,fw=e=>typeof e=="string"&&e.trim()!=="",HN=e=>iw(e.sections),ese=e=>cw(typeof e.body=="string"?e.body:"").map(o=>o.type==="ul"?{kind:"ul",text:o.items.map(t=>`- ${t}`).join(`
|
|
333
|
-
`)}:{kind:"p",text:o.text}),pw={...Rt(12),letterSpacing:.3,color:"accent",lineHeight:1.5},UN={textStyle:"body-1",fontRole:"accent",...W("body",17)},ose=[pe("label",pw),{...pe("title",pw),when:(e,o)=>!fw(o?.label)},{kind:"block",type:"Text",when:(e,o)=>!fw(o?.label)&&!fw(o?.title),props:{...K,text:"Section",_partStyles:{text:pw}}},{kind:"group",name:"Heading",props:{...R,sectionPaddingBottom:MN,sectionPaddingBottomPhone:MN},parts:[{kind:"group",name:"Heading line",props:{...R,sectionBorder:{bottom:1},sectionPaddingBottom:NN,sectionPaddingBottomPhone:NN},parts:[{kind:"text",key:"heading",role:"heading",props:K,style:{textStyle:"heading-2",...ot("headingMedium",28,3.5,44),case:"upper",weight:500,lineHeight:1.04,letterSpacing:-.025}}]}]},{kind:"list",key:"body",name:"Body",flat:!0,of:ese,parts:[{kind:"text",key:"text",props:se,style:{...UN,lineHeight:1.7},when:(e,o)=>o?.kind==="p"},{kind:"text",key:"text",props:se,style:{...UN,lineHeight:1.65,paragraphSpacing:Qne},when:(e,o)=>o?.kind==="ul"}]}],tse=900,rse={name:"Document Text",boxProps:e=>({...J,direction:"row",gap:80,gapPhone:40,[Xu]:tse,sectionBorder:{bottom:1},...de(e,BN)}),box:["anchor","sectionAccent",...Jr,...ps,...Object.values(lo),...Ie(BN)],parts:[{kind:"block",type:"Contents",props:e=>({title:e.tocTitle??"",sticky:!0,widthFit:"fixed",width:240,widthFitPhone:"fill"})},{kind:"group",name:"Sections",props:{...R,gap:64,gapPhone:64,widthFit:"fill"},parts:[{kind:"list",key:"sections",name:"Section",of:e=>HN(e),props:{...R,gap:DN,gapPhone:DN},item:(e,o,t)=>({props:{anchor:dw(HN(t))[o]??`section-${o+1}`}}),parts:ose}]}],reads:{tocTitle:"the Contents block's Heading"},drop:{...te,stickyTop:"the Contents block draws DocBody's default (120px); 0 live nodes store it"}},WN={DocBody:rse};import{phoneKey as sse}from"efficient-easel/draw";import{SITE_SIDE as lse}from"efficient-easel/screen/lib/content/length-units";var vUe={eyebrow:"\u2014 Label",title:`Section headline *here.*
|
|
334
|
-
*Highlight line*`,body:"Describe this section in a sentence or two."},kUe={text:"Learn more"},TUe={label:"Image & Text Split",drawsPictures:!0,defaultProps:{eyebrow:"",title:"",body:"",imageSrc:"",reverse:!1,uppercase:!1,textAlign:"left",ctaText:"",ctaHref:"",imageBtnText:"",imageBtnHref:"",textBgSrc:"",overlay:60,imageOverlay:40}};function uw(e){return typeof e=="number"&&Number.isFinite(e)?Math.min(Math.max(e,0),100):40}var OUe="[--intro-edge:60px] max-[960px]:[--intro-edge:24px]",ase="overlay",nse=[{label:"Copy over image",value:"overlay"},{label:"Copy above image",value:"stacked"}];function zN(e){return io(nse,ase,e)}var _Ue={desktop:40,mobile:45,min:20,max:80,step:5};function AUe(e,o){return`${typeof e=="number"?e:o}%`}var $N=(e,o,t)=>{let r=q(e),a=q(o),n=(s,l)=>l&&l!=="px"?{[s]:l}:{};return{...r===void 0?{}:{size:r,...n(It.size,t?.desktop)},...a===void 0?{}:{sizePhone:a,...n(It.sizePhone,t?.phone)}}},ise=e=>zN(e.layout)==="stacked",GN=e=>Math.min(Math.max(q(e.overlay)??60,0),100),wm=e=>q(e)??100,dse={textStyle:"heading-1",sizeToken:{...ot("headingLarge",48,7,96).sizeToken,pxPhone:36},weight:500,lineHeight:.95,letterSpacing:-.03},cse=[pe("eyebrow",W("label",14)),...[!0,!1].map(e=>({kind:"text",key:"title",role:"heading",props:K,style:{...dse,case:e?"upper":"none"},styleFrom:o=>{let t=jI(o);return $N(o.titleSizeDesktop,o.titleSizeMobile,{desktop:t.titleDesktop,phone:t.titleMobile})},when:o=>o.uppercase===!0===e})),{kind:"text",key:"body",props:{...se,maxWidth:560},style:{textStyle:"body-1",...W("body",17,16),lineHeight:1.6,paragraphSpacing:24},styleFrom:e=>{let o=jI(e);return $N(e.bodySizeDesktop,e.bodySizeMobile,{desktop:o.bodyDesktop,phone:o.bodyMobile})}},{kind:"group",name:"Button",props:{...R,align:"start",sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:vo}]}],jN=e=>`${e}: a Button block has no colour of its own (it follows the site Button colour, as the old fallback did); 0 of 3 live US nodes store one (CLI read, 2026-11-03)`,fse=()=>({name:"Scroll-Over Text",skip:e=>ise(e)?"the stacked layout: its words row's height floor (`copyShare*`) and the header subtraction have no Box setting; 0 live US nodes":void 0,boxProps:e=>({...J,direction:"column",justify:"center",align:"start",gap:24,gapPhone:24,share:"content",...od,placement:"left",darken:GN(e),darkenStyle:"even",sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:wm(e.heightDesktop),sectionHeightModePhone:"fixed",sectionHeightUnitPhone:"%",sectionHeightValuePhone:wm(e.heightMobile)}),box:[...ae.filter(e=>!String(typeof e=="string"?e:e[0]).startsWith("sectionHeight")),["imageSrc","bgImage"],["imageSrcMobile","bgImagePhone"],["overlay","darken",(e,o)=>GN(o)],["heightDesktop","sectionHeightValue",e=>wm(e)],["heightMobile","sectionHeightValuePhone",e=>wm(e)]],parts:cse,drop:{uppercase:"not a value of its own: it picks the heading part \u2014 Case Upper when on, None (as typed) when off",layout:"not a value of its own: the overlay layout is this tree; a stacked node is skipped (`skip`)",copyShareDesktop:"the stacked layout's words-row floor, read only there; a stacked node is skipped",copyShareMobile:"the stacked layout's words-row floor, read only there; a stacked node is skipped",sticky:"the old pin key, read as `stickTop` by the section pin's one reader (lib/content/section-sticky); the Box keeps a stored `stickTop` (SAME_KEYS), and this row is switched off until the stored pages hold `stickTop`",titleSizeDesktop:"read by the heading part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",titleSizeMobile:"read by the heading part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",bodySizeDesktop:"read by the words part's `styleFrom`: a number is its Size, `inherit` and unset follow the token",bodySizeMobile:"read by the words part's `styleFrom`: a number is its phone Size, `inherit` and unset follow the token",...Object.fromEntries(UE.map(e=>[e,"read by its part's `styleFrom`: the unit of that view's Size"])),buttonColor:jN("Button color"),buttonTextColor:jN("Button text color"),...te}}),qN={textStyle:"heading-2",...W("headingMedium",56,36),weight:400,lineHeight:1.05,letterSpacing:-.03},pse={textStyle:"body-1",...W("body",16),lineHeight:1.7},YN=e=>({kind:"text",key:"body",props:{...se,maxWidth:520},style:{...pse,paragraphSpacing:e}}),vm={top:0,bottom:0,topPhone:0,bottomPhone:0},mw=(e,o)=>typeof e.sectionHeightMode=="string"&&e.sectionHeightMode!=="auto"?{}:{sectionHeightMode:"fixed",sectionHeightUnit:"%",sectionHeightValue:o,sectionHeightModePhone:"auto"},use=(e,o)=>{let t=mw(e,o);return Object.keys(t).length?t:{sectionHeightMode:e.sectionHeightMode,...e.sectionHeightValue===void 0?{}:{sectionHeightValue:e.sectionHeightValue},...e.sectionHeightUnit===void 0?{}:{sectionHeightUnit:e.sectionHeightUnit},sectionHeightModePhone:"auto"}},XN={boxShapePhone:"landscape"},ZN="needs a black-and-white setting on a Box picture (the old photograph followed it, else the site's Photography); 0 live US nodes store it (CLI read, 2026-11-03)",mse=(e,o)=>({[e]:o,[sse(e)]:o}),hse={textStyle:"heading-2",...W("headingMedium",40),weight:500,case:"none",lineHeight:1,letterSpacing:-.02},KN=e=>(Array.isArray(e.stats)?e.stats:[]).filter(o=>o&&(String(o.value??"").trim()!==""||String(o.label??"").trim()!=="")),xse=()=>({name:"Brand Text",boxProps:(e,o)=>({...J,...Qo("background")(e,o),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...de(e,vm),...mw(e,100)}),box:[...ae,...Ie(vm)],parts:[{kind:"group",name:"Words",props:()=>({...R,justify:"center",gap:28,gapPhone:28,sectionBorder:td({right:1}),sectionBorderPhone:td({}),...od,sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60,sectionPaddingRight:lse}),parts:[pe("eyebrow",W("label",14)),{kind:"text",key:"heading",role:"heading",props:K,style:{...qN,case:"none"},mark:"accentItalic"},YN(28),{kind:"group",name:"Stats",props:{...R,sectionPaddingTop:16,sectionPaddingTopPhone:16},parts:[{kind:"group",name:"Figures",props:e=>({...R,direction:"row",share:"equal",gap:24,gapPhone:24,maxWidth:520,phoneRow:Math.min(Math.max(KN(e).length,1),3),...mse("sectionBorder",td({top:1})),sectionPaddingTop:28,sectionPaddingTopPhone:28}),parts:[{kind:"list",key:"stats",name:"Stat",of:KN,props:{...R,gap:4,gapPhone:4},parts:[{kind:"text",key:"value",props:Cn,style:hse},pe("label",{...W("label",13),color:"labels",letterSpacing:.2})]}]}]}]},rS("Picture","imageSrc",XN)],drop:{...te,grayscale:ZN,...ie}}),Cm=e=>{let o=e.textAlign==="center"||e.textAlign==="right"?{align:e.textAlign}:{},t=e.textAlignPhone==="left"||e.textAlignPhone==="center"||e.textAlignPhone==="right"?{alignPhone:e.textAlignPhone}:{};return{...o,...t}},Ise=e=>e.textAlign==="center"?"center":e.textAlign==="right"?"end":"stretch",gse=e=>Math.min(Math.max(q(e.overlay)??60,0),100),JN=e=>typeof e=="string"&&e.trim()!=="",bse={...vo,align:"center",alignPhone:"center",buttonFillOpacity:0,buttonBorder:{width:1},buttonPaddingTop:16,buttonPaddingRight:28,buttonPaddingBottom:16,buttonPaddingLeft:28,buttonPaddingTopPhone:12,buttonPaddingRightPhone:20,buttonPaddingBottomPhone:12,buttonPaddingLeftPhone:20},VN=e=>({...rS("Picture","imageSrc",(o,t)=>({...JN(o.imageSrc)&&uw(o.imageOverlay)>0?{darken:uw(o.imageOverlay),darkenStyle:"even"}:{},placement:"center",...XN,sectionBorder:td(e?{left:1}:{right:1}),...QN(e?"left":"right",ol(t))}),[{kind:"button",key:"imageBtnText",href:"imageBtnHref",variant:"ghost",props:bse,style:{...Rt(13,12),letterSpacing:.18}}]),when:o=>o.reverse===!0===e}),QN=(e,o)=>{let t=Math.max(60-o,0);return{sectionPaddingLeft:e==="left"?60:t,sectionPaddingRight:e==="right"?60:t}},yse={kind:"group",name:"Words",props:(e,o)=>{let t=e.reverse===!0;return{...R,justify:"center",align:Ise(e),placement:e.textAlign==="center"?"center":e.textAlign==="right"?"right":"left",...use(e,72),gap:24,gapPhone:24,...JN(e.textBgSrc)?{darken:gse(e),darkenStyle:"even"}:{},...od,sectionPaddingTop:100,sectionPaddingBottom:100,...QN(t?"right":"left",ol(o)),sectionPaddingTopPhone:60,sectionPaddingBottomPhone:60}},box:[["textBgSrc","bgImage"]],parts:[{...pe("eyebrow",W("label",14)),styleFrom:Cm},{kind:"text",key:"title",role:"heading",props:K,style:qN,styleFrom:e=>({case:e.uppercase===!0?"upper":"none",...Cm(e)})},{...YN(24),styleFrom:Cm},{kind:"group",name:"Button",props:{...R,sectionPaddingTop:8,sectionPaddingTopPhone:8},parts:[{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:e=>{let o=Cm(e);return{...vo,...o.align?{align:o.align}:{},...o.alignPhone?{alignPhone:o.alignPhone}:{}}}}]}]},Sse=()=>({name:"Image & Text Split",boxProps:(e,o)=>({...J,...Qo("background")(e,o),direction:"row",share:"equal",gap:0,gapPhone:0,sectionBorder:{top:1,bottom:1},...de(e,vm),...mw(e,72)}),box:[...ae,...Ie(vm)],parts:[VN(!1),yse,VN(!0)],drop:{reverse:"not a value of its own: it picks the order \u2014 the Picture Box first, or after the Words",uppercase:"not a value of its own: the heading part's Case \u2014 Upper when on, None (as typed) when off",textAlign:"read by each words part (its Align) and the Words Box (its Align); left writes nothing, as the old emitted no class",textAlignPhone:"read by each words part as its phone Align",textAlignTablet:"not carried to the words part's own tablet Align (`alignTablet`) yet: no old node stores it (new with the Tablet view's Text alignment row, 0 stored on the US sites 2026-11-06), so nothing moves",overlay:"read by the Words Box: its Darken over the words picture (60 when unset); no picture, no wash",imageOverlay:"read by the Picture Box: its Darken over the image column's picture (40 when unset, none at 0); no picture, no wash",grayscale:ZN,...te,...ie}}),e2={IntroBleed:fse(),Manifesto:xse(),Split:Sse()};var r2={headPlacement:void 0},o2={top:0,bottom:0,topPhone:0,bottomPhone:0},wse=()=>({name:"Form",ownBoxConverts:!0,boxProps:e=>({...J,direction:"column",...de(e,o2)}),box:[...ae,...Ie(o2)],parts:[{kind:"core",keep:"rest",props:r2}],drop:{...te,...ie}}),t2={top:120,bottom:120,topPhone:60,bottomPhone:60},Cse=()=>({name:"Photo Submission Form",boxProps:e=>({...J,direction:"column",gap:24,...de(e,t2)}),box:[...ae,...Ie(t2)],parts:[pe("eyebrow"),{kind:"text",key:"title",role:"heading",props:K,style:{textStyle:"heading-2"},mark:"accentItalic"},{kind:"text",key:"body",role:"body",props:se},{kind:"core",as:"Form",keep:["formSlug"],rename:{buttonText:"submitText",consent:"finePrint"},props:r2}],skip:e=>e.layout==="boxes"?`its words are in its two SubmitBox regions (layout "boxes"); this row reads only the section's own words`:void 0,drop:{...te,...ie,layout:'the marker of the two-region drawing; a node that has it is skipped (above), so here it is never "boxes"',boxes:'the SubmitBox regions, drawn only under layout "boxes", which this row skips (above); without that marker they draw nothing'}}),a2={Form:wse(),SubmitBuild:Cse()};import{phoneKey as n2}from"efficient-easel/draw";var l2=1.5,s2={textStyle:"body-1",...W("body",15),lineHeight:l2},vse={...Ko,...W("label",12),letterSpacing:.12,lineHeight:l2},i2=()=>({type:oe,props:{...R,direction:"row",justify:"between",align:"start",gap:16,gapPhone:16,share:"content",phoneRow:2,[n2("share")]:"content",[n2("wrap")]:"nowrap",...Do(12,0),sectionBorder:{top:1},name:"Item"},slots:{[He]:[{type:oe,props:{...R,gap:0,gapPhone:0,name:"Item words"},slots:{[He]:[qe("label",{...K,tag:"p"},s2),qe("meta",{...se,tag:"p"},vse)]}},qe("amount",{...K,tag:"p"},s2)]}});var kse=()=>({name:"Order Table",boxProps:()=>({...J,direction:"column"}),box:[...ae],parts:[{kind:"core",keep:"rest",headless:!0,slots:{[No]:[i2()]}}],drop:{...te}}),d2={OrderSummary:kse()};import{phoneKey as Tse}from"efficient-easel/draw";var oWe={eyebrow:"By the numbers",title:`A picture worth
|
|
335
|
-
*a thousand rows.*`},c2=["eyebrow","title","body","caption"],tWe={label:"Chart",defaultProps:{eyebrow:"",title:"",body:"",items:[],caption:"",chartStyle:"bars",valueSuffix:""}};var f2=["eyebrow","title","body"],aWe={label:"Mockup Card",defaultProps:{eyebrow:"",title:"",body:"",variant:"spec-card",cardHeader:"",badge:"",cardTitle:"",cardSubtitle:"",pills:[],tiles:[],rows:[],button:"",footnote:"",col1Title:"",col1Cards:[],col2Title:"",col2Cards:[],col3Title:"",col3Cards:[],col4Title:"",col4Cards:[],barsHeading:"",bars:[],termLines:[],urlText:"",heroTitle:"",heroButton:"",products:[],align:"right"}};var m2={top:76,bottom:76,topPhone:76,bottomPhone:76},h2=()=>({kind:"group",name:"Words",props:{...R,gap:20,gapPhone:20},parts:[{kind:"group",name:"Chip row",props:{...R,direction:"row",phoneRow:2,[Tse("share")]:"content"},parts:[Hu("eyebrow")]},{kind:"text",key:"title",role:"heading",props:K,style:{textStyle:"heading-2",...W("headingMedium",44,32),weight:500,case:"upper",lineHeight:1.04,letterSpacing:-.02}},{kind:"text",key:"body",props:{...se,maxWidth:435},style:{textStyle:"body-1",...W("body",15),lineHeight:1.625}}]}),x2=e=>(o,t)=>({...J,sectionAccent:tS(o.sectionAccent??0,t),direction:"row",align:"center",gap:56,gapPhone:56,share:e,sectionBorder:{top:1,bottom:1},...de(o,m2)}),I2=[...ae.filter(e=>e!=="sectionAccent"),["sectionAccent","sectionAccent",(e,o,t)=>tS(e,t)],...Ie(m2)],Pse=()=>({name:"Chart",boxProps:x2([42]),box:I2,parts:[h2(),{kind:"group",name:"Chart",props:{...R,gap:16,gapPhone:16},keepEmpty:!0,parts:[{kind:"core",keep:"rest",props:Qs},pe("caption",{color:"muted",...W("label",10),letterSpacing:.14})]}],pressKeepsEmpty:[...c2],drop:{...te,...ie}}),p2=e=>e.align==="left",u2={kind:"group",name:"Card",keepEmpty:!0,props:R,parts:[{kind:"core",keep:"rest",props:Qs}]},Ese=()=>({name:"Mockup Card",boxProps:x2("equal"),box:I2,parts:[{...u2,when:p2},h2(),{...u2,when:e=>!p2(e)}],pressKeepsEmpty:[...f2],drop:{...te,...ie}}),g2={Chart:Pse(),Mockup:Ese()};var Ose={title:"Back online in",zeroText:"Almost done. Back very soon."},b2=["title"],pWe={label:"Countdown",defaultProps:{...Ose,endsAt:"",showUnits:!0}};var y2={top:48,bottom:48,topPhone:48,bottomPhone:48},_se={...pe("title",{...dv(12),color:"muted"}),props:{...K,align:"center"}},Ase=()=>({name:"Countdown",boxProps:e=>({...J,direction:"column",align:"center",gap:16,gapPhone:16,...de(e,y2)}),box:[...ae,...Ie(y2)],parts:[_se,{kind:"core",keep:"rest",props:Qs}],pressKeepsEmpty:[...b2],drop:{...te,...ie}}),S2={top:80,bottom:80,topTablet:60,bottomTablet:60,topPhone:60,bottomPhone:60},Lse=()=>({name:"Feature Banner",boxProps:e=>({...J,direction:"column",sectionBorder:{bottom:1},...de(e,S2)}),box:[...ae,...Ie(S2)],parts:[{kind:"core",keep:"rest",props:Qs}],drop:{...te,...ie}}),w2={Countdown:Ase(),FeaturedCover:Lse()};var C2={top:80,bottom:80,topPhone:60,bottomPhone:60},Rse=()=>{let e=tm("FitmentFinder");return{name:"Fitment Form",boxProps:o=>({...J,direction:"column",gap:nd[Tn("FitmentFinder")],...de(o,C2)}),box:[...ae,...Ie(C2)],parts:[wt("FitmentFinder"),{kind:"block",type:"FitmentPicker"},{kind:"block",type:"StockFitment"},{kind:"button",key:"ctaText",href:"ctaHref"}],skip:o=>o.layout==="bar"?"the one-row shape goes to the shop on the fourth pick and draws no head; the Fitment picker block never leaves the page":void 0,...Object.keys(e).length?{reads:e}:{},drop:{...te,...ie,layout:'the section shape; "bar" is skipped (above), so here it is the stacked shape this Box draws'}}},v2={FitmentFinder:Rse()};var km={eyebrow:"Label",title:"Section *heading.*",body:"Add this section's copy here. A blank line starts a new paragraph."},SWe={label:"Editorial Text",defaultProps:{eyebrow:"",title:"",body:"",topBorder:!0}};var Sd={eyebrow:Ge.eyebrow,lead:"Introduce your company in a paragraph or two.",foundersHeading:"Add a short heading.",foundersBody:"Add a short statement here \u2014 a sentence or two is plenty.",attribution:"\u2014 Name, Year"},vWe={label:"Lead Text",defaultProps:{eyebrow:"",lead:"",stats:[],foundersHeading:"",foundersBody:"",attribution:"",padTop:60,padBottom:80}};var k2={eyebrow:"Limited release",title:"Banner headline",body:"A line or two of supporting copy."},TWe={label:"Banner",drawsPictures:!0,defaultProps:{eyebrow:"",title:"",body:"",imageSrc:"",ctaText:"",ctaHref:"",contained:!0,overlay:60}};var T2={title:`Section heading
|
|
336
|
-
*Highlight line*`},P2=[{label:co.text,href:co.href,variant:"primary"},{label:co.text,href:co.href,variant:"outline"}],OWe={label:"Call-to-Action Heading",defaultProps:{title:"",buttons:[],padTop:140,padBottom:140}};var hw="solid",Fse=[{label:"Solid",value:"solid"},{label:"Outlined",value:"outlined"}];function LWe(e){return io(Fse,hw,e)}var Bse="sf-secnum-outline",RWe="font-display text-[length:var(--size-headingMedium,clamp(48px,6vw,96px))] font-medium leading-[0.8] tracking-[-0.02em]",FWe=`@supports (-webkit-text-stroke: 1px currentColor){.${Bse}{color:var(--site-surface-2);-webkit-text-stroke:1px var(--site-line)}}`;var Tm="standard",A2=[{label:"Standard",value:"standard"},{label:"Editorial",value:"editorial"},{label:"Simple",value:"simple"},{label:"Statement",value:"statement"},{label:"Natural",value:"natural"},{label:"Essay",value:"essay"}],Iw=["numStyle","logoSrc","logoAlt","linkText","linkHref","_gLogo"],xw=[...Iw,"description"],E2={standard:["eyebrowLook"],editorial:[...Iw,"eyebrowLook"],simple:xw,statement:xw,natural:Iw,essay:xw},O2=["gap-5","gap-3"],_2=["text-[length:var(--size-body,16px)]","text-[15px]"];function MWe(e){return io(O2,O2[0],e)}function HWe(e){return io(_2,_2[0],e)}function UWe(e){return io(A2,Tm,e)}function WWe(e){let o=A2.map(r=>r.value),t=[...new Set(Object.values(E2).flat())];return _a(e,t.map(r=>[[r],kh("headStyle",o,Tm,o.filter(a=>!E2[a].includes(r)))]))}var Mr={num:"01 / Section",title:"Section *title*",description:"Short supporting line",linkText:Ge.viewAll},KWe={label:"Section Header",drawsPictures:!0,defaultProps:{headStyle:Tm,num:Mr.num,numStyle:hw,title:Mr.title,description:"",logoSrc:"",logoAlt:"",linkText:"",linkHref:""}};var L2={top:72,bottom:72,topPhone:72,bottomPhone:72},Dse={name:"Editorial Text",boxProps:e=>({...J,direction:"column",gap:28,gapPhone:28,sectionBorder:{top:1},...de(e,L2)}),box:[["topBorder","sectionBorder",e=>e===!1?void 0:{top:1}],...ae,...Ie(L2)],parts:[wt("Prose"),{kind:"text",key:"body",props:se,style:{textStyle:"body-1",...W("body",16),lineHeight:1.7,paragraphSpacing:18}}],drop:{...te,...ie,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)"}},R2={buttonPaddingTop:20,buttonPaddingBottom:20,buttonPaddingLeft:28,buttonPaddingRight:28},F2=(e,o)=>o?.variant==="primary",B2=(e,o)=>({kind:"list",key:"buttons",name:"Button",flat:!0,when:e,parts:[{kind:"button",key:"label",href:"href",when:F2,variant:"primary",style:{letterSpacing:.3},props:{...vo,...R2,...o}},{kind:"button",key:"label",href:"href",when:(t,r)=>!F2(t,r),variant:"ghost",style:{letterSpacing:.3},props:{...vo,...R2,...o}}]}),Pm=e=>Qe(e.title),Nse={name:"Call-to-Action Heading",boxProps:e=>({...J,direction:"row",align:"center",justify:Pm(e)?"between":"end",gap:60,gapPhone:60,share:"content",sectionBorder:{bottom:1},...St(e,"TitleWithButtons")}),box:[...ae,...pa("TitleWithButtons")],parts:[{kind:"group",name:"Title",props:{...R,maxWidth:1e3,widthFitPhone:"fill"},parts:[{kind:"text",key:"title",role:"heading",props:K,style:{textStyle:"heading-1",...ot("headingLarge",48,7,108),case:"upper",lineHeight:.94,letterSpacing:-.035},mark:"accentItalic"}]},{kind:"group",name:"Buttons",props:e=>({...R,gap:14,gapPhone:14,widthFitPhone:"fill",...Pm(e)?{minWidth:280,minWidthPhone:0}:{}}),parts:[B2(Pm,{widthFit:"fill",iconPosition:"end"}),B2(e=>!Pm(e),{})]}],drop:{...te,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",buttonsAlignTablet:"the tablet's own side of `buttonsAlign`, read only with no heading; no old node stores it (it is new with the Tablet view's Block alignment row, 0 stored on the US sites 2026-11-05), so nothing moves"}};function Mse(e,o){let t=ol(o,{to:ve(e.sectionPaddingUnit)}),r=ol(o,{view:"phone",to:ve(e.sectionPaddingUnitPhone),maxPx:20});return{sectionPaddingLeft:t,sectionPaddingRight:t,sectionPaddingLeftPhone:r,sectionPaddingRightPhone:r}}var D2={top:40,bottom:64,topPhone:24,bottomPhone:36},Hse={name:"Section Header",boxProps:(e,o)=>({...J,direction:"column",gap:0,...de(e,D2),...Mse(e,o)}),box:[...ae,...Ie(D2)],parts:[wt("SectionHeader")],drop:{...te,...ie,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"}},N2={...R,direction:"row",share:[67],gap:32},M2={...R,sectionPaddingLeft:24,sectionPaddingLeftPhone:0},H2=(e,o,t)=>({kind:"group",name:e,props:o,parts:[t]}),Use={name:"Lead Text",boxProps:e=>({...J,direction:"column",gap:40,gapPhone:40,sectionBorder:{bottom:1},...St(e,"ParagraphsA")}),box:[...ae,...pa("ParagraphsA")],parts:[{kind:"group",name:"Numbers",props:{...N2,gapPhone:24,sectionBorder:{bottom:1},sectionPaddingBottom:40,sectionPaddingBottomPhone:40},parts:[{kind:"group",name:"Eyebrow",props:{...R,sectionPaddingTop:5,sectionPaddingBottom:1,sectionPaddingTopPhone:5,sectionPaddingBottomPhone:1},parts:[pe("eyebrow",{color:"labels",...W("label",12),letterSpacing:.24})]},H2("Stats column",R,{kind:"group",name:"Stats",props:{...M2,gap:0,gapPhone:0},parts:[{kind:"list",key:"stats",name:"Stat",flat:!0,parts:[ed("value","label",{...W("label",13),letterSpacing:.18,lineHeight:1.8})]}]})]},{kind:"group",name:"Words",props:{...N2,gapPhone:28},parts:[{kind:"group",name:"Lead",props:R,parts:[{kind:"group",name:"Measure",props:{...R,maxWidth:780},parts:[{kind:"text",key:"lead",props:K,style:{textStyle:"heading-3",...W("headingSmall",22,20),weight:400,case:"none",lineHeight:1.45,letterSpacing:-.005}}]}]},H2("Note column",{...R,justify:"end"},{kind:"group",name:"Founders",props:{...M2,gap:8,gapPhone:8},parts:[{kind:"group",name:"Note",props:{...R,gap:6,gapPhone:6},parts:[{kind:"text",key:"foundersHeading",props:K,style:{textStyle:"body-1",fontRole:"heading",...W("body",18,16),weight:500,letterSpacing:-.01,lineHeight:1.7}},{kind:"text",key:"foundersBody",props:se,style:{textStyle:"body-5",fontRole:"heading",...W("body",14,12),lineHeight:1.7}}]},pe("attribution",{...W("label",12,10),letterSpacing:.24,lineHeight:1.7})]})]}],drop:{...te}},U2={top:24,bottom:24,topPhone:24,bottomPhone:24},Wse={name:"Banner",boxProps:e=>({...J,direction:"column",gap:0,...de(e,U2)}),box:[...ae,"contained",...Ie(U2)],parts:[{kind:"group",name:"Card",keepEmpty:!0,props:{...R,gap:28,gapPhone:28,placement:"top-left",darken:60,darkenStyle:"even",sectionBorder:{width:1},...Cr("surface"),...Do(64,40,40,24)},box:[["imageSrc","bgImage"],["overlay","darken",e=>Math.min(Math.max(q(e)??60,0),100)]],parts:[{kind:"group",name:"Words",props:{...R,gap:20,gapPhone:20},parts:[pe("eyebrow"),{kind:"text",key:"title",role:"heading",props:{...K,maxWidth:680},style:{weight:500,lineHeight:1.05,letterSpacing:-.03,case:"none",...W("headingMedium",44,32)}},{kind:"text",key:"body",props:{...K,maxWidth:680},style:{textStyle:"body-1",lineHeight:1.6,...W("body",16)}}]},{kind:"button",key:"ctaText",href:"ctaHref",variant:"primary",props:vo}]}],drop:{...te,...ie}},gw={Prose:Dse,TitleWithButtons:Nse,SectionHeader:Hse,ParagraphsA:Use,Banner:Wse},W2={Prose:()=>({eyebrow:km.eyebrow,title:ur(km.title),body:km.body}),TitleWithButtons:()=>({title:ur(T2.title),buttons:P2.map(e=>({...e}))}),SectionHeader:()=>({num:Mr.num,title:ur(Mr.title),description:Mr.description,linkText:Mr.linkText,linkHref:co.href}),ParagraphsA:()=>({eyebrow:Sd.eyebrow,lead:Ge.body,foundersHeading:Sd.foundersHeading,foundersBody:Sd.foundersBody,attribution:Sd.attribution}),Banner:()=>({...k2,ctaText:co.text,ctaHref:co.href}),ProcessSteps:()=>({num:Mr.num,title:ur(Mr.title)})};function z2(){Co(gw),Co(DB),Co(XB),Co(TB),Co(lD),Co(WD),Co(tN),Co(sN),Co(bN),Co(ON),Co(WN),Co(e2),Co(a2),Co(d2),Co(v2),Co(g2),Co(w2)}var $se=["FooterPayment"];function $2(e,o){let{id:t,...r}=e.props;for(let[a,n]of Object.entries(r))zse(n)&&(r[a]=n.map(s=>$2(s,o)));return o(e.type,r)}var wd=(e,o)=>{if(!$se.includes(e.type))return null;z2();let t=ca(e.type);return t?Zs({type:e.type,props:{...e.props}},t).nodes.map(r=>$2(r,o)):null};function G2(){let{appState:e,dispatch:o,config:t}=Yse(f=>f),{readOnly:r}=Zse(),[a,n]=Kse(!1),s=e.data.content;if(r||s.some(f=>f.type===We))return null;let l=s.find(f=>f.type===Xe)??null,d=(f,u)=>Vse(t,f,u),c=()=>{let f=Yi(l,d,qse(We),wd);o({type:"setData",data:u=>({...u,content:[...Ec(u.content,f)]}),recordHistory:!0}),n(!1)};return Em(Xse,{tone:"info",title:i("This footer uses the old layout"),action:a?jse(Gse,{children:[Em(bw,{variant:"primary",size:"sm",onClick:c,children:i("Switch now")}),Em(bw,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:i("Cancel")})]}):Em(bw,{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 yw,jsxs as Jse}from"react/jsx-runtime";import{InspectorUpLevel as j2}from"efficient-easel/chrome";function K2({nodeId:e,part:o,sectionName:t,onUpToSection:r}){let{select:a}=Gp(),n=Ks(e,o,"picture");return Jse("div",{children:[o!=="media"?yw(j2,{inline:!0,name:i(cn.media),onSelect:()=>a(_i(e,"media"))}):yw(j2,{inline:!0,name:i(t),onSelect:r}),yw(Vt,{part:o,motion:n,itemWord:i(cn[o])})]})}import{HintsToggle as ple,SettingsSwitch as ule,hintsFoldClass as mle}from"efficient-easel/panel";import{useHints as hle}from"efficient-easel/screen/lib/hints";var J2={kind:"header"},Cw={kind:"website"},Q2={kind:"website",tab:Hs,revealPageGroup:!0},eM={kind:"chat"},oM={kind:"social"},Cd="Part";function xle(e){return i("Part of {name}",{name:i(e)})}function Ile(e,o,t){let r=e.describeNode(o);return{name:t,kindLabel:r?xle(r.label):i(Cd)}}function gle(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 tM({what:e}){let o=gle(e);return Ia("div",{className:"sf-note",children:[Ee("p",{children:Ee("strong",{children:o.title})}),Ia("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 ww(e){let o=Oi[e];return{name:cn[e],kindLabel:Cd,icon:o,head:(t,r)=>{if(t.kind!==o)return null;let a=r.describeNode(t.nodeId);if(!a)return null;let n=Z2({name:i(Kp(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?Ee(K2,{nodeId:t.nodeId,part:e,sectionName:r.describeNode(t.nodeId)?.label??"Hero",onUpToSection:()=>r.onSelectNode(t.nodeId)}):null}}var ble={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,o)=>{let t=o.hostPanels?.header;return t?Ee(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)=>Ee(Bp,{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:()=>Ee(UA,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>Ee(KA,{unavailable:Ee(tM,{what:"Social link"})})},ticker:{name:Ti,kindLabel:Cd,icon:"ticker",head:(e,o)=>e.kind==="ticker"?Ile(o,e.heroId,i(Ti)):null,render:e=>Ee(cR,{heroId:e.kind==="ticker"?e.heroId:""})},heroMedia:ww("media"),heroImage:ww("image"),heroImage2:ww("image2"),part:{name:Cd,kindLabel:Cd,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}=Gt(e.propKey),n=a?_s(t.fields[r],a):t.fields[r],s=gu(t.type),l=s?vl(s,e.propKey):null,d=s&&l?s[l].label:SR[e.propKey],c=d?i(d):ZO(i(Og(sp(n??{},r))),a),f=Z2({name:c,tier:"part",of:i(t.label)},{partOf:({name:u})=>i("Part of {name}",{name:u})});return{name:f.name,kindLabel:f.kind}},render:(e,o)=>e.kind==="part"?Ee(zR,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>o.onSelectNode(e.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},yle=new Set(["header","website","chat"]);function Sle(e,o){if(e==="selection")return null;let t=ble[e];return yle.has(e)&&!o.hasSiteSettings?{...t,kindLabel:"Not part of a template",render:()=>Ee(tM,{what:t.name})}:t}function rM({mode:e,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onOpenPageStyles:r,onSelectNode:a,hideNodeActions:n=!1,onNotify:s,onHidePanel:l}){let{capabilities:d,tokenRef:c,notifyParent:f,currentSlug:u,siteId:p,runAuthed:h,readOnly:I,navigate:g}=ile(),{rows:C}=Ci(),w=C?.find(M=>M.slug===u)??null,T=ele(),y=Object.keys(T.fields).some(M=>!M.startsWith("_")&&!Si.includes(M)),{websiteName:b}=ue(),P=dle({readOnly:I}),{select:H}=cle(),{selectedItem:E,getItemById:U,getSelectorForId:O,config:D,appState:v}=Qse(M=>M),_=sle(D,E?{type:E.type,props:E.props}:null),A=E?r_(_??D.components[E.type]?.fields,E.props):[],F=M=>D.components[M]?.label??M,z=E?O(E.props.id):void 0,$=Sle(e.kind,d),X=lle(),Q={capabilities:d,tokenRef:c,hostPanels:X.chrome?.panels,describeNode:M=>{let Re=U(M);if(!Re)return null;let ye=D.components[Re.type];return{type:Re.type,label:ye?.label??Re.type,fields:ye?.fields??{},props:Re.props??{}}},siteId:p,websiteName:b??null,notifyParent:f,onNotify:s,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onSelectNode:a},Fe=$?.head?.(e,Q)??null,Oe=FA({kind:w?.kind,pageName:w?.label}),ze=Fe?.name??($?i($.name):E?i(F(E.type)):Oe.name),Ke=Fe?.kindLabel??($?i($.kindLabel):E?z&&z.zone!==X2?i("Block"):i("Section"):Oe.kindLabel),ge=$?$.icon:E?E.type:"page",Te=Sw(e)&&E?Wi(E.type):null,_e=!!E&&!!z&&z.zone===X2&&E.type!==Xe&&E.type!==fle,Ne=Lu(v?.data,E),ao=()=>{Ne||z&&P.duplicateComponent(z.zone,z.index)},bo=()=>{z&&(P.removeComponent(z.zone,z.index),P.select(null))},ne=E?D.components[E.type]?.defaultProps?.previewHover:void 0,Me=Sw(e)&&!!E&&!!z&&ne!==void 0,Ve=Me&&E.props.previewHover===!0,Z=()=>{!E||!z||P.replaceComponent(z.zone,z.index,{...E,props:{...E.props,previewHover:!Ve}})},{shown:Ae,setShown:ct}=hle(),fo=!!($||E||y);return Ia("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right ${mle(Ae)}`.trim(),children:[Ee(rle,{icon:Ee(fn,{type:ge,size:15}),name:ze,kind:Ke,actions:!n&&Sw(e)&&E&&E.type!==Xe?Ia(V2,{children:[Ee(q2,{label:i("Duplicate section"),title:Ne??void 0,disabled:Ne!==null,onClick:ao,children:Ee(ale,{size:15})}),_e&&d.hasSiteSettings&&Ee(eF,{node:E,currentSlug:u,siteId:p??void 0,tokenRef:c,runAuthed:h,onNotify:s}),Ee(q2,{label:i("Remove section"),danger:!0,onClick:bo,children:Ee(nle,{size:15})}),l?Ee(Y2,{side:"right",onHide:l,divider:!0}):null]}):l?Ee(Y2,{side:"right",onHide:l}):void 0}),Me&&Ia("div",{className:"sf-preview-pin",children:[Ia("div",{className:"sf-preview-pin-text",children:[Ee("span",{className:"sf-preview-pin-label",children:i("Preview hover state")}),Ee("span",{className:"sf-preview-pin-hint",children:i("not shown live")})]}),Ee(ule,{checked:Ve,onChange:Z,ariaLabel:i("Preview hover state")})]}),Ia("div",{className:"sf-insp-body es-insp-body sf-scroll",children:[$?$.render(e,Q):E?Ia(V2,{children:[E.type===Xe&&d.hasSiteSettings&&Ee(G2,{}),Ee(KP,{children:Ee(Vt,{entries:Ee(oF,{parts:A,heading:!1,onOpen:M=>H(ap(E.props.id,M))}),entryCount:Ky(A).length,itemWord:ze})}),Te&&Ee(wu,{source:Te,slug:qs(E?.props),menuId:xu(E?.props)})]}):y?Ee(Vt,{omit:Si}):Ee(tle,{variant:"none",icon:!1,message:i("Select a section or block to edit it."),children:r&&Ee(ole,{variant:"secondary",onClick:r,children:i("This page")})}),fo&&Ee(ple,{shown:Ae,onChange:ct,label:i("Show hints")})]})]})}import{jsx as m,jsxs as L,Fragment as iM}from"react/jsx-runtime";var go={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)"},vw="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 m("div",{style:{width:e,height:o,borderRadius:r,background:go[t],flex:"none",...a}})}var wle={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",ArticleBody:"articlebody",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"},Y={position:"absolute",inset:0},x={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)"},je=(e,o,t=160)=>({background:`linear-gradient(${t}deg,${e},${o})`});function Ur({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 L("span",{style:{position:"absolute",display:"block",width:e,height:e,...o},children:[m("span",{style:r("8% 26% 30% 6%",x.mark1)}),m("span",{style:r("26% 6% 8% 30%",x.mark2,"multiply")})]})}function _m({children:e}){return m("span",{style:{fontSize:"4.64cqw",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:x.muted},children:e})}function aM({over:e,overTone:o,head:t,headSize:r=11.5,cta:a,ctaBg:n,ctaFg:s,tone:l}){return L(iM,{children:[e&&m("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:o},children:e}),m("span",{style:{fontSize:r,lineHeight:1.15,fontWeight:700,maxWidth:"78%",color:l},children:t}),a&&m("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 kw({name:e,price:o}){return L("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[m("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",...je(x.paper,x.paper2,150)},children:m(Ur,{size:34,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),m("span",{style:{fontSize:"3.65cqw",fontWeight:600,color:x.text},children:e}),m("span",{style:{fontSize:"3.65cqw",color:x.muted},children:o})]})}function Hr({k:e,v:o,ok:t}){return L("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,padding:"3.5px 2px",borderBottom:`1px solid ${x.rule}`,fontSize:"3.98cqw",color:x.muted},children:[m("span",{children:e}),L("span",{style:{display:"flex",gap:6,alignItems:"center"},children:[m("b",{style:{color:x.text,fontWeight:700},children:o}),t&&m("span",{style:{color:x.rust,fontWeight:700},children:"\u2713"})]})]})}function De({title:e,children:o}){return L("div",{style:{...Y,background:x.card,padding:"9px 10px",display:"flex",flexDirection:"column",gap:6},children:[m(_m,{children:e}),o]})}function nM({size:e=14}){return m("span",{style:{width:e,height:e,borderRadius:"50%",flex:"none",display:"block",background:`linear-gradient(150deg,${x.mark1},${x.mark2})`}})}function Tw({filled:e=5,size:o=6}){return L("span",{style:{fontSize:o,letterSpacing:"0.06em",color:x.rust,lineHeight:1},children:["\u2605".repeat(e),m("span",{style:{color:x.mark1},children:"\u2605".repeat(5-e)})]})}function vd({n:e,label:o,tone:t=x.text}){return L("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[m("b",{style:{fontSize:"8.16cqw",lineHeight:1,color:t},children:e}),m("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",opacity:.62,color:t},children:o})]})}function ho({children:e,w:o}){return m("span",{style:{fontSize:"3.98cqw",lineHeight:1.45,color:x.muted,width:o,display:"block"},children:e})}function Om({label:e,w:o="100%",filled:t}){return L("div",{style:{width:o,display:"flex",flexDirection:"column",gap:2},children:[m("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:x.muted},children:e}),m("span",{style:{height:9,borderRadius:3,border:`1px solid ${x.rule}`,background:t?x.paper:x.card}})]})}function sM({children:e}){return m("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:x.text,color:x.onInk},children:e})}var Cle={wheelslisting:m(De,{title:"All wheels",children:m("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])=>L("div",{style:{display:"flex",alignItems:"center",gap:6},children:[m("span",{style:{width:20,height:15,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",...je(x.paper,x.paper2,150)},children:m(Ur,{size:12,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),m("b",{style:{flex:1,fontSize:"4.31cqw",color:x.text},children:e}),m("span",{style:{fontSize:"3.65cqw",color:x.muted},children:o}),m("b",{style:{fontSize:"4.31cqw",color:x.text,width:26,textAlign:"right"},children:t})]},e))})}),catalogfilterbar:L("div",{style:{...Y,background:x.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[L("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[["20 inch","6\xD7139.7","Black"].map(e=>L("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"4px 7px",borderRadius:99,background:x.text,color:x.onInk,display:"flex",gap:4,alignItems:"center"},children:[e,m("span",{style:{opacity:.6},children:"\u2715"})]},e)),m("span",{style:{fontSize:"3.65cqw",color:x.rust,fontWeight:700},children:"Clear"})]}),L("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[m("span",{style:{fontSize:"3.65cqw",color:x.muted},children:"128 results"}),m("span",{style:{fontSize:"3.65cqw",color:x.muted,border:`1px solid ${x.rule}`,borderRadius:3,padding:"3px 6px"},children:"Sort: Price \u25BE"})]})]}),fitmentfinder:L("div",{style:{...Y,padding:"10px 12px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center",...je(x.ink,x.inkSoft)},children:[m("span",{style:{fontSize:"5.31cqw",fontWeight:700,color:x.onInk},children:"Will it fit your rig?"}),L("div",{style:{display:"flex",gap:4},children:[["2021","Toyota","Hilux"].map(e=>L("span",{style:{flex:1,fontSize:"3.65cqw",color:x.text,background:x.card,borderRadius:3,padding:"5px 6px",display:"flex",justifyContent:"space-between"},children:[e," ",m("span",{style:{color:x.muted},children:"\u25BE"})]},e)),m("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.08em",background:x.warm,color:x.ink,borderRadius:3,padding:"5px 7px"},children:"GO"})]})]}),compatibletyres:m(De,{title:"Tyres that suit",children:m("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])=>L("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[m("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",background:x.ink},children:m("span",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)",width:26,height:26,borderRadius:"50%",border:`5px solid ${x.mark2}`,boxSizing:"border-box"}})}),m("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:x.text,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e}),m("span",{style:{fontSize:"3.32cqw",color:x.muted},children:o})]},e))})}),tyresizes:m(De,{title:"Available sizes",children:m("div",{style:{flex:1,display:"flex",flexWrap:"wrap",gap:4,alignContent:"center"},children:["265/65R17","285/70R17","265/60R18","275/55R20"].map((e,o)=>m("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"5px 7px",borderRadius:3,border:`1px solid ${o===0?x.rust:x.rule}`,color:o===0?x.rust:x.text,background:o===0?x.paper:x.card},children:e},e))})}),tyrefitment:L(De,{title:"Will it fit your car?",children:[m("div",{style:{display:"flex",gap:3},children:["Make","Model","Year","Trim"].map(e=>L("span",{style:{flex:1,minWidth:0,fontSize:"3.32cqw",color:x.muted,background:x.paper,border:`1px solid ${x.rule}`,borderRadius:3,padding:"4px 5px",display:"flex",justifyContent:"space-between",gap:2,overflow:"hidden",whiteSpace:"nowrap"},children:[e," ",m("span",{style:{color:x.muted},children:"\u25BE"})]},e))}),m("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])=>L("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:6,borderTop:`1px solid ${x.rule}`,paddingTop:3},children:[m("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:x.text},children:e}),m("span",{style:{fontSize:"3.32cqw",fontWeight:t?700:400,letterSpacing:"0.06em",color:t?x.warm:x.muted},children:o})]},e))})]}),eutyrelabel:L("div",{style:{...Y,background:x.card,padding:"9px 11px",display:"flex",gap:8,alignItems:"center"},children:[m("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1.5},children:[["A","42%"],["B","56%"],["C","70%"],["D","84%"]].map(([e,o],t)=>L("div",{style:{display:"flex",alignItems:"center",gap:3},children:[m("span",{style:{width:o,height:6,borderRadius:"0 2px 2px 0",background:t===1?x.rust:x.mark1}}),m("span",{style:{fontSize:"3.32cqw",fontWeight:700,color:t===1?x.rust:x.muted},children:e})]},e))}),L("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:3,alignItems:"center"},children:[m("b",{style:{fontSize:"6.63cqw",lineHeight:1,color:x.text},children:"72"}),m("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",color:x.muted},children:"dB"})]})]}),bundleoffer:L("div",{style:{...Y,background:x.paper,padding:"9px 11px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[m(_m,{children:"Buy it with"}),L("div",{style:{display:"flex",alignItems:"center",gap:5},children:[[0,1].map(e=>m("span",{style:{width:26,height:22,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",background:x.card},children:m(Ur,{size:17,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})},e)),m("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:x.muted},children:"+"}),L("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1},children:[m("span",{style:{fontSize:"3.65cqw",color:x.muted,textDecoration:"line-through"},children:"$1,024"}),m("b",{style:{fontSize:"6.02cqw",color:x.rust,lineHeight:1},children:"$899"})]})]})]}),checkoutcta:L("div",{style:{...Y,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,...je(x.ink,x.ink2)},children:[L("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[m("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",color:x.warm,fontWeight:700},children:"READY TO ORDER"}),m("b",{style:{fontSize:"6.63cqw",color:x.onInk,lineHeight:1},children:"$1,956"}),m("span",{style:{fontSize:"3.65cqw",color:x.onInk,opacity:.65},children:"4 items \xB7 fitted free"})]}),m("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"6px 10px",borderRadius:2,background:x.warm,color:x.ink,flex:"none"},children:"CHECKOUT"})]}),contact:m(De,{title:"Who do you need?",children:m("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])=>L("div",{style:{display:"flex",alignItems:"center",gap:5},children:[m("b",{style:{flex:1,fontSize:"4.31cqw",color:x.text},children:e}),m("span",{style:{fontSize:"3.65cqw",color:x.muted},children:o}),m("span",{style:{fontSize:"4.64cqw",color:x.rust,lineHeight:1},children:"\u203A"})]},e))})}),contactlocations:m(De,{title:"Find us",children:m("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])=>L("div",{style:{border:`1px solid ${x.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[m("b",{style:{fontSize:"4.31cqw",color:x.text},children:e}),m("span",{style:{fontSize:"3.32cqw",color:x.muted},children:o}),m("span",{style:{fontSize:"3.32cqw",color:x.rust,fontWeight:700},children:t})]},e))})}),citypictures:m(De,{title:"Our studios",children:L("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:3,minHeight:0},children:[m("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.12em",fontWeight:700,color:x.muted},children:"A \xB7 AMERICAS"}),m("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:["Los Angeles","Miami","Toronto"].map(e=>L("div",{style:{position:"relative",minHeight:0},children:[m(G,{r:3,style:{...Y,background:`linear-gradient(transparent 45%,${x.scrim} 45%),${je(x.ink,x.inkSoft2).background}`}}),m("b",{style:{position:"absolute",left:5,bottom:4,fontSize:"3.65cqw",color:x.onInk},children:e})]},e))})]})}),citymaps:m(De,{title:"Find us",children:m("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])=>L("div",{style:{position:"relative",padding:"4px 5px",display:"flex",flexDirection:"column",gap:2,minHeight:0},children:[m(G,{r:4,style:{...Y,background:"none",border:`1px solid ${x.rule}`}}),m("b",{style:{position:"relative",fontSize:"4.31cqw",color:x.text},children:e}),m("span",{style:{position:"relative",fontSize:"3.32cqw",color:x.muted},children:o}),L("div",{style:{flex:1,minHeight:0,position:"relative"},children:[m(G,{r:3,style:{...Y,...je(x.paper,x.paper2,150)}}),m(G,{w:"60%",h:"60%",r:8,style:{position:"absolute",left:"12%",top:"20%",background:x.mark1,opacity:.75}}),m(G,{w:6,h:6,r:3,style:{position:"absolute",left:"44%",top:"34%",background:x.rust}})]})]},e))})}),form:m(De,{title:"Send us a message",children:L("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[L("div",{style:{display:"flex",gap:5},children:[m(Om,{label:"Name"}),m(Om,{label:"Email"})]}),m(Om,{label:"Message",filled:!0}),m(sM,{children:"SEND"})]})}),appointmentbooking:m(De,{title:"Book a fitting",children:L("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[m("div",{style:{display:"flex",gap:3},children:["Mon","Tue","Wed","Thu"].map((e,o)=>m("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",fontWeight:o===2?700:500,padding:"4px 0",borderRadius:3,background:o===2?x.text:x.paper,color:o===2?x.onInk:x.muted},children:e},e))}),m("div",{style:{display:"flex",gap:3},children:["8:00","10:30","13:00","15:30"].map((e,o)=>m("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",padding:"4px 0",borderRadius:3,border:`1px solid ${o===1?x.rust:x.rule}`,color:o===1?x.rust:x.muted,background:o===3?x.paper:x.card,textDecoration:o===3?"line-through":"none"},children:e},e))})]})}),reviewform:m(De,{title:"Leave a review",children:L("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[m(Tw,{filled:4,size:14}),m(Om,{label:"Your review",filled:!0}),m(sM,{children:"POST"})]})}),submitbuild:m(De,{title:"Show us your build",children:L("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,border:`1px dashed ${x.mark1}`,borderRadius:5,background:x.paper},children:[m("span",{style:{fontSize:"6.63cqw",lineHeight:1,color:x.rust,fontWeight:300},children:"+"}),m("span",{style:{fontSize:"3.65cqw",color:x.muted},children:"Drop a photo of your rig"})]})}),masthead:L("div",{style:{...Y,background:x.paper,display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 13px",gap:5},children:[m("span",{style:{height:1.5,background:x.text}}),m("span",{style:{fontSize:"7.65cqw",fontWeight:800,letterSpacing:"0.02em",color:x.text,lineHeight:1},children:"THE TRACK"}),L("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"3.65cqw",letterSpacing:"0.1em",textTransform:"uppercase",color:x.muted},children:[m("span",{children:"Issue 14"}),m("span",{children:"Spring 2026"})]}),m("span",{style:{height:1,background:x.rule}})]}),featuredcover:L("div",{style:{...Y,overflow:"hidden",...je(x.ink,x.inkSoft2)},children:[m(Ur,{size:92,style:{right:-18,top:-14}}),m("div",{style:{position:"absolute",inset:0,background:`linear-gradient(0deg,${x.scrim},transparent 62%)`}}),L("div",{style:{position:"absolute",left:12,right:12,bottom:11,display:"flex",flexDirection:"column",gap:3},children:[m("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:x.warm},children:"FEATURE"}),m("span",{style:{fontSize:"6.16cqw",lineHeight:1.15,fontWeight:700,color:x.onInk},children:"Four days on the Madigan Line"})]})]}),longread:L("div",{style:{...Y,background:x.card,padding:"10px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[m("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.14em",fontWeight:700,color:x.rust},children:"12 MIN READ"}),m("span",{style:{fontSize:"6.02cqw",lineHeight:1.15,fontWeight:700,color:x.text},children:"What breaks first, and why"}),m(ho,{children:"Every failure starts in the same place:"}),m(ho,{w:"80%",children:"the bolt nobody re-torqued."})]}),articlebody:L("div",{style:{...Y,background:x.card,padding:"10px 22px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center",alignItems:"center",textAlign:"center"},children:[m("span",{style:{fontSize:"4.97cqw",lineHeight:1.2,fontWeight:700,color:x.text},children:"Why offset beats width"}),m(ho,{w:"100%",children:"A wider wheel adds grip only if the offset still"}),m(ho,{w:"88%",children:"clears the arch, so the offset is chosen first."}),m(ho,{w:"80%",children:"Width follows from the space left."})]}),series:m(De,{title:"Recurring columns",children:m("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])=>L("div",{style:{display:"flex",alignItems:"center",gap:6},children:[m("span",{style:{width:3,height:12,borderRadius:2,background:x.rust,flex:"none"}}),m("b",{style:{flex:1,fontSize:"4.64cqw",color:x.text},children:e}),m("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:x.muted},children:o})]},e))})}),events:m(De,{title:"Latest posts",children:m("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[[x.inkSoft,x.inkSoft2,"Madigan Line, four days"],[x.rust,x.warm,"Why offset beats width"]].map(([e,o,t])=>L("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[m("span",{style:{width:24,height:18,borderRadius:3,flex:"none",...je(e,o,150)}}),L("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[m("b",{style:{fontSize:"4.31cqw",color:x.text},children:t}),m("span",{style:{fontSize:"3.65cqw",color:x.muted},children:"4 Sep \xB7 Shed Notes"})]})]},t))})}),docmasthead:L("div",{style:{...Y,background:x.card,padding:"12px 14px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[m("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:x.muted},children:"POLICY"}),m("span",{style:{fontSize:"6.49cqw",fontWeight:700,color:x.text,lineHeight:1.1},children:"Returns & refunds"}),m("span",{style:{fontSize:"3.65cqw",color:x.muted},children:"Version 3 \xB7 Updated 4 Sep 2026"}),m("span",{style:{height:2,width:26,background:x.rust,borderRadius:1}})]}),docbody:m("div",{style:{...Y,background:x.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])=>L("div",{style:{display:"flex",gap:5},children:[m("b",{style:{fontSize:"3.98cqw",color:x.rust,flex:"none"},children:e}),m(ho,{children:o})]},e))}),docmetacards:m(De,{title:"At a glance",children:m("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])=>L("div",{style:{border:`1px solid ${x.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[m("b",{style:{fontSize:"5.31cqw",color:x.text,lineHeight:1},children:e}),m("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:x.muted},children:o})]},o))})}),doctabs:L("div",{style:{...Y,background:x.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:0,padding:"0 11px"},children:[m("div",{style:{display:"flex",gap:0},children:["Returns","Warranty","Shipping"].map((e,o)=>m("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"5px 8px",color:o===0?x.text:x.muted,background:o===0?x.paper:"transparent",borderRadius:"4px 4px 0 0",border:`1px solid ${o===0?x.rule:"transparent"}`,borderBottom:"none"},children:e},e))}),m("span",{style:{height:1,background:x.rule}}),L("div",{style:{paddingTop:6,display:"flex",flexDirection:"column",gap:2},children:[m(ho,{children:"Unfitted wheels come back within 30 days, no questions."}),m(ho,{w:"58%",children:"Freight on a change of mind is yours."})]})]}),paragraphs:L("div",{style:{...Y,background:x.card,padding:"11px 14px",display:"flex",gap:10,alignItems:"center"},children:[m("span",{style:{flex:1,fontSize:"5.86cqw",lineHeight:1.2,fontWeight:700,color:x.text},children:"The right wheel is the boring one."}),L("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[m(ho,{children:"Forged, correctly offset, rated for what you actually"}),m(ho,{children:"carry. Everything else is a photograph."})]})]}),keyfeatures:m(De,{title:"Key features",children:m("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=>L("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[m("span",{style:{fontSize:"4.64cqw",color:x.rust,fontWeight:700,lineHeight:1},children:"\u2713"}),m("span",{style:{fontSize:"4.31cqw",color:x.text},children:e})]},e))})}),statsparagraph:L("div",{style:{...Y,background:x.paper,padding:"10px 12px",display:"flex",gap:10,alignItems:"center"},children:[L("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:5},children:[m(vd,{n:"27k",label:"Rigs"}),m(vd,{n:"4.9",label:"Rating"})]}),L("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[m(ho,{children:"Twelve years of fitting the same three questions, and the"}),m(ho,{children:"answer has not moved: load rating, offset, then looks."})]})]}),chart:L(De,{title:"Load vs weight",children:[m("div",{style:{flex:1,display:"flex",alignItems:"flex-end",gap:5,paddingBottom:2},children:[38,62,84,71,96].map((e,o)=>m("span",{style:{flex:1,height:`${e}%`,borderRadius:"2px 2px 0 0",background:o===4?x.rust:x.mark1}},o))}),m("span",{style:{height:1,background:x.rule,marginTop:-4}})]}),mockup:m("div",{style:{...Y,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",...je(x.inkSoft,x.ink)},children:L("div",{style:{width:"72%",height:"74%",borderRadius:4,overflow:"hidden",background:x.card,boxShadow:`0 6px 14px ${x.scrim}`},children:[m("div",{style:{height:9,background:x.paper,display:"flex",alignItems:"center",gap:2,padding:"0 4px"},children:[0,1,2].map(e=>m("span",{style:{width:2.5,height:2.5,borderRadius:"50%",background:x.mark1}},e))}),L("div",{style:{padding:5,display:"flex",flexDirection:"column",gap:3},children:[m("span",{style:{height:4,width:"56%",borderRadius:1,background:x.mark2}}),m("span",{style:{height:14,borderRadius:2,...je(x.paper,x.paper2,150)}}),m("span",{style:{height:3,width:"38%",borderRadius:1,background:x.rust}})]})]})}),manifesto:m("div",{style:{...Y,overflow:"hidden",display:"flex",alignItems:"center",padding:"0 16px",...je(x.ink,x.ink2)},children:L("span",{style:{fontSize:"6.63cqw",lineHeight:1.2,fontWeight:700,color:x.onInk},children:["We build for the ",m("span",{style:{color:x.warm},children:"last"})," ten percent of the track."]})}),timeline:m(De,{title:"Our story",children:m("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)=>L("div",{style:{display:"flex",gap:7,alignItems:"flex-start",position:"relative"},children:[t<2&&m("span",{style:{position:"absolute",left:3,top:8,bottom:-8,width:1,background:x.rule}}),m("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",marginTop:1,background:x.rust,zIndex:1}}),L("div",{style:{display:"flex",flexDirection:"column",gap:0,minWidth:0},children:[m("b",{style:{fontSize:"4.64cqw",color:x.text},children:e}),m(ho,{children:o})]})]},e))})}),timelinetrack:L("div",{style:{...Y,padding:"0 12px",display:"flex",flexDirection:"column",gap:10,justifyContent:"center",...je(x.ink,x.inkSoft)},children:[m("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:x.warm},children:"Milestones"}),L("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",paddingTop:7},children:[m("span",{style:{position:"absolute",left:0,right:0,top:3,height:1,background:x.mark2,opacity:.55}}),["1998","2009","2016","2024"].map((e,o)=>L("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,position:"relative"},children:[m("span",{style:{position:"absolute",top:-7,width:6,height:6,borderRadius:"50%",background:o===3?x.warm:x.mark1}}),m("span",{style:{fontSize:"4.31cqw",fontWeight:700,color:o===3?x.warm:x.onInk,opacity:o===3?1:.75},children:e})]},e))]})]}),footprint:L("div",{style:{...Y,overflow:"hidden",...je(x.paper,x.paper2,150)},children:[m("span",{style:{position:"absolute",left:"8%",top:"18%",width:"62%",height:"64%",borderRadius:"48% 52% 40% 60% / 55% 45% 55% 45%",background:x.mark1,opacity:.75}}),m("span",{style:{position:"absolute",left:"52%",top:"52%",width:"34%",height:"34%",borderRadius:"58% 42% 55% 45% / 45% 58% 42% 55%",background:x.mark2,opacity:.55}}),[["26%","38%"],["44%","58%"],["62%","34%"]].map(([e,o])=>m("span",{style:{position:"absolute",left:e,top:o,width:7,height:7,borderRadius:"50% 50% 50% 0",transform:"rotate(-45deg)",background:x.rust}},e)),m("span",{style:{position:"absolute",left:11,bottom:9,fontSize:"4.64cqw",fontWeight:700,color:x.text},children:"3 fitting bays"})]}),banner:L("div",{style:{...Y,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,background:x.rust},children:[L("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[m("b",{style:{fontSize:"6.02cqw",color:x.onInk},children:"End of season \xB7 20% off"}),m("span",{style:{fontSize:"3.98cqw",color:x.onInk,opacity:.8},children:"Fitted free, this month only."})]}),m("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:x.onInk,color:x.text,flex:"none"},children:"SHOP"})]}),titlewithbuttons:L("div",{style:{...Y,background:x.paper,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:7,padding:"0 14px",textAlign:"center"},children:[m("span",{style:{fontSize:"6.49cqw",lineHeight:1.15,fontWeight:700,color:x.text},children:"Not sure what fits?"}),L("div",{style:{display:"flex",gap:5},children:[m("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:x.text,color:x.onInk},children:"FIND MY FIT"}),m("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,border:`1px solid ${x.text}`,color:x.text},children:"CALL US"})]})]}),ticker:m("div",{style:{...Y,overflow:"hidden",background:x.ink,display:"flex",alignItems:"center"},children:m("span",{style:{whiteSpace:"nowrap",fontSize:"6.29cqw",fontWeight:800,letterSpacing:"0.06em",color:x.warm,marginLeft:-14},children:"FREE FITTING \xB7 48HR DISPATCH \xB7 FREE FITTING \xB7 48HR DISPATCH"})}),countdown:L("div",{style:{...Y,padding:"10px 12px",display:"flex",flexDirection:"column",alignItems:"center",gap:6,justifyContent:"center",...je(x.ink,x.ink2)},children:[m("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.16em",textTransform:"uppercase",color:x.muted},children:"Back online in"}),m("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[["23","Hours"],["59","Minutes"],["48","Seconds"]].map(([e,o],t)=>L("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[t>0&&m("b",{style:{fontSize:"9.5cqw",lineHeight:1,color:x.warm},children:":"}),L("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[m("b",{style:{fontSize:"11.5cqw",lineHeight:1,color:x.onInk,fontVariantNumeric:"tabular-nums"},children:e}),m("span",{style:{fontSize:"3.2cqw",letterSpacing:"0.1em",textTransform:"uppercase",opacity:.62,color:x.onInk},children:o})]})]},o))})]}),breadcrumb:m("div",{style:{...Y,background:x.card,display:"flex",alignItems:"center",padding:"0 13px"},children:L("span",{style:{fontSize:"4.64cqw",color:x.muted},children:["Home ",m("span",{style:{opacity:.5},children:"/"})," Wheels ",m("span",{style:{opacity:.5},children:"/"})," ",m("span",{style:{color:x.text,fontWeight:700},children:"20 inch"})]})}),categorybar:L("div",{style:{...Y,background:x.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[m("div",{style:{display:"flex",gap:5},children:["All","Wheels","Tyres","Lift"].map((e,o)=>m("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"4px 7px",borderRadius:99,background:o===0?x.text:x.paper,color:o===0?x.onInk:x.muted},children:e},e))}),m("span",{style:{height:1,background:x.rule}})]}),intro:L("div",{style:{...Y,overflow:"hidden",background:x.card},children:[m("div",{style:{position:"absolute",inset:0,...je(x.ink,x.inkSoft2)}}),m(Ur,{size:64,style:{right:8,top:6}}),L("div",{style:{position:"absolute",left:16,right:16,bottom:8,top:"46%",background:x.paper,borderRadius:6,padding:"8px 11px",display:"flex",flexDirection:"column",gap:2,boxShadow:`0 -4px 10px ${x.scrim}`},children:[m("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:x.text},children:"Since 1998"}),m(ho,{children:"One shed, one lathe, one idea."}),m(ho,{w:"66%",children:"It turned out to be right."})]})]}),gallerygrid:m(De,{title:"Photo gallery",children:m("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gridTemplateRows:"repeat(2,1fr)",gap:4,minHeight:0},children:[[x.rust,x.warm],[x.inkSoft,x.ink],[x.paper2,x.mark2],[x.ink,x.inkSoft2],[x.warm,x.paper2],[x.mark2,x.inkSoft]].map(([e,o],t)=>m("div",{style:{borderRadius:3,...je(e,o,140+t*22)}},t))})}),gallery:L(De,{title:"Gallery",children:[m("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:-2},children:["On the truck","Studio","Close-ups"].map((e,o)=>m("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,color:o===0?x.text:x.muted,borderBottom:`1.5px solid ${o===0?x.rust:"transparent"}`,paddingBottom:2},children:e},e))}),m("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:[[x.rust,x.warm],[x.ink,x.inkSoft],[x.paper2,x.mark2]].map(([e,o],t)=>m("div",{style:{borderRadius:3,...je(e,o,150+t*20)}},t))})]}),ordersummary:L(De,{title:"Order summary",children:[L("div",{style:{display:"flex",gap:6,alignItems:"center",paddingBottom:4},children:[m("span",{style:{width:26,height:26,borderRadius:4,position:"relative",overflow:"hidden",flex:"none",...je(x.paper,x.paper2,150)},children:m(Ur,{size:18,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),L("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[m("b",{style:{fontSize:"4.31cqw",color:x.text},children:"Ridge Grappler"}),m("span",{style:{fontSize:"3.65cqw",color:x.muted},children:"20\xD79 +12 \xB7 qty 4"})]})]}),L("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",justifyContent:"center"},children:[m(Hr,{k:"Subtotal",v:"$1,956"}),m(Hr,{k:"Fitting",v:"Free"}),L("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:5,fontSize:"4.64cqw"},children:[m("b",{style:{color:x.text},children:"Total"}),m("b",{style:{color:x.text,fontSize:"6.02cqw"},children:"$1,956"})]})]})]}),deliveryoptions:m(De,{title:"Delivery",children:m("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])=>L("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"5px 6px",borderRadius:4,border:`1px solid ${r?x.rust:x.rule}`,background:r?x.paper:x.card},children:[m("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",border:`1.5px solid ${r?x.rust:x.mark1}`,background:r?x.rust:"transparent"}}),m("span",{style:{flex:1,fontSize:"4.31cqw",fontWeight:600,color:x.text},children:e}),m("span",{style:{fontSize:"3.98cqw",color:x.muted},children:o}),m("b",{style:{fontSize:"4.31cqw",color:x.text},children:t})]},e))})}),paymentbadges:L("div",{style:{...Y,background:x.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[m(_m,{children:"Ways to pay"}),m("div",{style:{display:"flex",gap:5},children:[["VISA",x.ink],["MC",x.rust],["AMEX",x.inkSoft],["PayPal",x.ink2]].map(([e,o])=>m("span",{style:{flex:1,textAlign:"center",fontSize:"3.65cqw",fontWeight:800,letterSpacing:"0.06em",color:x.onInk,borderRadius:3,padding:"6px 0",background:o},children:e},e))})]}),stats:L("div",{style:{...Y,padding:"10px 12px",display:"flex",flexDirection:"column",gap:9,justifyContent:"center",...je(x.ink,x.ink2)},children:[m("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:x.warm},children:"By the numbers"}),L("div",{style:{display:"flex",gap:8},children:[m(vd,{n:"27k",label:"Rigs fitted",tone:x.onInk}),m(vd,{n:"12",label:"Years",tone:x.onInk}),m(vd,{n:"4.9",label:"Avg rating",tone:x.warm})]})]}),testimonials:L("div",{style:{...Y,overflow:"hidden",background:x.paper,padding:"10px 11px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center"},children:[m("span",{style:{position:"absolute",right:10,top:2,fontSize:"22.4cqw",lineHeight:1,fontWeight:800,color:x.rust,opacity:.16},children:"\u201D"}),m(Tw,{filled:5,size:7}),m("span",{style:{position:"relative",fontSize:"5.31cqw",lineHeight:1.35,color:x.text,fontWeight:600},children:"\u201CTook them out to the Simpson and back. Not one chip.\u201D"}),L("div",{style:{display:"flex",alignItems:"center",gap:5},children:[m(nM,{}),m("span",{style:{fontSize:"3.98cqw",color:x.muted},children:"Dave M. \xB7 Hilux N80"})]})]}),reviews:L(De,{title:"Reviews",children:[m("div",{style:{display:"flex",gap:4,height:22},children:[[x.inkSoft,x.inkSoft2],[x.rust,x.warm],[x.ink,x.inkSoft],[x.mark2,x.mark1]].map(([e,o],t)=>m("div",{style:{flex:1,borderRadius:3,...je(e,o,140+t*15)}},t))}),m("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])=>L("div",{style:{display:"flex",gap:5,alignItems:"flex-start"},children:[m(nM,{size:12}),L("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[L("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[m("b",{style:{fontSize:"3.98cqw",color:x.text},children:e}),m(Tw,{filled:o})]}),m(ho,{children:t})]})]},e))})]}),logos:L("div",{style:{...Y,display:"flex",flexDirection:"column",gap:9,justifyContent:"center",padding:"0 12px",...je(x.ink,x.inkSoft)},children:[m("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:x.warm},children:"As fitted by"}),m("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:8},children:["ARB","TJM","IRONMAN","OPPOSITE"].map(e=>m("span",{style:{textAlign:"center",fontSize:"4.31cqw",fontWeight:800,letterSpacing:"0.08em",color:x.onInk,opacity:.82},children:e},e))})]}),prose:L("div",{style:{...Y,background:x.paper,padding:"11px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[m("span",{style:{fontSize:"5.86cqw",fontWeight:700,color:x.text},children:"Why offset matters"}),L("div",{style:{display:"flex",gap:6},children:[m("span",{style:{fontSize:"15.3cqw",lineHeight:.78,fontWeight:800,color:x.rust,marginTop:1},children:"T"}),L("div",{style:{display:"flex",flexDirection:"column"},children:[m(ho,{children:"he number on the back of your wheel decides whether the"}),m(ho,{w:"76%",children:"tyre sits under the guard or an inch outside it."})]})]})]}),cards:m(De,{title:"What you get",children:m("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])=>L("div",{style:{border:`1px solid ${x.rule}`,borderRadius:4,padding:6,display:"flex",flexDirection:"column",gap:2},children:[m("span",{style:{width:11,height:11,borderRadius:3,background:x.rust,opacity:.9}}),m("b",{style:{fontSize:"3.98cqw",color:x.text},children:e}),m(ho,{children:o})]},e))})}),faq:m(De,{title:"Questions",children:m("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])=>L("div",{style:{borderBottom:`1px solid ${x.rule}`,padding:"4px 2px"},children:[L("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6},children:[m("b",{style:{fontSize:"4.31cqw",color:x.text},children:e}),m("span",{style:{fontSize:"4.64cqw",color:x.muted,lineHeight:1},children:o?"\u2212":"+"})]}),o&&m(ho,{w:"90%",children:"Use the fitment finder \u2014 it reads your build, not just the model."})]},e))})}),hero:L("div",{style:{...Y,overflow:"hidden",...je(x.ink,x.ink2)},children:[m("div",{style:{...Y,background:`linear-gradient(90deg,${x.scrim},transparent 70%)`}}),m("div",{style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",padding:"12px 14px",gap:5},children:m(aM,{over:"NEW \xB7 SUMMER",overTone:x.warm,head:"Built for the worst road you own",cta:"SHOP ALL",ctaBg:x.warm,ctaFg:x.ink,tone:x.onInk})}),m(Ur,{size:104,style:{right:-24,bottom:-30}})]}),herosingle:L("div",{style:{...Y,display:"flex",background:x.paper,overflow:"hidden"},children:[m("div",{style:{flex:1,padding:12,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:m(aM,{over:"ALL-TERRAIN",overTone:x.rust,head:"Grip that does not ask",headSize:12,cta:"EXPLORE",ctaBg:x.text,ctaFg:x.onInk,tone:x.text})}),m("div",{style:{flex:1,position:"relative",...je(x.inkSoft,x.inkSoft2)},children:m(Ur,{size:74,style:{right:-14,top:16}})})]}),productgrid:m(De,{title:"Best sellers",children:L("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[m(kw,{name:"Ridge 19",price:"$365"}),m(kw,{name:"Ridge 29",price:"$410"}),m(kw,{name:"Ridge 39",price:"$455"})]})}),collections:m(De,{title:"Shop by category",children:m("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Wheels",x.inkSoft,x.inkSoft2],["Tyres",x.rust,x.warm],["Lift kits",x.ink,x.inkSoft]].map(([e,o,t])=>m("div",{style:{borderRadius:4,display:"flex",alignItems:"flex-end",padding:5,color:x.onInk,...je(o,t)},children:m("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.04em"},children:e})},e))})}),producthero:L("div",{style:{...Y,display:"flex",background:x.card,overflow:"hidden"},children:[m("div",{style:{flex:1.1,position:"relative",...je(x.paper,x.paper2,150)},children:m(Ur,{size:78,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),L("div",{style:{flex:1,padding:"10px 10px 10px 8px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[m("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:x.rust},children:"NITTO"}),m("b",{style:{fontSize:"6.29cqw",color:x.text},children:"Ridge Grappler"}),m("span",{style:{fontSize:"6.63cqw",fontWeight:700,color:x.text},children:"$489"}),m("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,background:x.text,color:x.onInk},children:"ADD TO CART"})]})]}),spectable:m(De,{title:"Specifications",children:L("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[m(Hr,{k:"Diameter",v:'20"'}),m(Hr,{k:"Width",v:"9.0J"}),m(Hr,{k:"Offset",v:"+12"}),m(Hr,{k:"Load",v:"1250 kg"})]})}),fitmenttable:m(De,{title:"Will it fit?",children:L("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[m(Hr,{k:"Hilux N80",v:"20\xD79 +12",ok:!0}),m(Hr,{k:"Ranger PX3",v:"20\xD79 +12",ok:!0}),m(Hr,{k:"LC79",v:"17\xD78 \u221210",ok:!0})]})}),processsteps:L("div",{style:{...Y,background:x.paper,padding:10,display:"flex",flexDirection:"column",gap:7,justifyContent:"center"},children:[m(_m,{children:"How it works"}),m("div",{style:{display:"flex",gap:6},children:["Pick your rig","Match the fit","We fit it"].map((e,o)=>L("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[m("span",{style:{width:11,height:11,borderRadius:"50%",background:x.text,color:x.onInk,fontSize:"3.98cqw",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700},children:o+1}),m("span",{style:{fontSize:"3.98cqw",color:x.text,fontWeight:600},children:e})]},e))})]}),detailrows:m("div",{style:{...Y,background:x.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=m("div",{style:{flex:1,...je(t?x.rust:x.inkSoft,t?x.warm:x.inkSoft2)}},"art"),a=L("div",{style:{flex:1.1,padding:8,display:"flex",flexDirection:"column",gap:2,justifyContent:"center"},children:[m("b",{style:{fontSize:"4.64cqw",color:x.text},children:e}),m("span",{style:{fontSize:"3.98cqw",color:x.muted,lineHeight:1.3},children:o})]},"tx");return m("div",{style:{flex:1,display:"flex",minHeight:0},children:t?[a,r]:[r,a]},e)})}),specstrip:m("div",{style:{...Y,background:x.ink,color:x.onInk,display:"flex",alignItems:"center",justifyContent:"space-around",padding:"0 8px"},children:[["5 yr","Warranty"],["Free","Fitting"],["48 hr","Dispatch"]].map(([e,o])=>L("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[m("b",{style:{fontSize:"5.69cqw",letterSpacing:"0.02em"},children:e}),m("span",{style:{fontSize:"3.65cqw",color:x.mark2,letterSpacing:"0.1em",textTransform:"uppercase"},children:o})]},o))})},lM={subscribe:L("div",{style:{...Y,padding:13,display:"flex",flexDirection:"column"},children:[L("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[L("div",{style:{display:"flex",alignItems:"center",gap:6},children:[m(G,{w:8,h:8,r:2,tone:"accent"}),m(G,{w:38,h:7,r:3,tone:"dark"}),m(G,{w:16,h:7,r:3,tone:"accent"})]}),m(G,{w:38,h:4,r:2,tone:"soft"})]}),m("div",{style:{height:1,background:go.line,marginBottom:10}}),L("div",{style:{flex:1,display:"flex",gap:10,border:`1px solid ${go.line}`,borderRadius:7,padding:10},children:[L("div",{style:{flex:1.1,display:"flex",flexDirection:"column",justifyContent:"center",gap:5},children:[m(G,{w:"46%",h:3,r:2,tone:"accent"}),m(G,{w:"84%",h:8,r:4,tone:"dark"}),m(G,{w:"56%",h:8,r:4,tone:"accent"}),m(G,{w:"96%",h:3,r:2,tone:"soft",style:{marginTop:2}}),L("div",{style:{display:"flex",gap:5,marginTop:4},children:[m("div",{style:{flex:1,height:13,borderRadius:5,border:`1px solid ${go.line}`,background:go.block}}),m(G,{w:34,h:13,r:5,tone:"accent"})]})]}),L("div",{style:{flex:1,background:go.block,borderRadius:6,padding:8,display:"flex",flexDirection:"column",gap:6},children:[m(G,{w:"52%",h:4,r:2,tone:"accent"}),Array.from({length:3}).map((e,o)=>L("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,borderTop:o?`1px solid ${go.line}`:"none",paddingTop:o?4:0},children:[m(G,{w:34,h:4,r:2,tone:"dark"}),m(G,{w:16,h:3,r:2,tone:"soft"})]},o))]})]})]}),split:L("div",{style:{...Y,display:"flex"},children:[m("div",{style:{width:"44%",background:vw}}),L("div",{style:{flex:1,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[m(G,{w:"44%",h:5,r:3,tone:"accent"}),m(G,{w:"88%",h:8,r:4,tone:"dark"}),m(G,{w:"70%",h:8,r:4,tone:"dark"}),m(G,{w:"94%",h:5,r:2,tone:"soft",style:{marginTop:2}}),m(G,{w:"80%",h:5,r:2,tone:"soft"}),m(G,{w:"40%",h:13,r:6,tone:"accent",style:{marginTop:5}})]})]}),sectionheader:L(iM,{children:[m(G,{w:"18%",h:6,r:3,tone:"accent",style:{position:"absolute",top:15,right:16}}),L("div",{style:{...Y,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:10},children:[L("div",{style:{display:"flex",alignItems:"center",gap:9},children:[m(G,{w:16,h:16,r:4,tone:"accent"}),m(G,{w:"20%",h:9,r:4,tone:"dark"})]}),m(G,{w:"62%",h:10,r:5,tone:"dark"}),m(G,{w:"42%",h:6,r:3,tone:"soft"})]})]}),header:m("div",{style:{...Y,padding:14,display:"flex",flexDirection:"column",justifyContent:"center"},children:L("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[m(G,{w:"22%",h:12,r:4,tone:"dark"}),L("div",{style:{display:"flex",gap:9,alignItems:"center"},children:[m(G,{w:26,h:6,r:3,tone:"soft"}),m(G,{w:26,h:6,r:3,tone:"soft"}),m(G,{w:26,h:6,r:3,tone:"soft"}),m(G,{w:18,h:14,r:5,tone:"accent"})]})]})}),footer:L("div",{style:{...Y,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:12},children:[L("div",{style:{display:"flex",gap:14},children:[L("div",{style:{flex:1.4,display:"flex",flexDirection:"column",gap:6},children:[m(G,{w:"60%",h:9,r:4,tone:"dark"}),m(G,{w:"90%",h:5,r:2,tone:"soft"}),m(G,{w:"70%",h:5,r:2,tone:"soft"})]}),[0,1].map(e=>L("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6},children:[m(G,{w:"50%",h:6,r:3,tone:"dark"}),m(G,{w:"80%",h:5,r:2,tone:"soft"}),m(G,{w:"66%",h:5,r:2,tone:"soft"})]},e))]}),m("div",{style:{height:1,background:go.line}}),L("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[m(G,{w:"30%",h:5,r:2,tone:"soft"}),m(G,{w:"16%",h:5,r:2,tone:"soft"})]})]}),grid:m("div",{style:{...Y,padding:14,display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr",gap:9},children:Array.from({length:4}).map((e,o)=>m("div",{style:{borderRadius:6,background:go.block}},o))}),blanksection:m("div",{style:{...Y,padding:14,display:"flex"},children:L("div",{style:{flex:1,border:`1px dashed ${go.line}`,borderRadius:7,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:[m(G,{w:14,h:2,r:1,tone:"tint"}),m(G,{w:2,h:14,r:1,tone:"tint",style:{position:"absolute"}})]})}),spacer:L("div",{style:{...Y,padding:14,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[m(G,{w:"100%",h:6,r:3,tone:"soft"}),m(G,{w:16,h:22,r:3,tone:"block",style:{alignSelf:"center"}}),m(G,{w:"100%",h:6,r:3,tone:"soft"})]}),divider:m("div",{style:{...Y,padding:14,display:"flex",alignItems:"center"},children:m(G,{w:"100%",h:3,r:2,tone:"dark"})}),customhtml:L("div",{style:{...Y,display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:vw},children:[m(G,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(-14deg)"}}),m(G,{w:16,h:10,r:3,tone:"accent"}),m(G,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(14deg)"}})]}),heading:m("div",{style:{...Y,padding:14,display:"flex",alignItems:"center"},children:m(G,{w:"64%",h:13,r:4,tone:"dark"})}),text:L("div",{style:{...Y,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[m(G,{w:"100%",h:6,r:3,tone:"soft"}),m(G,{w:"96%",h:6,r:3,tone:"soft"}),m(G,{w:"100%",h:6,r:3,tone:"soft"}),m(G,{w:"58%",h:6,r:3,tone:"soft"})]}),image:m("div",{style:{position:"absolute",inset:14,borderRadius:7,background:vw}}),button:m("div",{style:{...Y,display:"flex",alignItems:"center",justifyContent:"center"},children:m(G,{w:"34%",h:16,r:8,tone:"accent"})}),menu:L("div",{style:{...Y,padding:"14px 22%",display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[m(G,{w:"48%",h:7,r:3,tone:"dark"}),m(G,{w:"82%",h:5,r:2,tone:"soft"}),m(G,{w:"66%",h:5,r:2,tone:"soft"}),m(G,{w:"74%",h:5,r:2,tone:"soft"}),m(G,{w:"58%",h:5,r:2,tone:"soft"})]}),emailform:L("div",{style:{...Y,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[m(G,{w:"56%",h:8,r:3,tone:"dark"}),L("div",{style:{display:"flex",gap:6},children:[m("div",{style:{flex:1,height:16,borderRadius:5,border:`1px solid ${go.line}`}}),m(G,{w:"30%",h:16,r:5,tone:"accent"})]})]}),sociallogos:m("div",{style:{...Y,display:"flex",alignItems:"center",justifyContent:"center",gap:9},children:[0,1,2,3].map(e=>m(G,{w:16,h:16,r:8,tone:"dark"},e))}),paymentlogos:L("div",{style:{...Y,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[m(G,{w:22,h:6,r:2,tone:"soft"}),[0,1,2,3].map(e=>m(G,{w:20,h:13,r:3,tone:"dark"},e))]}),search:m("div",{style:{...Y,padding:"0 18%",display:"flex",alignItems:"center"},children:L("div",{style:{flex:1,height:22,borderRadius:11,border:`1px solid ${go.line}`,display:"flex",alignItems:"center",gap:7,padding:"0 9px"},children:[m("div",{style:{width:9,height:9,borderRadius:5,border:`2px solid ${go.dark}`}}),m(G,{w:"46%",h:5,r:2,tone:"soft"})]})}),cart:L("div",{style:{...Y,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[m("div",{style:{width:22,height:18,borderRadius:"3px 3px 6px 6px",border:`2px solid ${go.dark}`}}),m("div",{style:{padding:"2px 6px",borderRadius:6,border:`1.5px solid ${go.dark}`},children:m(G,{w:7,h:7,r:2,tone:"dark"})})]}),countryswitch:L("div",{style:{...Y,padding:14,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:5},children:[L("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",border:`1px solid ${go.line}`},children:[m(G,{w:22,h:6,r:2,tone:"dark"}),m(G,{w:6,h:4,r:1,tone:"soft"})]}),L("div",{style:{width:"46%",display:"flex",flexDirection:"column",gap:4,padding:6,border:`1px solid ${go.line}`},children:[m(G,{w:"80%",h:4,r:2,tone:"accent"}),m(G,{w:"64%",h:4,r:2,tone:"soft"}),m(G,{w:"72%",h:4,r:2,tone:"soft"})]})]}),legalline:L("div",{style:{...Y,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[m("div",{style:{height:1,background:go.line}}),L("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[m(G,{w:"38%",h:5,r:2,tone:"soft"}),L("div",{style:{display:"flex",gap:5},children:[m(G,{w:14,h:5,r:2,tone:"soft"}),m(G,{w:14,h:5,r:2,tone:"soft"}),m(G,{w:14,h:5,r:2,tone:"soft"})]})]})]}),fallback:m("div",{style:{position:"absolute",inset:14,borderRadius:8,background:go.block}})};function dM({type:e}){let o=wle[e]??"",t=Cle[o]??lM[o]??lM.fallback;return m("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 eh}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as ll,jsxs as cM}from"react/jsx-runtime";import vle from"efficient-easel/screen/components/SidePanelHead";import{StylesIcon as kle}from"efficient-easel/rail";import{Tooltip as Tle}from"efficient-shell/ui";import{HintsToggle as Ple,hintsFoldClass as Ele}from"efficient-easel/panel";import{useHints as Ole}from"efficient-easel/screen/lib/hints";function fM({tokenRef:e,siteId:o,onClose:t,onNotify:r,tab:a,onTabChange:n,revealPageGroup:s,onPageGroupRevealed:l}){let d=Us(),{shown:c,setShown:f}=Ole();return cM("div",{className:`sf-styles ${Ele(c)}`.trim(),children:[ll(vle,{icon:ll(kle,{}),title:i("Styles"),context:ll(Tle,{content:i("{name} \u2014 renamed in the Console: {place}.",{name:d,place:i("Storefront \u25B8 Sites \u25B8 Settings")}),className:"sf-name-tip",children:ll("span",{className:"sf-name-text",children:d})})}),cM("div",{className:"sf-insp-body es-insp-body sf-scroll",children:[ll(Bp,{tokenRef:e,siteId:o,onNotify:r,tab:a,onTabChange:n,revealPageGroup:s,onPageGroupRevealed:l}),ll(Ple,{shown:c,onChange:f,label:i("Show hints")})]})]})}import{jsx as ko,jsxs as Rn,Fragment as Ble}from"react/jsx-runtime";import{Fragment as kM,useEffect as TM,useRef as Lw}from"react";import{useTreeDrag as PM}from"efficient-easel/drag";import{GlobeIcon as Dle,ImageIcon as Nle,LocationIcon as Mle,MapIcon as Hle,TextLinesIcon as Ule,TrashIcon as EM}from"efficient-easel/icons";import{Subtree as OM,TreeRow as Td,TreeRowAction as _M,TreeSeam as AM}from"efficient-easel/tree";import{useEaselStrings as Wle}from"efficient-easel/strings";import{createPreviewSelectionContext as _le}from"efficient-easel/draw/client";var{Provider:X$e,useSelection:pM}=_le("selectedLocationPartId");function uM(e,o,t){return`${e}::${o}::${t}`}function mM(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 zle}from"efficient-easel/screen/lib/screen-parts";import{useSyncExternalStore as Ale}from"react";var Lle={level:"groups"},xM=Lle,Pw=new Set;function Xt(e){xM=e;for(let o of Pw)o()}function Rle(e){return Pw.add(e),()=>{Pw.delete(e)}}var hM=()=>xM;function IM(){return Ale(Rle,hM,hM)}var kd=e=>String(e?.group??""),Ew=new WeakMap,Fle=0;function Am(e){let o=Ew.get(e);return o||(o=`loc${++Fle}`,Ew.set(e,o)),o}var gM=(e,o)=>o||e||"Ungrouped",bM={photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
337
|
-
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""};function Ln(e){return Fu(e,kd,o=>String(o?.groupName??"")).map(o=>({key:o.key,name:o.name,cards:o.items.map(t=>t.item)}))}var Ow=e=>e.flatMap(o=>o.cards),yM=(e,o,t)=>Math.min(Math.max(e,o),t);function Lm(e,o,t){let r=0;for(let a=0;a<e.length;a++)if(kd(e[a])===o){if(r===t)return a;r++}return-1}function _w(e,o,t){let r=Ln(e);if(o<0||o>=r.length)return e;let[a]=r.splice(o,1),n=yM(o<t?t-1:t,0,r.length);return r.splice(n,0,a),Ow(r)}function Aw(e,o,t,r,a){let n=Ln(e),s=n.find(u=>u.key===o),l=n.find(u=>u.key===r);if(!s||!l||t<0||t>=s.cards.length)return e;let[d]=s.cards.splice(t,1),c=o===r?d:{...d,group:l.key,groupName:l.name};c!==d&&Ew.set(c,Am(d));let f=yM(s===l&&t<a?a-1:a,0,l.cards.length);return l.cards.splice(f,0,c),Ow(n)}function SM(e,o){let t=Ln(e),r=t.find(n=>n.key===o),a={...bM,group:o,groupName:r?.name??""};return r?(r.cards.push(a),Ow(t)):[...e,a]}function wM(e){let o=new Set(Ln(e).map(a=>a.key)),t=o.size+1,r=`Group ${t}`;for(;o.has(r);)r=`Group ${++t}`;return{cards:[...e,{...bM,group:r,groupName:""}],key:r}}function CM(e,o){return e.filter(t=>kd(t)!==o)}function vM(e,o,t){let r=Lm(e,o,t);return r<0?e:e.filter((a,n)=>n!==r)}function oGe(e,o,t){let r=e.flatMap((s,l)=>kd(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 tGe(e,o,t){return o.flatMap(r=>{let a=e.filter(n=>kd(n)===r);return a.length?a:t(r)})}var Fm="ContactLocations",Rm=e=>({parentId:`locations-${e}`,slot:"groups"}),Rw=(e,o)=>({parentId:`locations-${e}`,slot:`cities:${o}`});function LM(e,o){let{readOnly:t,selected:r}=o,a=Wle().tree,n=o.data?.content??[],s=zle(e),l=Lw(null);TM(()=>{let y=r?.type===Fm?String(r.props.id):null;y&&y!==l.current&&Xt({level:"groups"}),l.current=y},[r?.props.id]);let{selectedLocationPartId:d,setSelectedLocationPartId:c,setSelectHandler:f}=pM(),u=IM(),p=(y,b)=>{let P=n[y];P&&o.replace(y,{type:P.type,props:{...P.props,locations:b}})},h=y=>{let b=n[y]?.props?.locations;return Array.isArray(b)?b:[]},I=PM({keyOf:y=>`group:${y.si}:${y.index}`,readOnly:!!t,canDrop:(y,b)=>b.parentId===Rm(y.si).parentId&&b.slot==="groups",onDrop:(y,b)=>{p(y.si,_w(h(y.si),y.index,b.index)),u.level==="city"&&Xt({level:"groups"})},onStep:(y,b)=>{p(y.si,_w(h(y.si),y.index,b<0?y.index-1:y.index+2)),u.level==="city"&&Xt({level:"groups"})}}),g=PM({keyOf:y=>`city:${y.si}:${y.group}:${y.index}`,readOnly:!!t,canDrop:(y,b)=>b.parentId===Rm(y.si).parentId&&b.slot.startsWith("cities:"),onDrop:(y,b)=>{let P=b.slot.slice(7);p(y.si,Aw(h(y.si),y.group,y.index,P,b.index)),Xt({level:"group",key:P})},onStep:(y,b)=>{p(y.si,Aw(h(y.si),y.group,y.index,y.group,b<0?y.index-1:y.index+2)),u.level==="city"&&Xt({level:"group",key:y.group})}}),C=Lw(n);C.current=n;let w=Lw(()=>{});TM(()=>{f(y=>{let b=mM(y);if(!b)return;let P=C.current.findIndex(H=>H.props?.id===b.nodeId);P<0||w.current(P,{level:b.part,index:b.index})})},[f]);let T=(y,b)=>{l.current=n[y]?.props?.id??null,o.select(y),Xt(b),e.reveal();let P=n[y]?.props?.id;typeof P=="string"&&(b.level==="city"||b.level==="image"||b.level==="map")?c(uM(P,b.index,b.level)):c(null),typeof P=="string"&&o.scrollTo(P)};return w.current=T,{renderLocationTree:(y,b,{rowClick:P,isCollapsed:H,toggleCollapse:E})=>{let U=h(b),O=Ln(U),D=String(y.props.id),v=s&&r?.props.id===D,_=F=>ko(AM,{...t?{}:I.seam({place:{...Rm(b),index:F}})},`seam:${D}:groups:${F}`),A=(F,z)=>ko(AM,{...t?{}:g.seam({place:{...Rw(b,F),index:z}})},`seam:${D}:cities:${F}:${z}`);return Rn(Ble,{children:[ko(Td,{icon:ko(Ule,{size:13}),name:i("Texts"),words:a,onSelect:()=>T(b,{level:"texts"}),selected:v&&u.level==="texts",rowProps:{onClick:P(()=>T(b,{level:"texts"}))}}),O.map((F,z)=>{let $=`${D}::grp::${F.key}`,X=H($),Q=v&&u.level==="group"&&u.key===F.key,Fe=F.name||F.key?gM(F.key,F.name):i("Ungrouped"),Oe={...Rw(b,F.key),index:F.cards.length},ze=g.row({item:{si:b,group:F.key,index:-1},place:Oe,into:Oe,canDrag:!1},{onClick:P(()=>T(b,{level:"group",key:F.key}))}),Ke=I.row({item:{si:b,index:z},place:{...Rm(b),index:z}},ze.rowProps);return Rn(kM,{children:[z===0&&_(0),ko(Td,{icon:ko(Dle,{size:13}),name:Fe,words:a,onSelect:()=>T(b,{level:"group",key:F.key}),selected:Q,draggable:Ke.draggable,dragging:Ke.dragging,drop:Ke.drop??ze.drop,fold:{open:!X,label:i("group"),onToggle:()=>E($)},actions:ko(_M,{kind:"delete",label:Wo("Delete {label} group ({n} city)","Delete {label} group ({n} cities)",F.cards.length,{label:Fe}),onClick:()=>{p(b,CM(U,F.key)),Xt({level:"groups"})},children:ko(EM,{size:15})}),rowProps:Ke.rowProps,count:F.cards.length,countLabel:Wo("{n} city","{n} cities",F.cards.length)}),!X&&Rn(OM,{children:[F.cards.map((ge,Te)=>{let _e=Lm(U,F.key,Te),Ne=v&&u.level==="city"&&u.index===_e,ao=String(ge?.name??"")||i("City"),bo=`${D}::city::${Am(ge)}`,ne=H(bo),{rowProps:Me,...Ve}=g.row({item:{si:b,group:F.key,index:Te},place:{...Rw(b,F.key),index:Te}},{onClick:P(()=>T(b,{level:"city",index:_e}))});return Rn(kM,{children:[Te===0&&A(F.key,0),ko(Td,{icon:ko(Mle,{size:13}),name:ao,words:a,onSelect:()=>T(b,{level:"city",index:_e}),selected:Ne,...Ve,fold:{open:!ne,label:ao,onToggle:()=>E(bo)},actions:ko(_M,{kind:"delete",label:i("Delete {name}",{name:ao}),onClick:()=>{p(b,vM(U,F.key,Te)),Xt({level:"group",key:F.key})},children:ko(EM,{size:15})}),rowProps:Me}),!ne&&Rn(OM,{children:[ko(Td,{icon:ko(Nle,{size:13}),name:i("Image"),words:a,onSelect:()=>T(b,{level:"image",index:_e}),selected:v&&u.level==="image"&&u.index===_e,rowProps:{onClick:P(()=>T(b,{level:"image",index:_e}))}}),ko(Td,{icon:ko(Hle,{size:13}),name:i("Map"),words:a,onSelect:()=>T(b,{level:"map",index:_e}),selected:v&&u.level==="map"&&u.index===_e,rowProps:{onClick:P(()=>T(b,{level:"map",index:_e}))}})]}),A(F.key,Te+1)]},Am(ge))}),Rn("button",{type:"button",className:"sf-add-card",onClick:()=>{let ge=SM(U,F.key);p(b,ge);let Te=Ln(ge).find(_e=>_e.key===F.key);Xt(Te&&Te.cards.length?{level:"city",index:Lm(ge,F.key,Te.cards.length-1)}:{level:"group",key:F.key})},children:[ko("span",{className:"sf-plus sf-plus--sm",children:"+"}),i("Add city")]})]}),_(z+1)]},$)}),Rn("button",{type:"button",className:"sf-add-card",onClick:()=>{let{cards:F,key:z}=wM(U);p(b,F),T(b,{level:"group",key:z})},children:[ko("span",{className:"sf-plus sf-plus--sm",children:"+"}),i("Add group")]})]})},sectionPressed:y=>{y?.type===Fm&&Xt({level:"groups"})}}}import{useEffect as Zie,useRef as Jie}from"react";import{createNode as $w,newId as Gw}from"efficient-easel/data";import{useEaselApi as Qie}from"efficient-easel/easel";import{useScreenDocument as ede}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as ode}from"efficient-easel/screen/lib/session-context";import{useEffect as BH,useRef as qie}from"react";import{useEasel as Yie}from"efficient-easel/easel";import{ROOT_ZONE as zw}from"efficient-easel/draw";var Pd={};function RM(e){return Pd={...e?.theme?{theme:e.theme}:{},...e?.site?{site:e.site}:{}},Pd}function FM(e){Pd===e&&(Pd={})}function il(){return Pd}import{jsx as Pt,jsxs as PH}from"react/jsx-runtime";import{createContext as Mie,useContext as Hie,useEffect as Uie,useRef as Wie,useState as EH}from"react";import{jsx as ga,jsxs as jM}from"react/jsx-runtime";import{useEffect as dl,useRef as KM,useState as Fn}from"react";import{jsx as BM,Fragment as $le,jsxs as Gle}from"react/jsx-runtime";import{useEffect as jle,useRef as DM,useState as Kle}from"react";var Vle="#t=0.001",qle=2;function Yle(e,o){if(e.readyState<qle||!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 NM({src:e,objectPosition:o="50% 50%",onError:t}){let r=DM(null),a=DM(null),[n,s]=Kle(!1);return jle(()=>{let l=r.current,d=a.current;if(n||!l||!d)return;let c=()=>{Yle(l,d)&&s(!0)};return c(),l.addEventListener("loadeddata",c),l.addEventListener("seeked",c),()=>{l.removeEventListener("loadeddata",c),l.removeEventListener("seeked",c)}},[n]),Gle($le,{children:[BM("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&&BM("video",{ref:r,src:`${e}${Vle}`,muted:!0,playsInline:!0,preload:"auto",className:"hidden",onError:t})]})}import{imageCopyUrl as UM,imageSrcSet as Xle}from"efficient-shell/image-copies";var MM;function Fw(){return MM===void 0?{}:{host:MM}}var SGe="(max-width: 800px) 100vw, min(100vw, 1600px)",wGe="(max-width: 960px) 100vw, 50vw";function Bw(e,{fallbackWidth:o=1280,maxWidth:t}={}){let r=Xle(e,{...Fw(),...t===void 0?{}:{maxWidth:t}});return r?{src:UM(e,o,Fw()),srcSet:r}:{src:e}}var Zle=/[\s"'()\\;]/,Jle={"\\":"\\\\",'"':'\\"',"\n":"\\a ","\r":"\\d ","\f":"\\c "};function HM(e){return e.replace(/[\\"\n\r\f]/g,o=>Jle[o]??o)}function CGe(e){let o=UM(e,1920,Fw());return o===e?Zle.test(e)?`url("${HM(e)}")`:`url(${e})`:`url("${HM(o)}")`}import{jsx as WM}from"react/jsx-runtime";import{createContext as Qle,useContext as eie,useMemo as PGe}from"react";var zM=Qle(null);function $M({children:e}){return WM(zM.Provider,{value:"below",children:e})}function Ed(){return eie(zM)}function oie(){return Ed()==="below"?{loading:"lazy"}:{}}function GM(e){let o=oie();return WM("img",{...e,...o})}var EGe="laterSlideIds";var tie=.5;function Od({videoSrc:e,videoAv1Src:o,videoSrcPhone:t,videoAv1SrcPhone:r,posterSrc:a,posterSrcPhone:n,showVideo:s=!0,playbackRate:l=tie,objectPosition:d="50% 50%",objectPositionPhone:c,objectPositionTablet:f,quiet:u=!1,slideShown:p,laterSlide:h=!1,laterOfLead:I=!1}){let g=JP(c,f),C=Ed(),[w,T]=Fn(!1),y=C==="below"&&!w,b=C==="first",P=a||"",H=n||"",E=KM(null),U=xd(E,!0,!0),O=U===void 0?void 0:U==="phone",D=wc({video:e,av1:o,videoPhone:t,av1Phone:r},O===!0),v=D.video||"",_=Sc(v,D.av1),[A,F]=Fn(!1),[z,$]=Fn(!1),[X,Q]=Fn(!1),[Fe,Oe]=Fn(!1),ze=p??!0,[Ke,ge]=Fn(!1),Te=C!=="first"&&!I,[_e,Ne]=Fn(!1),ao=KM(null);dl(()=>{if(!Te)return;if(document.readyState==="complete"){Ne(!0);return}let Z=()=>Ne(!0);return window.addEventListener("load",Z,{once:!0}),()=>window.removeEventListener("load",Z)},[Te]),dl(()=>{F(!1),$(!1),Q(!1),Oe(!1)},[v,P,H]),dl(()=>{ze&&ge(!0)},[ze]),dl(()=>{let Z=ao.current;Z&&(ze?Z.play()?.catch(()=>{}):Z.pause())},[ze,Ke,_e]),dl(()=>{if(!h||Te&&!_e)return;let Z=()=>T(!0);if(typeof window.requestIdleCallback=="function"){let ct=window.requestIdleCallback(Z,{timeout:2e3});return()=>window.cancelIdleCallback(ct)}let Ae=setTimeout(Z,800);return()=>clearTimeout(Ae)},[h,Te,_e]),dl(()=>{let Z=ao.current;if(!Z)return;let Ae=()=>{Z.playbackRate=l};return Ae(),Z.addEventListener("loadedmetadata",Ae),()=>Z.removeEventListener("loadedmetadata",Ae)},[v,l]);let bo=Rk(P),ne=P&&(bo||H)&&!z?Bw(P):{src:P},Me=H&&!z?Bw(H):{src:H},Ve=H&&!y&&!w?[{sized:Me,media:mi},...P?[{sized:ne,media:wl}]:[]]:[];return jM("div",{ref:E,className:"absolute inset-0 z-[1]",children:[ga("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),Ve.map(({sized:Z,media:Ae})=>ga("link",{rel:"preload",as:"image",href:Z.src,media:Ae,fetchPriority:"high",...Z.srcSet?{imageSrcSet:Z.srcSet,imageSizes:"100vw"}:{}},Ae)),(P||H)&&(bo||H?(()=>{let Z=ga("img",{...P?{src:ne.src}:{},...ne.srcSet?{srcSet:ne.srcSet,sizes:"100vw"}:{},alt:"",...y?{loading:"lazy"}:{},...b?{fetchPriority:"high"}:{},className:`absolute inset-0 z-[2] h-full w-full object-cover ${g.className}`.trim(),style:{display:A?"none":"block",objectPosition:d,...g.style},onError:Ae=>{Ae.currentTarget.currentSrc&&(ne.srcSet||Me.srcSet?$(!0):F(!0))}},H?void 0:P);return H?jM("picture",{children:[ga("source",{media:mi,srcSet:Me.srcSet||Me.src,sizes:"100vw"}),Z]},`${P} ${H}`):Z})():ga(CD,{src:P,alt:"",fill:!0,...y?{}:w?{loading:"eager"}:{priority:!0},sizes:"100vw",className:`z-[2] object-cover ${g.className}`.trim(),style:{display:A?"none":"block",objectPosition:d,...g.style},onError:()=>F(!0)},P)),s&&!u&&v&&O!==void 0&&Ke&&(!Te||_e)&&!X&&ga("video",{ref:ao,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:d},onError:()=>Q(!0),children:_.map(Z=>ga("source",{src:Z.src,type:Z.type},Z.src))},v),s&&u&&v&&O!==void 0&&Ke&&(!Te||_e)&&!Fe&&(!P||A)&&ga(NM,{src:v,objectPosition:d,onError:()=>Oe(!0)},v)]})}import{jsx as Fo,Fragment as tH,jsxs as Uw}from"react/jsx-runtime";import{jsx as cl}from"react/jsx-runtime";import{useRef as rie}from"react";import{SCROLL_EFFECTS_WITH_ZOOM as aie,scrollAttrs as nie}from"efficient-shell/format";function VM({views:e,origins:o={},boxClass:t,boxAttrs:r,boxStyle:a,takesViewHide:n=!1,atEdge:s=!1,zoomInside:l="layer",zoomLayerClass:d,children:c}){let f=rie(null),u=Ic(),p=qr(),h=n?p:os,I=hd(f,!0,s),{attrs:g,style:C}=nie(e[I],o[I]),w=aie.includes(e[I].effect),T=Yr(`${Qn}${u.fill}${t?` ${t}`:""}`,h.className);if(w&&l==="picture")return h.scope(cl("div",{ref:f,className:T,...r,...h.attrs,...a?{style:a}:{},children:cl(bk,{attrs:g,style:C,children:u.inner(c)})}));let y=cl(yk,{children:u.inner(c)});if(w){let P=d??(u.fill?"h-full":void 0);return h.scope(cl("div",{ref:f,className:T,...r,...h.attrs,style:{...a,overflow:"clip"},children:cl("div",{...P?{className:P}:{},...g,style:C,children:y})}))}let b=Object.keys(C).length||a?{style:{...a,...C}}:{};return h.scope(cl("div",{ref:f,className:T,...r,...h.attrs,...g,...b,children:y}))}import{MOTION_TIMING as sie}from"efficient-shell/format";var ZM="grayscale(1) contrast(1.03)",QGe="Black and white";function lie(e){return e===!0?{filter:ZM}:{}}function iie(e){let{filter:o}=lie(e);return o?{style:{filter:o}}:{}}var Bn="sf-photo-grayscale",Hw="data-sf-photo-host",qM={duration:"--sf-photo-hover-duration",delay:"--sf-photo-hover-delay"},Mm=`@media (hover:hover){.${Bn}{filter:${ZM};transition:filter var(--sf-photo-hover-duration,var(--page-motion-hover-duration)) var(--page-ease-media) var(--sf-photo-hover-delay,var(--page-motion-hover-delay))}.${Bn}:hover,[data-sf-photo-host]:hover .${Bn}{filter:none}}@media (hover:hover) and (prefers-reduced-motion:reduce){.${Bn}{transition:none}}`;function JM(e){let o=sie.hover,t={...e.duration!==o.duration.default?{[qM.duration]:`${e.duration}s`}:{},...e.delay!==o.delay.default?{[qM.delay]:`${e.delay}s`}:{}};return Object.keys(t).length?t:void 0}function QM(e,o,t){if(e===!0)return iie(!0);if(t?.kind==="mono"){let r=JM(t);return{className:Bn,sheet:Mm,...r?{style:r}:{}}}return e===!1?{}:o===!0?{className:Bn}:{}}var eH="data-sf-repeat",Dw="sf-photo-zoom",die="--sf-photo-zoom",eje="sf-photo-wash",Bm="sf-photo-wash-rest",_d="sf-photo-wash-hover",Nm="sf-photo-frame",oH=(e,o)=>`:not([${eH}]:not(${o}) .${e})`,Mw=(e,o)=>`[${eH}]${o} .${e}${oH(e,o)}`,Nw=(e,o)=>`${o},${Mw(e,":hover")},[${Hw}]:hover .${e}${oH(e,":hover")}`,YM=e=>`${e} var(--sf-photo-hover-duration,var(--page-motion-hover-duration)) var(--page-ease-media) var(--sf-photo-hover-delay,var(--page-motion-hover-delay))`,cie=`.${_d}{opacity:0}@media (hover:hover){.${Bm},.${_d}{transition:${YM("opacity")}}${Nw(_d,`.${Nm}:hover .${_d}`)}{opacity:1}${Nw(Bm,`.${Nm}:hover .${Bm}`)}{opacity:0}}@media (hover:hover) and (prefers-reduced-motion:no-preference){.${Dw}{transition:${YM("transform")}}${Nw(Dw,`.${Nm}:hover .${Dw}`)}{transform:scale(var(${die}))}}@media (hover:hover) and (prefers-reduced-motion:reduce){.${Bm},.${_d}{transition:none}}`,oje="sf-photo-move";function tje(e){if(!e||!e.zoom&&!e.darken)return null;let o=JM(e);return{className:Nm,sheet:cie,...o?{style:o}:{}}}function rje(e){return e===!0?{[Bn]:Mm}:{}}var Dm="sf-box-reveal",aje="sf-box-reveal",fie=8,XM=.3,nje=`@media ${wl}{.${Dm}{opacity:0;transform:translateY(${fie}px);transition:opacity ${XM}s ease-out,transform ${XM}s ease-out}${Mw(Dm,":hover")},${Mw(Dm,":focus-within")}{opacity:1;transform:none}}@media ${wl} and (prefers-reduced-motion:reduce){.${Dm}{transition:none;transform:none}}`;import{hidableText as pie}from"efficient-easel/draw";var uie={one:"max-view-tablet:grid-cols-1 max-view-tablet:grid-rows-1",side:"max-view-tablet:grid-cols-2 max-view-tablet:grid-rows-1",stacked:"max-view-tablet:grid-cols-1 max-view-tablet:grid-rows-2"},mie={one:"view-tablet:grid-cols-1 view-tablet:grid-rows-1",side:"view-tablet:grid-cols-2 view-tablet:grid-rows-1",stacked:"view-tablet:grid-cols-1 view-tablet:grid-rows-2"};function rH(e){let o=e.isVideo&&Qk(e.videoSource)==="youtube",t=e.isVideo&&eT(e.videoPlayback)==="click",r=o?oT(pie(e.youtubeUrl)):null,a=jp(e.mediaLayout);return{fromYouTube:o,onClick:t,youTubeId:r,backgroundFile:e.isVideo&&!o&&!t,desktopLayout:a,phoneLayout:Db(e.mediaLayoutPhone,a),twoPictures:!e.isVideo&&Ei(e)>1}}function Ad(e,o){return mc(In({_partMotion:e},o))}function Ld(e,o){return nu(In({_partMotion:e},o))}var Hm=e=>Iy({desktop:e.objectPosition,tablet:e.objectPositionTablet,phone:e.objectPositionPhone}),aH=zh.img;function nH({entrance:e,scroll:o,origins:t,editing:r,className:a,attrs:n,style:s,zoomLayerClass:l,children:d}){return e?Fo(cD,{views:e,editing:r,boxClass:a,boxAttrs:n,...s?{boxStyle:s}:{},children:d}):o?Fo(VM,{views:o,...t?{origins:t}:{},boxClass:a,boxAttrs:n,...s?{boxStyle:s}:{},...l?{zoomLayerClass:l}:{},children:d}):Fo("div",{className:a,...n,...s?{style:s}:{},children:d})}function fl(e,o){return QM(void 0,void 0,ZC(In({_partMotion:e},o)))}function sH(e){return dn.some(o=>fl(e,o).className)?{hostAttrs:{[Hw]:""},sheet:Mm}:{}}function Um({treatment:e,children:o}){return e.className?Fo("div",{className:`absolute inset-0 ${e.className}`,...e.style?{style:e.style}:{},children:o}):Fo(tH,{children:o})}function Wm({color:e,opacity:o,passClicks:t=!0}){return o>0?Fo("div",{className:t?"pointer-events-none absolute inset-0 z-[2]":"absolute inset-0 z-[2]",style:{background:e,opacity:Math.min(Math.max(o,0),100)/100}}):null}function zm({part:e,editing:o,marked:t=!0,entrance:r,scroll:a=null,origins:n,className:s,children:l}){let d=o&&t?{[RA]:e}:void 0;return Fo(nH,{entrance:r,scroll:a,origins:n,editing:o,className:s,attrs:d,zoomLayerClass:aH,children:l})}function lH({partMotion:e,editing:o,children:t}){let r=Ad(e,"media"),a=Ld(e,"media"),n=fl(e,"media"),s=Fo(Sk,{fill:zh,children:t}),l=n.className?Fo("div",{className:`absolute inset-0 z-[1] ${n.className}`,...n.style?{style:n.style}:{},children:s}):s;return r||a?Fo(nH,{entrance:r,scroll:a,editing:o,className:"absolute inset-0 z-[1]",zoomLayerClass:aH,children:l}):Fo(tH,{children:l})}function iH({desktopLayout:e,phoneLayout:o,editing:t,marked:r=!0,partMotion:a,first:n,second:s,laterSlide:l=!1}){return Uw("div",{className:`absolute inset-0 z-[1] grid ${uie[o]} ${mie[e]}`,"data-hero-layout":e,"data-hero-layout-phone":o,children:[Fo(zm,{part:"image",editing:t,marked:r,entrance:Ad(a,"image"),scroll:Ld(a,"image"),origins:Hm(n),className:"relative overflow-hidden",children:Uw(Um,{treatment:fl(a,"image"),children:[Fo(Od,{posterSrc:pt(n.src),showVideo:!1,laterSlide:l,objectPosition:n.objectPosition,objectPositionPhone:n.objectPositionPhone,objectPositionTablet:n.objectPositionTablet}),Fo(Wm,{color:n.tintColor,opacity:n.tintOpacity})]})}),Fo(zm,{part:"image2",editing:t,marked:r,entrance:Ad(a,"image2"),scroll:Ld(a,"image2"),origins:Hm(s),className:`relative overflow-hidden ${Qc({desktop:e==="one",tablet:e==="one",mobile:o==="one"},{atSectionLine:!0})}`.trimEnd(),children:Uw(Um,{treatment:fl(a,"image2"),children:[Fo(Od,{posterSrc:pt(s.src),showVideo:!1,laterSlide:l,objectPosition:s.objectPosition,objectPositionPhone:s.objectPositionPhone,objectPositionTablet:s.objectPositionTablet}),Fo(Wm,{color:s.tintColor,opacity:s.tintOpacity})]})})]})}import{jsx as ba,Fragment as hie,jsxs as xie}from"react/jsx-runtime";import{useEffect as Iie,useRef as gie,useState as bie}from"react";import{PlaySolidIcon as yie}from"efficient-shell/icons/efficient-looks";function dH({youTubeId:e,ownPoster:o,background:t,editing:r}){let[a,n]=bie("large");return Iie(()=>n("large"),[e]),e?xie(hie,{children:[!o&&a!=="none"&&ba(GM,{src:a==="large"?tT(e):rT(e),alt:"",className:"absolute inset-0 z-[2] h-full w-full object-cover",onLoad:s=>{a==="large"&&s.currentTarget.naturalWidth<=120&&n("small")},onError:()=>n(a==="large"?"small":"none")},`${e}-${a}`),t&&!r&&ba("div",{className:"pointer-events-none absolute inset-0 z-[3] overflow-hidden [container-type:size]","aria-hidden":"true",children:ba("iframe",{src:Qh(e,"background"),title:"",tabIndex:-1,allow:"autoplay; encrypted-media; picture-in-picture",className:"absolute left-1/2 top-1/2 h-[max(100%,56.25cqw)] w-[max(100%,177.78cqh)] -translate-x-1/2 -translate-y-1/2 border-0"})})]}):null}function cH({youTubeId:e,fileSrc:o,fileAv1Src:t,fileSrcPhone:r,fileAv1SrcPhone:a,playing:n,onPlay:s,editing:l}){let d=gie(null),c=xd(d,!0,!0)==="phone";if(!e&&!o)return null;let f=wc({video:o,av1:t,videoPhone:r,av1Phone:a},c),u=Sc(f.video,f.av1);return n&&!l?e?ba("iframe",{src:Qh(e,"click"),title:ex,allow:"autoplay; encrypted-media; picture-in-picture; fullscreen",allowFullScreen:!0,className:"absolute inset-0 z-[6] h-full w-full border-0 bg-overlay-scrim"}):ba("video",{ref:p=>{d.current=p},...u.length===1?{src:u[0].src}:{},controls:!0,autoPlay:!0,playsInline:!0,className:"absolute inset-0 z-[6] h-full w-full bg-overlay-scrim object-contain",children:u.length>1&&u.map(p=>ba("source",{src:p.src,type:p.type},p.src))},f.video):ba("button",{ref:p=>{d.current=p},type:"button","aria-label":ex,onClick:l?void 0:s,className:`absolute left-1/2 top-1/2 z-[4] grid h-16 w-16 -translate-x-1/2 -translate-y-1/2 place-items-center rounded-full bg-btn text-btn-ink shadow-lg transition-transform motion-reduce:transition-none ${l?"pointer-events-none":"cursor-pointer hover:scale-105"}`,children:ba(yie,{size:28})})}function fH(e,o){if(!e)return[];let t=`[${o}]`;return Array.from(e.querySelectorAll(t)).filter(r=>{let a=r.parentElement?.closest(t);return!a||a===e||!e.contains(a)})}var pH=["top","middle","bottom"],uH=["left","center","right"],mH="bottom",hH="left",Sie={top:"Top",middle:"Middle",bottom:"Bottom"},wie={left:"Left",center:"Center",right:"Right"},Fje="Up and down",Bje="Sideways",Cie={top:"flex-start",middle:"center",bottom:"flex-end"},vie={left:"flex-start",center:"center",right:"flex-end"},kie="--sf-hero-phone-y",Tie="--sf-hero-phone-x";function Pie(e){return pH.includes(e)?e:mH}function Eie(e){return uH.includes(e)?e:hH}function xH(e,o){let t=Pie(e),r=Eie(o),a={};return t!==mH&&(a[kie]=Cie[t]),r!==hH&&(a[Tie]=vie[r]),a}function Dje(){return pH.map(e=>({label:Sie[e],value:e}))}function Nje(){return uH.map(e=>({label:wie[e],value:e}))}import{hexToRgb as Oie}from"efficient-shell/format";var _ie=!0;var Aie=[[0,".5"],[30,".1"],[60,".1"],[100,".85"]];function IH(e){let o=Oie(e);return o?`${o.r},${o.g},${o.b}`:null}function gH(e){return e==null?_ie:e!==!1}function bH(e){let o=(e?IH(e):null)??IH(Nt);return`linear-gradient(180deg, ${Aie.map(([t,r])=>`rgba(${o},${r}) ${t}%`).join(", ")})`}import{hexToRgb as yH}from"efficient-shell/format";var SH="bottom";var Lie=[{label:"Bottom",value:"bottom",cell:"bottom"},{label:"Top",value:"top",cell:"top"},{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"}],Rie={bottom:180,top:0,left:270,right:90},Fie=[[.55,0],[.15,18],[null,35],[null,55],[.85,100]],Bie=[[null,33],[.6,67],[.94,100]];function Die(e,o){let{r:t,g:r,b:a}=yH(e)??yH(Nt);return`rgba(${t},${r},${a},${o})`}function wH(e){return io(Lie,SH,e)}function CH(e=Nt,o=SH){let t=wH(o),r=(t==="top"||t==="bottom"?Fie:Bie).map(([a,n])=>`${a===null?"transparent":Die(e,a)} ${n}%`);return`linear-gradient(${Rie[t]}deg, ${r.join(", ")})`}function vH(e,o){let t=Se(e.overlayColor),r=Se(e.overlayPosition),a=Se(o)??Nt;return!t&&!r?{own:!1,color:a,position:null}:{own:!0,color:t??a,position:wH(r)}}import{jsx as Nie}from"react/jsx-runtime";var kH="sf-photo-hover";function TH({sheet:e,name:o=kH}){return e?Nie("style",{href:o,precedence:kH,dangerouslySetInnerHTML:{__html:e}}):null}var zie=Mie({});function cKe({name:e,process:o,mediaType:t="video",mediaSrc:r,videoSpeed:a,poster:n,mediaAv1:s,mediaSrcPhone:l,mediaAv1Phone:d,posterPhone:c,objectPosition:f,objectPositionPhone:u,objectPositionTablet:p,tintColor:h=Nt,tintOpacity:I=0,groups:g,editing:C=!1,themeClassName:w,themeStyle:T,overlayColor:y,overlayPosition:b,mediaLayout:P,mediaLayoutPhone:H,mediaImage2:E,objectPosition2:U,objectPosition2Phone:O,objectPosition2Tablet:D,tintColor2:v=Nt,tintOpacity2:_=0,videoSource:A,youtubeUrl:F,videoPlayback:z,partMotion:$,laterSlide:X=!1}){let Q=qr(),{alignment:Fe="left",textureOpacity:Oe,textureOn:ze,textureColor:Ke,quietVideo:ge,phoneUpDown:Te,phoneSideways:_e,holdReel:Ne,reelHeld:ao,shownSlide:bo,ratioMin:ne}=Hie(zie),Me=Ed(),Ve=X&&Me==="first",Z=Wie(null),[Ae,ct]=EH(bo===void 0?void 0:!1);Uie(()=>{let Ca=Z.current;ct(bo===void 0||!Ca?void 0:fH(Ca.closest(".hero-track"),"data-slide-name")[bo]===Ca)});let fo=t==="video",M=fo?pt(r):void 0,Re=fo?pt(n):pt(r)??pt(n),ye=fo?{av1:pt(s),phone:pt(l),av1Phone:pt(d),poster:pt(c)}:{},po=typeof a=="number"?a/100:1,{fromYouTube:Be,onClick:Ot,youTubeId:xr,backgroundFile:Ze,desktopLayout:Ir,phoneLayout:ya,twoPictures:Nn}=rH({isVideo:fo,videoSource:A,videoPlayback:z,youtubeUrl:F,mediaLayout:P,mediaLayoutPhone:H}),[Mn,gr]=EH(!1);Mn&&ao===!1&&gr(!1);let Wr=!Mn,Sa=vH({overlayColor:y,overlayPosition:b},Ke),xl=fo?null:Ad($,"image"),wa=fo?null:Ld($,"image"),$d=sH($),Il=Pt(Um,{treatment:fo?{}:fl($,"image"),children:Pt(Od,{videoSrc:Ze?M:void 0,videoAv1Src:Ze?ye.av1:void 0,videoSrcPhone:Ze?ye.phone:void 0,videoAv1SrcPhone:Ze?ye.av1Phone:void 0,posterSrc:Re,posterSrcPhone:ye.poster,showVideo:Ze,playbackRate:po,objectPosition:f,objectPositionPhone:fo?void 0:u,objectPositionTablet:fo?void 0:p,quiet:ge,slideShown:Ae,laterSlide:X,laterOfLead:Ve})}),Gd=PH("section",{ref:Z,className:Yr(`${ne?"relative min-h-full w-full overflow-clip":"relative h-full w-full overflow-hidden"}${w?` ${w}`:""}`,Q.className),...Q.attrs,style:T,"data-slide-name":e??"","data-slide-process":o??"","data-slide-media":Ze&&M?"video":"still",...$d.hostAttrs,children:[Pt(TH,{sheet:$d.sheet}),Pt(lH,{partMotion:$,editing:C,children:Nn?Pt(iH,{laterSlide:X,desktopLayout:Ir,phoneLayout:ya,editing:C,marked:!1,partMotion:$,first:{src:r,objectPosition:f,objectPositionPhone:u,objectPositionTablet:p,tintColor:h,tintOpacity:I},second:{src:E,objectPosition:U,objectPositionPhone:O,objectPositionTablet:D,tintColor:v,tintOpacity:_}}):Be||xl||wa?PH(zm,{part:fo?"media":"image",editing:C,marked:!1,entrance:xl,scroll:wa,origins:Hm({objectPosition:f,objectPositionTablet:p,objectPositionPhone:u}),className:"absolute inset-0 z-[1]",children:[Il,Be&&Pt(dH,{youTubeId:xr,ownPoster:!!Re,background:!Ot,editing:C})]}):Il}),Ot&&Pt(cH,{youTubeId:xr,fileSrc:Be?void 0:M,fileAv1Src:Be?void 0:ye.av1,fileSrcPhone:Be?void 0:ye.phone,fileAv1SrcPhone:Be?void 0:ye.av1Phone,playing:Mn,onPlay:()=>{gr(!0),Ne?.()},editing:C}),Wr&&!Nn&&Pt(Wm,{color:h,opacity:I,passClicks:!1}),Wr&&gH(ze)&&Pt("div",{className:"absolute inset-0 z-[2]",style:{background:Sa.own?CH(Sa.color,Sa.position??void 0):bH(Sa.color),...Oe!==void 0?{opacity:Oe/100}:null}}),Wr&&Pt("div",{className:[ne?"sf-hero-group-layer relative min-h-full z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14":"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",C?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...ik,...xH(Te,_e)},children:g&&Pt(g,{className:"sf-hero-group-zone",minEmptyHeight:160})})]});return Q.scope(Ve?Pt($M,{children:Gd}):Gd)}var OH=Array.from({length:3},(e,o)=>({name:`Slide ${o+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));import{newNodeId as AH}from"efficient-easel/draw";import{isNodeList as $ie}from"efficient-easel/data";var LH=(e,o)=>({type:e.type,props:{...o?.(e.type)??{},...Object.fromEntries(Object.entries(e.props).map(([t,r])=>[t,$ie(r)?r.map(a=>LH(a,o)):r]))}}),Gie=e=>{let[o]=Gn([XS()],a=>AH(a)),{id:t,...r}=LH(o,e).props;return r},mr={Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>OH.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${bl.toLowerCase()}`,seeds:()=>[],addBlocked:Mh,notice:Hh},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${bl.toLowerCase()}`,seeds:()=>[],addBlocked:Mh,notice:Hh},ProcessSteps:{slot:ym,childType:oe,addLabel:`Add ${bl.toLowerCase()}`,seeds:e=>Array.from({length:YS},()=>Gie(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}},_H=1,jie={slot:Pi,childType:oe,addLabel:`Add ${bl.toLowerCase()}`,seeds:()=>[],addBlocked:e=>e.length>=_H?"This Hero has its Scrolling Bar already. Delete it to add another.":null,notice:e=>e.length>_H?`This Hero holds ${e.length} Scrolling Bars. Keep one and delete the others.`:null},RH={Hero:{[Pi]:jie}};function wKe(e){for(let[o,t]of Object.entries(e)){if($e(mr,o)&&j(mr,o)!==t)throw new Error(`lib/document/slot-specs: "${o}" already has a slot spec`);mr[o]=t}}function CKe(e,o){let t=j(mr,e);return t?{slot:t.slot,children:t.seeds(o).map(r=>({type:t.childType,props:{id:AH(t.childType),...r}}))}:null}var Kie={"Logos.logosPerRow":"columns","HeroSlide.tintOpacity":"overlay","Split.textBgTint":"overlay"},Vie={"Footprint.source":"typed"};function Ww(e){let o=e.props,t=!1;if(e.type&&o)for(let[r,a]of Object.entries(Kie)){let n=r.indexOf("."),s=r.slice(0,n),l=r.slice(n+1);if(s!==e.type||!(l in o))continue;let d=o[l],c={...o};delete c[l],(!(a in c)||c[a]===void 0)&&(c[a]=d),o=c,t=!0}if(e.type&&o)for(let[r,a]of Object.entries(Vie)){let n=r.indexOf("."),s=r.slice(n+1);if(r.slice(0,n)!==e.type||!(s in o))continue;let l=typeof o[s]=="string"?o[s].trim():"",d={...o};delete d[s],hC(l)&&l!==a&&!Zt(d)&&(d[yo]=l),o=d,t=!0}if(e.type&&o){let r=vv(e.type,o);r!==o&&(o=r,t=!0)}if(o){let r=rs({props:o},a=>ts(a,Ww));r.props!==o&&(o=r.props,t=!0)}return t?{...e,props:o}:e}function EKe(e){let o=e;if(!o||typeof o!="object")return e;let t=!1,r={...e};if(Array.isArray(o.content)){let a=o.content.map(Ww);a.some((n,s)=>n!==o.content[s])&&(r.content=a,t=!0)}if(o.zones&&typeof o.zones=="object"){let a=!1,n=Object.fromEntries(Object.entries(o.zones).map(([s,l])=>{if(!Array.isArray(l))return[s,l];let d=l.map(Ww);return d.some((c,f)=>c!==l[f])&&(a=!0),[s,d]}));a&&(r.zones=n,t=!0)}return t?r:e}function FH(e){let o=r=>typeof r=="string"?r:null,t=e.theme_row===void 0?null:e.theme_row==="site";return{schema:String(e.schema),site:String(e.site),headingCase:o(e.heading_case),textStyles:typeof e.text_styles_is_null=="boolean"?!e.text_styles_is_null:null,textStylesList:Array.isArray(e.text_styles)?e.text_styles:null,ownThemeRow:t,deleted:e.site_deleted===!0,...Array.isArray(e.theme_presets)?{themePresets:e.theme_presets}:{},...typeof e.selected_preset=="number"?{selectedPreset:e.selected_preset}:{},...typeof e.site_gutter=="number"?{siteGutter:e.site_gutter}:{},...typeof e.site_gutter_phone=="number"?{siteGutterPhone:e.site_gutter_phone}:{},..."site_gutter_unit"in e?{siteGutterUnit:o(e.site_gutter_unit)}:{},..."site_gutter_phone_unit"in e?{siteGutterPhoneUnit:o(e.site_gutter_phone_unit)}:{}}}function NH(e){let o=Yie(c=>c.appState.data.content),{theme:t,themeRow:r,themeFromDocument:a,siteGutter:n,siteGutterPhone:s,siteLengthUnits:l}=ue(),d=qie(new Set);BH(()=>{let c=DH({theme:t,themeRow:r,themeFromDocument:a,siteGutter:n,siteGutterPhone:s,siteLengthUnits:l});c&&Xie(xF(o,void 0,c),e,d.current)},[o,e,t,r,a,n,s,l]),BH(()=>{let c=RM(DH({theme:t,themeRow:r,themeFromDocument:a,siteGutter:n,siteGutterPhone:s,siteLengthUnits:l}));return()=>FM(c)},[t,r,a,n,s,l])}function DH(e){if(e.themeFromDocument||e.themeRow==="none")return{};if(e.themeRow!=="read")return null;let{siteGutter:o=null,siteGutterPhone:t=null,siteLengthUnits:r={}}=e;if(o===null&&t===null)return{theme:e.theme};let a=FH({schema:"",site:"",site_gutter:o,site_gutter_phone:t,site_gutter_unit:r.siteGutterUnit??null,site_gutter_phone_unit:r.siteGutterPhoneUnit??null});return{theme:e.theme,site:a}}function Xie(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(zw,r,a[0]),a.slice(1).forEach((s,l)=>{o.insertNode(zw,r+1+l,s),o.replaceComponent(zw,r+1+l,s)}))}}import{ROOT_ZONE as pl,missingPinnedTypes as tde,pinnedDuplicateIds as jw}from"efficient-easel/draw";function MH(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}function HH(e,o){let t=e.some(l=>l?.type===We),r=e[e.length-1],a=!t&&r?.type===Xe?r:null,n=e.filter(l=>l?.type===Xe&&l!==a).map(l=>String(l.props?.id??"")).filter(Boolean),s=o.hasChromeDoc&&!t&&!a;return{remove:n,seedHeader:!e.some(l=>l?.type===Jo),seedFooter:s,seedSiteHeader:s&&!e.some(l=>l?.type===Ye)}}async function UH(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!==Ye||!e.stillOpen())return!1;let r=e.latest();return r.some(a=>a?.type===Ye)?!1:(e.write(Ec(r,t)),!0)}function WH(e,o){let{adapter:t,capabilities:r,currentSlug:a,docId:n,data:s,saveStatus:l,siteId:d,tokenRef:c}=ede(),f=ode(),{hasSiteSettings:u,hasPinnedChrome:p}=r;NH(e);let h=!!r.editsPinnedInPlace&&a!==Mt,I=a===Mt,g=Qie().getState,C=Jie(null);Zie(()=>{if(!MH({docId:n,saveStatus:l,seededDocId:C.current})||(C.current=n,!p))return;let w=g().appState.data,T=w.content,y=s?.content??[],b=(U,O)=>U.some(D=>D?.type===O);if(!u){let U=new Set(jw(T)),O=U.size?T.filter(v=>!U.has(v.props.id)):T;if(U.size&&e.setDocument({...w,content:O}),I)return;let D=tde(O,y);if(D.includes(Xe)){let v=O.length,_=e.insertSection(Xe,v);e.replaceComponent(pl,v,{type:Xe,props:{id:_,blocks:Au()}})}D.includes(Jo)&&e.insertNode(pl,0,_u());return}if(I){let U=ss(T);if(U!==T&&e.setDocument({...w,content:[...U]}),!U.find(O=>O.type===Xe)&&!b(y,Xe)&&!b(U,We)&&!b(y,We)){let O=(v,_)=>$w(o,v,_),D={type:Xe,props:{blocks:Au()}};e.insertNode(pl,U.length,Yi(D,O,Gw(We),wd))}return}if(h){let U=!!t?.pinnedChrome?.state().docId,O=HH(T,{hasChromeDoc:U}),D=new Set([...O.remove,...jw(T.filter(_=>!O.remove.includes(String(_.props.id))))]),v=D.size?T.filter(_=>!D.has(String(_.props.id))):T;if(v.length!==T.length&&e.setDocument({...w,content:v}),O.seedFooter&&!b(y,Xe)&&!b(y,We)){let _=(F,z)=>$w(o,F,z),A={type:Xe,props:{blocks:Au()}};e.insertNode(pl,v.length,Yi(A,_,Gw(We),wd))}if(O.seedHeader&&!b(y,Jo)){let _=v[0]?.type===Ye?1:0;e.insertNode(pl,_,_u())}if(O.seedSiteHeader&&!b(y,Ye)&&!b(y,Xe)&&!b(y,We)){let _=n;UH({blocks:of(f),make:(A,F)=>$w(o,A,F),id:Gw(Ye),siteId:d??null,token:c.current,latest:()=>g().appState.data.content,stillOpen:()=>C.current===_,write:A=>{let F=g().appState.data;e.setDocument({...F,content:[...A]})}})}return}let P=T.filter(U=>U.type!==Xe),H=new Set(jw(P)),E=H.size?P.filter(U=>!H.has(U.props.id)):P;E.length!==T.length&&e.setDocument({...w,content:E}),!b(E,Jo)&&!b(y,Jo)&&e.insertNode(pl,0,_u())},[n,l,s,g,e,u,p,I,h,t,f,d,c])}import{useEffect as n4,useMemo as xde,useRef as s4}from"react";import{useEasel as Ide}from"efficient-easel/easel";import{useEaselHost as gde}from"efficient-easel/screen/lib/host";import{FIELD_DESCRIPTION_MARKER as cde}from"efficient-easel/screen/lib/host";import{isNode as Vw}from"efficient-easel/data";import{SITE_SIDE as GH}from"efficient-easel/screen/lib/content/length-units";var zH=[{text:"Ticker item"},{text:"Ticker item"},{text:"Ticker item"},{text:"Ticker item"}],f8e={label:"Scrolling Bar",defaultProps:{items:[],tone:"scrim",borders:!0,size:ev,separator:ov,scrollDirection:Bi}};var $H=()=>[{text:i("Spec label"),tone:"normal"},{text:i("Spec value"),tone:"muted"},{text:i("Spec label"),tone:"normal"},{text:i("Spec value"),tone:"muted"}],m8e={label:"Spec Strip",defaultProps:{cells:[{text:"",tone:"normal"},{text:"",tone:"normal"}],fill:"dark"}};function Bo(e,o,t,r={}){return{type:e,props:{...o(e),id:t(e),...r}}}function jH(e,o,t){return Bo(oe,e,o,{...t,sectionPaddingTop:void 0,sectionPaddingBottom:void 0})}var $m={Manifesto:(e,o)=>({type:oe,props:{...e(oe),id:o(oe),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[Bo(oe,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:GH,sectionPaddingRight:GH,content:[Bo("Text",e,o,vr()),Bo("Text",e,o,jr()),Bo("Text",e,o),Bo("Stats",e,o)]}),jH(e,o,{direction:"column",name:"Picture",content:[]})]}}),Split:(e,o)=>({type:oe,props:{...e(oe),id:o(oe),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[Bo(oe,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[Bo("Text",e,o,vr()),Bo("Text",e,o,jr()),Bo("Text",e,o),Bo("ButtonBlock",e,o)]}),jH(e,o,{direction:"column",name:"Image",content:[Bo("ImageBlock",e,o)]})]}}),Subscribe:(e,o)=>({type:oe,props:{...e(oe),id:o(oe),direction:"column",name:"Subscribe",content:[Bo("Text",e,o,jr()),Bo("Text",e,o),Bo("Form",e,o)]}}),Ticker:(e,o)=>KH("Scrolling Bar",dm,fd,zH.map(t=>({text:t.text,style:cm,muted:!0})),e,o),SpecStrip:(e,o,t)=>KH("Spec Strip",t?.theme?{...ud,sectionAccent:dc(xo(t.theme))}:{...ud,sectionBorder:{top:1}},pd,$H().map(r=>({text:r.text??"",style:md,muted:r.tone==="muted"})),e,o)};function KH(e,o,t,r,a,n){return Bo(oe,a,n,{...En,...o,blockSpacing:"gap",padV2:!0,name:e,sectionPaddingTop:t.top,sectionPaddingBottom:t.bottom,sectionPaddingTopPhone:t.topPhone,sectionPaddingBottomPhone:t.bottomPhone,content:r.map(s=>Bo("Text",a,n,{text:s.text,...s.muted?{tone:"dim"}:{},_partStyles:{text:s.style}}))})}function VH(e){return j($m,e)??null}import{isNodeList as Kw}from"efficient-easel/data";var M8e=Object.keys(gw),rde={Logos:ZB,DocMasthead:xN,DocTabs:TN,Timeline:HD,TimelineTrack:UD},ade={PaymentBadges:JB,PaymentLogosBlock:QB};function Gm(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]=Kw(n)?n.map(s=>Gm(s,o,t)):n;return r.id=t(e.type),{type:e.type,props:r}}var qH=e=>({...e?.theme?{theme:e.theme}:{},...e?.site?{site:e.site}:{},press:!0});function jm(e,o,t=0,r=()=>({})){return(a,n,s)=>{let{nodes:l}=Zs({type:e,props:{...a(e),...r(),id:n(e)}},o,qH(s));return Gm(l[t],a,n)}}var nde={Stats:lde,Cards:sde};function sde(){let e=ca("Cards");if(!e)return null;let o=jm("Cards",e,0,kB);return(t,r,a)=>{let n=o(t,r,a);return{...n,props:{...n.props,name:"Cards section"}}}}function lde(){let e=ca("StatsParagraph");return e?(o,t,r)=>{let{nodes:a}=Zs({type:"StatsParagraph",props:{...o("StatsParagraph"),...NB(),id:t("StatsParagraph")}},e,qH(r)),n=a[0],s=Kw(n.props.content)?n.props.content.filter(f=>f.props?.cardStyle===void 0):[],l=XH(SS(MB(),"table")),d=s.map(YH),c=Gm({...n,props:{...n.props,content:[...d,l]}},o,t);return{...c,props:{...c.props,name:"Stats section"}}}:null}function YH(e){return e.props?.name==="Words"?{...e,props:{...e.props,widthFitPhone:"fill"}}:Kw(e.props?.content)?{...e,props:{...e.props,content:e.props.content.map(YH)}}:e}var XH=e=>Gn([e],(o,t)=>`${o}-seed-${t}`)[0];function ide(e,o){if(!hF(e,o))return null;let t=j(nde,e);if(t)return t();let r=ca(e);return r?jm(e,r,0,j(rde,e)??j(W2,e)??j(ade,e)):null}function dde(e){return(o,t,r)=>{let a=n=>{if(n.type==="Stats"){let l=Gm(XH(SS([],"list")),o,t);return{...l,props:{...l.props,name:"Numbers"}}}let s=rs(n,l=>ts(l,a));return s===n?n:{type:n.type,props:s.props}};return a(e(o,t,r))}}function ul(e,o=Zi){let t=VH(e);return t?dde(t):ide(e,o)}function Rd(e,o){let t=e.components[o]?.label;return typeof t=="string"&&t.trim()?t.trim():o}function fde(e){return e.length>3&&e.endsWith("s")?e.slice(0,-1):e}function qw(e,o,t,r){e.forEach((a,n)=>{if(Vw(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(Vw)&&qw(l,a,s,r)}})}function pde(e){let o=[];qw(Array.isArray(e.content)?e.content:[],null,"",o);for(let t of Object.values(e.zones??{}))Array.isArray(t)&&qw(t,null,"",o);return o}function QH(e,o){return pde(e).find(t=>String(t.node.props.id)===o)}function e4(e,o,t){if(!t)return null;let r=QH(o,t);if(!r)return null;let a=Rd(e,r.node.type),n=r.parent?`${Rd(e,r.parent.type)} \xB7 ${fde(r.slot)} ${r.index+1}`:a;return{blockId:t,type:r.node.type,label:n,path:""}}var ude=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 mde(e){if(!e||typeof e!="object")return null;let o=e;if(typeof o.type!="string")return null;let t=o.type==="custom"?o[cde]: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=ude(n));for(let s of["arrayFields","objectFields"]){let l=t?.[s]??o[s];l&&typeof l=="object"&&(r[s]=o4(l))}return r}function o4(e){let o={};for(let[t,r]of Object.entries(e??{})){let a=mde(r);a&&(o[t]=a)}return o}function t4(e){let o={};for(let[t,r]of Object.entries(e.components))r&&(o[t]={label:Rd(e,t),fields:o4(r.fields),...r4(t)?{retired:!0}:{}});return o}function r4(e){return $e(bC,e)}function ZH(e,o){let t=e.components[o]?.defaultProps;return t&&typeof t=="object"?structuredClone(t):{}}function hde(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 Yw(e,o){return e.findIndex(t=>Vw(t)&&String(t.props.id)===o)}function JH(e,o,t){let r=o||t;if(!r)return e.length;let a=Yw(e,r);if(a<0)throw new Error(`there is no top-level block ${r}`);return o?a+1:a}function a4(e,o,t,r,a={}){let n=structuredClone(o),s=Array.isArray(n.content)?n.content:n.content=[];try{t.forEach((l,d)=>{let c=f=>{throw new Error(`change ${d+1}: ${f}`)};switch(l.op){case"set_props":{let f=QH(n,l.block_id)??c(`there is no block ${l.block_id}`);"id"in l.props&&c("a block's id is never changed");let u=hde(f.node.props,l.path)??c(`there is no ${l.path} in that block`);Object.assign(u,structuredClone(l.props));break}case"insert_block":{e.components[l.type]??c(`there is no block type ${l.type}`),r4(l.type)&&c(`${Rd(e,l.type)} is retired: it is no longer added (a page that holds one keeps it)`);let f=ul(l.type),u=Object.keys(l.props??{}).filter(h=>h!=="id");f&&u.length&&c(`${Rd(e,l.type)} is laid down as a Box of blocks: insert it with no props, then change its blocks`);let p=f?f(h=>ZH(e,h),r,a):{type:l.type,props:{...ZH(e,l.type),...structuredClone(l.props),id:r(l.type)}};s.splice(JH(s,l.after,l.before),0,p);break}case"remove_block":{let f=Yw(s,l.block_id);f<0&&c(`there is no top-level block ${l.block_id}`),s.splice(f,1);break}case"move_block":{let f=Yw(s,l.block_id);f<0&&c(`there is no top-level block ${l.block_id}`);let[u]=s.splice(f,1);s.splice(JH(s,l.after,l.before),0,u);break}default:c(`"${l.op}" is not a change this editor makes`)}})}catch(l){return{ok:!1,reason:l instanceof Error?l.message:String(l)}}return{ok:!0,document:n}}var Xw=e=>Se(e.requestId)??null;function l4(){let e=gde(),{appState:o,selectedItem:t,dispatch:r,history:a,config:n}=Ide(p=>p),s=n,l=s4({appState:o,dispatch:r,history:a,blockConfig:s});l.current={appState:o,dispatch:r,history:a,blockConfig:s};let d=s4(new Map),c=t?.props?.id,f=xde(()=>e4(s,o.data,c),[s,o.data,c]),u=f?JSON.stringify(f):"";n4(()=>{e.connected&&e.send("storefront-editor:selection",{selection:f})},[e,u]),n4(()=>e.subscribe(p=>{let{appState:h,dispatch:I,history:g,blockConfig:C}=l.current;switch(p.type){case"storefront-editor:request-document":{let w=Xw(p);if(!w)return;e.send("storefront-editor:document",{requestId:w,document:h.data,blocks:t4(C)});return}case"storefront-editor:apply-page-edits":{let w=Xw(p);if(!w)return;let T=Array.isArray(p.ops)?p.ops:[],y=T.length?a4(C,h.data,T,b=>`${b}-${crypto.randomUUID()}`,il()):{ok:!1,reason:"no changes"};y.ok&&(I({type:"setData",data:y.document,recordHistory:!0}),d.current.set(w,JSON.stringify(y.document.content??[]))),e.send("storefront-editor:page-edits-result",{requestId:w,applied:y.ok,reason:y.ok?null:y.reason});return}case"storefront-editor:undo-page-edits":{let w=Xw(p);if(!w)return;let T=d.current.get(w),y=T!==void 0&&T===JSON.stringify(h.data.content??[]);y&&g.hasPast&&(g.back(),d.current.delete(w)),e.send("storefront-editor:page-edits-result",{requestId:w,applied:y&&g.hasPast,reason:y?null:"the page has changed since"});return}case"storefront-editor:set-right-panel":typeof p.shown=="boolean"&&I({type:"setUi",ui:{rightSideBarVisible:p.shown}});return;default:return}}),[e])}import{useEffect as c4,useState as f4}from"react";var Km=new Map;async function bde(e,o){try{return(await to().site.get({siteId:o})).slug?.trim()||null}catch(t){return console.warn("[editor-site-slug] could not resolve the site slug",t),null}}function i4(e,o){let t=Km.get(o);return t||(t=bde(e,o),Km.set(o,t),t.catch(()=>{Km.get(o)===t&&Km.delete(o)})),t}var yde=/^(localhost|(?:[a-z0-9-]+\.)+localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\]|::1)$/i;function Zw(e){return!!e&&yde.test(e)}function d4(e){let{pageSlug:o,siteSlug:t,hostname:r}=e,a=o===$c?"/":`/${encodeURIComponent(o)}`;if(!Zw(r))return a;let n=t?.trim();return n?`${a}?site=${encodeURIComponent(n)}`:a}function p4(e){let{pageSlug:o,siteId:t,token:r}=e,[a,n]=f4(null),[s,l]=f4(null),d=Lk();c4(()=>{try{l(new URL(bc()).hostname)}catch{l(null)}},[d]),c4(()=>{if(!Zw(s)||!t||!r){n(null);return}let f=!1;return i4(r,t).then(u=>{f||n(u)}),()=>{f=!0}},[s,t,r]);let c=d4({pageSlug:o,siteSlug:a,hostname:s});return d?`${d}${c}`:c}import{jsx as Fd}from"react/jsx-runtime";import{useEffect as Sde,useRef as u4,useState as wde}from"react";import{ExternalIcon as m4}from"efficient-easel/icons";import{EaselIconButton as Cde}from"efficient-easel/chrome";import{Tooltip as vde,iconButtonClasses as kde}from"efficient-shell/ui";import{useSettledPress as Tde}from"efficient-easel/easel";import{useScreenDocument as Pde}from"efficient-easel/screen/components/ScreenDocumentContext";async function Ede({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 h4({liveHref:e,pageId:o,draftLink:t}){let{flushSave:r}=Pde(),a=u4(r);a.current=r;let n=Tde(),[s,l]=wde(!1),d=u4(null);if(Sde(()=>()=>d.current?.(),[]),t&&o){let c=()=>new Promise((u,p)=>{d.current=()=>u(!1),n.run(()=>{d.current=null,a.current().then(u,p)})}),f=()=>{s||n.waiting||(l(!0),Ede({pageId:o,liveHref:e,draftLink:t,ready:c}).finally(()=>l(!1)))};return Fd(Cde,{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:f,children:Fd(m4,{})})}return Fd(vde,{content:i("Preview the live site (opens in a new tab)"),side:"bottom",children:Fd("a",{className:kde({className:"es-iconbtn"}),href:e,...ad,"aria-label":i("Preview the live site in a new tab"),children:Fd(m4,{})})})}import{createElement as Rde,useCallback as Fde,useEffect as L4,useRef as R4,useState as Bde}from"react";import{ClockIcon as Dde}from"efficient-shell/icons/efficient";import{useScreenDocument as Nde}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSyncExternalStore as Ode}from"react";import{useScreenDocument as _de}from"efficient-easel/screen/components/ScreenDocumentContext";var Ade=()=>()=>{},x4=()=>null;function Vm(e){return Ode(e?e.subscribe:Ade,e?e.state:x4,e?e.state:x4)}function qm(){let{adapter:e}=_de();return e?.pinnedChrome}import{useSyncExternalStore as b4}from"react";var Bd=!1,ml=null,Jw=new Set;function Nd(){for(let e of Jw)e()}function y4(e){return Jw.add(e),()=>{Jw.delete(e)}}function S4(){Bd||(Bd=!0,Nd())}function w4(){Bd&&(Bd=!1,Nd())}function I4(){return Bd}function C4(){return b4(y4,I4,I4)}function g4(){return ml}function Ym(){ml&&(ml=null,Nd())}function v4(){return b4(y4,g4,g4)}var Dd=class extends Error{constructor(){super("The editor's last changes could not be saved, so nothing was restored."),this.name="HeldEditsNotSaved"}};async function k4(e,o,t,{flushSave:r,reload:a}){if(!await r())throw new Dd;let n=await e.restore(o,t);return uf(n.liveState),a(),n}async function T4({access:e,version:o,page:t,...r}){let a=await k4(e,o.id,t?{page:t.id}:{},r);ml={title:Lde(o,t??null),undo:a.undo},Nd()}async function P4({access:e,...o}){let t=ml?.undo;t&&(await k4(e,t,{},o),ml=null,Nd())}function E4(e){return e.name?e.name:e.kind==="draft_before_restore"?i("Draft before restore"):i("Version {n}",{n:e.number})}function Lde(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 O4(e){let o=e.changes.filter(r=>r.kind==="page").length,t=[...o?[Wo("{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(jh(),{type:"conjunction"}).format(t)}catch{return t.join(", ")}}function _4(e){return e.change==="take_down"?i("{name} (taken down)",{name:e.name}):e.name}function A4(e,o=new Date){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let r=jh(),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 F4(e){let{docId:o,capabilities:t,hasUnsavedEdits:r,onPublish:a,adapter:n}=Nde(),s=jR(GR(o??null),r),l=Vm(qm()),d=n.siteLiveState;L4(()=>{if(d)return aI(d),Or(0),()=>aI(null)},[d]);let c=mf(),[f,u]=Bde(!1),p=R4(e);p.current=e;let h=R4(!0);L4(()=>(h.current=!0,()=>{h.current=!1}),[]);let I=Fde(()=>{u(!0),a(p.current).then(()=>{Ym()}).finally(()=>{h.current&&u(!1)})},[a]);if(t.canPublish){if(d){let g=c===void 0?void 0:r||c.state==="changed"?"changed":"live",C=Wy({live:g,onPress:I,busy:f,goingLive:KR(c?.changes??[])});return n.siteVersions?{...C,menuItems:Mde()}:C}return Wy({live:s,onPress:I,busy:f,pinnedUnpublished:l?.unpublished??!1})}}function Mde(){return[{key:"version-history",label:i("Version history"),icon:Rde(Dde),onSelect:S4}]}import{jsx as re,jsxs as dt,Fragment as Ud}from"react/jsx-runtime";import{useCallback as Hde,useEffect as Ude,useId as N4,useRef as Wde,useState as Et}from"react";import{useSettledAction as zde}from"efficient-easel/easel";import{Avatar as $de,Banner as Md,Button as Dn,ColoredBadge as Qw,Dialog as M4,Drawer as Gde,DropdownMenu as jde,FormField as H4,iconButtonClasses as Kde,Inline as eC,Input as Vde,ListRow as qde,Select as Yde,SortableList as Xde,Stack as Hd}from"efficient-shell/ui";import{EditIcon as Zde,EyeIcon as B4,MenuIcon as Jde,MoreIcon as Qde,PageIcon as U4,RevertIcon as D4,StylesIcon as ece}from"efficient-shell/icons/efficient";import{useScreenDocument as W4}from"efficient-easel/screen/components/ScreenDocumentContext";var oce={page:U4,menu:Jde};function tce(e,o){return e.pages.find(t=>t.id===o)??e.pages[0]??null}function rce(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 ace({version:e,page:o,waiting:t,busy:r,error:a,onCancel:n,onConfirm:s,onPage:l}){let d=N4();if(!e)return null;let c=e.kind==="draft_before_restore",f=e.number,u=O4(e),p=c?i("Put your drafts back?"):o?i("Restore {page} from version {n}?",{page:o.name,n:f}):i("Restore version {n}?",{n:f}),h=c?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:f}):u?i("The whole website goes back to version {n} as a draft: {what}.",{n:f,what:u}):i("The whole website goes back to version {n} as a draft.",{n:f}),I=e.deletedPictures??0;return re(M4,{open:!0,onClose:()=>{r||n()},size:"sm",title:p,footer:dt(Ud,{children:[re(Dn,{variant:"secondary",onClick:n,disabled:r,children:i("Cancel")}),re(Dn,{onClick:s,loading:r,disabled:r,children:i("Restore as draft")})]}),children:dt(Hd,{gap:4,children:[o&&e.pages.length>1?re(H4,{label:i("Page"),htmlFor:d,children:re(Yde,{id:d,value:o.id,options:e.pages.map(g=>({value:g.id,label:g.name})),onChange:l,disabled:r})}):null,re("p",{children:h}),re("p",{children:i("Your live website does not change until you press Publish.")}),I>0?re(Md,{tone:"warning",children:Wo("{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.",I)}):null,t?re(Md,{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?re(Md,{tone:"danger",children:a}):null]})})}function nce({version:e,onCancel:o,onSave:t}){let r=N4(),[a,n]=Et(null),[s,l]=Et(""),[d,c]=Et(!1),[f,u]=Et(null);if(e!==a&&(n(e),l(e?.name??""),u(null)),!e)return null;let p=s.trim()===e.name,h=async()=>{if(!(d||p)){c(!0),u(null);try{await t(s.trim())}catch{u(i("The name was not saved. Try again."))}finally{c(!1)}}};return re(M4,{open:!0,onClose:()=>{d||o()},size:"sm",title:i("Name this version"),footer:dt(Ud,{children:[re(Dn,{variant:"secondary",onClick:o,disabled:d,children:i("Cancel")}),re(Dn,{onClick:()=>{h()},loading:d,disabled:d||p,children:i("Save")})]}),children:re(H4,{label:i("Name"),htmlFor:r,hint:i("Named versions are always kept. Leave it empty to take the name away."),error:f??void 0,children:re(Vde,{id:r,value:s,invalid:!!f,onChange:I=>l(I.target.value),onKeyDown:I=>{I.key==="Enter"&&h()}})})})}function sce({version:e,expanded:o,onToggle:t,onPreview:r,onRestore:a,onRestorePage:n,onName:s}){let l=e.kind==="draft_before_restore",d=!e.live,c=e.changes.length,f=[...l?[]:[{key:"preview",label:i("Preview"),icon:re(B4,{}),onSelect:r}],...d?[{key:"restore",label:l?i("Put these drafts back"):i("Restore whole website"),icon:re(D4,{}),onSelect:a}]:[],...d&&!l&&e.pages.length?[{key:"restore-page",label:i("Restore one page only"),icon:re(U4,{}),onSelect:n}]:[],...l?[]:[{type:"divider",key:"divider"},{key:"name",label:i("Name this version"),icon:re(Zde,{}),onSelect:s}]];return re(qde,{title:dt("span",{className:"sf-version-title",children:[re("span",{children:E4(e)}),e.live?re(Qw,{tone:"success",size:"xs",children:i("Live")}):null,e.name?re(Qw,{tone:"neutral",size:"xs",children:i("Version {n}",{n:e.number})}):null,l?re(Qw,{tone:"warning",size:"xs",children:i("Not published")}):null]}),expanded:o,onToggle:t,actions:re(jde,{align:"end","aria-label":i("More"),items:f,triggerClassName:Kde({variant:"ghost",size:"sm"}),trigger:re(Qde,{})}),below:dt(Hd,{gap:3,children:[dt(eC,{gap:2,align:"center",wrap:!0,className:"sf-version-meta",children:[re($de,{name:e.createdBy,size:"xs"}),re("span",{children:e.createdBy}),re("span",{"aria-hidden":"true",children:"\xB7"}),re("span",{children:A4(e.createdAt)}),c?dt(Ud,{children:[re("span",{"aria-hidden":"true",children:"\xB7"}),re("span",{children:Wo("{n} change","{n} changes",c)})]}):null]}),o?dt(Hd,{gap:3,children:[c?re(Hd,{gap:2,children:e.changes.map(u=>{let p=oce[u.kind]??ece;return dt(eC,{gap:2,align:"center",children:[re(p,{size:16}),re("span",{children:_4(u)})]},`${u.kind}:${u.id}`)})}):null,dt(eC,{gap:2,children:[l?null:re(Dn,{variant:"secondary",size:"sm",leftIcon:re(B4,{}),onClick:r,children:i("Preview")}),d?re(Dn,{variant:"secondary",size:"sm",leftIcon:re(D4,{}),onClick:a,children:i("Restore")}):null]})]}):null]})})}function lce({open:e,onClose:o,access:t,waiting:r}){let{flushSave:a,reloadFromServer:n,docId:s}=W4(),[l,d]=Et(null),[c,f]=Et(!1),[u,p]=Et(null),[h,I]=Et(null),[g,C]=Et(!1),[w,T]=Et(null),[y,b]=Et(null),[P,H]=Et(!1),E=Wde(0),U=Hde(()=>{let _=++E.current;f(!1),t.list().then(A=>{_===E.current&&d(A)},()=>{_===E.current&&f(!0)})},[t]);Ude(()=>{e&&U()},[e,U]);let O=_=>{H(!1),rce(t,_.id).catch(()=>H(!0))},D=async()=>{if(!(!h||g)){C(!0),T(null);try{await T4({access:t,version:h.version,page:h.page,flushSave:a,reload:n}),I(null),o()}catch(_){T(_ instanceof Dd?i("Your last changes did not save, so nothing was restored. Try again."):i("The version was not restored. Nothing changed. Try again."))}finally{C(!1)}}},v=zde({onPress:()=>{D()},busy:g});return dt(Ud,{children:[re(Gde,{open:e,onClose:o,side:"right",size:"md",title:i("Version history"),description:dt(Ud,{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:re("span",{className:"sf-version-foot",children:i("The newest 30 are kept. Named versions are always kept.")}),children:dt(Hd,{gap:3,children:[P?re(Md,{tone:"danger",onDismiss:()=>H(!1),children:i("The preview did not open. Try again.")}):null,c?re(Md,{tone:"danger",action:re(Dn,{variant:"secondary",size:"sm",onClick:U,children:i("Try again")}),children:i("Version history did not load.")}):l===null?re("p",{className:"sf-version-foot",children:i("Loading versions")}):l.length===0?re("p",{className:"sf-version-foot",children:i("No versions yet. Every Publish from now on keeps one.")}):re(Xde,{"aria-label":i("Versions"),spacing:"comfortable",children:l.map(_=>re(sce,{version:_,expanded:u===_.id,onToggle:()=>p(A=>A===_.id?null:_.id),onPreview:()=>O(_),onRestore:()=>{T(null),I({version:_,page:null})},onRestorePage:()=>{T(null),I({version:_,page:tce(_,s)})},onName:()=>b(_)},_.id))})]})}),re(ace,{version:h?.version??null,page:h?.page??null,waiting:r,busy:v.busy===!0,error:w,onCancel:()=>I(null),onConfirm:v.onPress,onPage:_=>I(A=>A&&{...A,page:A.version.pages.find(F=>F.id===_)??A.page})}),re(nce,{version:y,onCancel:()=>b(null),onSave:async _=>{await t.name(y.id,_),b(null),U()}})]})}function z4(){let{adapter:e,hasUnsavedEdits:o}=W4(),t=e.siteVersions,r=C4(),a=mf();return t?re(lce,{open:r,onClose:w4,access:t,waiting:o||a?.state==="changed"}):null}import{useEaselSession as U5}from"efficient-easel/screen/lib/session-context";import{buildPaletteSections as j7e,categoryLabel as K7e,paletteWithoutPinned as V7e,pinnedSection as q7e}from"efficient-easel/screen/lib/document/palette-sections";var ice={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 $4(e){return j(ice,e)?.label}var G4=SC;import{currentEaselSession as q4}from"efficient-easel/screen/lib/session";import{blockTypesIn as j4}from"efficient-easel/screen/lib/document/block-types-in";var K4=()=>({}),V4=new Map;function dce(e){let o=V4.get(e);if(o)return o;let t=new Set,r=j(mr,e);if(r)for(let s of r.seeds(K4))for(let l of j4({type:r.childType,props:s}))t.add(l);let a=ul(e);if(a){let s=0;for(let l of j4(a(K4,d=>`${d}-${s+=1}`)))t.add(l)}t.delete(e);let n=[...t].sort();return V4.set(e,n),n}function cce(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;let o=My(e),t=e.allow?new Set(e.allow):null,r=new Set(e.deny??[]),a=new Set(Object.keys(e.host??{})),n=d=>{if(r.has(d))return!1;if(a.has(d))return!0;let c=yC(d);return!c||!o[c]?!1:t?t.has(d):!0},s=new Map,l=d=>{let c=s.get(d);if(c!==void 0)return c;s.set(d,!1);let f=n(d)&&dce(d).every(l);return s.set(d,f),f};return{sets:o,offers:l}}var fce="block-offer";function oC(e=q4()){return e.cache(fce,()=>cce(of(e)))}function Y4(e,o=q4()){let t=oC(o);return t?t.offers(e):!0}function pce(e){let o=$m.Ticker(e.nodeDefaults,e.newNodeId),{sectionBorder:t,...r}=o.props,a=Fb.line?{sectionBorder:t}:{};return{...o,props:{...r,...a,sectionAccent:Fb.sectionAccent}}}var uce={Hero:{[Pi]:{newChild:pce,childLabel:Kd.Ticker}}},X4=Object.fromEntries(Object.entries(RH).map(([e,o])=>[e,Object.fromEntries(Object.entries(o).map(([t,r])=>[t,{...r,...j(uce,e)?.[t]}]))]));function Z4(e,o=0,t,r){let a=hce(xce(e,o,r),t),n=a?oC():null;return a&&n?mce(a,n):a}function mce(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 hce(e,o){if(!e||e.source!=="container"||!o||!Tv())return e;let t=nc({data:o.data},o.id),r=typeof t?.type=="string"?Pv(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 xce(e,o,t){let r=t?j(X4,e)?.[t]:void 0;if(r)return{source:"section",slot:r.slot,choices:null,spec:r};let a=j(mr,e);if(a)return{source:"section",slot:a.slot,choices:null,spec:a};let n=wC(e,o);if(n)return{source:"container",slot:n.slot,choices:n.choices,spec:null};let s=aF(e);return s?{source:"footer",slot:rF,choices:s,spec:null}:null}function J4(e,o=_v(e.type)){return Ov(e.type)?o.map(t=>{let r=Av(e.type,t);return r===null?{slot:t,label:t,rung:!1}:{slot:t,label:i(r),rung:!0}}):null}import{useSyncExternalStore as Ice}from"react";var tC=null,rC=new Set;function Q4(e){if(tC!==e){tC=e;for(let o of rC)o()}}function gce(e){return rC.add(e),()=>{rC.delete(e)}}function PVe(){return Ice(gce,()=>tC,()=>null)}function e5(e){return _l(e)?.ownerId??null}function o5(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 t5="sf-editor-left-view";function r5(){if(typeof window>"u")return"pages";try{let e=window.localStorage.getItem(t5);return e==="sections"||e==="styles"?e:"pages"}catch{return"pages"}}function a5(e){if(!(typeof window>"u"))try{window.localStorage.setItem(t5,e)}catch{}}function n5(e,o){return e==="styles"&&!o?"sections":e}function s5(e,o){return e?"sections":o}import{copyNode as bce}from"efficient-easel/data";function l5(e){let o=typeof e?.props?.id=="string"?e.props.id:null,t=Bt(),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 i5={usedOn:e=>{let o=Bt(),t=o?.sectionOf(e.props.id)??null;return!o||!t?null:o.usedOn(t)??[]},openPage:e=>Ac()?.openPage(e),adopt:(e,o)=>Bt()?.adopt(e.props.id,o),nodeOf:e=>Bt()?.place(e)??null,detach:e=>{let o=Ac()?.config;return o?bce(e,o):e},removed:()=>Ac()?.reload()};import{sharedSectionsOf as Tfe}from"efficient-easel/screen/lib/shared-sections";import{scrollPreviewToSection as Pfe,scrollPreviewToTop as R5}from"efficient-easel/screen/lib/document/preview-dom";import{jsx as sC,Fragment as jce,jsxs as Kce}from"react/jsx-runtime";import{useContext as Vce,useEffect as qce,useMemo as dC,useRef as b5}from"react";import{EaselCanvas as Yce,repeatCopyAt as Xce,useEasel as Zce}from"efficient-easel/easel";import{jsx as p5,Fragment as Tce,jsxs as Pce}from"react/jsx-runtime";import{useEffect as u5,useLayoutEffect as Ece}from"react";var Xm="data-theme",d5="light";function yce(e){return e.getAttribute(Xm)===d5?"light":"dark"}function Sce(e,o){return yce(e)===o?!1:(o==="light"?e.setAttribute(Xm,d5):e.removeAttribute(Xm),!0)}function wce(e){return Gh(e).getItem(Ah)}function MVe(e,o){Gh(e).setItem(Ah,o)}function Cce(e,o,t=new Date().getHours()){return Uv({mode:o.mode,override:wce(e),switchShown:o.switchShown,hour:t})}function c5(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>Sce(t,Cce(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[Xm]}),()=>n.disconnect()}var vce="style";function kce(e,o){let t=Xv(o),r=!1;for(let a of Yv){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function f5(e,o){let t=e.body;if(!t)return()=>{};let r=()=>kce(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[vce]}),()=>n.disconnect()}var Oce=`
|
|
338
|
-
[${jt}][${jt}] { cursor: text; }
|
|
339
|
-
`;function m5({children:e,document:o}){let{theme:t,themeMode:r,themeSwitchShown:a}=ue(),n=xo(t);return u5(()=>{if(o)return c5(o,{mode:r,switchShown:a})},[o,r,a]),u5(()=>{if(o)return f5(o,n)},[o,n]),Ece(()=>{if(o)return IF(o)},[o]),Pce(Tce,{children:[p5(jk,{}),p5("style",{children:Oce}),e]})}import{jsx as aC}from"react/jsx-runtime";import{useEffect as _ce,useState as Ace}from"react";import{Banner as Lce}from"efficient-shell/ui";var Zm={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."},Rce={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."},Fce=Zm.load,Bce=Zm.lock,Dce=Zm.conflict,Nce=Zm.save;function Mce(e){if(!e)return null;if(e.loadFailed)return i(Fce);if(e.lockHolder)return i(Bce,{name:e.lockHolder.name||i("Somebody else")});if(e.conflict)return i(Dce);if(e.saveFailed)return i(Nce);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(Rce[o.problem],{section:t,name:r})}function Hce({report:e}){let o=Mce(Vm(e)),[t,r]=Ace(null);return _ce(()=>{o||r(null)},[o]),!o||t===o?null:aC("aside",{className:"sf-canvas-notice",children:aC(Lce,{tone:"warning",onDismiss:()=>r(o),children:o})})}function h5(){return aC(Hce,{report:qm()})}import{jsx as Jm}from"react/jsx-runtime";import{useState as x5}from"react";import{Banner as Uce,Button as Wce}from"efficient-shell/ui";import{UndoIcon as zce}from"efficient-shell/icons/efficient";import{useScreenDocument as $ce}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSettledAction as Gce}from"efficient-easel/easel";function I5(){let e=v4(),{adapter:o,flushSave:t,reloadFromServer:r}=$ce(),a=o.siteVersions,[n,s]=x5(!1),[l,d]=x5(!1),c=async()=>{if(!(!a||n)){s(!0),d(!1);try{await P4({access:a,flushSave:t,reload:r})}catch{d(!0)}finally{s(!1)}}},f=Gce({onPress:()=>{c()},busy:n});return e?Jm("aside",{className:"sf-canvas-notice",children:Jm(Uce,{tone:l?"danger":"info",title:e.title,onDismiss:Ym,action:a&&e.undo?Jm(Wce,{variant:"secondary",size:"sm",leftIcon:Jm(zce,{}),loading:f.busy,disabled:f.busy,onClick:f.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{decodePartId as Jce,REPEAT_ATTRIBUTE as lC,REPEAT_INDEX_ATTRIBUTE as iC}from"efficient-easel/draw";import{usePreviewParts as Qce}from"efficient-easel/draw/client";var g5=null;function nC(e){g5=e}function c9e(){return g5}import{ScreenDocumentContext as efe}from"efficient-easel/screen/components/ScreenDocumentContext";function y5(e){let{mirrorHostStyles:o}=Vh(),t=Vk(),{sectionBackgroundWidth:r,themeFromDocument:a}=ue(),n=Bk(),s=Vce(efe),l=Lc(s?.docId??null),d=Zce(w=>w.appState.data),c=kT(l,d),f=JSON.stringify(c),u=dC(()=>c,[f]),p=dC(()=>({...e.metadata??t??{},...$E(a?null:r,n),...u}),[e.metadata,t,r,n,a,u]);qce(()=>(nC(n),()=>nC(null)),[n]);let h=b5(null),I=ofe(h),{onDocument:g}=e,C=w=>{h.current=w,g?.(w)};return Kce(jce,{children:[sC(I5,{}),sC(h5,{}),sC(Yce,{...e,onDocument:C,typing:I,metadata:p,height:"fill",mirrorStyles:o,frameWrapper:m5})]})}function ofe(e){let o=kc(),t=Qce(),r=b5({parts:t});return r.current={parts:t},dC(()=>{let a=(n,s)=>{let l=dp(n,o),d,c=null,f=s??(l?null:Mg(null,e.current,n)),u=!l&&f?Xce(f):null,p=u?Jce(n):null;if(u&&f&&p?.propKey){l=fp({...u,nodeId:p.nodeId,key:p.propKey},o),d=p.propKey;let C=f.closest(`[${lC}][${iC}]`),w=`[${lC}="${cp(C?.getAttribute(lC)??"")}"][${iC}="${cp(C?.getAttribute(iC)??"")}"]`;c=()=>(f.ownerDocument??e.current)?.querySelector(w)??null}if(!l)return null;let h=f,I=()=>(h=Mg(h,c?c():h?.ownerDocument??e.current,n),h),g=I();return g?{element:I,value:l.value,rules:l.rules,multiline:l.multiline,skip:l.skip,write:l.write,key:d,toolbar:{offered:l.offered,colors:l.offered.length>0?fs(kP(g)):void 0,colorNameOf:rt}}:null};return{at:n=>{let s=n.closest(`[${jt}]`),l=s?.getAttribute(jt);return s&&l?a(l,s):null},atSelection:()=>{let n=r.current.parts.selectedPartId;return n?a(n,null):null},onCopyText:n=>b_(n,o),copyValue:n=>g_(n,o),onChange:n=>{if(!n.typing){Hg(null);return}let s=n.element.closest(`[${jt}]`)?.getAttribute(jt)??null;Hg(s),s&&r.current.parts.selectedPartId!==s&&r.current.parts.select(s)}}},[o,e])}var tfe=Fk.mediaFields,rfe=/video|poster|focal|phone/i;function afe(e){return(j(tfe,e)??[]).find(o=>!o.includes("[]")&&!rfe.test(o))??null}function nfe(e){let o=afe(e.type);return e.type!==oe?o&&ac(e.type,e.props,o)?{fromData:!0}:o:Vc(e.props)?{fromData:!0}:o}var S5={adds:{kind:"block",type:"ImageBlock"},kinds:["image"],pictureOf:nfe,create:(e,o)=>({type:"ImageBlock",props:{...o.nodeDefaults("ImageBlock"),id:o.newNodeId("ImageBlock"),src:e.url}})};var w5={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:"A wall of your photos or your products' pictures, 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, or alternating rows, 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 stat cards whose units and small labels take the main color.",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 page header: eyebrow, title, details and a deck.",DocTabs:"A sticky tab bar that marks the page you are on.",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 Qm}from"react/jsx-runtime";import{useState as sfe}from"react";import{Button as lfe,Tooltip as ife,toast as C5}from"efficient-shell/ui";import{TemplateIcon as dfe}from"efficient-easel/icons";import{useSettledAction as cfe}from"efficient-easel/easel";import{useScreenDocument as ffe}from"efficient-easel/screen/components/ScreenDocumentContext";function k5({enabled:e,reason:o,onSaved:t}){let{flushSave:r}=ffe(),[a,n]=sfe(!1),s=async()=>{if(!a){n(!0);try{await r()?t():C5.error(i(v5))}catch{C5.error(i(v5))}finally{n(!1)}}},l=cfe({onPress:()=>{s()},busy:a});return Qm(ife,{side:"bottom",content:e?i("Save this website as a platform template"):i(o),children:Qm("span",{className:"sf-tip-disabled",tabIndex:e?void 0:0,children:Qm(lfe,{variant:"secondary",disabled:!e||l.busy,loading:l.busy,onClick:l.onPress,rightIcon:Qm(dfe,{size:15}),children:i("Save as Template")})})})}var v5="Your last changes did not save, so the template was not made. Try again.";var pfe="Save your page changes first";function T5(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:pfe}:{visible:!0,enabled:!0}:{visible:!1,hiddenReason:"no-site"}:{visible:!1,hiddenReason:"not-operator"}:{visible:!1,hiddenReason:"no-console"}}var P5="storefront-editor:save-as-template";var Wd="ContactLocations",ufe="CityPictures",mfe="CityMaps",hfe=[{key:ufe,label:"City pictures",desc:"A wall of city photos, grouped by region. Each photo links to its city's card."},{key:mfe,label:"City maps",desc:"A card per city, grouped by region: address, phone, hours and a map."}];function E5(e=Zi){let o=gC.find(t=>t.sections.some(r=>r.type===Wd))?.key;return!e.includes(Wd)||!o?[]:hfe.map(({key:t,label:r,desc:a},n)=>({key:t,label:r,cat:o,after:Wd,desc:a,alias:"locations offices stores branches",insert:s=>{let l=ca(Wd);return l?jm(Wd,l,n)(s.nodeDefaults,s.newNodeId,il()):null}}))}function _5(e,{nodeDefaults:o,newNodeId:t,sectionLabel:r,blockIsOffered:a}){let n=ul(e);if(n)return n(o,t,il());if(xv(e)&&a(oe)&&a(Kn)){let l=j(kr,e);return{type:oe,props:{...o(oe),id:t(oe),direction:"column",name:`${r(e)} section`,content:[{type:Kn,props:{...o(Kn),id:t(Kn),...l?.headStyle?{headStyle:l.headStyle}:{},...l?.headRowGap?{rowGap:l.headRowGap}:{},...l?.headDescriptionSize?{descriptionSize:l.headDescriptionSize}:{},...rd(e)!==rd(Kn)?{eyebrowLook:rd(e)}:{}}},{type:e,props:{...o(e),id:t(e),headPlacement:"own-box",...O5(e,t)}}]}}}if(j(mr,e)?.fixed===!0)return{type:e,props:{...o(e),id:t(e),layout:"boxes"}};let s=O5(e,t);return Object.keys(s).length?{type:e,props:{...o(e),id:t(e),...s}}:null}function O5(e,o){return e==="Cards"?{template:pv(t=>o(t))}:e===mv?{template:hv(t=>o(t))}:{}}import{useEffect as xfe,useState as Ife}from"react";import{useEaselSession as gfe}from"efficient-easel/screen/lib/session-context";function A5(){let e=gfe().chrome?.products?.list,[o,t]=Ife(null);return xfe(()=>{if(!e)return;let r=!1;return e().then(a=>{r||t(a)}),()=>{r=!0}},[e]),o}function W5({mode:e,open:o}){let{setSelectedHeroId:t,setSelectHandler:r}=vA(),a=H5().tree,n=e,s=n.kind==="ticker"?n.heroId:null,l=hl(d=>{d&&(o({kind:"ticker",heroId:d}),Pfe(d))},[o]);return hr(()=>{t(s)},[s,t]),hr(()=>{r(l)},[r,l]),{partRows:(d,{rowClick:c})=>{let f=String(d.props.id);return d.type==="Hero"&&Bb(d.props)&&To(N5,{icon:To(fn,{type:"ticker",size:13}),name:i(Ti),onSelect:()=>l(f),selected:s===f,rowProps:{onClick:c(()=>l(f))},words:a})}}}function z5({mode:e,select:o}){let{setSelectedHeroPart:t,setSelectHandler:r}=Gp(),a=H5().tree,{appState:n}=M5(p=>p),s=n.data.content??[],l=bfe(s);l.current=s;let d=e,c=dn.find(p=>Oi[p]===d.kind),f=c&&"nodeId"in d?_i(String(d.nodeId),c):null,u=hl(p=>{let h=LA(p);if(!h)return;let I=l.current.findIndex(C=>String(C.props.id)===h.nodeId);if(I<0)return;let g={kind:Oi[h.part],nodeId:h.nodeId};o({index:I},g)},[o]);return hr(()=>{t(f)},[f,t]),hr(()=>{r(u)},[r,u]),{partRows:(p,{rowClick:h})=>{let I=String(p.props.id),g=AA(p);if(g.length===0)return null;let C=y=>{let b=_i(I,y.part);return To(N5,{icon:To(fn,{type:y.part==="media"?"heroMedia":"heroImage",size:13}),name:i(y.label),onSelect:()=>u(b),selected:f===b,rowProps:{onClick:h(()=>u(b))},words:a},b)},[w,...T]=g;return zd(D5,{children:[C(w),T.length>0&&To(vfe,{children:T.map(C)})]})}}}function $5(e,o){return{partRows:(t,r)=>zd(D5,{children:[e.partRows?.(t,r),o.partRows?.(t,r)]})}}function Efe(e){let{adapter:o,capabilities:t,currentSlug:r,siteId:a,docId:n,hasUnsavedEdits:s,bridgeCapabilities:l,notifyParent:d,token:c}=eh(),{hasPreviewLink:f}=t,u=to(U5()).preview?.draftLink,p=F4(e.data),h=T5({hasTrustedConsole:!!c,canCreatePlatformTemplate:l.canCreatePlatformTemplate,capabilities:t,siteId:a,hasUnsavedEdits:s}),I=hl(()=>{!a||!r||d(P5,{siteId:a,slug:r})},[d,a,r]),g=p4({pageSlug:r,siteId:a,token:c}),C=o.previewHref?.(r)??g;return{barLead:()=>h.visible&&To(k5,{enabled:h.enabled,reason:h.enabled?"":h.disabledReason,onSaved:I}),barView:()=>f&&r&&To(h4,{liveHref:C,pageId:n??null,draftLink:u}),mainAction:p}}function Ofe(e,o){let{capabilities:t,templateId:r,siteId:a,tokenRef:n,navigate:s}=eh(),{hasSiteTheme:l,explainsSiteSettings:d}=t,c=y=>o.setView(y),[f,u]=L5(Ns[0].id),[p,h]=L5(!1),{surface:I,setSurface:g}=CA(),C=()=>{if(l){c("styles"),o.reveal(),R5();return}e.show(Cw),e.reveal(),R5()},w={id:"pages",label:i("Pages"),icon:To(Sfe,{}),panel:({onHide:y})=>To(uA,{activeSurface:I,onPreviewSurface:g,onNavigate:b=>{g(null),s(r?{kind:"template",id:r,pageSlug:b}:{kind:"page",slug:b,siteId:a??void 0})},onClose:y})},T=[];return!l&&d&&T.push({id:"appearance",label:i("Appearance"),icon:To(Cfe,{}),active:e.kind==="website",onSelect:C}),l&&T.push({id:"styles",label:i("Styles"),icon:To(wfe,{}),panel:({onHide:y,notify:b})=>To(fM,{tokenRef:n,siteId:a??void 0,onClose:y,onNotify:b,tab:f,onTabChange:u,revealPageGroup:p,onPageGroupRevealed:()=>h(!1)})}),{railLead:[w],railTrail:T,resolveLeftView:y=>n5(y,l),openSettings:C,openStyles:()=>{u(X1),c("styles")},openPageStyles:l?()=>{u(Hs),h(!0),c("styles"),o.reveal()}:d?()=>{e.show(Q2),e.reveal()}:void 0}}function _fe(){let{navigate:e,siteId:o,reloadFromServer:t,docId:r}=eh(),a=M5(s=>s.config),n=U5();hr(()=>(lx({openPage:s=>e({kind:"page",slug:s.slug,siteId:o??void 0}),reload:()=>{t()},config:a}),()=>lx(null)),[e,o,t,a]),hr(()=>{let s=Bt();if(!s||!r)return;let l=!1;return Tfe(n).list().then(d=>{l||s.learn(d)}).catch(()=>{}),()=>{l=!0}},[r,n])}function G5(){let e=kc();return hl(o=>{y_(o,e)},[e])}function Afe(e,o,t,r){let{kind:a,open:n}=e,{selected:s,zoneOf:l}=o;hr(()=>{Q4(s?.type==="BookingBox"&&s.props.region==="confirm"?e5(l(String(s.props.id))):null)},[s?.props.id]);let d=LM(e,o),{capabilities:{hasSiteSettings:c}}=eh();_fe();let{chat:f,setChat:u,setSelected:p,setSelectHandler:h}=$p(),I=hl(()=>n(eM),[n]),g=a==="chat";hr(()=>{p(g)},[g,p]),hr(()=>{h(I)},[h,I]);let{setOpenHandler:C}=ki(),w=hl(()=>n(oM),[n]);hr(()=>{C(w)},[C,w]);let T=$5(W5(e),z5(e)),y=Efe(o),b=Ofe(e,r),P=t.device,H=G5();return{...T,...y,...b,hasOwnRows:E=>E.type===Fm,ownRows:d.renderLocationTree,sectionPressed:d.sectionPressed,onCopyItem:H,wrap:E=>To(qh.Provider,{value:!0,children:zd(kfe.Provider,{value:P,children:[E,To(z4,{})]})}),addPanelRow:E=>c?zd("div",{className:"sf-addside-sitewide",children:[To("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:To(fn,{type:"chat",size:16})}),zd("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{E(),I()},children:[i("Live chat"),To("span",{className:"sf-addside-sitewide-desc",children:i("A chat bubble on every page")})]}),To(yfe,{checked:f.enabled,onChange:U=>u({enabled:U}),ariaLabel:i("Show the chat bubble on the whole site")})]}):void 0}}var F5=null,cC=new WeakMap;function Lfe(e){let o=$k();if(!e||!o)return e;F5!==o&&(F5=o,cC=new WeakMap);let t=cC.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),...e.spec.childLabel?{childLabel:i(e.spec.childLabel)}:{}}:null},cC.set(e,t)),t}var Rfe={isLockedBlock:(e,o)=>iu(e,o)||!!(o&&Bt()?.heldElsewhere(o.props.id)),duplicateBlocked:Lu,nestDepth:(e,o,t)=>o===uk?xk(e,t):0,newSectionNode:_5,canAddTo:(e,o,t,r)=>Lfe(Z4(e,o,r,t)),blockIsOffered:Y4,slotsOf:J4,resolveOnInsert:!0},Ffe=new Proxy(w5,{get:(e,o)=>{let t=Reflect.get(e,o);return typeof t=="string"?i(t):t}}),Bfe={labelAtLevel:(e,o,t)=>i(th(e,o,t)),descriptions:Ffe,categoryLabel:e=>{let o=$4(e);return o===void 0?void 0:i(o)},firstSection:G4,blockRowName:o5,rowName:du,plainText:Sr,Icon:fn,Thumbnail:dM,useProducts:A5,presets:E5()},Dfe={desktop:2e3,tablet:800,mobile:390},B5="desktop",Nfe={options:bA,initial:B5,fluid:B5,widths:Dfe,hidesPerView:!0},Mfe={read:r5,write:e=>a5(e),forSelection:(e,o)=>s5(e,o)},Hfe={first:Jo,last:Xe,firstGroup:Ye,lastGroup:We,isSectionGroup:ns,sectionGroupZone:sT,panelOf:e=>e===Jo?J2:null,get sharedReach(){return xn()?Wfe:void 0},get shared(){return Bt()?i5:void 0},get groupTab(){return xn()?nF:void 0},get groupBadge(){return xn()?Vy({type:We})??void 0:void 0},get changeNotice(){return xn()?sF():void 0},get band(){return xn()?Ufe:void 0},get groupAccepts(){return xn()?dT:void 0}},Ufe={foldable:!0},Wfe=e=>Vy(e)??l5(e);function zfe(e){return{...$5(W5(e),z5(e)),onCopyItem:G5(),openSettings:()=>e.show(Cw)}}function $fe(e,o){WH(e,o),l4()}var kYe={useOwnerName:Us,useDocumentLabel:oA,useBridges:Afe,useStandaloneBridges:zfe,useDocumentPass:$fe,blockRules:Rfe,blockLook:Bfe,devices:Nfe,leftView:Mfe,pinned:Hfe,Canvas:y5,canvasDrag:{media:S5},Inspector:rM};export{My as a,to as b,of as c,Fu as d,TNe as e,cr as f,fr as g,Co as h,NNe as i,Yy as j,wAe as k,Xp as l,Fi as m,Bi as n,XA as o,CAe as p,ZA as q,vAe as r,iZ as s,JA as t,kAe as u,eL as v,zH as w,f8e as x,Kfe as y,le as z,i as A,Wo as B,$H as C,m8e as D,uo as E,p$ as F,xI as G,kbe as H,X0 as I,Ebe as J,nt as K,II as L,_be as M,Abe as N,Lbe as O,Sf as P,Rbe as Q,wf as R,Fbe as S,Bbe as T,Q0 as U,eE as V,y$ as W,S$ as X,Hbe as Y,Wbe as Z,zbe as _,$be as $,Gbe as aa,WE as ba,Va as ca,MG as da,Jye as ea,HG as fa,Qye as ga,lo as ha,eSe as ia,UG as ja,oSe as ka,tSe as la,rSe as ma,aSe as na,nSe as oa,sSe as pa,ws as qa,lSe as ra,wx as sa,vx as ta,XT as ua,kx as va,p6 as wa,Xue as xa,Hc as ya,rP as za,u6 as Aa,m6 as Ba,h6 as Ca,Que as Da,eme as Ea,ome as Fa,tme as Ga,rme as Ha,ame as Ia,VNe as Ja,qNe as Ka,YNe as La,XNe as Ma,ZNe as Na,JNe as Oa,bJ as Pa,TL as Qa,PL as Ra,EL as Sa,js as Ta,nu as Ua,HLe as Va,gye as Wa,ja as Xa,fG as Ya,OI as Za,Jl as _a,bye as $a,yye as ab,AI as bb,SE as cb,Sye as db,Kpe as eb,Pye as fb,Eye as gb,Oye as hb,_ye as ib,Yl as jb,V$ as kb,rE as lb,yI as mb,sr as nb,Jbe as ob,ql as pb,SI as qb,wI as rb,Qbe as sb,eye as tb,PF as ub,kP as vb,fhe as wb,phe as xb,oa as yb,aU as zb,uhe as Ab,mhe as Bb,Rx as Cb,hhe as Db,xhe as Eb,Ihe as Fb,PP as Gb,EP as Hb,ghe as Ib,Hl as Jb,Fx as Kb,bhe as Lb,yhe as Mb,She as Nb,whe as Ob,EF as Pb,Sn as Qb,t2e as Rb,r2e as Sb,a2e as Tb,OF as Ub,n2e as Vb,_F as Wb,Mu as Xb,BF as Yb,g2e as Zb,b2e as _b,ti as $b,lr as ac,Ul as bc,The as cc,Phe as dc,vo as ec,vn as fc,J as gc,Qs as hc,ae as ic,te as jc,ie as kc,de as lc,Ie as mc,X2e as nc,pe as oc,el as pc,tS as qc,od as rc,td as sc,HF as tc,eMe as uc,Xte as vc,UF as wc,rMe as xc,aMe as yc,WF as zc,Zte as Ac,zF as Bc,Jte as Cc,rd as Dc,$F as Ec,iMe as Fc,aS as Gc,fMe as Hc,pMe as Ic,uMe as Jc,mMe as Kc,hMe as Lc,xMe as Mc,zc as Nc,bMe as Oc,Gu as Pc,ad as Qc,yMe as Rc,SMe as Sc,jF as Tc,wMe as Uc,rre as Vc,are as Wc,CMe as Xc,nre as Yc,vMe as Zc,KF as _c,OMe as $c,_Me as ad,AMe as bd,LMe as cd,RMe as dd,FMe as ed,ire as fd,dre as gd,BMe as hd,DMe as id,NMe as jd,MMe as kd,HMe as ld,UMe as md,WMe as nd,zMe as od,$Me as pd,Vu as qd,XF as rd,yre as sd,XMe as td,ZMe as ud,Yu as vd,sS as wd,QF as xd,Xu as yd,tHe as zd,Sre as Ad,wre as Bd,Cre as Cd,rHe as Dd,ot as Ed,Pn as Fd,al as Gd,UHe as Hd,WHe as Id,zHe as Jd,HB as Kd,UB as Ld,sae as Md,s4e as Nd,WB as Od,zB as Pd,$B as Qd,d4e as Rd,p4e as Sd,u4e as Td,m4e as Ud,im as Vd,GB as Wd,fae as Xd,h4e as Yd,Gz as Zd,Mt as _d,Wge as $d,zge as ae,$ge as be,Gge as ce,If as de,jge as ee,_f as fe,ei as ge,Rye as he,Fye as ie,Bye as je,OE as ke,_E as le,AE as me,Dye as ne,Ye as oe,We as pe,Ope as qe,lT as re,Ec as se,iF as te,R4e as ue,F4e as ve,eD as we,B4e as xe,D4e as ye,Es as ze,zl as Ae,vg as Be,Pg as Ce,ap as De,jt as Ee,Qve as Fe,eke as Ge,oke as He,tke as Ie,K8 as Je,V8 as Ke,rke as Le,Os as Me,Og as Ne,ake as Oe,nke as Pe,wp as Qe,Ii as Re,ob as Se,Rs as Te,rn as Ue,WPe as Ve,gi as We,s1 as Xe,zPe as Ye,cb as Ze,$Pe as _e,GPe as $e,jPe as af,e9 as bf,KPe as cf,a9 as df,n9 as ef,VPe as ff,qPe as gf,l9 as hf,cD as if,TS as jf,Hi as kf,bR as lf,yR as mf,Ui as nf,eR as of,_y as pf,cFe as qf,In as rf,Ly as sf,rR as tf,aR as uf,Ry as vf,eee as wf,nR as xf,uu as yf,sR as zf,u5e as Af,hD as Bf,m5e as Cf,h5e as Df,x5e as Ef,bd as Ff,pm as Gf,C5e as Hf,T5e as If,H5e as Jf,LS as Kf,U5e as Lf,wD as Mf,CD as Nf,Nr as Of,Z5e as Pf,kD as Qf,J5e as Rf,PD as Sf,co as Tf,Ge as Uf,mm as Vf,_D as Wf,n3e as Xf,hm as Yf,AD as Zf,c3e as _f,T3e as $f,zD as ag,$S as bg,$D as cg,O3e as dg,_3e as eg,A3e as fg,GS as gg,L3e as hg,R3e as ig,GD as jg,ym as kg,_ne as lg,Sm as mg,b6e as ng,JS as og,Fne as pg,QS as qg,zne as rg,F6e as sg,yN as tg,SN as ug,B6e as vg,D6e as wg,Ag as xg,uke as yg,Lg as zg,a_ as Ag,q6e as Bg,RN as Cg,FN as Dg,uUe as Eg,vUe as Fg,kUe as Gg,TUe as Hg,uw as Ig,ME as Jg,Vye as Kg,$I as Lg,GI as Mg,jI as Ng,OUe as Og,ase as Pg,nse as Qg,zN as Rg,_Ue as Sg,AUe as Tg,oWe as Ug,c2 as Vg,tWe as Wg,f2 as Xg,aWe as Yg,Ose as Zg,b2 as _g,pWe as $g,km as ah,SWe as bh,Sd as ch,vWe as dh,k2 as eh,TWe as fh,T2 as gh,P2 as hh,OWe as ih,hw as jh,Fse as kh,LWe as lh,Bse as mh,RWe as nh,FWe as oh,Tm as ph,A2 as qh,MWe as rh,HWe as sh,UWe as th,WWe as uh,Mr as vh,KWe as wh,z2 as xh,SGe as yh,wGe as zh,Bw as Ah,CGe as Bh,JP as Ch,U1 as Dh,X0e as Eh,Z0e as Fh,z9 as Gh,J0e as Hh,Q0e as Ih,eEe as Jh,oEe as Kh,$9 as Lh,tEe as Mh,rEe as Nh,aEe as Oh,nEe as Ph,V9 as Qh,sEe as Rh,oie as Sh,GM as Th,EGe as Uh,Od as Vh,VM as Wh,Zr as Xh,fue as Yh,V3 as Zh,hx as _h,Fl as $h,pue as ai,hue as bi,Y3 as ci,NT as di,xue as ei,Ba as fi,e6 as gi,wue as hi,Cue as ii,Bl as ji,vue as ki,kue as li,yx as mi,zT as ni,Rue as oi,EA as pi,g_e as qi,Db as ri,cn as si,w_e as ti,C_e as ui,v_e as vi,k_e as wi,MY as xi,T_e as yi,_i as zi,LA as Ai,RA as Bi,QGe as Ci,Hw as Di,QM as Ei,eH as Fi,Dw as Gi,die as Hi,eje as Ii,Bm as Ji,_d as Ki,Nm as Li,oje as Mi,tje as Ni,rje as Oi,Dm as Pi,aje as Qi,nje as Ri,y3 as Si,zo as Ti,gpe as Ui,S3 as Vi,w3 as Wi,Spe as Xi,C3 as Yi,v3 as Zi,wpe as _i,Cpe as $i,vpe as aj,kpe as bj,rH as cj,Ad as dj,Ld as ej,Hm as fj,nH as gj,fl as hj,sH as ij,Um as jj,Wm as kj,zm as lj,lH as mj,iH as nj,dH as oj,cH as pj,fH as qj,mH as rj,hH as sj,Fje as tj,Bje as uj,Dje as vj,Nje as wj,Nt as xj,_ie as yj,SH as zj,Lie as Aj,CH as Bj,vH as Cj,TH as Dj,zie as Ej,cKe as Fj,TA as Gj,u_e as Hj,wKe as Ij,CKe as Jj,cce as Kj,xG as Lj,bs as Mj,Cye as Nj,Zpe as Oj,c9e as Pj,tBe as Qj,gR as Rj,Ti as Sj,l_e as Tj,vA as Uj,i_e as Vj,d_e as Wj,c_e as Xj,X$e as Yj,pM as Zj,uM as _j,mM as $j,GE as ak,qa as bk,Oo as ck,st as dk,ai as ek,Cs as fk,ISe as gk,gSe as hk,ySe as ik,SSe as jk,wSe as kk,CSe as lk,vSe as mk,TSe as nk,Df as ok,ni as pk,KE as qk,qI as rk,ej as sk,VE as tk,XI as uk,Hue as vk,VT as wk,Kue as xk,Wc as yk,$c as zk,Ml as Ak,iP as Bk,mme as Ck,hme as Dk,mP as Ek,Ex as Fk,oU as Gk,ohe as Hk,_he as Ik,Nhe as Jk,Mhe as Kk,EU as Lk,Yo as Mk,Wl as Nk,Kx as Ok,Vx as Pk,Pxe as Qk,qP as Rk,Exe as Sk,Oxe as Tk,_xe as Uk,e0 as Vk,t0 as Wk,Or as Xk,c0 as Yk,uz as Zk,YIe as _k,b0 as $k,tge as al,S0 as bl,k0 as cl,T0 as dl,P0 as el,E0 as fl,O0 as gl,_0 as hl,iI as il,Lz as jl,Rz as kl,Kl as ll,dI as ml,L0 as nl,vge as ol,Bz as pl,kge as ql,Tge as rl,Pge as sl,F0 as tl,Age as ul,Mz as vl,Lge as wl,Rge as xl,Uz as yl,cI as zl,zz as Al,Nge as Bl,$z as Cl,Mge as Dl,uI as El,Qge as Fl,H0 as Gl,qz as Hl,obe as Il,Vl as Jl,i$ as Kl,Sbe as Ll,oG as Ml,dye as Nl,rG as Ol,cye as Pl,fye as Ql,pye as Rl,Ss as Sl,Rf as Tl,zye as Ul,$ye as Vl,Gye as Wl,oj as Xl,tj as Yl,OSe as Zl,sj as _l,lj as $l,_Se as am,ASe as bm,LSe as cm,RSe as dm,FSe as em,WSe as fm,zSe as gm,$Se as hm,GSe as im,jSe as jm,KSe as km,VSe as lm,qSe as mm,YSe as nm,XSe as om,ZSe as pm,qE as qm,JSe as rm,QSe as sm,la as tm,xj as um,ia as vm,Za as wm,NCe as xm,MCe as ym,HCe as zm,UCe as Am,WCe as Bm,zCe as Cm,$Ce as Dm,VCe as Em,qCe as Fm,wK as Gm,YCe as Hm,XCe as Im,ZCe as Jm,JCe as Km,QCe as Lm,eve as Mm,ove as Nm,tve as Om,TK as Pm,rve as Qm,hg as Rm,ave as Sm,Vf as Tm,qf as Um,Zo as Vm,zt as Wm,EO as Xm,ta as Ym,OO as Zm,_O as _m,Yf as $m,nve as an,sve as bn,JK as cn,lve as dn,ive as en,dve as fn,cve as gn,fve as hn,pve as in,Po as jn,uve as kn,mve as ln,Wf as mn,Xf as nn,Zf as on,gg as pn,Qf as qn,hve as rn,NO as sn,xve as tn,S8 as un,Ive as vn,gve as wn,UO as xn,bve as yn,yve as zn,Sve as An,wve as Bn,Cve as Cn,vve as Dn,wg as En,kve as Fn,zO as Gn,Tve as Hn,Pve as In,Ts as Jn,GO as Kn,Eve as Ln,Ove as Mn,_ve as Nn,Ave as On,cRe as Pn,fRe as Qn,pRe as Rn,du as Sn,VL as Tn,ky as Un,RRe as Vn,FRe as Wn,JL as Xn,gt as Yn,Qp as Zn,YZ as _n,XZ as $n,rLe as ao,aLe as bo,nLe as co,sLe as do,mL as eo,dLe as fo,cLe as go,fLe as ho,hV as io,$_ as jo,G_ as ko,Wp as lo,mA as mo,hA as no,IA as oo,zp as po,$Oe as qo,GOe as ro,$p as so,OY as to,e_e as uo,ki as vo,a_e as wo,CA as xo,as as yo,g3 as zo,hpe as Ao,xpe as Bo,UDe as Co,WDe as Do,zDe as Eo,EKe as Fo,x_e as Go,Gp as Ho,rpe as Io,X8 as Jo,vke as Ko,kke as Lo,i_ as Mo,Tke as No,Pke as Oo,Vg as Po,m1 as Qo,i0e as Ro,d0e as So,c0e as To,f0e as Uo,H1 as Vo,IEe as Wo,gEe as Xo,BA as Yo,dAe as Zo,zA as _o,zi as $o,Wee as ap,gBe as bp,TBe as cp,gu as dp,Xe as ep,Au as fp,Xt as gp,IM as hp,kd as ip,gM as jp,bM as kp,oGe as lp,tGe as mp,i4 as np,Zw as op,d4 as pp,Z4 as qp,PVe as rp,Xm as sp,yce as tp,Sce as up,MVe as vp,Xfe as wp,epe as xp,kYe as yp};
|