efficient-web-builder 0.0.0 → 0.7.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 +174 -0
- package/LICENSE +10 -0
- package/README.md +230 -2
- package/dist/chunks/EditorPreviewCheckout-UMTU2FL4.js +4 -0
- package/dist/chunks/PreviewFooter-3TQMFRPZ.js +1 -0
- package/dist/chunks/SectionEditorShell-FZIT2REV.js +1 -0
- package/dist/chunks/SiteEditorProvider-FHKVGA4K.js +1 -0
- package/dist/chunks/StorefrontEditorChrome-MYOIHQ5J.js +1 -0
- package/dist/chunks/chunk-4G3T6ZD2.js +1 -0
- package/dist/chunks/chunk-4KLEZTLW.js +11 -0
- package/dist/chunks/chunk-IVOJJ6LW.js +1 -0
- package/dist/chunks/chunk-K3Y6UBLO.js +1 -0
- package/dist/chunks/chunk-KR3FTVDW.js +2 -0
- package/dist/chunks/chunk-N35EG6RF.js +143 -0
- package/dist/chunks/chunk-N35EG6RF.js.LEGAL.txt +4 -0
- package/dist/chunks/chunk-RF5DTRJ5.js +1 -0
- package/dist/chunks/chunk-UBYBQ3KR.js +1 -0
- package/dist/chunks/chunk-UTFM4DGR.js +15 -0
- package/dist/chunks/chunk-UTFM4DGR.js.LEGAL.txt +27 -0
- package/dist/chunks/chunk-WMFQNAWF.js +11 -0
- package/dist/chunks/chunk-X6KEAC34.js +1 -0
- package/dist/chunks/chunk-Y6SLVHK3.js +1 -0
- package/dist/chunks/fitment-data-ZLYB5QPR.js +1 -0
- package/dist/chunks/gallery-builds-data-SWA6XKFF.js +1 -0
- package/dist/chunks/headers-3CAQXQEY.js +1 -0
- package/dist/chunks/render-client-A75K43T5.js +1 -0
- package/dist/contract.d.ts +48 -0
- package/dist/contract.js +1 -0
- package/dist/editor.css +1 -0
- package/dist/index.d.ts +541 -0
- package/dist/index.js +10681 -0
- package/package.json +47 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{A as ta,B as na,C as oa,D as ia,E as ra,a as bt,b as Ko,c as qs,d as Vs,e as Vt,f as Uo,g as Un,h as Yn,i as Gs,j as Ks,k as Us,l as Xn,m as Ys,n as Yo,o as Xo,p as vt,q as Zo,r as Jo,s as Qo,t as Xs,u as Zs,v as Le,w as Jn,x as Js,y as Qs,z as ea}from"./chunk-WMFQNAWF.js";import{a as _s,b as js}from"./chunk-IVOJJ6LW.js";import{g as Zn}from"./chunk-4G3T6ZD2.js";import{B as qo,C as jo,D as Vo,E as Go,F as Ds,G as zs,H as Os,I as Bs,K as $s,L as Fs,M as Ws,a as Et,b as jt,c as ms,h as ys,j as hs,l as vs,n as Ss,o as ks,q as Cs,r as As,t as Ke,u as Ns,y as _o,z as Ls}from"./chunk-KR3FTVDW.js";import{$b as un,Ah as ds,Aj as Ts,Cj as Is,Dj as Ps,Eb as Wr,Ig as ss,La as $r,Nj as Rs,Oh as cs,Ph as ps,Qh as us,Qj as Es,Rj as Wo,Sh as Gn,Sj as Pe,Zb as _r,Zf as is,_b as qr,_f as rs,ac as jr,bc as Vr,cj as bs,df as Zr,ei as gn,hb as dn,hi as fs,if as Jr,ih as as,ii as mn,jb as Fr,jc as Gr,jh as ls,kb as cn,kf as fn,ki as yn,lf as Qr,li as Ho,mc as _t,mf as es,mk as Ms,ni as gs,ok as Hs,pc as Kr,pj as xs,q as Lr,qf as qt,r as Dr,rc as Ur,s as qn,sc as Yr,tf as ns,uc as Xr,va as Or,vb as pn,wj as be,xj as $o,yf as os,yj as ws,zf as Mo,zi as Kn,zj as Fo}from"./chunk-UTFM4DGR.js";import{Ea as Vn,Fa as Oo,Ha as Br,Hc as We,Ia as Mr,Ja as Wt,Ka as Fe,La as oe,Ma as P,Oa as Bo,Pa as Hr,nd as ts}from"./chunk-4KLEZTLW.js";import{C as zr,T as jn}from"./chunk-RF5DTRJ5.js";import{b as Ft}from"./chunk-UBYBQ3KR.js";import"./chunk-Y6SLVHK3.js";import{Fragment as Ut,useCallback as De,useEffect as $,useLayoutEffect as hc,useMemo as yi,useRef as de,useState as ce}from"react";import{PagesIcon as bc,LayersIcon as Qa,StylesIcon as vc,MediaIcon as el,SitemapIcon as xc}from"efficient-easel/rail";import{LayersTree as Sc,Subtree as at,TreeGroupLabel as io,TreeRow as we,TreeRowAction as ro,TreeSeam as hi}from"efficient-easel/tree";import{DeviceSwitch as kc,EditorIconButton as tl,EditorTopBar as wc,InspectorIconButton as Cc,PanelResizeHandle as nl,SaveState as ol,SaveStateToggle as Tc,TopBarCluster as il,TopBarDivider as Ic,TopBarRail as Pc}from"efficient-easel/chrome";import{ExternalIcon as Rc,ImageIcon as Ec,RedoIcon as Ac,TextLinesIcon as Nc,TrashIcon as bi,UndoIcon as Lc}from"efficient-easel/icons";import{saveIndicator as Dc}from"efficient-easel/autosave";import{EditNotice as Ul}from"efficient-easel/chrome";import{jsx as Yl}from"react/jsx-runtime";function ei(){let{capabilities:n,access:r,takeOverEditing:a,viewReadOnly:m,saveConflict:u,reloadFromServer:f}=qt();return n.hasEditGuard?Yl(Ul,{access:r,conflict:u,noun:"page",onTakeOver:a,onViewReadOnly:m,onReload:f}):null}import{DesktopIcon as Xl,PhoneIcon as Zl,TabletIcon as Jl}from"efficient-easel/icons";import{jsx as ti}from"react/jsx-runtime";var Ql={desktop:ti(Xl,{}),tablet:ti(Jl,{}),mobile:ti(Zl,{})},sa=is.map(n=>({id:n,label:rs[n],icon:Ql[n]}));import{useEffect as od,useMemo as ha,useState as id}from"react";import{useEditor as rd}from"efficient-easel/editor";import{AddPanel as sd}from"efficient-easel/drag";import{AddIcon as ad}from"efficient-easel/icons";import{Fragment as pa,jsx as t,jsxs as d}from"react/jsx-runtime";var se={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)"},ni="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 S({w:n,h:r,tone:a="dark",r:m=2,style:u}){return t("div",{style:{width:n,height:r,borderRadius:m,background:se[a],flex:"none",...u}})}var ed={Hero:"hero",HeroSingle:"herosingle",IntroBleed:"intro",Collections:"collections",AlloyWheelsListing:"wheelslisting",CatalogFilterBar:"catalogfilterbar",ProductGrid:"productgrid",BrandStrip:"brandstrip",FitmentFinder:"fitmentfinder",Gallery:"gallery",GalleryB:"gallerygrid",SpecStrip:"specstrip",ProductHero:"producthero",SpecTable:"spectable",ProcessSteps:"processsteps",DetailRows:"detailrows",FitmentTable:"fitmenttable",CompatibleTyres:"compatibletyres",TyreSizes:"tyresizes",TyreFitment:"tyrefitment",EuTyreLabel:"eutyrelabel",RelatedProducts:"productgrid",BundleOffer:"bundleoffer",OrderSummary:"ordersummary",DeliveryOptions:"deliveryoptions",PaymentBadges:"paymentbadges",CheckoutCTA:"checkoutcta",Manifesto:"manifesto",ParagraphsA:"paragraphs",Prose:"prose",StatsParagraph:"statsparagraph",Chart:"chart",Mockup:"mockup",Footprint:"footprint",Timeline:"timeline",TimelineTrack:"timelinetrack",TitleWithButtons:"titlewithbuttons",Split:"split",Cards:"cards",FAQ:"faq",Testimonials:"testimonials",Masthead:"masthead",Breadcrumb:"breadcrumb",CategoryBar:"categorybar",FeaturedCover:"featuredcover",LongRead:"longread",Series:"series",Subscribe:"subscribe",SubscribeBlogs:"subscribe",Events:"events",DocMasthead:"docmasthead",DocTabs:"doctabs",DocBody:"docbody",DocMetaCards:"docmetacards",Banner:"banner",Stats:"stats",KeyFeatures:"keyfeatures",Logos:"logos",Ticker:"ticker",Reviews:"reviews",SubmitBuild:"submitbuild",ReviewForm:"reviewform",Form:"form",AppointmentBooking:"appointmentbooking",ContactRouting:"contact",ContactLocations:"contactlocations",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",LegalLineBlock:"legalline",SearchBlock:"search",CartBlock:"cart",CountrySwitchBlock:"countryswitch"},I={position:"absolute",inset:0},i={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)"},X=(n,r,a=160)=>({background:`linear-gradient(${a}deg,${n},${r})`});function st({size:n,style:r}){let a=Math.max(2,Math.round(n*.13)),m=(u,f,b)=>({position:"absolute",inset:u,background:f,borderRadius:a,...b?{mixBlendMode:b}:null});return d("span",{style:{position:"absolute",display:"block",width:n,height:n,...r},children:[t("span",{style:m("8% 26% 30% 6%",i.mark1)}),t("span",{style:m("26% 6% 8% 30%",i.mark2,"multiply")})]})}function bn({children:n}){return t("span",{style:{fontSize:"4.64cqw",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:i.muted},children:n})}function aa({over:n,overTone:r,head:a,headSize:m=11.5,cta:u,ctaBg:f,ctaFg:b,tone:R}){return d(pa,{children:[n&&t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:r},children:n}),t("span",{style:{fontSize:m,lineHeight:1.15,fontWeight:700,maxWidth:"78%",color:R},children:a}),u&&t("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,marginTop:2,background:f,color:b},children:u})]})}function oi({name:n,price:r}){return d("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[t("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",...X(i.paper,i.paper2,150)},children:t(st,{size:34,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),t("span",{style:{fontSize:"3.65cqw",fontWeight:600,color:i.text},children:n}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:r})]})}function rt({k:n,v:r,ok:a}){return d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,padding:"3.5px 2px",borderBottom:`1px solid ${i.rule}`,fontSize:"3.98cqw",color:i.muted},children:[t("span",{children:n}),d("span",{style:{display:"flex",gap:6,alignItems:"center"},children:[t("b",{style:{color:i.text,fontWeight:700},children:r}),a&&t("span",{style:{color:i.rust,fontWeight:700},children:"\u2713"})]})]})}function q({title:n,children:r}){return d("div",{style:{...I,background:i.card,padding:"9px 10px",display:"flex",flexDirection:"column",gap:6},children:[t(bn,{children:n}),r]})}function la({size:n=14}){return t("span",{style:{width:n,height:n,borderRadius:"50%",flex:"none",display:"block",background:`linear-gradient(150deg,${i.mark1},${i.mark2})`}})}function ii({filled:n=5,size:r=6}){return d("span",{style:{fontSize:r,letterSpacing:"0.06em",color:i.rust,lineHeight:1},children:["\u2605".repeat(n),t("span",{style:{color:i.mark1},children:"\u2605".repeat(5-n)})]})}function hn({n,label:r,tone:a=i.text}){return d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[t("b",{style:{fontSize:"8.16cqw",lineHeight:1,color:a},children:n}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",opacity:.62,color:a},children:r})]})}function ge({children:n,w:r}){return t("span",{style:{fontSize:"3.98cqw",lineHeight:1.45,color:i.muted,width:r,display:"block"},children:n})}function Qn({label:n,w:r="100%",filled:a}){return d("div",{style:{width:r,display:"flex",flexDirection:"column",gap:2},children:[t("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:i.muted},children:n}),t("span",{style:{height:9,borderRadius:3,border:`1px solid ${i.rule}`,background:a?i.paper:i.card}})]})}function da({children:n}){return t("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:i.text,color:i.onInk},children:n})}var td={wheelslisting:t(q,{title:"All wheels",children:t("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(([n,r,a])=>d("div",{style:{display:"flex",alignItems:"center",gap:6},children:[t("span",{style:{width:20,height:15,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",...X(i.paper,i.paper2,150)},children:t(st,{size:12,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),t("b",{style:{flex:1,fontSize:"4.31cqw",color:i.text},children:n}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:r}),t("b",{style:{fontSize:"4.31cqw",color:i.text,width:26,textAlign:"right"},children:a})]},n))})}),catalogfilterbar:d("div",{style:{...I,background:i.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[d("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[["20 inch","6\xD7139.7","Black"].map(n=>d("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"4px 7px",borderRadius:99,background:i.text,color:i.onInk,display:"flex",gap:4,alignItems:"center"},children:[n,t("span",{style:{opacity:.6},children:"\u2715"})]},n)),t("span",{style:{fontSize:"3.65cqw",color:i.rust,fontWeight:700},children:"Clear"})]}),d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"128 results"}),t("span",{style:{fontSize:"3.65cqw",color:i.muted,border:`1px solid ${i.rule}`,borderRadius:3,padding:"3px 6px"},children:"Sort: Price \u25BE"})]})]}),fitmentfinder:d("div",{style:{...I,padding:"10px 12px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center",...X(i.ink,i.inkSoft)},children:[t("span",{style:{fontSize:"5.31cqw",fontWeight:700,color:i.onInk},children:"Will it fit your rig?"}),d("div",{style:{display:"flex",gap:4},children:[["2021","Toyota","Hilux"].map(n=>d("span",{style:{flex:1,fontSize:"3.65cqw",color:i.text,background:i.card,borderRadius:3,padding:"5px 6px",display:"flex",justifyContent:"space-between"},children:[n," ",t("span",{style:{color:i.muted},children:"\u25BE"})]},n)),t("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.08em",background:i.warm,color:i.ink,borderRadius:3,padding:"5px 7px"},children:"GO"})]})]}),compatibletyres:t(q,{title:"Tyres that suit",children:t("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(([n,r])=>d("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[t("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",background:i.ink},children:t("span",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)",width:26,height:26,borderRadius:"50%",border:`5px solid ${i.mark2}`,boxSizing:"border-box"}})}),t("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:i.text,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:n}),t("span",{style:{fontSize:"3.32cqw",color:i.muted},children:r})]},n))})}),tyresizes:t(q,{title:"Available sizes",children:t("div",{style:{flex:1,display:"flex",flexWrap:"wrap",gap:4,alignContent:"center"},children:["265/65R17","285/70R17","265/60R18","275/55R20"].map((n,r)=>t("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"5px 7px",borderRadius:3,border:`1px solid ${r===0?i.rust:i.rule}`,color:r===0?i.rust:i.text,background:r===0?i.paper:i.card},children:n},n))})}),tyrefitment:d(q,{title:"Will it fit your car?",children:[t("div",{style:{display:"flex",gap:3},children:["Make","Model","Year","Trim"].map(n=>d("span",{style:{flex:1,minWidth:0,fontSize:"3.32cqw",color:i.muted,background:i.paper,border:`1px solid ${i.rule}`,borderRadius:3,padding:"4px 5px",display:"flex",justifyContent:"space-between",gap:2,overflow:"hidden",whiteSpace:"nowrap"},children:[n," ",t("span",{style:{color:i.muted},children:"\u25BE"})]},n))}),t("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(([n,r,a])=>d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:6,borderTop:`1px solid ${i.rule}`,paddingTop:3},children:[t("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:i.text},children:n}),t("span",{style:{fontSize:"3.32cqw",fontWeight:a?700:400,letterSpacing:"0.06em",color:a?i.warm:i.muted},children:r})]},n))})]}),eutyrelabel:d("div",{style:{...I,background:i.card,padding:"9px 11px",display:"flex",gap:8,alignItems:"center"},children:[t("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1.5},children:[["A","42%"],["B","56%"],["C","70%"],["D","84%"]].map(([n,r],a)=>d("div",{style:{display:"flex",alignItems:"center",gap:3},children:[t("span",{style:{width:r,height:6,borderRadius:"0 2px 2px 0",background:a===1?i.rust:i.mark1}}),t("span",{style:{fontSize:"3.32cqw",fontWeight:700,color:a===1?i.rust:i.muted},children:n})]},n))}),d("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:3,alignItems:"center"},children:[t("b",{style:{fontSize:"6.63cqw",lineHeight:1,color:i.text},children:"72"}),t("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",color:i.muted},children:"dB"})]})]}),bundleoffer:d("div",{style:{...I,background:i.paper,padding:"9px 11px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[t(bn,{children:"Buy it with"}),d("div",{style:{display:"flex",alignItems:"center",gap:5},children:[[0,1].map(n=>t("span",{style:{width:26,height:22,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",background:i.card},children:t(st,{size:17,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})},n)),t("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:i.muted},children:"+"}),d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1},children:[t("span",{style:{fontSize:"3.65cqw",color:i.muted,textDecoration:"line-through"},children:"$1,024"}),t("b",{style:{fontSize:"6.02cqw",color:i.rust,lineHeight:1},children:"$899"})]})]})]}),checkoutcta:d("div",{style:{...I,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,...X(i.ink,i.ink2)},children:[d("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",color:i.warm,fontWeight:700},children:"READY TO ORDER"}),t("b",{style:{fontSize:"6.63cqw",color:i.onInk,lineHeight:1},children:"$1,956"}),t("span",{style:{fontSize:"3.65cqw",color:i.onInk,opacity:.65},children:"4 items \xB7 fitted free"})]}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"6px 10px",borderRadius:2,background:i.warm,color:i.ink,flex:"none"},children:"CHECKOUT"})]}),contact:t(q,{title:"Who do you need?",children:t("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(([n,r])=>d("div",{style:{display:"flex",alignItems:"center",gap:5},children:[t("b",{style:{flex:1,fontSize:"4.31cqw",color:i.text},children:n}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:r}),t("span",{style:{fontSize:"4.64cqw",color:i.rust,lineHeight:1},children:"\u203A"})]},n))})}),contactlocations:t(q,{title:"Find us",children:t("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(([n,r,a])=>d("div",{style:{border:`1px solid ${i.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[t("b",{style:{fontSize:"4.31cqw",color:i.text},children:n}),t("span",{style:{fontSize:"3.32cqw",color:i.muted},children:r}),t("span",{style:{fontSize:"3.32cqw",color:i.rust,fontWeight:700},children:a})]},n))})}),form:t(q,{title:"Send us a message",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[d("div",{style:{display:"flex",gap:5},children:[t(Qn,{label:"Name"}),t(Qn,{label:"Email"})]}),t(Qn,{label:"Message",filled:!0}),t(da,{children:"SEND"})]})}),appointmentbooking:t(q,{title:"Book a fitting",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[t("div",{style:{display:"flex",gap:3},children:["Mon","Tue","Wed","Thu"].map((n,r)=>t("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",fontWeight:r===2?700:500,padding:"4px 0",borderRadius:3,background:r===2?i.text:i.paper,color:r===2?i.onInk:i.muted},children:n},n))}),t("div",{style:{display:"flex",gap:3},children:["8:00","10:30","13:00","15:30"].map((n,r)=>t("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",padding:"4px 0",borderRadius:3,border:`1px solid ${r===1?i.rust:i.rule}`,color:r===1?i.rust:i.muted,background:r===3?i.paper:i.card,textDecoration:r===3?"line-through":"none"},children:n},n))})]})}),reviewform:t(q,{title:"Leave a review",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[t(ii,{filled:4,size:14}),t(Qn,{label:"Your review",filled:!0}),t(da,{children:"POST"})]})}),submitbuild:t(q,{title:"Show us your build",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,border:`1px dashed ${i.mark1}`,borderRadius:5,background:i.paper},children:[t("span",{style:{fontSize:"6.63cqw",lineHeight:1,color:i.rust,fontWeight:300},children:"+"}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"Drop a photo of your rig"})]})}),masthead:d("div",{style:{...I,background:i.paper,display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 13px",gap:5},children:[t("span",{style:{height:1.5,background:i.text}}),t("span",{style:{fontSize:"7.65cqw",fontWeight:800,letterSpacing:"0.02em",color:i.text,lineHeight:1},children:"THE TRACK"}),d("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"3.65cqw",letterSpacing:"0.1em",textTransform:"uppercase",color:i.muted},children:[t("span",{children:"Issue 14"}),t("span",{children:"Spring 2026"})]}),t("span",{style:{height:1,background:i.rule}})]}),featuredcover:d("div",{style:{...I,overflow:"hidden",...X(i.ink,i.inkSoft2)},children:[t(st,{size:92,style:{right:-18,top:-14}}),t("div",{style:{position:"absolute",inset:0,background:`linear-gradient(0deg,${i.scrim},transparent 62%)`}}),d("div",{style:{position:"absolute",left:12,right:12,bottom:11,display:"flex",flexDirection:"column",gap:3},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:i.warm},children:"FEATURE"}),t("span",{style:{fontSize:"6.16cqw",lineHeight:1.15,fontWeight:700,color:i.onInk},children:"Four days on the Madigan Line"})]})]}),longread:d("div",{style:{...I,background:i.card,padding:"10px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.14em",fontWeight:700,color:i.rust},children:"12 MIN READ"}),t("span",{style:{fontSize:"6.02cqw",lineHeight:1.15,fontWeight:700,color:i.text},children:"What breaks first, and why"}),t(ge,{children:"Every failure starts in the same place \u2014 not the rim, not"}),t(ge,{w:"62%",children:"the tyre, but the bolt nobody re-torqued."})]}),series:t(q,{title:"Recurring columns",children:t("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[["Shed Notes","Monthly"],["Track Tested","Fortnightly"],["Reader Rigs","Weekly"]].map(([n,r])=>d("div",{style:{display:"flex",alignItems:"center",gap:6},children:[t("span",{style:{width:3,height:12,borderRadius:2,background:i.rust,flex:"none"}}),t("b",{style:{flex:1,fontSize:"4.64cqw",color:i.text},children:n}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:i.muted},children:r})]},n))})}),events:t(q,{title:"Latest posts",children:t("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[[i.inkSoft,i.inkSoft2,"Madigan Line, four days"],[i.rust,i.warm,"Why offset beats width"]].map(([n,r,a])=>d("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[t("span",{style:{width:24,height:18,borderRadius:3,flex:"none",...X(n,r,150)}}),d("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[t("b",{style:{fontSize:"4.31cqw",color:i.text},children:a}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"4 Sep \xB7 Shed Notes"})]})]},a))})}),docmasthead:d("div",{style:{...I,background:i.card,padding:"12px 14px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:i.muted},children:"POLICY"}),t("span",{style:{fontSize:"6.49cqw",fontWeight:700,color:i.text,lineHeight:1.1},children:"Returns & refunds"}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"Version 3 \xB7 Updated 4 Sep 2026"}),t("span",{style:{height:2,width:26,background:i.rust,borderRadius:1}})]}),docbody:t("div",{style:{...I,background:i.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(([n,r])=>d("div",{style:{display:"flex",gap:5},children:[t("b",{style:{fontSize:"3.98cqw",color:i.rust,flex:"none"},children:n}),t(ge,{children:r})]},n))}),docmetacards:t(q,{title:"At a glance",children:t("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(([n,r])=>d("div",{style:{border:`1px solid ${i.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[t("b",{style:{fontSize:"5.31cqw",color:i.text,lineHeight:1},children:n}),t("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:i.muted},children:r})]},r))})}),doctabs:d("div",{style:{...I,background:i.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:0,padding:"0 11px"},children:[t("div",{style:{display:"flex",gap:0},children:["Returns","Warranty","Shipping"].map((n,r)=>t("span",{style:{fontSize:"3.98cqw",fontWeight:r===0?700:500,padding:"5px 8px",color:r===0?i.text:i.muted,background:r===0?i.paper:"transparent",borderRadius:"4px 4px 0 0",border:`1px solid ${r===0?i.rule:"transparent"}`,borderBottom:"none"},children:n},n))}),t("span",{style:{height:1,background:i.rule}}),d("div",{style:{paddingTop:6,display:"flex",flexDirection:"column",gap:2},children:[t(ge,{children:"Unfitted wheels come back within 30 days, no questions."}),t(ge,{w:"58%",children:"Freight on a change of mind is yours."})]})]}),paragraphs:d("div",{style:{...I,background:i.card,padding:"11px 14px",display:"flex",gap:10,alignItems:"center"},children:[t("span",{style:{flex:1,fontSize:"5.86cqw",lineHeight:1.2,fontWeight:700,color:i.text},children:"The right wheel is the boring one."}),d("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[t(ge,{children:"Forged, correctly offset, rated for what you actually"}),t(ge,{children:"carry. Everything else is a photograph."})]})]}),keyfeatures:t(q,{title:"Key features",children:t("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:["Flow-formed barrel","1250 kg per corner","Hub-centric fit"].map(n=>d("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[t("span",{style:{fontSize:"4.64cqw",color:i.rust,fontWeight:700,lineHeight:1},children:"\u2713"}),t("span",{style:{fontSize:"4.31cqw",color:i.text},children:n})]},n))})}),statsparagraph:d("div",{style:{...I,background:i.paper,padding:"10px 12px",display:"flex",gap:10,alignItems:"center"},children:[d("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:5},children:[t(hn,{n:"27k",label:"Rigs"}),t(hn,{n:"4.9",label:"Rating"})]}),d("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[t(ge,{children:"Twelve years of fitting the same three questions, and the"}),t(ge,{children:"answer has not moved: load rating, offset, then looks."})]})]}),chart:d(q,{title:"Load vs weight",children:[t("div",{style:{flex:1,display:"flex",alignItems:"flex-end",gap:5,paddingBottom:2},children:[38,62,84,71,96].map((n,r)=>t("span",{style:{flex:1,height:`${n}%`,borderRadius:"2px 2px 0 0",background:r===4?i.rust:i.mark1}},r))}),t("span",{style:{height:1,background:i.rule,marginTop:-4}})]}),mockup:t("div",{style:{...I,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",...X(i.inkSoft,i.ink)},children:d("div",{style:{width:"72%",height:"74%",borderRadius:4,overflow:"hidden",background:i.card,boxShadow:`0 6px 14px ${i.scrim}`},children:[t("div",{style:{height:9,background:i.paper,display:"flex",alignItems:"center",gap:2,padding:"0 4px"},children:[0,1,2].map(n=>t("span",{style:{width:2.5,height:2.5,borderRadius:"50%",background:i.mark1}},n))}),d("div",{style:{padding:5,display:"flex",flexDirection:"column",gap:3},children:[t("span",{style:{height:4,width:"56%",borderRadius:1,background:i.mark2}}),t("span",{style:{height:14,borderRadius:2,...X(i.paper,i.paper2,150)}}),t("span",{style:{height:3,width:"38%",borderRadius:1,background:i.rust}})]})]})}),manifesto:t("div",{style:{...I,overflow:"hidden",display:"flex",alignItems:"center",padding:"0 16px",...X(i.ink,i.ink2)},children:d("span",{style:{fontSize:"6.63cqw",lineHeight:1.2,fontWeight:700,color:i.onInk},children:["We build for the ",t("span",{style:{color:i.warm},children:"last"})," ten percent of the track."]})}),timeline:t(q,{title:"Our story",children:t("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(([n,r],a)=>d("div",{style:{display:"flex",gap:7,alignItems:"flex-start",position:"relative"},children:[a<2&&t("span",{style:{position:"absolute",left:3,top:8,bottom:-8,width:1,background:i.rule}}),t("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",marginTop:1,background:i.rust,zIndex:1}}),d("div",{style:{display:"flex",flexDirection:"column",gap:0,minWidth:0},children:[t("b",{style:{fontSize:"4.64cqw",color:i.text},children:n}),t(ge,{children:r})]})]},n))})}),timelinetrack:d("div",{style:{...I,padding:"0 12px",display:"flex",flexDirection:"column",gap:10,justifyContent:"center",...X(i.ink,i.inkSoft)},children:[t("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:i.warm},children:"Milestones"}),d("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",paddingTop:7},children:[t("span",{style:{position:"absolute",left:0,right:0,top:3,height:1,background:i.mark2,opacity:.55}}),["1998","2009","2016","2024"].map((n,r)=>d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,position:"relative"},children:[t("span",{style:{position:"absolute",top:-7,width:6,height:6,borderRadius:"50%",background:r===3?i.warm:i.mark1}}),t("span",{style:{fontSize:"4.31cqw",fontWeight:700,color:r===3?i.warm:i.onInk,opacity:r===3?1:.75},children:n})]},n))]})]}),footprint:d("div",{style:{...I,overflow:"hidden",...X(i.paper,i.paper2,150)},children:[t("span",{style:{position:"absolute",left:"8%",top:"18%",width:"62%",height:"64%",borderRadius:"48% 52% 40% 60% / 55% 45% 55% 45%",background:i.mark1,opacity:.75}}),t("span",{style:{position:"absolute",left:"52%",top:"52%",width:"34%",height:"34%",borderRadius:"58% 42% 55% 45% / 45% 58% 42% 55%",background:i.mark2,opacity:.55}}),[["26%","38%"],["44%","58%"],["62%","34%"]].map(([n,r])=>t("span",{style:{position:"absolute",left:n,top:r,width:7,height:7,borderRadius:"50% 50% 50% 0",transform:"rotate(-45deg)",background:i.rust}},n)),t("span",{style:{position:"absolute",left:11,bottom:9,fontSize:"4.64cqw",fontWeight:700,color:i.text},children:"3 fitting bays"})]}),banner:d("div",{style:{...I,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,background:i.rust},children:[d("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t("b",{style:{fontSize:"6.02cqw",color:i.onInk},children:"End of season \xB7 20% off"}),t("span",{style:{fontSize:"3.98cqw",color:i.onInk,opacity:.8},children:"Fitted free, this month only."})]}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:i.onInk,color:i.text,flex:"none"},children:"SHOP"})]}),titlewithbuttons:d("div",{style:{...I,background:i.paper,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:7,padding:"0 14px",textAlign:"center"},children:[t("span",{style:{fontSize:"6.49cqw",lineHeight:1.15,fontWeight:700,color:i.text},children:"Not sure what fits?"}),d("div",{style:{display:"flex",gap:5},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:i.text,color:i.onInk},children:"FIND MY FIT"}),t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,border:`1px solid ${i.text}`,color:i.text},children:"CALL US"})]})]}),ticker:t("div",{style:{...I,overflow:"hidden",background:i.ink,display:"flex",alignItems:"center"},children:t("span",{style:{whiteSpace:"nowrap",fontSize:"6.29cqw",fontWeight:800,letterSpacing:"0.06em",color:i.warm,marginLeft:-14},children:"FREE FITTING \xB7 48HR DISPATCH \xB7 FREE FITTING \xB7 48HR DISPATCH"})}),breadcrumb:t("div",{style:{...I,background:i.card,display:"flex",alignItems:"center",padding:"0 13px"},children:d("span",{style:{fontSize:"4.64cqw",color:i.muted},children:["Home ",t("span",{style:{opacity:.5},children:"/"})," Wheels ",t("span",{style:{opacity:.5},children:"/"})," ",t("span",{style:{color:i.text,fontWeight:700},children:"20 inch"})]})}),categorybar:d("div",{style:{...I,background:i.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[t("div",{style:{display:"flex",gap:5},children:["All","Wheels","Tyres","Lift"].map((n,r)=>t("span",{style:{fontSize:"3.98cqw",fontWeight:r===0?700:500,padding:"4px 7px",borderRadius:99,background:r===0?i.text:i.paper,color:r===0?i.onInk:i.muted},children:n},n))}),t("span",{style:{height:1,background:i.rule}})]}),intro:d("div",{style:{...I,overflow:"hidden",background:i.card},children:[t("div",{style:{position:"absolute",inset:0,...X(i.ink,i.inkSoft2)}}),t(st,{size:64,style:{right:8,top:6}}),d("div",{style:{position:"absolute",left:16,right:16,bottom:8,top:"46%",background:i.paper,borderRadius:6,padding:"8px 11px",display:"flex",flexDirection:"column",gap:2,boxShadow:`0 -4px 10px ${i.scrim}`},children:[t("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:i.text},children:"Since 1998"}),t(ge,{children:"One shed, one lathe, one idea."}),t(ge,{w:"66%",children:"It turned out to be right."})]})]}),gallerygrid:t(q,{title:"From our customers",children:t("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gridTemplateRows:"repeat(2,1fr)",gap:4,minHeight:0},children:[[i.rust,i.warm],[i.inkSoft,i.ink],[i.paper2,i.mark2],[i.ink,i.inkSoft2],[i.warm,i.paper2],[i.mark2,i.inkSoft]].map(([n,r],a)=>t("div",{style:{borderRadius:3,...X(n,r,140+a*22)}},a))})}),gallery:d(q,{title:"Gallery",children:[t("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:-2},children:["On the truck","Studio","Close-ups"].map((n,r)=>t("span",{style:{fontSize:"3.98cqw",fontWeight:r===0?700:500,color:r===0?i.text:i.muted,borderBottom:`1.5px solid ${r===0?i.rust:"transparent"}`,paddingBottom:2},children:n},n))}),t("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:[[i.rust,i.warm],[i.ink,i.inkSoft],[i.paper2,i.mark2]].map(([n,r],a)=>t("div",{style:{borderRadius:3,...X(n,r,150+a*20)}},a))})]}),ordersummary:d(q,{title:"Order summary",children:[d("div",{style:{display:"flex",gap:6,alignItems:"center",paddingBottom:4},children:[t("span",{style:{width:26,height:26,borderRadius:4,position:"relative",overflow:"hidden",flex:"none",...X(i.paper,i.paper2,150)},children:t(st,{size:18,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),d("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[t("b",{style:{fontSize:"4.31cqw",color:i.text},children:"Ridge Grappler"}),t("span",{style:{fontSize:"3.65cqw",color:i.muted},children:"20\xD79 +12 \xB7 qty 4"})]})]}),d("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",justifyContent:"center"},children:[t(rt,{k:"Subtotal",v:"$1,956"}),t(rt,{k:"Fitting",v:"Free"}),d("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:5,fontSize:"4.64cqw"},children:[t("b",{style:{color:i.text},children:"Total"}),t("b",{style:{color:i.text,fontSize:"6.02cqw"},children:"$1,956"})]})]})]}),deliveryoptions:t(q,{title:"Delivery",children:t("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(([n,r,a,m])=>d("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"5px 6px",borderRadius:4,border:`1px solid ${m?i.rust:i.rule}`,background:m?i.paper:i.card},children:[t("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",border:`1.5px solid ${m?i.rust:i.mark1}`,background:m?i.rust:"transparent"}}),t("span",{style:{flex:1,fontSize:"4.31cqw",fontWeight:600,color:i.text},children:n}),t("span",{style:{fontSize:"3.98cqw",color:i.muted},children:r}),t("b",{style:{fontSize:"4.31cqw",color:i.text},children:a})]},n))})}),paymentbadges:d("div",{style:{...I,background:i.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[t(bn,{children:"Ways to pay"}),t("div",{style:{display:"flex",gap:5},children:[["VISA",i.ink],["MC",i.rust],["AMEX",i.inkSoft],["PayPal",i.ink2]].map(([n,r])=>t("span",{style:{flex:1,textAlign:"center",fontSize:"3.65cqw",fontWeight:800,letterSpacing:"0.06em",color:i.onInk,borderRadius:3,padding:"6px 0",background:r},children:n},n))})]}),stats:d("div",{style:{...I,padding:"10px 12px",display:"flex",flexDirection:"column",gap:9,justifyContent:"center",...X(i.ink,i.ink2)},children:[t("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:i.warm},children:"By the numbers"}),d("div",{style:{display:"flex",gap:8},children:[t(hn,{n:"27k",label:"Rigs fitted",tone:i.onInk}),t(hn,{n:"12",label:"Years",tone:i.onInk}),t(hn,{n:"4.9",label:"Avg rating",tone:i.warm})]})]}),testimonials:d("div",{style:{...I,overflow:"hidden",background:i.paper,padding:"10px 11px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center"},children:[t("span",{style:{position:"absolute",right:10,top:2,fontSize:"22.4cqw",lineHeight:1,fontWeight:800,color:i.rust,opacity:.16},children:"\u201D"}),t(ii,{filled:5,size:7}),t("span",{style:{position:"relative",fontSize:"5.31cqw",lineHeight:1.35,color:i.text,fontWeight:600},children:"\u201CTook them out to the Simpson and back. Not one chip.\u201D"}),d("div",{style:{display:"flex",alignItems:"center",gap:5},children:[t(la,{}),t("span",{style:{fontSize:"3.98cqw",color:i.muted},children:"Dave M. \xB7 Hilux N80"})]})]}),reviews:d(q,{title:"Reviews",children:[t("div",{style:{display:"flex",gap:4,height:22},children:[[i.inkSoft,i.inkSoft2],[i.rust,i.warm],[i.ink,i.inkSoft],[i.mark2,i.mark1]].map(([n,r],a)=>t("div",{style:{flex:1,borderRadius:3,...X(n,r,140+a*15)}},a))}),t("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(([n,r,a])=>d("div",{style:{display:"flex",gap:5,alignItems:"flex-start"},children:[t(la,{size:12}),d("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[d("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[t("b",{style:{fontSize:"3.98cqw",color:i.text},children:n}),t(ii,{filled:r})]}),t(ge,{children:a})]})]},n))})]}),logos:d("div",{style:{...I,display:"flex",flexDirection:"column",gap:9,justifyContent:"center",padding:"0 12px",...X(i.ink,i.inkSoft)},children:[t("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:i.warm},children:"As fitted by"}),t("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:8},children:["ARB","TJM","IRONMAN","OPPOSITE"].map(n=>t("span",{style:{textAlign:"center",fontSize:"4.31cqw",fontWeight:800,letterSpacing:"0.08em",color:i.onInk,opacity:.82},children:n},n))})]}),prose:d("div",{style:{...I,background:i.paper,padding:"11px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[t("span",{style:{fontSize:"5.86cqw",fontWeight:700,color:i.text},children:"Why offset matters"}),d("div",{style:{display:"flex",gap:6},children:[t("span",{style:{fontSize:"15.3cqw",lineHeight:.78,fontWeight:800,color:i.rust,marginTop:1},children:"T"}),d("div",{style:{display:"flex",flexDirection:"column"},children:[t(ge,{children:"he number on the back of your wheel decides whether the"}),t(ge,{w:"76%",children:"tyre sits under the guard or an inch outside it."})]})]})]}),cards:t(q,{title:"What you get",children:t("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(([n,r])=>d("div",{style:{border:`1px solid ${i.rule}`,borderRadius:4,padding:6,display:"flex",flexDirection:"column",gap:2},children:[t("span",{style:{width:11,height:11,borderRadius:3,background:i.rust,opacity:.9}}),t("b",{style:{fontSize:"3.98cqw",color:i.text},children:n}),t(ge,{children:r})]},n))})}),faq:t(q,{title:"Questions",children:t("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(([n,r])=>d("div",{style:{borderBottom:`1px solid ${i.rule}`,padding:"4px 2px"},children:[d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6},children:[t("b",{style:{fontSize:"4.31cqw",color:i.text},children:n}),t("span",{style:{fontSize:"4.64cqw",color:i.muted,lineHeight:1},children:r?"\u2212":"+"})]}),r&&t(ge,{w:"90%",children:"Use the fitment finder \u2014 it reads your build, not just the model."})]},n))})}),hero:d("div",{style:{...I,overflow:"hidden",...X(i.ink,i.ink2)},children:[t("div",{style:{...I,background:`linear-gradient(90deg,${i.scrim},transparent 70%)`}}),t("div",{style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",padding:"12px 14px",gap:5},children:t(aa,{over:"NEW \xB7 SUMMER",overTone:i.warm,head:"Built for the worst road you own",cta:"SHOP ALL",ctaBg:i.warm,ctaFg:i.ink,tone:i.onInk})}),t(st,{size:104,style:{right:-24,bottom:-30}})]}),herosingle:d("div",{style:{...I,display:"flex",background:i.paper,overflow:"hidden"},children:[t("div",{style:{flex:1,padding:12,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:t(aa,{over:"ALL-TERRAIN",overTone:i.rust,head:"Grip that does not ask",headSize:12,cta:"EXPLORE",ctaBg:i.text,ctaFg:i.onInk,tone:i.text})}),t("div",{style:{flex:1,position:"relative",...X(i.inkSoft,i.inkSoft2)},children:t(st,{size:74,style:{right:-14,top:16}})})]}),productgrid:t(q,{title:"Best sellers",children:d("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[t(oi,{name:"Ridge 19",price:"$365"}),t(oi,{name:"Ridge 29",price:"$410"}),t(oi,{name:"Ridge 39",price:"$455"})]})}),collections:t(q,{title:"Shop by category",children:t("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Wheels",i.inkSoft,i.inkSoft2],["Tyres",i.rust,i.warm],["Lift kits",i.ink,i.inkSoft]].map(([n,r,a])=>t("div",{style:{borderRadius:4,display:"flex",alignItems:"flex-end",padding:5,color:i.onInk,...X(r,a)},children:t("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.04em"},children:n})},n))})}),producthero:d("div",{style:{...I,display:"flex",background:i.card,overflow:"hidden"},children:[t("div",{style:{flex:1.1,position:"relative",...X(i.paper,i.paper2,150)},children:t(st,{size:78,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),d("div",{style:{flex:1,padding:"10px 10px 10px 8px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[t("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:i.rust},children:"NITTO"}),t("b",{style:{fontSize:"6.29cqw",color:i.text},children:"Ridge Grappler"}),t("span",{style:{fontSize:"6.63cqw",fontWeight:700,color:i.text},children:"$489"}),t("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,background:i.text,color:i.onInk},children:"ADD TO CART"})]})]}),spectable:t(q,{title:"Specifications",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[t(rt,{k:"Diameter",v:'20"'}),t(rt,{k:"Width",v:"9.0J"}),t(rt,{k:"Offset",v:"+12"}),t(rt,{k:"Load",v:"1250 kg"})]})}),fitmenttable:t(q,{title:"Will it fit?",children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[t(rt,{k:"Hilux N80",v:"20\xD79 +12",ok:!0}),t(rt,{k:"Ranger PX3",v:"20\xD79 +12",ok:!0}),t(rt,{k:"LC79",v:"17\xD78 \u221210",ok:!0})]})}),brandstrip:d("div",{style:{...I,background:i.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[t(bn,{children:"Brands we carry"}),t("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:["NITTO","BFG","FUEL","TOYO"].map(n=>t("span",{style:{fontSize:"4.64cqw",fontWeight:800,letterSpacing:"0.1em",color:i.mark2},children:n},n))})]}),processsteps:d("div",{style:{...I,background:i.paper,padding:10,display:"flex",flexDirection:"column",gap:7,justifyContent:"center"},children:[t(bn,{children:"How it works"}),t("div",{style:{display:"flex",gap:6},children:["Pick your rig","Match the fit","We fit it"].map((n,r)=>d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[t("span",{style:{width:11,height:11,borderRadius:"50%",background:i.text,color:i.onInk,fontSize:"3.98cqw",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700},children:r+1}),t("span",{style:{fontSize:"3.98cqw",color:i.text,fontWeight:600},children:n})]},n))})]}),detailrows:t("div",{style:{...I,background:i.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(([n,r,a])=>{let m=t("div",{style:{flex:1,...X(a?i.rust:i.inkSoft,a?i.warm:i.inkSoft2)}},"art"),u=d("div",{style:{flex:1.1,padding:8,display:"flex",flexDirection:"column",gap:2,justifyContent:"center"},children:[t("b",{style:{fontSize:"4.64cqw",color:i.text},children:n}),t("span",{style:{fontSize:"3.98cqw",color:i.muted,lineHeight:1.3},children:r})]},"tx");return t("div",{style:{flex:1,display:"flex",minHeight:0},children:a?[u,m]:[m,u]},n)})}),specstrip:t("div",{style:{...I,background:i.ink,color:i.onInk,display:"flex",alignItems:"center",justifyContent:"space-around",padding:"0 8px"},children:[["5 yr","Warranty"],["Free","Fitting"],["48 hr","Dispatch"]].map(([n,r])=>d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[t("b",{style:{fontSize:"5.69cqw",letterSpacing:"0.02em"},children:n}),t("span",{style:{fontSize:"3.65cqw",color:i.mark2,letterSpacing:"0.1em",textTransform:"uppercase"},children:r})]},r))})},ca={subscribe:d("div",{style:{...I,padding:13,display:"flex",flexDirection:"column"},children:[d("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[d("div",{style:{display:"flex",alignItems:"center",gap:6},children:[t(S,{w:8,h:8,r:2,tone:"accent"}),t(S,{w:38,h:7,r:3,tone:"dark"}),t(S,{w:16,h:7,r:3,tone:"accent"})]}),t(S,{w:38,h:4,r:2,tone:"soft"})]}),t("div",{style:{height:1,background:se.line,marginBottom:10}}),d("div",{style:{flex:1,display:"flex",gap:10,border:`1px solid ${se.line}`,borderRadius:7,padding:10},children:[d("div",{style:{flex:1.1,display:"flex",flexDirection:"column",justifyContent:"center",gap:5},children:[t(S,{w:"46%",h:3,r:2,tone:"accent"}),t(S,{w:"84%",h:8,r:4,tone:"dark"}),t(S,{w:"56%",h:8,r:4,tone:"accent"}),t(S,{w:"96%",h:3,r:2,tone:"soft",style:{marginTop:2}}),d("div",{style:{display:"flex",gap:5,marginTop:4},children:[t("div",{style:{flex:1,height:13,borderRadius:5,border:`1px solid ${se.line}`,background:se.block}}),t(S,{w:34,h:13,r:5,tone:"accent"})]})]}),d("div",{style:{flex:1,background:se.block,borderRadius:6,padding:8,display:"flex",flexDirection:"column",gap:6},children:[t(S,{w:"52%",h:4,r:2,tone:"accent"}),Array.from({length:3}).map((n,r)=>d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,borderTop:r?`1px solid ${se.line}`:"none",paddingTop:r?4:0},children:[t(S,{w:34,h:4,r:2,tone:"dark"}),t(S,{w:16,h:3,r:2,tone:"soft"})]},r))]})]})]}),split:d("div",{style:{...I,display:"flex"},children:[t("div",{style:{width:"44%",background:ni}}),d("div",{style:{flex:1,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[t(S,{w:"44%",h:5,r:3,tone:"accent"}),t(S,{w:"88%",h:8,r:4,tone:"dark"}),t(S,{w:"70%",h:8,r:4,tone:"dark"}),t(S,{w:"94%",h:5,r:2,tone:"soft",style:{marginTop:2}}),t(S,{w:"80%",h:5,r:2,tone:"soft"}),t(S,{w:"40%",h:13,r:6,tone:"accent",style:{marginTop:5}})]})]}),sectionheader:d(pa,{children:[t(S,{w:"18%",h:6,r:3,tone:"accent",style:{position:"absolute",top:15,right:16}}),d("div",{style:{...I,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:10},children:[d("div",{style:{display:"flex",alignItems:"center",gap:9},children:[t(S,{w:16,h:16,r:4,tone:"accent"}),t(S,{w:"20%",h:9,r:4,tone:"dark"})]}),t(S,{w:"62%",h:10,r:5,tone:"dark"}),t(S,{w:"42%",h:6,r:3,tone:"soft"})]})]}),header:t("div",{style:{...I,padding:14,display:"flex",flexDirection:"column",justifyContent:"center"},children:d("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[t(S,{w:"22%",h:12,r:4,tone:"dark"}),d("div",{style:{display:"flex",gap:9,alignItems:"center"},children:[t(S,{w:26,h:6,r:3,tone:"soft"}),t(S,{w:26,h:6,r:3,tone:"soft"}),t(S,{w:26,h:6,r:3,tone:"soft"}),t(S,{w:18,h:14,r:5,tone:"accent"})]})]})}),footer:d("div",{style:{...I,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:12},children:[d("div",{style:{display:"flex",gap:14},children:[d("div",{style:{flex:1.4,display:"flex",flexDirection:"column",gap:6},children:[t(S,{w:"60%",h:9,r:4,tone:"dark"}),t(S,{w:"90%",h:5,r:2,tone:"soft"}),t(S,{w:"70%",h:5,r:2,tone:"soft"})]}),[0,1].map(n=>d("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6},children:[t(S,{w:"50%",h:6,r:3,tone:"dark"}),t(S,{w:"80%",h:5,r:2,tone:"soft"}),t(S,{w:"66%",h:5,r:2,tone:"soft"})]},n))]}),t("div",{style:{height:1,background:se.line}}),d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t(S,{w:"30%",h:5,r:2,tone:"soft"}),t(S,{w:"16%",h:5,r:2,tone:"soft"})]})]}),grid:t("div",{style:{...I,padding:14,display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr",gap:9},children:Array.from({length:4}).map((n,r)=>t("div",{style:{borderRadius:6,background:se.block}},r))}),blanksection:t("div",{style:{...I,padding:14,display:"flex"},children:d("div",{style:{flex:1,border:`1px dashed ${se.line}`,borderRadius:7,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:[t(S,{w:14,h:2,r:1,tone:"tint"}),t(S,{w:2,h:14,r:1,tone:"tint",style:{position:"absolute"}})]})}),spacer:d("div",{style:{...I,padding:14,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[t(S,{w:"100%",h:6,r:3,tone:"soft"}),t(S,{w:16,h:22,r:3,tone:"block",style:{alignSelf:"center"}}),t(S,{w:"100%",h:6,r:3,tone:"soft"})]}),divider:t("div",{style:{...I,padding:14,display:"flex",alignItems:"center"},children:t(S,{w:"100%",h:3,r:2,tone:"dark"})}),customhtml:d("div",{style:{...I,display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:ni},children:[t(S,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(-14deg)"}}),t(S,{w:16,h:10,r:3,tone:"accent"}),t(S,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(14deg)"}})]}),heading:t("div",{style:{...I,padding:14,display:"flex",alignItems:"center"},children:t(S,{w:"64%",h:13,r:4,tone:"dark"})}),text:d("div",{style:{...I,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[t(S,{w:"100%",h:6,r:3,tone:"soft"}),t(S,{w:"96%",h:6,r:3,tone:"soft"}),t(S,{w:"100%",h:6,r:3,tone:"soft"}),t(S,{w:"58%",h:6,r:3,tone:"soft"})]}),image:t("div",{style:{position:"absolute",inset:14,borderRadius:7,background:ni}}),button:t("div",{style:{...I,display:"flex",alignItems:"center",justifyContent:"center"},children:t(S,{w:"34%",h:16,r:8,tone:"accent"})}),menu:d("div",{style:{...I,padding:"14px 22%",display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[t(S,{w:"48%",h:7,r:3,tone:"dark"}),t(S,{w:"82%",h:5,r:2,tone:"soft"}),t(S,{w:"66%",h:5,r:2,tone:"soft"}),t(S,{w:"74%",h:5,r:2,tone:"soft"}),t(S,{w:"58%",h:5,r:2,tone:"soft"})]}),emailform:d("div",{style:{...I,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[t(S,{w:"56%",h:8,r:3,tone:"dark"}),d("div",{style:{display:"flex",gap:6},children:[t("div",{style:{flex:1,height:16,borderRadius:5,border:`1px solid ${se.line}`}}),t(S,{w:"30%",h:16,r:5,tone:"accent"})]})]}),sociallogos:t("div",{style:{...I,display:"flex",alignItems:"center",justifyContent:"center",gap:9},children:[0,1,2,3].map(n=>t(S,{w:16,h:16,r:8,tone:"dark"},n))}),search:t("div",{style:{...I,padding:"0 18%",display:"flex",alignItems:"center"},children:d("div",{style:{flex:1,height:22,borderRadius:11,border:`1px solid ${se.line}`,display:"flex",alignItems:"center",gap:7,padding:"0 9px"},children:[t("div",{style:{width:9,height:9,borderRadius:5,border:`2px solid ${se.dark}`}}),t(S,{w:"46%",h:5,r:2,tone:"soft"})]})}),cart:d("div",{style:{...I,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[t("div",{style:{width:22,height:18,borderRadius:"3px 3px 6px 6px",border:`2px solid ${se.dark}`}}),t("div",{style:{padding:"2px 6px",borderRadius:6,border:`1.5px solid ${se.dark}`},children:t(S,{w:7,h:7,r:2,tone:"dark"})})]}),countryswitch:d("div",{style:{...I,padding:14,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:5},children:[d("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",border:`1px solid ${se.line}`},children:[t(S,{w:22,h:6,r:2,tone:"dark"}),t(S,{w:6,h:4,r:1,tone:"soft"})]}),d("div",{style:{width:"46%",display:"flex",flexDirection:"column",gap:4,padding:6,border:`1px solid ${se.line}`},children:[t(S,{w:"80%",h:4,r:2,tone:"accent"}),t(S,{w:"64%",h:4,r:2,tone:"soft"}),t(S,{w:"72%",h:4,r:2,tone:"soft"})]})]}),legalline:d("div",{style:{...I,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[t("div",{style:{height:1,background:se.line}}),d("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[t(S,{w:"38%",h:5,r:2,tone:"soft"}),d("div",{style:{display:"flex",gap:5},children:[t(S,{w:14,h:5,r:2,tone:"soft"}),t(S,{w:14,h:5,r:2,tone:"soft"}),t(S,{w:14,h:5,r:2,tone:"soft"})]})]})]}),fallback:t("div",{style:{position:"absolute",inset:14,borderRadius:8,background:se.block}})};function eo({type:n}){let r=ed[n]??"",a=td[r]??ca[r]??ca.fallback;return t("div",{className:"sf-thumb","aria-hidden":"true",style:{position:"absolute",inset:0,background:"var(--sf-thumb-thumb-bg)",pointerEvents:"none",containerType:"inline-size"},children:a})}var nd={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"}};function ua(n,r={}){let a=n.categories??{},m=n.components,u=[];for(let[f,b]of Object.entries(a))for(let R of b?.components??[]){let C=m[R];if(!C)continue;let M=C.label??R,A=_t(R,"section",M);u.push({type:R,cat:f,catLabel:ri(n,f),name:A,desc:r[R]??"",...A===M?{}:{alias:M}})}return u}function ri(n,r){return nd[r]?.label??n.categories?.[r]?.title??r}var fa=Gr;function ga(n){return n.find(r=>r.type===fa)??null}function ma(n){return n.filter(r=>r.type!==fa)}var ya={Hero:"Full-screen opener with rotating slides.",HeroSingle:"Full-screen image or video with a headline.",IntroBleed:"Full-bleed intro image the next section scrolls over.",Collections:"Product collections in a tidy grid.",AlloyWheelsListing:"A full product-listing page: filter rail, sortable card grid and pagination, from the live catalog. Choose which product types it shows.",CatalogFilterBar:"Filters the collection grids below it \u2014 a sticky row of Pills (the default), or Columns, one per filter you switch on.",ProductGrid:"Hand-picked products in a tidy grid.",FitmentFinder:"A vehicle picker \u2014 make, model, year and trim resolve the OEM stock fitment live.",Gallery:"Two image galleries with tabs and filters.",GalleryB:"Customer photos in a card grid with a click-to-open lightbox.",SpecStrip:"A thin one-line spec strip \u2014 small-caps items spread across the width, as a dark band or a bare hairline row.",ProductHero:"A product hero \u2014 image beside price, bullets and a buy button.",SpecTable:"A spec sheet \u2014 labeled rows of product specifications.",ProcessSteps:"A heading over columns of image, title, blurb and specs.",DetailRows:"Repeating full-width rows \u2014 eyebrow, title and copy beside a numbered close-up image, alternating sides each row.",FitmentTable:"A fitment table \u2014 per-size bolt patterns, offsets and load ratings, filterable by diameter.",CompatibleTyres:"The current product's compatible tyres \u2014 image, size, key specs and price per tyre, with an inquiry link. Display only.",RelatedProducts:"The current product's related items in a tidy row \u2014 the product page's built-in 'Pair with' cross-sell.",OrderSummary:"A display order-summary panel \u2014 items, totals and a note.",DeliveryOptions:"Delivery tiers as cards \u2014 name, window and price, one highlighted.",PaymentBadges:"A payment-methods trust strip with reassurance lines.",CheckoutCTA:"A centered 'ready to order?' headline with the checkout button.",Manifesto:"A bold brand statement beside a full-height image, with a stat strip.",ParagraphsA:"An editorial text panel with a stat strip and founders' note.",StatsParagraph:"An editorial heading and paragraph over a row of theme-color-accented stat cards.",Chart:"A titled chart \u2014 bars, line or donut \u2014 drawn from your own labeled data points.",Mockup:"A headline beside a stylized product-UI mockup card \u2014 spec sheet, fitment, portal, kanban and more.",Prose:"A plain editorial text section \u2014 eyebrow, heading and body copy.",Timeline:"An editorial aside beside a rail-marked timeline of dated entries.",TimelineTrack:"A horizontal year track of milestones \u2014 company history or roadmap.",Footprint:"A world map of your locations with a legend \u2014 designed here, sold worldwide.",TitleWithButtons:"A big headline beside a stack of call-to-action buttons.",Split:"Side-by-side image and text in two columns.",Cards:"A heading over a grid of free-text title-and-blurb cards.",FAQ:"A frequently-asked-questions accordion with a header.",Testimonials:"Customer quotes in a grid \u2014 the quote, a name and a role.",Masthead:"A journal issue header with a lead statement and contents.",Breadcrumb:"A slim trail showing where the reader is (Home / Journal\u2026).",CategoryBar:"A sticky row of category tabs with counts and links.",FeaturedCover:"A featured article \u2014 big cover image beside a headline and dek.",LongRead:"A long-form article spread with a pull-quote and cover image.",Series:"A section heading over a grid of column cards.",Subscribe:"A newsletter signup beside a list of recent issues.",SubscribeBlogs:"A newsletter signup beside your latest blog posts, pulled live.",Events:"Latest journal posts in a three-card row.",DocMasthead:"A document header \u2014 headline, metadata and standfirst.",DocTabs:"A sticky tab bar to switch between documents.",DocBody:"Long-form document body with an 'On this page' contents list.",DocMetaCards:"A three-up meta strip for the foot of a document.",Banner:"Wide promo strip with background image.",Stats:"Highlight key numbers \u2014 years, designs.",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{Fragment as pd,jsx as Ue,jsxs as to}from"react/jsx-runtime";var ld=n=>`section:${n}`,dd=n=>`block:${n}`,cd=n=>`template:${n}`;function si({blocks:n,blocksOnly:r,at:a,onAdd:m,itemFor:u,session:f,siteWide:b,onClose:R,onHide:C,readOnly:M}){let A=rd(E=>E.config),H=Kr(),[te,Ee]=id([]);od(()=>{let E=!1,J=Es(H);return js.list().then(W=>{if(E)return;let F=A.components;Ee(W.filter(Y=>Y.node?.type&&F[Y.node.type]&&(!J||Ps(Y.node).every(J.offers))))}).catch(()=>{}),()=>{E=!0}},[A,H]);let ae=ha(()=>ua(A,ya),[A]),ve=E=>_t(E,"section",A.components[E]?.label??E),ie=E=>({type:ld(E.type),label:E.name,cover:Ue(eo,{type:E.type}),title:E.desc?`${E.name} \u2014 ${E.desc}`:`Add ${E.name}`,keywords:[E.alias??"",E.desc,E.type,E.catLabel].filter(Boolean)}),pe=ha(()=>{let E=[];if(n&&n.choices.length>0&&ws(n.choices).forEach((F,Y)=>{E.push({title:Y===0?`Inside ${n.parentName}${F.group?` \xB7 ${F.group}`:""}`:F.group??"",tiles:F.items.map(ue=>({type:dd(ue.type),label:ue.label,icon:Ue(be,{type:ue.type,size:18}),title:`Add ${ue.label}`}))})}),r)return E;let J=ga(ae);J&&E.push({title:"Start blank",tiles:[ie(J)]}),te.length>0&&E.push({title:"Your templates",tiles:te.map(F=>({type:cd(F.id),label:F.name,cover:Ue(eo,{type:F.node.type}),keywords:[ve(F.node.type),F.node.type]}))});let W=ma(ae);for(let F of Object.keys(A.categories??{})){let Y=W.filter(ue=>ue.cat===F);Y.length!==0&&E.push({title:ri(A,F),tiles:Y.map(ie)})}return E},[n,r,te,ae,A]),ze=E=>{let J=E.indexOf(":"),W=E.slice(0,J),F=E.slice(J+1);if(W==="section")return{kind:"section",type:F};if(W==="block")return{kind:"block",type:F};if(W==="template"){let Y=te.find(ue=>ue.id===F);return Y?{kind:"template",template:Y}:null}return null};return to(pd,{children:[Ue(bt,{icon:Ue(ad,{size:15}),title:"Add",context:r?"Blocks for this place":"Sections and blocks",actions:Ue(qs,{label:"Done",description:"Close Add and go back",onClick:R}),onHide:C}),to("div",{className:"sf-addside sf-scroll",children:[Ue(sd,{groups:pe,session:f,itemFor:E=>u(ze(E)??{kind:"section",type:E}),onInsert:E=>{let J=ze(E);J&&m(J)},at:a,hint:r?"Drag into the page, or click to add.":"Drag onto the page, or click to add.",searchLabel:r?"Search blocks":"Search sections",readOnly:M}),b&&!r?to("div",{className:"sf-addside-sitewide",children:[Ue("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:Ue(be,{type:"chat",size:16})}),to("button",{type:"button",className:"sf-addside-sitewide-name",onClick:b.onOpenChat,children:["Live chat",Ue("span",{className:"sf-addside-sitewide-desc",children:"A chat bubble on every page"})]}),Ue(ls,{value:b.chatEnabled,onChange:b.onToggleChat,label:"Show the chat bubble on the whole site"})]}):null]})]})}import{useCallback as ud,useEffect as ba,useMemo as va,useState as At}from"react";import{InspectorIconButton as fd}from"efficient-easel/chrome";import{AddIcon as gd}from"efficient-easel/icons";import{PagesIcon as md}from"efficient-easel/rail";import{jsx as D,jsxs as Re}from"react/jsx-runtime";var yd={cart:Re("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[D("circle",{cx:"9",cy:"20",r:"1.4"}),D("circle",{cx:"18",cy:"20",r:"1.4"}),D("path",{d:"M2 3h2.2l2.1 12.3a1.6 1.6 0 0 0 1.6 1.3h8.6a1.6 1.6 0 0 0 1.6-1.2L21.5 7H5.3"})]}),checkout:Re("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[D("rect",{x:"2.5",y:"5",width:"19",height:"14",rx:"2"}),D("path",{d:"M2.5 9.5h19"})]})},xa="sf-editor-pages-collapsed-groups",hd=n=>n.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),Sa=(n,r)=>{let a=hd(n)||"page";if(!r.has(a))return a;let m=2;for(;r.has(`${a}-${m}`);)m+=1;return`${a}-${m}`};function ai({onNavigate:n,onClose:r,activeSurface:a,onPreviewSurface:m}){let u=Ft(),{adapter:f,capabilities:b,ready:R,currentSlug:C}=qt(),M=Xn(),[A,H]=At(null),[te,Ee]=At(""),[ae,ve]=At(!1),[ie,pe]=At(null),[ze,E]=At(!1),[J,W]=At(""),F=ud(async()=>{if(R)try{H(await f.listPages())}catch{H([])}},[f,R]);ba(()=>{H(null),F()},[F]);let[Y,ue]=At(()=>{if(typeof window>"u")return new Set;try{let x=window.localStorage.getItem(xa);return new Set(x?JSON.parse(x):[])}catch{return new Set}});ba(()=>{try{window.localStorage.setItem(xa,JSON.stringify([...Y]))}catch{}},[Y]);let k=x=>ue(ne=>{let w=new Set(ne);return w.has(x)?w.delete(x):w.add(x),w}),j=va(()=>Vr(A??[]),[A]),V=te.trim().toLowerCase(),Q=x=>!V||x.toLowerCase().includes(V),_e=x=>V?!0:!Y.has(x),Ce=va(()=>new Set((A??[]).map(x=>x.slug)),[A]),ye=()=>{if(b.pageCreationInAdminForm){u.send("storefront-editor:new-page");return}W(""),pe(null),E(!0)},fe=async()=>{let x=J.trim();if(!(!x||!R||ae||!f.createPage)){ve(!0),pe(null);try{let ne=await f.createPage({slug:Sa(x,Ce),title:x,layout:{}});await F(),E(!1),W(""),n(ne.slug)}catch{pe("Couldn\u2019t add the page \u2014 please retry.")}finally{ve(!1)}}},G=async x=>{if(!(!R||ae||!f.deletePage||(A??[]).length<=1)){ve(!0);try{await f.deletePage(x.id);let ne=(A??[]).filter(w=>w.id!==x.id);H(ne),pe(null),x.slug===C&&ne[0]&&n(ne[0].slug)}catch{pe("Couldn\u2019t delete the page \u2014 please retry.")}finally{ve(!1)}}},Oe=x=>u.send("storefront-editor:open-page",{slug:x}),ee=x=>{if(!Q(x.label))return null;let ne=!a&&x.slug===C,w=b.canDeletePagesInline&&(A??[]).length>1;return Re("div",{className:`sf-row sf-prow ${ne?"is-selected":""}`,onClick:()=>n(x.slug),children:[D("span",{className:"sf-chip",children:D(bd,{})}),D("span",{className:"sf-row-name",children:x.label}),qr(x)&&D("span",{className:"sf-badge-dynamic",children:"Dynamic"}),x.kind==="lightbox"&&D("span",{className:"sf-badge-lightbox",children:"Lightbox"}),x.draft&&D("span",{className:"sf-page-draft",children:"draft"}),b.pageCreationInAdminForm&&D("button",{type:"button",className:"sf-page-edit",title:`Edit \u201C${x.label}\u201D in the admin`,"aria-label":`Edit ${x.label} in the admin`,onClick:Ye=>{Ye.stopPropagation(),Oe(x.slug)},children:D(We,{name:"pencil",size:13,strokeWidth:1.7,rounded:!0})}),w&&D("button",{type:"button",className:"sf-page-edit sf-page-edit--danger",disabled:ae,title:`Delete \u201C${x.label}\u201D`,"aria-label":`Delete ${x.label}`,onClick:Ye=>{Ye.stopPropagation(),G(x)},children:D(We,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]},x.id)},lt=(x,ne,w)=>{let Ye=w.filter(Boolean);if(Ye.length===0)return null;let U=_e(x);return Re("div",{className:"sf-pgroup",children:[Re("button",{type:"button",className:"sf-pgroup-head","aria-expanded":U,onClick:()=>k(x),children:[D(We,{name:"chevron-right",size:10,strokeWidth:2.6,rounded:!0,style:{transform:U?"rotate(90deg)":"none",transition:"transform 0.14s"}}),D("span",{className:"sf-pgroup-label",children:ne}),D("span",{className:"sf-pgroup-count",children:Ye.length})]}),U&&D("div",{className:"sf-pgroup-body",children:Ye})]},x)},xe=ks.filter(x=>Q(x.label)).map(x=>{let ne=a===x.key;return Re("div",{className:`sf-row sf-prow sf-prow--shop ${ne?"is-selected":""}`,onClick:()=>m(x.key),title:`Preview the ${x.label} in the canvas`,children:[D("span",{className:"sf-chip",children:yd[x.key]}),D("span",{className:"sf-row-name",children:x.label}),D("span",{className:"sf-badge-preview",children:"Preview"}),D("a",{className:"sf-page-edit",href:x.href,target:"_blank",rel:"noopener noreferrer",title:`Open the ${x.label} in a new tab`,"aria-label":`Open the ${x.label} in a new tab`,onClick:w=>w.stopPropagation(),children:D(We,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})})]},x.key)}),he=(()=>{if(A===null)return null;let x=[],ne=!1;for(let w of j)b.hasSiteSettings&&!ne&&w.key.startsWith("system:")&&(x.push(lt("shop","Shop",xe)),ne=!0),x.push(lt(w.key,w.label,w.rows.map(ee)));return b.hasSiteSettings&&!ne&&x.push(lt("shop","Shop",xe)),x})();return Re("div",{className:"sf-pages",children:[D(bt,{icon:D(md,{}),title:"Pages",context:M,actions:D(fd,{label:"New page",onClick:ye,children:D(gd,{size:15})}),onHide:r}),Re("div",{className:"sf-pages-search",children:[D(We,{name:"search",size:14,rounded:!0}),D("input",{type:"search",className:"sf-pages-search-input",placeholder:"Search all pages\u2026",value:te,onChange:x=>Ee(x.target.value),"aria-label":"Search all pages"})]}),Re("div",{className:"sf-pages-list sf-scroll",children:[ie&&!ze&&D("div",{className:"sf-note sf-note--error",role:"alert",children:ie}),he===null?D("div",{className:"sf-note",children:"Loading\u2026"}):he.some(Boolean)?he:D("div",{className:"sf-note",children:te.trim()?"No pages match your search":"No pages yet"})]}),Re("button",{type:"button",className:"sf-pages-new",onClick:ye,children:[D("span",{className:"sf-plus",children:"+"}),"New page"]}),ze&&D("div",{className:"fixed inset-0 z-[200] flex items-center justify-center bg-black/30 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"sf-add-page-title",onClick:()=>E(!1),children:Re("div",{className:"w-full max-w-sm rounded-lg bg-white p-5 shadow-xl",onClick:x=>x.stopPropagation(),children:[D("h2",{id:"sf-add-page-title",className:"text-[15px] font-semibold text-zinc-900",children:"Add a page"}),D("p",{className:"mt-1 text-[13px] leading-relaxed text-zinc-600",children:"Give the new template page a name. It starts blank \u2014 add sections once it opens."}),D("input",{autoFocus:!0,value:J,onChange:x=>W(x.target.value),onKeyDown:x=>{x.key==="Enter"&&fe(),x.key==="Escape"&&E(!1)},placeholder:"e.g. About",className:"mt-3 w-full rounded-md border border-zinc-300 px-3 py-2 text-[13px] text-zinc-900 outline-none focus:border-blue-500"}),J.trim()&&Re("p",{className:"mt-1.5 text-[12px] text-zinc-400",children:["URL: /",Sa(J,Ce)]}),ie&&D("p",{className:"mt-2 text-[12px] text-red-600",role:"alert",children:ie}),Re("div",{className:"mt-4 flex justify-end gap-2",children:[D("button",{type:"button",onClick:()=>E(!1),className:"rounded-md border border-zinc-300 px-3 py-[7px] text-[13px] font-medium text-zinc-700 transition-colors hover:bg-zinc-100",children:"Cancel"}),D("button",{type:"button",onClick:()=>{fe()},disabled:ae||!J.trim(),className:"rounded-md bg-blue-600 px-3 py-[7px] text-[13px] font-medium text-white transition-colors hover:bg-blue-700 disabled:opacity-60",children:ae?"Adding\u2026":"Add page"})]})]})})]})}function bd(){return Re("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[D("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"}),D("path",{d:"M14 3v5h5"})]})}import{StylesIcon as vd}from"efficient-easel/rail";import{jsx as vn,jsxs as xd}from"react/jsx-runtime";function li({tokenRef:n,siteId:r,onClose:a,onNotify:m,tab:u,onTabChange:f}){let b=Xn();return xd("div",{className:"sf-styles",children:[vn(bt,{icon:vn(vd,{}),title:"Site styles",context:vn("span",{title:`${b} \u2014 renamed in the Console: Storefront \u25B8 Sites \u25B8 Settings.`,children:b}),onHide:a}),vn("div",{className:"sf-insp-body sf-scroll",children:vn(Ys,{tokenRef:n,siteId:r,onNotify:m,tab:u,onTabChange:f})})]})}import{useEffect as wa,useMemo as Cd,useRef as Ca,useState as Td}from"react";import{useTreeDrag as Id}from"efficient-easel/drag";import{useCallback as Sd,useEffect as kd,useState as wd}from"react";function ka(n,r,a=!0){let[m,u]=wd(null),f=Sd(async()=>{let b=n.current;if(b)try{u(await jn.listPages(b,r))}catch{u([])}},[n,r]);return kd(()=>{if(!a||m!==null)return;if(n.current){f();return}let b=setInterval(()=>{n.current&&(clearInterval(b),f())},300);return()=>clearInterval(b)},[a,m,f,n]),{pages:m,reload:f}}import{jsx as Z,jsxs as Qe}from"react/jsx-runtime";var Ta=n=>n===Fe||n===oe;function Pd(n,r){return(n??[]).map((a,m)=>({id:String(a.props?.id??`${a.type}-${m}`),type:a.type,label:r(a.type),hidden:!!a.props?._hidden,pinned:Ta(a.type)}))}function Rd(n,r,a){if(r===a||r<0||r>=n.length)return null;let m=n[0]?.type===Fe?1:0,u=n[n.length-1]?.type===oe?n.length-1:n.length;if(r<m||r>=u)return null;let f=Math.max(m,Math.min(a,u)),b=n.slice(),[R]=b.splice(r,1);return b.splice(f>r?f-1:f,0,R),b.every((C,M)=>C===n[M])?null:b}function di({tokenRef:n,siteId:r,currentSlug:a,liveContent:m,labelForType:u,onOpenPage:f,onClose:b,pages:R}){let C=Ft(),{pages:M,reload:A}=ka(n,r,R===void 0),H=R??M;wa(()=>{let k=j=>{j.key==="Escape"&&b()};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[b]),wa(()=>{let k=document.activeElement;return ae.current?.focus(),()=>k?.focus?.()},[]);let[te,Ee]=Td({}),ae=Ca(null),ve=Ca({}),ie=Cd(()=>H?jr(H.filter(k=>k.slug!==pn)):[],[H]),pe=k=>{if(k.slug===a)return m;if(te[k.id])return te[k.id];let j=k.layout?.content;return Array.isArray(j)?j:[]},ze=k=>Ee(j=>{let{[k]:V,...Q}=j;return Q}),E=(k,j,V)=>{let Q=n.current;if(!Q)return;let _e=Rd(pe(k),j,V);if(!_e)return;Ee(ye=>({...ye,[k.id]:_e}));let Ce=Zr({...k.layout,content:_e});jn.saveLayout(k.id,Ce,Q,ve.current[k.id]??k.updated_at??"").then(ye=>(ye?.updated_at&&(ve.current[k.id]=ye.updated_at),A())).then(()=>ze(k.id)).catch(()=>{delete ve.current[k.id],ze(k.id),A()})},J=(k,j)=>{if(k.slug===a)return!1;let V=pe(k)[j]?.type;return V!==void 0&&!Ta(V)},W=Id({keyOf:k=>`${k.pageId}:${k.index}`,canDrop:(k,j)=>j.parentId===k.pageId,onDrop:(k,j)=>{let V=H?.find(Q=>Q.id===k.pageId);V&&E(V,k.index,j.index)},onStep:(k,j)=>{let V=H?.find(Q=>Q.id===k.pageId);V&&E(V,k.index,j<0?k.index-1:k.index+2)}}),F=()=>C.send("storefront-editor:new-page"),Y=k=>C.send("storefront-editor:open-page",{slug:k}),ue=k=>{let j=k.slug===a,V=Pd(pe(k),u);return Qe("div",{className:`sf-sm-card ${j?"is-open":""}`,children:[Qe("div",{className:"sf-sm-card-head",children:[Z("button",{type:"button",className:"sf-sm-card-title",title:`Open \u201C${un(k)}\u201D`,onClick:()=>f(k.slug),children:Z("span",{className:"sf-sm-card-name",children:un(k)})}),!k.is_published&&Z("span",{className:"sf-sm-draft",children:"Draft"}),Z("button",{type:"button",className:"sf-sm-edit",title:`Edit \u201C${un(k)}\u201D in the admin`,"aria-label":`Edit ${un(k)} in the admin`,onClick:()=>Y(k.slug),children:Z(We,{name:"pencil",size:13,strokeWidth:1.7,rounded:!0})})]}),Z("div",{className:"sf-sm-secs",children:V.length===0?Z("div",{className:"sf-sm-empty",children:"No sections yet"}):V.map((Q,_e)=>{let Ce=J(k,_e),ye=W.row({item:{pageId:k.id,index:_e},place:{parentId:k.id,slot:"content",index:_e},canDrag:Ce}),fe=ye.drop==="before"&&!ye.dragging,G=ye.drop==="after"&&!ye.dragging;return Qe("div",{className:`sf-sm-sec ${Q.hidden?"is-hidden":""} ${Q.pinned?"is-pinned":""} ${ye.dragging?"is-dragging":""} ${fe?"is-over-before":""} ${G?"is-over-after":""}`,...Ce?ye.rowProps:{},title:Ce?"Drag to reorder \xB7 \u2325\u2191 \u2325\u2193":Q.pinned?"Pinned":"Open in the editor to reorder",children:[Ce&&Z("button",{type:"button",className:"sf-sm-grip","aria-label":`Reorder ${Q.label} \u2014 drag the row, or press Alt+\u2191 / Alt+\u2193`,"aria-keyshortcuts":"Alt+ArrowUp Alt+ArrowDown",title:"Drag to reorder \xB7 \u2325\u2191 \u2325\u2193",onClick:Oe=>Oe.stopPropagation(),children:"\u22EE\u22EE"}),Z("span",{className:"sf-sm-sec-chip",children:Z(be,{type:Q.type,size:13})}),Z("span",{className:"sf-sm-sec-name",children:Q.label}),Q.hidden&&Z("span",{className:"sf-sm-sec-eye",title:"Hidden",children:Z(We,{name:"eye-off",size:13,rounded:!0})})]},Q.id)})}),j&&Z("div",{className:"sf-sm-editing",children:"Editing here"})]},k.id)};return Qe("div",{className:"sf-sitemap",role:"dialog","aria-modal":"true","aria-label":"Visual sitemap",tabIndex:-1,ref:ae,children:[Qe("div",{className:"sf-sm-head",children:[Z("span",{className:"sf-sm-title",children:"Visual sitemap"}),Qe("div",{className:"sf-sm-head-actions",children:[Qe("button",{type:"button",className:"sf-sm-newpage",onClick:F,children:[Z("span",{className:"sf-plus","aria-hidden":"true",children:"+"})," New page"]}),Z("button",{type:"button",className:"sf-x",title:"Close sitemap","aria-label":"Close sitemap",onClick:b,children:"\u2715"})]})]}),Z("div",{className:"sf-sm-body sf-scroll",children:H===null?Z("div",{className:"sf-note",children:"Loading\u2026"}):ie.length===0?Z("div",{className:"sf-note",children:"No pages yet"}):ie.map(({key:k,group:j,pages:V})=>Qe("section",{className:"sf-sm-group",children:[Z("div",{className:"sf-sm-group-title",children:j??_r}),Qe("div",{className:"sf-sm-grid",children:[V.map(ue),!j&&Qe("button",{type:"button",className:"sf-sm-addcard",onClick:F,children:[Z("span",{className:"sf-sm-addcard-plus","aria-hidden":"true",children:"+"}),Z("span",{children:"New page"})]})]})]},k))})]})}import{useEditor as Dd}from"efficient-easel/editor";function Ed(n){return n.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim()}function Ad(n){let r=[],a=/<h([1-6])\b[^>]*>([\s\S]*?)<\/h\1>/gi,m;for(;m=a.exec(n);)r.push({level:Number(m[1]),text:Ed(m[2])||"(empty)"});return r}var Nd=new Set(["SubmitBuild"]),Ld={AlloyWheelsListing:1,DocMasthead:1,AppointmentBooking:2,BookingBox:2,SubmitBox:2,Banner:2,BundleOffer:2,Cards:2,Chart:2,CheckoutCTA:2,CollectionCard:3,Collections:2,CompatibleTyres:2,ContactLocations:2,ContactRouting:2,DeliveryOptions:2,DetailRows:2,DocBody:2,EuTyreLabel:2,Events:2,FAQ:2,FeaturedCover:2,FitmentFinder:2,FitmentTable:2,FooterEmailSignup:4,FooterMenu:4,Footprint:2,Form:2,Gallery:2,GalleryB:2,GalleryItem:2,Integrations:2,IntroBleed:2,KeyFeatures:2,Logos:2,LongRead:2,Manifesto:2,Mockup:2,OrderSummary:2,PostCard:2,ProcessSteps:2,ProductGrid:2,Prose:2,RelatedProducts:2,ReviewForm:2,Reviews:2,SectionHeader:2,Series:2,SpecTable:2,Split:2,StatsParagraph:2,SubmitBuild:2,Subscribe:2,SubscribeBlogs:2,Testimonials:2,Timeline:2,TimelineTrack:2,TitleWithButtons:2,TyreFitment:2,TyreSizes:2};function ci(n,r){let a=[];for(let m of n??[]){let u=m,f=u.props??{};switch(u.type){case"Heading":{let{text:b,hidden:R}=qn(f.text);if(R)break;a.push({level:Number(f.level)||2,text:b||"(empty heading)"})}break;case"Hero":a.push({level:1,text:"Hero (brand headline)"});break;case"CustomHTML":a.push(...Ad(qn(f.html).text));break;default:{let b=Ld[u.type??""],R=qn(f.title??f.heading),C=R.text.trim();if(!b||R.hidden)break;C?a.push({level:b,text:C}):Nd.has(u.type??"")&&a.push({level:b,text:String(u.type)});break}}for(let b of Vn(r,u.type??"")){let R=f[b];Array.isArray(R)&&a.push(...ci(R,r))}}return a}import{jsx as Gt,jsxs as no}from"react/jsx-runtime";function pi(){let{appState:n,config:r}=Dd(f=>f),a=n?.data,m=ci(a?.content??[],r),u=m.filter(f=>f.level===1).length;return no("div",{className:"px-4 py-3 text-[13px] text-zinc-600",children:[no("div",{className:"mb-2 flex items-center justify-between text-[11px] font-semibold uppercase tracking-wide text-zinc-500",children:[Gt("span",{children:"Heading outline"}),Gt("span",{children:m.length})]}),u!==1&&Gt("div",{className:"mb-2 rounded bg-amber-50 px-2 py-1 text-[12px] text-amber-700",children:u===0?"No H1 \u2014 add one for SEO.":`${u} H1s \u2014 a page should have exactly one.`}),m.length===0?Gt("p",{className:"text-zinc-400",children:"No headings yet."}):Gt("ul",{className:"space-y-1",children:m.map((f,b)=>no("li",{className:"flex items-baseline gap-2",style:{paddingLeft:`${(f.level-1)*12}px`},children:[no("span",{className:"shrink-0 font-mono text-[11px] text-zinc-400",children:["H",f.level]}),Gt("span",{className:"truncate text-zinc-700",children:f.text})]},b))})]})}var zd=new Set(["BookingBox","SubmitBox"]);function Kt(n){return typeof n=="string"&&zd.has(n)}import{useCallback as Ia,useState as Od}from"react";import{EditorContextMenu as Bd}from"efficient-easel/menu";import{AddIcon as Md,CopyIcon as Pa,LayersIcon as Hd,PasteIcon as Ea,RedoIcon as $d,SettingsIcon as Fd,UndoIcon as Wd}from"efficient-easel/icons";import{ROOT_ID as _d,ROOT_SLOT as qd,zoneKey as Aa}from"efficient-easel/data";import{createNodeClipboard as jd,nodeMenuItems as Vd}from"efficient-easel/node-ops";import{styleMenuItems as Gd}from"efficient-easel/style-clipboard";import{framePointToHost as Kd,useCanvasEvent as ui}from"efficient-easel/canvas";import{jsx as et}from"react/jsx-runtime";function Ud(n,r){let a=[],m=new Set,u={zone:r.zone,index:r.index};for(;u;){let f=n.nodeAt(u.zone,u.index);if(!f||m.has(f.props.id)||(m.add(f.props.id),a.push({zone:u.zone,index:u.index,node:f,parentType:null}),u.zone===P))break;let b=u.zone.lastIndexOf(":");if(b<=0)break;u=n.locate(u.zone.slice(0,b))}for(let f=0;f<a.length-1;f+=1)a[f].parentType=a[f+1].node.type;return a}var Na=jd();function La(n,r,a){if(r===P){let{floor:u,cap:f}=n.sectionBand();return{parentId:_d,slot:qd,index:Math.min(Math.max(a,u),f)}}let m=r.lastIndexOf(":");return{parentId:r.slice(0,m),slot:r.slice(m+1),index:a}}function Yd(n,r){let{zone:a,index:m}=r,u=n.nodeAt(a,m);if(!u)return[];let f=u.props.id,b=n.labelOf(u.type,a),R=!!u.props._hidden,C=n.nodeOps,M=n.isPinned(u,a),A=Kt(u.type),H=!M&&!A&&!Fr(n.document,u),te=Ud(n,r),Ee=C.held,ae=Ee&&!M&&Aa(Ee.from)===a?La(n,a,m+1):null,ve=n.style?Gd({held:n.style.held(),canCopy:n.style.canCopy(u,a),onCopy:()=>n.style?.copy(u,a),onPaste:()=>n.style?.paste(a,m,u)}):[];return Vd({title:b,layer:{group:"pick",items:te.map((ie,pe)=>({label:n.rowNameOf(ie.node,ie.zone),checked:pe===0,onClick:()=>n.selectAt(ie.zone,ie.index,ie.node.props.id,ie.parentType)}))},actions:{addInside:Pe(u.type)?()=>n.openAddInside(a,m):void 0,duplicate:H?()=>C.duplicate(f):void 0,moveUp:C.canStep(f,-1)?()=>C.step(f,-1):void 0,moveDown:C.canStep(f,1)?()=>C.step(f,1):void 0,copy:M?void 0:()=>C.copy(f,b),cut:H?()=>C.cut(f,b):void 0,paste:Ee&&ae?{label:Ee.label,run:()=>C.paste(ae)}:void 0,rename:n.renamePropOf(u,a)?()=>n.beginRename(a,m):void 0,hide:!A&&!M?{hidden:R,run:()=>C.setProps(f,{_hidden:!R})}:void 0,delete:H?()=>C.remove(f):void 0},style:ve,pinnedLine:M?"Pinned \u2014 can\u2019t be moved or deleted":void 0})}function Xd(n){let r=[];n.history.hasPast&&r.push({label:"Undo",icon:et(Wd,{}),shortcut:"\u2318Z",onClick:n.history.back}),n.history.hasFuture&&r.push({label:"Redo",icon:et($d,{}),shortcut:"\u21E7\u2318Z",onClick:n.history.forward});let a=[{label:"Add section",icon:et(Md,{}),onClick:n.openAddSection}],m=n.nodeOps.held;if(m&&Aa(m.from)===P){let R=La(n,P,n.sectionBand().cap);a.push({label:`Paste ${m.label}`,icon:et(Ea,{}),shortcut:"\u2318V",onClick:()=>n.nodeOps.paste(R)})}let u=[{label:"Page settings",icon:et(Fd,{}),onClick:n.openPageSettings},{label:"Collapse all layers",icon:et(Hd,{}),onClick:n.collapseAll}],f=[r,a,u].filter(R=>R.length>0),b={label:"\u2014",onClick:()=>{}};return f.flatMap((R,C)=>C?[b,...R]:R)}function Zd(n,r){let a=r.selectionStart??0,m=r.selectionEnd??0,u=r.value.slice(a,m),f=A=>{r.focus(),r.setRangeText(A,a,m,"end"),r.dispatchEvent(new Event("input",{bubbles:!0}))},b=[];u&&(b.push({label:"Copy",icon:et(Pa,{}),shortcut:"\u2318C",onClick:()=>navigator.clipboard?.writeText(u)}),b.push({label:"Cut",icon:et(Pa,{}),shortcut:"\u2318X",onClick:()=>{navigator.clipboard?.writeText(u),f("")}})),b.push({label:"Paste",icon:et(Ea,{}),shortcut:"\u2318V",onClick:()=>{navigator.clipboard?.readText().then(A=>{A&&f(A)}).catch(()=>n.onPasteRefused())}});let R=r.value?[{label:"Select all",shortcut:"\u2318A",onClick:()=>{r.focus(),r.select()}}]:[],C=[b,R].filter(A=>A.length>0),M={label:"\u2014",onClick:()=>{}};return C.flatMap((A,H)=>H?[M,...A]:A)}function Jd(n){let r=n?.closest?.("input, textarea");return!r||r instanceof HTMLInputElement&&!["text","search","url","email","tel","number",""].includes(r.type)?null:r}function Ra(n){return n.shiftKey}function Da(n,r){let[a,m]=Od(null),u=Ia(()=>m(null),[]),f=Ia(C=>{if(Ra(C))return;let M=C.target,A=Jd(M);if(A){C.preventDefault(),m({kind:"input",x:C.clientX,y:C.clientY,el:A});return}let H=M?.closest?.("[data-node-id]")?.getAttribute("data-node-id"),te=H?n.locate(H):null;C.preventDefault(),m(te?{kind:"node",x:C.clientX,y:C.clientY,...te}:{kind:"empty",x:C.clientX,y:C.clientY})},[n]);ui(r,"contextmenu",C=>{if(Ra(C)||!r)return;let A=(C.target?.closest?.("[data-puck-component]")??null)?.getAttribute("data-puck-component"),H=A?n.locate(A):null;C.preventDefault();let te=Kd(r.frame,C.clientX,C.clientY);m(H?{kind:"node",...te,...H}:{kind:"empty",...te})}),ui(r,"mousedown",u),ui(r,"scroll",u,{on:"window"});let R=a?et(Bd,{x:a.x,y:a.y,items:a.kind==="node"?Yd(n,a):a.kind==="input"?Zd(n,a.el):Xd(n),onClose:u}):null;return{onEditorContextMenu:f,menu:R,closeMenu:u}}function za(n,r){let a=!1,m={...n.props};for(let u of r){let f=Array.isArray(n.props[u])?n.props[u]:[],b=new Set,R=f.filter(C=>{let M=C?.props?.id;return!M||b.has(M)?!1:(b.add(M),!0)});R.length!==f.length&&(m[u]=R,a=!0)}return a?m:null}var Qd=".es-tree",ec=".es-tree-row.is-selected";function Oa(n,r,a){return!n||!r?!1:n.index===r.index&&(n.zone??a)===(r.zone??a)}function tc(n,r){if(typeof n.getBoundingClientRect!="function"||typeof r.getBoundingClientRect!="function")return!1;let a=n.getBoundingClientRect(),m=r.getBoundingClientRect();return!a.height||!m.height?!1:m.top>=a.top&&m.bottom<=a.bottom}function Ba(n=typeof document>"u"?void 0:document){let r=n?.querySelector(Qd),a=r?.querySelector(ec);return a?(tc(r,a)||a.scrollIntoView({block:"center",inline:"nearest"}),!0):!1}function Ma(n,r){return n.kind==="part"?n.nodeId??null:n.kind!=="puck"||r==null?null:String(r)}import{useEffect as $a,useState as Fa}from"react";var nc=/^(localhost|(?:[a-z0-9-]+\.)+localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\]|::1)$/i;function fi(n){return!!n&&nc.test(n)}function Ha(n){let{pageSlug:r,siteSlug:a,hostname:m}=n,u=r===Wr?"/":`/${encodeURIComponent(r)}`;if(!fi(m))return u;let f=a?.trim();return f?`${u}?site=${encodeURIComponent(f)}`:u}function Wa(n){let{pageSlug:r,siteId:a,token:m}=n,[u,f]=Fa(null),[b,R]=Fa(null),C=zr();$a(()=>R(C?new URL(C).hostname:window.location.hostname),[C]),$a(()=>{if(!fi(b)||!a||!m){f(null);return}let A=!1;return _s(m,a).then(H=>{A||f(H)}),()=>{A=!0}},[b,a,m]);let M=Ha({pageSlug:r,siteSlug:u,hostname:b});return C?`${C}${M}`:M}var _a="sf-editor-left-view";function qa(){if(typeof window>"u")return"pages";try{let n=window.localStorage.getItem(_a);return n==="sections"||n==="styles"||n==="media"?n:"pages"}catch{return"pages"}}function ja(n){if(!(typeof window>"u"))try{window.localStorage.setItem(_a,n)}catch{}}function Va(n,r,a=!1){return n==="styles"&&!r||n==="media"&&!a?"sections":n}function Ga(n,r){return n?"sections":r}import{jsx as Ka}from"react/jsx-runtime";var oc="M6 3h12a1 1 0 0 1 1 1v17l-7-4-7 4V4a1 1 0 0 1 1-1z";function gi({size:n=15,className:r,strokeWidth:a=1.7}){return Ka("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",className:r,"aria-hidden":"true",focusable:"false",children:Ka("path",{d:oc})})}var ic="Save your page changes first";function Ua(n){return n.hasTrustedConsole?n.canCreatePlatformTemplate?!n.capabilities.canPublish||!n.capabilities.hasSiteSettings?{visible:!1,hiddenReason:"not-a-site-page"}:n.siteId?n.hasUnsavedEdits?{visible:!0,enabled:!1,disabledReason:ic}:{visible:!0,enabled:!0}:{visible:!1,hiddenReason:"no-site"}:{visible:!1,hiddenReason:"not-operator"}:{visible:!1,hiddenReason:"no-console"}}var Ya="storefront-editor:save-as-template";import{heldStyle as zc,styleShortcut as Oc}from"efficient-easel/style-clipboard";import{BLOCK_SELECTOR as Bc,useCanvasEvent as Mc,useCanvasFrame as Hc}from"efficient-easel/canvas";import{createNode as $c,DataError as Fc,newId as Wc,parseZoneKey as xt,ROOT_ID as _c,ROOT_SLOT as qc,zoneKey as tt}from"efficient-easel/data";import{CanvasDragLayer as jc,createDragSession as Vc,gapToMoveIndex as Gc,useTreeDrag as vi}from"efficient-easel/drag";import{toItemSelector as Kc,useNodeOps as Uc}from"efficient-easel/node-ops";import{useEditor as Yc,useEditorApi as Xc}from"efficient-easel/editor";import{fieldKind as rc,STYLE_KIND as Xa,copyStyle as sc,heldStyle as ac,pasteMessage as lc,planPaste as dc}from"efficient-easel/style-clipboard";var cc=new Set([Gn.Style,Gn.Layout]),pc=new Set(Object.values(Gn)),uc=new Set(Object.keys(as())),fc=new Set(["focal","imageFocal"]),gc=[ds,Lr,Dr];function Za(n){return`site:${n??""}`}function mc(n){if(!n||typeof n!="object")return null;let r=n,a=Mo(n)??n,m=r[Xa]??a[Xa];if(typeof m=="string")return m;let u=r.options??a.options;return Array.isArray(u)?`choice:${u.map(b=>String(b?.value)).sort().join("|")}`:rc(a)}function yc(n){let r=n,a=Mo(n);return gc.some(m=>m in r||a&&m in a)}function oo(n,r){let a=Zs(n,r)??{},m=[],u=!1;for(let[f,b]of Object.entries(a)){if(pc.has(f)){u=cc.has(f);continue}!u||!b||typeof b!="object"||f.startsWith("_")||ss(b)||uc.has(f)||fc.has(f)||yc(b)||b.type!=="slot"&&m.push({path:[f],kind:mc(b),counted:os(b)?.tier!=="mobile"})}return m}function mi(n,r,a,m){sc({scope:r,type:a.type,label:m,rows:oo(n,a),props:a.props})}function Ja(n,r,a,m){let u=ac(r);if(!u)return null;let f=dc(u,{type:a.type,rows:oo(n,a),props:a.props});return{...f,message:lc(f,u.sourceLabel,m)}}import{Fragment as me,jsx as c,jsxs as N}from"react/jsx-runtime";function Zc({saveState:n,notSaving:r,onToggle:a,onRetry:m}){if(r)return c(ol,{tone:n.pending?"off-unsaved":"off",label:"Not saving \u2014 see the notice above",role:"status"});let{tone:u,label:f}=Dc(n);return N(me,{children:[c(Tc,{pressed:n.paused,onToggle:a,title:n.paused?"Auto-save is off \u2014 click to turn it back on (saves your held edits)":"Auto-save is on \u2014 click to pause it",children:c(ol,{tone:u,label:f})}),n.failed&&!n.paused&&c("button",{type:"button",className:"es-btn-ghost",onClick:m,children:"Retry now"})]})}function Jc(){return N("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",children:[c("path",{d:"M12 3a9 9 0 0 0 0 18 2.3 2.3 0 0 0 2.3-2.3c0-.55-.22-1.05-.57-1.42-.34-.37-.56-.87-.56-1.43A2.35 2.35 0 0 1 15.6 13.5H18a3 3 0 0 0 3-3c0-4.14-4-7.5-9-7.5z"}),c("circle",{cx:"7.7",cy:"11.3",r:"1.05",fill:"currentColor",stroke:"none"}),c("circle",{cx:"12",cy:"8",r:"1.05",fill:"currentColor",stroke:"none"}),c("circle",{cx:"16",cy:"11",r:"1.05",fill:"currentColor",stroke:"none"})]})}function Qc({size:n=13}){return N("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c("circle",{cx:"12",cy:"12",r:"9"}),c("path",{d:"M3 12h18M12 3c2.6 2.6 2.6 15.4 0 18M12 3c-2.6 2.6-2.6 15.4 0 18"})]})}function ep({size:n=13}){return N("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c("path",{d:"M12 21s6-5 6-10a6 6 0 10-12 0c0 5 6 10 6 10z"}),c("circle",{cx:"12",cy:"11",r:"2"})]})}function tp({size:n=13}){return N("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c("path",{d:"M9 4 3 6.5v13L9 17l6 3 6-2.5v-13L15 7z"}),c("path",{d:"M9 4v13M15 7v13"})]})}function np({expand:n}){return c("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,strokeLinecap:"round",strokeLinejoin:"round",children:n?N(me,{children:[c("path",{d:"M8 9l4-4 4 4"}),c("path",{d:"M8 15l4 4 4-4"})]}):N(me,{children:[c("path",{d:"M8 4l4 4 4-4"}),c("path",{d:"M8 20l4-4 4 4"}),c("path",{d:"M5 12h14"})]})})}var so=n=>({parentId:`locations-${n}`,slot:"groups"}),xi=(n,r)=>({parentId:`locations-${n}`,slot:`cities:${r}`});function op(n,r){if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(n[a].top!==r[a].top||n[a].index!==r[a].index)return!1;return!0}function ip(){let n=Ft(),{adapter:r,capabilities:a,templateId:m,currentSlug:u,siteId:f,tokenRef:b,onPublish:R,saveStatus:C,saveState:M,saveConflict:A,retrySave:H,hasUnsavedEdits:te,bridgeCapabilities:Ee,notifyParent:ae,token:ve,toggleAutoSave:ie,navigate:pe,docId:ze,data:E,footerOriginSlug:J,readOnly:W}=qt(),{canPublish:F,hasSiteSettings:Y,hasSiteTheme:ue,mediaEditing:k,hasEditGuard:j,hasPinnedChrome:V,explainsSiteSettings:Q,hasPreviewLink:_e}=a,Ce=Ua({hasTrustedConsole:!!ve,canCreatePlatformTemplate:Ee.canCreatePlatformTemplate,capabilities:a,siteId:f,hasUnsavedEdits:te}),ye=De(()=>{!f||!u||ae(Ya,{siteId:f,slug:u})},[ae,f,u]),{appState:fe,dispatch:G,history:Oe,selectedItem:ee,getSelectorForId:lt,config:xe}=Yc(e=>e),he=u===pn,x=$r({readOnly:W}),ne=de(null),w=yi(()=>({...x,select:e=>{ne.current=e,x.select(e)}}),[x]),Ye=fe.ui,U=Ye.leftSideBarVisible,St=Ye.rightSideBarVisible,[kt,rl]=ce("desktop"),Yt=Jr(),Si=k&&Yt!==null,qe=Qr(),[Nt,xn]=ce(qa),[sl,ki]=ce(Us[0].id),wt=Va(Nt,ue,Si);$(()=>{ja(Nt)},[Nt]);let[ao,Ct]=ce(!1),[wi,al]=ce(0),{surface:ll,setSurface:Ci}=Ss(),lo=de(null),Xt=de(null),nt=Hc(Xt,{readySelector:Bc}),Be=oa(Xt);ia(Xt);let[Ae,Zt]=ce(!1),dt=de(!1),ct=de(!1),[K,ot]=ce(null),Sn=K&&K.zone===P?K.index:null,Ti=e=>ot(e===null?null:{zone:P,index:e}),[Ii,Pi]=ce([]),[je,le]=ce(Le),co=je.kind==="puck",po=je.kind==="ticker"?je.heroId:null,Lt=Ma(je,ee?.props.id),pt=de(null),uo=de(null),[Ri,Ei]=ce(null);$(()=>{Ri&&(Ba(),Ei(null))},[Ri]);let Ai=de(lt);Ai.current=lt;let kn=De((e,{scroll:o})=>{xn(p=>Ga(e,p)),o&&Ei(e);let s=[],l=e;for(let p=0;p<4;p++){let g=Ai.current(l)?.zone;if(!g||!g.includes(":"))break;let h=g.split(":")[0];s.push(h),l=h}s.length!==0&&Tn(p=>{if(s.every(h=>!p.has(h)))return p;let g=new Set(p);return s.forEach(h=>g.delete(h)),g})},[]);$(()=>{le(ee?.type===Fe?Jn:Le),ys(ee?.type==="BookingBox"&&ee.props.region==="confirm"?hs(lt(String(ee.props.id))?.zone):null);let e=ee?.type==="ContactLocations"?String(ee.props.id):null;e&&e!==uo.current&&Ke({level:"groups"}),uo.current=e;let o=ee?.props.id;he&&typeof o=="string"&&(pt.current?.(),pt.current=Yn(o));let s=ne.current;if(ne.current=null,!o)return;let l=lt(o);kn(String(o),{scroll:!Oa(s,l??null,P)})},[ee?.props.id,he,kn]);let{setSelected:Ni,setSelectHandler:Li}=ts(),{chat:dl,setChat:cl,setSelected:Di,setSelectHandler:zi}=xs(),{setSelectedHeroId:Oi,setSelectHandler:Bi}=Hs(),{editFooter:Mi}=vs(),{selectedLocationPartId:pl,setSelectedLocationPartId:Hi,setSelectHandler:$i}=$s(),Fi=je.kind==="header";$(()=>{Ni(Fi)},[Fi,Ni]),$(()=>{Li(()=>{le(Jn),G({type:"setUi",ui:{rightSideBarVisible:!0}})})},[Li,G]);let fo=De(()=>{le(e=>e.kind==="chat"?e:Qs),G({type:"setUi",ui:{rightSideBarVisible:!0}})},[G]),Wi=je.kind==="chat";$(()=>{Di(Wi)},[Wi,Di]),$(()=>{zi(fo)},[zi,fo]);let{setOpenHandler:_i}=bs(),qi=De(()=>{le(e=>e.kind==="social"?e:ea),G({type:"setUi",ui:{rightSideBarVisible:!0}})},[G]);$(()=>{_i(qi)},[_i,qi]);let wn=De(e=>{e&&(le(o=>o.kind==="ticker"&&o.heroId===e?o:{kind:"ticker",heroId:e}),G({type:"setUi",ui:{rightSideBarVisible:!0}}),Vt(e))},[G]);$(()=>{Oi(po)},[po,Oi]),$(()=>{Bi(wn)},[Bi,wn]);let ul=De(e=>{G({type:"setUi",ui:{rightSideBarVisible:!0}}),Vt(e),kn(e,{scroll:!0})},[G,kn]),{selectNode:fl,openPartId:rp}=na({mode:je,setMode:le,onOpenPart:ul}),[ji,Vi]=ce(null),Gi="sf-editor-collapsed-sections",[Cn,Tn]=ce(()=>{if(typeof window>"u")return new Set;try{let e=window.localStorage.getItem(Gi);return new Set(e?JSON.parse(e):[])}catch{return new Set}});$(()=>{try{window.localStorage.setItem(Gi,JSON.stringify([...Cn]))}catch{}},[Cn]);let[Dt,gl]=ce(()=>{if(typeof window>"u")return{...vt};try{let e=window.localStorage.getItem(Xo);if(!e)return{...vt};let o=JSON.parse(e);return{left:Zo(Number(o.left)||vt.left),right:Zo(Number(o.right)||vt.right)}}catch{return{...vt}}});$(()=>{let e=setTimeout(()=>{try{window.localStorage.setItem(Xo,JSON.stringify(Dt))}catch{}},300);return()=>clearTimeout(e)},[Dt]);let In=De((e,o)=>gl(s=>{let l=typeof o=="function"?o(s[e]):o;return s[e]===l?s:{...s,[e]:l}}),[]),ml=De(e=>In("left",e),[In]),yl=De(e=>In("right",e),[In]),Tt=e=>Cn.has(e),ut=e=>Tn(o=>{let s=new Set(o);return s.has(e)?s.delete(e):s.add(e),s}),Ki=de(!1),go=de(null);$(()=>{if(Ki.current&&!Ae){let e=go.current;((e&&e.isConnected&&!e.closest('[aria-hidden="true"]')?e:null)??Xt.current?.querySelector('button[aria-label="Add"]'))?.focus(),go.current=null}Ki.current=Ae},[Ae]),$(()=>{if(!Ae||!Be)return;let e=o=>{o.key==="Escape"&&On()};return Be.addEventListener("keydown",e),()=>Be.removeEventListener("keydown",e)},[Ae,Be]),$(()=>{U||!Ae||(Zt(!1),ot(null),dt.current=!1)},[U]),$(()=>{if(!qe){ct.current&&G({type:"setUi",ui:{leftSideBarVisible:!1}}),ct.current=!1;return}Ae&&(Zt(!1),ot(null),ct.current=dt.current,dt.current=!1),Ct(!1),U||(ct.current=!0,G({type:"setUi",ui:{leftSideBarVisible:!0}}))},[qe]),$(()=>{U||!qe||(ct.current=!1,fn())},[U]),$(()=>{if(!qe||!Be)return;let e=o=>{o.key==="Escape"&&fn()};return Be.addEventListener("keydown",e),()=>Be.removeEventListener("keydown",e)},[qe,Be]);let[Pn,Ui]=ce(null),[hl,bl]=ce(0),Jt=de(null),It=(e,o="success")=>{Ui({msg:e,tone:o}),bl(s=>s+1),Jt.current&&clearTimeout(Jt.current),Jt.current=setTimeout(()=>Ui(null),o==="error"?3200:1900)};$(()=>()=>{Jt.current&&clearTimeout(Jt.current)},[]);let Qt=de(null),[zt,Yi]=ce(0),[mo,Xi]=ce(0),Me=Ns();$(()=>{let e=Qt.current;if(!e)return;let o=()=>{Yi(e.clientWidth),Xi(e.clientHeight)};o();let s=new ResizeObserver(o);return s.observe(e),()=>s.disconnect()},[]),hc(()=>{Qt.current&&(Yi(Qt.current.clientWidth),Xi(Qt.current.clientHeight))},[Dt,U,St]);let Zi={desktop:2e3,tablet:800,mobile:390},yo=kt==="desktop"?zt>0?zt:Zi.desktop:Zi[kt],en=zt>0?Math.min(zt/yo,2):1,Ji=yo*en,vl=zt>0&&Ji>zt+1,xl={width:Ji,height:mo||"100%",flex:"none",position:"relative"},Sl={width:yo,height:mo?mo/en:"100%",maxHeight:"none",transform:en!==1?`scale(${en})`:void 0,transformOrigin:"top left"},kl=Wa({pageSlug:u,siteId:f,token:ve}),wl=r.previewHref?.(u)??kl,ft=()=>G({type:"setUi",ui:{leftSideBarVisible:!U}}),Qi=()=>G({type:"setUi",ui:{rightSideBarVisible:!St}}),Rn=e=>{if(!(Ae&&(Zt(!1),ot(null),dt.current=!1,U&&Nt===e))&&!(qe&&(ct.current=!1,fn(),U&&Nt===e))){if(U&&Nt===e){ft();return}Ct(!1),xn(e),U||G({type:"setUi",ui:{leftSideBarVisible:!0}})}},Cl=()=>{Ct(!1),es(n,{accept:"image/*",title:"Media library"})},er=()=>{le(Le),w.select(null),Un()},tr=()=>{le(Jn),St||G({type:"setUi",ui:{rightSideBarVisible:!0}})},nr=()=>{if(ue){Ct(!1),xn("styles"),U||G({type:"setUi",ui:{leftSideBarVisible:!0}}),Un();return}le(Js),St||G({type:"setUi",ui:{rightSideBarVisible:!0}}),Un()},z=fe.data.content??[],gt=()=>{let e=z.findIndex(s=>s.type===Fe),o=z.findIndex(s=>s.type===oe);return{floor:e>=0?e+1:0,cap:o>=0?o:z.length}},or=xe,ho=Uc({data:fe.data,config:or,readOnly:!!W,clipboard:Na,afterRemove:"none",stepBounds:(e,o)=>{if(e.parentId!==_c||e.slot!==qc)return{min:0,max:o-1};let{floor:s,cap:l}=gt();return{min:s,max:l-1}},commit:(e,{select:o})=>{if(o!==void 0){le(Le);let s=o?.kind==="node"?Kc(e,or,o):null;w.select(s&&s.zone===P?{index:s.index}:s)}w.commitDocument(e)}}),Tl=(e,o)=>{let s=re(e)[o]?.props?.id;s!=null&&ho.remove(String(s))},Ve=e=>xe.components[e]?.label??e,Pt=De(e=>xe.components[e]?.defaultProps??{},[xe]),Te=e=>_t(e,"section",Ve(e)),tn=e=>us({type:e.type,props:e.props??{}},Te(e.type)),{nodeAddresses:En,zoneItems:ir}=yi(()=>{let e=new Map,o=new Map,s=(l,p,g)=>{o.set(p,l),l.forEach((h,v)=>{let y=String(h.props?.id??"");if(y&&e.set(y,{zone:p,index:v}),g>=Br)return;let L=new Map;for(let{child:O,zone:T}of Oo(xe,h))L.set(T,[...L.get(T)??[],O]);for(let[O,T]of L)s(T,O,g+1)})};return s(z,P,0),{nodeAddresses:e,zoneItems:o}},[z,xe]),re=De(e=>ir.get(e)??[],[ir]),rr=Or(),Il=yi(()=>{let e=new Map;for(let o of rr??[])e.set(o.slug,o.name);return e},[rr]),An=e=>cs(e,Ve,o=>Il.get(o)),sr=(e,o)=>o===P?null:ps(xe.components[e.type]?.fields),Pl=(e,o,s)=>{let l=re(e)[o];if(!l)return;let p=sr(l,e);p&&w.replaceComponent(e,o,{...l,props:{...l.props,[p]:s.trim()}})},Rl=(e,o,s,l)=>{if(!(ji?.zone===e&&ji.index===o))return;let g=(h,v)=>{Vi(null),v&&Pl(e,o,h)};return c("input",{className:"es-tree-rename",defaultValue:l,autoFocus:!0,"aria-label":"Rename",onClick:h=>h.stopPropagation(),onBlur:h=>g(h.currentTarget.value,!0),onKeyDown:h=>{h.key==="Enter"?(h.preventDefault(),g(h.currentTarget.value,!0)):h.key==="Escape"&&(h.preventDefault(),g("",!1))}},s)},El=()=>Tn(new Set(re(P).map(e=>String(e.props.id)))),Nn=Za(f),Ln=xe,bo=(e,o)=>o===P?Te(e):Ve(e),ar=(e,o,s)=>{let l=Ja(Ln,Nn,s,bo(s.type,e));l&&(l.changed&&w.replaceComponent(e,o,{...s,props:{...l.props,id:s.props.id}}),It(l.message))},lr=Da({nodesIn:re,nodeAt:(e,o)=>re(e)[o]??null,labelOf:(e,o)=>o===P?Te(e):Ve(e),renamePropOf:sr,beginRename:(e,o)=>Vi({zone:e,index:o}),history:{hasPast:Oe.hasPast,hasFuture:Oe.hasFuture,back:()=>Oe.back(),forward:()=>Oe.forward()},openAddSection:()=>{w.select(null),on(null)},openPageSettings:()=>{w.select(null),le(Le)},collapseAll:El,onPasteRefused:()=>It("Your browser won\u2019t let us read the clipboard \u2014 press \u2318V","error"),document:fe.data,nodeOps:ho,isPinned:(e,o)=>o===P&&(e.type===Fe||e.type===oe),sectionBand:gt,openAddInside:(e,o)=>{e===P?mt(o):w.select({zone:e,index:o}),on(null)},locate:e=>En.get(e)??null,rowNameOf:(e,o)=>o===P?tn(e):An(e),selectAt:(e,o,s,l)=>{e===P?mt(o):rn(e,o,s,l??"")},style:{held:()=>zc(Nn),canCopy:e=>oo(Ln,e).some(o=>o.counted!==!1),copy:(e,o)=>mi(Ln,Nn,e,bo(e.type,o)),paste:(e,o,s)=>ar(e,o,s)}},nt),dr=de({copy:(e,o)=>{},paste:(e,o,s)=>{},at:()=>null,readOnly:!1});$(()=>{dr.current={copy:(e,o)=>mi(Ln,Nn,e,bo(e.type,o)),paste:ar,at:()=>{let e=fe.ui.itemSelector;if(!e)return null;let o=e.zone??P,s=re(o)[e.index];return s?{zone:o,index:e.index,node:s}:null},readOnly:!!W}});let vo=De(e=>{let o=Oc(e);if(!o)return;let s=dr.current,l=s.at();l&&(e.preventDefault(),o==="copy"?s.copy(l.node,l.zone):s.readOnly||s.paste(l.zone,l.index,l.node))},[]);$(()=>{if(!Be)return;let e=o=>vo(o);return Be.addEventListener("keydown",e),()=>Be.removeEventListener("keydown",e)},[vo,Be]),Mc(nt,"keydown",vo);let Al=z.map(e=>e.props.id).join("|");$(()=>{let e=nt?.document??null,o=nt?.window??null,s=0,l=[],p=()=>{if(!e){Pi(T=>T.length?[]:T);return}let v=z.findIndex(T=>T.type===oe),y=v>=0?v:z.length,L=T=>{let B=z[T]?.props?.id;if(B==null)return null;let _=e.querySelector(`[data-puck-component="${CSS.escape(String(B))}"]`);return _?_.getBoundingClientRect():null},O=[];for(let T=1;T<=y;T++){let B=L(T),_=L(T-1);!B&&!_||O.push({top:Math.round(B?B.top:_.bottom),index:T})}Pi(T=>op(T,O)?T:O)},g=()=>{cancelAnimationFrame(s),s=requestAnimationFrame(p)};if(!e||!o){p();return}o.addEventListener("scroll",g,{passive:!0});let h=new ResizeObserver(g);return h.observe(e.documentElement),p(),l.push(setTimeout(p,150),setTimeout(p,450)),()=>{cancelAnimationFrame(s),l.forEach(clearTimeout),o.removeEventListener("scroll",g),h.disconnect()}},[nt,Al,kt,en,U,St,ee?.props.id]);let Nl=()=>{let e=nt?.document;if(!e)return null;let o=4,s=z.findIndex(g=>g.type===oe),l=s>=0?s:z.length,p=null;for(let g=0;g<l;g++){let h=z[g]?.props?.id;if(h==null)continue;let v=e.querySelector(`[data-puck-component="${CSS.escape(String(h))}"]`);if(!v)continue;let y=v.getBoundingClientRect().top;y<=o&&(p===null||y>p.offset)&&(p={id:String(h),offset:y})}if(!p){let g=ee?.props?.id??z[0]?.props?.id;g!=null&&(p={id:String(g),offset:0})}return p},Ll=()=>{lo.current=Nl(),al(e=>e+1)},xo=nt?.document??null,nn=nt?.window??null;$(()=>{let e=lo.current;if(!e||!xo||!nn)return;let o=[],s=()=>{let l=xo.querySelector(`[data-puck-component="${CSS.escape(e.id)}"]`);if(!l)return!1;let p=l.getBoundingClientRect().top-e.offset;return Math.abs(p)>1&&nn.scrollTo({left:nn.scrollX,top:nn.scrollY+p,behavior:"instant"}),!0};return lo.current=null,s()&&o.push(setTimeout(s,150),setTimeout(s,450)),()=>o.forEach(clearTimeout)},[xo,nn]);let So=e=>{if(!he){Vt(e);return}pt.current?.(),pt.current=Yn(e)};$(()=>{if(!he||!J)return;let e=z.find(o=>o.type===oe)?.props?.id;if(e)return pt.current?.(),pt.current=Yn(String(e)),()=>{pt.current?.(),pt.current=null}},[he,J,wi]),$(()=>{if(!(he||!Ur()))return Gs(()=>Yr())},[]);let mt=e=>{le(Le),w.select({index:e}),z[e]?.type==="ContactLocations"&&Ke({level:"groups"});let o=z[e]?.props?.id;o&&So(o)},cr=e=>{let{floor:o,cap:s}=gt(),l=g=>Math.min(Math.max(o,g),s);if(typeof e=="number")return l(e);let p=ee&&je.kind!=="header"?z.findIndex(g=>g.props.id===ee.props.id):-1;return l(p>=0?p+1:s)},pr=(e,o)=>{let{floor:s,cap:l}=gt(),p=Math.min(Math.max(o,s),l),g=e<p?p-1:p;return g===e?{moved:!1,dest:e}:(w.reorderComponent(P,e,g),w.select({index:g}),{moved:!0,dest:g})},Dl=(e,o)=>{let s=Te(z[e]?.type??""),l=pr(e,o<0?e-1:e+2);if(!l.moved){It(`\u201C${s}\u201D is already ${o<0?"first":"last"}`);return}let{floor:p,cap:g}=gt();It(`Moved \u201C${s}\u201D to position ${l.dest-p+1} of ${g-p}`)},Dn=(e,o,s)=>{le(Le),w.select({index:e}),Vt(o),It(`Added \u201C${s}\u201D section`)},ko=(e,o)=>{let s=cr(o),l=Is(e);if(l){let h=l(Pt,Wt),v=w.insertNode(P,s,h);return Dn(s,v,Te(e)),s}if(ms(e)&&Wo(gn)&&Wo(jt)){let h={type:gn,props:{...Pt(gn),id:Wt(gn),direction:"column",name:`${Te(e)} section`,content:[{type:jt,props:{...Pt(jt),id:Wt(jt),...Et[e]?.headStyle?{headStyle:Et[e].headStyle}:{},...Et[e]?.headRowGap?{rowGap:Et[e].headRowGap}:{},...Et[e]?.headDescriptionSize?{descriptionSize:Et[e].headDescriptionSize}:{},...Kn(e)!==Kn(jt)?{eyebrowLook:Kn(e)}:{}}},{type:e,props:{...Pt(e),id:Wt(e),headPlacement:"own-box"}}]}},v=w.insertNode(P,s,h);return Dn(s,v,Te(e)),s}let g=Rs[e]?.fixed===!0?w.insertNode(P,s,{type:e,props:{...Pt(e),id:Wt(e),layout:"boxes"}}):w.insertSection(e,s);return Dn(s,g,Te(e)),s},wo=(e,o,s)=>{let l=cr(s),p=w.insertNode(P,l,o);return Dn(l,p,e),l},on=e=>zn(P,e),zn=(e,o)=>{go.current=document.activeElement??null,qe&&(dt.current=ct.current,ct.current=!1,fn()),ot(o===null?null:{zone:e,index:o}),Zt(!0),U||(dt.current=!0,G({type:"setUi",ui:{leftSideBarVisible:!0}}))},On=()=>{Zt(!1),ot(null),dt.current&&G({type:"setUi",ui:{leftSideBarVisible:!1}}),dt.current=!1},zl=e=>{if(Sn===null){ko(e);return}let o=ko(e,Sn);Ti(o+1)},Ol=(e,o)=>{if(Sn===null){wo(e,o);return}let s=wo(e,o,Sn);Ti(s+1)},ur=(e,o,s)=>{if(e.kind==="section")w.insertComponent(o,e.type,s);else if(e.kind==="template")w.insertNode(o,s,Zn(e.template.node));else return;le(Le),w.select({index:s,zone:o})},Bl=e=>{let o=Xe(e.zone);if(o)return`Adding to ${Ve(o.type)}`;if(e.zone===P){let l=z[e.index];return l&&l.type!==oe?`Adding before ${Te(l.type)}`:"Adding at the end of the page"}let s=Mt(e.zone);return s?`Adding to ${s.parentName}`:"Adding here"},Ml=e=>{if(K&&e.kind!=="block"&&Xe(K.zone)){ur(e,K.zone,K.index),ot({zone:K.zone,index:K.index+1});return}if(e.kind==="section")return zl(e.type);if(e.kind==="template")return Ol(e.template.name,Zn(e.template.node));if(K&&K.zone!==P){let o=Mt(K.zone);if(!o)return;o.target.spec?Ot(o.parentId,o.target.slot,e.type,K.index,o.parent.type):Po(K.zone,e.type,K.index),ot({zone:K.zone,index:K.index+1});return}Nr?.onPick(e.type)},Se=e=>o=>{o.target.closest(".es-tree-select")||e()},fr=()=>Mi?Mi():pe({kind:"page",slug:pn,siteId:f??void 0}),Bn=(e,o,s)=>c(ro,{kind:"delete",label:`Delete ${s}`,onClick:()=>Tl(e,o),children:c(bi,{size:15})}),Mn=(e,o,s,l)=>{let p=!!s.props._hidden;return c(ro,{kind:"eye",label:p?`Show ${l}`:`Hide ${l}`,onClick:()=>Hl(e,o,s),children:p?c(We,{name:"eye-off",size:14}):c(We,{name:"eye",size:14})})},gr=e=>{let o=Te(z[e]?.type??""),s=o?`Add section before ${o}`:"Add section here";return Fn(P,e,()=>on(e),s)},Hl=(e,o,s)=>{w.replaceComponent(e,o,{...s,props:{...s.props,_hidden:!s.props._hidden}})},Co=e=>Vn(xe,e),yt=e=>Oo(xe,e),To=(e,o,s)=>{let l=Mr(xe,e.type,o)&&(s||yt(e).length>0);return{collapsible:l,folded:l&&Tt(String(e.props.id))}},Io=(e,o,s)=>yt(e).flatMap(({child:l})=>To(l,o,s(l.type)).collapsible?[String(l.props.id),...Io(l,o+1,s)]:[]),Hn=e=>yt(e).length>0||!!Pe(e.type),$n=e=>!!Pe(e),rn=(e,o,s,l)=>{if(le(Le),Pe(l)?.spec?.slider){let p=e.split(":")[0];Uo(p,o),w.select({index:o,zone:e}),Vt(p)}else w.select({index:o,zone:e}),So(s)},Ot=(e,o,s,l,p)=>{let g=`${e}:${o}`;w.insertComponent(g,s,l),Pe(p)?.spec?.slider?requestAnimationFrame(()=>{Uo(e,l),w.select({index:l,zone:g})}):w.select({index:l,zone:g})},Po=(e,o,s)=>{w.insertComponent(e,o,s),le(Le),w.select({index:s,zone:e})},mr=de(new Set);$(()=>{z.forEach(e=>{let o=Pe(e.type)?.spec;if(!o)return;let s=e.props.id;if(mr.current.has(s)||(mr.current.add(s),(Array.isArray(e.props[o.slot])?e.props[o.slot]:[]).length>0)||o.skipSeed?.(e.props))return;let p=`${s}:${o.slot}`,g=o.legacy?.(e.props)??[];(g.length?g:o.seeds(Pt)).forEach((v,y)=>w.seedChild(p,y,o.childType,v))})},[z,w,Pt]);let yr=de(new Set);$(()=>{z.forEach((e,o)=>{let s=e.props.id;if(yr.current.has(s))return;let l=za(e,Co(e.type));yr.current.add(s),l&&w.replaceComponent(P,o,{...e,props:l})})},[z,w]);let hr=Xc().getState,br=de(null);$(()=>{if(!Xr({docId:ze,saveStatus:C,seededDocId:br.current})||(br.current=ze,!V))return;let e=hr().appState.data,o=e.content,s=E?.content??[],l=(v,y)=>v.some(L=>L?.type===y);if(!Y){let v=new Set(Bo(o)),y=v.size?o.filter(O=>!v.has(O.props.id)):o;v.size&&w.setDocument({...e,content:y});let L=Hr(y,s);if(L.includes(oe)){let O=y.length,T=w.insertSection(oe,O);w.replaceComponent(P,O,{type:oe,props:{id:T,blocks:Fo()}})}L.includes(Fe)&&w.insertNode(P,0,$o());return}if(he){let v=gs(o);if(v!==o&&w.setDocument({...e,content:[...v]}),!v.find(L=>L.type===oe)&&!l(s,oe)&&!l(v,mn)&&!l(s,mn)){let L=(T,B)=>$c(xe,T,B),O={type:oe,props:{blocks:Fo()}};w.insertNode(P,v.length,Vs(O,L,Wc(mn)))}return}let p=o.filter(v=>v.type!==oe),g=new Set(Bo(p)),h=g.size?p.filter(v=>!g.has(v.props.id)):p;h.length!==o.length&&w.setDocument({...e,content:h}),!l(h,Fe)&&!l(s,Fe)&&w.insertNode(P,0,$o())},[ze,C,E,hr,w,Y,V,he]);let Bt=z.findIndex(e=>e.type===oe),He=Bt>=0?z[Bt]:null,vr=z.find(e=>e.type===fs)??null,xr=z.find(e=>e.type===mn)??null,Sr=Bt>=0?Bt:z.length,it=[];z.forEach(e=>{e.type!==oe&&(Hn(e)&&it.push(String(e.props.id)),it.push(...Io(e,1,$n)))}),He&&(it.push(String(He.props.id)),it.push(...Io(He,1,$n)));let Ro=it.length>0&&it.every(e=>Cn.has(e)),$l=()=>Tn(e=>{let o=new Set(it);return Ro?new Set([...e].filter(s=>!o.has(s))):new Set([...e,...it])}),kr=e=>{let o=e.props;if(e.type==="FooterMenu"){let s=o.menu;return o.heading||s?.name||"Menu"}if(e.type==="FooterText"){let s=typeof o.text=="string"?o.text.trim():"";return s?s.length>28?`${s.slice(0,28)}\u2026`:s:"Text"}return e.type==="FooterEmailSignup"?o.heading||"Email signup":Ve(e.type)},wr=(e,o,s,l)=>{let p=re(e)[s];if(!p)return;let g={...xt(e),index:s},h={...xt(o),index:Math.min(Math.max(l,0),re(o).length)},v=Gc(g,h);if(!(e===o&&v===s))try{ho.move(String(p.props.id),{...h,index:v})}catch(y){if(!(y instanceof Fc))throw y}},Fl=(e,o,s)=>{if(e===o)return!0;let l=re(e)[s];if(!l)return!1;let p=o.split(":")[0],g=En.get(p),h=g?re(g.zone)[g.index]:void 0;if(!h||Wl(l).has(o))return!1;let v=Pe(h.type,h.type===dn?cn(fe?.data,p):0);return!(!v||!(v.choices?v.choices.some(L=>L.type===l.type):v.spec?.childType===l.type)||v.spec?.addBlocked?.(re(o),l))},Wl=e=>{let o=new Set,s=l=>{for(let{child:p,zone:g}of yt(l))o.add(g),s(p)};for(let l of Co(e.type))o.add(`${e.props.id}:${l}`);return s(e),o},Cr=e=>{let o=e.slice(0,e.indexOf(":"));for(let s=0;s<64;s++){let l=En.get(o);if(!l)return null;if(l.zone===P)return o;o=l.zone.slice(0,l.zone.indexOf(":"))}return null},Xe=e=>{let o=e.slice(0,e.indexOf(":")),s=z.find(l=>yn(l.type)&&String(l.props.id)===o);return s&&Ho(o)===e?s:null},Eo=(e,o)=>{if(e.add)return _l(e.add,o);let s=tt(o);if(yn(e.type))return!1;let l=Xe(s),p=Xe(e.zone);if(l||p)return!l||!p?!1:o.index>=0&&o.index<=re(s).length;if(e.zone===P||s===P){if(e.zone!==s)return!1;let{floor:h,cap:v}=gt();return o.index>=h&&o.index<=v}if(o.index<0||o.index>re(s).length)return!1;if(e.zone===s)return!0;let g=He?String(He.props.id):null;return g&&(Cr(e.zone)===g||Cr(s)===g)?!1:Fl(e.zone,s,e.index)},Mt=e=>{let o=e.slice(0,e.indexOf(":")),s=En.get(o),l=s?re(s.zone)[s.index]:void 0;if(!s||!l)return null;let p=Pe(l.type,l.type===dn?cn(fe?.data,o):0);if(!p||`${o}:${p.slot}`!==e||p.source==="footer")return null;let g=p.choices??(p.spec?[{type:p.spec.childType,label:Ve(p.spec.childType)}]:[]);return{parent:l,parentId:o,target:p,choices:g,parentName:s.zone===P?Te(l.type):Ve(l.type)}},_l=(e,o)=>{let s=tt(o);if(e.kind!=="block"){if(Xe(s))return o.index>=0&&o.index<=re(s).length;if(s!==P)return!1;let{floor:p,cap:g}=gt();return o.index>=p&&o.index<=g}if(s===P)return!1;let l=Mt(s);return!l||!l.choices.some(p=>p.type===e.type)?!1:!l.target.spec?.addBlocked?.(re(s))},ql=(e,o)=>{if(e.kind!=="block"&&Xe(tt(o))){ur(e,tt(o),o.index);return}if(e.kind==="section"){ko(e.type,o.index);return}if(e.kind==="template"){wo(e.template.name,Zn(e.template.node),o.index);return}let s=tt(o),l=Mt(s);l&&(l.target.spec?Ot(l.parentId,l.target.slot,e.type,o.index,l.parent.type):Po(s,e.type,o.index))},Tr=(e,o)=>{if(e.add){ql(e.add,o);return}e.zone===P?pr(e.index,o.index):wr(e.zone,tt(o),e.index,o.index)},[Ao]=ce(()=>Vc()),Ht=vi({keyOf:e=>e.id,readOnly:!!W,session:Ao,canDrop:Eo,onDrop:Tr,onStep:(e,o)=>{e.zone===P?Dl(e.index,o):wr(e.zone,e.zone,e.index,o<0?e.index-1:e.index+2)}}),jl=De(e=>{let{floor:o,cap:s}=gt(),l=[];for(let g of e.nodes){let h=tt(g.place),v=re(h)[g.place.index];if(!v||String(v.props.id)!==g.id||v.type===Fe||v.type===oe||Kt(v.type)||yn(v.type))continue;let y=!!Xe(h),L=h===P||y;h===P&&s-o<2||l.push({key:g.id,item:{id:g.id,zone:h,index:g.place.index,type:v.type},box:g.box,label:L?Te(v.type):An(v),from:g.place})}let p=e.zones.filter(g=>g.children.length>0||!!Mt(tt(g.list))?.choices.length||!!Xe(tt(g.list)));return{sources:l,zones:p}},[fe.data]),Vl=e=>{le(Le),w.select(e.zone===P?{index:e.index}:{index:e.index,zone:e.zone})},Fn=(e,o,s,l)=>c(hi,{...W?{}:Ht.seam({place:{...xt(e),index:o}}),onAdd:W?void 0:s,label:l},`seam:${e}:${o}`),ht=(e,o)=>{let s=z[e];s&&w.replaceComponent(P,e,{type:s.type,props:{...s.props,locations:o}})},sn=e=>{let o=z[e]?.props?.locations;return Array.isArray(o)?o:[]},Ir=vi({keyOf:e=>`group:${e.si}:${e.index}`,readOnly:!!W,canDrop:(e,o)=>o.parentId===so(e.si).parentId&&o.slot==="groups",onDrop:(e,o)=>{ht(e.si,Vo(sn(e.si),e.index,o.index)),Me.level==="city"&&Ke({level:"groups"})},onStep:(e,o)=>{ht(e.si,Vo(sn(e.si),e.index,o<0?e.index-1:e.index+2)),Me.level==="city"&&Ke({level:"groups"})}}),No=vi({keyOf:e=>`city:${e.si}:${e.group}:${e.index}`,readOnly:!!W,canDrop:(e,o)=>o.parentId===so(e.si).parentId&&o.slot.startsWith("cities:"),onDrop:(e,o)=>{let s=o.slot.slice(7);ht(e.si,Go(sn(e.si),e.group,e.index,s,o.index)),Ke({level:"group",key:s})},onStep:(e,o)=>{ht(e.si,Go(sn(e.si),e.group,e.index,e.group,o<0?e.index-1:e.index+2)),Me.level==="city"&&Ke({level:"group",key:e.group})}}),Pr=de(z);Pr.current=z;let Rr=de(()=>{});$(()=>{$i(e=>{let o=Ws(e);if(!o)return;let s=Pr.current.findIndex(l=>l.props?.id===o.nodeId);s<0||Rr.current(s,{level:o.part,index:o.index})})},[$i]);let $e=(e,o)=>{le(Le),uo.current=z[e]?.props?.id??null,w.select({index:e}),Ke(o),St||G({type:"setUi",ui:{rightSideBarVisible:!0}});let s=z[e]?.props?.id;typeof s=="string"&&(o.level==="image"||o.level==="map")?Hi(Fs(s,o.index,o.level)):Hi(null),typeof s=="string"&&So(s)};Rr.current=$e;let Gl=(e,o)=>{let s=sn(o),l=qo(s),p=String(e.props.id),g=co&&ee?.props.id===p,h=y=>c(hi,{...W?{}:Ir.seam({place:{...so(o),index:y}})},`seam:${p}:groups:${y}`),v=(y,L)=>c(hi,{...W?{}:No.seam({place:{...xi(o,y),index:L}})},`seam:${p}:cities:${y}:${L}`);return N(me,{children:[c(we,{icon:c(Nc,{size:13}),name:"Texts",onSelect:()=>$e(o,{level:"texts"}),selected:g&&Me.level==="texts",rowProps:{onClick:Se(()=>$e(o,{level:"texts"}))}}),l.map((y,L)=>{let O=`${p}::grp::${y.key}`,T=Tt(O),B=g&&Me.level==="group"&&Me.key===y.key,_=Ls(y.key,y.name),Ze={...xi(o,y.key),index:y.cards.length},Ge=No.row({item:{si:o,group:y.key,index:-1},place:Ze,into:Ze,canDrag:!1},{onClick:Se(()=>$e(o,{level:"group",key:y.key}))}),ke=Ir.row({item:{si:o,index:L},place:{...so(o),index:L}},Ge.rowProps);return N(Ut,{children:[L===0&&h(0),c(we,{icon:c(Qc,{size:13}),name:_,onSelect:()=>$e(o,{level:"group",key:y.key}),selected:B,draggable:ke.draggable,dragging:ke.dragging,drop:ke.drop??Ge.drop,fold:{open:!T,label:"group",onToggle:()=>ut(O)},actions:c(ro,{kind:"delete",label:`Delete ${_} group (${y.cards.length} ${y.cards.length===1?"city":"cities"})`,onClick:()=>{ht(o,Os(s,y.key)),Ke({level:"groups"})},children:c(bi,{size:15})}),rowProps:ke.rowProps,children:c("span",{className:"es-group-count",children:y.cards.length})}),!T&&N(at,{children:[y.cards.map((Je,Ne)=>{let Ie=jo(s,y.key,Ne),an=g&&Me.level==="city"&&Me.index===Ie,Rt=String(Je?.name??"")||"City",ln=`${p}::city::${_o(Je)}`,Wn=Tt(ln),{rowProps:_n,...zo}=No.row({item:{si:o,group:y.key,index:Ne},place:{...xi(o,y.key),index:Ne}},{onClick:Se(()=>$e(o,{level:"city",index:Ie}))});return N(Ut,{children:[Ne===0&&v(y.key,0),c(we,{icon:c(ep,{size:13}),name:Rt,onSelect:()=>$e(o,{level:"city",index:Ie}),selected:an,...zo,fold:{open:!Wn,label:Rt,onToggle:()=>ut(ln)},actions:c(ro,{kind:"delete",label:`Delete ${Rt}`,onClick:()=>{ht(o,Bs(s,y.key,Ne)),Ke({level:"group",key:y.key})},children:c(bi,{size:15})}),rowProps:_n}),!Wn&&N(at,{children:[c(we,{icon:c(Ec,{size:13}),name:"Image",onSelect:()=>$e(o,{level:"image",index:Ie}),selected:g&&Me.level==="image"&&Me.index===Ie,rowProps:{onClick:Se(()=>$e(o,{level:"image",index:Ie}))}}),c(we,{icon:c(tp,{size:13}),name:"Map",onSelect:()=>$e(o,{level:"map",index:Ie}),selected:g&&Me.level==="map"&&Me.index===Ie,rowProps:{onClick:Se(()=>$e(o,{level:"map",index:Ie}))}})]}),v(y.key,Ne+1)]},_o(Je))}),N("button",{type:"button",className:"sf-add-card",onClick:()=>{let Je=Ds(s,y.key);ht(o,Je);let Ne=qo(Je).find(Ie=>Ie.key===y.key);Ke(Ne&&Ne.cards.length?{level:"city",index:jo(Je,y.key,Ne.cards.length-1)}:{level:"group",key:y.key})},children:[c("span",{className:"sf-plus sf-plus--sm",children:"+"}),"Add city"]})]}),h(L+1)]},O)}),N("button",{type:"button",className:"sf-add-card",onClick:()=>{let{cards:y,key:L}=zs(s);ht(o,y),$e(o,{level:"group",key:L})},children:[c("span",{className:"sf-plus sf-plus--sm",children:"+"}),"Add group"]})]})},Er=e=>{let o=String(e.props.id),s=z.findIndex(y=>String(y.props.id)===o),l=Ho(o),p=re(l),g=Tt(o),h=Ve(e.type),v=y=>Fn(l,y,()=>zn(l,y),"Add section here");return N(me,{children:[c(we,{icon:c(be,{type:e.type,size:13}),name:h,onSelect:()=>mt(s),selected:Lt===o,rowProps:{"data-node-id":o,onClick:Se(()=>mt(s))},fold:{open:!g,label:"section",onToggle:()=>ut(o)}}),!g&&N(at,{children:[p.map((y,L)=>{let O=String(y.props.id),T=tn(y),B=Hn(y),_=B&&Tt(O),Ze=()=>rn(l,L,O,e.type),{rowProps:Ge,...ke}=Ht.row({item:{id:O,zone:l,index:L,type:y.type},place:{...xt(l),index:L}},{"data-node-id":O,onClick:Se(Ze)});return N(Ut,{children:[v(L),c(we,{icon:c(be,{type:y.type,size:13}),name:T,onSelect:Ze,selected:Lt===O,hidden:!!y.props._hidden,...ke,fold:B?{open:!_,label:"section",onToggle:()=>ut(O)}:void 0,actions:N(me,{children:[Bn(l,L,T),Mn(l,L,y,T)]}),rowProps:Ge}),B&&!_&&c(at,{children:Lo(y,2)})]},O)}),v(p.length)]})]})},Ar=(e,o)=>{let s=yt(e),l=(h,v)=>Fn(h,v),p=Pe(e.type),g=p?`${e.props.id}:${p.slot}`:null;return N(me,{children:[s.map(({child:h,zone:v,index:y})=>{let L=Lt===String(h.props.id),{collapsible:O,folded:T}=To(h,o,$n(h.type)),B=String(h.props.id),_=kr(h),Ze=()=>rn(v,y,B,e.type),{rowProps:Ge,...ke}=Ht.row({item:{id:B,zone:v,index:y,type:h.type},place:{...xt(v),index:y}},{"data-node-id":B,onClick:Se(Ze)});return N(Ut,{children:[y===0&&l(v,0),c(we,{icon:c(be,{type:h.type,size:13}),name:_,onSelect:Ze,selected:L,hidden:!!h.props._hidden,...ke,fold:O?{open:!T,label:"group",onToggle:()=>ut(B)}:void 0,actions:N(me,{children:[Bn(v,y,_),Mn(v,y,h,_)]}),rowProps:Ge}),O&&!T&&c(at,{children:Ar(h,o+1)}),l(v,y+1)]},String(h.props.id??`${v}-${y}`))}),g&&!s.some(h=>h.zone===g)?l(g,0):null]})},Lo=(e,o)=>{let s=yt(e),l=Pe(e.type,e.type===dn?cn(fe?.data,String(e.props.id)):0),p=l?.spec??null,g=p&&Array.isArray(e.props[p.slot])?e.props[p.slot]:[],h=l&&l.choices?{slot:l.slot,choices:l.choices}:null,v=String(e.props.id),y=p&&!p.fixed?`${v}:${p.slot}`:null,L=h?`${v}:${h.slot}`:null,O=(T,B)=>{let _=T===y&&p&&!p.addBlocked?.(g)?()=>Ot(e.props.id,p.slot,p.childType,B,e.type):T===L?()=>zn(T,B):void 0;return Fn(T,B,_,T===y&&p?p.addLabel:"Add block here")};return N(me,{children:[s.map(({child:T,zone:B,index:_})=>{let Ze=Lt===String(T.props.id),Ge=An(T),ke=String(T.props.id),{collapsible:Je,folded:Ne}=To(T,o,$n(T.type)),Ie=Co(T.type),an=Ie.length===1?`${ke}:${Ie[0]}`:null,Rt=an?{...xt(an),index:re(an).length}:void 0,ln=Ht.dragging,Wn=Rt&&ln&&Eo(ln,Rt)?Rt:void 0,_n=()=>rn(B,_,ke,e.type),{rowProps:zo,...Kl}=Ht.row({item:{id:ke,zone:B,index:_,type:T.type},place:{...xt(B),index:_},into:Wn,canDrag:!Kt(T.type)},{"data-node-id":ke,onClick:Se(_n)});return N(Ut,{children:[_===0&&O(B,0),c(we,{icon:c(be,{type:T.type,size:13}),name:Ge,onSelect:_n,nameSlot:Rl(B,_,ke,Ge),selected:Ze,hidden:!!T.props._hidden,...Kl,fold:Je?{open:!Ne,label:"group",onToggle:()=>ut(ke)}:void 0,actions:Kt(T.type)?void 0:N(me,{children:[Bn(B,_,Ge),Mn(B,_,T,Ge)]}),rowProps:zo}),Je&&!Ne&&c(at,{children:Lo(T,o+1)}),O(B,_+1)]},String(T.props.id??`${B}-${_}`))}),p&&!p.fixed&&c(Cs,{small:!0,label:p.addLabel,blocked:p.addBlocked?.(g)??null,onAdd:()=>Ot(e.props.id,p.slot,p.childType,g.length,e.type)}),L&&!s.some(T=>T.zone===L)?O(L,0):null]})},Nr=(()=>{if(!ee||!co)return null;let e=String(ee.type),o=String(ee.props.id),s=Pe(e,e===dn?cn(fe?.data,o):0);if(!s||s.source==="footer")return null;let l=z.some(h=>String(h.props?.id)===o),p=Array.isArray(ee.props[s.slot])?ee.props[s.slot]:[];if(s.spec?.addBlocked?.(p))return null;let g=s.choices??(s.spec?[{type:s.spec.childType,label:Ve(s.spec.childType)}]:[]);return g.length===0?null:{parentName:l?Te(e):Ve(e),choices:g,onPick:h=>{s.spec?Ot(o,s.slot,h,p.length,e):Po(`${o}:${s.slot}`,h,p.length)}}})(),Do=Ae||qe!==null,$t=[{id:"add",label:"Add",icon:c("span",{className:"sf-rail-plus","aria-hidden":"true",children:"+"}),active:Ae,onSelect:()=>Ae?On():on(null)},{id:"pages",label:"Pages",icon:c(bc,{}),active:U&&!Do&&wt==="pages",onSelect:()=>Rn("pages")},{id:"sections",label:"Layers",icon:c(Qa,{}),active:U&&!Do&&wt==="sections",onSelect:()=>Rn("sections")}];return!ue&&Q&&$t.push({id:"appearance",label:"Appearance",icon:c(Jc,{}),active:je.kind==="website",onSelect:nr}),Y&&$t.push({id:"sitemap",label:"Visual sitemap",icon:c(xc,{}),active:ao,onSelect:()=>{let e=!ao;Ct(e),e&&U&&G({type:"setUi",ui:{leftSideBarVisible:!1}})}}),ue&&$t.push({id:"styles",label:"Site styles",icon:c(vc,{}),active:U&&!Do&&wt==="styles",onSelect:()=>Rn("styles")}),Si?$t.push({id:"media",label:"Media library",icon:c(el,{}),active:U&&!Ae&&(qe!==null||wt==="media"),onSelect:()=>Rn("media")}):k&&$t.push({id:"media",label:"Media library",icon:c(el,{}),onSelect:Cl}),c(As.Provider,{value:!0,children:c(ns.Provider,{value:kt,children:N("div",{ref:Xt,className:"sf-editor es-editor",style:Xs(Dt),onContextMenu:lr.onEditorContextMenu,children:[Y&&ao&&c(di,{tokenRef:b,siteId:f??void 0,currentSlug:u,liveContent:z,labelForType:Te,onOpenPage:e=>{pe({kind:"page",slug:e,siteId:f??void 0}),Ct(!1)},onClose:()=>Ct(!1)}),N(wc,{children:[c(Pc,{items:$t,ariaLabel:"Left panel views"}),N(il,{children:[c(tl,{label:"Undo",disabled:!Oe.hasPast,onClick:()=>Oe.back(),children:c(Lc,{})}),c(tl,{label:"Redo",disabled:!Oe.hasFuture,onClick:()=>Oe.forward(),children:c(Ac,{})}),c(Ic,{}),c(kc,{devices:sa,value:kt,onChange:rl})]}),N(il,{kind:"right",style:{minWidth:300},children:[c(Zc,{saveState:M,notSaving:!!W||A!=null,onToggle:ie,onRetry:H}),Ce.visible&&N("button",{type:"button",className:"es-btn-ghost",disabled:!Ce.enabled,title:Ce.enabled?"Save this website as a platform template":Ce.disabledReason,onClick:ye,children:["Save as Template",c(gi,{})]}),c("button",{type:"button",className:"es-btn-ghost",title:"Refresh the preview (reloads the canvas, keeps your place)",onClick:Ll,children:"Refresh"}),_e&&u&&N("a",{className:"es-btn-ghost",href:wl,target:"_blank",rel:"noopener noreferrer",title:"Preview the live site (opens in a new tab)","aria-label":"Preview the live site in a new tab",children:["Preview",c(Rc,{size:15})]}),c("button",{type:"button",className:"es-btn-primary",onClick:()=>{R(fe.data)},children:F?"Publish":"Save"})]})]}),c(ei,{}),N("div",{className:"sf-body",children:[U?N(me,{children:[c("div",{className:"es-sidepanel es-sidepanel--left sf-panel sf-panel--left",children:Ae?c(si,{blocks:K&&K.zone!==P&&!Xe(K.zone)?Mt(K.zone):Nr,blocksOnly:!!(K&&K.zone!==P&&!Xe(K.zone)),at:K?{label:Bl(K),onClear:()=>ot(null)}:void 0,onAdd:Ml,itemFor:e=>({id:`new:${e.kind}:${e.kind==="template"?e.template.id:e.type}`,zone:"",index:-1,type:e.kind==="template"?e.template.node.type:e.type,add:e}),session:Ao,siteWide:Y?{chatEnabled:dl.enabled,onToggleChat:e=>cl({enabled:e}),onOpenChat:()=>{On(),fo()}}:void 0,onClose:On,onHide:ft,readOnly:!!W}):qe&&Yt?c(Yo,{panel:Yt,pick:qe,onHide:ft}):wt==="pages"?c(ai,{activeSurface:ll,onPreviewSurface:Ci,onNavigate:e=>{Ci(null),pe(m?{kind:"template",id:m,pageSlug:e}:{kind:"page",slug:e,siteId:f??void 0})},onClose:ft}):wt==="styles"?c(li,{tokenRef:b,siteId:f??void 0,onClose:ft,onNotify:It,tab:sl,onTabChange:ki}):wt==="media"&&Yt?c(Yo,{panel:Yt,pick:null,onHide:ft}):N(me,{children:[c(bt,{icon:c(Qa,{}),title:"Layers",context:`/${u}`,actions:it.length>0?c(Cc,{label:Ro?"Expand all sections":"Collapse all sections",onClick:$l,children:c(np,{expand:Ro})}):void 0,onHide:ft}),N(Sc,{className:"sf-tree sf-scroll",children:[c(we,{icon:c(be,{type:"page",size:13}),name:"Page settings",onSelect:er,selected:!ee&&co,rowProps:{onClick:Se(er)}}),vr&&N(me,{children:[c(io,{children:"Header"}),Er(vr)]}),!he&&V&&N(me,{children:[c(io,{children:"Header"}),c(we,{icon:c(be,{type:"header",size:13}),name:"Header",onSelect:tr,selected:je.kind==="header",rowProps:{onClick:Se(tr)}})]}),!he&&N(io,{children:["Template \xB7 ",j?"Home page":"Template"]}),z.map((e,o)=>{if(e.type===Fe||e.type===oe||yn(e.type))return null;let s=Lt===String(e.props.id),l=!!e.props._hidden,p=yt(e),g=String(e.props.id),h=e.type==="ContactLocations",v=Hn(e)||h,y=v&&Tt(g),{rowProps:L,...O}=Ht.row({item:{id:g,zone:P,index:o,type:e.type},place:{...xt(P),index:o}},{"data-node-id":g,onClick:Se(()=>mt(o))});return N(Ut,{children:[o>0&&gr(o),c(we,{icon:c(be,{type:e.type,size:13}),name:tn(e),onSelect:()=>mt(o),selected:s,hidden:l,...O,fold:v?{open:!y,label:"section",onToggle:()=>ut(g)}:void 0,actions:N(me,{children:[Bn(P,o,tn(e)),Mn(P,o,e,tn(e))]}),rowProps:L}),Hn(e)&&!y&&N(at,{children:[Lo(e,1),e.type==="Hero"&&c(we,{icon:c(be,{type:"ticker",size:13}),name:Ms,onSelect:()=>wn(g),selected:po===g,rowProps:{onClick:Se(()=>wn(g))}})]}),h&&!y&&c(at,{children:Gl(e,o)})]},String(e.props.id??o))}),!he&&Sr>0&&gr(Sr),V&&c(io,{children:"Footer"}),He&&(()=>{let e=String(He.props.id),o=yt(He).length>0||!!Pe(He.type),s=o&&Tt(e);return N(me,{children:[c(we,{icon:c(be,{type:"footer",size:13}),name:"Footer",onSelect:()=>mt(Bt),selected:Lt===String(He.props.id),fold:o?{open:!s,label:"section",onToggle:()=>ut(e)}:void 0,rowProps:{onClick:Se(()=>mt(Bt))}}),o&&!s&&c(at,{children:Ar(He,1)})]})})(),!he&&!He&&V&&c(we,{icon:c(be,{type:"footer",size:13}),name:"Footer",onSelect:fr,rowProps:{onClick:Se(fr),title:"Edit the site footer"}}),xr&&Er(xr),c("div",{className:"sf-tree-tool",children:c(pi,{})})]})]})}),c(nl,{side:"left",width:Dt.left,min:Qo,max:Jo,defaultWidth:vt.left,label:"Resize Sections panel",onResize:ml})]}):c(Ko,{side:"left",onShow:ft}),c("div",{ref:Qt,className:"sf-center sf-scroll",style:{overflowX:vl?"auto":"hidden",overflowY:"hidden"},children:c("div",{className:"sf-frame-scaler",style:xl,children:c("div",{className:`sf-frame ${kt==="desktop"?"":`sf-frame--${kt}`}`,style:Sl,children:N("div",{className:"sf-preview-host",children:[c(ra,{},wi),c(jc,{canvas:nt,session:Ao,model:jl,canDrop:Eo,onDrop:Tr,onPick:Vl,onZoneAdd:e=>zn(tt(e),0),readOnly:!!W,revision:fe.data}),Ii.length>0&&c("div",{className:"sf-preview-gaps","aria-hidden":"true",children:Ii.map(e=>N("button",{type:"button",tabIndex:-1,className:"sf-preview-gap",style:{top:e.top},title:"Add section here",onClick:()=>on(e.index),children:[c("span",{className:"sf-preview-gap-line"}),N("span",{className:"sf-preview-gap-pill",children:[c("span",{className:"sf-preview-gap-plus",children:"+"}),c("span",{className:"sf-preview-gap-label",children:"Add section"})]})]},e.index))})]})})})}),St?N(me,{children:[c(Ts,{value:{selectChild:rn,addChild:Ot,childRowName:An,blockRowName:kr},children:c(ta,{mode:je,onOpenWebsiteSettings:nr,onOpenSiteStyles:()=>{ki(Ks),xn("styles")},onSelectNode:fl,onNotify:It,onHidePanel:Qi})}),c(nl,{side:"right",width:Dt.right,min:Qo,max:Jo,defaultWidth:vt.right,label:"Resize settings panel",onResize:yl})]}):c(Ko,{side:"right",onShow:Qi})]}),Pn&&N("div",{className:`sf-toast ${Pn.tone==="error"?"sf-toast--error":""}`,role:"status",children:[c("span",{className:"sf-toast-check","aria-hidden":"true",children:Pn.tone==="error"?"!":"\u2713"}),Pn.msg]},hl),lr.menu]})})})}export{ip as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ja as c}from"./chunk-4KLEZTLW.js";import{T as u,l as s}from"./chunk-RF5DTRJ5.js";function w(e){return{root:{props:{}},content:[e],zones:{}}}function T(e){return(e.content??[])[0]??null}function g(e){return Array.isArray(e)&&e.length>0&&e.every(t=>!!t&&typeof t=="object"&&typeof t.type=="string"&&typeof t.props=="object")}function m(e){let t={...e.props,id:c(e.type)};for(let[r,o]of Object.entries(t))g(o)&&(t[r]=o.map(m));return{type:e.type,props:t}}import{createContext as f,useContext as y}from"react";import{Fragment as v,jsx as l,jsxs as h}from"react/jsx-runtime";var x={mirrorHostStyles:!0,css:null,fontHrefs:[]},d=f(x);function H({value:e,children:t}){return l(d.Provider,{value:e,children:t})}function S(){return y(d)}function I(){let{css:e,fontHrefs:t}=S();return h(v,{children:[t.map(r=>l("link",{rel:"stylesheet",href:r},r)),e?l("style",{"data-sf-canvas-css":"",children:e}):null]})}import{createContext as b,useContext as _}from"react";import{jsx as P}from"react/jsx-runtime";var p=b(void 0);function z({metadata:e,children:t}){return P(p.Provider,{value:e,children:t})}var D=()=>_(p);var n=new Map,a=e=>e??"";function O(e,t,r=!1){let o=a(t);r&&n.delete(o);let i=n.get(o);return i||(i=u.getHeaderSettings(e,t??void 0),n.set(o,i),i.catch(()=>{n.get(o)===i&&n.delete(o)})),i}function G(e,t){n.set(a(t),Promise.resolve(e))}function j(e){n.delete(a(e))}function F(e){return{logoUrl:s(e.effective_logo_url),reverseLogo:e.reverse_logo,logoPosition:e.logo_position,logoSize:e.logo_size,logoSizePx:e.logo_size_px,menuItems:e.menu_items??[],menuSplit:e.menu_split??3,menuPosition:e.menu_position,menuRow:e.menu_row,menuGapPx:e.menu_gap_px??null,searchEnabled:e.search_enabled,searchPosition:e.search_position,searchRow:e.search_row,countrySelectorEnabled:e.country_selector_enabled,countryUrls:e.country_urls??{},accountEnabled:e.account_enabled??!0,cartEnabled:e.cart_enabled??!0,utilStyle:e.util_style,navTextCase:e.nav_text_case,lightReverseText:e.light_reverse_text,topTextColor:e.top_text_color,transparentTop:e.transparent_top,surface:e.surface,theme:e.theme,width:e.width,heightPx:e.height_px,sticky:e.sticky}}export{O as a,G as b,j as c,F as d,w as e,T as f,m as g,H as h,S as i,I as j,z as k,D as l};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{C as Rn,E as wt,L as In,N as An,P as ee,i as _n,u as Me,w as _t,z as wn}from"./chunk-RF5DTRJ5.js";function Ln(e,t){let n=e.components?.[t]?.fields??{};return Object.keys(n).filter(r=>n[r]?.type==="slot")}function lo(e,t){return Ln(e,t.type).flatMap(n=>(Array.isArray(t.props[n])?t.props[n]:[]).map((o,s)=>({child:o,zone:`${t.props.id}:${n}`,index:s})))}function fa(e,t,n){let r=(o,s,i,a)=>{if(!o||typeof o!="object"||!o.props)return null;if(o.props.id===n)return{item:o,zone:s,index:i};if(a>=12)return null;for(let{child:u,zone:m,index:y}of lo(e,o)){let d=r(u,m,y,a+1);if(d)return d}return null};for(let o=0;o<t.length;o+=1){let s=r(t[o],uo,o,0);if(s)return s}return null}var co=6;function ga(e,t,n){return n<co&&Ln(e,t).length>0}var ha=e=>`${e}-${crypto.randomUUID()}`,Ke="Header",Rt="Footer",uo="root:default-zone",kn=[Ke,Rt];function po(e){let t=new Set,n=[];return e.forEach((r,o)=>{let s=r?.type;s===void 0||!kn.includes(s)||(t.has(s)?n.push(o):t.add(s))}),n}function ya(e){return po(e).map(t=>e[t]?.props?.id).filter(t=>typeof t=="string")}function xa(e,t){let n=(r,o)=>r.some(s=>s?.type===o);return kn.filter(r=>!n(e,r)&&!n(t,r))}import{createContext as go,useContext as ho,useEffect as yo,useMemo as Xe,useState as Hn}from"react";function Pn(e,t){return e.map(n=>({partNumber:n.partNumber,quantity:n.wheels*t}))}function Fe(e,t){if(e.length===0)return null;let n=0;for(let r of e){let o=r.prices?.[t];if(typeof o!="number"||!Number.isFinite(o)||o<=0)return null;n+=o*r.wheels}return n}var It=4,Sa=1,Ea={unit:"set",spares:0,spareSide:"left"};function Nn(e){return e.unit==="single"?1:It+e.spares}function Ca(e,t){return[{partNumber:e.partNumber,wheels:Nn(t),prices:e.prices}]}function Ta(e,t){let n=Nn(t)-It;if(n<=0||e.length===0)return e;let r=mo(e),o=r?r[t.spareSide]:0;return e.map((s,i)=>i===o?{...s,wheels:s.wheels+n}:s)}function mo(e){let t,n;for(let r=0;r<e.length;r+=1){let o=e[r].hand;if(o!=="left"&&o!=="right")continue;if((o==="left"?t:n)!==void 0)return null;o==="left"?t=r:n=r}return t!==void 0&&n!==void 0?{left:t,right:n}:null}function fo(e,t){return t.spares>0?`${e} + spare`:e}function va(e){return e.unit==="single"?"Single":fo(`Set of ${It}`,e)}var _a="data-add-to-basket",At=9,Lt="en";function qe(e,t,n=0){return new Intl.NumberFormat(Lt,{style:"currency",currency:t,minimumFractionDigits:0,maximumFractionDigits:n}).format(e)}import{jsx as So}from"react/jsx-runtime";var On="storefront-country",Dn=go(null);function xo(e){return Mn(e,"catalogue")}function bo(e){return Mn(e,"money")}function Mn(e,t){let n=new Map(e.map(o=>[o.code,o.decimalPlaces])),r=new Map;return(o,s)=>{if(!s)return"";let i=r.get(s);if(!i){let a=n.get(s)??0;i=new Intl.NumberFormat(Lt,{style:"currency",currency:s,minimumFractionDigits:t==="money"?a:0,maximumFractionDigits:a}),r.set(s,i)}return i.format(o)}}function La({children:e,currencies:t,countries:n,defaultCurrency:r,defaultCountry:o}){let s=Xe(()=>t??[],[t]),i=Xe(()=>n??[],[n]),a=Xe(()=>r||s.find(_=>_.isDefault)?.code||s[0]?.code||"",[r,s]),u=Xe(()=>o||i.find(_=>_.isDefault)?.code||i[0]?.code||"",[o,i]),[m,y]=Hn(u),[d,C]=Hn(!1);yo(()=>{let _=Me.getItem(On);_&&i.some($=>$.code===_)&&y(_),C(!0)},[i]);function l(_){y(_),Me.setItem(On,_)}let x=Xe(()=>{let _=i.find(g=>g.code===m)??null,$=_?.currency,k=$&&s.some(g=>g.code===$)?$:a,B=xo(s),ae=bo(s);return{country:m,currency:k,setCountry:l,currencies:s,countries:i,activeCountry:_,formatPrice:(g,L)=>B(g,L??k),formatMoney:(g,L)=>ae(g,L??k),ready:d}},[m,s,i,a,d]);return So(Dn.Provider,{value:x,children:e})}function je(){let e=ho(Dn);if(!e)throw new Error("useCurrency must be used within a CurrencyProvider");return e}import{createContext as Po,useCallback as j,useContext as No,useEffect as Se,useMemo as Wn,useRef as $e,useState as Z}from"react";function Fn(e,t){return e.map(n=>({qty:n.qty,slug:n.slug,name:`${n.name.lead}${n.name.accent}`.trim(),finish:n.finishName,size:n.size,kind:n.kind,sku:n.sku,pack:n.pack,priceLabel:t(n)}))}var ot="Price on request",Co="Request a quote";function kt(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Pt(e,t){let n=e?.[t];return kt(n)?n:null}function Oa(e,t,n,r){let o=Pt(e,n),s=Pt(t,n);return o===null&&s===null?0:o===null?1:s===null?-1:r==="asc"?o-s:s-o}function Da(e,t,n,r){if(n==null&&r==null)return!0;let o=Pt(e,t);return!(o===null||n!=null&&o<n||r!=null&&o>r)}var To={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function vo(e,t,n){if(!kt(e))return To;let r=kt(t)&&t>e?t:null;return{priced:!0,unit:e,was:r,onSale:r!==null,setTotal:n!=null?e*n:null}}function Ma(e,t,n=""){return!e.priced||e.unit==null?ot:`${n}${qe(e.unit,t)}`}function Fa(e,t){return e.was==null?null:qe(e.was,t)}function _o(e,t,n=1){let r=Fe(e,t);if(r===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};let o=e.reduce((i,a)=>i+a.wheels,0),s=Math.min(...e.map(i=>i.prices[t]));return{priced:!0,unit:s,isFrom:s*o!==r,setTotal:r*n}}var wo={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function $a(e,t,n,r=1){let o=vo(e.prices[n],e.msrpPrices?.[n],4),s=o.setTotal==null?null:o.setTotal*r;if(!t)return{priced:o.priced,unit:o.unit,isFrom:!0,was:o.was,onSale:o.onSale,setTotal:null,fromSetTotal:s};let i=_o(t.components,n,r);return i.priced?{priced:!0,unit:i.unit,isFrom:i.isFrom,was:null,onSale:!1,setTotal:i.setTotal,fromSetTotal:s}:{...wo,fromSetTotal:s}}function Ro(e,t){return!e.priced||e.unit==null?ot:`${e.isFrom?"from ":""}${qe(e.unit,t)}`}function Ua(e,t){return e.was==null?null:qe(e.was,t)}function Va(e,t){return!e.priced||e.unit==null?Co:Ro(e,t)}var Io=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function $n(e){return Io.test(e.trim())}var Un="sf:ga-purchases",Ao=20;function Gn(){return typeof window>"u"||window.parent!==window}function Ze(...e){try{if(Gn()||typeof window.gtag!="function")return;window.gtag(...e)}catch{}}function Lo(e,t){let n=e.config.find(r=>r.gold)?.label;return{item_id:`${e.slug}|${e.finishName}|${e.size}`,item_name:`${e.name.lead}${e.name.accent}`.trim(),...n?{item_variant:n}:{},price:Fe(e.components,t)??0,quantity:e.qty}}function Nt(e,t){return e.filter(st).map(n=>Lo(n,t))}function Ka(e){Ze("event","view_item",{currency:e.currency,value:e.pricePerSet,items:[{item_id:e.itemId,item_name:e.itemName,...e.variant?{item_variant:e.variant}:{},price:e.pricePerSet,quantity:1}]})}function Bn(e,t){let n=Nt([e],t);n.length!==0&&Ze("event","add_to_cart",{currency:t,value:n[0].price*n[0].quantity,items:n})}function qa(e){let t=Nt(e.lines,e.currency);t.length!==0&&Ze("event","begin_checkout",{currency:e.currency,value:e.value,...e.coupon?{coupon:e.coupon}:{},items:t})}var Vn=new Set;function ko(e){if(Vn.has(e))return!1;Vn.add(e);try{let t=JSON.parse(Me.getItem(Un)??"[]");if(t.includes(e))return!1;Me.setItem(Un,JSON.stringify([...t,e].slice(-Ao)))}catch{}return!0}function Xa(e){let t=e.confirmation;if(Gn()||!ko(t.orderNumber))return;let n=t.currency,r=Number(t.grandTotal);Ze("event","purchase",{transaction_id:t.orderNumber,currency:n,value:r,shipping:Number(t.freightCharge),...t.couponCode?{coupon:t.couponCode}:{},items:Nt(e.lines,n)}),e.adsSendTo&&Ze("event","conversion",{send_to:e.adsSendTo,transaction_id:t.orderNumber,currency:n,value:r})}import{jsx as Mo}from"react/jsx-runtime";var Ho=400,Oo=400,Do=1500;function st(e){return(e.components?.length??0)>0}function Yn(e,t){return Fe(e.components,t)}function Ht(e,t){let n=Yn(e,t);return n===null?null:n*e.qty}function zn(e){return e!=="tyre"}var Kn=Po(null);function sl({children:e,preview:t=!1}){let{currency:n,country:r,formatMoney:o}=je(),[s,i]=Z(t),[a,u]=Z([]),[m,y]=Z([]),[d,C]=Z([]),[l,x]=Z(!1),[_,$]=Z(!1),[k,B]=Z(!1),[ae,g]=Z(!1),[L,b]=Z(null),te=$e(r),q=$e("");te.current=te.current||r;let[U,X]=Z(null),[O,Q]=Z(!1),[D,ne]=Z(null),re=$e(void 0),W=j(()=>i(!0),[]),pe=j(()=>i(!1),[]),P=j(()=>i(c=>!c),[]);Se(()=>{t||typeof window>"u"||new URLSearchParams(window.location.search).get("cart")==="open"&&W()},[W,t]);let be=j(c=>{g(!0),zn(c)&&B(!0)},[]),Y=k||a.some(c=>zn(c.kind)),me=ae||a.length>0;Se(()=>{if(t||!Y||l)return;let c=!0;return ee.listWheels().then(S=>{c&&(y(S),x(!0))}),()=>{c=!1}},[t,Y,l]),Se(()=>{if(t||!me||_)return;let c=!0;return ee.listBundles().then(S=>{c&&(C(S),$(!0))}),()=>{c=!1}},[t,me,_]);let V=L?.deliveryOptions??[];Se(()=>{V.length!==0&&ne(c=>c&&V.some(S=>S.id===c)?c:V[0]?.id??null)},[L]);let le=j(()=>a.filter(st).flatMap(c=>Pn(c.components,c.qty)),[a]),J=j(async(c,S)=>{let T=c.trim().toUpperCase();if(!T)return;let h=le();if(h.length===0){X({code:T,valid:!1,message:"Add a wheel to the cart first."});return}Q(!0),re.current=S;try{let A=await ee.validateCoupon({code:T,items:h,currency:n,shippingMethodId:D??void 0,customerEmail:S});X({code:T,valid:A.valid,message:A.message||void 0,effects:A.effects??void 0})}catch{X({code:T,valid:!1,message:"Could not check that code. Please try again."})}finally{Q(!1)}},[le,n,D]),w=j(()=>{X(null),re.current=void 0},[]);Se(()=>{if(!U)return;let c=U.code,S=setTimeout(async()=>{let T=le();if(T.length===0){X(h=>h&&h.code===c?{code:c,valid:!1,message:"Add a wheel to the cart first."}:h);return}Q(!0);try{let h=await ee.validateCoupon({code:c,items:T,currency:n,shippingMethodId:D??void 0,customerEmail:re.current});X(A=>A&&A.code===c?{code:c,valid:h.valid,message:h.message||void 0,effects:h.effects??void 0}:A)}catch{}finally{Q(!1)}},Ho);return()=>clearTimeout(S)},[a,n,D]),Se(()=>{if(t)return;let c=setTimeout(async()=>{let S=le();if(S.length===0){b(null);return}try{b(await ee.quoteCart({items:S,currency:n,shippingMethodId:D??void 0,couponCode:U?.code||void 0,customerEmail:re.current||void 0,country:te.current||void 0,subdivision:q.current||void 0}))}catch{}},Oo);return()=>clearTimeout(c)},[a,n,D,U?.code,r]),Se(()=>{if(t||!s)return;let c=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=c}},[s,t]);let M=j(c=>{u(S=>{let T=S.findIndex(h=>h.id===c.id);return T===-1?[...S,c]:S.map((h,A)=>A===T?{...h,qty:Math.min(At,h.qty+c.qty)}:h)}),Bn(c,n)},[n]),I=j(c=>{u(S=>S.filter(T=>T.id!==c))},[]),Te=j((c,S)=>{let T=Math.max(1,Math.min(At,S));u(h=>h.map(A=>A.id===c?{...A,qty:T}:A))},[]),Ae=j(c=>{u(c)},[]),[fe,We]=Z(null),ve=$e(null);ve.current=fe;let F=$e(null),ce=$e(""),ge=j((c,S)=>{let T=c.trim().toLowerCase();$n(T)&&We(h=>h&&h.email===T&&h.firstName===(S??"")?h:{email:T,firstName:S??""})},[]);Se(()=>{if(t||!fe)return;let c=Fn(a.filter(st),h=>Ht(h,n)===null?ot:o(Ht(h,n),n)),S={email:fe.email,firstName:fe.firstName,currency:n,items:c},T=JSON.stringify(S);if(T!==ce.current)return F.current&&clearTimeout(F.current),F.current=setTimeout(()=>{F.current=null,ce.current=T,ee.captureCart(S).catch(h=>{})},Do),()=>{F.current&&(clearTimeout(F.current),F.current=null)}},[a,fe,n,t]);let Le=j(()=>{F.current&&(clearTimeout(F.current),F.current=null);let c=ve.current;c&&(ce.current="",ee.captureCart({email:c.email,firstName:c.firstName,currency:n,items:[]}).catch(S=>{}))},[n]),he=Wn(()=>{let c=a.reduce((N,f)=>{let ue=Ht(f,n);return ue===null?N:N+ue},0),S=a.some(N=>Yn(N,n)===null),T=a.reduce((N,f)=>N+f.qty,0),h=U?.valid?U.effects:void 0,A=h?Math.min(c,Number(h.discountAmount)):0,ke=L?.bundleDiscount??0,ze=L?.appliedBundles??[],Pe=!!h?.freeShipping,oe=V.find(N=>N.id===D),we=Pe?0:L?.shipping??oe?.amount??0,ye={};for(let N of h?.freeUnits??[])ye[N.partNumber]=(ye[N.partNumber]??0)+N.quantity;let z=L?.tax??null,Ne=L?L.grandTotal:c-A-ke+we;return{sets:T,units:a.reduce((N,f)=>N+(f.components??[]).reduce((ue,Ye)=>ue+Ye.wheels*f.qty,0),0),subtotal:c,hasUnpricedLine:S,discount:A,bundleDiscount:ke,appliedBundles:ze,shipping:we,freeShipping:Pe,freeUnitsByPartNumber:ye,tax:z,grand:Ne,currency:n}},[a,n,U,V,D,L]),_e=Wn(()=>({isOpen:s,open:W,close:pe,toggle:P,items:a,catalog:m,bundles:d,warmCatalog:be,add:M,remove:I,setQty:Te,replaceItems:Ae,identify:ge,clearCapturedCart:Le,coupon:U,applyCoupon:J,removeCoupon:w,couponBusy:O,deliveryOptions:V,shippingMethodId:D,setShippingMethodId:ne,totals:he}),[s,W,pe,P,a,m,d,be,M,I,Te,Ae,ge,Le,U,J,w,O,V,D,he]);return Mo(Kn.Provider,{value:_e,children:e})}function qn(){let e=No(Kn);if(!e)throw new Error("useCart() must be called inside <CartProvider>. Mount the provider in app/layout.tsx.");return e}var Ee="Storefront";import{Fragment as Qe,jsx as K,jsxs as Je}from"react/jsx-runtime";var Fo={eye:Je(Qe,{children:[K("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7S2 12 2 12z"}),K("circle",{cx:"12",cy:"12",r:"2.6"})]}),"eye-off":K("path",{d:"M3 3l18 18M10.6 10.6a2 2 0 002.8 2.8M9.4 5.2A9.7 9.7 0 0112 5c7 0 10 7 10 7a16 16 0 01-3.6 4.4M6.1 6.1A16 16 0 002 12s3 7 10 7a9.6 9.6 0 004.1-.9"}),search:Je(Qe,{children:[K("circle",{cx:"11",cy:"11",r:"7"}),K("path",{d:"M21 21l-3.8-3.8"})]}),"external-link":Je(Qe,{children:[K("path",{d:"M14 4h6v6"}),K("path",{d:"M20 4l-9 9"}),K("path",{d:"M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5"})]}),pencil:Je(Qe,{children:[K("path",{d:"M12 20h9"}),K("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"})]}),trash:Je(Qe,{children:[K("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),K("path",{d:"M10 11v6M14 11v6"})]}),"chevron-right":K("path",{d:"M9 6l6 6-6 6"})};function Ot({name:e,size:t,strokeWidth:n=1.8,rounded:r=!1,className:o,style:s}){return K("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:r?"round":void 0,strokeLinejoin:r?"round":void 0,className:o,style:s,"aria-hidden":"true",children:Fo[e]})}import{cache as jo}from"react";function Xn(e,t,n,r){for(;e.size>=t;){let o,s;for(let[a,u]of e){if(u.expiresAt<=r){o=a;break}s===void 0&&n(a)&&(s=a)}let i=o??s??e.keys().next().value;if(i===void 0)return;e.delete(i)}}var $o=6e4,Uo=5e3,Vo=500,Dt=new Map;async function Go(e){let{host:t,matchesRequestHost:n}=await In();if(!t)return"";let r=await An();return r?`${e}|slug:${encodeURIComponent(t)}/${encodeURIComponent(r)}`:n?`${e}|host:${t}`:`${e}|xhost:${t}`}var Bo=e=>e.includes("|slug:")||e.includes("|xhost:");async function jn(e,t){let n=await Go(e);if(!n)return t();let r=Date.now(),o=Dt.get(n);if(o&&o.expiresAt>r)return o.load;let s=await t(),i=s.outcome.state==="failed"?Uo:$o;return Xn(Dt,Vo,Bo,r),Dt.set(n,{load:s,expiresAt:r+i}),s}var Wo=404;function zo(e){if(e instanceof wt&&e.status===Wo)return{state:"absent"};let t=e instanceof wt?e.status:-1,n=e instanceof Error?e.message:String(e);return{state:"failed",status:t,detail:n}}var Yo="[storefront:chrome-load-failed]";function Ko(e,t){console.error(`${Yo} ${e} status=${t.status} \u2014 serving fallback chrome`,t.detail)}async function Zn(e,t,n,r){try{let o=await t();return r?.(o)?{value:o,outcome:{state:"absent"}}:{value:o,outcome:{state:"ok"}}}catch(o){let s=zo(o);return s.state==="failed"&&Ko(e,s),{value:n,outcome:s}}}function qo(e){return e==="production"?"silent":"banner"}var hl=qo("production");var Qn=["instagram","facebook","tiktok","youtube","x","linkedin","pinterest","whatsapp"],Xo={instagram:"Instagram",facebook:"Facebook",tiktok:"TikTok",youtube:"YouTube",x:"X",linkedin:"LinkedIn",pinterest:"Pinterest",whatsapp:"WhatsApp"},it={};function Jn(e){if(!e||typeof e!="object")return it;let t={};for(let n of Qn){let r=e[n];if(typeof r!="string")continue;let o=r.trim();!o||!/^https?:\/\//i.test(o)||(t[n]=o)}return t}function xl(e){return Qn.flatMap(t=>{let n=e[t];return n?[{platform:t,href:n,label:Xo[t]}]:[]})}var bl=e=>`${e}_url`;function Zo(e){return e?.trim()||Ee}function Qo(e,t){return e?.trim()||t}function Rl({legalName:e,foundedYear:t,siteName:n},r=new Date().getFullYear()){let o=Qo(e,n);return`\xA9 ${t&&t<r?`${t}\u2013${r}`:`${r}`} ${o}`}var Jo={name:Ee,legalName:null,foundedYear:null,faviconUrl:null,currencies:[],defaultCurrency:null,countries:[],defaultCountry:null,commerceEnabled:!0,cardPayments:!1,paymentMethods:[],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,mapsApiKey:null,mapsMapId:null,socialLinks:it},Il=jo(async()=>jn("site",()=>Zn("site",async()=>{let e=await ee.getSite();return{name:Zo(e.name),legalName:e.legalName?.trim()||null,foundedYear:e.foundedYear??null,faviconUrl:e.faviconUrl??null,currencies:e.currencies??[],defaultCurrency:e.defaultCurrency??null,countries:e.countries??[],defaultCountry:e.defaultCountry??null,commerceEnabled:e.commerceEnabled??!0,cardPayments:e.cardPayments??!1,paymentMethods:e.paymentMethods??(e.cardPayments?["card"]:[]),paypalClientId:e.paypalClientId??null,paypalEnvironment:e.paypalEnvironment??null,squareApplicationId:e.squareApplicationId??null,squareLocationId:e.squareLocationId??null,squareEnvironment:e.squareEnvironment??null,ga4MeasurementId:e.ga4MeasurementId??null,googleAdsId:e.googleAdsId??null,googleAdsConversionLabel:(e.googleAdsId?e.googleAdsConversionLabel:null)??null,metaPixelId:e.metaPixelId??null,mapsApiKey:e.mapsApiKey??null,mapsMapId:e.mapsMapId??null,socialLinks:Jn(e.socialLinks)}},Jo)));var Al={name:Ee,legalName:null,foundedYear:null,faviconUrl:null,currencies:[{code:"USD",symbol:"$",decimalPlaces:2,isDefault:!0}],defaultCurrency:"USD",countries:[{code:"US",name:"United States",currency:"USD",url:"",isDefault:!0,chargeTax:!1,taxDisplay:"none",taxName:"",taxRate:null,postalLabel:"Zip Code"}],defaultCountry:"US",commerceEnabled:!0,cardPayments:!0,paymentMethods:["card"],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,mapsApiKey:null,mapsMapId:null,socialLinks:it};import{createContext as ra,useCallback as H,useContext as oa,useMemo as sa,useState as so}from"react";import{forwardRef as es}from"react";import{jsx as rs}from"react/jsx-runtime";function ts(e){if(typeof e=="string")return e;let t=e.query?`?${new URLSearchParams(e.query).toString()}`:"",n=e.hash?e.hash.startsWith("#")?e.hash:`#${e.hash}`:"";return`${e.pathname??""}${t}${n}`}var ns=es(function({href:t,prefetch:n,replace:r,scroll:o,shallow:s,legacyBehavior:i,passHref:a,locale:u,onClick:m,children:y,...d},C){let l=x=>{m?.(x),!(x.defaultPrevented||d.target==="_blank")&&x.preventDefault()};return rs("a",{ref:C,href:ts(t),onClick:l,...d,children:y})}),se=ns;function er(){return"/edit"}import{useEffect as bt,useState as St}from"react";import{createContext as os,useCallback as Mt,useContext as ss,useEffect as is,useMemo as as,useState as ls}from"react";import{jsx as us}from"react/jsx-runtime";var cs={isOpen:!1,open:()=>{},close:()=>{},toggle:()=>{}},tr=os(cs);function Dl({children:e,shortcut:t=!0}){let[n,r]=ls(!1),o=Mt(()=>r(!0),[]),s=Mt(()=>r(!1),[]),i=Mt(()=>r(u=>!u),[]);is(()=>{if(!t)return;let u=m=>{(m.metaKey||m.ctrlKey)&&(m.key==="k"||m.key==="K")&&(m.preventDefault(),r(y=>!y))};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[t]);let a=as(()=>({isOpen:n,open:o,close:s,toggle:i}),[n,o,s,i]);return us(tr.Provider,{value:a,children:e})}function nr(){return ss(tr)}import{useEffect as ms,useRef as fs,useState as gs}from"react";var ds=[{code:"US",name:"United States"},{code:"GB",name:"United Kingdom"},{code:"AU",name:"Australia"},{code:"CA",name:"Canada"},{code:"IE",name:"Ireland"},{code:"NZ",name:"New Zealand"},{code:"DE",name:"Germany"},{code:"FR",name:"France"},{code:"IT",name:"Italy"},{code:"ES",name:"Spain"},{code:"NL",name:"Netherlands"},{code:"BE",name:"Belgium"},{code:"AT",name:"Austria"},{code:"CH",name:"Switzerland"},{code:"SE",name:"Sweden"},{code:"NO",name:"Norway"},{code:"DK",name:"Denmark"},{code:"FI",name:"Finland"},{code:"PT",name:"Portugal"},{code:"PL",name:"Poland"},{code:"JP",name:"Japan"},{code:"SG",name:"Singapore"},{code:"AE",name:"United Arab Emirates"},{code:"HK",name:"Hong Kong"},{code:"ZA",name:"South Africa"}],ps=Object.fromEntries(ds.map(e=>[e.code,e.name]));function rr(e){return ps[e]??e}import{jsx as Ue,jsxs as Ft}from"react/jsx-runtime";function or(e,t,n){let r=new Map(e.map(o=>[o.code,o]));return(t?.length?t:e.map(o=>o.code)).map(o=>{let s=r.get(o);return{code:o,name:s?.name||rr(o),currency:s?.currency,url:s?.url||n?.[o]||""}})}function sr(e){let{countries:t}=je();return or(t,e).length>0}function $t({urls:e,countries:t}={}){let{country:n,setCountry:r,countries:o}=je(),[s,i]=gs(!1),a=fs(null);ms(()=>{if(!s)return;function d(l){a.current&&!a.current.contains(l.target)&&i(!1)}function C(l){l.key==="Escape"&&i(!1)}return document.addEventListener("mousedown",d),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",C)}},[s]);let u=or(o,t,e),m=u.find(d=>d.code===n)??u[0];if(!m)return null;function y(d){let C=(e?u.find(l=>l.code===d)?.url:"")?.trim();if(C){window.location.href=C;return}o.some(l=>l.code===d)&&r(d),i(!1)}return Ft("div",{ref:a,className:"relative",children:[Ft("button",{type:"button","aria-haspopup":"listbox","aria-expanded":s,"aria-label":`Region: ${m.name}. Click to change.`,onClick:()=>i(d=>!d),suppressHydrationWarning:!0,className:"inline-flex items-center gap-2 whitespace-nowrap border border-fg-dim px-2.5 py-1.5 font-mono text-[13px] uppercase tracking-[0.18em] transition-colors hover:border-fg",style:{color:"color-mix(in oklab, currentColor 80%, transparent)"},children:[Ue("span",{children:m.name}),Ue("span",{"aria-hidden":!0,className:`text-[11px] opacity-70 transition-transform ${s?"rotate-180":""}`,children:"\u25BE"})]}),s&&Ue("ul",{role:"listbox","aria-label":"Choose region",className:"absolute right-0 top-full z-[200] mt-2 flex min-w-[240px] flex-col border border-line bg-surface text-fg",children:u.map((d,C)=>{let l=d.code===n;return Ue("li",{role:"option","aria-selected":l,children:Ft("button",{type:"button",onClick:()=>y(d.code),className:["flex w-full items-center gap-3 px-3.5 py-3 text-left transition-colors","font-mono text-[13px] uppercase tracking-[0.18em]","hover:bg-surface-2 hover:text-fg",C<u.length-1?"border-b border-line":"",l?"text-accent":""].join(" "),style:l?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"},children:[Ue("span",{className:"flex-1 whitespace-nowrap",children:d.name}),d.currency&&Ue("span",{className:"ml-auto text-[12px] opacity-50",children:d.currency})]})},d.code)})})]})}import{useEffect as hs,useId as ys,useRef as ir,useState as xs}from"react";function at(e){let t=(e??"").trim();return t===""||t==="#"}import{jsx as G,jsxs as Ut}from"react/jsx-runtime";function lt({item:e,mobile:t=!1,onNavigate:n,dropdownAlign:r="start"}){let[o,s]=xs(!1),i=ys(),a=ir(null),u=ir(null),m=e.dropdownItems.length>0,y=!at(e.href);hs(()=>{if(!o)return;let l=a.current?.ownerDocument??document,x=_=>{a.current?.contains(_.target)||s(!1)};return l.addEventListener("pointerdown",x),()=>l.removeEventListener("pointerdown",x)},[o]);let d=()=>{s(!1),n?.()};if(!m)return y?G(se,{href:e.href,onClick:d,className:t?"flex min-h-11 items-center font-display text-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent":"whitespace-nowrap opacity-80 transition-opacity hover:opacity-100 focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label}):G("span",{className:t?"flex min-h-11 items-center font-display text-3xl":"whitespace-nowrap opacity-80",children:e.label});let C=G("button",{ref:u,type:"button","aria-label":`${o?"Close":"Open"} ${e.plainLabel} menu`,"aria-expanded":o,"aria-controls":i,onClick:()=>s(l=>!l),className:t?"flex h-11 w-11 shrink-0 items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent":"flex h-8 w-8 shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:G("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":"true",className:`transition-transform ${o?"rotate-180":""}`,children:G("path",{d:"m3 5 4 4 4-4"})})});return t?Ut("div",{ref:a,children:[Ut("div",{className:"flex min-h-11 items-center justify-between gap-3",children:[y?G(se,{href:e.href,onClick:d,className:"min-w-0 flex-1 font-display text-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label}):G("span",{className:"min-w-0 flex-1 font-display text-3xl",children:e.label}),C]}),o?G("div",{id:i,className:"mt-3 flex flex-col border-l border-line pl-5",children:e.dropdownItems.map((l,x)=>at(l.href)?G("span",{className:"flex min-h-11 items-center text-base opacity-80",children:l.label},`${l.href}-${x}`):G(se,{href:l.href,onClick:d,className:"flex min-h-11 items-center text-base opacity-80 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:l.label},`${l.href}-${x}`))}):null]}):Ut("div",{ref:a,className:"relative flex items-center whitespace-nowrap",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onBlurCapture:l=>{l.currentTarget.contains(l.relatedTarget)||s(!1)},onKeyDown:l=>{l.key==="Escape"&&(s(!1),u.current?.focus())},children:[y?G(se,{href:e.href,onClick:d,onFocus:()=>s(!0),className:"opacity-80 transition-opacity hover:opacity-100 focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label}):G("span",{className:"opacity-80",children:e.label}),C,o?G("div",{id:i,className:`absolute top-full z-[60] w-72 pt-3 text-fg ${r==="end"?"right-0":r==="center"?"left-1/2 -translate-x-1/2":"left-0"}`,children:G("div",{className:"overflow-hidden rounded-lg border border-line bg-bg p-2 shadow-xl",children:e.dropdownItems.map((l,x)=>at(l.href)?G("span",{className:"flex min-h-11 items-center rounded-md px-4 py-2 text-sm opacity-80",children:l.label},`${l.href}-${x}`):G(se,{href:l.href,onClick:d,className:"flex min-h-11 items-center rounded-md px-4 py-2 text-sm opacity-80 transition-[background,opacity] hover:bg-[var(--card-bg)] hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:l.label},`${l.href}-${x}`))})}):null]})}import{useEffect as ct,useRef as lr,useState as ut}from"react";var et=new Map,bs=64;async function Ss(e){if(!_n())return null;try{let t=await fetch(`${Rn()}/logo-analysis.json?url=${encodeURIComponent(e)}`);if(!t.ok)return null;let n=await t.json();if(!n||typeof n!="object")return null;let{reversed:r,inkIsDark:o}=n;return typeof r!="string"?null:{reversed:r,inkIsDark:typeof o=="boolean"?o:null}}catch{return null}}function ar(e){let t=et.get(e);if(t)return t;let n=Ss(e);if(et.set(e,n),et.size>bs){let r=et.keys().next();r.done||et.delete(r.value)}return n}import{jsx as cr,jsxs as ur}from"react/jsx-runtime";var Es={small:54,medium:66,large:84},Cs=44,Ts=202/22,oc=16,sc=140,vs=.88,_s="invert(1)";function Vt({variant:e="header",scrolled:t=!0,src:n,reverse:r=!1,onLightSurface:o,reversedSrc:s,inkIsDark:i,size:a="medium",sizePx:u,wordmark:m,siteName:y=Ee,fitToContainer:d=!1}){let C=m&&m.trim()?m.trim():y,[l,x]=ut(!1),_=lr(null),$=w=>{_.current=w};ct(()=>{let w=_.current?.ownerDocument??document,M=()=>{x(w.documentElement.getAttribute("data-theme")==="light")};M();let I=new MutationObserver(M);return I.observe(w.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>I.disconnect()},[]);let k=n&&n.trim()?n.trim():null,B=!!k&&wn(k),ae=o??(l&&t),g=r&&B&&k&&s!=null?{reversed:s,inkIsDark:i??null}:null,L=g!==null,[b,te]=ut(null);ct(()=>{if(!r||!k||!B||L){te(null);return}let w=!1;return te(null),ar(k).then(M=>{w||te(M)}),()=>{w=!0}},[r,k,B,L]);let q=g??b,U=!!q&&q.inkIsDark!==null&&(ae?!q.inkIsDark:q.inkIsDark),X=r&&!!k&&!B&&!ae,O=U&&q?q.reversed:k,Q=O?[O]:[],[D,ne]=ut(0);ct(()=>{ne(0)},[k,U]);let re=e==="footer"?Cs:Es[a],W=u&&u>0?u:re,pe=Math.round(W*Ts),P=D<Q.length?Q[D]:null,[be,Y]=ut(O),me=P!==null&&P===be,V=lr(null);ct(()=>{let w=V.current;if(!w||!w.complete)return;if(w.naturalWidth>0||w.naturalHeight>0){Y(P);return}let M=!1;return w.decode().then(()=>!M&&Y(P),()=>!M&&ne(I=>I+1)),()=>{M=!0}},[P]);let le=d?`min(${W}px, calc(100cqi / ${((C.length+1)*vs).toFixed(2)}))`:`${W}px`;return ur("span",{ref:$,className:"inline-flex items-center",children:[!me&&ur("span",{className:"font-display font-bold tracking-[0.18em] whitespace-nowrap",style:{fontSize:le,lineHeight:1},"aria-label":C,children:[C,cr("span",{className:"text-accent",children:"."})]}),P&&cr("img",{ref:V,src:P,alt:C,width:pe,height:W,className:"shrink-0 object-contain",style:{...me?{height:`${W}px`,width:"auto",...d?{maxWidth:"100cqi"}:{}}:{display:"none"},...X?{filter:_s}:{}},onLoad:()=>Y(P),onError:()=>ne(w=>w+1)},P)]})}var dr="Menu Item";var lc="Menu",cc="Link a menu in the inspector \u2192",uc="This menu has no links yet \u2014 add them in Storefront \u2192 Menus.",dc="This column isn't linked to a menu, so the preview shows placeholder links. Pick a menu above.";function pc(e){return`\u201C${e}\u201D no longer exists in Storefront \u2192 Menus, so the preview shows placeholder links. Pick another menu.`}var mc="The menu linked here no longer exists in Storefront \u2192 Menus, so the header shows placeholder links. Pick another menu.";import{jsx as ws}from"react/jsx-runtime";function Gt(){return ws("span",{className:"opacity-50",children:dr})}import{Fragment as Rs,jsx as Bt}from"react/jsx-runtime";function pr({className:e=""}){return Bt("sup",{className:`text-accent tracking-normal ${e}`,children:"\xAE"})}function Wt(e){if(!e.includes("\xAE"))return e;let t=e.split("\xAE"),n=[];return t.forEach((r,o)=>{r&&n.push(r),o<t.length-1&&n.push(Bt(pr,{},`r${o}`))}),Bt(Rs,{children:n})}var xc=pr;import{Fragment as Is,jsx as zt,jsxs as As}from"react/jsx-runtime";var mr=As(Is,{children:[zt("circle",{cx:"9",cy:"20",r:"1.3"}),zt("circle",{cx:"18",cy:"20",r:"1.3"}),zt("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"})]});import{Fragment as Ls,jsx as de,jsxs as Yt}from"react/jsx-runtime";var Kt={search:"Search",account:"Account",cart:"Bag"},qt="whitespace-nowrap";function fr({onClick:e,count:t,asText:n,className:r}){return de("button",{type:"button",onClick:e,"aria-label":`Open cart, ${t} item${t===1?"":"s"}`,className:`mono-eyebrow-ctl inline-flex items-center gap-1.5 opacity-80 transition-opacity hover:opacity-100 ${r??""}`,children:n?Yt("span",{className:qt,children:[Kt.cart,t>0?` ${t}`:""]}):Yt(Ls,{children:[de("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:mr}),de("span",{className:"rounded-lg border border-current px-1.5 font-mono text-[12px]",children:t})]})})}function gr({asText:e,className:t}){return de(se,{href:"/account","aria-label":"Account",className:`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${t??""}`,children:e?de("span",{className:qt,children:Kt.account}):Yt("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[de("circle",{cx:"12",cy:"8",r:"3.4"}),de("path",{d:"M5 20a7 7 0 0 1 14 0"})]})})}function hr({onClick:e,asText:t,className:n}){return de("button",{type:"button",onClick:e,"aria-label":"Search",title:"Search (\u2318K)",className:`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${n??""}`,children:t?de("span",{className:qt,children:Kt.search}):de(Ot,{name:"search",size:18,strokeWidth:1.6,rounded:!0})})}import{useEffect as tt,useRef as Ms,useState as Sr}from"react";var ks=new Set(["Hero","HeroSingle","IntroBleed"]),dt={min:56,max:140,default:88},Ac={min:0,max:120,step:2,default:28},Lc=`var(--sf-header-h, ${dt.default}px)`,Xt="--sf-header-set-h",jt="--sf-header-h",yr=`var(${Xt}, ${dt.default}px)`,kc="sf-header-clearance",Pc="sf-sticky-underheader";function Zt(e){return e?.find(t=>t?.type&&t.type!==Ke)??null}function xr(e){let t=Zt(e)?.type;return!t||!ks.has(t)}function br(e){return!xr(e)}function Nc(e){return!!e?.some(t=>t?.type===Ke)}function Hc(e){return!e||e.length===0?!1:!e.some(t=>t?.type===Ke||t?.type===Rt)}var Ps=["auto","shared","own"],Ns="auto",Hs="topSpace",Oc="data-top-space";function Os(e){return Ps.includes(e)?e:Ns}function Ds(e,t){let n=Os(e?.props?.[Hs]);return n==="own"?!0:n==="shared"?!1:xr(t)}function Dc(e,t){return Ds(e,t)?"own":null}function Er({stickyMode:e,heightPx:t}){let n=Ms(null),[r,o]=Sr(!1),[s,i]=Sr(!1);return tt(()=>{let a=n.current?.ownerDocument?.defaultView??window,u=t,m=a.scrollY;function y(){let d=a.scrollY;o(d>10),e==="on_scroll_up"&&(d<=u?i(!1):d>m+4?i(!0):d<m-4&&i(!1)),m=d}return y(),a.addEventListener("scroll",y,{passive:!0}),()=>a.removeEventListener("scroll",y)},[e,t]),tt(()=>{e!=="on_scroll_up"&&i(!1)},[e]),tt(()=>{let a=n.current?.ownerDocument?.documentElement;a&&a.style.setProperty(Xt,`${t}px`)},[t]),tt(()=>{let a=n.current,u=a?.ownerDocument,m=u?.defaultView;if(!a||!u||!m)return;let y="",d=l=>{let x=`${Math.round(l)}px`;x!==y&&(y=x,u.documentElement.style.setProperty(jt,x),u.body?.style.setProperty(jt,x))};if(typeof m.ResizeObserver!="function"){d(a.getBoundingClientRect().height);return}let C=new m.ResizeObserver(l=>{let x=l[0]?.borderBoxSize?.[0];d(x?x.blockSize:a.getBoundingClientRect().height)});return C.observe(a),()=>C.disconnect()},[]),tt(()=>{let a=n.current?.ownerDocument?.documentElement;a&&a.setAttribute("data-header-sticky",e)},[e]),{headerRef:n,scrolled:r,navHidden:s}}import{useEffect as Si,useRef as Ei,useState as Mr}from"react";var rn="storefront-theme",Vc="sf:theme-mode",Gc="sf:theme-switch",Bc="hide",on="light";function Fs(e){return e>=7&&e<18}function Cr(e){let{mode:t,override:n,switchShown:r,hour:o}=e;return r&&(n==="light"||n==="dark")?n:t==="auto"?Fs(o)?"light":"dark":t==="light"?"light":"dark"}var Ve={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},$s=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],ft={selected:0,themes:$s};function Tr(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ft}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function Qt(e,t,n){let r=mt(e),o=mt(t);if(r===null||o===null)return e;let s=i=>Math.max(0,Math.min(255,Math.round(i))).toString(16).padStart(2,"0");return`#${r.map((i,a)=>s(i+(o[a]-i)*n)).join("")}`}var Us={light:"#ffffff",dark:"#0a0a0a"},Wc=["light","dark"];function zc(e,t){let n=Us[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:Qt(e,r,.1),line:Qt(e,r,.22),muted:Qt(n,e,.35),brandInk:t}}function gt(e){let t=Tr(e);return t.themes[t.selected]}function vr(e){return{text:e.text,accent:e.accent,background:e.background||Ve.background,surface:e.surface||Ve.surface,line:e.line||Ve.line,muted:e.muted||Ve.muted}}function mt(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!t)return null;let n=t[1].length===3?[...t[1]].map(i=>i+i).join(""):t[1],[r,o,s]=[0,2,4].map(i=>parseInt(n.slice(i,i+2),16));return[r,o,s]}function nn(e){let t=mt(e);if(t===null)return null;let[n,r,o]=t.map(s=>{let i=s/255;return i<=.04045?i/12.92:((i+.055)/1.055)**2.4});return .2126*n+.7152*r+.0722*o}var Vs=.4,Gs=4.5,Bs=3;function Ws(e,t){let n=nn(e),r=nn(t);if(n===null||r===null)return null;let[o,s]=n>=r?[n,r]:[r,n];return(o+.05)/(s+.05)}var Yc={good:"Good","large-only":"Large text only",hard:"Hard to read"};function Kc(e){return e>=Gs?"good":e>=Bs?"large-only":"hard"}var Jt=["#000000","#ffffff"];function ht(e){let t=Jt[0],n=-1;for(let r of Jt){let o=Ws(e,r);if(o===null)return Jt[0];o>n&&(n=o,t=r)}return t}var zs=[.25,.4,.55];function qc(e){let t=mt(e);return t===null?[]:zs.map(n=>"#"+t.map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function Xc(e){let t=gt(e),n={"--theme-fg":t.text},r=nn(t.text);return(r===null||r>=Vs)&&(n["--overlay-fg"]=t.text),n}var Ys=82;function sn(e){return`color-mix(in srgb, ${e} ${Ys}%, #000)`}function jc(e){let t=gt(e);return{"--theme-accent":t.accent,"--theme-accent-2":sn(t.accent),"--theme-accent-ink":ht(t.accent)}}function _r(e){let t=e?.button;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function Zc(e){let t=gt(e),n=_r(t),r=wr(t);if(n===null&&r===null)return{};let o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=sn(n)),o["--theme-btn-ink"]=r??ht(n),o}function wr(e){let t=e?.buttonInk;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function Qc(e,t){return wr(e)??ht(_r(e)??t)}function Jc(e){let t={};return Tr(e).themes.forEach((n,r)=>{let o=vr(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=sn(o.accent),t[`--theme-preset-${r}-accent-ink`]=ht(o.accent),t[`--theme-preset-${r}-bg`]=o.background,t[`--theme-preset-${r}-fg`]=o.text,t[`--theme-preset-${r}-surface`]=o.surface,t[`--theme-preset-${r}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${r}-line`]=o.line,t[`--theme-preset-${r}-muted`]=o.muted}),t}var Rr=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function Ir(e){let t=vr(gt(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==Ve.surface||t.line!==Ve.line)&&(r["--theme-surface-2"]=n),r}var Ks=["heading","body","label"];function eu(e){if(!e)return null;for(let t of Ks)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}var Ar=["headingLarge","headingMedium","headingSmall","accent","body","label"];var an={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},qs=8,Xs=200,tu=1;function js(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.round(e);return t>=qs&&t<=Xs?t:null}function Zs(e){let t={};for(let n of Ar)t[n]=js(e?.[n]);return t}function nu(e){let t=Zs(e),n={};for(let r of Ar){let o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}var Qs=["square","small","large"],Js="small";function ru(e){return Qs.includes(e??"")?e:Js}var ei=0,ti=40,ou={square:0,small:null,large:16},ni={"--sf-card-radius":1,"--sf-button-radius":.5,"--radius":.5,"--radius-xs":.25,"--radius-sm":.5,"--radius-md":.75,"--radius-lg":1,"--radius-xl":1.25,"--radius-2xl":1.5,"--radius-3xl":2,"--radius-4xl":2.5};function ri(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;let t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(ti,Math.max(ei,Math.round(t))):null}function su(e){let t=ri(e);return t===null?{}:Object.fromEntries(Object.entries(ni).map(([n,r])=>{let o=t*r/16;return[n,o===0?"0":`${o}rem`]}))}var oi=["none","soft","lifted"],si="soft",Lr="none",ii=["tight","normal","roomy"],ai="normal",yt="normal",li=["none","lift","highlight"],ci="lift",ui="highlight",kr="#141416";function Pr(e){return oi.includes(e??"")?e:si}function di(e){return ii.includes(e??"")?e:ai}function Nr(e){return li.includes(e??"")?e:ci}function pi(e){return/^#[0-9a-fA-F]{6}$/.test(e??"")?e.toLowerCase():kr}function iu(e){let t=Pr(e);return t===Lr?void 0:t}function au(e){let t=di(e);return t===yt?void 0:t}function lu(e){let t=Nr(e);return t===ui?void 0:t}function cu(e,t,n){let r=pi(t);return r===kr?{}:Pr(e)!==Lr||Nr(n)==="lift"?{"--sf-shadow-color":r}:{}}var mi=["normal","tight","compressed"],nt="normal";function Hr(e){return mi.includes(e??"")?e:nt}function uu(e){let t=Hr(e);return t===nt?void 0:t}function du(e){switch(Hr(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}var ln={case:"authored",weight:null,weightStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},en=100,tn=900,fi=24,gi=200;function pt(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function cn(e){let t=pt(e?.weight,en,tn),n=e?.case==="sentence"?"sentence":"authored",r=s=>s==null?t:pt(s,en,tn),o=s=>s==="sentence"?"sentence":s==="authored"?"authored":n;return{case:n,weight:t,weightStrong:pt(e?.weightStrong,en,tn),maxPx:pt(e?.maxPx,fi,gi),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function pu(e){let t=cn(e),n={};return t.case==="sentence"&&(n["--sf-heading-case"]="none"),t.weight!==null&&(n["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(n["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(n["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(n["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(n["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(n["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(n["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),n}function mu(e){return cn({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}function fu(e){let t=cn(e);return{heading_case:t.case,heading_weight:t.weight,heading_weight_strong:t.weightStrong,heading_max_px:t.maxPx,heading_2_weight:t.weight2,heading_3_weight:t.weight3,heading_2_case:t.case2,heading_3_case:t.case3}}var Ge="data-theme",Or="light";function un(e){return e.getAttribute(Ge)===Or?"light":"dark"}function dn(e,t){return un(e)===t?!1:(t==="light"?e.setAttribute(Ge,Or):e.removeAttribute(Ge),!0)}function hi(e){return _t(e).getItem(rn)}function Dr(e,t){_t(e).setItem(rn,t)}function yi(e,t,n=new Date().getHours()){return Cr({mode:t.mode,override:hi(e),switchShown:t.switchShown,hour:n})}function xu(e,t){let n=e.documentElement;if(!n)return()=>{};let r=()=>dn(n,yi(e,t));r();let o=e.defaultView?.MutationObserver;if(!o)return()=>{};let s=new o(r);return s.observe(n,{attributes:!0,attributeFilter:[Ge]}),()=>s.disconnect()}var xi="style";function bi(e,t){let n=Ir(t),r=!1;for(let o of Rr){let s=n[o]??"";e.style.getPropertyValue(o)!==s&&(s?e.style.setProperty(o,s):e.style.removeProperty(o),r=!0)}return r}function bu(e,t){let n=e.body;if(!n)return()=>{};let r=()=>bi(n,t);r();let o=e.defaultView?.MutationObserver;if(!o)return()=>{};let s=new o(r);return s.observe(n,{attributes:!0,attributeFilter:[xi]}),()=>s.disconnect()}import{jsx as Fr}from"react/jsx-runtime";function pn(){let[e,t]=Mr("dark"),[n,r]=Mr(!1),o=Ei(null),s=()=>o.current?.ownerDocument??document;Si(()=>{let a=s().documentElement,u=()=>t(un(a));u(),r(!0);let m=new MutationObserver(u);return m.observe(a,{attributes:!0,attributeFilter:[Ge]}),()=>m.disconnect()},[]);function i(){let a=s(),u=e==="dark"?"light":"dark";t(u),dn(a.documentElement,u),Dr(a,u)}return Fr("button",{ref:o,type:"button",onClick:i,"aria-label":`Switch to ${e==="dark"?"light":"dark"} theme`,"aria-pressed":e==="light",className:"relative inline-flex h-5 w-9 items-center rounded-full border border-line bg-surface-2 p-0.5",children:Fr("span",{className:"block h-3.5 w-3.5 rounded-full bg-accent transition-transform duration-200 ease-out",style:{transform:n&&e==="light"?"translateX(16px)":"translateX(0)"}})})}function $r({editorPreview:e,hasPreviewSettings:t,hasInitialSettings:n}){return!e&&!t&&!n}var xe={min:1e3,max:2e3,step:50,default:1600};function Ur(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}function wu(e,t){if(e!==!1)return null;let n=typeof t=="number"?t:xe.default;return Ur(n)}var Vr="--sf-site-width",xt=`var(${Vr},${xe.default}px)`,Ru=`max-w-[${xt}]`,Iu=`max-w-[${xe.default}px]`;function Ci(e){return typeof e!="number"||!Number.isFinite(e)?xe.default:Math.round(Math.min(Math.max(e,xe.min),xe.max))}function Au(e){let t=Ci(e);return t===xe.default?{}:{[Vr]:`${t}px`}}var rt={min:0,max:80,step:4,default:40},Gr="--sf-site-gutter",ie=`var(${Gr},${rt.default}px)`,Ti=`px-[${ie}]`;var Ce={md:`min(24px,${ie})`,sm:`min(20px,${ie})`,frame:`min(24px,${ie})`,tabs:`min(16px,${ie})`},Lu=[[`max-[1100px]:px-[${Ce.md}]`,"max-[1100px]:px-6"],[`max-[1100px]:px-[${Ce.tabs}]`,"max-[1100px]:px-4"],[`max-[960px]:px-[${Ce.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${Ce.md}]`,"max-[900px]:px-6"],[`max-[800px]:px-[${Ce.md}]`,"max-[800px]:px-6"],[`max-[720px]:px-[${Ce.sm}]`,"max-[720px]:px-5"],[`max-[800px]:px-[${Ce.sm}]`,"max-[800px]:px-5"],[`max-[640px]:px-[${Ce.sm}]`,"max-[640px]:px-5"],[`min-[800px]:px-[${ie}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${ie})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${ie})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${ie})]`,"max-[720px]:-mx-5"],[`-mx-[${ie}]`,"-mx-10"],[Ti,"px-10"]];function vi(e){return typeof e!="number"||!Number.isFinite(e)?rt.default:Math.round(Math.min(Math.max(e,rt.min),rt.max))}function ku(e){let t=vi(e);return t===rt.default?{}:{[Gr]:`${t}px`}}var Br=`min(var(--sf-page-cap,${xt}),${xt})`,Pu=`max-w-[${Br}]`,Nu=`max-w-[min(var(--sf-page-cap,${xe.default}px),${xe.default}px)]`,Wr="--sf-hero-cap",_i=`var(${Wr},none)`,Hu=`max-w-[${_i}]`,mn="--sf-hero-bleed-m",fn="--sf-hero-bleed-w",Ou=`var(${mn},calc(50% - 50vw))`,Du=`var(${fn},100vw)`,Mu=`mx-[var(${mn},calc(50%_-_50vw))]`,Fu=`w-[var(${fn},100vw)]`,wi="--sf-hero-chrome-x",Ri="--sf-hero-chrome-cap";function $u(e){return e===!0?{[Wr]:Br,[mn]:"auto",[fn]:"100%",[wi]:"24px",[Ri]:"none"}:{}}var gn=`calc(${xt} - ${ie}*2)`,Uu=`max-w-[${gn.replace(/ /g,"_")}]`;var Ii="--sf-chrome-cap",Ai=`var(${Ii},${gn})`,Vu="data-page-width";function Gu(e){return e==="full"?"full":null}function zr(e){return e==="full"?null:Ur(e==="content"?gn:Ai)}function Yr(e){if(e==="full")return"full";if(e==="content")return"content"}var Li="sf-section-accent",Wu="Color",zu=new Set(["CategoryBar","DocTabs"]),Yu=new Set(["Flex"]),ki=0;function Pi(e){return e===-1?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:ki}function Ku(e){return e??-1}function hn(e){let t=`--theme-preset-${e}`;return{"--sf-sec-accent":`var(${t}-accent)`,"--sf-sec-accent-2":`var(${t}-accent-2)`,"--sf-sec-accent-ink":`var(${t}-accent-ink)`,"--sf-sec-bg":`var(${t}-bg, var(--theme-bg))`,"--sf-sec-fg":`var(${t}-fg, var(--theme-fg))`,"--sf-sec-surface":`var(${t}-surface, var(--theme-surface))`,"--sf-sec-surface-2":`var(${t}-surface-2, var(--theme-surface-2))`,"--sf-sec-line":`var(${t}-line, var(--theme-line))`,"--sf-sec-muted":`var(${t}-muted, var(--theme-muted))`}}function qu(e){let t=Pi(e.sectionAccent);return t===null?null:{className:Li,style:hn(t)}}var Zu=-1,Hi="sf-header-theme";function Oi(e){return typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}function Kr(e){let t=Oi(e);return t===null?null:{className:Hi,style:hn(t)}}function qr(e,t,n){return e.some(o=>(typeof o=="object"?o.value:o)===n)?n:t}var Di="overlay",Mi=[{label:"Copy over image",value:"overlay"},{label:"Copy above image",value:"stacked"}];function Xr(e){return qr(Mi,Di,e)}var td={desktop:40,mobile:45,min:20,max:80,step:5};function nd(e,t){return`${typeof e=="number"?e:t}%`}var jr="data-lead-ink",Zr="data-header-ink";var Fi="auto";function $i(e){return e.type==="IntroBleed"?Xr(e.props?.layout)!=="stacked":!0}function id(e){let t=Zt(e);return t&&br(e)&&$i(t)?"light":null}function Qr(e){return e==="light"||e==="dark"?e:Fi}import{Fragment as Et,jsx as v,jsxs as R}from"react/jsx-runtime";var Jr={stacked:{grid:"hidden min-[1501px]:grid",flex:"hidden min-[1501px]:flex"},inline:{grid:"hidden min-[801px]:grid",flex:"hidden min-[801px]:flex"}},Vi=Array.from({length:6},()=>({href:"#",label:v(Gt,{})}));function yn({previewSettings:e,initialSettings:t,editorPreview:n,showThemeToggle:r,wordmark:o,hideLogo:s,hideMenu:i,siteName:a,commerceEnabled:u=!0}={}){let m=er(),[y,d]=St(!1);bt(()=>{let p=_e.current?.ownerDocument??document,E=()=>d(p.querySelector(`[${jr}="light"]`)!=null);E();let De=requestAnimationFrame(E);return()=>cancelAnimationFrame(De)},[m]);let C=m.startsWith("/wheels/")&&m!=="/wheels",[l,x]=St(!1),{open:_,totals:$}=qn(),{open:k}=nr(),[B,ae]=St(!1),[g,L]=St(t??null),b=e??(g?{logoUrl:g.logoUrl,reverseLogo:g.reverseLogo,logoReversed:g.logoReversed,logoInkIsDark:g.logoInkIsDark,logoPosition:g.logoPosition,logoSize:g.logoSize,logoSizePx:g.logoSizePx,menuItems:(g.menuItems??[]).map(p=>({label:p.label,url:p.url,dropdown_menu:null,dropdown_items:p.dropdownItems??[]})),menuSplit:g.menuSplit??3,menuPosition:g.menuPosition,menuRow:g.menuRow,menuGapPx:g.menuGapPx??null,searchEnabled:g.searchEnabled,searchPosition:g.searchPosition,searchRow:g.searchRow,countrySelectorEnabled:g.countrySelectorEnabled,countryUrls:g.countryUrls,accountEnabled:g.accountEnabled,cartEnabled:g.cartEnabled,utilStyle:g.utilStyle,navTextCase:g.navTextCase,lightReverseText:g.lightReverseText,topTextColor:g.topTextColor,transparentTop:g.transparentTop,surface:g.surface,theme:g.theme,width:g.width,heightPx:g.heightPx,sticky:g.sticky}:null),te=s?null:b?.logoUrl??null,q=b?.reverseLogo??!1,U=b?.logoReversed??null,X=b?.logoInkIsDark??null,O=b?.logoPosition??"center",Q=b?.logoSize??"medium",D=b?.logoSizePx??null,ne=Math.min(Math.max(b?.menuSplit??3,1),4),re=(b?.menuPosition??"left")==="center",W=(b?.menuPosition??"left")==="beside",pe=(b?.menuRow??"top")==="inline",P=b?.menuGapPx??null,be=P!=null?{gap:`${P}px`}:void 0,Y=pe?Jr.inline:Jr.stacked,me=b?.searchEnabled??!1,V=b?.searchPosition??"right",le=b?.countrySelectorEnabled??!0,J=b?.accountEnabled??!0,w=b?.cartEnabled??!0,M=(b?.utilStyle??"icon")==="text",I=`mono-eyebrow${(b?.navTextCase??"uppercase")==="capitalised"?" mono-eyebrow-plain":""}`,Te=b?.countryUrls??{},Ae=Yr(b?.width),fe=zr(Ae)??void 0,We=b?.heightPx??dt.default,ve=b?.sticky??"always",F=Qr(b?.topTextColor),ce=Kr(b?.theme),ge=Object.keys(Te),Le=sr(ge.length?ge:void 0),he=le?v($t,{countries:ge.length?ge:void 0,urls:e?void 0:Te}):null,{headerRef:_e,scrolled:c,navHidden:S}=Er({stickyMode:ve,heightPx:We});bt(()=>{let p=_e.current?.ownerDocument??document,E=()=>{ae(p.documentElement.getAttribute("data-theme")==="light")};E();let De=new MutationObserver(E);return De.observe(p.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>De.disconnect()},[]);let T=r??!1?v(pn,{}):null;bt(()=>{if(!$r({editorPreview:!!n,hasPreviewSettings:!!e,hasInitialSettings:!!t}))return;let p=!1;return ee.getHeaderSettings().then(E=>!p&&L(E)).catch(E=>{console.warn("[header] settings fetch failed; using built-in defaults",E)}),()=>{p=!0}},[n,e,t]);let h=c||C,A=F==="auto"?y:F==="light",ke=h||!A,ze=h?B:B&&!A,Pe=F==="auto"?null:{[Zr]:F};bt(()=>{if(!l)return;let p=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=p}},[l]);let oe=(p,E,De="start")=>v(lt,{item:p,dropdownAlign:De},E),we=!i&&(b?.menuItems?.length??0)>0,ye=!!n||!!e,z=we?b.menuItems.map(p=>({href:p.url||"",label:Wt(p.label),plainLabel:p.label,dropdownItems:(p.dropdown_items??[]).map(E=>({href:E.url||"",label:Wt(E.label),plainLabel:E.label}))})):ye?Vi.map(p=>({...p,plainLabel:"Menu item",dropdownItems:[]})):[],Ne=O==="center"?z.slice(0,ne):O==="right"?z:[],N=O==="center"?z.slice(ne):O==="left"?z:[],f=me?v(hr,{onClick:ye?void 0:k,asText:M}):null,ue=u&&J?v(gr,{asText:M}):null,Ye=p=>u&&w?v(fr,{onClick:_,count:$.sets,asText:M,className:p}):null,He=R(Et,{children:[V==="left"?f:null,he,T,ue,Ye(),V==="right"?f:null]}),vt=(p,E=!1)=>v(se,{href:"/","aria-label":a?`${a} home`:"Home",className:p,children:v(Vt,{variant:"header",scrolled:ke,src:te,reverse:q,onLightSurface:ze,reversedSrc:U,inkIsDark:X,size:Q,sizePx:D,wordmark:o,siteName:a,fitToContainer:E})}),Oe=vt("inline-flex shrink-0 items-center justify-center"),vn="flex min-w-0 flex-1 items-center overflow-x-clip [container-type:inline-size]";return R(Et,{children:[v("header",{ref:_e,"data-scrolled":c||void 0,...Pe,className:["sf-site-header",...ce?[ce.className]:[],ve==="none"?"absolute":"fixed","inset-x-0 top-0 z-50","flex items-center","px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",h?"border-b border-line backdrop-blur-md":"border-b border-transparent","transition-[background,border-color,transform] duration-300 ease-out"].join(" "),style:{...ce?ce.style:null,minHeight:yr,...S?{transform:"translateY(-100%)"}:null,...h?{background:!B&&C?"var(--section-bg)":"var(--bg)",color:"var(--fg)"}:{color:"var(--sf-header-overlay-fg)"}},children:R("div",{className:"w-full",style:fe,children:[re?R("div",{className:`${Y.grid} grid-cols-[1fr_auto_1fr] items-center gap-8`,children:[O==="right"?v("nav",{className:`${I} flex items-center gap-7`,children:He}):v("div",{className:"flex items-center",children:Oe}),v("nav",{className:`${I} flex items-center justify-center gap-7`,children:z.map((p,E)=>oe(p,`${p.href}-${E}`,"center"))}),O==="right"?v("div",{className:"flex items-center justify-end",children:Oe}):v("nav",{className:`${I} flex items-center justify-end gap-7`,children:He})]}):O==="center"?R("div",{className:`${Y.grid} grid-cols-[1fr_auto_1fr] items-center gap-8`,children:[v("nav",{className:`${I} flex items-center gap-7`,children:Ne.map((p,E)=>oe(p,`${p.href}-${E}`))}),Oe,R("nav",{className:`${I} flex items-center justify-end gap-7`,children:[N.map((p,E)=>oe(p,`${p.href}-${E}`,"end")),He]})]}):W?R("div",{className:`${Y.flex} items-center justify-between gap-8`,children:[R("div",{className:"flex items-center gap-7",style:be,children:[Oe,v("nav",{className:`${I} flex items-center gap-7`,children:z.map((p,E)=>oe(p,`${p.href}-${E}`))})]}),v("nav",{className:`${I} flex items-center justify-end gap-7`,children:He})]}):v("div",{className:`${Y.flex} items-center justify-between gap-8`,children:O==="right"?R(Et,{children:[R("nav",{className:`${I} flex items-center gap-7`,children:[z.map((p,E)=>oe(p,`${p.href}-${E}`)),He]}),Oe]}):R(Et,{children:[Oe,R("nav",{className:`${I} flex items-center gap-7`,children:[z.map((p,E)=>oe(p,`${p.href}-${E}`)),He]})]})}),!pe&&R("div",{className:"hidden min-[801px]:max-[1500px]:flex flex-col gap-3",children:[R("div",{className:"flex items-center justify-between",children:[vt(vn,!0),R("div",{className:`${I} flex shrink-0 items-center gap-5`,children:[f,he,T,ue,Ye()]})]}),v("nav",{className:`${I} flex items-center gap-6 border-t border-line/60 pt-2.5`,children:z.map((p,E)=>oe(p,`${p.href}-${E}`))})]}),R("div",{className:"hidden max-[800px]:flex items-center justify-between",children:[vt(vn,!0),R("div",{className:"flex shrink-0 items-center gap-4",children:[f,ue,Ye(I),R("button",{type:"button","aria-label":l?"Close menu":"Open menu","aria-expanded":l,onClick:()=>x(p=>!p),className:"flex h-11 w-11 flex-col items-center justify-center gap-1.5",children:[v("span",{className:`block h-px w-5 bg-current transition-transform ${l?"translate-y-[3px] rotate-45":""}`}),v("span",{className:`block h-px w-5 bg-current transition-transform ${l?"opacity-0":""}`}),v("span",{className:`block h-px w-5 bg-current transition-transform ${l?"-translate-y-[3px] -rotate-45":""}`})]})]})]})]})}),l&&R("div",{className:"fixed inset-x-0 top-0 bottom-0 z-40 hidden overflow-y-auto max-[800px]:flex max-[800px]:flex-col max-[800px]:gap-7 max-[800px]:bg-bg max-[800px]:px-6 max-[800px]:pt-24 max-[800px]:pb-10",children:[z.map((p,E)=>v(lt,{item:p,mobile:!0,onNavigate:()=>x(!1)},`${p.href}-${E}`)),R("div",{className:"mt-auto flex flex-col gap-4 border-t border-line pt-6",children:[u&&J&&R("div",{className:"flex items-center justify-between",children:[v("span",{className:"mono-eyebrow text-fg-dim",children:"Account"}),v(se,{href:"/account",onClick:()=>x(!1),className:"mono-eyebrow underline",children:"Your account"})]}),he&&Le&&R("div",{className:"flex items-center justify-between",children:[v("span",{className:"mono-eyebrow text-fg-dim",children:"Region"}),he]}),T&&R("div",{className:"flex items-center justify-between",children:[v("span",{className:"mono-eyebrow text-fg-dim",children:"Theme"}),T]})]})]})]})}import{createContext as to,useContext as xn}from"react";import{createContext as Gi}from"react";var eo=Gi(null);var Bi=to(null),bn=to({logo:null,placeholder:!1,wordmark:null});function Od(){let e=xn(eo),t=xn(Bi),n=xn(bn),r=!e&&n.placeholder,o=e?e.logoUrl:n.logo?.logoUrl??t?.logoUrl??null;return{src:r?null:o,reversedSrc:e?e.logoReversed:n.logo?.logoReversed??t?.logoReversed??null,inkIsDark:e?e.logoInkIsDark:n.logo?.logoInkIsDark??t?.logoInkIsDark??null,wordmark:e?null:n.wordmark,siteName:e?.siteName??t?.siteName}}var Sn={accent:"#2563eb",accentTint:"#eff6ff",accentText:"#1d4ed8",appBg:"#f9fafb",previewBg:"#f3f4f6",panel:"#ffffff",fieldBg:"#ffffff",inputBorder:"#d1d5db",text:"#111827",text2:"#374151",muted:"#6b7280",line:"#e5e7eb",chipBg:"#f3f4f6",chipFg:"#6b7280",panelRadius:12,rowRadius:8,panelShadow:"0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.06)",topbarShadow:"0 1px 3px rgba(0,0,0,.06)",panelGap:10,leftWidth:288,rightWidth:308,topbarHeight:52,labelFont:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif"};import{createContext as Wi,useCallback as ro,useContext as zi,useRef as Yi,useState as Ki}from"react";var En=0;function no(e){En+=1;try{return e()}finally{En-=1}}function Fd(){return En>0}import{jsx as qi}from"react/jsx-runtime";function Cn(){let e=Yi(()=>{}),t=ro((...r)=>no(()=>e.current(...r)),[]),n=ro(r=>{e.current=r},[]);return{select:t,setSelectHandler:n}}function Gd(e){let t=`set${e.charAt(0).toUpperCase()}${e.slice(1)}`,n=(i,a,u,m)=>({[e]:i,[t]:a,select:u,setSelectHandler:m}),r=Wi(n(null,()=>{},()=>{},()=>{}));function o({children:i}){let[a,u]=Ki(null),{select:m,setSelectHandler:y}=Cn();return qi(r.Provider,{value:n(a,u,m,y),children:i})}return{Provider:o,useSelection:()=>zi(r)}}var Tn=[{key:"space-grotesk",label:"Space Grotesk",cssVar:"--font-display",category:"sans",italic:!1,italicLoaded:!1},{key:"inter",label:"Inter",cssVar:"--font-body",category:"sans",italic:!0,italicLoaded:!0},{key:"poppins",label:"Poppins",cssVar:"--font-poppins",category:"sans",italic:!0,italicLoaded:!0},{key:"dm-sans",label:"DM Sans",cssVar:"--font-dm-sans",category:"sans",italic:!0,italicLoaded:!0},{key:"sora",label:"Sora",cssVar:"--font-sora",category:"sans",italic:!1,italicLoaded:!1},{key:"oswald",label:"Oswald",cssVar:"--font-oswald",category:"sans",italic:!1,italicLoaded:!1},{key:"archivo",label:"Archivo",cssVar:"--font-archivo",category:"sans",italic:!0,italicLoaded:!0},{key:"outfit",label:"Outfit",cssVar:"--font-outfit",category:"sans",italic:!1,italicLoaded:!1},{key:"manrope",label:"Manrope",cssVar:"--font-manrope",category:"sans",italic:!1,italicLoaded:!1},{key:"big-shoulders",label:"Big Shoulders",cssVar:"--font-big-shoulders",category:"sans",italic:!1,italicLoaded:!1},{key:"michroma",label:"Michroma",cssVar:"--font-michroma",category:"sans",italic:!1,italicLoaded:!1},{key:"fraunces",label:"Fraunces",cssVar:"--font-serif",category:"serif",italic:!0,italicLoaded:!0},{key:"playfair-display",label:"Playfair Display",cssVar:"--font-playfair",category:"serif",italic:!0,italicLoaded:!0},{key:"cormorant",label:"Cormorant",cssVar:"--font-cormorant",category:"serif",italic:!0,italicLoaded:!0},{key:"jetbrains-mono",label:"JetBrains Mono",cssVar:"--font-mono-loaded",category:"mono",italic:!0,italicLoaded:!0}],Re=new Map(Tn.map(e=>[e.key,e])),Xi={sans:"Sans",serif:"Serif",mono:"Mono"};function zd(){return Object.keys(Xi).map(e=>[e,Tn.filter(t=>t.category===e)]).filter(([,e])=>e.length>0)}function Yd(e){return Re.get(e)?.italicLoaded??!1}function Kd(e){return Re.get(e)}var oo=["heading","heading2","heading3","body","accent","label"],qd={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Accent",label:"Labels"},ji=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],Zi=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,Xd={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},Qi={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function jd(e){let t=e?Zi.exec(e):null;return t?Qi[t[1]]??null:Ji(e)}function Ji(e){if(!e)return null;let t=e.split(/\s+/).filter(n=>!n.slice(0,n.lastIndexOf(":")+1).includes("&")).map(n=>n.slice(n.lastIndexOf(":")+1));for(let[n,r]of ji)if(t.includes(n))return r;return null}var ea=["heading","heading2","heading3"];function Zd(e){return ea.includes(e)}var Ie={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function ta(e){let t=n=>{let r=e?.[n];if(r&&Re.has(r))return r;if(n==="heading2"||n==="heading3"){let o=e?.heading;return o&&Re.has(o)?o:Ie.heading}return Ie[n]};return Object.fromEntries(oo.map(n=>[n,t(n)]))}function na(e,t){return Re.get(e[t])??Re.get(Ie[t])}function Be(e,t){return`var(${na(e,t).cssVar})`}var Qd=[...new Set(oo.map(e=>Re.get(Ie[e]).cssVar))],Jd=[...new Set(Tn.map(e=>e.cssVar))];function ep(e){let t=ta(e);return{"--font-role-heading":Be(t,"heading"),"--font-role-heading2":Be(t,"heading2"),"--font-role-heading3":Be(t,"heading3"),"--font-role-body":Be(t,"body"),"--font-role-accent":Be(t,"accent"),"--font-role-label":Be(t,"label"),fontFamily:"var(--font-role-body)"}}import{jsx as Tt,jsxs as la}from"react/jsx-runtime";var io=ra({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:on,setThemeMode:()=>{},themeSwitchShown:!1,setThemeSwitchShown:()=>{},theme:ft,setTheme:()=>{},fonts:Ie,setFonts:()=>{},sizes:an,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:yt,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:nt,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,blockGap:null,setSiteGutter:()=>{},setBlockGap:()=>{},headingTypography:ln,setHeadingTypography:()=>{},heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},themeFromDocument:!1,selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function mp({children:e,websiteName:t=null,templateChrome:n=!1,templateName:r=null,chromePlaceholder:o=!1,themeMode:s=on,onThemeModeChange:i,themeSwitchShown:a=!1,onThemeSwitchShownChange:u,theme:m=ft,onThemeChange:y,fonts:d=Ie,onFontsChange:C,sizes:l=an,onSizesChange:x,cornerRadiusPx:_=null,onCornerRadiusPxChange:$,cardShadow:k=null,onCardShadowChange:B,shadowColor:ae=null,onShadowColorChange:g,cardGap:L=yt,onCardGapChange:b,hoverEffect:te=null,onHoverEffectChange:q,headingCompression:U=nt,onHeadingCompressionChange:X,siteWidth:O=null,onSiteWidthChange:Q,siteGutter:D=null,blockGap:ne=null,onSiteGutterChange:re,onBlockGapChange:W,headingTypography:pe=ln,onHeadingTypographyChange:P,heroBackgroundFollowsWidth:be=null,onHeroBackgroundFollowsWidthChange:Y,photographyGrayscale:me=null,onPhotographyGrayscaleChange:V,themeFromDocument:le=!1}){let[J,w]=so(null),M=H(f=>w(ue=>ue??f),[]),[I,Te]=so(!1),Ae=H(f=>i?.(f),[i]),fe=H(f=>u?.(f),[u]),We=H(f=>y?.(f),[y]),ve=H(f=>C?.(f),[C]),F=H(f=>x?.(f),[x]),ce=H(f=>Q?.(f),[Q]),ge=H(f=>re?.(f),[re]),Le=H(f=>W?.(f),[W]),he=H(f=>Y?.(f),[Y]),_e=H(f=>V?.(f),[V]),c=H(f=>$?.(f),[$]),S=H(f=>B?.(f),[B]),T=H(f=>g?.(f),[g]),h=H(f=>b?.(f),[b]),A=H(f=>q?.(f),[q]),ke=H(f=>X?.(f),[X]),ze=H(f=>P?.(f),[P]),{select:Pe,setSelectHandler:oe}=Cn(),we=J?.logoUrl,ye=J?.logoReversed,z=J?.logoInkIsDark,Ne=J!==null,N=sa(()=>({logo:Ne?{logoUrl:we,logoReversed:ye,logoInkIsDark:z}:null,placeholder:n||o,wordmark:n?r:t}),[Ne,we,ye,z,n,o,r,t]);return Tt(bn.Provider,{value:N,children:Tt(io.Provider,{value:{settings:J,setSettings:w,primeSettings:M,websiteName:t,templateChrome:n,templateName:r,chromePlaceholder:o,themeMode:s,setThemeMode:Ae,themeSwitchShown:a,setThemeSwitchShown:fe,theme:m,setTheme:We,fonts:d,setFonts:ve,sizes:l,setSizes:F,cornerRadiusPx:_,setCornerRadiusPx:c,cardShadow:k,setCardShadow:S,shadowColor:ae,setShadowColor:T,cardGap:L,setCardGap:h,hoverEffect:te,setHoverEffect:A,headingCompression:U,setHeadingCompression:ke,siteWidth:O,setSiteWidth:ce,siteGutter:D,blockGap:ne,setSiteGutter:ge,setBlockGap:Le,headingTypography:pe,setHeadingTypography:ze,heroBackgroundFollowsWidth:be,setHeroBackgroundFollowsWidth:he,photographyGrayscale:me,setPhotographyGrayscale:_e,themeFromDocument:le,selected:I,setSelected:Te,select:Pe,setSelectHandler:oe},children:e})})}var ia=()=>oa(io),aa=`
|
|
2
|
+
.sf-preview-header-pick header { cursor: pointer; }
|
|
3
|
+
.sf-preview-header-pick header:hover {
|
|
4
|
+
outline: 2px solid color-mix(in srgb, ${Sn.accent} 45%, transparent);
|
|
5
|
+
outline-offset: -2px;
|
|
6
|
+
}
|
|
7
|
+
.sf-preview-header-pick[data-selected] header {
|
|
8
|
+
outline: 2px solid ${Sn.accent};
|
|
9
|
+
outline-offset: -2px;
|
|
10
|
+
}
|
|
11
|
+
`;function fp(){let{settings:e,selected:t,select:n,websiteName:r,templateChrome:o,templateName:s,chromePlaceholder:i,themeSwitchShown:a}=ia(),u=o?s?.trim()||"Template":r?.trim()||Ee,m=o||i;return la("div",{className:"sf-preview-header-pick sf-theme-surfaces","data-selected":t||void 0,onClick:y=>{y.stopPropagation(),n()},children:[Tt("style",{children:aa}),Tt(yn,{previewSettings:e??void 0,editorPreview:!0,showThemeToggle:a,wordmark:u,hideLogo:m,hideMenu:m})]})}import{forwardRef as ca}from"react";import{jsx as pa}from"react/jsx-runtime";var ua={position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,color:"transparent"},da=ca(function({src:t,width:n,height:r,fill:o,priority:s,loading:i,style:a,quality:u,placeholder:m,blurDataURL:y,unoptimized:d,loader:C,overrideSrc:l,...x},_){let $=l??(typeof t=="string"?t:t.src);return pa("img",{ref:_,src:$,width:o?void 0:n,height:o?void 0:r,loading:s?"eager":i??"lazy",fetchPriority:s?"high":void 0,decoding:"async",style:o?{...ua,...a}:{color:"transparent",...a},...x})}),xp=da;function bp(e){return{props:{src:e.overrideSrc??(typeof e.src=="string"?e.src:e.src.src),sizes:e.sizes}}}var Cp="#c9a461",ao=[{f:"black",label:"Black",hex:"#171717"},{f:"silver",label:"Silver",hex:"#cccccc"},{f:"bronze",label:"Bronze",hex:"#8a6438"},{f:"graphite",label:"Graphite",hex:"#3a3c3f"},{f:"red",label:"Candy Red",hex:"#7a0f14"}],Tp={name:"",color:"var(--fg)",family:"silver",src:""};function ma(e,t){let n=r=>{let o=ao.findIndex(s=>s.f===r);return o===-1?ao.length:o};return n(e)-n(t)||e.localeCompare(t)}function vp(e){let t=new Set;for(let n of e)for(let r of n.finishes??[])r?.family&&t.add(r.family);return[...t].sort(ma)}function wp(){let e=typeof crypto<"u"?crypto:void 0;if(typeof e?.randomUUID=="function")return e.randomUUID();let t=new Uint8Array(16);if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}export{se as a,xp as b,bp as c,Tn as d,Xi as e,zd as f,Yd as g,Kd as h,oo as i,qd as j,Xd as k,jd as l,Ji as m,Zd as n,Ie as o,ta as p,ep as q,Wt as r,xc as s,rn as t,Vc as u,Gc as v,Bc as w,on as x,$s as y,Tr as z,Wc as A,zc as B,gt as C,vr as D,Ws as E,Yc as F,Kc as G,qc as H,Xc as I,jc as J,_r as K,Zc as L,wr as M,Qc as N,Jc as O,Ir as P,eu as Q,an as R,qs as S,Xs as T,tu as U,Zs as V,nu as W,ru as X,ei as Y,ti as Z,ou as _,ri as $,su as aa,oi as ba,si as ca,Lr as da,yt as ea,li as fa,ci as ga,ui as ha,kr as ia,Pr as ja,di as ka,Nr as la,pi as ma,iu as na,au as oa,lu as pa,cu as qa,nt as ra,Hr as sa,uu as ta,du as ua,ln as va,en as wa,tn as xa,fi as ya,gi as za,cn as Aa,pu as Ba,mu as Ca,fu as Da,Ln as Ea,lo as Fa,fa as Ga,co as Ha,ga as Ia,ha as Ja,Ke as Ka,Rt as La,uo as Ma,po as Na,ya as Oa,xa as Pa,Wu as Qa,zu as Ra,Yu as Sa,Pi as Ta,Ku as Ua,qu as Va,xe as Wa,Ur as Xa,wu as Ya,xt as Za,Ci as _a,Au as $a,rt as ab,ie as bb,vi as cb,ku as db,Br as eb,Wr as fb,wi as gb,Ri as hb,$u as ib,Vu as jb,Gu as kb,zr as lb,Yr as mb,Pn as nb,It as ob,Sa as pb,Ea as qb,Ca as rb,Ta as sb,mo as tb,fo as ub,va as vb,_a as wb,At as xb,Lt as yb,qe as zb,ot as Ab,Co as Bb,Pt as Cb,Oa as Db,Da as Eb,vo as Fb,Ma as Gb,Fa as Hb,_o as Ib,$a as Jb,Ro as Kb,Ua as Lb,Va as Mb,qr as Nb,La as Ob,je as Pb,$n as Qb,Ka as Rb,qa as Sb,Xa as Tb,st as Ub,Ht as Vb,sl as Wb,qn as Xb,Cp as Yb,ao as Zb,Tp as _b,ma as $b,vp as ac,dt as bc,Ac as cc,Lc as dc,yr as ec,kc as fc,Pc as gc,Nc as hc,Hc as ic,Ns as jc,Oc as kc,Ds as lc,Dc as mc,er as nc,Dl as oc,nr as pc,sr as qc,$t as rc,at as sc,Ee as tc,Es as uc,Cs as vc,oc as wc,sc as xc,Vt as yc,lc as zc,cc as Ac,uc as Bc,dc as Cc,pc as Dc,mc as Ec,Gt as Fc,mr as Gc,Ot as Hc,Kt as Ic,fr as Jc,hr as Kc,Er as Lc,xu as Mc,bu as Nc,Zu as Oc,Di as Pc,Mi as Qc,Xr as Rc,td as Sc,nd as Tc,jr as Uc,Zr as Vc,id as Wc,Qr as Xc,eo as Yc,Od as Zc,Sn as _c,Qn as $c,Xo as ad,it as bd,Jn as cd,xl as dd,bl as ed,Zo as fd,Rl as gd,Jo as hd,Al as id,Fd as jd,Cn as kd,Gd as ld,mp as md,ia as nd,fp as od,wp as pd};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cc as l,dc as a}from"./chunk-UTFM4DGR.js";import{T as s}from"./chunk-RF5DTRJ5.js";var i=new Map;async function c(e,t){try{return(await s.getSite(t,e)).slug?.trim()||null}catch(r){return console.warn("[editor-site-slug] could not resolve the site slug",r),null}}function p(e,t){let r=i.get(t);return r||(r=c(e,t),i.set(t,r),r.catch(()=>{i.get(t)===r&&i.delete(t)})),r}var n=()=>Promise.reject(new l("unavailable","This editor's backend keeps no section templates.")),m={list:()=>Promise.resolve([]),get:()=>Promise.resolve(null),ensure:n,save:n,update:n,rename:n,remove:n},o=()=>a().sectionTemplates??m,d={list:()=>o().list(),get:e=>o().get(e),ensure:(e,t,r)=>o().ensure(e,t,r),save:(e,t)=>o().save(e,t),update:(e,t)=>o().update(e,t),rename:(e,t)=>o().rename(e,t),remove:e=>o().remove(e)};export{p as a,d as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{wj as l,yj as p}from"./chunk-UTFM4DGR.js";import{Fragment as r,useState as d}from"react";import{Fragment as b,jsx as s,jsxs as o}from"react/jsx-runtime";function g({choices:m,onPick:c,open:i,onToggle:u}){let[f,a]=d(!1),n=i??f;return o(b,{children:[o("button",{type:"button",className:"sf-add-card","aria-expanded":n,onClick:u??(()=>a(e=>!e)),children:[s("span",{className:"sf-plus sf-plus--sm",children:"+"}),"Add block"]}),n&&s("div",{className:"sf-blockmenu",role:"menu",children:p(m).map(e=>o(r,{children:[e.group&&o("div",{className:"sf-menugroup-head",role:"presentation",children:[s("span",{className:"sf-menugroup-title",children:e.group}),s("span",{className:"sf-menugroup-count",children:e.items.length})]}),e.items.map(t=>o("button",{type:"button",className:"sf-blockmenu-item",role:"menuitem",onClick:()=>{a(!1),c(t.type)},children:[s("span",{className:"sf-chip",children:s(l,{type:t.type,size:13})}),s("span",{className:"sf-row-name",children:t.label})]},t.type))]},e.group??"all"))})]})}export{g as a};
|