efficient-storefront-blocks 0.66.2 → 0.66.3
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 +4 -0
- package/dist/chunks/{EditorPreviewCheckout-HAUEGHGC.js → EditorPreviewCheckout-B43B3UMG.js} +1 -1
- package/dist/chunks/{chunk-Z7PJKX2P.js → chunk-2YMPFJUY.js} +1 -1
- package/dist/chunks/{chunk-VEI75RPM.js → chunk-6TBRERLY.js} +1 -1
- package/dist/chunks/{fitment-data-UQDOQP66.js → fitment-data-SK4TTJRK.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/render/lib/api/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as g3,$a as Lv,$b as ia,$c as Vc,$d as PT,$e as KT,$f as Aa,$g as zh,A as QM,Aa as sc,Ab as bc,Ac as $A,Ad as vT,Ae as W1,Af as rh,Ag as IE,Ah as mH,B as eL,Ba as V8,Bb as zA,Bc as jA,Bd as ha,Be as y,Bf as oE,Bg as nf,Bh as Lh,C as Yl,Ca as O7,Cb as kA,Cc as d,Cd as pa,Ce as f6,Cf as Z8,Cg as lf,Ch as dH,D as tL,Da as Jt,Db as xc,Dc as v3,Dd as fT,De as VT,Df as rE,Dg as cf,Dh as uH,E as aL,Ea as zr,Eb as wc,Ec as KA,Ed as bT,Ee as c0,Ef as iE,Eg as gh,Eh as _r,F as sL,Fa as oc,Fb as sa,Fc as Pc,Fd as Zc,Fe as OT,Ff as nE,Fg as VE,Fh as gH,G as oL,Ga as de,Gb as g6,Gc as Fc,Gd as be,Ge as fa,Gf as lE,Gg as vh,Gh as N4,H as xv,Ha as O8,Hb as yc,Hc as YA,Hd as Gc,He as X6,Hf as Nr,Hg as OE,Hh as fH,I as rL,Ia as rc,Ib as Iv,Ic as v6,Id as Er,Ie as ba,If as cE,Ig as fh,Ih as bH,J as iL,Ja as kr,Jb as SA,Jc as XA,Jd as xT,Je as o1,Jf as ih,Jg as BE,Jh as xH,K as Kt,Ka as kv,Kb as zc,Kc as JA,Kd as wT,Ke as P4,Kf as nh,Kg as hf,Kh as wH,L as nL,La as FL,Lb as Vv,Lc as _c,Ld as yT,Le as BT,Lf as ka,Lg as DE,Lh as yH,M as lL,Ma as Sv,Mb as CA,Mc as QA,Md as zT,Me as Xc,Mf as Sa,Mg as pf,Mh as zH,N as cL,Na as Cv,Nb as kc,Nc as eT,Nd as kT,Ne as DT,Nf as Ca,Ng as ZE,Nh as Ah,O as hL,Oa as ic,Ob as Sc,Oc as _3,Od as ST,Oe as ZT,Of as Ma,Og as GE,Oh as N5,P as pL,Pa as nc,Pb as ra,Pc as tT,Pd as CT,Pe as Jc,Pf as hE,Pg as WE,Ph as Th,Q as mL,Qa as NL,Qb as Cc,Qc as v4,Qd as Wc,Qe as Qc,Qf as pE,Qg as UE,Qh as W7,R as dL,Ra as Qt,Rb as ge,Rc as oT,Rd as Uc,Re as eh,Rf as mE,Rg as qE,Rh as R4,S as wv,Sa as RL,Sb as Ov,Sc as Ic,Sd as Jv,Se as GT,Sf as lh,Sg as bh,Sh as kH,T as uL,Ta as lc,Tb as Mc,Tc as rT,Td as qc,Te as WT,Tf as dE,Tg as mf,Th as SH,U as gL,Ua as _L,Ub as Bv,Uc as c5,Ud as MT,Ue as UT,Uf as uE,Ug as df,V as Xl,Va as ea,Vb as Dv,Vc as h5,Vd as LT,Ve as qT,Vf as La,Vg as $E,W as Jl,Wa as IL,Wb as MA,Wc as B7,Wd as AT,We as Fr,Wf as G7,Wg as xh,X as vL,Xa as VL,Xb as LA,Xc as fe,Xd as TT,Xe as $T,Xf as ef,Xg as jE,Y as fL,Ya as OL,Yb as Zv,Yc as na,Yd as ET,Ye as jT,Yf as gE,Yg as wh,Z as bL,Za as BL,Zb as j6,Zc as la,Zd as HT,Ze as xa,Zf as tf,Zg as yh,_ as xL,_a as Mv,_b as AA,_c as B8,_d as H4,_e as xe,_f as af,_g as uf,a as IM,aa as n5,ab as DL,ac as TA,ad as iT,ae as $c,af as th,ag as vE,ah as KE,b as Wl,ba as P1,bb as Av,bc as EA,bd as nT,be as K6,bf as YT,bg as fE,bh as YE,c as VM,ca as u6,cb as Tv,cc as HA,cd as ca,ce as ma,cf as XT,cg as sf,ch as XE,d as yr,da as R3,db as ZL,dc as PA,dd as K3,de as Y6,df as JT,dg as of,dh as JE,e as OM,ea as Ql,eb as ta,ec as FA,ed as lT,ee as da,ef as QT,eg as bE,eh as Ta,f as fv,fa as l5,fb as Ev,fc as Mr,fd as cT,fe as FT,ff as i1,fg as F4,fh as QE,g as bv,ga as Yt,gb as Hv,gc as NA,gd as Ar,ge as NT,gf as eE,gg as xE,gh as kh,h as r5,ha as ec,hb as cc,hc as RA,hd as Oc,he as Hr,hf as tE,hg as wE,hh as ye,i as Ul,ia as wL,ib as gc,ic as _A,id as hT,ie as D8,if as aE,ig as yE,ih as Sh,j as BM,ja as yL,jb as dA,jc as IA,jd as pT,je as RT,jf as Y3,jg as zE,jh as Ea,k as DM,ka as y2,kb as uA,kc as VA,kd as mT,ke as Pr,kf as b6,kg as SE,kh as eH,l as d0,la as X1,lb as gA,lc as Lc,ld as Tr,le as jc,lf as D7,lg as CE,lh as ze,m as ql,ma as e0,mb as aa,mc as OA,md as Wv,me as _T,mf as sE,mg as ME,mh as tH,n as $l,na as zL,nb as ue,nc as BA,nd as Uv,ne as ua,nf as ah,ng as LE,nh as aH,o as j0,oa as s0,ob as g4,oc as Ac,od as Bc,oe as o3,of as y1,og as AE,oh as sH,p as jl,pa as t0,pb as vA,pc as DA,pd as Dc,pe as O2,pf as wa,pg as TE,ph as oH,q as UM,qa as yv,qb as fA,qc as Tc,qd as qv,qe as ga,qf as F2,qg as EE,qh as rH,r as Kl,ra as LL,rb as _v,rc as ve,rd as dT,re as IT,rf as Z7,rg as rf,rh as iH,s as qM,sa as AL,sb as Cr,sc as ZA,sd as $v,se as Kc,sf as sh,sg as FE,sh as x6,t as $M,ta as zv,tb as j3,tc as Ec,td as jv,te as Yc,tf as f1,tg as ph,th as cH,u as jM,ua as TL,ub as bA,uc as GA,ud as uT,ue as va,uf as J1,ug as NE,uh as Mh,v as KM,va as EL,vb as xA,vc as WA,vd as gT,ve as O,vf as oh,vg as RE,vh as ke,w as YM,wa as HL,wb as wA,wc as Gv,wd as Kv,we as U,wf as Qv,wg as mh,wh as U8,x as XM,xa as ac,xb as yA,xc as Hc,xd as Yv,xe as q,xf as r3,xg as dh,xh as hH,y as JM,ya as v2,yb as vc,yc as UA,yd as Xv,ye as w1,yf as ya,yg as uh,yh as gf,z as U6,za as PL,zb as fc,zc as qA,zd as p5,ze as $1,zf as za,zg as _E,zh as pH}from"./chunks/chunk-TAGGXC3A.js";import{$ as $H,A as U7,B as xf,C as BH,D as DH,E as Rh,F as _h,G as Ih,H as ZH,I as Ra,J as GH,M as WH,N as UH,O as Y8,P as C0,Q as qH,S as wf,T as _a,U as i3,V as Vh,W as Or,Y as Oh,Z as Ia,_ as Me,a as HH,aa as yf,ba as jH,ca as KH,da as YH,e as $8,ea as XH,f as Hh,fa as JH,g as PH,ga as QH,h as FH,ha as Le,i as vf,ia as zf,j as NH,k as RH,ka as kf,l as Ph,la as Va,m as Vr,ma as Oa,n as ff,na as Br,o as _H,oa as Ae,p as f3,pa as b3,q as IH,r as j8,s as Fh,t as bf,u as VH,v as OH,w as Ce,x as K8,y as Na,z as Nh}from"./chunks/chunk-
|
|
1
|
+
import{$ as g3,$a as Lv,$b as ia,$c as Vc,$d as PT,$e as KT,$f as Aa,$g as zh,A as QM,Aa as sc,Ab as bc,Ac as $A,Ad as vT,Ae as W1,Af as rh,Ag as IE,Ah as mH,B as eL,Ba as V8,Bb as zA,Bc as jA,Bd as ha,Be as y,Bf as oE,Bg as nf,Bh as Lh,C as Yl,Ca as O7,Cb as kA,Cc as d,Cd as pa,Ce as f6,Cf as Z8,Cg as lf,Ch as dH,D as tL,Da as Jt,Db as xc,Dc as v3,Dd as fT,De as VT,Df as rE,Dg as cf,Dh as uH,E as aL,Ea as zr,Eb as wc,Ec as KA,Ed as bT,Ee as c0,Ef as iE,Eg as gh,Eh as _r,F as sL,Fa as oc,Fb as sa,Fc as Pc,Fd as Zc,Fe as OT,Ff as nE,Fg as VE,Fh as gH,G as oL,Ga as de,Gb as g6,Gc as Fc,Gd as be,Ge as fa,Gf as lE,Gg as vh,Gh as N4,H as xv,Ha as O8,Hb as yc,Hc as YA,Hd as Gc,He as X6,Hf as Nr,Hg as OE,Hh as fH,I as rL,Ia as rc,Ib as Iv,Ic as v6,Id as Er,Ie as ba,If as cE,Ig as fh,Ih as bH,J as iL,Ja as kr,Jb as SA,Jc as XA,Jd as xT,Je as o1,Jf as ih,Jg as BE,Jh as xH,K as Kt,Ka as kv,Kb as zc,Kc as JA,Kd as wT,Ke as P4,Kf as nh,Kg as hf,Kh as wH,L as nL,La as FL,Lb as Vv,Lc as _c,Ld as yT,Le as BT,Lf as ka,Lg as DE,Lh as yH,M as lL,Ma as Sv,Mb as CA,Mc as QA,Md as zT,Me as Xc,Mf as Sa,Mg as pf,Mh as zH,N as cL,Na as Cv,Nb as kc,Nc as eT,Nd as kT,Ne as DT,Nf as Ca,Ng as ZE,Nh as Ah,O as hL,Oa as ic,Ob as Sc,Oc as _3,Od as ST,Oe as ZT,Of as Ma,Og as GE,Oh as N5,P as pL,Pa as nc,Pb as ra,Pc as tT,Pd as CT,Pe as Jc,Pf as hE,Pg as WE,Ph as Th,Q as mL,Qa as NL,Qb as Cc,Qc as v4,Qd as Wc,Qe as Qc,Qf as pE,Qg as UE,Qh as W7,R as dL,Ra as Qt,Rb as ge,Rc as oT,Rd as Uc,Re as eh,Rf as mE,Rg as qE,Rh as R4,S as wv,Sa as RL,Sb as Ov,Sc as Ic,Sd as Jv,Se as GT,Sf as lh,Sg as bh,Sh as kH,T as uL,Ta as lc,Tb as Mc,Tc as rT,Td as qc,Te as WT,Tf as dE,Tg as mf,Th as SH,U as gL,Ua as _L,Ub as Bv,Uc as c5,Ud as MT,Ue as UT,Uf as uE,Ug as df,V as Xl,Va as ea,Vb as Dv,Vc as h5,Vd as LT,Ve as qT,Vf as La,Vg as $E,W as Jl,Wa as IL,Wb as MA,Wc as B7,Wd as AT,We as Fr,Wf as G7,Wg as xh,X as vL,Xa as VL,Xb as LA,Xc as fe,Xd as TT,Xe as $T,Xf as ef,Xg as jE,Y as fL,Ya as OL,Yb as Zv,Yc as na,Yd as ET,Ye as jT,Yf as gE,Yg as wh,Z as bL,Za as BL,Zb as j6,Zc as la,Zd as HT,Ze as xa,Zf as tf,Zg as yh,_ as xL,_a as Mv,_b as AA,_c as B8,_d as H4,_e as xe,_f as af,_g as uf,a as IM,aa as n5,ab as DL,ac as TA,ad as iT,ae as $c,af as th,ag as vE,ah as KE,b as Wl,ba as P1,bb as Av,bc as EA,bd as nT,be as K6,bf as YT,bg as fE,bh as YE,c as VM,ca as u6,cb as Tv,cc as HA,cd as ca,ce as ma,cf as XT,cg as sf,ch as XE,d as yr,da as R3,db as ZL,dc as PA,dd as K3,de as Y6,df as JT,dg as of,dh as JE,e as OM,ea as Ql,eb as ta,ec as FA,ed as lT,ee as da,ef as QT,eg as bE,eh as Ta,f as fv,fa as l5,fb as Ev,fc as Mr,fd as cT,fe as FT,ff as i1,fg as F4,fh as QE,g as bv,ga as Yt,gb as Hv,gc as NA,gd as Ar,ge as NT,gf as eE,gg as xE,gh as kh,h as r5,ha as ec,hb as cc,hc as RA,hd as Oc,he as Hr,hf as tE,hg as wE,hh as ye,i as Ul,ia as wL,ib as gc,ic as _A,id as hT,ie as D8,if as aE,ig as yE,ih as Sh,j as BM,ja as yL,jb as dA,jc as IA,jd as pT,je as RT,jf as Y3,jg as zE,jh as Ea,k as DM,ka as y2,kb as uA,kc as VA,kd as mT,ke as Pr,kf as b6,kg as SE,kh as eH,l as d0,la as X1,lb as gA,lc as Lc,ld as Tr,le as jc,lf as D7,lg as CE,lh as ze,m as ql,ma as e0,mb as aa,mc as OA,md as Wv,me as _T,mf as sE,mg as ME,mh as tH,n as $l,na as zL,nb as ue,nc as BA,nd as Uv,ne as ua,nf as ah,ng as LE,nh as aH,o as j0,oa as s0,ob as g4,oc as Ac,od as Bc,oe as o3,of as y1,og as AE,oh as sH,p as jl,pa as t0,pb as vA,pc as DA,pd as Dc,pe as O2,pf as wa,pg as TE,ph as oH,q as UM,qa as yv,qb as fA,qc as Tc,qd as qv,qe as ga,qf as F2,qg as EE,qh as rH,r as Kl,ra as LL,rb as _v,rc as ve,rd as dT,re as IT,rf as Z7,rg as rf,rh as iH,s as qM,sa as AL,sb as Cr,sc as ZA,sd as $v,se as Kc,sf as sh,sg as FE,sh as x6,t as $M,ta as zv,tb as j3,tc as Ec,td as jv,te as Yc,tf as f1,tg as ph,th as cH,u as jM,ua as TL,ub as bA,uc as GA,ud as uT,ue as va,uf as J1,ug as NE,uh as Mh,v as KM,va as EL,vb as xA,vc as WA,vd as gT,ve as O,vf as oh,vg as RE,vh as ke,w as YM,wa as HL,wb as wA,wc as Gv,wd as Kv,we as U,wf as Qv,wg as mh,wh as U8,x as XM,xa as ac,xb as yA,xc as Hc,xd as Yv,xe as q,xf as r3,xg as dh,xh as hH,y as JM,ya as v2,yb as vc,yc as UA,yd as Xv,ye as w1,yf as ya,yg as uh,yh as gf,z as U6,za as PL,zb as fc,zc as qA,zd as p5,ze as $1,zf as za,zg as _E,zh as pH}from"./chunks/chunk-TAGGXC3A.js";import{$ as $H,A as U7,B as xf,C as BH,D as DH,E as Rh,F as _h,G as Ih,H as ZH,I as Ra,J as GH,M as WH,N as UH,O as Y8,P as C0,Q as qH,S as wf,T as _a,U as i3,V as Vh,W as Or,Y as Oh,Z as Ia,_ as Me,a as HH,aa as yf,ba as jH,ca as KH,da as YH,e as $8,ea as XH,f as Hh,fa as JH,g as PH,ga as QH,h as FH,ha as Le,i as vf,ia as zf,j as NH,k as RH,ka as kf,l as Ph,la as Va,m as Vr,ma as Oa,n as ff,na as Br,o as _H,oa as Ae,p as f3,pa as b3,q as IH,r as j8,s as Fh,t as bf,u as VH,v as OH,w as Ce,x as K8,y as Na,z as Nh}from"./chunks/chunk-6TBRERLY.js";import{d as Ir,e as Ha,g as B2,h as Eh,i as _4,j as CH,k as MH,l as LH,m as AH,n as q8,o as TH,u as Pa,v as F0,w as Se,x as EH,y as Fa,z as F1}from"./chunks/chunk-2YMPFJUY.js";import{A as WL,Aa as G8,Ba as kE,Ca as we,D as pc,Ea as HE,F as UL,Fa as ch,G as qL,Ga as PE,Ha as hh,I as $L,Ia as Rr,Ja as W8,Ka as Ch,La as nH,M as jL,Ma as lH,O as KL,P as Fv,Q as YL,S as XL,T as mc,W as dc,X as uc,Z as Nv,a as E4,aa as JL,b as ZM,ba as Rv,c as V1,ea as QL,f as q6,g as Xt,ga as eA,h as tc,ha as tA,i as kL,ia as aA,j as SL,ja as sA,k as CL,ka as oA,la as rA,m as ML,ma as iA,n as GL,na as nA,o as Sr,oa as lA,p as hc,q as Pv,qa as cA,r as $6,sa as hA,ta as pA,ua as mA,wa as Lr,xa as Nc,ya as Rc,za as s3}from"./chunks/chunk-S66TL4Z3.js";import{a as u4,b as GM,c as W6,d as WM,e as i5,g as oa,h as aT,j as sT,l as I3,m as vH}from"./chunks/chunk-IHYVLVY3.js";import{a as V41,b as O41}from"./chunks/chunk-Y6SLVHK3.js";var aG=V41((N30,tG)=>{"use strict";function Ul1(e,t){this.v=e,this.k=t}function _Z(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=Array(t);a<t;a++)s[a]=e[a];return s}function ql1(e){if(Array.isArray(e))return e}function $l1(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var s,o,r,i,n=[],l=!0,c=!1;try{if(r=(a=a.call(e)).next,t===0){if(Object(a)!==a)return;l=!1}else for(;!(l=(s=r.call(a)).done)&&(n.push(s.value),n.length!==t);l=!0);}catch(h){c=!0,o=h}finally{try{if(!l&&a.return!=null&&(i=a.return(),Object(i)!==i))return}finally{if(c)throw o}}return n}}function jl1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kl1(e,t){return ql1(e)||$l1(e,t)||Yl1(e,t)||jl1()}function Yl1(e,t){if(e){if(typeof e=="string")return _Z(e,t);var a={}.toString.call(e).slice(8,-1);return a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set"?Array.from(e):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_Z(e,t):void 0}}function pd(e){var t,a;function s(r,i){try{var n=e[r](i),l=n.value,c=l instanceof Ul1;Promise.resolve(c?l.v:l).then(function(h){if(c){var p=r==="return"&&l.k?r:"next";if(!l.k||h.done)return s(p,h);h=e[p](h).value}o(!!n.done,h)},function(h){s("throw",h)})}catch(h){o(2,h)}}function o(r,i){r===2?t.reject(i):t.resolve({value:i,done:r}),(t=t.next)?s(t.key,t.arg):a=null}this._invoke=function(r,i){return new Promise(function(n,l){var c={key:r,arg:i,resolve:n,reject:l,next:null};a?a=a.next=c:(t=a=c,s(r,i))})},typeof e.return!="function"&&(this.return=void 0)}pd.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},pd.prototype.next=function(e){return this._invoke("next",e)},pd.prototype.throw=function(e){return this._invoke("throw",e)},pd.prototype.return=function(e){return this._invoke("return",e)};var XZ=Object.entries,IZ=Object.setPrototypeOf,Xl1=Object.isFrozen,Jl1=Object.getPrototypeOf,Ql1=Object.getOwnPropertyDescriptor,h3=Object.freeze,C3=Object.seal,Bs=Object.create,JZ=typeof Reflect<"u"&&Reflect,dy=JZ.apply,uy=JZ.construct;h3||(h3=function(t){return t});C3||(C3=function(t){return t});dy||(dy=function(t,a){for(var s=arguments.length,o=new Array(s>2?s-2:0),r=2;r<s;r++)o[r-2]=arguments[r];return t.apply(a,o)});uy||(uy=function(t){for(var a=arguments.length,s=new Array(a>1?a-1:0),o=1;o<a;o++)s[o-1]=arguments[o];return new t(...s)});var tt=K2(Array.prototype.forEach);Array.prototype.indexOf;var ec1=K2(Array.prototype.lastIndexOf),VZ=K2(Array.prototype.pop),Xi=K2(Array.prototype.push);Array.prototype.slice;var tc1=K2(Array.prototype.splice),Ds=Array.isArray,en=K2(String.prototype.toLowerCase),ny=K2(String.prototype.toString),OZ=K2(String.prototype.match),Ji=K2(String.prototype.replace),BZ=K2(String.prototype.indexOf),ac1=K2(String.prototype.trim),sc1=K2(Number.prototype.toString),oc1=K2(Boolean.prototype.toString),DZ=typeof BigInt>"u"?null:K2(BigInt.prototype.toString),ZZ=typeof Symbol>"u"?null:K2(Symbol.prototype.toString),q4=K2(Object.prototype.hasOwnProperty),Qi=K2(Object.prototype.toString),e4=K2(RegExp.prototype.test),A9=rc1(TypeError);function K2(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,s=new Array(a>1?a-1:0),o=1;o<a;o++)s[o-1]=arguments[o];return dy(e,t,s)}}function rc1(e){return function(){for(var t=arguments.length,a=new Array(t),s=0;s<t;s++)a[s]=arguments[s];return uy(e,a)}}function N0(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:en;if(IZ&&IZ(e,null),!Ds(t))return e;let s=t.length;for(;s--;){let o=t[s];if(typeof o=="string"){let r=a(o);r!==o&&(Xl1(t)||(t[s]=r),o=r)}e[o]=!0}return e}function ic1(e){for(let t=0;t<e.length;t++)q4(e,t)||(e[t]=null);return e}function b5(e){let t=Bs(null);for(let s of XZ(e)){var a=Kl1(s,2);let o=a[0],r=a[1];q4(e,o)&&(Ds(r)?t[o]=ic1(r):r&&typeof r=="object"&&r.constructor===Object?t[o]=b5(r):t[o]=r)}return t}function nc1(e){switch(typeof e){case"string":return e;case"number":return sc1(e);case"boolean":return oc1(e);case"bigint":return DZ?DZ(e):"0";case"symbol":return ZZ?ZZ(e):"Symbol()";case"undefined":return Qi(e);case"function":case"object":{if(e===null)return Qi(e);let t=e,a=K5(t,"toString");if(typeof a=="function"){let s=a(t);return typeof s=="string"?s:Qi(s)}return Qi(e)}default:return Qi(e)}}function K5(e,t){for(;e!==null;){let s=Ql1(e,t);if(s){if(s.get)return K2(s.get);if(typeof s.value=="function")return K2(s.value)}e=Jl1(e)}function a(){return null}return a}function lc1(e){try{return e4(e,""),!0}catch{return!1}}var GZ=h3(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ly=h3(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),cy=h3(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),cc1=h3(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),hy=h3(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),hc1=h3(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),WZ=h3(["#text"]),UZ=h3(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),py=h3(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),qZ=h3(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),md=h3(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pc1=C3(/{{[\w\W]*|^[\w\W]*}}/g),mc1=C3(/<%[\w\W]*|^[\w\W]*%>/g),dc1=C3(/\${[\w\W]*/g),uc1=C3(/^data-[\-\w.\u00B7-\uFFFF]+$/),gc1=C3(/^aria-[\-\w]+$/),$Z=C3(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vc1=C3(/^(?:\w+script|data):/i),fc1=C3(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bc1=C3(/^html$/i),xc1=C3(/^[a-z][.\w]*(-[.\w]+)+$/i),jZ=C3(/<[/\w!]/g),KZ=C3(/<[/\w]/g),wc1=C3(/<\/no(script|embed|frames)/i),yc1=C3(/\/>/i),f5={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},QZ=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],zc1=h3(N0({},QZ)),kc1=(function(){let e={};return tt(QZ,t=>{e[t]=C3(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),h3(e)})(),Sc1=function(){return typeof window>"u"?null:window},Cc1=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let s=null,o="data-tt-policy-suffix";a&&a.hasAttribute(o)&&(s=a.getAttribute(o));let r="dompurify"+(s?"#"+s:"");try{return t.createPolicy(r,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},YZ=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},T9=function(t,a,s,o){return q4(t,a)&&Ds(t[a])?N0(o.base?b5(o.base):{},t[a],o.transform):s},my=function(t,a,s){let o=q4(t,a)?t[a]:void 0;return o&&typeof o=="object"?b5(o):s()};function eG(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Sc1(),t=l1=>eG(l1);if(t.version="3.4.16",t.removed=[],!e||!e.document||e.document.nodeType!==f5.document||!e.Element)return t.isSupported=!1,t;let a=e.document,s=a,o=s.currentScript;e.DocumentFragment;let r=e.HTMLTemplateElement,i=e.Node,n=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let c=e.DOMParser,h=e.trustedTypes,p=n.prototype,m=K5(p,"cloneNode"),u=K5(p,"remove"),v=K5(p,"removeAttributeNode"),g=K5(p,"nextSibling"),f=K5(p,"childNodes"),x=K5(p,"parentNode"),b=K5(p,"shadowRoot"),w=K5(p,"attributes"),S=i&&i.prototype?K5(i.prototype,"nodeType"):null,T=i&&i.prototype?K5(i.prototype,"nodeName"):null,A=i&&i.prototype?K5(i.prototype,"ownerDocument"):null,P=function(C){return S?S(C):C.nodeType},E=function(C){return T?T(C):C.nodeName};if(typeof r=="function"){let l1=a.createElement("template");l1.content&&l1.content.ownerDocument&&(a=l1.content.ownerDocument)}let k,L="",N,R=!1,V=0,I=function(){if(V>0)throw A9('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},_=function(C){I(),V++;try{return k.createHTML(C)}finally{V--}},D=function(C){I(),V++;try{return k.createScriptURL(C)}finally{V--}},G=function(){return R||(N=Cc1(h,o),R=!0),N},K=a,t1=K.implementation,Z=K.createNodeIterator,a1=K.createDocumentFragment,n1=K.getElementsByTagName,r1=s.importNode,B=YZ();t.isSupported=typeof XZ=="function"&&typeof x=="function"&&t1&&t1.createHTMLDocument!==void 0;let j=pc1,$=mc1,p1=dc1,L1=uc1,i0=gc1,n0=vc1,J=fc1,A1=xc1,R1=$Z,k1=null,M2=N0({},[...GZ,...ly,...cy,...hy,...WZ]),p0=null,w2=N0({},[...UZ,...py,...qZ,...md]),_0=Object.seal(Bs(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),x1=null,G1=null,_1=Object.seal(Bs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),I0=!0,h1=!0,l0=!1,v1=!0,z1=!1,T1=!0,H1=!1,a2=!1,L2=null,A2=null,N3=!1,p4=!1,L4=!1,W2=!1,n2=!0,U2=!1,T2="user-content-",t3=!0,p6=!1,H5={},E2=null,q3=N0({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),P5=null,A4=N0({},["audio","video","img","source","image","track"]),m6=null,T4=N0({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),m4="http://www.w3.org/1998/Math/MathML",E1="http://www.w3.org/2000/svg",a0="http://www.w3.org/1999/xhtml",a3=a0,$3=!1,N1=null,q2=N0({},[m4,E1,a0],ny),u3=h3(["mi","mo","mn","ms","mtext"]),S1=N0({},u3),H2=h3(["annotation-xml"]),s5=N0({},H2),Z0=N0({},["title","style","font","a","script"]),d6=null,S41=["application/xhtml+xml","text/html"],C41="text/html",V2=null,Ut=null,M41=a.createElement("form"),SM=function(C){return C instanceof RegExp||C instanceof Function},dv=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ut&&Ut===C)return;(!C||typeof C!="object")&&(C={}),C=b5(C),d6=S41.indexOf(C.PARSER_MEDIA_TYPE)===-1?C41:C.PARSER_MEDIA_TYPE,V2=d6==="application/xhtml+xml"?ny:en,k1=T9(C,"ALLOWED_TAGS",M2,{transform:V2}),p0=T9(C,"ALLOWED_ATTR",w2,{transform:V2}),N1=T9(C,"ALLOWED_NAMESPACES",q2,{transform:ny}),m6=T9(C,"ADD_URI_SAFE_ATTR",T4,{transform:V2,base:T4}),P5=T9(C,"ADD_DATA_URI_TAGS",A4,{transform:V2,base:A4}),E2=T9(C,"FORBID_CONTENTS",q3,{transform:V2}),x1=T9(C,"FORBID_TAGS",b5({}),{transform:V2}),G1=T9(C,"FORBID_ATTR",b5({}),{transform:V2}),H5=q4(C,"USE_PROFILES")?C.USE_PROFILES&&typeof C.USE_PROFILES=="object"?b5(C.USE_PROFILES):C.USE_PROFILES:!1,I0=C.ALLOW_ARIA_ATTR!==!1,h1=C.ALLOW_DATA_ATTR!==!1,l0=C.ALLOW_UNKNOWN_PROTOCOLS||!1,v1=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,z1=C.SAFE_FOR_TEMPLATES||!1,T1=C.SAFE_FOR_XML!==!1,H1=C.WHOLE_DOCUMENT||!1,p4=C.RETURN_DOM||!1,L4=C.RETURN_DOM_FRAGMENT||!1,W2=C.RETURN_TRUSTED_TYPE||!1,N3=C.FORCE_BODY||!1,n2=C.SANITIZE_DOM!==!1,U2=C.SANITIZE_NAMED_PROPS||!1,t3=C.KEEP_CONTENT!==!1,p6=C.IN_PLACE||!1,R1=lc1(C.ALLOWED_URI_REGEXP)?C.ALLOWED_URI_REGEXP:$Z,a3=typeof C.NAMESPACE=="string"?C.NAMESPACE:a0,S1=my(C,"MATHML_TEXT_INTEGRATION_POINTS",()=>N0({},u3)),s5=my(C,"HTML_INTEGRATION_POINTS",()=>N0({},H2));let W=my(C,"CUSTOM_ELEMENT_HANDLING",()=>Bs(null));if(_0=Bs(null),q4(W,"tagNameCheck")&&SM(W.tagNameCheck)&&(_0.tagNameCheck=W.tagNameCheck),q4(W,"attributeNameCheck")&&SM(W.attributeNameCheck)&&(_0.attributeNameCheck=W.attributeNameCheck),q4(W,"allowCustomizedBuiltInElements")&&typeof W.allowCustomizedBuiltInElements=="boolean"&&(_0.allowCustomizedBuiltInElements=W.allowCustomizedBuiltInElements),C3(_0),z1&&(h1=!1),L4&&(p4=!0),H5&&(k1=N0({},WZ),p0=Bs(null),H5.html===!0&&(N0(k1,GZ),N0(p0,UZ)),H5.svg===!0&&(N0(k1,ly),N0(p0,py),N0(p0,md)),H5.svgFilters===!0&&(N0(k1,cy),N0(p0,py),N0(p0,md)),H5.mathMl===!0&&(N0(k1,hy),N0(p0,qZ),N0(p0,md))),_1.tagCheck=null,_1.attributeCheck=null,q4(C,"ADD_TAGS")&&(typeof C.ADD_TAGS=="function"?_1.tagCheck=C.ADD_TAGS:Ds(C.ADD_TAGS)&&(k1===M2&&(k1=b5(k1)),N0(k1,C.ADD_TAGS,V2))),q4(C,"ADD_ATTR")&&(typeof C.ADD_ATTR=="function"?_1.attributeCheck=C.ADD_ATTR:Ds(C.ADD_ATTR)&&(p0===w2&&(p0=b5(p0)),N0(p0,C.ADD_ATTR,V2))),q4(C,"ADD_FORBID_CONTENTS")&&Ds(C.ADD_FORBID_CONTENTS)&&(E2===q3&&(E2=b5(E2)),N0(E2,C.ADD_FORBID_CONTENTS,V2)),t3&&(k1["#text"]=!0),H1&&N0(k1,["html","head","body"]),k1.table&&(N0(k1,["tbody"]),delete x1.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw A9('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw A9('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let s1=k;k=C.TRUSTED_TYPES_POLICY;try{L=_("")}catch(d1){throw k=s1,d1}}else C.TRUSTED_TYPES_POLICY===null?(k=void 0,L=""):(k===void 0&&(k=G()),k&&typeof L=="string"&&(L=_("")));h3&&h3(C),Ut=C},CM=N0({},[...ly,...cy,...cc1]),MM=N0({},[...hy,...hc1]),L41=function(C,W,s1){return W.namespaceURI===a0?C==="svg":W.namespaceURI===m4?C==="svg"&&(s1==="annotation-xml"||S1[s1]):!!CM[C]},A41=function(C,W,s1){return W.namespaceURI===a0?C==="math":W.namespaceURI===E1?C==="math"&&s5[s1]:!!MM[C]},T41=function(C,W,s1){return W.namespaceURI===E1&&!s5[s1]||W.namespaceURI===m4&&!S1[s1]?!1:!MM[C]&&(Z0[C]||!CM[C])},E41=function(C){let W=x(C);(!W||!W.tagName)&&(W={namespaceURI:a3,tagName:"template"});let s1=en(C.tagName),d1=en(W.tagName);return N1[C.namespaceURI]?C.namespaceURI===E1?L41(s1,W,d1):C.namespaceURI===m4?A41(s1,W,d1):C.namespaceURI===a0?T41(s1,W,d1):!!(d6==="application/xhtml+xml"&&N1[C.namespaceURI]):!1},I8=function(C){Xi(t.removed,{element:C});try{x(C).removeChild(C)}catch{if(u(C),!x(C))throw A9("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},LM=function(C,W,s1){try{v(C,W)}catch{try{C.removeAttribute(s1)}catch{}}},Vl=function(C){Ol(C);let W=f(C);if(W){let d1=[];tt(W,K1=>{Xi(d1,K1)}),tt(d1,K1=>{try{u(K1)}catch{}})}let s1=w(C);if(s1)for(let d1=s1.length-1;d1>=0;--d1){let K1=s1[d1],b0=K1&&K1.name;typeof b0=="string"&&LM(C,K1,b0)}},me=function(C,W,s1){if(!s1)try{s1=W.getAttributeNode(C)}catch{s1=null}Xi(t.removed,{attribute:s1||null,from:W});try{s1?v(W,s1):W.removeAttribute(C)}catch{try{W.removeAttribute(C)}catch{}}if(C==="is")if(p4||L4)try{I8(W)}catch{}else try{W.setAttribute(C,"")}catch{}},H41=function(C){let W=w(C);if(W)for(let s1=W.length-1;s1>=0;--s1){let d1=W[s1],K1=d1&&d1.name;typeof K1!="string"||p0[V2(K1)]||LM(C,d1,K1)}},Ol=function(C){let W=[C];for(;W.length>0;){let s1=W.pop();P(s1)===f5.element&&H41(s1);let d1=f(s1);if(d1)for(let K1=d1.length-1;K1>=0;--K1)W.push(d1[K1])}},AM=function(C,W){return T1?C==="patchsrc"?!0:C==="for"&&W!=="label"&&W!=="output":!1},P41=function(C){if(!T1)return;let W=[C];for(;W.length>0;){let s1=W.pop(),d1=P(s1);if(d1===f5.processingInstruction||d1===f5.comment&&e4(KZ,s1.data)){try{u(s1)}catch{}continue}if(d1===f5.element){let b0=s1,A0=V2(E(s1));try{b0.hasAttribute&&b0.hasAttribute("patchsrc")&&b0.removeAttribute("patchsrc"),b0.hasAttribute&&b0.hasAttribute("for")&&AM("for",A0)&&b0.removeAttribute("for")}catch{}}let K1=f(s1);if(K1)for(let b0=K1.length-1;b0>=0;--b0)W.push(K1[b0])}},TM=function(C){let W=null,s1=null;if(N3)C="<remove></remove>"+C;else{let b0=OZ(C,/^[\r\n\t ]+/);s1=b0&&b0[0]}d6==="application/xhtml+xml"&&a3===a0&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");let d1=k?_(C):C;if(a3===a0)try{W=new c().parseFromString(d1,d6)}catch{}if(!W||!W.documentElement){W=t1.createDocument(a3,"template",null);try{W.documentElement.innerHTML=$3?L:d1}catch{}}let K1=W.body||W.documentElement;return C&&s1&&K1.insertBefore(a.createTextNode(s1),K1.childNodes[0]||null),a3===a0?n1.call(W,H1?"html":"body")[0]:H1?W.documentElement:K1},EM=function(C){let W=A?A(C):C.ownerDocument;return Z.call(W||C,C,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Bl=function(C){return C=Ji(C,j," "),C=Ji(C,$," "),C=Ji(C,p1," "),C},uv=function(C){var W;C.normalize();let s1=A?A(C):C.ownerDocument,d1=Z.call(s1||C,C,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),K1=d1.nextNode();for(;K1;)K1.data=Bl(K1.data),K1=d1.nextNode();let b0=(W=C.querySelectorAll)===null||W===void 0?void 0:W.call(C,"template");b0&&tt(b0,A0=>{qt(A0.content)&&uv(A0.content)})},Dl=function(C){let W=T?T(C):null;return typeof W!="string"||V2(W)!=="form"?!1:typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||C.attributes!==w(C)||typeof C.removeAttribute!="function"||typeof C.removeAttributeNode!="function"||typeof C.getAttributeNode!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function"||C.nodeType!==S(C)||C.childNodes!==f(C)},qt=function(C){if(!S||typeof C!="object"||C===null)return!1;try{return S(C)===f5.documentFragment}catch{return!1}},wr=function(C){if(!S||typeof C!="object"||C===null)return!1;try{return typeof S(C)=="number"}catch{return!1}};function G6(l1,C,W){l1.length!==0&&tt(l1,s1=>{s1.call(t,C,W,Ut)})}let F41=function(C,W){return!!(T1&&C.hasChildNodes()&&!wr(C.firstElementChild)&&e4(jZ,C.textContent)&&e4(jZ,C.innerHTML)||T1&&C.namespaceURI===a0&&zc1[W]&&(wr(C.firstElementChild)||typeof C.textContent=="string"&&e4(kc1[W],C.textContent))||C.nodeType===f5.processingInstruction||T1&&C.nodeType===f5.comment&&e4(KZ,C.data))},Zl=function(C,W){if(C instanceof RegExp)return e4(C,W);if(C instanceof Function){for(var s1=arguments.length,d1=new Array(s1>2?s1-2:0),K1=2;K1<s1;K1++)d1[K1-2]=arguments[K1];return!!C(W,...d1)}return!1},N41=function(C,W,s1){if(!x1[W]&&NM(W)&&Zl(_0.tagNameCheck,W))return!1;if(t3&&!E2[W]){let d1=x(C),K1=f(C);if(K1&&d1){let b0=K1.length;for(let A0=b0-1;A0>=0;--A0){let P2=C===s1?m(K1[A0],!0):K1[A0];d1.insertBefore(P2,g(C))}}}return I8(C),!0},HM=function(C,W,s1,d1){return C.length===0?W:W===s1||W===d1?b5(W):W},$t=function(C,W){return C===W||x(C)!==null?!1:(p6&&Ol(C),!0)},PM=function(C,W){if(G6(B.beforeSanitizeElements,C,null),$t(C,W))return!0;if(Dl(C))return I8(C),!0;let s1=V2(E(C));if(k1=HM(B.uponSanitizeElement,k1,M2,L2),G6(B.uponSanitizeElement,C,{tagName:s1,allowedTags:k1}),$t(C,W))return!0;if(F41(C,s1))return I8(C),!0;if(x1[s1]||!(_1.tagCheck instanceof Function&&_1.tagCheck(s1))&&!k1[s1]){let d1=N41(C,s1,W);return d1===!1&&(G6(B.afterSanitizeElements,C,null),$t(C,W))?!0:d1}if(P(C)===f5.element&&!E41(C)||(s1==="noscript"||s1==="noembed"||s1==="noframes")&&e4(wc1,C.innerHTML))return I8(C),!0;if(z1&&C.nodeType===f5.text){let d1=Bl(C.textContent);C.textContent!==d1&&(Xi(t.removed,{element:C.cloneNode()}),C.textContent=d1)}return G6(B.afterSanitizeElements,C,null),$t(C,W)},FM=function(C,W,s1){if(G1[W]||AM(W,C)||n2&&(W==="id"||W==="name")&&(s1 in a||s1 in M41))return!1;let d1=p0[W]||_1.attributeCheck instanceof Function&&_1.attributeCheck(W,C);return h1&&e4(L1,W)||I0&&e4(i0,W)?!0:d1?m6[W]||e4(R1,Ji(s1,J,""))||(W==="src"||W==="xlink:href"||W==="href")&&C!=="script"&&BZ(s1,"data:")===0&&P5[C]||l0&&!e4(n0,Ji(s1,J,""))?!0:!s1:NM(C)&&Zl(_0.tagNameCheck,C)&&Zl(_0.attributeNameCheck,W,C)||W==="is"&&_0.allowCustomizedBuiltInElements&&Zl(_0.tagNameCheck,s1)},R41=N0({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),NM=function(C){return!R41[en(C)]&&e4(A1,C)},_41=function(C,W,s1,d1){if(k&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!s1)switch(h.getAttributeType(C,W)){case"TrustedHTML":return _(d1);case"TrustedScriptURL":return D(d1)}return d1},I41=function(C,W,s1,d1){try{return s1?C.setAttributeNS(s1,W,d1):C.setAttribute(W,d1),Dl(C)?(I8(C),!1):!0}catch{return me(W,C),!1}},RM=function(C,W){if(G6(B.beforeSanitizeAttributes,C,null),$t(C,W))return;let s1=C.attributes;if(!s1||Dl(C))return;p0=HM(B.uponSanitizeAttribute,p0,w2,A2);let d1={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:p0,forceKeepAttr:void 0},K1=s1.length,b0=V2(C.nodeName);for(;K1--;){let A0=s1[K1],P2=A0.name,F5=A0.namespaceURI,o5=A0.value,jt=V2(P2),vv=o5,d4=P2==="value"?vv:ac1(vv),_M=!1;if(d1.attrName=jt,d1.attrValue=d4,d1.keepAttr=!0,d1.forceKeepAttr=void 0,G6(B.uponSanitizeAttribute,C,d1),d4=d1.attrValue,U2&&(jt==="id"||jt==="name")&&BZ(d4,T2)!==0&&(me(P2,C,A0),d4=T2+d4,_M=!0),T1&&e4(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d4)){me(P2,C,A0);continue}if(jt==="attributename"&&OZ(d4,"href")){me(P2,C,A0);continue}if(!d1.forceKeepAttr){if(!d1.keepAttr){me(P2,C,A0);continue}if(!v1&&e4(yc1,d4)){me(P2,C,A0);continue}if(z1&&(d4=Bl(d4)),!FM(b0,jt,d4)){me(P2,C,A0);continue}d4=_41(b0,jt,F5,d4),d4!==vv&&I41(C,P2,F5,d4)&&_M&&VZ(t.removed)}}G6(B.afterSanitizeAttributes,C,null),$t(C,W)},Gl=function(C){let W=null,s1=EM(C);for(G6(B.beforeSanitizeShadowDOM,C,null);W=s1.nextNode();)if(G6(B.uponSanitizeShadowNode,W,null),PM(W,C),RM(W,C),qt(W.content)&&Gl(W.content),P(W)===f5.element){let d1=b(W);qt(d1)&&(gv(d1),Gl(d1))}G6(B.afterSanitizeShadowDOM,C,null)},gv=function(C){let W=[{node:C,shadow:null}];for(;W.length>0;){let s1=W.pop();if(s1.shadow){Gl(s1.shadow);continue}let d1=s1.node,K1=P(d1)===f5.element,b0=f(d1);if(b0)for(let A0=b0.length-1;A0>=0;--A0)W.push({node:b0[A0],shadow:null});if(K1){let A0=T?T(d1):null;if(typeof A0=="string"&&V2(A0)==="template"){let P2=d1.content;qt(P2)&&W.push({node:P2,shadow:null})}}if(K1){let A0=b(d1);qt(A0)&&W.push({node:null,shadow:A0},{node:A0,shadow:null})}}};return t.sanitize=function(l1){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},W=null,s1=null,d1=null,K1=null;if($3=!l1,$3&&(l1="<!-->"),typeof l1!="string"&&!wr(l1)&&(l1=nc1(l1),typeof l1!="string"))throw A9("dirty is not a string, aborting");if(!t.isSupported)return l1;a2?(k1=L2,p0=A2):dv(C),(B.uponSanitizeElement.length>0||B.uponSanitizeAttribute.length>0)&&(k1=b5(k1)),B.uponSanitizeAttribute.length>0&&(p0=b5(p0)),t.removed=[];let b0=p6&&typeof l1!="string"&&wr(l1);if(b0){P41(l1);let F5=E(l1);if(typeof F5=="string"){let o5=V2(F5);if(!k1[o5]||x1[o5])throw Vl(l1),A9("root node is forbidden and cannot be sanitized in-place")}if(Dl(l1))throw Vl(l1),A9("root node is clobbered and cannot be sanitized in-place");try{gv(l1)}catch(o5){throw Vl(l1),o5}}else if(wr(l1))W=TM("<!---->"),s1=W.ownerDocument.importNode(l1,!0),s1.nodeType===f5.element&&s1.nodeName==="BODY"||s1.nodeName==="HTML"?W=s1:W.appendChild(s1),gv(W);else{if(!p4&&!z1&&!H1&&l1.indexOf("<")===-1)return k&&W2?_(l1):l1;if(W=TM(l1),!W)return p4?null:W2?L:""}W&&N3&&I8(W.firstChild);let A0=b0?l1:W;try{let F5=EM(A0);for(;d1=F5.nextNode();)PM(d1,A0),RM(d1,A0),qt(d1.content)&&Gl(d1.content)}catch(F5){throw b0&&(Vl(l1),tt(t.removed,o5=>{o5.element&&Ol(o5.element)})),F5}if(b0){let F5=!1;if(tt(t.removed,o5=>{o5.element&&(o5.element===l1&&(F5=!0),Ol(o5.element))}),F5)throw A9("a node selected for removal could not be safely returned; refusing to sanitize in place");return z1&&uv(l1),l1}if(p4){if(z1&&uv(W),L4)for(K1=a1.call(W.ownerDocument);W.firstChild;)K1.appendChild(W.firstChild);else K1=W;return(p0.shadowroot||p0.shadowrootmode)&&(K1=r1.call(s,K1,!0)),K1}let P2=H1?W.outerHTML:W.innerHTML;return H1&&k1["!doctype"]&&W.ownerDocument&&W.ownerDocument.doctype&&W.ownerDocument.doctype.name&&e4(bc1,W.ownerDocument.doctype.name)&&(P2="<!DOCTYPE "+W.ownerDocument.doctype.name+`>
|
|
3
3
|
`+P2),z1&&(P2=Bl(P2)),k&&W2?_(P2):P2},t.setConfig=function(){let l1=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};dv(l1),a2=!0,L2=k1,A2=p0},t.clearConfig=function(){Ut=null,a2=!1,L2=null,A2=null,k=N,L=""},t.isValidAttribute=function(l1,C,W){Ut||dv({});let s1=V2(l1),d1=V2(C);return FM(s1,d1,W)},t.addHook=function(l1,C){typeof C=="function"&&q4(B,l1)&&Xi(B[l1],C)},t.removeHook=function(l1,C){if(q4(B,l1)){if(C!==void 0){let W=ec1(B[l1],C);return W===-1?void 0:tc1(B[l1],W,1)[0]}return VZ(B[l1])}},t.removeHooks=function(l1){q4(B,l1)&&(B[l1]=[])},t.removeAllHooks=function(){B=YZ()},t}var Mc1=eG();tG.exports=Mc1});import{useEffect as zT1,useMemo as kT1,useState as y41}from"react";import{useEaselStrings as ST1}from"efficient-easel/strings";import{jsx as V4,jsxs as F61}from"react/jsx-runtime";import{useCallback as z2,useEffect as Ne,useMemo as _F,useRef as Ga,useState as p2}from"react";import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/drag.css";import"efficient-easel/screen.css";var eP={name:"catalogueLabel",applies:e=>Object.prototype.hasOwnProperty.call(yr,e),draw(e,t){e.label=yr[t]}};import{jsx as B41}from"react/jsx-runtime";var tP={name:"sectionGroupAllow",applies:e=>ec.includes(e),panel(e,t,a,s){let o=e.fields?.sections;o&&(o.allow=[...s.sectionGroupAllow])}},Sf=new Set(Object.keys(X1)),aP={name:"openSlotDisallow",applies:()=>!0,panel(e,t,a,s){let o=s.contentSectionKeys;if(e?.fields)for(let r of Object.values(e.fields)){let i=r;if(i.type!=="slot"||i.allow)continue;let n=t==="Flex"?o.filter(l=>!Sf.has(l)):o;i.disallow=Array.from(new Set([...i.disallow??[],...n]))}}};var D41=Array.from(new Set([...BM.map(e=>e.type),...Sf,...Wl,"GalleryItem"])),Z41={not:{context:"parentOffersPositions",is:!1}},sP={name:"cellWidth",applies:(e,t,a)=>D41.includes(e)&&!!a&&typeof a.render=="function",panel(e,t,a){let s=a.cellWidthFields;e.fields={...e.fields,...s()},e.fields=u6(e.fields??{},Object.keys(s()),Z41)},draw(e){let t=e.render;e.render=a=>{let s=vL(a.gridSpan),o=t(a);return s==null?o:B41("div",{className:"sf-grid-cell",[fL]:String(s),children:o})}}};import{jsx as dP}from"react/jsx-runtime";import{Fragment as oP,jsx as Dr,jsxs as G41}from"react/jsx-runtime";import{createContext as Cf,useContext as Zr,useId as W41,useMemo as U41}from"react";var Bh=Cf(null),rP=Cf(null),iP=Cf(null);function nP({needles:e,styles:t,type:a,children:s}){let o=W41(),r=JSON.stringify([o,e,t,a]),i=U41(()=>DL(e,t,o,n=>cc(a,n),n=>lc(a,n)),[r]);return i?G41(oP,{children:[Dr("style",{href:`${q41}${o}-${$41(Tv(i))}`,precedence:lP,dangerouslySetInnerHTML:{__html:Tv(i).replace(/</g,"\\3c ")}}),Dr(Bh.Provider,{value:i,children:s})]}):Dr(oP,{children:s})}var lP="sf-part-styles",q41=`${lP}-`;function $41(e){let t=2166136261;for(let a=0;a<e.length;a+=1)t^=e.charCodeAt(a),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function cP(e){let t=Zr(Bh),a=Zr(rP),s=ZL(t,e);return s&&s.stamp!==a?s:null}function hP(e){return Av(Zr(Bh),e)}function pP({stamp:e,children:t}){return Dr(rP.Provider,{value:e,children:t})}function Dh({children:e}){let t=Zr(Bh);return Dr(iP.Provider,{value:t,children:e})}function mP(e){return Av(Zr(iP),e)}var uP={name:"clickableParts",applies:(e,t,a)=>typeof a?.render=="function",draw(e,t,a){let s=e,o=()=>s.textParts??s.fields,r=s.render,i=a.inspector?.PartAnchors;s.render=n=>{let l=Qt(n);return n.puck?.isEditing&&i?dP(i,{needles:Sv(o(),n),styles:l,type:t,children:r(n)}):Object.keys(l).length?dP(nP,{needles:Sv(o(),n),styles:l,type:t,children:r(n)}):r(n)}}};import{jsx as gP}from"react/jsx-runtime";var vP={name:"sectionCorners",applies:(e,t,a)=>t.isSection(e)&&!!a&&typeof a.render=="function",panel(e,t,a){e.fields={...e.fields,...a.sectionShapeFields()}},draw(e){let t=e.render;e.render=a=>{let s=gc(a.sectionCorners,a.sectionCornerSides),o=t(a),r=yc(a)?`sf-section-corners ${dA}`:"sf-section-corners";return s?gP("div",{className:r,style:{display:"contents",...s},children:o}):o}}},Mf=["CollectionCard"],fP={name:"cardCorners",applies:(e,t,a)=>Mf.includes(e)&&!!a&&typeof a.render=="function",panel(e,t,a){e.fields={...e.fields,...a.cardShapeFields()}},draw(e){let t=e.render;e.render=a=>{let s=uA(a.cardCorners,a.cardCornerSides),o=t(a);return s?gP("div",{className:"sf-card-corners",style:{display:"contents",...s},children:o}):o}}};var bP={name:"emptyHeadings",applies:()=>!0,panel(e,t,a){let s=a.dropEmptyHeadings,o=e.resolveFields;e.resolveFields=o?(r,i)=>{let n=o(r,i);return n instanceof Promise?n.then(l=>s(l??i.fields)):s(n??i.fields)}:(r,i)=>s(i.fields)}};var xP={name:"showWhenRows",applies:()=>!0,panel(e,t,a){let s=a.rowsShownForNode,o=e.showWhenFacts??{},r=e.resolveFields;e.resolveFields=r?(i,n)=>{let l=r(i,n);return l instanceof Promise?l.then(c=>s(c??n.fields,i,n,o)):s(l??n.fields,i,n,o)}:(i,n)=>s(n.fields,i,n,o)}};var wP={name:"hiddenNodes",applies:(e,t,a)=>typeof a?.render=="function",draw(e){let t=e.render;e.render=a=>a._hidden?null:t(a)}};var yP=oa.mediaFields,j41=e=>kc(e)?e.src:e;function K41(e,t){let a=t;for(let s of yP[e]??[])a=Sc(a,s,j41);return a}var zP={name:"mediaValues",applies:(e,t,a)=>typeof a?.render=="function"&&(yP[e]?.length??0)>0,draw(e,t){let a=e.render;e.render=s=>a(K41(t,s))}};import{jsx as kP,Fragment as Y41,jsxs as X41}from"react/jsx-runtime";function J41({anchor:e}){let t=Bv(typeof e=="string"?e:"");return t?kP("span",{id:t,className:"sf-section-anchor","aria-hidden":"true"}):null}var SP={name:"sectionAnchor",applies:(e,t,a)=>t.isSection(e)&&!!a&&typeof a.render=="function",panel(e,t,a){let s=a.anchorFields;e.fields={...e.fields,...s()}},draw(e){e.defaultProps={...e.defaultProps,anchor:""};let t=e.render;e.render=a=>X41(Y41,{children:[kP(J41,{anchor:a.anchor}),t(a)]})}};import{jsx as t51}from"react/jsx-runtime";import{jsx as Q41}from"react/jsx-runtime";import{useEffect as e51,useRef as CP}from"react";function MP({motion:e,editing:t,children:a}){let s=CP(null),o=CP(e);return e51(()=>{let r=s.current;if(r){if(t){if(o.current===e)return;o.current=e,PA(r);return}return HA(r)}},[e,t]),Q41("div",{ref:s,[EA]:e,children:a})}var LP={name:"sectionAnimation",applies:(e,t,a)=>t.isSection(e)&&!FA.has(e)&&!!a&&typeof a.render=="function",panel(e,t,a){let s=a.sectionAnimationFields;e.fields={...e.fields,...s()}},draw(e){let t=e,a=t.render;t.render=s=>{let o=TA(s.sectionAnimation);return o?t51(MP,{motion:o,editing:!!s.puck?.isEditing,children:a(s)}):a(s)}}};import{jsx as a51}from"react/jsx-runtime";var s51=[[["sectionHeightValue"],g3("sectionHeightMode",Mr,"auto",["fixed","screen"])],[["sectionHeightUnit"],g3("sectionHeightMode",Mr,"auto",["fixed"])],[["sectionHeightValuePhone"],g3("sectionHeightModePhone",Mr,"auto",["fixed","screen"])],[["sectionHeightUnitPhone"],g3("sectionHeightModePhone",Mr,"auto",["fixed"])]],EP={name:"sectionHeight",applies:(e,t,a)=>t.isSection(e)&&!RA.has(e)&&!!a&&typeof a.render=="function",panel(e,t,a){let s=a.heightFields;e.fields={...e.fields,...P1(s(),s51)};let o=e.resolveFields;e.resolveFields=(r,i)=>{let n=o?o(r,i):i.fields,l=r?.props??{},c=NA(l),h=_A(l)?IA(l):null;return n&&typeof n.then=="function"?n.then(p=>TP(AP(p,c),h)):TP(AP(n,c),h)}},draw(e){let t=e.render;e.render=a=>{let s=VA(a);return s?a51("div",{className:s.className,style:s.style,children:t(a)}):t(a)}}};function AP(e,t){if(!e||!("sectionHeightMode"in e)||t.mode==="auto")return e;let a={...e},s=a.sectionHeightValue;return s&&(a.sectionHeightValue={...s,unit:t.unit}),a}function TP(e,t){if(!e||!("sectionHeightModePhone"in e)||!t||t.mode==="auto")return e;let a={...e},s=a.sectionHeightValuePhone;return s&&(a.sectionHeightValuePhone={...s,unit:t.unit}),a}import{jsx as o51}from"react/jsx-runtime";var HP=FP("sectionSticky",(e,t,a)=>t.isSection(e)&&!OA.has(e)&&!!a&&typeof a.render=="function"),PP=FP("cardSticky",(e,t,a)=>Mf.includes(e)&&!!a&&typeof a.render=="function");function FP(e,t){return{name:e,applies:t,panel(a,s,o){a.fields={...a.fields,...P1(o.stickFields(),r51)}},draw(a){let s=a.render;a.render=o=>{let r=BA(o);return r?o51("div",{className:r.className,style:r.style,children:s(o)}):s(o)}}}}var r51=[[["stickTopDistance"],{field:"stickTop",is:!0}],[["stickTopDistancePhone"],{field:"stickTopPhone",is:!0}]];import{jsx as p51}from"react/jsx-runtime";import{jsx as n51}from"react/jsx-runtime";var Zh="sf-card",n3={min:0,max:100,step:5,fallback:0,unit:"%"},X8=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],i51="68%",I4={desktop:20,phone:20,side:40,sidePhone:24},NP="sf-box-sides";function Te(e){return typeof e=="string"&&e.trim()!==""}function Gh(e,t){let a=typeof e=="number"?e:Number.parseFloat(String(e??""));if(!Number.isFinite(a)||a<=0)return null;let s=(Math.min(n3.max,Math.max(n3.min,a))/100).toFixed(2);return t!=="bottom"?{background:`rgba(0,0,0,${s})`}:{background:`linear-gradient(0deg, rgba(0,0,0,${s}) 0%, rgba(0,0,0,0) ${i51})`}}function Wh(e,t){let a={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[s,o]=a[e]??a.center,[r,i]=t==="column"?[o,s]:[s,o],n={start:"justify-start",center:"justify-center",end:"justify-end"},l={start:"items-start",center:"items-center",end:"items-end"};return`${n[r]} ${l[i]}`}var Uh={ParagraphsA:{top:60,bottom:80},StatsParagraph:{top:120,bottom:120},Timeline:{top:120,bottom:120},Footprint:{top:120,bottom:120},TimelineTrack:{top:120,bottom:120},TitleWithButtons:{top:140,bottom:140},ProcessSteps:{top:120,bottom:120},DetailRows:{top:100,bottom:100}},RP=new Set(Object.keys(Uh)),qh=new Set(["Flex","Text","Heading"]),l51=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),_P=new Set(["ProductGrid"]);function Lf(e,t,a=!1){let s=e.render;e.render=o=>{if(t?.(o))return s(o);let r=a?ve(o.sectionPaddingTop,o.sectionPaddingBottom,o.sectionPaddingTopPhone,o.sectionPaddingBottomPhone,o.sectionPaddingLeft,o.sectionPaddingRight,o.sectionPaddingLeftPhone,o.sectionPaddingRightPhone):ve(o.sectionPaddingTop,o.sectionPaddingBottom,o.sectionPaddingTopPhone,o.sectionPaddingBottomPhone),i=s(o);return r?n51("div",{className:r.className,style:r.style,children:i}):i}}var IP={name:"sectionPadding",applies:(e,t,a)=>t.isSection(e)&&!l51.has(e)&&!!a&&typeof a.render=="function",panel(e,t,a){RP.has(t)||_P.has(t)||(e.fields={...e.fields,...a.sidesPaddingFields()})},draw(e,t){if(RP.has(t)){let a=e.render,s=Uh[t];e.render=o=>{let r=ZA(o,s);return a({...o,padTop:r.top,padBottom:r.bottom})};return}if(_P.has(t)){Lf(e);return}qh.has(t)||Lf(e,t==="Flex"?a=>Te(a.bgImage):void 0,!0)}},c51=["Heading","Text"],h51=["LogoBlock"],VP={name:"blockPadding",applies:(e,t,a)=>(c51.includes(e)||h51.includes(e))&&!!a&&typeof a.render=="function",panel(e,t,a){e.fields={...e.fields,...a.sidesPaddingFields()}},draw(e,t){qh.has(t)||Lf(e,void 0,!0)}};var OP={name:"sectionBorder",applies:(e,t,a)=>t.isSection(e)&&!!a&&typeof a.render=="function",draw(e,t){if(qh.has(t))return;let a=e.render;e.render=s=>{let o=Tc(s.sectionBorder,s.sectionBorderPhone),r=a(s);return o?p51("div",{className:Ac,style:{display:"contents",...o},children:r}):r}}};import{jsx as m51}from"react/jsx-runtime";var BP={name:"sectionTheme",applies:(e,t,a)=>t.isSection(e)&&!LA.has(e)&&!!a&&typeof a.render=="function",panel(e,t,a){let{sectionThemeFields:s,SECTION_THEME_FOLLOW_LABEL:o}=a,r=Zv.has(t);e.fields={...e.fields,...r?s(j6,o):s()}},draw(e,t){let a=Zv.has(t),s=e.render;e.render=o=>{let r=ia(a?{...o,sectionAccent:j6(o.sectionAccent)}:o),i=s(o);return r?m51("div",{className:r.className,style:r.style,children:i}):i}}},DP={name:"slideTheme",applies:e=>e==="HeroSlide",panel(e,t,a){let{sectionThemeFields:s,BLOCK_THEME_FOLLOW_LABEL:o}=a;e?.fields&&(e.fields={...e.fields,...s(j6,o)})}};import{jsx as m5}from"react/jsx-runtime";var Ee={min:40,max:2e3,step:10,fallback:2e3,unit:"px"};function ZP(e){return typeof e!="number"?null:{width:`${e}${Ee.unit}`,maxWidth:"100%"}}var d51=new Set(["Flex","Grid"]);function Af(e,t){return e&&!t}var u51=e=>Array.isArray(e)&&e.length>0&&typeof e[0]=="object"&&e[0]!==null&&"type"in e[0];function GP(e,t){if(!Array.isArray(e)||typeof t!="string")return;let a=(s,o)=>{for(let r of s){let i=r?.props??{};if(i.id===t)return o;let n=String(r?.type??""),l=d51.has(n)&&Af(zc(n,i).content!=="full",o);for(let c of Object.values(i)){if(!u51(c))continue;let h=a(c,o||l);if(h!==void 0)return h}}};return a(e,!1)}import{jsx as He}from"react/jsx-runtime";import{createContext as qP,useContext as WP}from"react";var UP=qP(!1),Tf=qP(!1);function $P({children:e}){return He(Tf.Provider,{value:!0,children:e})}function Ba({contained:e,framedClass:t,fillClass:a,columnClass:s,style:o,tabLabel:r,pad:i,border:n,children:l}){let c=WP(UP),h=WP(Tf),p=Af(e,c),m=p&&!h,u=i&&!m?WA(i.values,i.frame):null,v=n&&!m?n:null,g=[m?t:a,u?.className,v?DA:null].filter(Boolean).join(" "),f=u||v?{...o,...u?.style,...v}:o,x=p?He(UP.Provider,{value:!0,children:l}):l,b=He("div",{className:g,style:f,"data-tab-label":r,children:h?He(Tf.Provider,{value:!1,children:p?He("div",{className:s,children:x}):x}):x}),w=i&&m?GA(i.values):null,S=w?He("div",{className:w.className,style:w.style,children:b}):b;return n&&m?He("div",{className:Ac,style:{display:"contents",...n},children:S}):S}import{jsx as g51}from"react/jsx-runtime";var Pe="mx-auto w-full max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)]",Fe="max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",Da=`${Pe} ${Fe}`,v51="mx-auto w-full max-w-[1280px] px-[60px]",f51="max-[960px]:px-6",tH1=`${v51} ${f51}`;function l2({contained:e,className:t="",style:a,pad:s,children:o}){return g51(Ba,{contained:e,framedClass:`${Da} ${t}`,fillClass:`w-full ${t}`,columnClass:Da,style:a,pad:s,children:o})}function jP(e,t){let a=e.props?.id,s=t.appState?.data?.content;return!Array.isArray(s)||typeof a!="string"?!0:!s.some(o=>o?.props?.id===a)}function $h(e,t){let a=e?.data?.content;if(!Array.isArray(a)||typeof t!="string")return;let s=(o,r)=>{for(let i of o){if(i?.props?.id===t)return r;for(let n of Object.values(i?.props??{}))if(Array.isArray(n)&&n.length>0&&typeof n[0]=="object"&&n[0]!==null&&"type"in n[0]){let l=s(n,i);if(l!==void 0)return l}}};return s(a,null)}var b51=new Set(["ProductGrid","RelatedProducts","DeliveryOptions","CheckoutCTA","Ticker","CategoryBar","DocTabs","CustomHTML","Spacer"]),x51=new Set(["ProductHero"]),w51=new Set(["Collections","CatalogFilterBar","AlloyWheelsListing","DeliveryOptions","CheckoutCTA","ProductHero","ProductGrid","DetailRows","FitmentTable","TyreSizes","TyreFitment","EuTyreLabel","BundleOffer","CompatibleTyres","RelatedProducts","FitmentFinder","SpecTable","Subscribe","SubscribeBlogs","ContactRouting","SubmitBuild"]);function jh(e,t){return SA(e)?!w51.has(e)||t?.widthRows==="two":!1}var qr="--sf-sw-site",y51="--sf-sw-content",z51="--sf-bg-cap",k51="contents [--sf-site-width:var(--sf-sw-content)] max-[800px]:[--sf-site-width:var(--sf-sw-site)]";function Gr(e,t){let a=t==="content";return e.content==="full"?a?null:"100vw":e.content==="content"&&e.contentMax!==null?a?`min(${e.contentMax}px,var(${qr}))`:`${e.contentMax}px`:null}function Wr(e,t){return t===null?e:m5("div",{className:"contents",style:{[qr]:g4},children:m5("div",{className:k51,style:{[y51]:t},children:e})})}var S51="--sf-content-cap",C51="contents max-[800px]:[--sf-content-cap:none]";function M51(e,t){if((e.content??"content")==="full")return null;let a=t==="content";return e.contentMax!==null?a?`min(${e.contentMax}px,var(${qr}))`:`${e.contentMax}px`:a?null:`var(${qr})`}function L51(e,t){return t===null?e:m5("div",{className:"contents",style:{[qr]:g4},children:m5("div",{className:C51,style:{[S51]:t},children:e})})}var Ur=(e,t)=>e==="content"?m5("div",{style:ue(g4),children:t}):t;function A51(e,t){let a=Iv[t],s=e.render;e.render=o=>{let r=CA(o),i=zc(t,o),n={...i,content:i.content??r.content};if(a==="hero"){let h=n.background??r.background,p=Wr(s(o),Gr(n,h));return h==="full"?m5("div",{style:{[yA]:"none",[vc]:"initial",[fc]:"initial"},children:p}):h==="content"?m5("div",{style:bc(!0),children:p}):p}let l=n.background??r.background??"full";if(a==="scrollOver"){let h=(n.content??"content")==="full",p=Wr(s({...o,fullWidth:h}),h?null:Gr(n,l));return l==="content"?m5("div",{className:"contents",style:{[z51]:g4},children:p}):p}let c=n.content??"content";switch(a){case"both":return Ur(l,L51(s(o),M51(n,l)));case"contained":{if(c==="full")return Ur(l,s({...o,contained:!1}));let h=Gr(n,l);if(l==="content"&&h===null)return s({...o,contained:!0});let p=m5($P,{children:s({...o,contained:!0})});return Ur(l,Wr(p,h))}case"contentColumn":case"contentFull":case"productGrid":{let h={...o,widthMode:c==="full"?"full":"page",fullWidth:void 0,pageWidth:void 0,contained:void 0},p=Wr(s(h),c==="full"?null:Gr(n,l));return a==="productGrid"?l==="content"?m5("div",{className:Da,children:p}):p:Ur(l,p)}default:return Ur(l,Wr(s(o),Gr(n,l)))}}}var KP={name:"sectionWidth",applies:(e,t,a)=>(t.isSection(e)&&!b51.has(e)||jh(e,a))&&!!a&&typeof a.render=="function",panel(e,t,a){if(jh(t,e)){let r=a.sectionWidthFields(t),i={...e.fields,...r};e.fields=Iv[t]==="contained"?JP(t,e,i,Object.keys(r)):i;return}let s=a.widthField;e.fields={...e.fields,...s("full")};let o=e.resolveFields;e.resolveFields=(r,i)=>{let n=o?o(r,i):i.fields,l=g6(r?.props??{},"full");return n&&typeof n.then=="function"?n.then(c=>Ef(c,l)):Ef(n,l)}},draw(e,t){if(jh(t,e)){A51(e,t);return}let a=x51.has(t),s=e.render;e.render=o=>{let{mode:r}=g6(o,"full"),i=s(o);if(r==="full")return i;let n=ue(g4);return a?m5("div",{style:{"--sf-page-cap":g4},children:i}):m5("div",{style:n,children:i})}}};function Ef(e,t){if(!e||!("widthMode"in e))return e;let a={...e},s=a.widthMode;return s&&(a.widthMode={...s,currentValue:t.mode,inherited:t.inherited}),a}var T51=new Set(["Heading","Text","ImageBlock","ButtonBlock","Banner","Stats","Logos","Divider","Flex","Grid","OrderSummary","DeliveryOptions","PaymentBadges","CheckoutCTA"]),YP={name:"containedWidth",applies:(e,t,a)=>T51.has(e)&&!jh(e,a)&&!!a&&typeof a.render=="function",panel(e,t,a){let s=a.widthField;e.fields=JP(t,e,{...e.fields,...s("page")});let o=e.resolveFields;e.resolveFields=(r,i)=>{let n=o?o(r,i):i.fields,l=g6(r?.props??{},"page"),c=h=>Ef(h,l);return n&&typeof n.then=="function"?n.then(c):c(n)}},draw(e){let t=e.render;e.render=a=>{let{mode:s}=g6(a,"page");return t({...a,contained:s!=="full"})}}},E51={not:{context:"inHeroGroupRow",is:!0}},XP={name:"buttonAlignInRow",applies:e=>e==="ButtonBlock",panel(e){let t=e;t.fields=u6(t.fields??{},["align"],E51),Ql(t,{inHeroGroupRow:(a,s)=>{let o=$h(s.appState,a.props?.id);return!!o&&o.type==="HeroGroup"&&Hc("HeroGroup",o.props?.direction)==="row"}})}};function H51(e){return Object.values(e).some(t=>!!t&&typeof t=="object"&&t.type==="slot")}var P51={any:[]},F51={not:{context:"insideSiteGutter",is:!0}},N51={not:{context:"widthCappedByParent",is:!0}};function JP(e,t,a,s=["widthMode","pageWidth"]){return e==="ButtonBlock"?u6(a,["_gWidth",...s],P51):H51(a)?(Ql(t,{insideSiteGutter:(o,r)=>GP(r.appState?.data?.content,o.props?.id)}),u6(a,s,F51)):(Ql(t,{widthCappedByParent:(o,r)=>"parent"in r?zL(r.parent):jP({props:o.props??{}},r)}),u6(a,s,N51))}var QP={name:"imageWidth",applies:e=>e==="ImageBlock",panel(e,t,a){let{slider:s,WidthIcon:o}=a;if(e?.fields){let r=s("Image width",m5(o,{}),Ee.min,Ee.max,Ee.step,Ee.fallback,Ee.unit),i="focal",n=Object.entries(e.fields),l=n.findIndex(([c])=>c===i);e.fields=Object.fromEntries(l===-1?[...n,["width",r]]:[...n.slice(0,l+1),["width",r],...n.slice(l+1)])}}};var R51=new Set(["Reviews","Cards","FAQ","Prose","ProductHero","SpecTable","ProductGrid","ParagraphsA","KeyFeatures","Stats","StatsParagraph","Chart","Mockup","Testimonials","Logos","ContactRouting","ContactLocations","SubmitBuild","ReviewForm","Form","AppointmentBooking","OrderSummary","DeliveryOptions","PaymentBadges","CheckoutCTA","Collections","AlloyWheelsListing","CatalogFilterBar","FitmentFinder","GalleryB","DocMasthead","DocBody","DocMetaCards","Masthead","FeaturedCover","LongRead","Series","Events","SectionHeader","Grid","Flex","Spacer","Divider","CustomHTML","Breadcrumb","CategoryBar","DocTabs","Hero","HeroSingle","IntroBleed","Manifesto","Timeline","TimelineTrack","Footprint","Banner","TitleWithButtons","Ticker","SubscribeBlogs","TyreSizes","TyreFitment","EuTyreLabel","SpecStrip","ProcessSteps","DetailRows","FitmentTable","CompatibleTyres","RelatedProducts","BundleOffer","Split","Gallery","Subscribe","Countdown"]),eF={name:"sectionGroups",applies:(e,t)=>t.isSection(e)&&(R51.has(e)||t.isHostBlock(e)),panel(e,t,a){let s=a.assignSectionGroups;e?.fields&&(e.fields=s(e.fields,t))}},_51=new Set(["HeroSlide","Heading","Text","ImageBlock","ButtonBlock","HeroGroup","GalleryItem","Footer","FooterLogo","FooterMenu","FooterGroup","FooterText","PostCard","LogoBlock","CollectionCard","Eyebrow","BookingBox","SubmitBox","FooterSocial","MenuBlock","SocialLogosBlock","EmailFormBlock","SearchBlock","CartBlock","CountrySwitchBlock","AccountBlock","LegalLineBlock"]),tF={name:"blockGroups",applies:e=>_51.has(e),panel(e,t,a){let s=a.assignSectionGroups;e?.fields&&(e.fields=s(e.fields,t))}};var I51=["Form","Stats"];function $r(e,t){let a=new Set(e),s=VM.filter(l=>a.has(l)),o=s.filter(l=>l!=="Header"&&l!=="Footer"&&!ec.includes(l)),r=new Set([...t,...Wl,...I51]),i=s.filter(l=>!r.has(l)),n=new Set(s);return{isSection:l=>n.has(l),isHostBlock:()=>!1,sectionGroupAllow:o,contentSectionKeys:i}}var V51=[zP,tP,aP,IP,vP,OP,fP,VP,sP,KP,YP,XP,QP,EP,SP,BP,LP,HP,PP,DP,eF,tF,xP,bP,uP,wP,eP];function Kh(e,t,a){let s=t;for(let o of V51)o.applies(e,a,s)&&(a.inspector&&o.panel?.(s,e,a.inspector,a),o.draw?.(s,e,a));return t}import{WidthIcon as e61}from"efficient-easel/icons";import{jsx as B51}from"react/jsx-runtime";import{useEffect as D51,useRef as Z51}from"react";var aF="data-puck-overlay-portal";function R5(e){return e.setAttribute(aF,"true"),()=>e.removeAttribute(aF)}import{usePreviewParts as G51}from"efficient-easel/draw/client";import{usePreviewDevice as W51}from"efficient-easel/draw/client";import{encodePartId as U51}from"efficient-easel/draw";var jr="data-puck-component";function Pf(e,t){return e.closest(`[${jr}]`)?.getAttribute(jr)===t}function sF(e,t,a){let s=e.querySelectorAll("*"),o=[],r=new Set;for(let x=0;x<s.length;x+=1){let b=s[x];if(!Pf(b,t))continue;let w=b.getAttribute(O8);w&&(o.push({element:b,partId:V8(t,w)}),r.add(b))}let i=[],n=new Set;for(let x=0;x<s.length;x+=1){let b=s[x];if(!Pf(b,t)||r.has(b))continue;let w=FL(b.textContent??"");if(!w)continue;let S=b.closest(`[${zr}]`)?.getAttribute(zr)||null;S&&n.add(S.replace(/\[\d+\]$/u,"")),i.push({element:b,text:w,row:S})}let l=x=>i.filter(b=>b.row===oc(x.key,x.row.index)),c=i.filter(x=>x.row===null),h=x=>x.row&&n.has(x.key)?l(x):n.size?c:i,p=new Map,m=[],u=x=>x.row?`${x.key}.${x.row.rowKey}`:null,v=new Map;for(let x of a){let b=u(x);if(!b||n.has(x.key))continue;let w=v.get(b);w?w.push(x):v.set(b,[x])}let g=new Set;for(let[x,b]of v){if(b.length<2)continue;let w=b.flatMap(A=>A.texts);if(new Set(w).size===w.length)continue;let S=h(b[0]).filter(A=>w.includes(A.text));if(S.length!==b.length)continue;let T=[...b].sort((A,P)=>(A.row?.index??0)-(P.row?.index??0));for(let A=0;A<T.length;A+=1){let P=T[A],E=S[A].element,k={key:P.key,partKey:yv(P.key,P.row),exact:!0},L=p.get(E);L?L.push(k):(p.set(E,[k]),m.push(E))}g.add(x)}for(let x of a){if(g.has(u(x)??""))continue;let b=yv(x.key,x.row);for(let w of x.texts){let S=[],T=null;for(let E of h(x))E.text===w?S.push(E.element):!S.length&&E.text.includes(w)&&(!T||E.text.length<=T.length)&&(T={element:E.element,length:E.text.length});let A=S.length?S:T?[T.element]:[],P=A.filter(E=>!A.some(k=>k!==E&&E.contains(k)));for(let E of P){let k={key:x.key,partKey:b,exact:S.length>0},L=p.get(E);L?L.push(k):(p.set(E,[k]),m.push(E))}}}let f=[...o];for(let x of m){let b=p.get(x)??[],w=b.some(S=>S.exact)?b.filter(S=>S.exact):b;if(new Set(w.map(S=>S.partKey)).size===1){f.push({element:x,partId:V8(t,w[0].partKey)});continue}new Set(w.map(S=>S.key)).size===1&&f.push({element:x,partId:V8(t,w[0].key)})}return f}function Hf(e,t,a){let s=e.querySelectorAll(`[${O7}]`);for(let r=0;r<s.length;r+=1){let i=s[r];Pf(i,t)&&i.removeAttribute(O7)}let o=[];for(let{element:r,partId:i}of a)r.setAttribute(O7,i),o.push(r);return o}function oF(e,t,a,s,o,r=()=>null){let i=null,n=null,l=null,c=()=>{let h=a(),p=h?.getAttribute(jr)??null;if(!h||!p)return!1;i=p;let m=sF(e,p,t);return o(h,p,Hf(e,p,m)),l=r(()=>{let u=sF(e,p,t);O51(m,u)||(m=u,o(h,p,Hf(e,p,u)))}),!0};return c()||(n=s(()=>{(i||c())&&(n?.(),n=null)})),()=>{n?.(),n=null,l?.(),l=null,i&&Hf(e,i,[])}}function O51(e,t){return e.length===t.length&&e.every((a,s)=>a.element===t[s].element&&a.partId===t[s].partId)}function rF(e,t){let a=e?.closest?.(`[${O7}],[${Jt}]`),s=a?.getAttribute(O7)??a?.getAttribute(Jt),o=s?sc(s):null;return a&&s&&o?.nodeId===t&&o.propKey?{id:s,element:a}:null}function Ff(e){let t=null,a=null;for(let s=e;s&&(t===null||a===null);s=s.parentElement){let o=s.getAttribute("class");t??=kL(o),a??=Fv(o)}return{faceRole:t??"body",sizeGroup:a}}function Yh(e){let t=e.style,a={};for(let i of Lv)a[i]=t[i]??"",t[i]="";let s=getComputedStyle(e),o=getComputedStyle(e.ownerDocument.documentElement),r=VL({fontSize:s.fontSize,fontWeight:s.fontWeight,lineHeight:s.lineHeight,letterSpacing:s.letterSpacing,textAlign:s.textAlign,textTransform:s.textTransform,paddingTop:s.paddingTop,maxWidth:s.maxWidth},OL(s.fontFamily,i=>o.getPropertyValue(i)));for(let i of Lv)t[i]=a[i];return r}function iF({needles:e,styles:t,type:a,children:s}){let o=Z51(null),{selectedPartId:r}=G51(),{setPartStyle:i}=Fc(),n=W51()==="mobile",l=JSON.stringify(e),c=JSON.stringify(t);return D51(()=>{let h=o.current;if(!h)return;let p=[],m=()=>h.parentElement,u=w=>{let S=m();if(!S)return null;let T=new MutationObserver(w);return T.observe(S,{attributes:!0,attributeFilter:[jr]}),()=>T.disconnect()},v=w=>{let S=new MutationObserver(w);return S.observe(h,{childList:!0,subtree:!0,characterData:!0}),()=>S.disconnect()},g=[];p.push(()=>{for(let w of g)w();g=[]});let f=JSON.parse(l),x=JSON.parse(c),b=oF(h,f,m,u,(w,S,T)=>{for(let k of g)k();g=[];let A=[];for(let k of T){let L=k,N=R5(L);N&&g.push(N),L.getAttribute(O7)===r?(L.setAttribute(de,""),A.push(L)):L.removeAttribute(de)}let P=BL(S,r,A,k=>SL(k)!==null||Fv(k)!==null);if(P&&r){let k=P;i({partId:r,...Ff(k),base:Yh(k),inks:KA(k),...(()=>{let L=kv(k);return L?{styleOwner:L}:{}})()})}Mv(T.filter(k=>!kv(k)).map(k=>({element:k,partId:k.getAttribute(O7)??""})),x,k=>Yh(k),k=>cc(a,k),void 0,n,k=>lc(a,k));let E=[...h.querySelectorAll(`[${rc}="${CSS.escape(S)}"][${kr}]`)];E.length&&Mv(E.map(k=>({element:k,partId:U51(S,k.getAttribute(kr)??"")})),x,void 0,k=>k,void 0,n)},v);return()=>{b();for(let w of p)w()}},[l,c,r,i,n]),B51("div",{ref:o,"data-sf-part-host":"",style:{display:"contents"},children:s})}import{deviceMetaOf as lF}from"efficient-easel/screen/lib/puck/device-fields";import{noControlMetaOf as q51}from"efficient-easel/screen/lib/puck/panel-no-control-mark";function $51(e,t){let a=lF(t),s=a?a.inner:t;if(Pr(s))return!1;if(s?.type==="slot")return!0;let o=q51(s);return o==="always"?!1:o==="authored-copy"?PL(e):!0}function nF(e){let t=lF(e),a=t?t.inner:e,s=Pr(a);return s?OT(a)?0:s.level:null}function j51(e,t,a){return a?t===0&&e===Nr.Design||t===1&&e===cE.Content:!1}var K51=new WeakMap,Y51=new WeakMap;function Xh(e,t="section"){let a=t==="page"?Y51:K51,s=a.get(e);if(s)return s;let o=Object.entries(e).map(([p,m])=>({key:p,field:m,level:nF(m),draws:$51(p,m)||t==="page"&&nF(m)===null&&Cv(p,m)})),r=t==="section"&&o.some(p=>Cv(p.key,p.field)),i=new Set;for(let p=0;p<o.length;p++){let m=o[p].level;if(m===null)continue;let u=0;for(let v=p+1;v<o.length;v++){let g=o[v].level;if(g!==null&&g<=m)break;o[v].draws&&(u+=1)}u===0&&!j51(o[p].key,m,r)&&i.add(o[p].key)}let n=r&&uE(e),l=n&&!(Nr.Design in e);if(!i.size&&!l)return a.set(e,e),e;let c={};for(let p of o)i.has(p.key)||(c[p.key]=p.field);let h=La(n?dE(c):c);return a.set(e,h),h}import{isShown as X51,showWhenFactReaders as J51}from"efficient-shell/format";var cF=new WeakMap,Q51=new Set(Object.values(Nr));function hF(e,t,a,s={}){if(!e)return e;let o=t?.props??{},r=o.id,i=J51(s,t,a),n=zE(a,{...i,parentOffersPositions:()=>{let v=$h(a.appState,r);return v===void 0?void 0:bL(v)},heroGroupDepth:()=>Kt(a.appState?.data,typeof r=="string"?r:"")}),l=[];for(let[v,g]of Object.entries(e)){let f=xL(g);!f||yE(f,"device")||X51(f,o,n)||l.push(v)}if(l.length===0)return e;let c=cF.get(e);c||cF.set(e,c=new Map);let h=l.join("\0"),p=c.get(h);if(p)return p;let m=new Set(l),u={};for(let[v,g]of Object.entries(e))m.has(v)||(u[v]=g);return l.some(v=>Q51.has(v))&&(u=La(u)),c.set(h,u),u}var Kr={spacingFields:xa,sidesPaddingFields:xe,sectionShapeFields:Xc,cardShapeFields:ZT,cellWidthFields:$T,widthField:th,sectionWidthFields:nE,heightFields:YT,anchorFields:JT,stickFields:XT,sectionThemeFields:ba,sectionAnimationFields:DT,slider:o1,WidthIcon:e61,assignSectionGroups:lh,dropEmptyHeadings:Xh,rowsShownForNode:hF,SECTION_THEME_FOLLOW_LABEL:_c,BLOCK_THEME_FOLLOW_LABEL:QA,PartAnchors:iF};function Jh(e,t,a){if(!e)return e;let s=!1,o={};for(let[r,i]of Object.entries(e)){let n=i;if(i&&typeof i=="object")if(i.type==="slot")if(i.allow){let l=i.allow.filter(t);l.length!==i.allow.length&&(n={...i,allow:l})}else{let l=new Set(i.disallow??[]),c=a.filter(h=>!l.has(h));c.length>0&&(n={...i,disallow:[...i.disallow??[],...c]})}else{let l=Jh(i.arrayFields,t,a),c=Jh(i.objectFields,t,a);(l!==i.arrayFields||c!==i.objectFields)&&(n={...i,...l?{arrayFields:l}:null,...c?{objectFields:c}:null})}n!==i&&(s=!0),o[r]=n}return s?o:e}function t61(e,t,a){let s={};for(let[n,l]of Object.entries(t.fields??{}))s[n]=l&&typeof l=="object"&&l.type==="slot"?{...l}:l;let o={...t,...t.fields?{fields:s}:null},r=Kh(e,o,a),i=Object.keys(s).filter(n=>r.fields?.[n]!==s[n]);if(i.length>0)throw new Error(`efficient-web-builder: blocks.host["${e}"] declares ${i.map(n=>`"${n}"`).join(", ")}, ${i.length===1?"a name":"names"} the editor gives every section a setting under. Give the block's own field another name.`);return r}function Qh(e,t){let a=Object.entries(t?.host??{}),s=t?.categories??[],o=cL(t);if(!o&&a.length===0&&s.length===0)return e;let r=e.components,i=a.map(([p])=>p).filter(p=>p in r);if(i.length>0)throw new Error(`efficient-web-builder: blocks.host registers ${i.map(p=>`"${p}"`).join(", ")}, which ${i.length===1?"is already a block":"are already blocks"} of the editor. Give a host's block a type of its own.`);let n=p=>o?o.offers(p):!0,l=Object.keys(r).filter(p=>!n(p)),c={};for(let[p,m]of Object.entries(r)){let u=o?Jh(m?.fields,n,l):m?.fields;c[p]=u===m?.fields?m:{...m,fields:u}}if(a.length>0){let p=new Set(a.map(([g])=>g)),m=e.categories?.structure?.components??[],u=$r(Object.keys(r),m),v={...u,isSection:g=>p.has(g)||u.isSection(g),isHostBlock:g=>p.has(g),inspector:Kr};for(let[g,f]of a){let x=t61(g,f,v),b=Jh(x.fields,n,l);c[g]=b===x.fields?x:{...x,fields:b}}}let h=[];for(let[p,m]of Object.entries(e.categories??{})){let u=m?.components??[],v=u.filter(n);v.length===u.length?h.push([p,m]):v.length>0&&h.push([p,{...m,components:v}])}for(let p of s){let m=p.components.filter(f=>f in c&&n(f));if(m.length===0)continue;let u=h.find(([f])=>f===p.key);if(u){let[,f]=u,x=new Set(f.components??[]);u[1]={...f,components:[...f.components??[],...m.filter(b=>!x.has(b))]};continue}let v=[p.key,{title:p.title,components:m}],g=p.before?h.findIndex(([f])=>f===p.before):-1;g===-1?h.push(v):h.splice(g,0,v)}return{...e,components:c,categories:Object.fromEntries(h)}}import{ChromeWrap as N61}from"efficient-easel/screen/lib/host-chrome";import{sessionRegistry as R61}from"efficient-easel/screen/lib/session";import{useEaselSession as _61}from"efficient-easel/screen/lib/session-context";function a61(e){return!!e&&typeof e=="object"&&typeof e[LT]=="string"}function s61(e,t){if(!e)return e;let a=null;for(let[s,o]of Object.entries(e))a61(o)&&(a??={...e},a[s]={...o,siteGap:t});return a??e}function pF(e,t){let a=e,s=!1,o={};for(let[r,i]of Object.entries(a.components)){let n=s61(i.fields,t);if(n===i.fields){o[r]=i;continue}s=!0,o[r]={...i,fields:n}}return s?{...e,components:o}:e}var mF=oa.mediaFields,dF=oa.snapshotObjects,uF=oa.hydratedLists;function o61(e){return typeof e=="string"||kc(e)?"":Array.isArray(e)?[]:e&&typeof e=="object"?null:e}function gF(e,t){if(Array.isArray(e))return e.map(o=>gF(o,t));if(!e||typeof e!="object")return e;let a=e,s={};for(let o of t)o in a&&(s[o]=a[o]);return s}function r61(e,t){let a=t;for(let o of mF[e]??[])a=Sc(a,o,o61);let s=dF[e];if(s)for(let[o,r]of Object.entries(s))o in a&&(a={...a,[o]:gF(a[o],r.keep)});for(let o of uF[e]??[])Array.isArray(a[o])&&(a={...a,[o]:[]});return a}function i61(e,t){return typeof t!="function"?t:a=>t(r61(e,a))}function ep(e,t){if(!t)return e;let a=e,s={};for(let[o,r]of Object.entries(a.components)){let i=(mF[o]?.length??0)>0||dF[o]||uF[o];s[o]=i&&r.render?{...r,render:i61(o,r.render)}:r}return{...a,components:s}}import I61,{DocumentScreen as V61}from"efficient-easel/screen/components/ScreenMount";import{useScreenDocument as O61}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as n61}from"react/jsx-runtime";import{createContext as l61,useCallback as c61,useContext as OP1,useState as Nf}from"react";var h61=l61({footerBlock:null,setFooterBlock:()=>{},headerGroup:null,setHeaderGroup:()=>{},refreshToken:0,refreshFooter:()=>{}});function vF({children:e,editFooter:t}){let[a,s]=Nf(null),[o,r]=Nf(null),[i,n]=Nf(0),l=c61(()=>n(c=>c+1),[]);return n61(h61.Provider,{value:{footerBlock:a,setFooterBlock:s,headerGroup:o,setHeaderGroup:r,editFooter:t,refreshToken:i,refreshFooter:l},children:e})}import{useCallback as p61,useEffect as m61,useMemo as fF,useRef as bF,useState as d61}from"react";import{useEaselSession as u61}from"efficient-easel/screen/lib/session-context";import{WebsiteBackendError as g61}from"efficient-easel/screen/lib/backend-error";var v61="Could not save this link. Check your connection and try again.";function f61(e,t){if(!(e instanceof g61)||e.kind!=="invalid")return null;let a=e.fields?.[t];return typeof a=="string"&&a.trim()?a:null}function b61(e){return Object.fromEntries(we.map(t=>[t,{value:e[t]??"",error:null}]))}function xF({token:e,siteId:t,enabled:a}){let[s,o]=d61(rf),r=bF(null),i=bF(!1),n=u61(),l=r5(n).social,c=a&&!!e&&!!t&&!!l;m61(()=>{if(!c||!e||!t||!l)return;r.current!==t&&(r.current=t,i.current=!1,o(rf));let m=!1;return l.get({siteId:t}).then(u=>{!m&&!i.current&&o(b61(u))}).catch(()=>{}),()=>{m=!0}},[c,e,t,l]);let h=p61(async(m,u)=>{if(!c||!e||!t||!l)return{ok:!1,error:"There is no website to save to."};try{let v=await l.update({[m]:u.trim()},{siteId:t});return i.current=!0,v6(),o(g=>({...g,[m]:{value:v[m]??"",error:null}})),{ok:!0}}catch(v){let g=f61(v,m)??v61;return o(f=>({...f,[m]:{...f[m],error:g}})),{ok:!1,error:g}}},[c,e,t,l]),p=fF(()=>ch(Object.fromEntries(we.map(m=>[m,s[m].value]))),[s]);return fF(()=>({links:p,rows:s,canSave:c,saveLink:h}),[p,s,c,h])}import{isBackendError as Za}from"efficient-easel/screen/lib/backend-error";import{isEfficientBackend as CF}from"efficient-easel/screen/lib/session";var wF="SharedSection",x61=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Yr=e=>{let t=e?.content;return Array.isArray(t)?t:[]},Xr=e=>{let t=e?.props?.id;return typeof t=="string"?t:void 0};function yF(e){if(e?.type!==wF)return null;let t=e.props?.section;return typeof t=="string"&&x61.test(t)?t.toLowerCase():null}function zF(e){let t=[];for(let a of Yr(e)){let s=yF(a),o=Xr(a);s&&o&&t.push({refId:o,section:s})}return t}function tp(e){let t=Yr(e)[0];return t&&typeof t=="object"&&Xr(t)?t:null}function w61(e,t){return{type:wF,props:{id:e,section:t}}}function kF(e,t){let a=new Map,s=new Set,o=!1,r=Yr(e).map(i=>{let n=yF(i),l=Xr(i);if(!n||!l||s.has(n))return i;let c=tp(t.get(n)),h=Xr(c??void 0);return!c||!h||a.has(h)?i:(s.add(n),a.set(h,{section:n,refId:l,reference:i}),o=!0,c)});return{working:o?{...e,content:r}:e,held:a}}function SF(e,t,a){let s=new Map,o=!1,r=Yr(e).map(i=>{let n=Xr(i),l=n?t.get(n):void 0,c=l?a.get(l.section):void 0;if(!l||!c||s.has(l.section))return i;let h=Yr(c).slice(1),p=tp(c);return s.set(l.section,p===i?c:{...c,content:[i,...h]}),o=!0,l.reference??w61(l.refId,l.section)});return{page:o?{...e,content:r}:e,docs:s}}function If(e){return!!(e?.publish&&e.liveState)}function y61(e,t){if(!If(e))return;let{versions:a,nameVersion:s,restoreVersion:o,previewVersion:r}=e;if(!(!a||!s||!o||!r))return{list:()=>a.call(e,t),name:(i,n)=>s.call(e,i,n,t),restore:(i,n)=>o.call(e,i,n??{},t),preview:i=>r.call(e,i,t)}}function z61(e,t){return async(a,s)=>{try{await JA()}catch(o){throw new Error(d("A change waiting to go live could not be saved."),{cause:o})}return(await e.publish(t)).state==="live"?YA({state:"live",changes:[]}):v6(0),{version:s??null}}}function _f(e,t,a){let s=t?{siteId:t}:void 0;return{resolve:o=>e.load({slug:o,...s}).then(r=>(r&&mh(r.id,r.live),r)),saveLayout:(o,r,i,n)=>e.save(o,{layout:r},{version:i,clientId:n??""}).then(l=>(dh(o,l.live),v6(),l)),rereadVersion:e.version?o=>e.version(o):void 0,publish:If(a)?z61(a,s):e.publish?(o,r)=>e.publish(o,r?{version:r}:void 0).then(i=>(uh(o,i.live),i)):void 0,listPages:()=>e.list(s),createPage:e.create?o=>e.create({...o,...s}):void 0,deletePage:e.remove?(o,r)=>e.remove(o,r):void 0}}function k61(e,t,a,s,o=!1){let r=null,i=new Set,n=!1,l=new Map,c=new Map,h=new Map,p=new Map,m={docId:null,lockHolder:null,conflict:null,saveFailed:!1,unpublished:!1,loadFailed:!1,sections:[]},u=new Set,v=()=>{if(!r)return!1;let k=_E(r.id);return k==="changed"||k==="never"||k===void 0&&n},g=k=>{m={...m,...k,docId:r?.id??null,unpublished:v(),sections:[...h.values()]};for(let L of u)L()},f=(k,L,N)=>{L?h.set(k,{section:k,title:l.get(k)?.title??"",problem:L,holder:N}):h.delete(k)},x=k=>k&&typeof k=="object"&&!Array.isArray(k)?k:{},b=k=>i.has(k),w=()=>new Map([...l].map(([k,L])=>[k,L.layout])),S=()=>`SharedSection-${typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2)}`,T=(k,L,N,R)=>{let V=x(L);l.set(k,{layout:V,version:N,savedJson:JSON.stringify(V),title:R})},A={state:()=>m,subscribe:k=>(u.add(k),()=>{u.delete(k)})},P={sectionOf:k=>c.get(k)?.section??null,heldElsewhere:k=>{let L=c.get(k)?.section;return!!(L&&h.get(L)?.problem==="lock")},adopt:(k,L)=>{T(L.id,L.layout,L.layout_updated_at,L.title),c.set(k,{section:L.id,refId:S()}),p.set(L.id,L.used_on),g({})},place:k=>{if([...c.values()].some(R=>R.section===k.id))return null;let L=tp(x(k.layout)),N=typeof L?.props?.id=="string"?L.props.id:null;return!L||!N||!L.type?null:(T(k.id,k.layout,k.layout_updated_at,k.title),c.set(N,{section:k.id,refId:S()}),p.set(k.id,k.used_on),L)},usedOn:k=>p.get(k)??null,learn:k=>{for(let L of k){p.set(L.id,L.used_on);let N=l.get(L.id);N&&(N.title=L.title);let R=h.get(L.id);R&&h.set(L.id,{...R,title:L.title})}g({})}},E=async(k,L)=>{for(let[N,R]of k){let V=l.get(N),I=JSON.stringify(R);if(!(!V||I===V.savedJson||h.get(N)?.problem==="lock"))try{let _=await e.save(N,{layout:R},{version:V.version,clientId:L??""});dh(N,_.live),V.layout=R,V.version=_.version,V.savedJson=I,f(N,null)}catch(_){Za(_,"changed-elsewhere")?f(N,"conflict"):Za(_,"lock-taken")?f(N,"lock",_.holder??void 0):f(N,"save")}}k.size&&v6(),g({})};return{resolve:async k=>{if(cf(k===p5?null:A),lf(k===p5?null:P),l=new Map,c=new Map,h=new Map,p=new Map,k===p5)return a.resolve(k);let L=!1,[N,R]=await Promise.all([a.resolve(k),e.load({slug:p5,...t}).catch(()=>(L=!0,null))]);if(R&&!kT(N?.layout)){mh(R.id,R.live);let K=x(R.layout);r={id:R.id,layout:K,version:R.version,savedJson:""}}else r=null;if(n=!1,!N)return g({conflict:null,saveFailed:!1,loadFailed:L}),N;let V=x(N.layout),I=zF(V),_=await Promise.all(I.map(K=>e.load({id:K.section,...t}).catch(()=>null)));I.forEach((K,t1)=>{let Z=_[t1];Z?(mh(Z.id,Z.live),T(K.section,Z.layout,Z.version,"")):(l.delete(K.section),h.set(K.section,{section:K.section,title:"",problem:"load"}))});let D=kF(V,w());if(c=D.held,!r)return c.size&&i.add(N.id),g({conflict:null,saveFailed:!1,loadFailed:L}),c.size?{...N,layout:D.working}:N;let G=IE(D.working,r.layout);return r.savedJson=JSON.stringify(nf(G,r.layout).chrome),i.add(N.id),g({conflict:null,saveFailed:!1,loadFailed:!1}),{...N,layout:G}},saveLayout:async(k,L,N,R)=>{if(!b(k))return a.saveLayout(k,L,N,R);let V=r,I=V?nf(L,V.layout):{page:L,chrome:null},_=SF(I.page,c,w()),D=await a.saveLayout(k,_.page,N,R);if(await E(_.docs,R),!V)return D;let G=JSON.stringify(I.chrome);if(!I.chrome||G===V.savedJson||m.lockHolder)return D;try{let K=await e.save(V.id,{layout:I.chrome},{version:V.version,clientId:R??""});dh(V.id,K.live),v6(),V.layout=I.chrome,V.version=K.version,V.savedJson=G,n=!0,g({conflict:null,saveFailed:!1})}catch(K){Za(K,"changed-elsewhere")?g({conflict:K.conflict??{savedBy:"",savedByYou:!1,secondsAgo:0}}):Za(K,"lock-taken")?g({lockHolder:K.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}}):g({saveFailed:!0})}return D},publish:a.publish?async(k,L)=>{let N=await a.publish(k,L),R=r;if(R&&b(k)&&!o&&e.publish&&v()&&!m.lockHolder){let V=await e.publish(R.id,R.version?{version:R.version}:void 0);uh(R.id,V.live),V.version!==null&&(R.version=V.version),n=!1,g({})}if(b(k)&&!o&&e.publish)for(let[V,I]of l){if(h.get(V)?.problem==="lock")continue;let _=await e.publish(V,I.version?{version:I.version}:void 0);uh(V,_.live),_.version!==null&&(I.version=_.version)}return N}:void 0,lock:s?{claim:async(k,L,N)=>{let R=await s.claim(k,L,N);if(!b(k))return R;let V=r;if(V)try{await s.claim(V.id,L,!1),m.lockHolder&&g({lockHolder:null})}catch(I){Za(I,"lock-taken")&&g({lockHolder:I.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}})}for(let I of l.keys())try{await s.claim(I,L,!1),h.get(I)?.problem==="lock"&&f(I,null)}catch(_){Za(_,"lock-taken")&&f(I,"lock",_.holder??void 0)}return l.size&&g({}),R},release:async(k,L)=>{if(await s.release(k,L),!b(k))return;let N=r;N&&!m.lockHolder&&await s.release(N.id,L).catch(()=>{});for(let R of l.keys())h.get(R)?.problem!=="lock"&&await s.release(R,L).catch(()=>{})}}:void 0,pinnedChrome:A}}function Jr(e,t=r5(),a=bv(),s={}){let o=CF(t),r=e?{siteId:e}:void 0,i=o?!!e:!0,n=t.site.update,l=o&&a.commerce&&a.service,c=!!s.editsPinnedInPlace&&l,h=If(t.site)?t.site:void 0,p=_f(t.pages,e,h),m=c?k61(t.pages,r,p,t.lock,!!h):null;return{capabilities:{canPublish:!!h||!!t.pages.publish,hasSiteSettings:o,hasSiteTheme:!!t.theme,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!t.pages.create,canDeletePagesInline:!!t.pages.remove,hasEditLock:!!t.lock,hasEditGuard:!0,hasPinnedChrome:l,editsPinnedInPlace:c,explainsSiteSettings:!1,hasSiteRecord:i,canEditSiteRecord:i&&!!n,hasPreviewLink:o||!!t.preview,hasCatalog:o&&a.commerce,hasForms:o&&a.service,hasBlog:!!t.blog&&a.service,offersCommerce:a.commerce,offersService:a.service},...p,...LF(p.resolve),lock:t.lock,...m,site:i?()=>t.site.get(r):void 0,siteLiveState:h?()=>h.liveState(r):void 0,siteVersions:y61(h,r),updateSite:i&&n?u=>n(u,r):void 0,previewHref:t.preview?u=>t.preview.href(u):void 0}}function MF(e,t=r5(),a=bv()){let s=CF(t),o=t.templates,r=o?o.pages(e):{list:()=>Promise.reject(new Error(Rf)),load:()=>Promise.reject(new Error(Rf)),save:()=>Promise.reject(new Error(Rf))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!r.create,canDeletePagesInline:!!r.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:s&&a.commerce&&a.service,editsPinnedInPlace:!1,explainsSiteSettings:s,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:s&&a.commerce,hasForms:s&&a.service,hasBlog:!!t.blog&&a.service,offersCommerce:a.commerce,offersService:a.service},..._f(r,void 0),...LF(_f(r,void 0).resolve),publish:void 0,templateName:o?()=>o.get(e).then(i=>i.name):void 0}}function LF(e){return{resolve:t=>(cf(null),lf(null),e(t))}}var Rf="This editor's backend has no website templates.";var S61={"Logos.logosPerRow":"columns","HeroSlide.tintOpacity":"overlay","Split.textBgTint":"overlay"};function C61(e){return Array.isArray(e)&&e.length>0&&e.every(t=>!!t&&typeof t=="object"&&typeof t.type=="string")}function Vf(e){let t=e.props,a=!1;if(e.type&&t)for(let[s,o]of Object.entries(S61)){let r=s.indexOf("."),i=s.slice(0,r),n=s.slice(r+1);if(i!==e.type||!(n in t))continue;let l=t[n],c={...t};delete c[n],(!(o in c)||c[o]===void 0)&&(c[o]=l),t=c,a=!0}if(t){let s=t;for(let[o,r]of Object.entries(t)){if(!C61(r))continue;let i=r.map(Vf);i.some((n,l)=>n!==r[l])&&(s===t&&(s={...t}),s[o]=i,a=!0)}t=s}return a?{...e,props:t}:e}function ap(e){let t=e;if(!t||typeof t!="object")return e;let a=!1,s={...e};if(Array.isArray(t.content)){let o=t.content.map(Vf);o.some((r,i)=>r!==t.content[i])&&(s.content=o,a=!0)}if(t.zones&&typeof t.zones=="object"){let o=!1,r=Object.fromEntries(Object.entries(t.zones).map(([i,n])=>{if(!Array.isArray(n))return[i,n];let l=n.map(Vf);return l.some((c,h)=>c!==n[h])&&(o=!0),[i,l]}));o&&(s.zones=r,a=!0)}return a?s:e}var AF={homeSlug:ra,entryMayBounce:e=>e.kind==="template"||e.kind==="page"&&e.slug===p5,entryBounce:(e,t)=>e.kind==="page"&&e.slug===p5?{kind:"page",slug:ra,siteId:e.siteId}:e.kind!=="template"||new URLSearchParams(t).get("editTemplate")==="1"?null:{kind:"page",slug:ra},onSwitch:()=>{},tellsHost:e=>e.kind==="page"&&e.slug!==p5,adapterFor:(e,t,a)=>e.kind==="template"?MF(e.id,t,fv(a)):Jr(e.siteId,t,fv(a),{editsPinnedInPlace:!0}),migrateRenamedProps:ap};import{PreviewPartsProvider as B61}from"efficient-easel/draw/client";import{jsx as M61}from"react/jsx-runtime";import{useMemo as L61,useRef as A61}from"react";import{CanvasPartsContext as T61}from"efficient-easel/easel";import{usePreviewParts as E61}from"efficient-easel/draw/client";function sp({children:e}){let{selectedPartId:t,select:a}=E61(),s=A61(t);s.current=t;let o=L61(()=>({partAt:rF,selected:()=>s.current,select:r=>{if(r){a(r);return}let i=s.current?sc(s.current)?.nodeId:null;i&&a(V8(i,null))}}),[a]);return M61(T61.Provider,{value:o,children:e})}var Of=new Set,Bf=new Set,Df=new Set;function TF(e){return Of.add(e),()=>Of.delete(e)}function EF(){Of.forEach(e=>e())}function J8(e){return Bf.add(e),()=>Bf.delete(e)}function HF(){Bf.forEach(e=>e())}function op(e){return Df.add(e),()=>Df.delete(e)}function Zf(){Df.forEach(e=>e())}var Gf=new Map,H61=9e5,PF=0;function P61(){return PF+=1,`fe-${typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():String(PF)}`}function FF(e,t){e.connected&&e.send("storefront-editor:open-form",{mode:"edit",formId:t})}function NF(e,t){if(!e.connected)return Promise.resolve({status:"closed"});let a=P61();return new Promise(s=>{let o=setTimeout(()=>RF(a,{status:"timeout"}),t.timeoutMs??H61);Gf.set(a,r=>{clearTimeout(o),s(r)}),e.send("storefront-editor:open-form",{requestId:a,mode:t.mode,...t.formId?{formId:t.formId}:{}})})}function RF(e,t){let a=Gf.get(e);a&&(Gf.delete(e),a(t))}function Wf(e,t){RF(e,t?{status:"saved",form:t}:{status:"closed"})}function rp(e){switch(e?.type){case"storefront-editor:category-updated":return EF(),!0;case"storefront-editor:menus-updated":return HF(),!0;case"storefront-editor:form-saved":{let t=e;return Zf(),t.requestId&&Wf(t.requestId,t.form??null),!0}case"storefront-editor:form-closed":{let t=e;return Zf(),t.requestId&&Wf(t.requestId,null),!0}default:return!1}}var D61=()=>{if(typeof window>"u")return $6;try{let e=window.localStorage.getItem(Sr);return e==="light"||e==="dark"||e==="auto"?e:$6}catch{return $6}},IF=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Sr,e)}catch{}},Z61=()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem(hc)!==Pv}catch{return!1}},G61=()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(GL)}catch{}},VF=e=>{if(!(typeof window>"u"))try{e?window.localStorage.removeItem(hc):window.localStorage.setItem(hc,Pv)}catch{}};function W61(){let{adapter:e,capabilities:t,templateId:a,ready:s,token:o,siteId:r,currentSlug:i,currentKind:n}=O61();Ne(()=>(sf(i,n),()=>sf(null,null)),[i,n]);let l=t.placeholderFrames,[c,h]=p2(null),[p,m]=p2("");Ne(()=>{let S1=e.templateName;if(!s||!a||!S1){m("");return}let H2=!1;return S1().then(s5=>!H2&&m(s5??"")).catch(()=>{}),()=>{H2=!0}},[s,o,a,e]);let[u,v]=p2($6),[g,f]=p2(!1),[x,b]=p2({selected:0,themes:[]}),[w,S]=p2(CL),[T,A]=p2(YL),[P,E]=p2(null),[k,L]=p2(lA),[N,R]=p2(null),[V,I]=p2(null),[_,D]=p2(Rv),[G,K]=p2(null),[t1,Z]=p2(null),[a1,n1]=p2(null),[r1,B]=p2(null),j=_61(),$=_F(()=>Qh(R61(j),Ul(j)),[j]),p1=_F(()=>pF(ep($,l),r1),[$,l,r1]),[L1,i0]=p2(hA),[n0,J]=p2(null),[A1,R1]=p2(null),[k1,M2]=p2(null),[p0,w2]=p2(null),[_0,x1]=p2(null),G1=Ga(null),_1=Ga(!1);Ne(()=>{v(D61()),f(Z61())},[]);let I0=z2(S1=>{_1.current=!0,G61(),IF(S1),v(S1)},[]),h1=z2(S1=>{_1.current=!0,VF(S1),f(S1)},[]),l0=z2(S1=>{_1.current=!0,b(S1)},[]),v1=z2(S1=>{_1.current=!0,S(S1)},[]),z1=z2(S1=>{_1.current=!0,A(S1)},[]),T1=z2(S1=>{_1.current=!0,E(S1)},[]),H1=z2(S1=>{_1.current=!0,L(S1)},[]),a2=z2(S1=>{_1.current=!0,R(S1)},[]),L2=z2(S1=>{_1.current=!0,I(S1)},[]),A2=z2(S1=>{_1.current=!0,D(S1)},[]),N3=z2(S1=>{_1.current=!0,K(S1)},[]),p4=z2(S1=>{_1.current=!0,i0(S1)},[]),[L4,W2]=p2(null),[n2,U2]=p2(null),T2=z2(S1=>{_1.current=!0,W2(S1)},[]),t3=z2(S1=>{_1.current=!0,Z(S1)},[]),p6=z2(S1=>{_1.current=!0,n1(S1)},[]),H5=z2(S1=>{_1.current=!0,B(S1)},[]),E2=z2(S1=>{_1.current=!0,J(S1)},[]),q3=z2(S1=>{_1.current=!0,R1(S1)},[]),P5=z2(S1=>{_1.current=!0,M2(S1)},[]),A4=z2(S1=>{_1.current=!0,w2(S1)},[]),m6=z2(S1=>{_1.current=!0,x1(S1)},[]);Ne(()=>{let S1=r5(j).theme;if(!o||!t.hasSiteTheme||!S1)return;let H2=r??"";G1.current!==H2&&(G1.current=H2,_1.current=!1);let s5=!1;return S1.get(r?{siteId:r}:void 0).then(Z0=>{if(s5||_1.current)return;IF(Z0.default_mode),VF(Z0.show_theme_switch),v(Z0.default_mode),f(Z0.show_theme_switch),b({selected:Z0.selected_preset,themes:Z0.theme_presets});let d6=GE(Z0);S(d6.fonts),A(d6.sizes),E(Z0.corner_radius_px===void 0?dc[mc(Z0.corner_style)]:uc(Z0.corner_radius_px)),L(d6.compression),R(Z0.card_shadow==null?JL:eA(Z0.card_shadow)),D(Z0.card_gap==null?Rv:tA(Z0.card_gap)),K(Z0.hover_effect==null?QL:aA(Z0.hover_effect)),I(sA(Z0.shadow_color)),Z(vA(Z0.site_width)),n1(bA(Z0.site_gutter)),B(AT(Z0.block_gap)),i0(d6.typography),W2(d6.textStyles),U2(EL(Z0)),J(Z0.hero_background_follows_width===!0),R1(Vv(Z0.section_background_width)),M2(Vv(Z0.section_content_width)),w2(Z0.photography_grayscale===!0),x1(Z0.share_button_on_posts===!0)}).catch(()=>{}),()=>{s5=!0}},[o,r,t.hasSiteTheme,j]);let T4=xF({token:o,siteId:r,enabled:t.hasSiteSettings}),[m4,E1]=p2(LE),a0=Ga(null),a3=Ga(!1),$3=Ga(null),N1=Ga({}),q2=z2(async()=>{$3.current&&clearTimeout($3.current),$3.current=null;let S1=N1.current;N1.current={};try{await r5(j).chat?.update(S1,r?{siteId:r}:void 0),v6()}catch(H2){throw N1.current={...S1,...N1.current},H2}},[j,r]);Ne(()=>XA(()=>$3.current||Object.keys(N1.current).length>0?q2():void 0),[q2]);let u3=z2(S1=>{a3.current=!0,E1(H2=>({...H2,...S1})),!(!t.hasSiteSettings||!o)&&(N1.current={...N1.current,...S1},$3.current&&clearTimeout($3.current),$3.current=setTimeout(()=>{q2().catch(()=>{})},500))},[t.hasSiteSettings,o,q2]);return Ne(()=>{if(!o||!t.hasSiteSettings)return;let S1=r??"";a0.current!==S1&&(a0.current=S1,a3.current=!1);let H2=!1,s5=r5(j).chat;if(s5)return s5.get(r?{siteId:r}:void 0).then(Z0=>{H2||a3.current||E1(AE(Z0))}).catch(()=>{}),()=>{H2=!0}},[o,r,t.hasSiteSettings,j]),Ne(()=>{let S1=e.site;if(!s||!t.hasSiteRecord||!S1){h(null);return}let H2=!1;return S1().then(s5=>{H2||h(kE(s5.name))}).catch(()=>{}),()=>{H2=!0}},[s,o,t.hasSiteRecord,r,e]),V4(V61,{config:p1,parts:SH,wrap:(S1,H2)=>V4(Rc,{websiteName:c,templateChrome:l,templateName:p||null,themeMode:u,onThemeModeChange:I0,themeSwitchShown:g,onThemeSwitchShownChange:h1,theme:x,onThemeChange:l0,fonts:w,onFontsChange:v1,cornerRadiusPx:P,onCornerRadiusPxChange:T1,cardShadow:N,onCardShadowChange:a2,shadowColor:V,onShadowColorChange:L2,cardGap:_,onCardGapChange:A2,hoverEffect:G,onHoverEffectChange:N3,headingCompression:k,onHeadingCompressionChange:H1,headingTypography:L1,onHeadingTypographyChange:p4,textStyles:L4,onTextStylesChange:T2,wordStyles:n2,sizes:T,onSizesChange:z1,siteWidth:t1,onSiteWidthChange:t3,siteGutter:a1,onSiteGutterChange:p6,blockGap:r1,onBlockGapChange:H5,heroBackgroundFollowsWidth:n0,onHeroBackgroundFollowsWidthChange:E2,sectionBackgroundWidth:A1,onSectionBackgroundWidthChange:q3,sectionContentWidth:k1,onSectionContentWidthChange:P5,photographyGrayscale:p0,onPhotographyGrayscaleChange:A4,shareButtonOnPosts:_0,onShareButtonOnPostsChange:m6,themeFromDocument:!t.hasSiteTheme,children:V4(vF,{children:V4(N61,{wrap:j.chrome?.wrap,surface:"page",children:V4(gh,{children:V4(vh,{children:V4(B61,{children:V4(sp,{children:V4(fh,{children:F61(Pc,{children:[V4(TE,{chat:m4,onChatChange:u3,children:V4(FE,{value:T4,children:V4(NE,{children:S1})})}),H2]})})})})})})})})})})}function OF({target:e}){return V4(I61,{target:e,addressing:AF,onHostMessage:rp,children:V4(W61,{})})}import{createContext as q61,useContext as $61,useMemo as j61}from"react";var U61=["vehicle","process","size","lugs","finish","price"],ip={vehicle:"My Car",process:"Process",size:"Size",lugs:"Lugs",finish:"Finish",price:"Price"};function BF(e){if(!e)return ip;let t={...ip};for(let a of U61){let s=e[a];if(typeof s!="string")continue;let o=s.trim();o&&(t[a]=o)}return t}import{jsx as K61}from"react/jsx-runtime";var DF=q61(ip);function ZF({labels:e,children:t}){let a=j61(()=>BF(e),[e]);return K61(DF.Provider,{value:a,children:t})}function Qr(){return $61(DF)}import{createContext as k71,useContext as S71,useMemo as C71}from"react";import{isSafeLinkHref as oR1}from"efficient-shell/markup";var q7=["width","profile","rim"],GF={width:"Width",profile:"Profile",rim:"Rim"},Y61=/^\s*(\d{2,3})\s*\/\s*(\d{2,3})\s*[A-Za-z]*\s*(\d{2}(?:\.\d+)?)\s*$/,X61={width:[100,500],profile:[20,100],rim:[10,30]};function d5(e){let t=Y61.exec(e??"");if(!t)return null;let a={width:Number(t[1]),profile:Number(t[2]),rim:Number(t[3])};return q7.every(o=>{let[r,i]=X61[o];return a[o]>=r&&a[o]<=i})?a:null}function w6(e){if(e.width==null)return"";if(e.profile==null)return String(e.width);let t=`${e.width}/${e.profile}`;return e.rim==null?t:`${t} R${e.rim}`}function WF(e){return[w6({width:e.width}),w6({width:e.width,profile:e.profile}),w6(e)]}var O4=["alloy-wheel","tyre"],np=["alloy-wheel"],u5={"alloy-wheel":"Alloy wheels",tyre:"Tyres"},UF="All products",qF="All product types";function J6(e){return e.length===1&&e[0]==="alloy-wheel"?{one:"wheel",many:"wheels"}:e.length===1&&e[0]==="tyre"?{one:"tyre",many:"tyres"}:{one:"product",many:"products"}}var Ua=O4.map(e=>({value:e,label:u5[e]}));function y6(e){return e==null?[...np]:Array.isArray(e)?O4.filter(t=>e.includes(t)):[...np]}var f4=e=>e;function U0(e){return f4(e).kind==="tyre"?"tyre":"alloy-wheel"}function lp(e,t){return e.filter(a=>t.includes(U0(a)))}function Q8(e){return f4(e).slug??""}function Uf(e){return f4(e).name??""}function qa(e){return f4(e).brand??""}function $F(e){let t=new Set;for(let a of e)if(t.add(qa(a)),t.size>1)return!0;return!1}function J61(e){return f4(e).process??""}function jF(e){let t=new Set;for(let a of e)if(t.add(J61(a)),t.size>1)return!0;return!1}function Re(e){return f4(e).prices??void 0}function qf(e){return f4(e).inStock!==!1}function KF(e){let t=f4(e),a=U0(e)==="tyre"?t.rimDiameters:t.sizes;return Array.isArray(a)?a.filter(s=>typeof s=="number"&&Number.isFinite(s)):[]}function $f(e){return U0(e)!=="tyre"&&f4(e).badge==="new"}function jf(e){return U0(e)==="tyre"?[]:(f4(e).finishes??[]).filter(t=>typeof t?.family=="string").map(t=>({family:t.family,color:t.color??null}))}function YF(e){return jf(e).map(t=>t.family)}function XF(e){if(U0(e)==="tyre")return[];let t=f4(e),a=t.categories;return a&&a.length>0?a:t.process?[t.process]:[]}function JF(e){return U0(e)==="tyre"?[]:f4(e).spec?.pcds??[]}function QF(e){return U0(e)!=="tyre"?[]:f4(e).tyreTypes??[]}function eN(e){return U0(e)!=="tyre"?[]:f4(e).speedRatings??[]}function $a(e){if(U0(e)!=="tyre")return[];let t=f4(e).sizes;return Array.isArray(t)?t.map(a=>d5(typeof a=="string"?a:null)).filter(a=>a!==null):[]}function z6(e,t){return e.length===0?e:e.filter(a=>a.kind===void 0||a.kind===t)}function cp(e,t){if(t.length===0)return e;let a=ja(t);return e9(e.filter(s=>a(s.fieldKey)),s=>s.fieldKey,t,"cardOrder")}function tN(e,t){let a=t==="filter"?"filterOrder":"cardOrder",s=new Map;for(let o of e){let r=o[a];if(typeof r!="number"||!Number.isFinite(r))continue;let i=s.get(o.fieldKey);(i===void 0||r<i)&&s.set(o.fieldKey,r)}return o=>o?s.get(o):void 0}function Kf(e){return Xf(e,"spec")}function Yf(e,t){if(t.length===0)return e;let a=Kf(t),s=e.filter(o=>a(o.fieldKey));return e9(s,o=>o.fieldKey,t,"specOrder")}function e9(e,t,a,s){let o=new Map;for(let l of a){let c=l[s];typeof c=="number"&&o.set(l.fieldKey,c)}if(o.size===0)return e;let r=[],i=[];e.forEach((l,c)=>{let h=t(l);h&&(r.push(c),i.push({item:l,index:c,order:o.get(h)}))}),i.sort((l,c)=>l.order!==void 0&&c.order!==void 0?l.order-c.order||l.index-c.index:l.order!==void 0?-1:c.order!==void 0?1:l.index-c.index);let n=[...e];return r.forEach((l,c)=>{n[l]=i[c].item}),n.every((l,c)=>l===e[c])?e:n}function ja(e){return Xf(e,"card")}function hp(e){return Xf(e,"filter")}var Ka="collection";function Ya(e,t){return{tyreSizes:{},brands:{"alloy-wheel":"brand",tyre:"brand"},finishes:{"alloy-wheel":"wheel_finish_ref"},diameters:{"alloy-wheel":"diameter",tyre:"rim_diameter"},collections:{"alloy-wheel":Ka},pcds:{"alloy-wheel":"pcd"},tyreTypes:{tyre:"tire_type"},speedRatings:{tyre:"speed_rating"}}[e]?.[t]}function Xf(e,t){let a=new Set(e.filter(s=>s[t]===!1).map(s=>s.fieldKey));return s=>!s||!a.has(s)}var Xa={inStock:"In stock",outOfStock:"Out of stock",notInStockHere:"Not in stock here"};function aN(e){return e?Xa.inStock:Xa.outOfStock}function x3(e){return Number.isInteger(e)?String(e):String(Number(e.toFixed(2)))}var sN=" to ";function Jf(e){return e<0?`\u2212${x3(-e)}`:x3(e)}function pp(e,t){return e===t?`ET ${Jf(e)}`:`ET ${Jf(e)}${sN}${Jf(t)}`}function mp(e,t){return e===t?`${x3(e)}"`:`${x3(e)}"${sN}${x3(t)}"`}function Qf(e){return e==="\u2014"?e:`${e}"`}var ei={recommended:"Recommended","price-asc":"Price \xB7 low to high","price-desc":"Price \xB7 high to low",new:"Newest",name:"Name A\u2013Z"},oN=Object.keys(ei);function Ja(e){return y2(oN,"recommended",e)}function eb(e){return oN.filter(t=>t!=="recommended"||e.length<=1)}function rN(e,t){let a=Ja(e);return eb(t).includes(a)?a:"name"}var ti=["tyreSizes","brands","finishes","diameters","collections","pcds","tyreTypes","speedRatings"],e71={tyreSizes:["tyre"],brands:["alloy-wheel","tyre"],finishes:["alloy-wheel"],diameters:["alloy-wheel","tyre"],collections:["alloy-wheel"],pcds:["alloy-wheel"],tyreTypes:["tyre"],speedRatings:["tyre"]},t71={diameters:"tyreSizes"};function iN(e){if(e.length===0)return[];let t=ti.filter(a=>e.every(s=>e71[a].includes(s)));return t.filter(a=>{let s=t71[a];return!s||!t.includes(s)})}function nN(e,t){return t&&e.includes(t)?[t]:[...e]}function lN(e){let t=new Set;for(let a of e)t.add(U0(a));return[...t]}var $7={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function Qa(e){return`${a71(e.width)}\xD7${e.diameter}`}function a71(e){return x3(e)}function ai(e,t,a,s=null){if(s!=="kind"&&t.kind&&U0(e)!==t.kind)return!1;for(let o of ti){if(s===o)continue;let r=t[o];if(r.length===0)continue;let i=r.map(String);if(!pN(e,o).some(n=>i.includes(n)))return!1}return!(s!=="price"&&!Nh(Re(e),a,null,t.priceMax)||s!=="inStock"&&t.inStockOnly&&!qf(e))}function cN(e,t,a){return e.filter(s=>qf(s)&&ai(s,t,a,"inStock")).length}function s71(e,t,a){let s=[...e],o=(i,n)=>Uf(i).localeCompare(Uf(n)),r=lN(e).length>1;switch(t){case"price-asc":return s.sort((i,n)=>Na(Re(i),Re(n),a,"asc"));case"price-desc":return s.sort((i,n)=>Na(Re(i),Re(n),a,"desc"));case"name":return s.sort(o);case"new":return s.sort((i,n)=>{let l=($f(n)?1:0)-($f(i)?1:0);return l!==0||!r?l:o(i,n)});default:return s}}function hN(e,t,a){return s71(e.filter(s=>ai(s,t,a)),t.sort,a)}function dp(e){return ti.some(t=>e[t].length>0)||e.priceMax!=null||e.inStockOnly||e.kind!=null}var tb={tyreSizes:"Size",brands:"Brand",finishes:"Colour",diameters:"Size \xB7 diameter",collections:"Collection",pcds:"PCD \xB7 fitment",tyreTypes:"Tyre type",speedRatings:"Speed rating"};function pN(e,t){switch(t){case"tyreSizes":return[...new Set($a(e).flatMap(WF))];case"brands":return qa(e)?[qa(e)]:[];case"finishes":return YF(e);case"diameters":return KF(e).map(String);case"collections":return XF(e);case"pcds":return JF(e);case"tyreTypes":return QF(e);case"speedRatings":return eN(e)}}function o71(e){let t=new Map;for(let a of e)for(let s of jf(a))s.color&&!t.has(s.family)&&t.set(s.family,s.color);return t}function up(e,t,a,s=lN(e),o=[]){let r=c=>r71(c,s,o),i=o71(e),n=iN(s).filter(c=>c!=="tyreSizes").filter(r).map(c=>{let h=t[c].map(String),p=new Set,m=new Map,u=new Map;for(let g of e){let f=pN(g,c);for(let x of f)p.add(x);for(let x of new Set(f))u.set(x,(u.get(x)??0)+1);if(ai(g,t,a,c))for(let x of new Set(f))m.set(x,(m.get(x)??0)+1)}let v=[...p].map(g=>({value:g,label:c==="diameters"?`${g}\u2033`:g,count:m.get(g)??0,checked:h.includes(g),swatch:c==="finishes"?i.get(g)??null:null})).sort((g,f)=>{if(c==="diameters")return Number(g.value)-Number(f.value);let x=(u.get(f.value)??0)-(u.get(g.value)??0);return x!==0?x:g.value.localeCompare(f.value)});return{key:c,label:tb[c],options:v}}).filter(c=>c.options.length>si),l=[];for(let c of n){let h=i71(c.key,s,o);h!==void 0&&l.push({fieldKey:c.key,filterOrder:h})}return[...e9(n,c=>c.key,l,"filterOrder")]}var si=1;function gp(e){return e.showCollection===!1?["collections"]:[]}function r71(e,t,a){return t.length===0||a.length===0?!0:t.some(s=>hp(z6(a,s))(Ya(e,s)))}function i71(e,t,a){if(a.length===0)return;let s;for(let o of t){let r=tN(z6(a,o),"filter")(Ya(e,o));r!==void 0&&(s===void 0||r<s)&&(s=r)}return s}function n71(e){let t=new Set;for(let a of e)for(let s of $a(a))t.add(w6(s));return t.size}function mN(e,t){return iN(t).includes("tyreSizes")?n71(e)>si:!1}function dN(e){let t=d5(e);if(t)return t;let[a,s]=e.split("/");return{width:a?Number(a):void 0,profile:s?Number(s):void 0}}function l71(e,t,a){return q7.slice(0,q7.indexOf(a)).every(s=>{let o=t[s];return o==null||e[s]===o})}function uN(e,t,a){let s=dN(t.tyreSizes[0]??""),o=new Set(e.filter(r=>ai(r,t,a,"tyreSizes")));return q7.map(r=>{let i=new Map;for(let l of e){let c=$a(l).filter(h=>l71(h,s,r));for(let h of new Set(c.map(p=>p[r])))i.has(h)||i.set(h,0),o.has(l)&&i.set(h,(i.get(h)??0)+1)}let n=[...i.keys()].sort((l,c)=>l-c).map(l=>({value:l,label:r==="rim"?`R${l}`:String(l),count:i.get(l)??0}));return{part:r,label:GF[r],value:s[r]??null,options:n}})}function gN(e,t,a,s){let o={...dN(t)},r=q7.indexOf(a);o[a]=s??void 0;for(let i of q7.slice(r+1))o[i]!=null&&e.some(c=>q7.slice(0,q7.indexOf(i)+1).every(h=>o[h]==null||c[h]===o[h]))||(o[i]=void 0);return w6(o)}function vN(e,t,a,s){if(t.length<2)return[];let o=e.filter(r=>ai(r,a,s,"kind"));return[{kind:null,label:UF,count:o.length,checked:a.kind===null},...t.map(r=>({kind:r,label:u5[r],count:o.filter(i=>U0(i)===r).length,checked:a.kind===r}))]}function fN(e,t){if(e.length===0)return null;let a=e.map(r=>K8(Re(r),t)).filter(r=>r!==null);if(a.length===0)return null;let s=Math.floor(Math.min(...a)),o=Math.ceil(Math.max(...a));return o>s?{min:s,max:o}:null}function bN(e,t,a){let s=[];e.kind&&s.push({key:"kind",value:e.kind,label:u5[e.kind]}),e.inStockOnly&&s.push({key:"inStock",value:"",label:Xa.inStock});for(let o of ti)for(let r of e[o]){let i=String(r);s.push({key:o,value:i,label:o==="diameters"?`${i}\u2033`:o==="pcds"?`PCD ${i}`:i})}return e.priceMax!=null&&s.push({key:"price",value:"",label:`Up to ${a(e.priceMax,t)}`}),s}var _5={tyreSizes:"tyreSize",brands:"brand",finishes:"colour",diameters:"size",collections:"collection",pcds:"pcd",tyreTypes:"tyreType",speedRatings:"speed"},t9="type",xN="maxPrice",wN="inStock",yN="sort",zN="page";function kN(e){let t=r=>e.getAll(r).flatMap(i=>i.split(",")).filter(Boolean),a=Number(e.get(xN)),s=Number(e.get(zN)),o=e.get(t9);return{tyreSizes:t(_5.tyreSizes),brands:t(_5.brands),finishes:t(_5.finishes),diameters:t(_5.diameters).map(Number).filter(Number.isFinite),collections:t(_5.collections),pcds:t(_5.pcds),tyreTypes:t(_5.tyreTypes),speedRatings:t(_5.speedRatings),priceMax:Number.isFinite(a)&&a>0?a:null,inStockOnly:e.get(wN)==="1",kind:O4.find(r=>r===o)??null,sort:Ja(e.get(yN)),page:Number.isFinite(s)&&s>=1?Math.floor(s):1}}function _e(e){let t=new URLSearchParams;for(let a of ti){let s=e[a];s.length>0&&t.set(_5[a],s.join(","))}return e.priceMax!=null&&t.set(xN,String(e.priceMax)),e.inStockOnly&&t.set(wN,"1"),e.kind&&t.set(t9,e.kind),e.sort!=="recommended"&&t.set(yN,e.sort),e.page>1&&t.set(zN,String(e.page)),t}function SN(e,t){if(e<=7)return Array.from({length:e},(r,i)=>i+1);let a=[1],s=Math.max(2,t-1),o=Math.min(e-1,t+1);s>2&&a.push(null);for(let r=s;r<=o;r++)a.push(r);return o<e-1&&a.push(null),a.push(e),a}function CN(e,t,a){let s=e.length,o=Math.max(1,Math.floor(a)),r=Math.max(1,Math.ceil(s/o)),i=Math.min(Math.max(1,Math.floor(t)),r),n=(i-1)*o;return{items:e.slice(n,n+o),page:i,pageCount:r,total:s,from:s===0?0:n+1,to:Math.min(n+o,s)}}var a9="__all__",MN="All products";function c71(e){return e?.slug===a9}function LN(e){return typeof e?.slug=="string"&&e.slug!==""}function es(e,t){if(c71(e))return[...t];let a=o=>o;if(e.process)return t.filter(o=>a(o).process===e.process);let s=e.name??"";return t.filter(o=>{let{process:r,categories:i}=a(o);return(i??(r?[r]:[])).includes(s)})}var ts="AlloyWheelsListing",h71="ProductGrid",AN="catalog",p71="CatalogFilterBar",vp="fieldUsage",m71="requestQuery";function TN(e){return e.props?.source}function as(e){return e?.type===h71&&LN(TN(e))}function ab(e){return e?.type===p71}function d71(e){return e?.type===ts||as(e)||ab(e)}function u71(e){let t=e.content??[],a=e.zones??{};return[...t,...Object.values(a).flat()]}function sb(e){return e?u71(e).some(t=>t?.type===ts||as(t)):!1}function EN(e,t){return v71(e,a=>as(a)?{...a,props:{...ob(a).props,[AN]:es(TN(a)??{},g71(t,y6(a.props?.kinds)))}}:{...a,props:{...rb(a).props,products:t}})}function HN(e){return NN(e,d71,t=>ab(t)?PN(t):as(t)?ob(t):rb(t))}function PN(e){if(!e.props||!(vp in e.props))return e;let{[vp]:t,...a}=e.props;return{...e,props:a}}function ob(e){let{[AN]:t,[vp]:a,...s}=e.props??{},o=s.source;if(o&&"wheels"in o){let{wheels:r,...i}=o;s.source=i}return{...e,props:s}}function g71(e,t){let a=new Set(t);return e.filter(s=>{let o=s.kind??"alloy-wheel";return a.has(o)})}function FN(e){return as(e)?ob(e):ab(e)?PN(e):e?.type===ts?rb(e):e}function rb(e){let{wheels:t,products:a,[vp]:s,[m71]:o,...r}=e.props??{};return{...e,props:r}}function v71(e,t){return NN(e,a=>a?.type===ts||as(a),t)}function NN(e,t,a){let s=i=>t(i)?a(i):i,o=e,r={...e};return o.content&&(r.content=o.content.map(s)),o.zones&&(r.zones=Object.fromEntries(Object.entries(o.zones).map(([i,n])=>[i,n.map(s)]))),r}var oi="/wheels",ib="Products";function f71(e,t){return t>1?`${ib} \xB7 ${e}`:ib}function RN(...e){for(let t of e){let a=(t?.content??[]).find(s=>s?.type===ts);if(a)return a.props??{}}return null}function nb(...e){return RN(...e)!==null}function b71(e,t){let a=e.filter(s=>nb(...s.docs)).map(s=>ge(s.slug));return a.length===0&&t.fallback?[oi]:a}var _N=[t9,...Object.entries(_5).filter(([e])=>e!=="tyreSizes").map(([,e])=>e)];function IN(e){let t=e.indexOf("#"),a=t===-1?"":e.slice(t),s=t===-1?e:e.slice(0,t),o=s.indexOf("?");return{path:o===-1?s:s.slice(0,o),query:o===-1?"":s.slice(o+1),hash:a}}function x71(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return e}}function lb(e){let t=new URLSearchParams(IN(e).query);for(let a of _N){let s=t.get(a);if(s)return{param:a,value:s}}return null}function cb(e,t){let{path:a,query:s,hash:o}=IN(e),r=s.split("&").filter(i=>i&&!_N.includes(x71(i.split("=")[0])));return t?.value&&r.push(`${encodeURIComponent(t.param)}=${encodeURIComponent(t.value)}`),`${a}${r.length?`?${r.join("&")}`:""}${o}`}function VN(e){return Array.isArray(e)?e.filter(t=>typeof t?.kind=="string"&&typeof t.field_key=="string").map(t=>({kind:t.kind,fieldKey:t.field_key,...typeof t.filter=="boolean"?{filter:t.filter}:{},filterOrder:t.filter_order??null})):[]}var w71="Product type",y71="AUD";function z71(e,t){let a=t.listing??{},s=y6(a.kinds),o=e.filter(l=>s.includes(U0(l))),r=gp(a),i=up(o,$7,y71,s,t.fieldUsage).filter(l=>!r.includes(l.key)).map(l=>({param:_5[l.key],label:l.label,values:l.options.filter(c=>!c.value.includes(",")).map(c=>({value:c.value,label:c.label}))})).filter(l=>l.values.length>0),n=O4.filter(l=>s.includes(l)&&o.some(c=>U0(c)===l));return n.length>1&&i.unshift({param:t9,label:w71,values:n.map(l=>({value:l,label:u5[l]}))}),i}function ON(e){return t=>{let a=b71(t,{fallback:e.offersCommerce}),s=t.filter(o=>nb(...o.docs)).length;return{listingPaths:a,pageOptions:o=>{let r=o.map(i=>{let n=t.find(l=>ge(l.slug)===i.value);return n&&nb(...n.docs)?{...i,label:f71(n.title,s)}:i});return s===0&&e.offersCommerce&&!r.some(i=>i.value===oi)&&r.push({value:oi,label:ib}),r},filtersFor:o=>{if(!a.includes(o))return null;let r=t.find(i=>ge(i.slug)===o);return z71(e.catalogue,{listing:r?RN(...r.docs):null,fieldUsage:e.fieldUsage})},readFilter:lb,withFilter:cb}}}function BN(e,t=[]){let a=cb(oi,{param:t9,value:e}),s=t.find(o=>{let r=(o?.url??"").trim();if(!r||r==="#")return!1;let i=lb(r);return i?.param!==t9||i.value!==e?!1:Dv(r).startsWith("/")});return s?s.url:a}function DN(e){let t=[];for(let a of e??[]){typeof a?.url=="string"&&t.push({url:a.url});for(let s of a?.dropdownItems??[])typeof s?.url=="string"&&t.push({url:s.url})}return t}import{jsx as M71}from"react/jsx-runtime";var ZN=k71([]);function GN({items:e,children:t}){let a=C71(()=>DN(e),[e]);return M71(ZN.Provider,{value:a,children:t})}function WN(){return S71(ZN)}import{createContext as T71,useCallback as E71,useContext as H71}from"react";var UN={tyre:"tire",tyres:"tires",colour:"color",colours:"colors",centre:"center",centres:"centers",catalogue:"catalog",catalogues:"catalogs",enquire:"inquire",enquiry:"inquiry",enquiries:"inquiries",aluminium:"aluminum",honour:"honor",honoured:"honored"},L71=new RegExp(`\\b(${Object.keys(UN).sort((e,t)=>t.length-e.length).join("|")})\\b`,"gi");function qN(e){return e==="us"?"us":"international"}function A71(e,t){return e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t[0].toUpperCase()+t.slice(1):t}function $N(e,t){return t!=="us"?e:e.replace(L71,a=>A71(a,UN[a.toLowerCase()]))}import{jsx as P71}from"react/jsx-runtime";var jN=T71("international");function KN({variant:e,children:t}){return P71(jN.Provider,{value:e,children:t})}function ss(){let e=H71(jN);return E71(t=>$N(t,e),[e])}import{createContext as F71,useCallback as hb,useContext as N71,useEffect as R71,useMemo as _71,useState as I71}from"react";import{jsx as O71}from"react/jsx-runtime";var V71={isOpen:!1,open:()=>{},close:()=>{},toggle:()=>{}},YN=F71(V71);function XN({children:e,shortcut:t=!0}){let[a,s]=I71(!1),o=hb(()=>s(!0),[]),r=hb(()=>s(!1),[]),i=hb(()=>s(l=>!l),[]);R71(()=>{if(!t)return;let l=c=>{(c.metaKey||c.ctrlKey)&&(c.key==="k"||c.key==="K")&&(c.preventDefault(),s(h=>!h))};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[t]);let n=_71(()=>({isOpen:a,open:o,close:r,toggle:i}),[a,o,r,i]);return O71(YN.Provider,{value:n,children:e})}function os(){return N71(YN)}import{createContext as B71,useCallback as bp,useContext as D71,useMemo as Z71,useState as mb}from"react";function JN({email:e,firstName:t,interests:a,frequency:s},o){return{email:e.trim(),firstName:t?.trim()||void 0,interests:a&&a.length?a:void 0,frequency:s||void 0,source:o}}var B4={popup:"shop_popup",subscribeSection:"subscribe_section",subscribeBlogsSection:"subscribe_blogs_section",footerSignup:"footer_signup",stockAlertOptIn:"stock_alert_optin"};var AR1=1440*60*1e3;function QN(e){return e===be?{seen:"storefront-subscribe-seen",closedAt:"storefront-popup-closed-at",sentAt:"storefront-popup-sent-at"}:{seen:`storefront-popup:${e}:seen`,closedAt:`storefront-popup:${e}:closed-at`,sentAt:`storefront-popup:${e}:sent-at`}}function pb(e,t,a){let s=QN(e);t.session.setItem(s.seen,"1"),t.local.setItem(s.closedAt,String(a))}function eR(e,t,a){pb(e,t,a),t.local.setItem(QN(e).sentAt,String(a))}var fp={session:vH,local:I3};import{jsx as G71}from"react/jsx-runtime";var tR=B71(null);function aR({children:e}){let[t,a]=mb(!1),[s,o]=mb("chosen"),[r,i]=mb({}),n=bp(m=>{i(m??{}),o("newsletter"),a(!0)},[]),l=bp(()=>{i({}),o("chosen"),a(!0)},[]),c=bp(()=>eR(be,fp,Date.now()),[]),h=bp(()=>{a(!1),pb(be,fp,Date.now())},[]),p=Z71(()=>({isOpen:t,mode:s,open:n,openByItself:l,close:h,markSent:c,prefillEmail:r.email??"",signupSource:r.source??B4.popup}),[t,s,n,l,h,c,r]);return G71(tR.Provider,{value:p,children:e})}function xp(){let e=D71(tR);if(!e)throw new Error("useSubscribePopup() must be called inside <SubscribePopupProvider>. Mount the provider in app/layout.tsx.");return e}import{createContext as W71,useContext as U71,useEffect as q71,useState as sR}from"react";import{jsx as j71}from"react/jsx-runtime";var oR="storefront-wishlist";function $71(e){let t=JSON.parse(e);return Array.isArray(t)?t.filter(a=>typeof a=="string"):[]}var rR=W71(null);function iR({children:e}){let[t,a]=sR([]),[s,o]=sR(!1);q71(()=>{let n=I3.getItem(oR);try{n&&a($71(n))}catch{}o(!0)},[]);function r(n){let l=t.includes(n)?t.filter(c=>c!==n):[...t,n];a(l),I3.setItem(oR,JSON.stringify(l))}let i={slugs:t,ready:s,has:n=>t.includes(n),toggle:r,count:t.length};return j71(rR.Provider,{value:i,children:e})}function nR(){let e=U71(rR);if(!e)throw new Error("useWishlist must be used within a WishlistProvider");return e}import{jsx as s9}from"react/jsx-runtime";function db({catalogFilterLabels:e,englishVariant:t,menuItems:a,currency:s,searchShortcut:o=!0,children:r}){return s9(KN,{variant:qN(t),children:s9(ZF,{labels:e,children:s9(GN,{items:a,children:s9(Y8,{...s,children:s9(aR,{children:s9(iR,{children:s9(_a,{children:s9(XN,{shortcut:o,children:r})})})})})})})})}import{jsx as g5}from"react/jsx-runtime";import{useCallback as hR,useEffect as wp,useMemo as ri,useRef as X71,useState as ii}from"react";import{lazy as K71,Suspense as Y71}from"react";import{jsx as lR}from"react/jsx-runtime";function rs(e,t={}){let a=K71(async()=>{let r=await e();return{default:"default"in r?r.default:r}}),s=t.loading?t.loading():null;function o(r){return lR(Y71,{fallback:s,children:lR(a,{...r})})}return o}import"efficient-easel/easel.css";import"efficient-easel/shell.css";import"efficient-easel/rail.css";import"efficient-easel/panel.css";import"efficient-easel/fields.css";import"efficient-easel/pick.css";import"efficient-easel/copy.css";import"efficient-easel/gold.css";import"efficient-easel/text-styles.css";import"efficient-easel/menu.css";import"efficient-easel/chrome.css";import"efficient-easel/tree.css";import"efficient-easel/screen.css";import{ScreenDocumentContext as J71}from"efficient-easel/screen/components/ScreenDocumentContext";import{PreviewPartsProvider as Q71}from"efficient-easel/draw/client";import{sectionTemplates as ub}from"efficient-easel/screen/lib/section-templates";import{nodeToDoc as e81,docToNode as pR}from"efficient-easel/screen/lib/puck/section-doc";import{newNodeId as t81}from"efficient-easel/draw";import{NO_BRIDGED_CAPABILITIES as a81,useAdminBridge as s81}from"efficient-easel/screen/lib/admin-bridge";import{useEaselHost as o81}from"efficient-easel/screen/lib/host";import{ChromeWrap as r81}from"efficient-easel/screen/lib/host-chrome";import{sessionRegistry as i81}from"efficient-easel/screen/lib/session";import{useEaselSession as n81}from"efficient-easel/screen/lib/session-context";async function cR(e,t,a){let s=!1;try{s=await e()}catch{}return s?(t(),"switched"):(a(),"refused")}import{routeSharedHostMessage as l81}from"efficient-easel/screen/lib/host-inbound";import{documentPermissions as c81}from"efficient-easel/edit-lock";import{useAutosave as h81}from"efficient-easel/autosave";import{saveStatusOf as p81}from"efficient-easel/screen/lib/document-switch";var m81=rs(()=>import("./chunks/SiteEditorProvider-KOPR3UDU.js"),{ssr:!1}),d81=rs(()=>import("efficient-easel/screen/components/SectionScreenShell"),{ssr:!1}),dR="HeroSingle",mR="Untitled section";function u81(e,t){let a=t.components,s=a[e]?e:dR,o=a[s]?.defaultProps??{},r=lL(s,n=>a[n]?.defaultProps??{}),i=s===rH?{blocks:iH()}:null;return{type:s,props:{id:t81(s),...o,...r?{[r.slot]:r.children}:null,...i}}}function g81(){if(typeof window>"u")return $6;try{let e=window.localStorage.getItem(Sr);return e==="light"||e==="dark"||e==="auto"?e:$6}catch{return $6}}function uR({id:e,initialType:t,initialName:a=mR}){let[s,o]=ii(e),r=X71(s);wp(()=>{r.current=s},[s]);let i=o81(),[n,l]=ii(t),[c,h]=ii(a),[p,m]=ii(void 0),[u,v]=ii($6),{token:g,tokenRef:f}=s81({onMessage:_=>{if(rp(_)||l81(_))return;let D=_;if(D?.type==="storefront-editor:navigate"&&D.target?.kind==="section"&&D.target.id){let G=D.target.id;if(G===r.current)return;let K=D.target.type,t1=D.target.name;cR(S,()=>{l(K),h(t1||mR),o(G),i.address.show({kind:"section",id:G})},()=>i.send("storefront-editor:save-failed"))}}}),x=h81({save:_=>ub.update(_.id,_.node).then(()=>{}),onFailure:(_,D)=>{D===0&&i.send("storefront-editor:save-failed")}}),{state:b,push:w,flush:S}=x;wp(()=>v(g81()),[]);let T=n81(),A=T.usesBridgedToken?!!g:!0,P=ri(()=>Qh(i81(T),Ul(T)),[T]);wp(()=>{if(!A)return;let _=!1;return m(void 0),ub.ensure(s,c,u81(n??dR,P)).then(D=>!_&&m(D.node)).catch(()=>!_&&m(null)),()=>{_=!0}},[s,n,c,A,P]);let E=hR(_=>{i.send("storefront-editor:dirty");let D=pR(_);D&&w({id:r.current,node:D})},[w,i]),k=i.send,L=hR(async _=>{try{return await _(f.current??""),!0}catch{return k("storefront-editor:save-failed"),!1}},[k]),N=ri(()=>ep(P,!0),[P]);wp(()=>(of(null),()=>of(null)),[]);let R=ri(()=>p?ap(e81(p)):null,[p]),V=ri(()=>({target:{kind:"page",slug:""},adapter:Jr(void 0),capabilities:Jr(void 0).capabilities,templateId:null,currentSlug:"",currentKind:null,siteId:null,ready:A,token:g,tokenRef:f,notifyParent:k,runAuthed:L,docId:s,data:R,getLiveData:()=>R,error:null,redirecting:!1,saveStatus:p81(b),saveState:b,autoSaveEnabled:!0,autoSaveStoppedByConflict:!1,hasUnsavedEdits:b.pending,toggleAutoSave:()=>{},retrySave:()=>{x.retryNow()},onChange:E,flushSave:S,onPublish:async _=>{let D=pR(_);D&&await ub.update(r.current,D)},bridgeCapabilities:a81,access:{kind:"editing"},readOnly:!1,takeOverEditing:()=>{},viewReadOnly:()=>{},saveConflict:null,reloadFromServer:()=>{},navigate:()=>{},pendingNav:null,cancelPendingNav:()=>{},discardAndNavigate:()=>{},saveAndNavigate:async()=>{}}),[s,A,g,k,L,R,b,E,S,x.retryNow]),I=ri(()=>c81(!V.readOnly),[V.readOnly]);return p===void 0?g5("div",{className:"sf-msg",children:d("Loading\u2026")}):p===null||!R?g5("div",{className:"sf-msg sf-msg--error",children:d("Couldn\u2019t open this section.")}):g5(J71.Provider,{value:V,children:g5(Rc,{themeMode:u,chromePlaceholder:!0,children:g5(r81,{wrap:T.chrome?.wrap,surface:"section",children:g5(gh,{children:g5(vh,{children:g5(Q71,{children:g5(sp,{children:g5(fh,{children:g5(Pc,{children:g5(m81,{config:N,data:R,onChange:E,permissions:I,children:g5(d81,{})},s)})})})})})})})})})}import{EaselHostProvider as CT1}from"efficient-easel/screen/lib/host";import{MediaPanelProvider as MT1}from"efficient-easel/screen/lib/media-panel";import{useEffect as d91}from"react";import{useEffect as E81,useState as H81}from"react";import{createContext as v81,useCallback as gR,useContext as f81,useEffect as b81,useId as x81,useMemo as w81,useRef as y81,useState as z81}from"react";import{jsx as k81}from"react/jsx-runtime";var vR=v81(null);function fR({reason:e,children:t}){let[a,s]=z81([]),o=y81(null),r=gR(c=>{s(h=>h.includes(c)?h:[...h,c])},[]),i=gR(c=>{s(h=>h.filter(p=>p!==c))},[]),n=e==="none-configured",l=w81(()=>({noCurrencyConfigured:n,live:a,firstRendered:o,join:r,leave:i}),[n,a,r,i]);return k81(vR.Provider,{value:l,children:t})}function bR(e){let t=f81(vR),a=x81(),s=!!e&&!!t?.noCurrencyConfigured;s&&t&&t.firstRendered.current===null&&(t.firstRendered.current=a);let o=t?.join,r=t?.leave;return b81(()=>{if(!(!s||!o||!r))return o(a),()=>r(a)},[s,o,r,a]),!s||!t?!1:(t.live.length>0?t.live[0]:t.firstRendered.current)===a}var li={currencies:[],defaultCurrency:null},S81={currencies:[],defaultCurrency:null,reason:"none-configured"},ni=new Map;function xR(e,t,a=!1){a&&ni.delete(t);let s=ni.get(t);return s||(s=C81(e,t),ni.set(t,s),s.catch(()=>{ni.get(t)===s&&ni.delete(t)})),s}async function C81(e,t){try{let a=await Lh(e,t);if(!a)return li;let s=await F0.getSiteBySlug(a);return s.status!=="online"?await M81(e,t):{currencies:s.currencies??[],defaultCurrency:s.defaultCurrency??null}}catch(a){return console.warn("[editor-currency-source] load failed; editor stays unpriced",a),li}}async function M81(e,t){let a=await F1.listSiteCurrencies(t,e);if(!a.length)return S81;let s=[...a].sort((o,r)=>o.display_order-r.display_order).map(o=>({code:o.currency_code,symbol:o.symbol||T81(o.currency_code),decimalPlaces:typeof o.decimal_places=="number"?o.decimal_places:A81(o.currency_code),isDefault:o.is_default}));return{currencies:s,defaultCurrency:s.find(o=>o.isDefault)?.code??s[0].code}}var L81=0;function wR(e){try{return new Intl.NumberFormat(_H,{style:"currency",currency:e})}catch{return null}}function A81(e){return wR(e)?.resolvedOptions().maximumFractionDigits??L81}function T81(e){return wR(e)?.formatToParts(0).find(s=>s.type==="currency")?.value||e}import{jsx as yR}from"react/jsx-runtime";function gb({token:e,siteId:t,enabled:a,children:s}){let[o,r]=H81(li);return E81(()=>{if(!e||!a||!t){r(li);return}let i=!1;return xR(e,t).then(n=>{i||r(n)}).catch(()=>{}),()=>{i=!0}},[e,a,t]),yR(Y8,{currencies:o.currencies,defaultCurrency:o.defaultCurrency,children:yR(fR,{reason:o.reason,children:s})})}var Ie=new Map,vb=e=>e??"";function Ve(e,t,a=!1){let s=vb(t);a&&Ie.delete(s);let o=Ie.get(s);return o||(o=F1.getHeaderSettings(e,t??void 0),Ie.set(s,o),o.catch(()=>{Ie.get(s)===o&&Ie.delete(s)})),o}function zR(e,t){Ie.set(vb(t),Promise.resolve(e))}function kR(e){Ie.delete(vb(e))}function ci(e){return{logoUrl:W6(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,countrySelectorShowAs:e.country_selector_show_as,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}}import{useEffect as SR,useRef as fb}from"react";function yp({token:e,enabled:t=!0,deps:a=[],prime:s,onDisabled:o,refresh:r}){let i=fb(s);i.current=s;let n=fb(o);n.current=o;let l=fb(r);l.current=r,SR(()=>{if(!e||!t){n.current?.();return}let c=!1;return i.current.load().then(h=>{c||i.current.publish(h)}).catch(()=>{}),()=>{c=!0}},[e,t,...a]),SR(()=>{if(!e||!t||!l.current)return;let c=!1,h=l.current.subscribe(()=>{let p=l.current;p&&p.load().then(m=>{c||p.publish(m)}).catch(()=>{})});return()=>{c=!0,h()}},[e,t,...a])}function bb({token:e,siteId:t}){let{primeSettings:a,setSettings:s}=s3();return yp({token:e,deps:[t],prime:{load:()=>Ve(e,t),publish:o=>a(ci(o))},refresh:{subscribe:J8,load:()=>Ve(e,t,!0),publish:o=>s(ci(o))}}),null}import{createContext as P81,useCallback as ER,useContext as F81,useMemo as N81,useState as R81}from"react";var hi=new Map,CR=e=>e??"";function xb(e,t,a){a&&hi.clear();let s=CR(t),o=hi.get(s);if(!o){let r=F1.listMenus(e,t);hi.set(s,r),r.catch(()=>{hi.get(s)===r&&hi.delete(s)}),o=r}return o}var zp=new Map;function MR(e,t){let a=CR(t),s=zp.get(a);if(!s){let o=xb(e,t,!0);zp.set(a,o);let r=()=>{zp.get(a)===o&&zp.delete(a)};o.then(r,r),s=o}return s}function pi(e,t=!1){return xb(e,B2(),t)}function kp(e){return MR(e,B2())}function LR(e,t=!1){return xb(e,null,t)}function AR(e){return MR(e,null)}var wb={ids:new Set,handles:new Set};function yb(e){return{ids:new Set(e.map(t=>t.id).filter(Boolean)),handles:new Set(e.map(t=>t.handle).filter(Boolean))}}function TR({id:e,handle:t,editing:a,ready:s,live:o}){if(!a)return!1;let r=e??"",i=t??"";return!r&&!i?!0:s?r?!o.ids.has(r):!o.handles.has(i):!1}function Sp(e,t){if(t){if(t.id)return e.find(a=>a.id===t.id);if(t.handle)return e.find(a=>a.handle===t.handle)}}import{jsx as _81}from"react/jsx-runtime";var HR=P81({live:wb,ready:!1,primeLive:()=>{},setLive:()=>{}});function zb({children:e}){let[t,a]=R81({live:wb,ready:!1}),s=ER(i=>a(n=>n.ready?n:{live:i,ready:!0}),[]),o=ER(i=>a({live:i,ready:!0}),[]),r=N81(()=>({...t,primeLive:s,setLive:o}),[t,s,o]);return _81(HR.Provider,{value:r,children:e})}var Cp=()=>F81(HR);function Mp({token:e}){let{primeLive:t,setLive:a}=Cp();return yp({token:e,prime:{load:()=>pi(e),publish:s=>t(yb(s))},refresh:{subscribe:J8,load:()=>kp(e),publish:s=>a(yb(s))}}),null}import{readLockHolder as X81}from"efficient-easel/edit-lock";var Sb="/api/storefront/section-templates/",kb=e=>`${Sb}${encodeURIComponent(e)}/`,Cb=e=>e.node!=null;function Lp(e){if(!Cb(e))throw new Error(`Section template ${e.id} has no design`);return e}var Lb=(e,t)=>e instanceof _4&&e.status===t;function I81(e){return{list:()=>Fa(`${Sb}?no_page=true`,{token:e()}).then(t=>Array.isArray(t)?t:t.results??[]),get:t=>Fa(kb(t),{token:e()}).catch(a=>{if(Lb(a,404))return null;throw a}),create:t=>Fa(Sb,{method:"POST",token:e(),body:JSON.stringify(t)}),patch:(t,a)=>Fa(kb(t),{method:"PATCH",token:e(),body:JSON.stringify(a)}),remove:t=>Fa(kb(t),{method:"DELETE",token:e()})}}var Mb="sf:section-templates",PR=`${Mb}.imported`,V81="Untitled section",O81=160,Ap=e=>(typeof e=="string"?e.trim().slice(0,O81):"")||V81;function B81(e){try{let t=JSON.parse(e);return Array.isArray(t)?t.filter(a=>{let s=a?.node;return typeof a?.id=="string"&&typeof s?.type=="string"}):[]}catch{return[]}}async function D81(e,t=I3){let a={created:0,seeded:0,left:0,skipped:0,kept:!1},s=t.getItem(Mb);if(s===null)return a;for(let o of B81(s))try{let r=await e.get(o.id);if(r)r.node==null?(await e.patch(o.id,{node:o.node}),a.seeded+=1):a.left+=1;else try{await e.create({id:o.id,name:Ap(o.name),node:o.node}),a.created+=1}catch(i){if(!Lb(i,400))throw i;a.skipped+=1}}catch{return{...a,kept:!0}}return t.setItem(PR,s),t.getItem(PR)===s&&t.removeItem(Mb),a}var Tp=class{constructor(t,a=I3){this.readToken=t;this.storage=a;this.imported=null;this.http=I81(t)}ready(){return this.imported?this.imported:this.readToken()?(this.imported=D81(this.http,this.storage).catch(()=>{}),this.imported):Promise.resolve()}async list(){return await this.ready(),(await this.http.list()).filter(Cb)}async get(t){return await this.ready(),this.http.get(t)}async ensure(t,a,s){await this.ready();let o=async i=>i?Cb(i)?i:Lp(await this.http.patch(t,{node:s})):null,r=await o(await this.http.get(t));if(r)return r;try{return Lp(await this.http.create({id:t,name:Ap(a),node:s}))}catch(i){if(Lb(i,400)){let n=await o(await this.http.get(t));if(n)return n}throw i}}async save(t,a){return await this.ready(),Lp(await this.http.create({name:Ap(t),node:a}))}async update(t,a){return await this.ready(),Lp(await this.http.patch(t,{node:a}))}async rename(t,a){return await this.ready(),this.http.patch(t,{name:Ap(a)})}async remove(t){await this.ready(),await this.http.remove(t)}};var o9="dataSource";var mi="dataRows",Z81=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,G81=Symbol.for("efficient.block-sources");function Ep(){let e=globalThis;return e[G81]??={sources:new Map,revision:0}}function W81(e){if(typeof e.key!="string"||!Z81.test(e.key))throw new Error(`A block source key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(typeof e.label!="string"||!e.label.trim())throw new Error(`The block source ${e.key} has no label.`);if(!Array.isArray(e.blocks)||!e.blocks.length||e.blocks.some(t=>typeof t!="string"||!t))throw new Error(`The block source ${e.key} names no block it can fill.`);return{key:e.key,label:e.label.trim(),blocks:[...e.blocks],...e.sample?{sample:e.sample.map(t=>FR(t)).filter(t=>t!==null)}:{}}}function Ab(e){let t=e.map(W81),a=Ep();for(let s of t)a.sources.set(s.key,s);t.length&&(a.revision+=1)}function di(e){let t=[...Ep().sources.values()];return e===void 0?t:t.filter(a=>a.blocks.includes(e))}function U81(e){return Ep().sources.get(e)??null}function Oe(){return Ep().revision}function w3(e){let t=e?.[o9];return typeof t=="string"?t.trim():""}function FR(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t={};for(let[a,s]of Object.entries(e))typeof s=="string"&&s&&(t[a]=s);return Object.keys(t).length?t:null}function q81(e){let t=e?.[mi];return Array.isArray(t)?t.map(FR).filter(a=>a!==null):null}function D4(e,t,a=[]){let s=q81(e);if(s!==null&&(s.length||!t))return{rows:s,sample:!1};if(!t)return{rows:[],sample:!1};let o=U81(w3(e))?.sample;return{rows:o?.length?o:a,sample:!0}}var $81=[{key:"group-offices",label:"Group offices",blocks:["Footprint"]}];Ab($81);var Tb="+00 000 0000",j81={rooms:()=>[{key:"sample-1",title:d("First room"),excerpt:d("What this room has.")},{key:"sample-2",title:d("Second room"),excerpt:d("What this room has.")},{key:"sample-3",title:d("Third room"),excerpt:d("What this room has.")}],"location-contact":()=>[{key:"location",name:d("Location name"),address:d("Street address"),state:d("State"),country:d("Country"),phone:Tb,hours:d("Opening hours")}],"location-cards":()=>[{key:"where",name:d("Address"),note:d("Street address")},{key:"hours",name:d("Opening hours"),note:d("A line about it appears here.")},{key:"call",name:d("Phone"),note:Tb}],"location-footer":()=>[{text:d("Street address")},{text:Tb},{text:d("Opening hours")}],"location-payment-methods":()=>[{label:d("Cash")},{label:d("Card")}]};function NR(e){if(Array.isArray(e))for(let t of e){let a=typeof t?.key=="string"?j81[t.key]?.():void 0;try{Ab([{key:t.key,label:t.label,blocks:t.blocks,...a?{sample:a}:{}}])}catch{}}}var RR={"PATCH /api/activity/note-media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/activity/notes/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/auth/entities/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_on_dark:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_square:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/auth/me/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PATCH /api/auth/users/{id}/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PATCH /api/bug-reports/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"PATCH /api/employee-documents/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issue-files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/carton-groups/{group_id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/pallets/{pallet_id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/goods-issues/{id}/update_status/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/platform/brand-catalog/brands/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/products/brands/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/products/design-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/products/dfm-log-files/{id}/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"PATCH /api/products/moulds/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/products/project-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/products/proposals/{id}/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"PATCH /api/products/weight-logs/{id}/":{image:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"},photo:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/purchase-invoices/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/purchase-orders/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/qc-reports/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/recruitment/candidates/{id}/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"PATCH /api/reimbursements/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PATCH /api/rnd/images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PATCH /api/sales-claims/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PATCH /api/storefront/header-settings/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PATCH /api/storefront/sites/{id}/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/activity/note-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/activity/notes/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/auth/entities/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_on_dark:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_square:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/auth/users/{id}/reset-password/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"POST /api/bank-statements/{id}/import_csv/":{file:{accept:".csv,text/csv,text/plain,application/vnd.ms-excel",hint:"CSV",max_bytes:5242880,max_files:1,policy:"csv_import"}},"POST /api/bank-statements/{id}/preview_csv/":{file:{accept:".csv,text/csv,text/plain,application/vnd.ms-excel",hint:"CSV",max_bytes:5242880,max_files:1,policy:"csv_import"}},"POST /api/bug-reports/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"POST /api/bug-reports/{id}/bookmark/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"POST /api/bug-reports/{id}/thread/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"POST /api/careers/assessments/{token}/snapshots/":{image:{accept:"image/*",max_bytes:409600,max_files:1,policy:"proctoring_snapshot"}},"POST /api/careers/jobs/{slug}/apply/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/chat/conversations/{id}/thread/":{files:{accept:"*",max_bytes:26214400,max_files:10,policy:"chat_files"}},"POST /api/chat/public/conversations/{id}/thread/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"chat_image",reencoded_image:!0}},"POST /api/customer-portal/conversations/{id}/thread/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"chat_image",reencoded_image:!0}},"POST /api/customer-portal/warranty-claim-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/dealer-portal/wheel-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/employee-documents/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issue-files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/bulk_update_status/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/actual_packing/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/carton-groups/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/generate-label/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/pallets/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/refresh-tracking/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/regenerate-label/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/regenerate_invoice/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/goods-issues/{id}/update_loaded/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/platform/brand-catalog/brands/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/assign-owner/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/publish/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/resync/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/brand-catalog/brands/{id}/unpublish/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/platform/feedback/reports/{id}/thread/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"feedback_attachment"}},"POST /api/products/brands/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/products/brands/{id}/generate-box-pns/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"POST /api/products/design-images/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/products/dfm-log-files/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"POST /api/products/moulds/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/products/project-images/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/products/proposals/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"POST /api/products/proposals/{id}/approve-project/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"POST /api/products/weight-logs/":{image:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"},photo:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/purchase-invoices/capture/":{file:{accept:"application/pdf,image/jpeg,image/png",hint:"PDF \xB7 JPG \xB7 PNG",max_bytes:15728640,max_files:1,policy:"bill_capture"}},"POST /api/purchase-invoices/files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/purchase-orders/files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/qc-reports/media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/recruitment/candidates/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/analyze-cv/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/hire/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/move-stage/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/reinstate/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/reject/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/recruitment/candidates/{id}/withdraw/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"POST /api/reimbursements/files/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"POST /api/rnd/images/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/rnd/{id}/upload_image/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"POST /api/sales-claims/media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/sales/contacts/import-csv/":{file:{accept:".csv,text/csv,text/plain,application/vnd.ms-excel",hint:"CSV",max_bytes:5242880,max_files:1,policy:"csv_import"}},"POST /api/sales/contacts/{id}/avatar/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"POST /api/shop-portal/return-media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"POST /api/storefront/media/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 SVG \xB7 WEBP \xB7 MP4",max_bytes:268435456,max_files:1,policy:"storefront_media"}},"POST /api/storefront/media/ingest/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 SVG \xB7 WEBP \xB7 MP4",max_bytes:268435456,max_files:1,policy:"storefront_media"}},"POST /api/storefront/sites/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/storefront/sites/{id}/address/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/storefront/sites/{id}/duplicate/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"POST /api/supplier-portal/dfm-log-files/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"POST /api/utility/mail/send/":{attachments:{accept:"*",max_bytes:26214400,max_files:10,policy:"mail_attachments"},files:{accept:"*",max_bytes:26214400,max_files:10,policy:"mail_attachments"}},"PUT /api/activity/note-media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/activity/notes/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/auth/entities/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_on_dark:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0},logo_square:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PUT /api/auth/me/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PUT /api/auth/users/{id}/":{avatar:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"avatar",reencoded_image:!0}},"PUT /api/bug-reports/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0},screenshot:{accept:"image/*",hint:"PNG \xB7 JPG",max_bytes:26214400,max_files:1,policy:"feedback_image",reencoded_image:!0}},"PUT /api/employee-documents/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/goods-issue-files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/goods-issues/{id}/":{label:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/products/brands/{id}/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PUT /api/products/design-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/products/dfm-log-files/{id}/":{file:{accept:".stp,.step,.dxf,.pdf,application/pdf,application/step,model/step,application/dxf,image/vnd.dxf",hint:"STP \xB7 STEP \xB7 DXF \xB7 PDF",max_bytes:536870912,max_files:1,policy:"dfm_file"}},"PUT /api/products/moulds/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/products/project-images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/products/proposals/{id}/":{file:{accept:".pdf,application/pdf",hint:"PDF",max_bytes:52428800,max_files:1,policy:"proposal_pdf"}},"PUT /api/products/weight-logs/{id}/":{image:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"},photo:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/purchase-invoices/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/purchase-orders/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/qc-reports/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/recruitment/candidates/{id}/":{cv:{accept:".pdf,.doc,.docx,.txt,.md,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,text/plain,text/markdown",hint:"PDF \xB7 DOC \xB7 DOCX \xB7 TXT",max_bytes:10485760,max_files:1,policy:"cv"}},"PUT /api/reimbursements/files/{id}/":{file:{accept:"*",max_bytes:52428800,max_files:1,policy:"record_document"}},"PUT /api/rnd/images/{id}/":{image:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:26214400,max_files:1,policy:"record_image",reencoded_image:!0}},"PUT /api/sales-claims/media/{id}/":{file:{accept:"image/*,video/*",hint:"PNG \xB7 JPG \xB7 MP4",max_bytes:104857600,max_files:1,policy:"record_media"}},"PUT /api/storefront/header-settings/":{logo:{accept:"image/*",hint:"PNG \xB7 JPG \xB7 WEBP",max_bytes:5242880,max_files:1,policy:"brand_logo",reencoded_image:!0}},"PUT /api/storefront/sites/{id}/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"PUT /api/storefront/sites/{id}/countries/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"PUT /api/storefront/sites/{id}/currencies/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}},"PUT /api/storefront/sites/{id}/part-prices/":{favicon:{accept:"image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",hint:"PNG \xB7 ICO \xB7 SVG",max_bytes:1048576,max_files:1,policy:"favicon"}}};function _R(e,t){let a=RR[e][t];return{maxSizeBytes:a.max_bytes,maxFiles:a.max_files,accept:a.accept==="*"||a.accept==="*/*"?void 0:a.accept,acceptHint:a.hint}}import{EFFICIENT_BACKEND as J81,currentEaselSession as Nb,provideDefaultBackend as Q81}from"efficient-easel/screen/lib/session";var K81=["home","products","gallery","about","contact"],Y81=e=>{let t=e.slug.trim().toLowerCase(),a=(e.title??"").trim().toLowerCase(),s=K81.findIndex(o=>o===t||o===a);return s===-1?Number.POSITIVE_INFINITY:s},IR=e=>e.map((t,a)=>({page:t,idx:a,rank:Y81(t)})).sort((t,a)=>t.rank-a.rank||t.idx-a.idx).map(t=>t.page);var Hb="Popups",VR="Site";var BR={[be]:{label:"Site popup",group:Hb},[p5]:{label:"Footer",group:VR},[cT]:{label:"Cart drawer",group:VR},[mT]:{label:"Cookie banner",group:Hb}};function Hp(e){return BR[e.slug]?.label||e.title||e.slug}function Eb(e){let t=e.group?.trim();return t||null}function OR(e,t){let a=new Map;for(let s of e){let o=t(s),r=a.get(o);r?r.push(s):a.set(o,[s])}return a}function DR(e){let t=IR(e),a=[],s=t.filter(n=>!Er(n.slug)),o=s.filter(n=>!Eb(n));o.length&&a.push({key:"top",group:null,pages:o});let r=s.filter(n=>Eb(n));for(let[n,l]of OR(r,c=>Eb(c)))a.push({key:`folder:${n}`,group:n,pages:l});let i=t.filter(n=>Er(n.slug));for(let[n,l]of OR(i,c=>BR[c.slug]?.group??Hb))a.push({key:`system:${n}`,group:n,pages:l});return a}import{PAGE_CONFLICT_CODE as e91}from"efficient-easel/screen/lib/failure";import{WebsiteBackendError as r9,provideHostFailures as t91}from"efficient-easel/screen/lib/backend-error";var Pb=e=>e.layout_updated_at??e.updated_at??null,a91=["live","changed","never"],ZR=e=>a91.includes(e.live_state)?{live:e.live_state}:{};function s91(e){if(!e||typeof e!="object")return null;let t=e;return t.code!==e91?null:{savedBy:typeof t.saved_by=="string"?t.saved_by:"",savedByYou:t.saved_by_you===!0,secondsAgo:typeof t.seconds_ago=="number"?t.seconds_ago:0}}function o91(e){return e===401||e===403?"unauthorized":e===404?"not-found":e===MH||e>=500?"unavailable":"invalid"}function r91(e){if(!(e instanceof _4))return e;if(e.status===409){let t=s91(e.data);if(t)return new r9("changed-elsewhere",e.message,{conflict:t,cause:e});let a=X81(e.data);if(a)return new r9("lock-taken",e.message,{holder:a,cause:e})}return new r9(o91(e.status),e.message,{cause:e})}function i91(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=a=>{if(typeof a=="string")return a.trim()||null;let s=Array.isArray(a)?a:a&&typeof a=="object"?Object.values(a):[];for(let o of s){let r=t(o);if(r)return r}return null};for(let[a,s]of Object.entries(e)){if(a==="detail")continue;let o=t(s);if(o)return`${a}: ${o}`}return null}var Fb=new WeakMap;function n91(e,t){let a=sT(),s=a?new URL(a).hostname:typeof window<"u"?window.location?.hostname??null:null,o=null,r=t.siteId(),i=t.token();if(dH(s)&&r&&i){let l=Lh(i,r);Fb.has(l)?o=Fb.get(l)??null:l.then(c=>Fb.set(l,c))}let n=uH({pageSlug:e,siteSlug:o,hostname:s});return a?`${a}${n}`:n}var l91={group:"Template pages",groupKey:"template"},GR=e=>({id:e.id,slug:e.slug,label:e.title||e.slug,...l91,draft:!1});function WR(e){let t=async m=>{let u=e.token();if(!u)throw new r9("unauthorized","The editor has no sign-in yet.");try{return await m(u)}catch(v){throw r91(v)}},a={list:m=>t(async u=>{let v=await F1.listPages(u,m?.siteId);return DR(v.filter(g=>g.slug!==p5)).flatMap(g=>g.pages.map(f=>({id:f.id,slug:f.slug,label:Hp(f),group:g.group,groupKey:g.key,draft:!f.is_published,kind:f.kind??null})))}),load:m=>t(async u=>{let v="id"in m?m.id:(await F1.findPageBySlug(m.slug,u,m.siteId))?.id,g=v?await F1.getPageById(v,u):null;return g?{id:g.id,layout:g.layout,kind:g.kind,version:Pb(g),...ZR(g)}:null}),save:(m,u,v)=>{let{version:g}=v;return g?t(async f=>{let x=await F1.saveLayout(m,u.layout,f,g,v.clientId||void 0);return{version:Pb(x),...ZR(x)}}):Promise.reject(new Error("Refusing to save this page: the editor does not know which version it is replacing. Reload the page and try again."))},version:m=>t(u=>F1.getPageById(m,u).then(Pb)),linkTargets:m=>t(async u=>(await F1.listPages(u,m?.siteId)).map(v=>({id:v.id,slug:v.slug,label:Hp(v),layout:v.layout??null}))),duplicate:(m,u)=>t(async v=>{let g=await F1.duplicatePage(m,{title:u.title,slug:u.slug},v);return{id:g.id,slug:g.slug,label:Hp(g),group:g.group||null,draft:!g.is_published,kind:g.kind??null}})},s=m=>({list:()=>t(async u=>(await F1.listTemplatePages(m,u)).map(GR)),load:u=>t(async v=>{let g=w=>"id"in u?w.id===u.id:w.slug===u.slug,f=w=>({id:w.id,layout:w.layout,version:null}),x=await F1.listTemplatePages(m,v);if(x.length)return f(x.find(g)??x[0]);let b=await F1.getTemplate(m,v).catch(()=>null);try{return f(await F1.createTemplatePage(m,{slug:ra,title:"Home",layout:b?.layout??{}},v))}catch{let w=await F1.listTemplatePages(m,v),S=w.find(g)??w[0];return S?f(S):null}}),save:(u,v)=>t(async g=>(await F1.saveTemplatePageLayout(u,v.layout,g),{version:null})),create:u=>t(async v=>GR(await F1.createTemplatePage(m,{slug:u.slug,title:u.title,layout:u.layout},v))),remove:(u,v)=>t(g=>F1.deleteTemplatePage(u,g,v))}),o=m=>{let u=m?.siteId??e.siteId();if(!u)throw new r9("not-found","This editor is not connected to a website.");return u},r=m=>({name:m.name,slug:m.slug,mapsApiKey:m.maps_api_key,mapsMapId:m.maps_map_id}),i=m=>Object.fromEntries(we.map(u=>[u,m[hh(u)]??""])),n={launcherColor:"launcher_color",launcherIcon:"launcher_icon",launcherPosition:"launcher_position",launcherLabel:"launcher_label",showOnPhones:"show_on_phones"},l=Object.keys(n),c=m=>{let u={enabled:m.enabled,title:m.title,subtitle:m.subtitle,greeting:m.greeting};for(let v of l){let g=m[n[v]];g!==void 0&&Object.assign(u,{[v]:g})}return u},h=m=>{let u={};for(let[v,g]of Object.entries(m))u[n[v]??v]=g;return u},p={pages:a,lock:{claim:(m,u,v)=>t(async g=>({heartbeatSeconds:(await F1.claimPageEditLock(m,g,u,v)).heartbeat_seconds})),release:m=>t(u=>F1.releasePageEditLock(m,u))},site:{get:m=>t(async u=>r(await F1.getSite(o(m),u))),update:(m,u)=>t(async v=>r(await F1.updateSite(o(u),m.mapsApiKey===void 0?{}:{maps_api_key:m.mapsApiKey},v))),publish:m=>t(async u=>{try{let{state:v,published:g}=await F1.publishSite(o(m),u);return{state:v,published:g}}catch(v){let g=v instanceof _4&&v.status===400?i91(v.data):null;throw g?new r9("invalid",g,{cause:v}):v}}),liveState:m=>t(async u=>{let{state:v,changes:g}=await F1.getSiteLiveState(o(m),u);return{state:v,changes:g}})},media:{resolve:GM,maxUploadBytes:_R("POST /api/storefront/media/","file").maxSizeBytes},sectionTemplates:new Tp(e.token),social:{get:m=>t(async u=>i(await F1.getSocialSettings(u,o(m)))),update:(m,u)=>t(async v=>{let g=Object.fromEntries(we.filter(f=>f in m).map(f=>[hh(f),m[f]]));try{return i(await F1.updateSocialSettings(g,v,o(u)))}catch(f){if(f instanceof _4&&f.status===400){let x=f.data??{},b={};for(let w of we){let S=x[hh(w)],T=Array.isArray(S)?S[0]:S;typeof T=="string"&&T.trim()&&(b[w]=T)}if(Object.keys(b).length>0)throw new r9("invalid",f.message,{fields:b,cause:f})}throw f}})},theme:{get:m=>t(u=>F1.getThemeSettings(u,m?.siteId)),update:(m,u)=>t(v=>F1.updateThemeSettings(m,v,u?.siteId))},geocode:{locate:(m,u)=>t(async v=>{let g=await F1.geocode(m,v,u?.country);if(g.status==="not_found")return null;if(g.status!=="found"||g.lat===null||g.lng===null)throw new r9("unavailable","The geocoder could not answer just now.");return{lat:g.lat,lng:g.lng,label:g.label}})},chat:{get:m=>t(async u=>c(await F1.getChatSettings(u,m?.siteId))),update:(m,u)=>t(async v=>c(await F1.updateChatSettings(h(m),v,u?.siteId)))},blog:{posts:m=>t(async u=>(await F1.listBlogPosts(u,{visibleOnly:!0,siteId:m?.siteId})).map(v=>({slug:v.slug,title:v.title,excerpt:v.excerpt,category:v.category,coverImage:v.cover_image?W6(v.cover_image)??"":"",publishedAt:v.published_at,href:Ov(v.slug)})))},templates:{get:m=>t(async u=>{let v=await F1.getTemplate(m,u);return{id:v.id,name:v.name}}),pages:s},preview:{href:m=>n91(m,e),draftLink:m=>t(async u=>({url:(await F1.createPagePreviewLink(m,u)).url??null}))}};return p[J81]=!0,p}var c91=["text","date"],h91=e=>e.replace(/_([a-z0-9])/g,(t,a)=>a.toUpperCase());function p91(e){if(Array.isArray(e))for(let t of e){let s=(Array.isArray(t?.fields)?t.fields:[]).filter(o=>c91.includes(o.kind)).map(o=>({key:h91(o.key),label:o.label,kind:o.kind}));try{gE([{key:t.key,label:t.label,fields:s}])}catch{}}}function UR(e){return Nb().cache("efficient:editor-offerings",()=>Promise.all([F1.listBlockSources(e).then(NR).catch(()=>{}),F1.listRecordTypes(e).then(p91).catch(()=>{})]).then(()=>{}))}t91({read:e=>e instanceof _4?{status:e.status,data:e.data,message:e.message}:null,unreachableMessage:CH,loadRefusal:(e,{slug:t})=>e instanceof EH?`\u201C${t}\u201D exists on more than one website. Open it from the site you want to edit.`:null});Q81(e=>WR({token:()=>e.auth.token,siteId:()=>e.siteId()}));function m91(e={}){return e.portalAudience!==void 0&&LH(e.portalAudience),e.language!==void 0&&AH(e.language),WR({token:()=>Nb().auth.token,siteId:()=>e.siteId??Nb().siteId()})}import{useScreenDocument as u91}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as Rb,jsxs as _b}from"react/jsx-runtime";function Ib({surface:e,children:t}){let{token:a,siteId:s,capabilities:o}=u91();if(d91(()=>{a&&UR(a)},[a]),e==="section")return _b(zb,{children:[a?Rb(Mp,{token:a}):null,t]});let r=a??"";return _b(gb,{token:r,siteId:s,enabled:o.hasSiteSettings,children:[o.hasSiteSettings&&Rb(bb,{token:r,siteId:s}),_b(zb,{children:[o.hasSiteSettings&&Rb(Mp,{token:r}),t]})]})}import{ShowWhen as ue1}from"efficient-shell/ui";import{useCallback as e7,useEffect as zi,useRef as Kb,useState as n9}from"react";import{requestMediaPick as E91}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as d_}from"efficient-easel/screen/lib/host";var qR="Menu Item",$R=6,Vb=4,jR="Menu",KR="Link a menu in the inspector \u2192";function YR(){return d("This column isn't linked to a menu, so the preview shows placeholder links. Pick a menu above.")}function XR(e){return d("\u201C{name}\u201D no longer exists in {place}, so the preview shows placeholder links. Pick another menu.",{name:e,place:d("Storefront \u2192 Menus")})}function JR(){return d("The menu linked here no longer exists in {place}, so the header shows placeholder links. Pick another menu.",{place:d("Storefront \u2192 Menus")})}import{Fragment as g91}from"react";import{jsx as v91}from"react/jsx-runtime";function Z4(e,t){return e.split(/\{([A-Za-z][A-Za-z0-9_]*)\}/g).map((a,s)=>s%2===1?v91(g91,{children:a in t?t[a]:`{${a}}`},s):a)}import{HEADER_TYPE as Ob,FOOTER_TYPE as f91}from"efficient-easel/draw";var b91=new Set(["Hero","HeroSingle","IntroBleed"]),V3={min:56,max:140,default:88},is={min:0,max:120,step:2,default:32},ui=`var(--sf-header-h, ${V3.default}px)`,gi="--sf-header-set-h",Bb="--sf-header-h",QR=`var(${gi}, ${V3.default}px)`,e_="sf-header-clearance",i9="sf-sticky-underheader";function Db(e){return e?.find(t=>t?.type&&t.type!==Ob)??null}function t_(e){let t=Db(e)?.type;return!t||!b91.has(t)}function a_(e){return!t_(e)}function Zb(e){return!!e?.some(t=>t?.type===Ob)}function s_(e){return!e||e.length===0?!1:!e.some(t=>t?.type===Ob||t?.type===f91)}var x91=["auto","shared","own"],Gb="auto",w91="topSpace",o_="data-top-space";function y91(e){return x91.includes(e)?e:Gb}function Wb(e,t){let a=y91(e?.props?.[w91]);return a==="own"?!0:a==="shared"?!1:t_(t)}function r_(e,t){return Wb(e,t)?"own":null}var vi=MA,z91="sf-header-theme";function fi(e){return typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}function Pp(e){let t=fi(e);return t===null?null:{className:z91,style:AA(t)}}var Ub="overlay",qb=[{label:"Copy over image",value:"overlay"},{label:"Copy above image",value:"stacked"}];function ns(e){return y2(qb,Ub,e)}var I5={desktop:40,mobile:45,min:20,max:80,step:5};function $b(e,t){return`${typeof e=="number"?e:t}%`}var Fp="data-lead-ink",Np="data-header-ink";var k91="auto";function S91(e){return e.type==="IntroBleed"?ns(e.props?.layout)!=="stacked":!0}function i_(e){let t=Db(e);return t&&a_(e)&&S91(t)?"light":null}function ls(e){return e==="light"||e==="dark"?e:k91}import{Banner as H91,Button as Jb,Drawer as P91,InputNumber as F91,LoadingSpinner as N91,MediaUploadField as R91,ShowWhen as wi,Slider as _91,Tabs as I91,tabButtonId as V91,tabPanelId as O91}from"efficient-shell/ui";import{PictureTiles as C91}from"efficient-shell/ui";import{FlagUsIcon as M91,GlobeIcon as L91}from"efficient-shell/icons/efficient";var bi=[{value:"name",label:"Country name"},{value:"code_currency",label:"Code and currency"},{value:"globe_code",label:"Globe and code"},{value:"currency",label:"Currency"},{value:"flag_code",label:"Flag and code"},{value:"flag",label:"Flag"}],Rp="Show as",xi="name";function Q6(e){return bi.some(t=>t.value===e)?e:xi}var n_=e=>e==="flag_code"||e==="flag";import{Fragment as jb,jsx as Be,jsxs as _p}from"react/jsx-runtime";var l_=Be("span",{className:"inline-flex shrink-0 border border-current/20",children:Be(M91,{size:15})}),A91={name:"UNITED STATES",code_currency:_p(jb,{children:["US",Be("span",{className:"opacity-50",children:"\xB7"}),"USD"]}),globe_code:_p(jb,{children:[Be(L91,{size:12,className:"shrink-0"}),"US"]}),currency:"USD",flag_code:_p(jb,{children:[l_,"US"]}),flag:l_};function T91({kind:e}){return _p("span",{"aria-hidden":!0,className:"inline-flex h-6 items-center gap-1 whitespace-nowrap rounded-xs border border-current px-2 font-mono text-(length:--text-3xs) font-medium tracking-wider",children:[A91[e],Be("span",{className:"opacity-70",children:"\u25BE"})]})}function Ip({value:e,onChange:t}){return Be(C91,{label:d(Rp),columns:2,captions:!0,value:Q6(e),onChange:t,options:bi.map(a=>({value:a.value,label:d(a.label),picture:Be(T91,{kind:a.value})}))})}import{SettingsDefaultReset as Yb,SettingsSwitch as yi}from"efficient-easel/panel";import{FieldSelect as Qb}from"efficient-easel/fields";import{useEaselStrings as W91}from"efficient-easel/strings";import{ListIcon as U91,LogoIcon as q91,SettingsIcon as $91,StylesIcon as j91}from"efficient-easel/icons";import{Fragment as De,jsx as Q,jsxs as K0}from"react/jsx-runtime";var B91={field:"country_selector_enabled",is:!0},ki={not:{context:"placeholderMode",is:!0}},D91={field:"menu_position",is:"beside"},Z91={all:[{field:"logo_position",is:"center"},{not:{field:"menu_position",is:"center"}}]},G91={all:[ki,n5("country_selector_enabled")]},ex="sf-header",c_="sf-header-size-label",h_="sf-header-gap-label",p_="sf-header-height-label",m_=[{id:"logo",label:"Logo",icon:Q(q91,{})},{id:"menu",label:"Menu",icon:Q(U91,{}),showWhen:ki},{id:"tools",label:"Tools",icon:Q($91,{})},{id:"look",label:"Look",icon:Q(j91,{})}];function tx({tokenRef:e,siteId:t,onClose:a,onAuthExpired:s,inline:o,placeholderMode:r,websiteName:i,onOpenWebsiteSettings:n}){let l=d_(),c=W91(),[h,p]=n9(null),[m,u]=n9(null),[v,g]=n9(!1),[f,x]=n9(m_[0].id),[b,w]=n9(qE),S=h,T={placeholderMode:r},A=Object.values(wE(Object.fromEntries(m_.map(B=>[B.id,B])),S,T)),P=A.find(B=>B.id===f)??A[0],[E,k]=n9(0),{setSettings:L}=s3(),N=Kb(null),R=Kb(null),V=Kb(null);zi(()=>{let B=!1,j=null,$=null,p1=3,L1=(n0,J=0)=>{B||u(null),Ve(n0,t,J>0).then(A1=>!B&&p(A1)).catch(()=>{B||(J+1<p1?$=setTimeout(()=>L1(n0,J+1),600*(J+1)):u(d("Could not load header settings.")))})},i0=e.current;if(i0)L1(i0);else{let n0=0;j=setInterval(()=>{let J=e.current;if(J){j&&clearInterval(j),j=null,B||u(null),L1(J);return}n0+=250,n0===5e3&&!B&&u(d("Waiting for editor authorization\u2026")),n0>=3e4&&(j&&clearInterval(j),j=null,B||u(d("Not authorized yet \u2014 reopen once the editor has loaded.")))},250)}return()=>{B=!0,j&&clearInterval(j),$&&clearTimeout($)}},[e,E,t]),zi(()=>{h&&L(ci(h))},[h,L]),zi(()=>()=>{N.current&&clearTimeout(N.current),R.current&&clearTimeout(R.current),V.current&&clearTimeout(V.current)},[]);let I=e7(async(B,j)=>{let $=e.current;if(!$||!h)return;let p1=h;j&&p({...h,...j}),g(!0),u(null);try{let L1=await B($);p(L1),zR(L1,t),v6()}catch(L1){p(p1),L1 instanceof _4&&L1.status===401?(kR(t),s?.(),u(d("Authorization expired \u2014 try again in a moment."))):u(d("Could not save. Please retry."))}finally{g(!1)}},[h,e,s,t]),_=e7(B=>I(j=>F1.updateHeaderSettings(B,j,t??void 0),B),[I,t]),D=e7(B=>{I(j=>F1.setHeaderLogoFromAsset(B,j,t??void 0))},[I,t]),G=e7(()=>{E91(l,{accept:"image/svg+xml",title:d("Logo (SVG)")}).then(B=>{B&&D(B.id)})},[D]),K=e7((B,j=!0)=>{p(p1=>p1&&{...p1,logo_size_px:B}),N.current&&clearTimeout(N.current);let $=()=>{I(p1=>F1.updateHeaderSettings({logo_size_px:B},p1,t??void 0))};j?$():N.current=setTimeout($,400)},[I,t]),t1=e7((B,j=!0)=>{p(p1=>p1&&{...p1,height_px:B}),R.current&&clearTimeout(R.current);let $=()=>{I(p1=>F1.updateHeaderSettings({height_px:B},p1,t??void 0))};j?$():R.current=setTimeout($,400)},[I,t]),Z=e7((B,j=!0)=>{p(p1=>p1&&{...p1,menu_gap_px:B}),V.current&&clearTimeout(V.current);let $=()=>{I(p1=>F1.updateHeaderSettings({menu_gap_px:B},p1,t??void 0))};j?$():V.current=setTimeout($,400)},[I,t]),a1=e7(()=>{I(async B=>{let j=await F1.clearHeaderLogo(B,t??void 0);return j.reverse_logo?F1.updateHeaderSettings({reverse_logo:!1},B,t??void 0):j})},[I,t]),n1=e7(B=>{p(j=>j&&{...j,menu:B?.id??null,menu_handle:B?.handle??null,menu_name:B?.name??null,menu_items:B?B.items.map($=>({label:$.label,url:$.url,dropdown_menu:$.dropdown_menu??null,dropdown_items:$.dropdown_items??[]})):[]}),I(j=>F1.updateHeaderSettings({menu:B?.id??null},j,t??void 0))},[I,t]),r1=K0(De,{children:[m&&Q(H91,{tone:"danger",className:"mx-4 mt-3",action:h?void 0:Q(Jb,{variant:"secondary",size:"md",onClick:()=>k(B=>B+1),children:d("Retry")}),children:m}),h?K0(De,{children:[Q(ie1,{tabs:A,activeId:P.id,onSelect:x}),K0("div",{id:O91(ex,P.id),role:"tabpanel","aria-labelledby":V91(ex,P.id),className:"flex flex-col p-4 [&>*+*]:mt-3",children:[P.id==="logo"&&K0(De,{children:[Q(k6,{label:"Image"}),Q(wi,{rule:ki,values:S,context:T,children:Q(K91,{settings:h,websiteName:i,onPick:G,onClear:a1,showHint:b})}),Q(y3,{label:"Reverse the Logo",children:Q(yi,{checked:h.reverse_logo,onChange:B=>_({reverse_logo:B}),ariaLabel:d("Reverse the Logo")})}),Q(t7,{shown:b,children:d("Keeps the logo readable on any header \u2014 flips just its black & white parts to contrast the bar behind it (in both light and dark themes). Any other colors are kept as-is.")}),Q(k6,{label:"Placement"}),Q(X91,{label:T0.logoPosition.label,value:T0.logoPosition.options.find(B=>B.value===T0.logoPosition.choose(h.logo_position))?.label,children:Q(Z7,{value:T0.logoPosition.choose(h.logo_position),options:T0.logoPosition.options,onChange:B=>_({logo_position:B}),ariaLabel:T0.logoPosition.label})}),K0("div",{className:"flex flex-col gap-2",children:[K0("div",{className:"flex items-center justify-between",children:[Q("span",{id:c_,className:"text-xs text-[var(--ink-muted)]",children:d("Size")}),K0("span",{className:"flex items-center gap-1",children:[K0("span",{className:"sf-header-value text-[12px] tabular-nums text-[var(--ink-faint)]","data-changed":h.logo_size_px!=null||void 0,children:[h.logo_size_px??Rr[h.logo_size],"px"]}),Q(Yb,{label:d("Size"),words:c.panel,changed:h.logo_size_px!=null,onReset:()=>K(null)})]})]}),Q(Xb,{labelledBy:c_,min:Ch,max:nH,step:2,value:h.logo_size_px??Rr[h.logo_size],onPreview:B=>K(B,!1),onCommit:B=>K(B,!0)}),Q(t7,{shown:b,children:d("Sets the logo\u2019s height; the width follows the logo\u2019s own proportions.")})]}),Q(bh,{shown:b,onChange:w})]}),P.id==="menu"&&K0(De,{children:[Q(k6,{label:"Links"}),Q(Y91,{token:e.current,menuId:h.menu,menuName:h.menu_name,itemCount:h.menu_items?.length??0,onPick:n1}),Q(y3,{label:T0.menuAlign.label,children:Q(Z7,{value:T0.menuAlign.choose(h.menu_position),options:T0.menuAlign.options.filter(B=>B.value!=="beside"||h.logo_position!=="center"),onChange:B=>_({menu_position:B}),ariaLabel:T0.menuAlign.label})}),Q(wi,{rule:D91,values:S,children:K0("div",{className:"flex flex-col gap-2",children:[K0("div",{className:"flex items-center justify-between",children:[Q("span",{id:h_,className:"text-xs text-[var(--ink-muted)]",children:d("Space from the logo")}),K0("span",{className:"flex items-center gap-1",children:[K0("span",{className:"sf-header-value text-[12px] tabular-nums text-[var(--ink-faint)]","data-changed":h.menu_gap_px!=null||void 0,children:[h.menu_gap_px??is.default,"px"]}),Q(Yb,{label:d("Space from the logo"),words:c.panel,changed:h.menu_gap_px!=null,onReset:()=>Z(null)})]})]}),Q(Xb,{labelledBy:h_,min:is.min,max:is.max,step:is.step,value:h.menu_gap_px??is.default,onPreview:B=>Z(B,!1),onCommit:B=>Z(B,!0)}),Q(t7,{shown:b,children:d("How much room the menu leaves the logo. Only the logo moves away; the space between the menu words stays as it is.")})]})}),Q(y3,{label:T0.menuRow.label,children:Q(Z7,{value:T0.menuRow.choose(h.menu_row),options:T0.menuRow.options,onChange:B=>_({menu_row:B}),ariaLabel:T0.menuRow.label})}),Q(wi,{rule:Z91,values:S,children:Q(y3,{label:"Left items",children:Q("div",{className:"w-16",children:Q(Qb,{value:h.menu_split??3,ariaLabel:d("Left items"),onChange:B=>_({menu_split:B}),options:[1,2,3,4].map(B=>({label:String(B),value:B}))})})})}),Q(y3,{label:T0.navTextCase.label,children:Q(Z7,{value:T0.navTextCase.choose(h.nav_text_case),options:T0.navTextCase.options,onChange:B=>_({nav_text_case:B}),ariaLabel:T0.navTextCase.label})}),Q(t7,{shown:b,children:Z4(d("{uppercase} draws SEARCH and BAG; {capitalised} draws Search and Bag. It covers the menu links and the Tools words together, and it leaves a name like FusionForge exactly as you typed it."),{uppercase:Q("strong",{children:d("Uppercase")}),capitalised:Q("strong",{children:d("Capitalised")})})})]}),P.id==="tools"&&K0(De,{children:[Q(k6,{label:"Style"}),Q(y3,{label:T0.utilStyle.label,children:Q(Z7,{value:T0.utilStyle.choose(h.util_style),options:T0.utilStyle.options,onChange:B=>_({util_style:B}),ariaLabel:T0.utilStyle.label})}),Q(t7,{shown:b,children:Z4(d("{text} draws the words \u2014 Search, Account, Bag \u2014 instead of the little pictures. It changes how they look, not whether they are shown: that stays with the switches below."),{text:Q("strong",{children:d("Text")})})}),Q(k6,{label:"Search"}),Q(y3,{label:"Search",children:Q(yi,{checked:h.search_enabled,onChange:B=>_({search_enabled:B}),ariaLabel:d("Search")})}),Q(y3,{label:T0.searchPosition.label,children:Q(Z7,{value:T0.searchPosition.choose(h.search_position),options:T0.searchPosition.options,onChange:B=>_({search_position:B}),ariaLabel:T0.searchPosition.label})}),Q(k6,{label:"Country selector"}),Q(y3,{label:"Show selector",children:Q(yi,{checked:h.country_selector_enabled,onChange:B=>_({country_selector_enabled:B}),ariaLabel:d("Show selector")})}),Q(wi,{rule:B91,values:{country_selector_enabled:h.country_selector_enabled},children:Q(y3,{label:"Show as",stacked:!0,children:Q(Ip,{value:h.country_selector_show_as,onChange:B=>_({country_selector_show_as:B})})})}),Q(wi,{rule:G91,values:S,context:T,children:Q(t7,{shown:b,children:Z4(d("Which countries this website serves \u2014 and each region's own URL \u2014 is set in the admin console under {place}. Whether the picker is SHOWN stays here: that is header chrome, but the served-country list has tax consequences and belongs with commerce configuration."),{place:Q("strong",{children:d("Storefront \u203A Settings \u203A Regions & currencies")})})})}),Q(k6,{label:"Account and cart"}),Q(y3,{label:"Account",children:Q(yi,{checked:h.account_enabled??!0,onChange:B=>_({account_enabled:B}),ariaLabel:d("Account")})}),Q(y3,{label:"Cart",children:Q(yi,{checked:h.cart_enabled??!0,onChange:B=>_({cart_enabled:B}),ariaLabel:d("Cart")})}),Q(bh,{shown:b,onChange:w})]}),P.id==="look"&&K0(De,{children:[Q(k6,{label:"Dimensions"}),Q(y3,{label:T0.width.label,children:Q(Z7,{value:T0.width.choose(h.width),options:T0.width.options,onChange:B=>_({width:B}),ariaLabel:T0.width.label})}),K0("div",{className:"flex flex-col gap-2",children:[K0("div",{className:"flex items-center justify-between",children:[Q("span",{id:p_,className:"text-xs text-[var(--ink-muted)]",children:d("Height")}),K0("span",{className:"flex items-center gap-1",children:[K0("span",{className:"sf-header-value text-[12px] tabular-nums text-[var(--ink-faint)]","data-changed":h.height_px!=null||void 0,children:[h.height_px??V3.default,"px"]}),Q(Yb,{label:d("Height"),words:c.panel,changed:h.height_px!=null,onReset:()=>t1(null)})]})]}),Q(Xb,{labelledBy:p_,min:V3.min,max:V3.max,step:2,value:h.height_px??V3.default,onPreview:B=>t1(B,!1),onCommit:B=>t1(B,!0)}),Q(t7,{shown:b,children:d("Sets how tall the header bar is; the content below it shifts down to match.")})]}),Q(y3,{label:"Border thickness",children:Q("div",{className:"w-24",children:Q(F91,{value:h.border_thickness,min:0,max:20,precision:0,size:"md",suffix:"px","aria-label":d("Border thickness"),onChange:B=>_({border_thickness:Math.max(0,B??0)})})})}),Q(k6,{label:"Color"}),Q(y3,{label:"Theme",children:Q(eT,{value:h.theme??vi,onChange:B=>_({theme:B===vi?null:B}),followLabel:d("Follow the site theme")})}),Q(t7,{shown:b,children:d("The color the bar paints once it is solid \u2014 after any scroll, and on every product page from the first paint. Follow the site theme keeps it on whatever palette the site is on.")}),Q(y3,{label:T0.topTextColor.label,children:Q(Z7,{value:T0.topTextColor.choose(h.top_text_color),options:T0.topTextColor.options,onChange:B=>_({top_text_color:B}),ariaLabel:T0.topTextColor.label})}),Q(t7,{shown:b,children:d("Auto reads what the first section on each page says it is \u2014 dark, light or accent \u2014 and picks the text that can be read on it. Set Light or Dark to decide it yourself when Auto reads a page wrong.")}),Q(k6,{label:"Behavior"}),Q(y3,{label:"Sticky header",children:Q("div",{className:"w-32",children:Q(Qb,{value:h.sticky,ariaLabel:d("Sticky header"),onChange:B=>_({sticky:B}),options:[{label:d("None"),value:"none"},{label:d("Always"),value:"always"},{label:d("On scroll up"),value:"on_scroll_up"}]})})}),n&&K0(De,{children:[Q(k6,{label:"Display mode"}),Q("p",{className:"text-[12px] text-[var(--ink-faint)]",children:d("Set the default Light / Dark / Auto mode and show or hide the light\u2194dark switch in Appearance.")}),Q(Jb,{variant:"link",size:"sm",className:"self-start",onClick:n,children:d("Set up display mode \u2192")})]}),Q(bh,{shown:b,onChange:w})]})]})]}):m?null:Q(N91,{size:"sm",padding:"p-4",label:d("Loading\u2026")})]});return o?K0("div",{className:"flex flex-col",children:[v&&Q("div",{className:"px-4 pt-2 text-[11px] text-[var(--ink-faintest)]",children:d("Saving\u2026")}),r1]}):K0(P91,{open:!0,onClose:a??(()=>{}),side:"right",size:"sm",title:d("Header"),children:[v&&Q("div",{className:"pb-2 text-[11px] text-[var(--ink-faintest)]",children:d("Saving\u2026")}),r1]})}function K91({settings:e,websiteName:t,onPick:a,onClear:s,showHint:o}){let r=!!e.logo_url,i=!r&&!!e.default_logo_url,n=W6(e.effective_logo_url),l=t&&t.trim()?t.trim():G8;return K0("div",{className:"flex flex-col gap-2",children:[Q(R91,{value:n||"",onChange:c=>{c||s()},onPick:a,accept:"image/svg+xml,.svg",acceptHint:"SVG",fit:"contain",height:80,placeholder:d("No logo \u2014 \u201C{name}\u201D wordmark shown",{name:l}),replaceLabel:r?d("Replace SVG logo"):d("Upload SVG logo"),allowRemove:r,removeLabel:d("Use company default")}),Q(t7,{shown:o,children:r?d("Custom SVG logo uploaded for this store."):i?d("Using your company logo from the database."):d("No company logo on file \u2014 upload an SVG or the wordmark is used.")})]})}function Y91({token:e,menuId:t,menuName:a,itemCount:s,onPick:o}){let r=d_(),[i,n]=n9(null),[l,c]=n9(!1),h=e7(f=>{n(f),c(!0)},[]);zi(()=>{let f=!1;return LR(e).then(x=>!f&&h(x)).catch(()=>!f&&n([])),()=>{f=!0}},[e,h]),zi(()=>{let f=!1,x=J8(()=>{AR(e).then(b=>!f&&h(b)).catch(()=>{})});return()=>{f=!0,x()}},[e,h]);let p=i===null,m=!p&&(i?.length??0)===0,u=!p&&(i??[]).some(f=>f.id===t),v=u?t:"",g=l&&!!t&&!u;return K0("div",{className:"flex flex-col gap-2",children:[Q(y3,{label:"Menu",children:Q("div",{className:"w-[170px] max-w-full",children:Q(Qb,{value:v,ariaLabel:d("Menu"),readOnly:p||m,onChange:f=>{let x=f?(i??[]).find(b=>b.id===f):null;o(x?{...x,items:x.items.map(b=>({...b,dropdown_items:(i??[]).find(w=>w.id===b.dropdown_menu)?.items.map(w=>({label:w.label,url:w.url}))??[]}))}:null)},options:[{label:p?d("Loading\u2026"):m?d("No menus"):d("Default links"),value:""},...(i??[]).map(f=>({label:`${f.name} (${f.item_count??f.items.length})`,value:f.id}))]})})}),g?Q("p",{className:"text-[12px] text-[var(--sf-warning,#b45309)]",children:JR()}):Q("p",{className:"text-[12px] text-[var(--ink-faint)]",children:v?v3("Header shows \u201C{name}\u201D \u2014 {n} link.","Header shows \u201C{name}\u201D \u2014 {n} links.",s,{name:a??d("the linked menu")}):m?d("No menus yet. Create one in {place}, then pick it here.",{place:d("Storefront \u2192 Menus")}):d("Pick a menu to drive the header links, or keep the built-in default links.")}),Q(Jb,{variant:"link",size:"sm",className:"self-start",onClick:()=>r.send("storefront-editor:open-menus",{menuId:v||null}),children:v?d("Edit menu \u2192"):d("Manage menus \u2192")})]})}function t7({shown:e,children:t}){return e?Q("p",{className:"text-[11px] text-[var(--sf-muted)]",children:t}):null}function Xb({labelledBy:e,value:t,min:a,max:s,step:o,onPreview:r,onCommit:i}){let n=l=>{l instanceof HTMLInputElement&&l.type==="range"&&i(Number(l.value))};return Q("div",{onPointerUp:l=>n(l.target),onKeyUp:l=>{/^(Arrow|Home|End|Page)/.test(l.key)&&n(l.target)},children:Q(_91,{value:t,min:a,max:s,step:o,showInput:!1,size:"sm","aria-labelledby":e,valueText:l=>d("{n} pixels",{n:l}),onChange:l=>{l!=null&&r(l)}})})}function X91({label:e,value:t,children:a}){return K0("div",{className:"flex flex-col gap-2",children:[K0("div",{className:"flex items-center justify-between",children:[Q("span",{className:"text-xs text-[var(--ink-muted)]",children:d(e)}),t&&Q("span",{className:"text-[12px] text-[var(--ink-faint)]",children:d(t)})]}),a]})}function k6({label:e}){return Q(fa,{label:e})}function y3({label:e,children:t,stacked:a=!1}){return a?K0("div",{className:"flex flex-col gap-y-2",children:[Q("span",{className:"text-xs text-[var(--sf-text-secondary)]",children:d(e)}),t]}):K0("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-2",children:[Q("span",{className:"text-xs text-[var(--sf-text-secondary)]",children:d(e)}),Q("div",{className:"flex flex-shrink-0 grow justify-end",children:t})]})}var J91=[{label:"Left",value:"left"},{label:"Center",value:"center"}],Q91=[{label:"Left",value:"left"},{label:"Right",value:"right"}],ee1=[{label:"Right",value:"left"},{label:"Centered",value:"center"},{label:"Beside logo",value:"beside"}],te1=[{label:"Own row",value:"top"},{label:"Same row",value:"inline"}],ae1=[{label:sa.page,value:"page"},{label:sa.full,value:"full"}],se1=[{label:"Icon",value:"icon"},{label:"Text",value:"text"}],oe1=[{label:"Uppercase",value:"uppercase"},{label:"Capitalised",value:"capitalised"}],re1=[{label:"Auto",value:"auto"},{label:"Light",value:"light"},{label:"Dark",value:"dark"}],T0={logoPosition:{label:"Position",options:J91,choose:e=>e==="right"?"center":e},menuAlign:{label:"Alignment",options:ee1,choose:e=>e==="center"?"center":e==="beside"?"beside":"left"},menuRow:{label:"Row",options:te1,choose:e=>e==="inline"?"inline":"top"},searchPosition:{label:"Position",options:Q91,choose:e=>e},width:{label:"Width",options:ae1,choose:e=>e},navTextCase:{label:"Letters",options:oe1,choose:e=>e==="capitalised"?"capitalised":"uppercase"},utilStyle:{label:"Show as",options:se1,choose:e=>e==="text"?"text":"icon"},topTextColor:{label:"Text color at the top",options:re1,choose:e=>ls(e)}};function ie1({tabs:e,activeId:t,onSelect:a}){return Q("div",{className:"es-insp-tabs",children:Q(I91,{variant:"underline",block:!0,labelsFit:!0,"aria-label":d("Header settings"),idPrefix:ex,value:t,onChange:a,items:e.map(s=>({id:s.id,icon:s.icon,label:d(s.label)}))})})}import{useState as sx}from"react";import{Banner as ne1,Button as ox}from"efficient-shell/ui";import{createNode as le1,newId as ce1}from"efficient-easel/data";import{useEasel as he1}from"efficient-easel/easel";import{useScreenDocument as pe1}from"efficient-easel/screen/components/ScreenDocumentContext";function u_(e){return typeof e=="number"&&Number.isInteger(e)&&e>=V3.min&&e<=V3.max?e:V3.default}var Vp="fixed inset-x-0 bottom-0 top-[var(--sf-header-h,88px)]",Op=e=>!!e&&e.startsWith("/wheels/")&&e!=="/wheels",Bp=(e,t)=>!e&&t?"var(--section-bg)":"var(--bg)",g_=e=>e==="capitalised"?"capitalised":"uppercase",Si=e=>e==="inline"?"inline":e==="top"||e==="bottom"?"top":null;var v_="Flex",f_=10;function b_(e,t,a,{logoHeightPx:s}={}){let o=e.util_style==="text"?"text":"icon",r={...e.menu?{id:e.menu}:{},...e.menu_handle?{handle:e.menu_handle}:{},...e.menu_name?{name:e.menu_name}:{},items:(e.menu_items??[]).map(({label:A,url:P,dropdown_items:E})=>({label:A,url:P,...E?.length?{dropdown_items:E.map(k=>({label:k.label,url:k.url}))}:{}}))},i=e.search_enabled?t("SearchBlock",{style:o}):null,n=e.search_position==="left",l=[n?i:null,e.country_selector_enabled?t("CountrySwitchBlock",{showAs:Q6(e.country_selector_show_as)}):null,t("ThemeSwitchBlock"),e.account_enabled!==!1?t("AccountBlock",{style:o}):null,e.cart_enabled!==!1?t("CartBlock",{style:o}):null,n?null:i].filter(A=>A!==null),c=t("LogoBlock",{...s?{heightPx:s}:{},...e.reverse_logo!=null?{reverse:e.reverse_logo?"auto":"off"}:{}}),h=A=>t("MenuBlock",{menu:r,direction:"row",...A}),p=Si(e.menu_row)==="inline"?32:20,m=A=>t(v_,{direction:"row",justify:"end",align:"center",share:"content",wrap:"nowrap",phoneRow:3,gap:p,content:A}),u=Math.min(Math.max(e.menu_split??3,1),4),v=e.logo_position==="center"&&r.items.length>u,g=e.menu_position==="center"?"center":e.menu_position==="beside"?"start":"end",f=!v&&g==="start"?e.menu_gap_px??32:32,x=v?[h({linkAlign:"start",linkRange:{from:1,to:u}}),c,m([h({linkAlign:"end",linkRange:{from:u+1}}),...l])]:[c,h({linkAlign:g}),...l.length?[m(l)]:[]],b=t(v_,{direction:"row",justify:"between",align:"center",share:"content",wrap:"nowrap",phoneRow:3,sectionPaddingTop:f_,sectionPaddingBottom:f_,gap:f,content:x}),w=wL(l5,a,[b]),S=fi(e.theme),T=Si(e.menu_row);return{...w,props:{...w.props,sticky:e.sticky??"always",topTextColor:e.top_text_color??"auto",...e.height_px!=null?{heightPx:e.height_px}:{},...e.width==="full"?{fullWidth:!0}:{},...S!==null?{sectionAccent:S}:{},...e.nav_text_case?{navTextCase:e.nav_text_case}:{},...T?{menuRow:T}:{}}}}async function ax(e,t,a,s){let o=await Ve(e,t),r=o.logo_size_px??Rr[o.logo_size];return b_(o,a,s,{logoHeightPx:r})}var x_={siteHeader:async({make:e,id:t,siteId:a,token:s})=>s?ax(s,a,e,t):null};import{Fragment as me1,jsx as Dp,jsxs as de1}from"react/jsx-runtime";function rx(){let{appState:e,dispatch:t,config:a}=he1(g=>g),{readOnly:s,tokenRef:o,siteId:r}=pe1(),[i,n]=sx(!1),[l,c]=sx(!1),[h,p]=sx(!1),m=e.data.content;if(s||m.some(g=>g.type===l5))return null;let u=(g,f)=>le1(a,g,f),v=async()=>{let g=o.current;if(!(!g||l)){c(!0),p(!1);try{let f=await ax(g,r,u,ce1(l5));t({type:"setData",data:x=>({...x,content:[...yL(x.content,f)]}),recordHistory:!0}),n(!1)}catch{p(!0)}finally{c(!1)}}};return Dp(ne1,{tone:h?"danger":"info",title:d("This header uses the old layout"),action:i?de1(me1,{children:[Dp(ox,{variant:"primary",size:"sm",onClick:v,disabled:l,children:l?d("Switching\u2026"):d("Switch now")}),Dp(ox,{variant:"secondary",size:"sm",onClick:()=>n(!1),disabled:l,children:d("Cancel")})]}):Dp(ox,{variant:"secondary",size:"sm",onClick:()=>n(!0),children:d("Switch to Box header")}),children:h?d("The header settings could not be read. Try again."):d("Build it out of Boxes and blocks: the logo, menu, search, region and cart become blocks you can move. Your current header is kept.")})}import{Fragment as ge1,jsx as Zp,jsxs as ve1}from"react/jsx-runtime";function ix({placeholderMode:e,tokenRef:t,siteId:a,websiteName:s,onOpenWebsiteSettings:o,onAuthExpired:r}){return ve1(ge1,{children:[Zp(ue1,{rule:ki,values:null,context:{placeholderMode:e},children:Zp("div",{className:"px-4 pt-3 pb-1",children:Zp(rx,{})})}),Zp(tx,{inline:!0,placeholderMode:e,tokenRef:t,siteId:a,websiteName:s??void 0,onOpenWebsiteSettings:o,onAuthExpired:r})]})}import{useEffect as be1,useState as xe1}from"react";import{currentEaselSession as fe1}from"efficient-easel/screen/lib/session";function cs({fetch:e,keyBy:t}){let a=null,s=null,o=null;return(r=!1)=>{let i=K3(),n=t?t():null;return(r||!a||s===null&&i!==null||o!==n)&&(s=i,o=n,a=i||!fe1().usesBridgedToken?e(i??"",n).catch(()=>[]):Promise.resolve([])),a}}var a7=cs({fetch:(e,t)=>F1.listProducts(e,{siteId:t,kinds:["alloy-wheel","tyre"]}),keyBy:B2}),D2=(e=!1)=>a7(e).then(t=>t.filter(a=>a.kind==="alloy-wheel"));function w_(e,t=!0){let[a,s]=xe1(null);return be1(()=>{if(!t)return;let o=!1;return e().then(r=>{o||s(r)}),()=>{o=!0}},[e,t]),t?a:null}function Gp(){return w_(D2)}function Wp(e=!0){return w_(a7,e)}var z_={list:async()=>(await D2()).map(e=>({slug:e.slug,name:e.name,href:Mc(e.slug)}))},y_=new Map;function we1(e){let t=e??"",a=K3(),s=y_.get(t);if(s&&!(s.token===null&&a!==null))return s.promise;let o=a&&e?F1.listFieldUsage(a,e).then(VN).catch(()=>[]):Promise.resolve([]);return y_.set(t,{promise:o,token:a}),o}var k_={load:async e=>{let[t,a]=await Promise.all([a7().catch(()=>[]),we1(e??void 0)]);return ON({catalogue:t,fieldUsage:a,offersCommerce:!0})}};var nx=[{key:"cart",label:"Cart",href:"/?cart=open"},{key:"checkout",label:"Checkout",href:"/checkout"}],ye1=Object.fromEntries(nx.map(e=>[e.key,e]));function S_(e){return ye1[e]}import{jsx as Ci,jsxs as C_}from"react/jsx-runtime";var ze1={cart:C_("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:[Ci("circle",{cx:"9",cy:"20",r:"1.4"}),Ci("circle",{cx:"18",cy:"20",r:"1.4"}),Ci("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:C_("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:[Ci("rect",{x:"2.5",y:"5",width:"19",height:"14",rx:"2"}),Ci("path",{d:"M2.5 9.5h19"})]})},M_={get title(){return d("Shop")},get rows(){return nx.map(e=>({...e,label:d(e.label),icon:ze1[e.key]}))}};import{createEaselSession as wT1}from"efficient-easel/screen/lib/session";import{Inline as Se1,InputNumber as E_}from"efficient-shell/ui";import{SettingsField as Ce1}from"efficient-easel/panel";import{ListIcon as Me1}from"efficient-easel/icons";var ke1=["start","center","end"],A_=e=>ke1.includes(e)?e:null,L_=e=>typeof e=="number"&&Number.isInteger(e)&&e>=1?e:void 0;function Mi(e){if(!e||typeof e!="object")return null;let t=L_(e.from)??1,a=L_(e.to);return a!==void 0&&a<t||t===1&&a===void 0?null:a===void 0?{from:t}:{from:t,to:a}}var T_=(e,t)=>t>=e.from&&(e.to===void 0||t<=e.to);import{jsx as Up,jsxs as Le1}from"react/jsx-runtime";function lx({value:e,onChange:t}){let a=Mi(e),s=a?.from??1,o=a?.to??null,r=(i,n)=>t(Mi({from:i??1,to:n??void 0}));return Up(Ce1,{label:d("Show links"),icon:Up(Me1,{}),changed:a!==null,hint:d("The links this menu shows on a computer. Empty To means to the end."),children:Le1(Se1,{gap:2,wrap:!1,children:[Up(E_,{size:"md",prefix:d("From"),min:1,precision:0,value:s,"aria-label":d("Show links from"),onChange:i=>r(i,o)}),Up(E_,{size:"md",prefix:d("To"),min:1,precision:0,placeholder:d("End"),value:o,"aria-label":d("Show links to"),onChange:i=>r(s,i)})]})})}import{createContext as Ae1,useCallback as Li,useContext as Te1,useEffect as hx,useMemo as Ee1,useRef as He1,useState as l9}from"react";function H_(e,t){return`${(Eh||(typeof window<"u"?window.location.origin:"")).replace(/^http/,"ws")}/ws/chat/?conversation=${e}&token=${encodeURIComponent(t)}`}var cx="/api/chat/public";function P_(e){let t=Ir.getAccess();return t?{token:t}:e?{headers:{"X-Chat-Token":e}}:{}}async function F_(e){let t=Ir.getAccess();return q8(`${cx}/conversations/`,{method:"POST",token:t??void 0,body:JSON.stringify({subject:e.subject??"",body:e.body,guest_name:e.guestName??"",guest_email:e.guestEmail??"",guest_key:e.guestKey??""})})}async function N_(e,t){return q8(`${cx}/conversations/${e}/thread/`,P_(t))}async function R_(e,t,a){return q8(`${cx}/conversations/${e}/thread/`,{method:"POST",body:JSON.stringify({body:a}),...P_(t)})}import{jsx as Ne1}from"react/jsx-runtime";var Pe1="sf:aid",__="sf:chat",I_=Ae1(null);function Fe1(){let e=I3.getItem(__);if(!e)return null;try{return JSON.parse(e)}catch{return null}}function V_({children:e,preview:t=!1}){let[a,s]=l9(!1),[o,r]=l9(null),[i,n]=l9([]),[l,c]=l9(!1),[h,p]=l9(null),[m,u]=l9(0),[v,g]=l9(!1),[f,x]=l9(!1),b=He1(a);b.current=a,hx(()=>{t||(r(Fe1()),TH.restoreSession().then(()=>g(!0)).catch(()=>g(!1)))},[t]);let w=Li(async k=>{try{let L=await N_(k.id,k.token);n(L.messages)}catch{}},[]);hx(()=>{t||o&&w(o)},[t,o,w,v]),hx(()=>{if(t||!o)return;let k=Ir.getAccess()??o.token,L=!1,N=null,R,V=3e3,I=()=>{L||(N=new WebSocket(H_(o.id,k)),N.onmessage=_=>{try{let D=JSON.parse(_.data);D.type==="chat_event"&&D.event==="message"&&(w(o),!b.current&&D.payload?.sender_role==="employee"&&u(G=>G+1))}catch{}},N.onclose=()=>{L||(R=setTimeout(I,V),V=Math.min(V*2,3e4))},N.onerror=()=>N?.close())};return I(),()=>{L=!0,R&&clearTimeout(R),N?.close()}},[t,o,w]);let S=Li(()=>{s(!0),u(0)},[]),T=Li(()=>s(!1),[]),A=Li(()=>s(k=>(k||u(0),!k)),[]),P=Li(async(k,L)=>{let N=k.trim();if(N){if(t){n(R=>[...R,{id:`preview-${R.length}`,sender_role:"customer",sender_name:L?.name||"You",body:N,image_url:null,created_at:""}]),x(!0);return}c(!0),p(null);try{if(o){let R=await R_(o.id,o.token,N);n(V=>[...V,R])}else{let R=I3.getItem(Pe1)||"",V=await F_({body:N,guestName:L?.name,guestEmail:L?.email,guestKey:R}),I={id:V.id,token:V.guest_token};I3.setItem(__,JSON.stringify(I)),r(I),n(V.messages)}}catch{p("Could not send your message. Please try again shortly.")}finally{c(!1)}}},[o,t]),E=Ee1(()=>({isOpen:a,open:S,close:T,toggle:A,messages:i,sending:l,error:h,unread:m,hasConversation:t?f:!!o,isSignedIn:v,send:P}),[a,S,T,A,i,l,h,m,o,v,P,t,f]);return Ne1(I_.Provider,{value:E,children:e})}function O_(){let e=Te1(I_);if(!e)throw new Error("useChat must be used within <ChatProvider>");return e}import{useEffect as Je1,useRef as Qe1,useState as dx}from"react";import{ChatBubbleLeftRightIcon as Re1,ChatBubbleOvalLeftEllipsisIcon as _e1,ChatIcon as Ie1,MegaphoneIcon as Ve1,PhoneIcon as Oe1,SparklesIcon as Be1}from"efficient-shell/icons/efficient-glyphs";import{Fragment as je1,jsx as qp,jsxs as B_}from"react/jsx-runtime";var De1={"chat-bubble-left-right":Re1,"chat-bubble-oval-left-ellipsis":_e1,chat:Ie1,megaphone:Ve1,phone:Oe1,sparkles:Be1};function Ze1(e){let t=ME(e?.launcherColor)||"var(--btn)";return{"--assistant-launcher-bg":t,"--assistant-launcher-ink":t==="var(--btn)"?"var(--btn-ink)":pc(t),"--assistant-launcher-bg-hover":`color-mix(in oklab, ${t} 85%, black)`}}function Ge1(e){return e?.launcherLabel?.trim()??""}function px(e){return CE(e?.launcherPosition)==="left"}var We1={position:"fixed",bottom:16,minWidth:48,height:48,padding:0,display:"flex",alignItems:"center",border:0,borderRadius:9999,cursor:"pointer",background:"var(--assistant-launcher-bg)",color:"var(--assistant-launcher-ink)",boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"},Ue1={width:48,height:48,flex:"none",display:"flex",alignItems:"center",justifyContent:"center"},qe1="[data-chat-launcher-label]{max-width:0;opacity:0;overflow:hidden;white-space:nowrap;font-size:14px;font-weight:500;line-height:1;transition:max-width 120ms ease-out,opacity 120ms ease-out,padding 120ms ease-out}[data-chat-launcher]:hover [data-chat-launcher-label],[data-chat-launcher]:focus-visible [data-chat-launcher-label]{max-width:16em;opacity:1;padding-inline-end:16px}@media (prefers-reduced-motion:reduce){[data-chat-launcher-label]{transition:none}}",$e1=`@media ${_L}{[data-chat-launcher][data-hide-on-phones]{display:none!important}}`;function mx({label:e,onOpen:t,onWarm:a,zIndex:s=1e3,badge:o,look:r}){let i=SE(r?.launcherIcon),n=De1[i],l=Ge1(r),c=px(r),h=r?.showOnPhones===!1,p=(l?qe1:"")+(h?$e1:"");return B_(je1,{children:[p&&qp("style",{children:p}),B_("button",{type:"button","aria-label":e,onClick:t,onPointerEnter:a,onFocus:a,"data-sf-floating":"","data-chat-launcher":"","data-side":c?"left":"right","data-hide-on-phones":h?"":void 0,style:{...Ze1(r),...We1,...c?{left:16}:{right:16},zIndex:s},children:[qp("span",{style:Ue1,children:qp(n,{size:22,"data-icon":i})}),l&&qp("span",{"data-chat-launcher-label":"",children:l}),o]})]})}import{useEffect as Ke1,useState as Ye1}from"react";var D_="(prefers-reduced-motion: reduce)";function Xe1(){return globalThis.window?.matchMedia?.(D_)?.matches??!1}function j7(){return Xe1()?"auto":"smooth"}function Z_(){let[e,t]=Ye1(!1);return Ke1(()=>{let a=globalThis.window?.matchMedia?.(D_);if(!a||(t(a.matches),typeof a.addEventListener!="function"))return;let s=o=>t(o.matches);return a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[]),e}import{jsx as k2,jsxs as K7}from"react/jsx-runtime";var et1="Chat with us",tt1="We usually reply within a few minutes",at1="Hi! Ask us anything \u2014 about a wheel, an order, or fitment. Leave your details and we\u2019ll reply.";function st1({m:e}){if(e.sender_role==="system")return k2("div",{className:"text-center text-[11px] text-fg/50 py-1",children:e.body});let t=e.sender_role==="bot",a=e.sender_role==="employee"||t;return k2("div",{className:`flex ${a?"justify-start":"justify-end"}`,children:K7("div",{className:`max-w-[80%] rounded-2xl px-3 py-2 text-sm ${a?"bg-fg/5 text-fg":"bg-accent text-accent-ink"}`,children:[a&&K7("div",{className:"mb-0.5 flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide text-fg/50",children:[t&&k2("span",{"aria-hidden":"true",children:"\u2726"}),k2("span",{children:t?e.sender_name||"Assistant":e.sender_name||"Support"}),t&&k2("span",{className:"font-normal normal-case tracking-normal",children:"\xB7 automated"})]}),e.body&&k2("p",{className:"whitespace-pre-wrap",children:e.body}),e.image_url&&k2("a",{href:e.image_url,target:"_blank",rel:"noopener noreferrer",children:k2("img",{...j0(e.image_url,{fallbackWidth:640,maxWidth:1280}),sizes:"(max-width: 640px) 80vw, 320px",alt:"Attachment",className:"mt-2 max-h-48 w-auto rounded-lg"})})]})})}function ux({title:e,subtitle:t,greeting:a,look:s}={}){let{isOpen:o,toggle:r,close:i,messages:n,sending:l,error:c,unread:h,hasConversation:p,isSignedIn:m,send:u}=O_(),v=e?.trim()||et1,g=t?.trim()||tt1,f=a?.trim()||at1,[x,b]=dx(""),[w,S]=dx(""),[T,A]=dx(""),P=Qe1(null),E=!m&&!p;Je1(()=>{o&&P.current?.scrollIntoView({behavior:j7(),block:"nearest"})},[n.length,o]);let k=x.trim().length>0&&(!E||w.trim()&&/.+@.+/.test(T)),L=()=>{!k||l||(u(x,E?{name:w.trim(),email:T.trim()}:void 0),b(""))};return o?K7("aside",{role:"dialog","aria-label":"Chat with us","data-sf-floating":"",className:`fixed bottom-5 ${px(s)?"left-5":"right-5"} z-[61] flex h-[min(560px,80vh)] w-[min(380px,calc(100vw-2.5rem))] flex-col overflow-hidden rounded-2xl border border-line bg-bg shadow-[0_20px_60px_rgba(0,0,0,.45)]`,style:{color:"var(--fg)"},children:[K7("div",{className:"flex items-center justify-between border-b border-line px-4 py-3",children:[K7("div",{children:[k2("div",{className:"text-sm font-semibold text-fg",children:v}),k2("div",{className:"text-[11px] text-fg/50",children:g})]}),k2("button",{type:"button",onClick:i,"aria-label":"Close chat",className:"rounded-md p-1 text-fg/60 hover:bg-fg/5",children:k2("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:k2("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),K7("div",{className:"flex-1 space-y-2 overflow-y-auto px-3 py-3",children:[n.length===0&&k2("p",{className:"px-2 py-4 text-center text-sm text-fg/50",children:f}),n.map(N=>k2(st1,{m:N},N.id)),k2("div",{ref:P})]}),K7("div",{className:"border-t border-line p-3",children:[E&&K7("div",{className:"mb-2 grid grid-cols-2 gap-2",children:[k2("input",{value:w,onChange:N=>S(N.target.value),placeholder:"Your name",className:"rounded-lg border border-line bg-transparent px-3 py-2 text-sm outline-none focus:border-accent"}),k2("input",{value:T,onChange:N=>A(N.target.value),type:"email",placeholder:"Email",className:"rounded-lg border border-line bg-transparent px-3 py-2 text-sm outline-none focus:border-accent"})]}),c&&k2("p",{className:"mb-2 text-xs text-red-600",children:c}),K7("div",{className:"flex items-end gap-2",children:[k2("textarea",{value:x,onChange:N=>b(N.target.value),onKeyDown:N=>{N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),L())},rows:1,placeholder:"Type a message\u2026",className:"max-h-28 flex-1 resize-none rounded-lg border border-line bg-transparent px-3 py-2 text-sm outline-none focus:border-accent"}),k2("button",{type:"button",onClick:L,disabled:!k||l,className:"rounded-lg bg-btn px-3 py-2 text-sm font-semibold text-btn-ink disabled:opacity-40",children:l?"\u2026":"Send"})]})]})]}):k2(mx,{label:v2(v),onOpen:r,zIndex:60,look:s,badge:h>0&&k2("span",{className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-red-600 px-1 text-[11px] font-bold text-white",children:h})})}import{jsx as gx,jsxs as rt1}from"react/jsx-runtime";var ot1=`
|
|
4
4
|
.sf-preview-chat-pick [aria-label] { cursor: pointer; }
|
|
@@ -13,7 +13,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
13
13
|
`;function vx(){let{chromePlaceholder:e,themeFromDocument:t}=s3(),{chat:a,selected:s,select:o}=EE();return e||t||!a.enabled?null:rt1("div",{className:"sf-preview-chat-pick","data-selected":s||void 0,onClick:r=>{r.stopPropagation(),o()},children:[gx("style",{children:ot1}),gx(V_,{preview:!0,children:gx(ux,{title:a.title,subtitle:a.subtitle,greeting:a.greeting,look:a})})]})}import{useEffect as Bt1,useRef as Dt1}from"react";function jp(e){if(!e||e.year===null)return null;let{make:t,model:a,year:s,modification:o}=e;return!t||!a||!o?null:{make:t,model:a,year:s,modification:o}}function nt1(e,t){let a=new URLSearchParams({make:t.make,model:t.model,year:String(t.year),modification:t.modification});return`/api/v1/tyres/${encodeURIComponent(e)}/fitment?${a.toString()}`}function $p(e,t=""){return{vehicle:{...e,region:t},status:"unknown",oemSizes:[],variants:[]}}function lt1(e,t){if(typeof t!="object"||t===null)return $p(e);let a=t,s=typeof a.vehicle=="object"&&a.vehicle!==null?a.vehicle:{},o=typeof s.region=="string"?s.region:"",r=a.status;if(r!=="fits"&&r!=="doesNotFit")return $p(e,o);let i=Array.isArray(a.variants)?a.variants.filter(n=>typeof n=="object"&&n!==null&&typeof n.sku=="string"&&typeof n.fits=="boolean"):[];return i.length===0?$p(e,o):{vehicle:{make:typeof s.make=="string"?s.make:e.make,model:typeof s.model=="string"?s.model:e.model,year:typeof s.year=="number"?s.year:e.year,modification:typeof s.modification=="string"?s.modification:e.modification,region:o},status:r,oemSizes:Array.isArray(a.oemSizes)?a.oemSizes.filter(n=>typeof n=="string"):[],variants:i.map(n=>({sku:n.sku,size:typeof n.size=="string"?n.size:"",fits:n.fits}))}}async function G_(e,t){try{let a=await q8(nt1(e,t),{baseUrl:""});return lt1(t,a)}catch{return $p(t)}}function W_(e){if(!e)return[];let t=[];for(let a of[...e.frontTyres,...e.rearTyres]){let s=d5(a);if(!s)continue;let o=w6(s);t.includes(o)||t.push(o)}return t}function U_(e,t){if(t.length===0)return null;for(let a of e){let s=d5(a);if(!s)continue;let o=w6(s);if(t.includes(o))return o}return null}function Ai(e,t){if(!e||e.status==="unknown")return"unknown";let a=e.variants.find(s=>s.sku===t);return a?a.fits?"fits":"doesNotFit":"unknown"}var ct1="/tyres";function hs(e){return e?`${ct1}/${e}`:null}function ps(e){let t=e.lastIndexOf(" ");return t===-1?{lead:"",accent:e}:{lead:e.slice(0,t+1),accent:e.slice(t+1)}}function fx(e,t){return FH({partNumber:e.sku,prices:e.prices},t)}var ht1="Tyre";function Kp(e,t,a,s){return{id:`${e.slug}|${t.sku}|${a.unit}|${a.spares>0?"spare":"no-spare"}`,slug:e.slug,name:ps(e.name),process:e.brand||ht1,positionNo:"01",config:[{label:t.size},{label:Ph(a)}],finishName:"",size:t.size,components:fx(t,a),qty:s,href:hs(e.slug)??void 0,kind:"tyre",sku:t.sku,pack:a}}function Yp(e){return e.kind==="tyre"}function q_(e,t){let a=e.prices?.[t];return typeof a!="number"||!Number.isFinite(a)||a<=0?!1:e.inStock}import{useEffect as pt1,useState as mt1}from"react";var dt1=new Map;function $_(e){let[t,a]=mt1(null);return pt1(()=>{if(!e||t)return;let s=!0;return F0.listCatalog(["tyre"]).then(o=>{s&&a(new Map(o.flatMap(r=>r.kind==="tyre"?[[r.slug,r]]:[])))}).catch(o=>{console.error("[useTyreCatalog] tyre catalog read failed",o)}),()=>{s=!1}},[e,t]),t??dt1}import{useEffect as Xp}from"react";function G4({active:e,onDismiss:t,focusRef:a,lockScroll:s=!0,scopeRef:o}){Xp(()=>{if(!e)return;let r=o?.current?.ownerDocument??document,i=n=>{n.key==="Escape"&&t()};return r.addEventListener("keydown",i),()=>r.removeEventListener("keydown",i)},[e,t,o]),Xp(()=>{if(!e||!s)return;let r=(o?.current?.ownerDocument??document).body,i=r.style.overflow;return r.style.overflow="hidden",()=>{r.style.overflow=i}},[e,s,o]),Xp(()=>{if(!e)return;let r=(o?.current?.ownerDocument??document).documentElement,i=n=>{let l=Number(r.getAttribute(bx)||0)+n;l>0?r.setAttribute(bx,String(l)):r.removeAttribute(bx)};return i(1),()=>i(-1)},[e,o]),Xp(()=>{e&&a?.current?.focus()},[e,a])}var bx="data-sf-overlay";import{jsx as xx,jsxs as ut1}from"react/jsx-runtime";import{useEffect as gt1,useState as j_}from"react";function M0({fallback:e,className:t,src:a,alt:s="",objectPosition:o,objectFit:r="cover",sizes:i="100vw",priority:n=!1,deferFetch:l=!1,showBackground:c=!0,treatment:h}){let[p,m]=j_(!1),[u,v]=j_(!1),g=a||"";gt1(()=>{m(!1),v(!1)},[g]);let f=WM(g),x=f&&!u?j0(g):{src:g},b=!g||p;return ut1("div",{className:`relative h-full w-full overflow-hidden ${t??""}`,children:[xx("div",{className:"absolute inset-0 flex items-center justify-center",style:c?{background:"var(--site-surface)"}:void 0,children:b?e:null}),g&&(f?xx("img",{src:x.src,alt:s,...x.srcSet?{srcSet:x.srcSet,sizes:i}:{},decoding:"async",...l?{loading:"lazy"}:{},className:`absolute inset-0 h-full w-full${h?.className?` ${h.className}`:""}`,style:{display:p?"none":"block",objectFit:r,...o?{objectPosition:o}:{},...h?.style??{}},onError:()=>x.srcSet?v(!0):m(!0)}):xx(ql,{src:g,alt:s,fill:!0,sizes:i,priority:n,...h?.className?{className:h.className}:{},style:{display:p?"none":"block",objectFit:r,...o?{objectPosition:o}:{},...h?.style??{}},onError:()=>m(!0)}))]})}import{useId as kt1}from"react";var vt1=25.4,Ti=400,Qp=152,ft1=58,K_=Qp*Math.cos(ft1*Math.PI/180),bt1=14,xt1=Ti/2,wt1={sectionWidth:225,aspectRatio:60,rimDiameter:17};function X_(e){let t=d5(e);return t?{sectionWidth:t.width,aspectRatio:t.profile,rimDiameter:t.rim}:wt1}function J_(e){let t=e.rimDiameter*vt1/2,a=t+e.sectionWidth*e.aspectRatio/100,s=Qp*(e.sectionWidth/a),o=t/a;return{cy:xt1,rx:K_,ry:Qp,cxf:Ti/2-s/2-bt1,dx:s,rimRx:K_*o,rimRy:Qp*o}}var E0=e=>e.toFixed(1);function em(e,t,a,s=!1){let o=e.cxf+t*e.dx,[r,i]=s?[e.cy+e.ry,e.cy-e.ry]:[e.cy-e.ry,e.cy+e.ry];return`M${E0(o)} ${E0(r)} A${E0(e.rx)} ${E0(e.ry)} 0 0 ${a} ${E0(o)} ${E0(i)}`}function wx(e,t,a){let s=e.cxf+t*e.dx,o=e.cxf+a*e.dx,r=e.cy-e.ry,i=e.cy+e.ry;return`M${E0(s)} ${E0(r)} L${E0(o)} ${E0(r)} A${E0(e.rx)} ${E0(e.ry)} 0 0 1 ${E0(o)} ${E0(i)} L${E0(s)} ${E0(i)} A${E0(e.rx)} ${E0(e.ry)} 0 0 0 ${E0(s)} ${E0(r)} Z`}function Jp(e,t,a){let s=a*Math.PI;return[e.cxf+t*e.dx+e.rx*Math.sin(s),e.cy-e.ry*Math.cos(s)]}function Q_(e,t,a,s,o){let[r,i]=Jp(e,t,s),[n,l]=Jp(e,t,o),[c,h]=Jp(e,a,o),[p,m]=Jp(e,a,s);return`M${E0(r)} ${E0(i)} A${E0(e.rx)} ${E0(e.ry)} 0 0 1 ${E0(n)} ${E0(l)} L${E0(c)} ${E0(h)} A${E0(e.rx)} ${E0(e.ry)} 0 0 0 ${E0(p)} ${E0(m)} L${E0(r)} ${E0(i)} Z`}var Y_=[{f:[0,.215]},{f:[.245,.485]},{f:[.515,.755]},{f:[.785,1]}],yt1={COM:[{f:[0,.115]},{f:[.145,.26]},{f:[.29,.405]},{f:[.435,.55]},{f:[.58,.695]},{f:[.725,.84]},{f:[.87,1]}],P:[{f:[0,.17],blocks:{count:9,gap:.34}},{f:[.2,.38]},{f:[.42,.58]},{f:[.62,.8]},{f:[.83,1],blocks:{count:9,gap:.34,phase:.5}}],HP:[{f:[0,.3]},{f:[.34,.52]},{f:[.56,.7]},{f:[.74,1],blocks:{count:16,gap:.18}}],UHP:[{f:[0,.34]},{f:[.4,.56]},{f:[.62,1]}],SUV:[{f:[0,.16],blocks:{count:7,gap:.4}},{f:[.2,.36],blocks:{count:11,gap:.26,phase:.5}},{f:[.4,.6]},{f:[.64,.8],blocks:{count:11,gap:.26,phase:.5}},{f:[.84,1],blocks:{count:7,gap:.4}}],LT:[{f:[0,.22],blocks:{count:11,gap:.26}},{f:[.26,.48],blocks:{count:11,gap:.26,phase:.5}},{f:[.52,.74],blocks:{count:11,gap:.26}},{f:[.78,1],blocks:{count:11,gap:.26,phase:.5}}],AT:[{f:[0,.23],blocks:{count:6,gap:.46}},{f:[.29,.5],blocks:{count:6,gap:.46,phase:.5}},{f:[.56,.77],blocks:{count:6,gap:.46}},{f:[.83,1],blocks:{count:6,gap:.46,phase:.5}}],MT:[{f:[0,.29],blocks:{count:4,gap:.58}},{f:[.36,.64],blocks:{count:4,gap:.58,phase:.5}},{f:[.71,1],blocks:{count:4,gap:.58}}]},zt1=[["ultra high performance","UHP"],["uhp","UHP"],["high performance","HP"],["hp","HP"],["performance","HP"],["sport","HP"],["mud terrain","MT"],["mud","MT"],["mt","MT"],["all terrain","AT"],["at","AT"],["light truck","LT"],["lt","LT"],["commercial","COM"],["com","COM"],["van","COM"],["cargo","COM"],["suv","SUV"],["4x4","SUV"],["crossover","SUV"],["cuv","SUV"],["passenger","P"],["touring","P"],["highway","P"],["p","P"]];function eI(e){let t=` ${(e??"").toLowerCase().replace(/[^a-z0-9]+/g," ").trim()} `;if(t.trim()==="")return Y_;for(let[a,s]of zt1)if(t.includes(` ${a} `))return yt1[s];return Y_}var tm="Illustrations are drawn to each tyre's listed size and represent its category; supplier photography replaces them where available.";import{Fragment as Ei,jsx as y0,jsxs as s7}from"react/jsx-runtime";var v5={rib:.2,grooveWall:.16,shoulder:.22,silhouette:.26,relief:[.26,.15,.11],lettering:.1,dishFill:.06,dishEdge:.3,spoke:.3,hubFill:.16,hubEdge:.34},St1=[.8,.52,.24],tI=.4,aI=.88,sI=.3,oI=5,rI=.3,iI=.84,Ct1=7,V0=e=>Math.round(e*10)/10;function yx({size:e,type:t,className:a}){let s=kt1().replace(/[^a-zA-Z0-9]/g,""),o={tread:`${s}-tread`,wall:`${s}-wall`,rim:`${s}-rim`,shadow:`${s}-shadow`,crown:`${s}-crown`},r=J_(X_(e)),i=wx(r,0,1),n=e?`${e} tyre illustration`:"Tyre illustration";return s7("svg",{"data-tyre-placeholder":"",viewBox:`0 0 ${Ti} ${Ti}`,role:"img","aria-label":n,fill:"none",className:a??"block h-full w-full",children:[y0("title",{children:n}),s7("defs",{children:[y0(Lt1,{id:o}),y0("clipPath",{id:o.crown,children:y0("path",{d:i})})]}),y0("ellipse",{cx:V0(r.cxf+r.dx/2),cy:V0(r.cy+r.ry-4),rx:V0(r.dx*1.5),ry:16,fill:`url(#${o.shadow})`}),y0(At1,{g:r,id:o}),y0(Tt1,{g:r,id:o}),y0("path",{d:i,fill:`url(#${o.tread})`}),y0("g",{clipPath:`url(#${o.crown})`,children:eI(t).map(l=>y0(Mt1,{g:r,column:l},l.f[0]))}),y0("path",{d:em(r,0,0,!0),stroke:"currentColor",strokeOpacity:v5.shoulder,strokeWidth:1.2}),y0("path",{d:em(r,1,1),stroke:"currentColor",strokeOpacity:v5.silhouette,strokeWidth:1.4})]})}function Mt1({g:e,column:t}){let[a,s]=t.f;if(!t.blocks)return s7(Ei,{children:[y0("path",{d:wx(e,a,s),fill:"currentColor",fillOpacity:v5.rib}),y0("path",{d:em(e,a,1),stroke:"currentColor",strokeOpacity:v5.grooveWall,strokeWidth:1})]});let{count:o,gap:r,phase:i=0}=t.blocks,n=1/o,l=[];for(let c=-1;c<=o;c+=1){let h=Math.max((c+i+r/2)*n,0),p=Math.min((c+i+1-r/2)*n,1);p-h>n*.15&&l.push([h,p])}return y0(Ei,{children:l.map(([c,h])=>y0("path",{d:Q_(e,a,s,c,h),fill:"currentColor",fillOpacity:v5.rib,stroke:"currentColor",strokeOpacity:v5.grooveWall,strokeWidth:1},c))})}function Lt1({id:e}){return s7(Ei,{children:[s7("linearGradient",{id:e.tread,x1:"0",y1:"0",x2:"1",y2:"0",children:[y0("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.07}),y0("stop",{offset:"0.14",stopColor:"currentColor",stopOpacity:.24}),y0("stop",{offset:"0.45",stopColor:"currentColor",stopOpacity:.18}),y0("stop",{offset:"0.84",stopColor:"currentColor",stopOpacity:.1}),y0("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.05})]}),s7("linearGradient",{id:e.wall,x1:"0.15",y1:"0",x2:"0.9",y2:"1",children:[y0("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.28}),y0("stop",{offset:"0.45",stopColor:"currentColor",stopOpacity:.17}),y0("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.08})]}),s7("linearGradient",{id:e.rim,x1:"0.1",y1:"0",x2:"0.9",y2:"1",children:[y0("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.46}),y0("stop",{offset:"0.5",stopColor:"currentColor",stopOpacity:.26}),y0("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.12})]}),s7("radialGradient",{id:e.shadow,children:[y0("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.22}),y0("stop",{offset:"1",stopColor:"currentColor",stopOpacity:0})]})]})}function At1({g:e,id:t}){let a=e.rimRy/e.ry,s=r=>a+(1-a)*r,o=Math.max(6,(e.ry-e.rimRy)*.3);return s7(Ei,{children:[y0("ellipse",{cx:V0(e.cxf),cy:V0(e.cy),rx:V0(e.rx),ry:V0(e.ry),fill:`url(#${t.wall})`}),St1.map((r,i)=>{let n=s(r);return y0("ellipse",{cx:V0(e.cxf),cy:V0(e.cy),rx:V0(e.rx*n),ry:V0(e.ry*n),stroke:"currentColor",strokeOpacity:v5.relief[i],strokeWidth:1},r)}),y0("ellipse",{cx:V0(e.cxf),cy:V0(e.cy),rx:V0(e.rx*s(tI)),ry:V0(e.ry*s(tI)),stroke:"currentColor",strokeOpacity:v5.lettering,strokeWidth:V0(o)})]})}function Tt1({g:e,id:t}){let a=Array.from({length:oI},(s,o)=>{let r=(o*(360/oI)-90)*Math.PI/180;return{x1:e.cxf+e.rimRx*rI*Math.cos(r),y1:e.cy+e.rimRy*rI*Math.sin(r),x2:e.cxf+e.rimRx*iI*Math.cos(r),y2:e.cy+e.rimRy*iI*Math.sin(r)}});return s7(Ei,{children:[y0("ellipse",{cx:V0(e.cxf),cy:V0(e.cy),rx:V0(e.rimRx),ry:V0(e.rimRy),fill:`url(#${t.rim})`}),y0("ellipse",{cx:V0(e.cxf),cy:V0(e.cy),rx:V0(e.rimRx*aI),ry:V0(e.rimRy*aI),fill:"currentColor",fillOpacity:v5.dishFill,stroke:"currentColor",strokeOpacity:v5.dishEdge,strokeWidth:1}),a.map((s,o)=>y0("line",{x1:V0(s.x1),y1:V0(s.y1),x2:V0(s.x2),y2:V0(s.y2),stroke:"currentColor",strokeOpacity:v5.spoke,strokeWidth:Ct1,strokeLinecap:"round"},o)),y0("ellipse",{cx:V0(e.cxf),cy:V0(e.cy),rx:V0(e.rimRx*sI),ry:V0(e.rimRy*sI),fill:"currentColor",fillOpacity:v5.hubFill,stroke:"currentColor",strokeOpacity:v5.hubEdge,strokeWidth:1})]})}import{jsx as zx}from"react/jsx-runtime";function Y7({image:e,size:t,type:a,sizes:s,priority:o=!1,className:r="aspect-square",showBackground:i=!0}){return zx("div",{className:`text-fg ${r}`,style:{padding:"var(--sf-tyre-image-inset, 0)"},children:zx(M0,{label:t||"Tyre",src:i5(e??void 0),alt:t?`${t} tyre`:"Tyre",objectFit:"contain",sizes:s,priority:o,showBackground:i,fallback:zx(yx,{size:t,type:a,className:"block h-full w-full p-3"})})})}import{jsx as Hi}from"react/jsx-runtime";function Et1(e){let t=e?.tyreTypes??[];return t.length===1?t[0]:null}function kx({line:e,catalog:t,tyre:a}){let s=t.find(h=>h.slug===e.slug),o=e.config.find(h=>h.gold)?.label,r=s?.finishes.find(h=>h.name===o&&h.src)??s?.finishes.find(h=>h.src),i=s?.spokes??5,n=s?.mesh??!1,c=(s?.finishes.find(h=>h.name===o)??s?.finishes[0])?.color??$H;return Hi("div",{className:"relative flex aspect-square items-center justify-center overflow-hidden border border-line bg-surface",children:Yp(e)?Hi(Y7,{image:a?.coverImage,size:e.size,type:Et1(a),sizes:"96px",className:"h-full w-full"}):r?.src?Hi(E4,{src:r.src,alt:`${s?.name??e.slug} \u2014 ${r.name}`,width:120,height:120,sizes:"96px",className:"relative z-[2] block w-[88%] object-contain",style:{filter:"drop-shadow(0 6px 12px rgba(0,0,0,0.25))"}}):s||t.length===0?Hi("div",{className:"relative z-[2] block w-[72%]",style:{color:c,filter:"drop-shadow(0 6px 12px rgba(0,0,0,0.25))"},children:Hi(Me,{spokes:i,mesh:n,className:"block w-full"})}):null})}import{jsx as Sx,jsxs as Pt1}from"react/jsx-runtime";var nI={labelSmall:"text-[length:var(--size-label,15px)]",labelLarge:"text-[length:var(--size-label,16px)]"};function lI(e,t){return Math.min(ff,Math.max(1,e+t))}var cI="disabled:cursor-not-allowed disabled:opacity-40",Ht1={large:{frame:"flex items-center border-2 border-fg-dim/50",button:`h-12 w-12 cursor-pointer bg-transparent font-mono ${nI.labelLarge} font-bold text-fg transition-colors enabled:hover:bg-surface enabled:hover:text-accent ${cI}`,value:`w-11 text-center font-mono ${nI.labelSmall} font-bold tracking-[0.1em] text-fg`},small:{frame:"flex items-center border border-line",button:`h-[30px] w-[30px] cursor-pointer font-mono text-fg-dim transition-colors enabled:hover:text-accent ${cI}`,value:"min-w-[36px] px-3 text-center font-mono text-[12px] tracking-[0.18em] text-fg"}};function Pi({value:e,onChange:t,size:a}){let s=Ht1[a];return Pt1("div",{className:s.frame,children:[Sx("button",{type:"button",onClick:()=>t(lI(e,-1)),disabled:e<=1,"aria-label":"Decrease quantity",className:s.button,children:"\u2212"}),Sx("span",{className:s.value,children:e}),Sx("button",{type:"button",onClick:()=>t(lI(e,1)),disabled:e>=ff,"aria-label":"Increase quantity",className:s.button,children:"+"})]})}import{jsx as Cx,Fragment as Ft1}from"react/jsx-runtime";function hI({className:e=""}){return Cx("sup",{className:`text-accent tracking-normal text-[length:min(1em,max(0.75em,11px))] ${e}`,children:"\xAE"})}function v0(e){if(!e.includes("\xAE"))return e;let t=e.split("\xAE"),a=[];return t.forEach((s,o)=>{s&&a.push(s),o<t.length-1&&a.push(Cx(hI,{},`r${o}`))}),Cx(Ft1,{children:a})}var X7=hI;import{Fragment as o7,jsx as I1,jsxs as H0}from"react/jsx-runtime";function pI({content:e,closeRef:t}){let{close:a,items:s}=i3(),o=t;return H0("header",{className:"flex flex-shrink-0 flex-col gap-4 border-b border-line px-8 pb-6 pt-8 max-[640px]:px-6 max-[640px]:pt-6 max-[640px]:pb-5",children:[H0("div",{className:"flex items-center justify-between",children:[H0("span",{className:"flex items-center gap-3 font-mono text-[10px] uppercase tracking-[0.3em] text-accent",children:[e.kickerBadge?I1("span",{className:"border px-2 py-1 text-[10px]",style:{background:"color-mix(in oklab, var(--accent) 12%, transparent)",borderColor:"color-mix(in oklab, var(--accent) 50%, transparent)"},children:e.kickerBadge}):null,(e.kickerBadge?"\xB7 ":"")+e.kickerText]}),I1("button",{ref:o,type:"button",onClick:a,"aria-label":"Close cart",className:"flex h-8 w-8 items-center justify-center border border-line text-[14px] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"\u2715"})]}),H0("h1",{className:"font-display text-[38px] font-medium uppercase leading-[0.95] tracking-[-0.03em] max-[640px]:text-[30px]",children:[e.titleLead+" ",I1("em",{className:"font-serif font-normal italic text-accent tracking-[-0.02em] normal-case",children:e.titleAccent})]}),I1("p",{className:"font-serif text-[13px] italic leading-[1.5] text-fg-dim",children:hT(e,s.length)})]})}function mI({content:e}){let{totals:t}=i3(),{activeCountry:a}=C0(),s=a?.name??e.shipsToFallback,o=1+(e.leadTimeValue?1:0)+(s?1:0);return I1(o7,{children:H0("div",{className:`grid flex-shrink-0 ${Nt1[o-1]} gap-px border-b border-line bg-line`,children:[I1(Mx,{label:"Items",value:H0(o7,{children:[I1("em",{className:"font-serif font-normal italic text-accent",children:t.sets})," set",t.sets===1?"":"s"," \xB7 ",t.units," item",t.units===1?"":"s"]})}),e.leadTimeValue?I1(Mx,{label:"Lead time",value:e.leadTimeValue}):null,s?I1(Mx,{label:"Ships to",value:s}):null]})})}function dI({content:e,tyres:t}){let{items:a,remove:s,setQty:o}=i3();return I1(o7,{children:a.length===0?I1(Ot1,{content:e}):a.map(r=>I1(Rt1,{line:r,tyre:t.get(r.slug),onRemove:()=>s(r.id),onQtyChange:i=>o(r.id,i)},r.id))})}function uI(){let{items:e,totals:t,bundles:a}=i3(),{formatMoney:s}=C0(),o=new Set(e.flatMap(n=>(n.components??[]).map(l=>l.partNumber))),r=new Set(t.appliedBundles.map(n=>n.slug)),i=a.filter(n=>!r.has(n.slug)).filter(n=>n.components.some(l=>o.has(l.partNumber))).slice(0,2);return I1(o7,{children:i.length>0&&H0("section",{className:"border-b border-line px-8 py-6 max-[640px]:px-6",style:{background:"color-mix(in oklab, var(--site-surface) 60%, transparent)"},children:[H0("div",{className:"mb-4 flex items-center justify-between font-mono text-[10px] uppercase tracking-[0.3em] text-accent",children:[I1("span",{children:"You may also need"}),I1("span",{className:"font-display text-[11px] normal-case tracking-[0.08em] text-fg-dim",children:"Buy together, save"})]}),I1("div",{className:"grid grid-cols-2 gap-2 max-[640px]:grid-cols-1",children:i.map(n=>I1(_t1,{href:`/bundles/${n.slug}`,title:n.name,sub:It1(n,t.currency,s)},n.slug))})]})})}function gI(){return I1(o7,{children:I1("section",{className:"border-b border-line px-8 py-6 max-[640px]:px-6",children:I1(XH,{})})})}function vI({content:e}){return I1(o7,{children:e.promises.length>0&&I1("div",{className:"flex flex-wrap justify-center gap-5 border-b border-line px-8 pt-6 pb-8 font-mono text-[9px] uppercase tracking-[0.24em] text-fg-dim max-[640px]:px-6",children:e.promises.map(t=>I1(Vt1,{children:t},t))})})}function fI(){let{totals:e,coupon:t}=i3(),{formatMoney:a}=C0();return I1(o7,{children:H0("div",{className:"flex flex-shrink-0 flex-col gap-2 border-t border-line px-8 pt-5 max-[640px]:px-6",children:[I1(c9,{label:`Subtotal \xB7 ${e.sets} set${e.sets===1?"":"s"}`,value:a(e.subtotal,e.currency)}),e.appliedBundles.map(s=>I1(c9,{label:`Bundle \xB7 ${s.name}${s.multiples>1?` \xD7${s.multiples}`:""}`,value:H0("span",{style:{color:"var(--green)"},children:["\u2212 ",a(s.discount,e.currency)]})},s.slug)),e.discount>0&&t?.valid&&I1(c9,{label:`Coupon \xB7 ${t.code}`,value:H0("span",{style:{color:"var(--green)"},children:["\u2212 ",a(e.discount,e.currency)]})}),t?.deferred&&I1(c9,{label:`Coupon \xB7 ${t.code}`,value:HH}),t?.valid&&t.effects?.gift&&I1(c9,{label:`Free gift \xB7 ${t.effects.gift.partNumber}${t.effects.gift.quantity>1?` \xD7${t.effects.gift.quantity}`:""}`,value:I1("span",{style:{color:"var(--green)"},children:Ce})}),I1(c9,{label:"Shipping",value:e.shippingStatus==="free"?I1("span",{style:{color:"var(--green)"},children:Ce}):UH(e.shippingStatus)??a(e.shipping,e.currency)}),e.tax&&(e.tax.charged?I1(c9,{label:e.tax.inclusive?`${e.tax.name} included \xB7 ${e.tax.rate}%`:e.tax.name,value:a(e.tax.amount,e.currency)}):e.tax.name?I1(c9,{label:e.tax.name,value:WH}):null),H0("div",{className:"mt-2 flex items-center justify-between border-t border-line pt-4 text-fg",children:[H0("span",{className:"font-display text-[22px] font-medium tracking-[-0.02em] normal-case",children:["Total ",I1("em",{className:"font-serif font-normal italic text-accent",children:"due"})]}),I1("span",{className:"text-right font-display text-[30px] font-medium tracking-[-0.025em] text-fg",children:e.repricing?"\u2026":a(e.grand,e.currency)})]})]})})}function bI(){let{items:e,close:t}=i3();return I1(o7,{children:H0("div",{className:"flex flex-shrink-0 flex-col gap-3 px-8 pb-6 pt-4 max-[640px]:px-6",children:[H0(V1,{href:"/checkout",onClick:t,"aria-disabled":e.length===0,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[12px] uppercase tracking-[0.3em] transition-colors",e.length===0?"pointer-events-none cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:["Begin checkout",I1("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]}),I1("div",{className:"flex items-center justify-between px-1 py-2 font-mono text-[10px] uppercase tracking-[0.24em] text-fg-dim",children:I1(V1,{href:"/wheels",onClick:t,className:"text-fg transition-colors hover:text-accent",children:"\u2190 Keep browsing"})})]})})}var Nt1=["grid-cols-1","grid-cols-2","grid-cols-3"];function Mx({label:e,value:t}){return H0("div",{className:"flex flex-col gap-1 bg-bg px-4 py-4",children:[I1("span",{className:"font-mono text-[9px] uppercase tracking-[0.26em] text-fg-dim",children:e}),I1("span",{className:"font-display text-[14px] font-medium tracking-[-0.005em] text-fg",children:t})]})}function Rt1({line:e,tyre:t,onRemove:a,onQtyChange:s}){let{catalog:o,totals:r}=i3(),i=(e.components??[]).reduce((c,h)=>c+(r.freeUnitsByPartNumber[h.partNumber]??0),0),{currency:n,formatMoney:l}=C0();return H0(o7,{children:[H0("article",{className:"grid grid-cols-[96px_1fr] gap-5 border-b border-line px-8 py-6 transition-colors hover:bg-[color-mix(in_oklab,var(--site-surface)_60%,transparent)] max-[640px]:grid-cols-[78px_1fr] max-[640px]:px-6 max-[640px]:py-5",children:[I1(kx,{line:e,catalog:o,tyre:t}),H0("div",{className:"flex min-w-0 flex-col gap-2",children:[H0("div",{className:"flex items-start justify-between gap-3",children:[H0("span",{className:"font-mono text-[9px] uppercase tracking-[0.26em] text-accent",children:["N\xB0 ",e.positionNo," \xB7 ",e.process==="FusionForge\xAE"?H0(o7,{children:["FusionForge",I1(X7,{})]}):e.process]}),I1("span",{className:"whitespace-nowrap font-display text-[16px] font-medium tracking-[-0.015em] text-fg",children:wf(e,n)===null?j8:l(wf(e,n),n)})]}),H0("h3",{className:"mt-0.5 font-display text-[22px] font-medium uppercase leading-none tracking-[-0.02em]",children:[e.name.lead,I1("em",{className:"font-serif font-normal italic text-accent tracking-[-0.01em] normal-case",children:e.name.accent})]}),e.config.length>0&&H0("div",{className:"mt-1 flex flex-wrap gap-2",children:[e.config.map(c=>I1("span",{className:["border px-2 py-1 font-mono text-[9px] uppercase tracking-[0.18em]",c.gold?"border-[color-mix(in_oklab,var(--accent)_45%,var(--site-line))] text-accent":"border-line text-fg-dim"].join(" "),children:c.label},c.label)),i>0&&H0("span",{className:"border border-accent bg-accent px-2 py-1 font-mono text-[9px] uppercase tracking-[0.18em] text-bg",children:[i,"\xD7 free"]})]}),H0("div",{className:"mt-3 flex items-center justify-between gap-3",children:[I1(Pi,{value:e.qty,onChange:s,size:"small"}),H0("div",{className:"flex gap-4 font-mono text-[10px] uppercase tracking-[0.22em]",children:[I1(V1,{href:e.href??`/wheels/${e.slug}`,className:"text-fg-dim transition-colors hover:text-accent",children:e.href?"View product":"Edit finish"}),I1("button",{type:"button",onClick:a,className:"text-fg-dim transition-colors hover:text-alert",children:"Remove"})]})]})]})]}),e.verifiedFor&&H0("div",{className:"mx-8 -mt-px flex items-start gap-3 border-t-0 px-4 py-4 font-display text-[13px] leading-[1.45] text-fg max-[640px]:mx-6",style:{background:"color-mix(in oklab, var(--accent) 8%, transparent)",border:"1px solid color-mix(in oklab, var(--accent) 35%, var(--site-line))",borderTop:"0"},children:[I1("span",{className:"flex-shrink-0 pt-px font-mono text-[10px] uppercase tracking-[0.24em] text-accent",children:"Fits"}),H0("span",{children:["Verified for your ",I1("strong",{className:"font-medium text-accent",children:e.verifiedFor}),". Final torque values shipped with the wheels."]})]})]})}function _t1({title:e,sub:t,href:a}){return H0(V1,{href:a,className:"flex items-center justify-between border border-line bg-bg px-4 py-3 text-left transition-colors hover:border-accent",children:[H0("span",{className:"flex min-w-0 flex-col gap-1",children:[I1("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap font-display text-[13px] font-medium tracking-[-0.005em] text-fg",children:e}),I1("span",{className:"font-mono text-[9px] uppercase tracking-[0.22em] text-fg-dim",children:t})]}),I1("span",{className:"ml-2 flex h-6 w-6 flex-shrink-0 items-center justify-center font-mono text-[13px] text-accent",style:{borderColor:"color-mix(in oklab, var(--accent) 45%, var(--site-line))",borderWidth:1,borderStyle:"solid"},children:"+"})]})}function It1(e,t,a){let s=e.savings[t];if(s===void 0)return"Buy together";let o=a(s,t);return e.savingIsFrom?`Save from ${o}`:`Save ${o}`}function Vt1({children:e}){return I1("span",{className:"inline-flex items-center gap-2 before:text-[6px] before:text-accent before:content-['\u25CF']",children:e})}function c9({label:e,value:t}){return H0("div",{className:"flex items-center justify-between font-mono text-[11px] uppercase tracking-[0.18em] text-fg-dim",children:[I1("span",{children:e}),I1("strong",{className:"font-display text-[14px] font-normal tracking-[-0.005em] normal-case text-fg",children:t})]})}function Ot1({content:e}){return H0("div",{className:"flex flex-col items-center justify-center gap-3 px-8 py-20 text-center",children:[I1("span",{className:"font-mono text-[10px] uppercase tracking-[0.3em] text-accent",children:e.emptyKicker}),I1("p",{className:"font-serif text-[16px] italic leading-[1.5] text-fg-dim",children:e.emptyBody}),H0(V1,{href:"/wheels",className:"mt-3 inline-flex items-center gap-3 border border-line px-5 py-3 font-mono text-[11px] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:["Browse the catalog ",I1("span",{className:"text-accent",children:"\u2192"})]})]})}import{Fragment as Zt1,jsx as r7,jsxs as Lx}from"react/jsx-runtime";function Fi({content:e=Oc}){let{isOpen:t,preview:a,close:s,items:o}=i3(),r=Dt1(null),i=$_(o.some(Yp));return G4({active:t,onDismiss:s,lockScroll:!a}),Bt1(()=>{t&&r.current?.focus({preventScroll:!0})},[t]),t?Lx(Zt1,{children:[r7("div",{onClick:s,className:"fixed inset-0 z-[60] backdrop-blur-[4px]",style:{background:"rgba(0,0,0,0.68)",animation:"storefront-cart-fade 350ms ease both"},"aria-hidden":"true"}),Lx("aside",{role:"dialog","aria-label":"Your cart","aria-modal":"true",className:"fixed inset-y-0 right-0 z-[61] flex w-[520px] max-w-[100vw] flex-col border-l border-line bg-bg max-[640px]:w-screen max-[640px]:border-l-0",style:{animation:"storefront-cart-slide 450ms cubic-bezier(.2,.7,.2,1) both",boxShadow:"-30px 0 80px rgba(0,0,0,.5)"},onClick:n=>n.stopPropagation(),children:[r7("style",{children:`
|
|
14
14
|
@keyframes storefront-cart-fade { from { opacity: 0 } to { opacity: 1 } }
|
|
15
15
|
@keyframes storefront-cart-slide { from { transform: translateX(40px); opacity: 0 } to { transform: translateX(0); opacity: 1 } }
|
|
16
|
-
`}),r7(pI,{content:e,closeRef:r}),r7(mI,{content:e}),Lx("div",{className:"flex-1 overflow-y-auto [scrollbar-color:var(--site-line)_transparent] [scrollbar-width:thin]",children:[r7(dI,{content:e,tyres:i}),r7(uI,{}),r7(gI,{}),r7(vI,{content:e})]}),r7(fI,{}),r7(bI,{})]})]}):null}import Gt1 from"efficient-easel/screen/components/UiIcon";import{Fragment as Ut1,jsx as Ze,jsxs as am}from"react/jsx-runtime";var Wt1=rs(()=>import("./chunks/EditorPreviewCheckout-HAUEGHGC.js"),{ssr:!1});function Ax(){let{chromePlaceholder:e,themeFromDocument:t}=s3(),{surface:a}=RE();return e||t||!a||a!=="cart"&&a!=="checkout"?null:a==="checkout"?am(Ut1,{children:[Ze(Wt1,{}),Ze(xI,{surface:a})]}):Ze(Y8,{children:am(_a,{preview:!0,children:[Ze(Fi,{}),Ze(xI,{surface:a})]})})}function xI({surface:e}){let{label:t,href:a}=S_(e);return am("div",{style:{position:"fixed",bottom:14,left:"50%",transform:"translateX(-50%)",zIndex:2147483e3,display:"flex",alignItems:"center",gap:8,maxWidth:"calc(100% - 24px)",padding:"5px 6px 5px 13px",borderRadius:999,fontSize:12,fontWeight:600,fontFamily:"system-ui, sans-serif",color:"#334155",background:"rgba(255,255,255,0.94)",border:"1px solid rgba(15,23,42,0.12)",boxShadow:"0 6px 24px rgba(15,23,42,0.18)",pointerEvents:"none"},children:[Ze("span",{style:{whiteSpace:"nowrap"},children:d("{name} \xB7 preview only",{name:d(t)})}),am("a",{href:a,target:"_blank",rel:"noopener noreferrer",style:{pointerEvents:"auto",flex:"none",display:"inline-flex",alignItems:"center",gap:5,padding:"4px 11px",borderRadius:999,color:"#fff",background:"#2563eb",textDecoration:"none"},children:[d("Open live"),Ze(Gt1,{name:"external-link",size:13,rounded:!0})]})]})}import{PictureTiles as qt1}from"efficient-shell/ui";import{SettingsField as $t1}from"efficient-easel/panel";import{GridIcon as jt1}from"efficient-easel/icons";import{jsx as Ge}from"react/jsx-runtime";function Kt1({layout:e}){return Ge("span",{"aria-hidden":!0,className:"relative block h-9 w-13 rounded-xs border border-current",children:e==="bar"?Ge("span",{className:"absolute inset-x-0 bottom-0 h-2 bg-current opacity-50"}):Ge("span",{className:"absolute bottom-1 left-1 h-3 w-5 rounded-xs bg-current opacity-50"})})}var wI={type:"custom",render:({value:e,onChange:t})=>{let a=Bc({layout:e}).layout,s=Wv.find(o=>o.value===a);return Ge($t1,{label:d(Uv),icon:Ge(jt1,{}),value:s?d(s.label):void 0,children:Ge(qt1,{className:"sf-gallery-layouts",label:d(Uv),value:a,onChange:t,options:Wv.map(o=>({value:o.value,label:d(o.label),picture:Ge(Kt1,{layout:o.value})}))})})}};import{AlignLeftIcon as qA1,CategoryIcon as $A1,CheckIcon as d41,ClockIcon as yM,ColumnsIcon as jA1,DirectionIcon as KA1,EyeIcon as YA1,ListIcon as XA1,PageIcon as JA1,PlacementIcon as QA1,ScrollPointIcon as eT1,TriggerIcon as tT1}from"efficient-easel/icons";import{useContext as Xt1,useEffect as zI,useRef as om,useState as rm}from"react";import{Button as im}from"efficient-shell/ui";import{ScreenDocumentContext as Jt1}from"efficient-easel/screen/components/ScreenDocumentContext";var Ni=class extends Error{constructor(a){super("The storefront forms list could not be loaded.");this.cause=a;this.name="FormsUnavailableError"}},sm=null,Tx=null,Ex=null;function Yt1(){sm=null,Tx=null,Ex=null}function yI(e=!1){let t=K3(),a=B2();return(e||!sm||Tx===null&&t!==null||Ex!==a)&&(Tx=t,Ex=a,sm=(t?F1.listForms(t,{siteId:a}):Promise.reject(new Ni)).catch(s=>{throw Yt1(),s instanceof Ni?s:new Ni(s)})),sm}import{useEaselHost as Qt1}from"efficient-easel/screen/lib/host";import{jsx as $2,jsxs as i7}from"react/jsx-runtime";var kI="__create-a-new-form__";function ea1({value:e,forms:t,loadFailed:a,emptyLabel:s}){let o=t??[],r=e?o.some(p=>p.slug===e):!0,i=t===null&&!a,n={value:"",label:i?d("Loading\u2026"):a?d("Forms couldn\u2019t be loaded"):s===void 0?d("No form yet"):d(s)},l=e&&!r?[{value:e,label:i||a?e:d("{slug} \u2014 no form with this name",{slug:e})}]:[],c=o.map(p=>({value:p.slug,label:p.is_active?p.title:d("{title} (switched off)",{title:p.title})})),h=i?[]:[{value:kI,label:d("Create a new form")}];return[n,...l,...c,...h]}function ta1(e){return e===kI?{action:"create"}:{action:"store",slug:e}}function aa1({value:e,pickedId:t,forms:a}){if(!e||!t||a.some(o=>o.slug===e))return null;let s=a.find(o=>o.id===t);return s&&s.slug&&s.slug!==e?s.slug:null}function sa1(e){let t=[d("Goes to {place}",{place:d("Storefront \u2192 Forms")})],a=(e.notify_email??"").trim();return a&&t.push(d("Emails a copy to {email}",{email:a})),e.mailing_list_name&&t.push(e.subscribe_mode==="checkbox"?d("Joins the \u201C{audience}\u201D audience, but only when the consent box is ticked",{audience:e.mailing_list_name}):d("Joins the \u201C{audience}\u201D audience",{audience:e.mailing_list_name})),e.kind==="account_signup"&&t.push(e.signup_customer_type==="importer"?d("Creates a wholesale account"):d("Creates a retail account")),t}function Hx({value:e,onChange:t,label:a="Form",emptyLabel:s}){let o=Qt1(),r=Xt1(Jt1),i=r?r.capabilities.hasForms:!0,[n,l]=rm(null),[c,h]=rm(!1),[p,m]=rm(!1),[u,v]=rm(!1),g=om(!0),f=om(e);f.current=e;let x=om(t);x.current=t;let b=om(null),w=(L=!1)=>yI(L).then(N=>{if(g.current){l(N),h(!1);let R=aa1({value:f.current,pickedId:b.current,forms:N});R&&x.current(R)}return N},()=>(g.current&&h(!0),[]));zI(()=>(g.current=!0,i&&w(),()=>{g.current=!1}),[i]),zI(()=>i?op(()=>{w(!0)}):void 0,[i]);let T=e?(n??[]).find(L=>L.slug===e)??null:null;T?b.current=T.id:e||(b.current=null);let A=!!e&&!T&&n!==null&&!c,P=ea1({value:e,forms:n,loadFailed:c,emptyLabel:s}),E=async()=>{m(!0),v(!1);try{let L=await NF(o,{mode:"create"}),N=await w(!0);if(!g.current)return;if(L.status==="timeout"){v(!0);return}if(L.status!=="saved")return;let{form:R}=L;R.slug!==f.current&&x.current(R.slug),N.some(V=>V.id===R.id)||w(!0)}finally{g.current&&m(!1)}},k=L=>{let N=ta1(L);N.action==="create"?E():(v(!1),t(N.slug))};return i?i7("div",{className:"sf-formpicker",children:[$2(ca,{label:a,options:P,fallback:"",value:e??"",onChange:k,placeholder:d("Search forms\u2026")}),u&&$2("p",{className:"sf-formsummary-warn",children:d("That didn\u2019t come back \u2014 pick the form from the list, or try again.")}),T?i7("div",{className:"sf-blogsource sf-formsummary",children:[i7("div",{children:[$2("div",{className:"sf-formsummary-caption",children:v3("{n} field","{n} fields",T.fields.length)}),T.fields.length?$2("ol",{className:"sf-formsummary-fields",children:T.fields.map((L,N)=>$2("li",{children:L.label},L.key||`${L.label}-${N}`))}):$2("p",{className:"es-field-hint sf-hint-keep",children:d("This form has no fields yet, so there is nothing for a visitor to fill in.")})]}),i7("div",{children:[$2("div",{className:"sf-formsummary-caption",children:d("Where the answers go")}),$2("ul",{className:"sf-formsummary-fields",children:sa1(T).map(L=>$2("li",{children:L},L))})]}),!T.is_active&&$2("p",{className:"sf-formsummary-warn",children:d("This form is switched off, so it won\u2019t appear on the published page. Turn it back on in {place}.",{place:d("Storefront \u2192 Forms")})}),i7("div",{className:"sf-formsummary-actions",children:[$2(im,{variant:"secondary",size:"md",onClick:()=>FF(o,T.id),children:d("Edit form \u270E")}),$2(im,{variant:"secondary",size:"md",disabled:p,onClick:()=>{E()},children:d("New form +")})]}),$2("p",{className:"es-field-hint sf-hint-keep",children:d("The questions, the button text and the thank-you message all come from {place}. Edit them there \u2014 this section updates to match.",{place:d("Storefront \u2192 Forms")})})]}):i7("div",{className:"sf-blogsource sf-formsummary",children:[c?i7("p",{className:"es-field-hint sf-hint-keep",children:[d("This website\u2019s forms couldn\u2019t be loaded, so there is nothing to choose from yet."),e?` ${d("This section still points at \u201C{slug}\u201D, and that is unchanged.",{slug:e})}`:""]}):A&&$2("p",{className:"sf-formsummary-warn",children:d("This section points at \u201C{slug}\u201D, and this website has no form with that name. Pick one from the list above, or leave it \u2014 nothing has been changed.",{slug:e??""})}),i7("div",{className:"sf-formsummary-actions",children:[c&&$2(im,{variant:"secondary",size:"md",disabled:p,onClick:()=>{w(!0)},children:d("Try again")}),$2(im,{variant:"secondary",size:"md",disabled:p,onClick:()=>{E()},children:d("New form +")})]}),!c&&$2("p",{className:"es-field-hint sf-hint-keep",children:d("Pick a form to show here, or build a new one. Forms are made once in {place} and can be shown on any number of pages.",{place:d("Storefront \u2192 Forms")})})]})]}):$2("div",{className:"sf-formpicker",children:$2("div",{className:"sf-blogsource sf-formsummary",children:i7("div",{children:[$2("div",{className:"sf-formsummary-caption",children:d(a)}),i7("p",{className:"es-field-hint sf-hint-keep",children:[d("Forms aren\u2019t available in this editor, so there is nothing to choose here."),e?` ${d("This section still points at \u201C{slug}\u201D, and that is unchanged.",{slug:e})}`:""]})]})})})}import{jsx as oa1}from"react/jsx-runtime";function n7(e,t){return{type:"custom",render:({value:a,onChange:s})=>oa1(Hx,{value:a,onChange:s,...e?{label:e}:{},...t?{emptyLabel:t}:{}})}}var Px="heroBullets",Ri="\xB7",Fx={bullets:[]},SI={label:"Free shipping",detail:"USA, UK, AUS"};function CI(e){return e.detail?`${e.label} ${Ri} ${e.detail}`:e.label}function ra1(e){let t=e.trim();if(!t)return null;let a=t.indexOf(Ri);return a<0?{label:t,detail:""}:{label:t.slice(0,a).trim(),detail:t.slice(a+Ri.length).trim()}}function MI(e){let t=(e??{})[Px];return Array.isArray(t)?{bullets:t.map(s=>ra1(typeof s=="string"?s:lT(s?.text,""))).filter(s=>s!==null)}:Fx}var N2={text:"Button label",href:"#"},F={eyebrow:"Eyebrow",heading:"Main heading",accent:"Highlight line",body:"Add a sentence or two of supporting copy.",button:"Button label",link:"#",sectionHeading:"Section heading",slideName:"Slide name",boxName:"Box name",headingAccent:"Section heading *here.*",sectionNumber:"Section number",imageCaption:"Image caption",bookingConfirmation:"Thanks \u2014 we'll email you to confirm.",imageMeta:"Image meta",label:"Label",value:"Value",viewAll:"View all",date:"Month DD, YYYY",category:"Category"};import{jsx as Q7}from"react/jsx-runtime";import{jsx as h9,Fragment as ia1,jsxs as na1}from"react/jsx-runtime";import{useEasel as LI}from"efficient-easel/easel";import{LayersIcon as la1}from"efficient-easel/icons";import{SettingsDrill as ca1,SettingsField as ha1}from"efficient-easel/panel";import pa1 from"efficient-easel/screen/components/AddChildRow";import{useSlotChildActions as ma1}from"efficient-easel/screen/components/SlotChildActionsContext";function da1({parent:e,parentType:t,label:a,rowName:s,onSelectChild:o,onAddChild:r,nestDepth:i=0}){let n=_r(t,i);if(!n)return null;let{slot:l,choices:c,spec:h}=n,p=String(e.props.id),m=`${p}:${l}`,u=Array.isArray(e.props[l])?e.props[l]:[],v=h?.addBlocked?.(u)??null,g=h?.notice?.(u)??null,f=na1(ia1,{children:[g?h9("p",{className:"sf-note",children:g}):null,u.map((x,b)=>h9(ca1,{name:s(x),onOpen:()=>o(m,b,String(x.props.id),t)},String(x.props.id??`${m}-${b}`))),c||h.fixed?null:h9(pa1,{label:h.addLabel,blocked:v,onAdd:()=>r(p,l,h.childType,u.length,t)})]});return h9("div",{className:"sf-slot-rows",children:a?h9(ha1,{label:d(a),icon:h9(la1,{}),value:String(u.length),children:f}):f})}function ua1(e,t){return _r(e)?.spec?.notice?.(t)??null}function AI({parentType:e}){let{selectedItem:t}=LI(r=>r);if(!t||t.type!==e)return null;let a=_r(e)?.slot,s=a&&Array.isArray(t.props[a])?t.props[a]:[],o=ua1(e,s);return o?h9("p",{className:"sf-note",children:o}):null}function ga1(e,t){return _r(t)?.source==="footer"?e.blockRowName:e.childRowName}function TI({parentType:e,label:t}){let{appState:a,selectedItem:s}=LI(i=>i),o=ma1();if(!o||!s||s.type!==e)return null;let r=e===iL?Kt(a?.data,String(s.props.id)):0;return h9(da1,{parent:s,parentType:e,label:t,rowName:ga1(o,e),onSelectChild:o.selectChild,onAddChild:o.addChild,nestDepth:r})}var p9={min:40,max:100,step:5,fallback:100,unit:"vh"};function J7(e){return`${typeof e=="number"?e:p9.fallback}${p9.unit}`}function nm(...e){return e.some(t=>typeof t=="number")}var EI="grayscale(1) contrast(1.03)",HI="Black and white";function va1(e){return e===!0?{filter:EI}:{}}function fa1(e){let{filter:t}=va1(e);return t?{style:{filter:t}}:{}}var _i="sf-photo-grayscale",ba1=`@media (hover:hover){.${_i}{filter:${EI};transition:filter 160ms ease}.${_i}:hover{filter:none}}@media (hover:hover) and (prefers-reduced-motion:reduce){.${_i}{transition:none}}`;function ms(e,t){return typeof e=="boolean"?e?fa1(!0):{}:t===!0?{className:_i}:{}}function PI(e){return e===!0?{[_i]:ba1}:{}}import{AlignLeftIcon as ya1,BlackAndWhiteIcon as za1,ContrastIcon as ka1,HeightIcon as Sa1,TypeIcon as Ca1}from"efficient-easel/icons";import{deviceField as Ma1}from"efficient-easel/screen/lib/puck/device-fields";var xa1=["eyebrow","heading","title","body","intro","button","link","label","number","value","name","price","date","caption","note","quote","tag","meta"],wa1=new Set(xa1);function FI(e){let t=e.toLowerCase().split(/[^a-z]+/).filter(Boolean);for(let a=t.length-1;a>=0;a-=1)if(wa1.has(t[a]))return t[a];return null}var e8=e=>Ma1(e,o1("Height",Q7(Sa1,{}),p9.min,p9.max,p9.step,p9.fallback,p9.unit)),V5={ctaText:O("Button",N2.text),ctaHref:$1("Button link")},O5=()=>f1("Alignment",Q7(ya1,{}),[{label:"Left",value:"left"},{label:"Center",value:"center"},{label:"Right",value:"right"}],"left"),lm=()=>f1("Tone",Q7(ka1,{}),[{label:"Default",value:"default"},{label:"Muted",value:"dim"}],"default"),X3=e=>xa({...Uh[e],keys:{top:"padTop",bottom:"padBottom"},group:!1}),l7=(e,t)=>({type:"custom",render:()=>Q7(TI,{parentType:e,label:t})}),cm=e=>({type:"custom",render:()=>Q7(AI,{parentType:e})});function La1(e){let{photographyGrayscale:t}=s3();return i1(HI,t===!0,Q7(za1,{})).render(e)}function ds(){return{type:"custom",render:e=>Q7(La1,{...e})}}var o0=[...new Set([...Object.keys(th("full")),...lE])];function us(e){let t=FI(e);return t?Q7(v4,{noun:t}):Q7(Ca1,{})}import{createContext as Ia1,useContext as Va1}from"react";import{jsx as m2,jsxs as Rx}from"react/jsx-runtime";import{Fragment as RI}from"react";import{Fragment as Aa1,jsx as Nx}from"react/jsx-runtime";function B5({value:e,children:t}){let a=cP(e);return a?Nx(pP,{stamp:a.stamp,children:Nx("span",{[ic]:a.stamp,...a.textStyle?{[nc]:a.textStyle}:{},children:t})}):Nx(Aa1,{children:t})}function M(e,t=!1){let a=_a1(t),s=ac(e);if(s.length===1){let[r]=s,i=HL(r),n=i?Na1(i,r.children):r.children;return m2(B5,{value:e,children:hm(n,a)})}let o=[];return s.forEach((r,i)=>{if(r.bullet){o.push(m2("span",{"data-sf-bullet":"",className:Ta1,children:hm(r.children,a)},i));return}if(r.number!=null){o.push(Rx("span",{"data-sf-number":r.number,className:Ea1,children:[Rx("span",{className:Ha1,children:[r.number,"."]}),hm(r.children,a)]},i));return}i>0&&!Pa1(s[i-1])&&o.push(m2("br",{},`br${i}`)),o.push(m2(RI,{children:hm(r.children,a)},i))}),m2(B5,{value:e,children:o})}var Ta1="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['\xB7']",Ea1="relative block pl-[2em]",Ha1="absolute left-0 w-[1.6em] text-right tabular-nums";function Pa1(e){return e.bullet||e.number!=null}var Fa1="text-accent underline underline-offset-[0.18em]";function Na1(e,t){let[a,...s]=t;return a?.kind==="text"?[{kind:"text",text:`${e}${a.text}`},...s]:[{kind:"text",text:e},...t]}function Ra1(e){if(e)return IL(e)?e:Object.hasOwn(zv,e)?zv[e]:void 0}function hm(e,t){let a=[],s=!1;return e.forEach((o,r)=>{if(o.kind==="text"){a.push(m2("span",{children:v0(o.text)},r)),s=!0;return}s||a.push(m2("span",{},`e${r}`)),a.push(_I(o,r,t)),s=!1}),s||a.push(m2("span",{},"end")),a}function NI(e,t){return e.length===1&&e[0].kind==="text"?v0(e[0].text):e.map((a,s)=>a.kind==="text"?m2(RI,{children:v0(a.text)},s):_I(a,s,t))}function _a1(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function Y0(e){return m2(B5,{value:e,children:m2("span",{children:e})})}function _I(e,t,a){if(e.kind==="link")return m2("a",{href:e.href,className:Fa1,children:NI(e.children,a)},t);let s=NI(e.children,a),o=LL[e.kind];if(o)return m2("span",{[AL]:o,children:s},t);switch(e.kind){case"underline":return m2("u",{children:s},t);case"sup":return m2("sup",{children:s},t);case"sub":return m2("sub",{children:s},t);case"color":{let r=Ra1(e.color);return r?m2("span",{style:{color:r},children:s},t):m2("span",{children:s},t)}case"accent":case"highlight":return m2("em",{className:a,children:s},t);case"bold":return m2("strong",{className:"font-semibold",children:s},t);case"italic":return m2("em",{className:"italic",children:s},t);case"strike":return m2("s",{className:"line-through",children:s},t);default:return m2("span",{children:s},t)}}function Y(e,t=!0){let a=e.split(`
|
|
16
|
+
`}),r7(pI,{content:e,closeRef:r}),r7(mI,{content:e}),Lx("div",{className:"flex-1 overflow-y-auto [scrollbar-color:var(--site-line)_transparent] [scrollbar-width:thin]",children:[r7(dI,{content:e,tyres:i}),r7(uI,{}),r7(gI,{}),r7(vI,{content:e})]}),r7(fI,{}),r7(bI,{})]})]}):null}import Gt1 from"efficient-easel/screen/components/UiIcon";import{Fragment as Ut1,jsx as Ze,jsxs as am}from"react/jsx-runtime";var Wt1=rs(()=>import("./chunks/EditorPreviewCheckout-B43B3UMG.js"),{ssr:!1});function Ax(){let{chromePlaceholder:e,themeFromDocument:t}=s3(),{surface:a}=RE();return e||t||!a||a!=="cart"&&a!=="checkout"?null:a==="checkout"?am(Ut1,{children:[Ze(Wt1,{}),Ze(xI,{surface:a})]}):Ze(Y8,{children:am(_a,{preview:!0,children:[Ze(Fi,{}),Ze(xI,{surface:a})]})})}function xI({surface:e}){let{label:t,href:a}=S_(e);return am("div",{style:{position:"fixed",bottom:14,left:"50%",transform:"translateX(-50%)",zIndex:2147483e3,display:"flex",alignItems:"center",gap:8,maxWidth:"calc(100% - 24px)",padding:"5px 6px 5px 13px",borderRadius:999,fontSize:12,fontWeight:600,fontFamily:"system-ui, sans-serif",color:"#334155",background:"rgba(255,255,255,0.94)",border:"1px solid rgba(15,23,42,0.12)",boxShadow:"0 6px 24px rgba(15,23,42,0.18)",pointerEvents:"none"},children:[Ze("span",{style:{whiteSpace:"nowrap"},children:d("{name} \xB7 preview only",{name:d(t)})}),am("a",{href:a,target:"_blank",rel:"noopener noreferrer",style:{pointerEvents:"auto",flex:"none",display:"inline-flex",alignItems:"center",gap:5,padding:"4px 11px",borderRadius:999,color:"#fff",background:"#2563eb",textDecoration:"none"},children:[d("Open live"),Ze(Gt1,{name:"external-link",size:13,rounded:!0})]})]})}import{PictureTiles as qt1}from"efficient-shell/ui";import{SettingsField as $t1}from"efficient-easel/panel";import{GridIcon as jt1}from"efficient-easel/icons";import{jsx as Ge}from"react/jsx-runtime";function Kt1({layout:e}){return Ge("span",{"aria-hidden":!0,className:"relative block h-9 w-13 rounded-xs border border-current",children:e==="bar"?Ge("span",{className:"absolute inset-x-0 bottom-0 h-2 bg-current opacity-50"}):Ge("span",{className:"absolute bottom-1 left-1 h-3 w-5 rounded-xs bg-current opacity-50"})})}var wI={type:"custom",render:({value:e,onChange:t})=>{let a=Bc({layout:e}).layout,s=Wv.find(o=>o.value===a);return Ge($t1,{label:d(Uv),icon:Ge(jt1,{}),value:s?d(s.label):void 0,children:Ge(qt1,{className:"sf-gallery-layouts",label:d(Uv),value:a,onChange:t,options:Wv.map(o=>({value:o.value,label:d(o.label),picture:Ge(Kt1,{layout:o.value})}))})})}};import{AlignLeftIcon as qA1,CategoryIcon as $A1,CheckIcon as d41,ClockIcon as yM,ColumnsIcon as jA1,DirectionIcon as KA1,EyeIcon as YA1,ListIcon as XA1,PageIcon as JA1,PlacementIcon as QA1,ScrollPointIcon as eT1,TriggerIcon as tT1}from"efficient-easel/icons";import{useContext as Xt1,useEffect as zI,useRef as om,useState as rm}from"react";import{Button as im}from"efficient-shell/ui";import{ScreenDocumentContext as Jt1}from"efficient-easel/screen/components/ScreenDocumentContext";var Ni=class extends Error{constructor(a){super("The storefront forms list could not be loaded.");this.cause=a;this.name="FormsUnavailableError"}},sm=null,Tx=null,Ex=null;function Yt1(){sm=null,Tx=null,Ex=null}function yI(e=!1){let t=K3(),a=B2();return(e||!sm||Tx===null&&t!==null||Ex!==a)&&(Tx=t,Ex=a,sm=(t?F1.listForms(t,{siteId:a}):Promise.reject(new Ni)).catch(s=>{throw Yt1(),s instanceof Ni?s:new Ni(s)})),sm}import{useEaselHost as Qt1}from"efficient-easel/screen/lib/host";import{jsx as $2,jsxs as i7}from"react/jsx-runtime";var kI="__create-a-new-form__";function ea1({value:e,forms:t,loadFailed:a,emptyLabel:s}){let o=t??[],r=e?o.some(p=>p.slug===e):!0,i=t===null&&!a,n={value:"",label:i?d("Loading\u2026"):a?d("Forms couldn\u2019t be loaded"):s===void 0?d("No form yet"):d(s)},l=e&&!r?[{value:e,label:i||a?e:d("{slug} \u2014 no form with this name",{slug:e})}]:[],c=o.map(p=>({value:p.slug,label:p.is_active?p.title:d("{title} (switched off)",{title:p.title})})),h=i?[]:[{value:kI,label:d("Create a new form")}];return[n,...l,...c,...h]}function ta1(e){return e===kI?{action:"create"}:{action:"store",slug:e}}function aa1({value:e,pickedId:t,forms:a}){if(!e||!t||a.some(o=>o.slug===e))return null;let s=a.find(o=>o.id===t);return s&&s.slug&&s.slug!==e?s.slug:null}function sa1(e){let t=[d("Goes to {place}",{place:d("Storefront \u2192 Forms")})],a=(e.notify_email??"").trim();return a&&t.push(d("Emails a copy to {email}",{email:a})),e.mailing_list_name&&t.push(e.subscribe_mode==="checkbox"?d("Joins the \u201C{audience}\u201D audience, but only when the consent box is ticked",{audience:e.mailing_list_name}):d("Joins the \u201C{audience}\u201D audience",{audience:e.mailing_list_name})),e.kind==="account_signup"&&t.push(e.signup_customer_type==="importer"?d("Creates a wholesale account"):d("Creates a retail account")),t}function Hx({value:e,onChange:t,label:a="Form",emptyLabel:s}){let o=Qt1(),r=Xt1(Jt1),i=r?r.capabilities.hasForms:!0,[n,l]=rm(null),[c,h]=rm(!1),[p,m]=rm(!1),[u,v]=rm(!1),g=om(!0),f=om(e);f.current=e;let x=om(t);x.current=t;let b=om(null),w=(L=!1)=>yI(L).then(N=>{if(g.current){l(N),h(!1);let R=aa1({value:f.current,pickedId:b.current,forms:N});R&&x.current(R)}return N},()=>(g.current&&h(!0),[]));zI(()=>(g.current=!0,i&&w(),()=>{g.current=!1}),[i]),zI(()=>i?op(()=>{w(!0)}):void 0,[i]);let T=e?(n??[]).find(L=>L.slug===e)??null:null;T?b.current=T.id:e||(b.current=null);let A=!!e&&!T&&n!==null&&!c,P=ea1({value:e,forms:n,loadFailed:c,emptyLabel:s}),E=async()=>{m(!0),v(!1);try{let L=await NF(o,{mode:"create"}),N=await w(!0);if(!g.current)return;if(L.status==="timeout"){v(!0);return}if(L.status!=="saved")return;let{form:R}=L;R.slug!==f.current&&x.current(R.slug),N.some(V=>V.id===R.id)||w(!0)}finally{g.current&&m(!1)}},k=L=>{let N=ta1(L);N.action==="create"?E():(v(!1),t(N.slug))};return i?i7("div",{className:"sf-formpicker",children:[$2(ca,{label:a,options:P,fallback:"",value:e??"",onChange:k,placeholder:d("Search forms\u2026")}),u&&$2("p",{className:"sf-formsummary-warn",children:d("That didn\u2019t come back \u2014 pick the form from the list, or try again.")}),T?i7("div",{className:"sf-blogsource sf-formsummary",children:[i7("div",{children:[$2("div",{className:"sf-formsummary-caption",children:v3("{n} field","{n} fields",T.fields.length)}),T.fields.length?$2("ol",{className:"sf-formsummary-fields",children:T.fields.map((L,N)=>$2("li",{children:L.label},L.key||`${L.label}-${N}`))}):$2("p",{className:"es-field-hint sf-hint-keep",children:d("This form has no fields yet, so there is nothing for a visitor to fill in.")})]}),i7("div",{children:[$2("div",{className:"sf-formsummary-caption",children:d("Where the answers go")}),$2("ul",{className:"sf-formsummary-fields",children:sa1(T).map(L=>$2("li",{children:L},L))})]}),!T.is_active&&$2("p",{className:"sf-formsummary-warn",children:d("This form is switched off, so it won\u2019t appear on the published page. Turn it back on in {place}.",{place:d("Storefront \u2192 Forms")})}),i7("div",{className:"sf-formsummary-actions",children:[$2(im,{variant:"secondary",size:"md",onClick:()=>FF(o,T.id),children:d("Edit form \u270E")}),$2(im,{variant:"secondary",size:"md",disabled:p,onClick:()=>{E()},children:d("New form +")})]}),$2("p",{className:"es-field-hint sf-hint-keep",children:d("The questions, the button text and the thank-you message all come from {place}. Edit them there \u2014 this section updates to match.",{place:d("Storefront \u2192 Forms")})})]}):i7("div",{className:"sf-blogsource sf-formsummary",children:[c?i7("p",{className:"es-field-hint sf-hint-keep",children:[d("This website\u2019s forms couldn\u2019t be loaded, so there is nothing to choose from yet."),e?` ${d("This section still points at \u201C{slug}\u201D, and that is unchanged.",{slug:e})}`:""]}):A&&$2("p",{className:"sf-formsummary-warn",children:d("This section points at \u201C{slug}\u201D, and this website has no form with that name. Pick one from the list above, or leave it \u2014 nothing has been changed.",{slug:e??""})}),i7("div",{className:"sf-formsummary-actions",children:[c&&$2(im,{variant:"secondary",size:"md",disabled:p,onClick:()=>{w(!0)},children:d("Try again")}),$2(im,{variant:"secondary",size:"md",disabled:p,onClick:()=>{E()},children:d("New form +")})]}),!c&&$2("p",{className:"es-field-hint sf-hint-keep",children:d("Pick a form to show here, or build a new one. Forms are made once in {place} and can be shown on any number of pages.",{place:d("Storefront \u2192 Forms")})})]})]}):$2("div",{className:"sf-formpicker",children:$2("div",{className:"sf-blogsource sf-formsummary",children:i7("div",{children:[$2("div",{className:"sf-formsummary-caption",children:d(a)}),i7("p",{className:"es-field-hint sf-hint-keep",children:[d("Forms aren\u2019t available in this editor, so there is nothing to choose here."),e?` ${d("This section still points at \u201C{slug}\u201D, and that is unchanged.",{slug:e})}`:""]})]})})})}import{jsx as oa1}from"react/jsx-runtime";function n7(e,t){return{type:"custom",render:({value:a,onChange:s})=>oa1(Hx,{value:a,onChange:s,...e?{label:e}:{},...t?{emptyLabel:t}:{}})}}var Px="heroBullets",Ri="\xB7",Fx={bullets:[]},SI={label:"Free shipping",detail:"USA, UK, AUS"};function CI(e){return e.detail?`${e.label} ${Ri} ${e.detail}`:e.label}function ra1(e){let t=e.trim();if(!t)return null;let a=t.indexOf(Ri);return a<0?{label:t,detail:""}:{label:t.slice(0,a).trim(),detail:t.slice(a+Ri.length).trim()}}function MI(e){let t=(e??{})[Px];return Array.isArray(t)?{bullets:t.map(s=>ra1(typeof s=="string"?s:lT(s?.text,""))).filter(s=>s!==null)}:Fx}var N2={text:"Button label",href:"#"},F={eyebrow:"Eyebrow",heading:"Main heading",accent:"Highlight line",body:"Add a sentence or two of supporting copy.",button:"Button label",link:"#",sectionHeading:"Section heading",slideName:"Slide name",boxName:"Box name",headingAccent:"Section heading *here.*",sectionNumber:"Section number",imageCaption:"Image caption",bookingConfirmation:"Thanks \u2014 we'll email you to confirm.",imageMeta:"Image meta",label:"Label",value:"Value",viewAll:"View all",date:"Month DD, YYYY",category:"Category"};import{jsx as Q7}from"react/jsx-runtime";import{jsx as h9,Fragment as ia1,jsxs as na1}from"react/jsx-runtime";import{useEasel as LI}from"efficient-easel/easel";import{LayersIcon as la1}from"efficient-easel/icons";import{SettingsDrill as ca1,SettingsField as ha1}from"efficient-easel/panel";import pa1 from"efficient-easel/screen/components/AddChildRow";import{useSlotChildActions as ma1}from"efficient-easel/screen/components/SlotChildActionsContext";function da1({parent:e,parentType:t,label:a,rowName:s,onSelectChild:o,onAddChild:r,nestDepth:i=0}){let n=_r(t,i);if(!n)return null;let{slot:l,choices:c,spec:h}=n,p=String(e.props.id),m=`${p}:${l}`,u=Array.isArray(e.props[l])?e.props[l]:[],v=h?.addBlocked?.(u)??null,g=h?.notice?.(u)??null,f=na1(ia1,{children:[g?h9("p",{className:"sf-note",children:g}):null,u.map((x,b)=>h9(ca1,{name:s(x),onOpen:()=>o(m,b,String(x.props.id),t)},String(x.props.id??`${m}-${b}`))),c||h.fixed?null:h9(pa1,{label:h.addLabel,blocked:v,onAdd:()=>r(p,l,h.childType,u.length,t)})]});return h9("div",{className:"sf-slot-rows",children:a?h9(ha1,{label:d(a),icon:h9(la1,{}),value:String(u.length),children:f}):f})}function ua1(e,t){return _r(e)?.spec?.notice?.(t)??null}function AI({parentType:e}){let{selectedItem:t}=LI(r=>r);if(!t||t.type!==e)return null;let a=_r(e)?.slot,s=a&&Array.isArray(t.props[a])?t.props[a]:[],o=ua1(e,s);return o?h9("p",{className:"sf-note",children:o}):null}function ga1(e,t){return _r(t)?.source==="footer"?e.blockRowName:e.childRowName}function TI({parentType:e,label:t}){let{appState:a,selectedItem:s}=LI(i=>i),o=ma1();if(!o||!s||s.type!==e)return null;let r=e===iL?Kt(a?.data,String(s.props.id)):0;return h9(da1,{parent:s,parentType:e,label:t,rowName:ga1(o,e),onSelectChild:o.selectChild,onAddChild:o.addChild,nestDepth:r})}var p9={min:40,max:100,step:5,fallback:100,unit:"vh"};function J7(e){return`${typeof e=="number"?e:p9.fallback}${p9.unit}`}function nm(...e){return e.some(t=>typeof t=="number")}var EI="grayscale(1) contrast(1.03)",HI="Black and white";function va1(e){return e===!0?{filter:EI}:{}}function fa1(e){let{filter:t}=va1(e);return t?{style:{filter:t}}:{}}var _i="sf-photo-grayscale",ba1=`@media (hover:hover){.${_i}{filter:${EI};transition:filter 160ms ease}.${_i}:hover{filter:none}}@media (hover:hover) and (prefers-reduced-motion:reduce){.${_i}{transition:none}}`;function ms(e,t){return typeof e=="boolean"?e?fa1(!0):{}:t===!0?{className:_i}:{}}function PI(e){return e===!0?{[_i]:ba1}:{}}import{AlignLeftIcon as ya1,BlackAndWhiteIcon as za1,ContrastIcon as ka1,HeightIcon as Sa1,TypeIcon as Ca1}from"efficient-easel/icons";import{deviceField as Ma1}from"efficient-easel/screen/lib/puck/device-fields";var xa1=["eyebrow","heading","title","body","intro","button","link","label","number","value","name","price","date","caption","note","quote","tag","meta"],wa1=new Set(xa1);function FI(e){let t=e.toLowerCase().split(/[^a-z]+/).filter(Boolean);for(let a=t.length-1;a>=0;a-=1)if(wa1.has(t[a]))return t[a];return null}var e8=e=>Ma1(e,o1("Height",Q7(Sa1,{}),p9.min,p9.max,p9.step,p9.fallback,p9.unit)),V5={ctaText:O("Button",N2.text),ctaHref:$1("Button link")},O5=()=>f1("Alignment",Q7(ya1,{}),[{label:"Left",value:"left"},{label:"Center",value:"center"},{label:"Right",value:"right"}],"left"),lm=()=>f1("Tone",Q7(ka1,{}),[{label:"Default",value:"default"},{label:"Muted",value:"dim"}],"default"),X3=e=>xa({...Uh[e],keys:{top:"padTop",bottom:"padBottom"},group:!1}),l7=(e,t)=>({type:"custom",render:()=>Q7(TI,{parentType:e,label:t})}),cm=e=>({type:"custom",render:()=>Q7(AI,{parentType:e})});function La1(e){let{photographyGrayscale:t}=s3();return i1(HI,t===!0,Q7(za1,{})).render(e)}function ds(){return{type:"custom",render:e=>Q7(La1,{...e})}}var o0=[...new Set([...Object.keys(th("full")),...lE])];function us(e){let t=FI(e);return t?Q7(v4,{noun:t}):Q7(Ca1,{})}import{createContext as Ia1,useContext as Va1}from"react";import{jsx as m2,jsxs as Rx}from"react/jsx-runtime";import{Fragment as RI}from"react";import{Fragment as Aa1,jsx as Nx}from"react/jsx-runtime";function B5({value:e,children:t}){let a=cP(e);return a?Nx(pP,{stamp:a.stamp,children:Nx("span",{[ic]:a.stamp,...a.textStyle?{[nc]:a.textStyle}:{},children:t})}):Nx(Aa1,{children:t})}function M(e,t=!1){let a=_a1(t),s=ac(e);if(s.length===1){let[r]=s,i=HL(r),n=i?Na1(i,r.children):r.children;return m2(B5,{value:e,children:hm(n,a)})}let o=[];return s.forEach((r,i)=>{if(r.bullet){o.push(m2("span",{"data-sf-bullet":"",className:Ta1,children:hm(r.children,a)},i));return}if(r.number!=null){o.push(Rx("span",{"data-sf-number":r.number,className:Ea1,children:[Rx("span",{className:Ha1,children:[r.number,"."]}),hm(r.children,a)]},i));return}i>0&&!Pa1(s[i-1])&&o.push(m2("br",{},`br${i}`)),o.push(m2(RI,{children:hm(r.children,a)},i))}),m2(B5,{value:e,children:o})}var Ta1="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['\xB7']",Ea1="relative block pl-[2em]",Ha1="absolute left-0 w-[1.6em] text-right tabular-nums";function Pa1(e){return e.bullet||e.number!=null}var Fa1="text-accent underline underline-offset-[0.18em]";function Na1(e,t){let[a,...s]=t;return a?.kind==="text"?[{kind:"text",text:`${e}${a.text}`},...s]:[{kind:"text",text:e},...t]}function Ra1(e){if(e)return IL(e)?e:Object.hasOwn(zv,e)?zv[e]:void 0}function hm(e,t){let a=[],s=!1;return e.forEach((o,r)=>{if(o.kind==="text"){a.push(m2("span",{children:v0(o.text)},r)),s=!0;return}s||a.push(m2("span",{},`e${r}`)),a.push(_I(o,r,t)),s=!1}),s||a.push(m2("span",{},"end")),a}function NI(e,t){return e.length===1&&e[0].kind==="text"?v0(e[0].text):e.map((a,s)=>a.kind==="text"?m2(RI,{children:v0(a.text)},s):_I(a,s,t))}function _a1(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function Y0(e){return m2(B5,{value:e,children:m2("span",{children:e})})}function _I(e,t,a){if(e.kind==="link")return m2("a",{href:e.href,className:Fa1,children:NI(e.children,a)},t);let s=NI(e.children,a),o=LL[e.kind];if(o)return m2("span",{[AL]:o,children:s},t);switch(e.kind){case"underline":return m2("u",{children:s},t);case"sup":return m2("sup",{children:s},t);case"sub":return m2("sub",{children:s},t);case"color":{let r=Ra1(e.color);return r?m2("span",{style:{color:r},children:s},t):m2("span",{children:s},t)}case"accent":case"highlight":return m2("em",{className:a,children:s},t);case"bold":return m2("strong",{className:"font-semibold",children:s},t);case"italic":return m2("em",{className:"italic",children:s},t);case"strike":return m2("s",{className:"line-through",children:s},t);default:return m2("span",{children:s},t)}}function Y(e,t=!0){let a=e.split(`
|
|
17
17
|
`);return m2(B5,{value:e,children:a.map((s,o)=>Rx("span",{children:[M(s,t),o<a.length-1?m2("br",{}):null]},o))})}function P0(e){return e.split(/\n\s*\n/).map(t=>t.trim()).filter(Boolean)}import{jsx as m9,jsxs as _x}from"react/jsx-runtime";function Ix(e){return W6(e)??void 0}var Vx=Ia1({}),II=3;function Ox({tag:e,name:t,desc:a,href:s,imageSrc:o,imageLabel:r,price:i}){let{showPrice:n,cardStyle:l,partStyles:c,editing:h}=Va1(Vx),p=l==="bordered"?" border border-line":l==="shadow"?" shadow-[0_8px_30px_rgba(0,0,0,0.12)]":"",m=Ix(o),u=g=>h?{[ye]:g}:{},v=g=>Sh(c?.[Ea(g)]?.role,tH[g],tc);return _x(V1,{href:s||"#",className:`sf-card group relative block w-full min-w-0 overflow-hidden bg-surface-2${p}`,children:[m9("div",{className:"relative z-0 aspect-[4/5] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)] group-hover:scale-[1.04]",children:m9(M0,{label:r||"collection.jpg",src:m})}),m9("div",{className:"pointer-events-none absolute inset-0 z-[1] [background:rgba(0,0,0,0.4)] group-hover:[background:rgba(0,0,0,0.3)] max-[800px]:hidden",style:{transition:"none"}}),_x("div",{className:"absolute inset-x-8 bottom-8 z-[2] flex flex-col gap-3 text-overlay-fg max-[800px]:relative max-[800px]:inset-auto max-[800px]:p-6 max-[800px]:gap-3 max-[800px]:text-fg",children:[e&&m9("span",{...u("tag"),style:v("tag"),className:`font-mono ${ze.tag} uppercase tracking-[0.25em] opacity-70`,children:M(e)}),t&&m9("h3",{...u("name"),style:v("name"),className:`font-heading2 ${ze.name} font-medium leading-none tracking-[-0.03em] ${ze.namePhone}`,children:typeof t=="string"?Y(t,!1):t}),a&&P0(a).map((g,f)=>m9("p",{...u("body"),style:v("body"),className:`max-w-[420px] ${ze.body} leading-[1.5] opacity-80`,children:M(g)},f)),n&&i&&m9("span",{...u("price"),style:v("price"),className:`font-mono ${ze.price} tracking-[0.05em] text-accent`,children:M(i)}),_x("span",{...u("link"),style:v("link"),className:`mt-2 inline-flex items-center gap-3 font-mono ${ze.link} uppercase tracking-[0.2em]`,children:["Explore",m9("span",{className:"transition-transform group-hover:translate-x-[3px]","aria-hidden":!0,children:"\u2192"})]})]})]})}import{createContext as es1,useCallback as ts1,useContext as as1,useEffect as ss1,useRef as os1,useState as Zx}from"react";import{useState as Ba1}from"react";function pm(e){switch(e){case"tall":return"aspect-[3/4]";case"wide":return"aspect-[2/1]";case"landscape":return"aspect-[4/3]";case"portrait":return"aspect-[4/5]";case"auto":return"";default:return"aspect-square"}}function VI(e){return e==="below"}import{Fragment as Oa1,jsx as OI}from"react/jsx-runtime";function d9({kind:e,shared:t=!1,children:a}){let s=hP(e),o=mP(e),r=t?o:s;return r?OI("span",{[ic]:r.stamp,...r.textStyle?{[nc]:r.textStyle}:{},children:a}):OI(Oa1,{children:a})}import{jsx as W4,jsxs as gs}from"react/jsx-runtime";function Bx({build:e,hiddenMobile:t,alwaysShowOverlay:a,forceHover:s,index:o,total:r,ratio:i,captionPlace:n,display:l,displayPhone:c,styleOwner:h,editing:p=!1}){let m=w=>rT(l,c,w),u=w=>p&&h?{[rc]:h,[kr]:`@${w}`}:{},v=(w,S)=>!p&&h?W4(d9,{kind:`@${w}`,shared:!0,children:S}):S,[g,f]=Ba1(!1),x=VI(n),b=gs("div",{className:["sf-card group relative overflow-hidden bg-surface-2",pm(i),t?"max-[800px]:hidden":""].join(" "),children:[gs("div",{className:["absolute inset-0 z-[1] flex items-center justify-center transition-[transform,filter,opacity] duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",s?"scale-[1.06] opacity-0 [filter:brightness(0.5)]":"group-hover:scale-[1.06] group-hover:opacity-0 group-hover:[filter:brightness(0.5)]"].join(" "),children:[W4(M0,{label:e.imageLabel,src:e.imageSrc}),W4("div",{className:"absolute inset-0",style:{background:"rgba(0,0,0,0.35)"}})]}),W4("div",{className:["absolute inset-0 z-[1] flex items-center justify-center transition-[transform,filter,opacity] duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",s?"opacity-100 scale-[1.06] [filter:brightness(0.5)]":"opacity-0 group-hover:scale-[1.06] group-hover:opacity-100 group-hover:[filter:brightness(0.5)]"].join(" "),style:{background:"var(--site-surface)"},children:e.detailSrc&&W4(E4,{src:e.detailSrc,alt:"",fill:!0,sizes:"(max-width: 800px) 100vw, (max-width: 1500px) 33vw, 25vw",loading:"lazy",className:"absolute inset-0 z-[3] object-cover",style:{display:g?"none":"block"},onError:()=>f(!0)})}),(e.process||o!=null&&r!=null)&&gs("div",{className:"pointer-events-none absolute top-3 left-3 right-3 z-[3] flex items-baseline gap-2 max-[800px]:top-2.5 max-[800px]:left-2.5 max-[800px]:right-2.5",children:[e.process&&W4("span",{...u("tag"),className:["min-w-0 truncate font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.24em] text-accent",m("tag"),"transition-opacity duration-300 ease-out",a||s?"opacity-100":"opacity-0 group-hover:opacity-100 max-[800px]:opacity-100"].join(" "),children:v("tag",v0(e.process))}),o!=null&&r!=null&&W4("span",{...u("number"),className:`ml-auto shrink-0 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.24em] ${m("number")}`.trim(),style:{color:"rgba(245,241,232,0.7)"},children:v("number",`${String(o).padStart(2,"0")} / ${String(r).padStart(2,"0")}`)})]}),W4("div",{className:["absolute inset-0 z-[2]","transition-[opacity,transform] duration-300 ease-out",a||s?"opacity-100 translate-y-0":"opacity-0 translate-y-2 group-hover:opacity-100 group-hover:translate-y-0 max-[800px]:opacity-100 max-[800px]:translate-y-0"].join(" "),style:{color:"var(--overlay-fg)",background:"linear-gradient(180deg, transparent 40%, rgba(10,10,10,.85) 100%)"},children:gs("div",{className:"absolute inset-x-0 bottom-0 top-9 flex flex-col justify-end gap-1 overflow-hidden p-6 max-[800px]:top-8 max-[800px]:p-3.5",children:[e.car&&W4("div",{...u("eyebrow"),className:`truncate font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-accent max-[800px]:text-[length:var(--size-label,11px)] max-[800px]:tracking-[0.15em] ${m("eyebrow")}`.trim(),children:v("eyebrow",e.car)}),e.wheel&&W4("div",{...u("title"),className:`font-heading3 text-[length:var(--size-headingSmall,22px)] font-medium leading-[1.05] tracking-[-0.02em] max-[800px]:text-[length:var(--size-body,16px)] ${m("title")}`.trim(),children:v("title",e.wheel)}),e.finish&&W4("div",{...u("meta"),className:`mt-1.5 flex gap-3.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.12em] ${m("meta")}`.trim(),style:{color:"rgba(245,241,232,0.7)"},children:W4("span",{children:v("meta",v0(e.finish))})})]})})]});return x?gs("div",{className:t?"max-[800px]:hidden":"",children:[b,gs("div",{className:"bg-surface px-3.5 pt-3 pb-3.5",children:[e.wheel&&W4("div",{...u("title"),className:`font-display text-[length:var(--size-body,15px)] font-medium leading-[1.25] tracking-[-0.01em] text-fg ${m("title")}`.trim(),children:v("title",e.wheel)}),(e.finish||e.car)&&W4("div",{...u(e.finish?"meta":"eyebrow"),className:`mt-0.5 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.14em] text-fg-dim ${m(e.finish?"meta":"eyebrow")}`.trim(),children:v(e.finish?"meta":"eyebrow",v0(e.finish||e.car))})]})]}):b}import{createContext as Da1,useContext as Za1,useEffect as Ga1,useLayoutEffect as Wa1,useRef as Dx,useState as Ua1}from"react";import{createPortal as qa1}from"react-dom";import{Fragment as Ya1,jsx as Ii,jsxs as Xa1}from"react/jsx-runtime";var $a1=".sf-themed-content",BI="sf-section-accent";function ja1(e,t){let a={},s=!1,o=[];for(let r=e;r&&r!==t;r=r.parentElement)o.push(r);for(let r of o.reverse()){r.classList.contains(BI)&&(s=!0);let i=r.style;if(i)for(let n=0;n<i.length;n+=1){let l=i.item(n);l.startsWith("--")&&(a[l]=i.getPropertyValue(l))}}return{className:s?`contents ${BI}`:"contents",style:a}}function Ka1(e){let t=e.querySelectorAll("a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])");return Array.from(t).filter(a=>!a.hasAttribute("hidden")&&a.getAttribute("aria-hidden")!=="true")}var DI=Da1(()=>{});function t8({open:e,onClose:t,label:a,onPrev:s,onNext:o,className:r="",style:i,children:n}){let l=Dx(null),c=Dx(null),[h,p]=Ua1(null);Wa1(()=>{if(!e){p(null);return}let v=l.current;if(!v)return;let g=v.closest($a1)??v.ownerDocument.body;p({host:g,theme:ja1(v,g)})},[e]);let m=Dx({onClose:t,onPrev:s,onNext:o});m.current={onClose:t,onPrev:s,onNext:o};let u=e&&h!==null;return Ga1(()=>{if(!u)return;let v=c.current,g=v?.ownerDocument??document,f=g.activeElement;v?.focus();let x=S=>{if(S.key==="Escape")m.current.onClose();else if(S.key==="ArrowLeft")m.current.onPrev?.();else if(S.key==="ArrowRight")m.current.onNext?.();else if(S.key==="Tab"&&v){let T=Ka1(v);if(T.length===0){S.preventDefault(),v.focus();return}let A=T[0],P=T[T.length-1],E=g.activeElement,k=!!E&&v.contains(E)&&E!==v;if(S.shiftKey&&(!k||E===A))S.preventDefault(),P.focus();else if(!S.shiftKey&&(!k||E===P))S.preventDefault(),A.focus();else{S.preventDefault();let L=T.indexOf(E);T[S.shiftKey?L-1:L+1]?.focus()}}},b=g.defaultView??window;b.addEventListener("keydown",x);let w=g.body.style.overflow;return g.body.style.overflow="hidden",()=>{b.removeEventListener("keydown",x),g.body.style.overflow=w,f&&f.isConnected&&f.focus()}},[u]),e?Xa1(Ya1,{children:[Ii("span",{ref:l,hidden:!0}),h&&qa1(Ii("div",{className:h.theme.className,style:h.theme.style,children:Ii("div",{ref:c,role:"dialog","aria-modal":"true","aria-label":a,tabIndex:-1,onClick:t,className:`fixed inset-0 z-(--sf-layer-lightbox) outline-none ${r}`,style:i,children:Ii(DI.Provider,{value:t,children:n})})}),h.host)]}):null}function u9({className:e="absolute right-5 top-5 flex h-10 w-10 cursor-pointer items-center justify-center border border-fg-dim/40 text-fg-dim transition-colors hover:border-accent hover:text-accent",style:t,label:a="Close",children:s="\xD7"}){let o=Za1(DI);return Ii("button",{type:"button","aria-label":a,onClick:r=>{r.stopPropagation(),o()},className:e,style:t,children:s})}import{createContext as Ja1,useContext as We}from"react";var Vi=Ja1(null);function ZI(){let e=We(Lr),t=We(Vi),a=ph();return e?e.socialLinks??HE:t?t.socialLinks:a.links}function g9(){return We(Vi)?.commerceEnabled??!0}function Qa1(e){return(e?.commerceEnabled??!0)&&(e?.cartEnabled??!0)}function Oi(){return Qa1(We(Vi))}function GI(){let e=We(Vi),t=s3();return e?e.showThemeSwitch??!1:t.themeSwitchShown??!1}function WI(){let e=We(Lr),t=We(Vi),a=s3();return e?Vh({legalName:e.legalName,foundedYear:e.foundedYear,siteName:e.siteName}):t?Vh({legalName:t.legalName,foundedYear:t.foundedYear,siteName:t.siteName}):Vh({siteName:a.websiteName?.trim()||G8})}import{Fragment as vs,jsx as X0,jsxs as O3}from"react/jsx-runtime";var rs1="(max-width: 1100px) 100vw, min(59vw, 1050px)",Bi=es1({}),qI=[{id:"tag",label:"Tag"},{id:"eyebrow",label:"Eyebrow"},{id:"title",label:"Title"},{id:"meta",label:"Meta"},{id:"number",label:"Card number"}],Ue="data-gallery-grid",Gx="data-gallery-tile";function is1(e,t){let[a,s]=Zx(null);return ss1(()=>{let o=e.current,r=o?.closest(`[${Ue}]`);if(!o||!r)return;let i=()=>{let l=Array.from(r.querySelectorAll(`[${Gx}]`)),c=l.indexOf(o),h=c>=0?{index:c+1,total:l.length}:null;s(p=>p?.index===h?.index&&p?.total===h?.total?p:h)};if(i(),!t)return;let n=new MutationObserver(i);return n.observe(r,{childList:!0,subtree:!0}),()=>n.disconnect()},[e,t]),a}var a8={process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},ns1=()=>({image:"",href:"#",process:"",eyebrow:"",name:"",meta:""}),$I=Array.from({length:6},ns1);function ls1(e,t){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||t}function cs1(e){let t=(e.photos??[]).map(r=>r?.src).filter(r=>!!r),a=e.image||t[0]||"",s=[a,...t].filter(r=>!!r),o=ls1(e.name,"gallery-item");return{car:e.eyebrow??"",wheel:e.name??"",process:e.process??"",finish:e.meta??"",imageLabel:`${o}.jpg`,detailLabel:`${o}-detail.jpg`,imageSrc:a||void 0,detailSrc:t[0]||a||void 0,photos:s,href:e.href}}function Di({editing:e=!1,previewHover:t,ratio:a,captionPlace:s,...o}){let{galleryHref:r="/gallery",submitHref:i="/contact",previewHover:n,display:l,displayPhone:c,styleOwner:h,photosOnly:p=!1}=as1(Bi),m=cs1(o),v=g9()&&!p,g=!v&&!hs1(m),f=m.photos??(m.imageSrc?[m.imageSrc]:[]),x=os1(null),b=ts1(V=>{x.current=V},[]),w=is1(x,e),S=e&&(!!t||!!n),[T,A]=Zx(!1),[P,E]=Zx(0),k=()=>E(V=>(V-1+f.length)%f.length),L=()=>E(V=>(V+1)%f.length),N=f[P]??m.imageSrc??"",R=X0(Bx,{build:m,forceHover:S,index:w?.index,total:w?.total,ratio:a,captionPlace:s,display:l,displayPhone:c,styleOwner:h,editing:e});return O3(vs,{children:[e?X0("div",{ref:b,[Gx]:"",className:"block w-full text-left",children:R}):X0("button",{ref:b,[Gx]:"",type:"button","aria-label":v?`Open ${m.car||"build"} on ${m.wheel||"wheel"}`:UI(m),onClick:()=>{E(0),A(!0)},className:"block w-full cursor-pointer text-left focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2",children:R}),X0(t8,{open:T,onClose:()=>A(!1),label:v?`${m.car} on ${m.wheel}`:UI(m),onPrev:f.length>1?k:void 0,onNext:f.length>1?L:void 0,className:"flex items-center justify-center p-6 backdrop-blur-[8px] max-[700px]:p-3",style:{background:"color-mix(in oklab, var(--bg) 78%, transparent)"},children:O3("div",{onClick:V=>V.stopPropagation(),className:`relative grid w-[min(1800px,100%)] max-h-[calc(100vh-48px)] ${g?"grid-cols-1":"grid-cols-[1.4fr_1fr]"} overflow-hidden border border-line bg-bg max-[1100px]:grid-cols-1 max-[1100px]:overflow-auto`,style:{boxShadow:"0 60px 120px -20px color-mix(in srgb, var(--sf-shadow-color, #141416) 70%, transparent)"},children:[X0(u9,{label:"Close popup",className:"absolute right-[24px] top-[24px] z-[5] flex h-[56px] w-[56px] items-center justify-center border border-line font-mono text-[length:var(--size-label,21px)] text-fg-dim transition-colors hover:border-accent hover:text-fg",style:{background:"color-mix(in oklab, var(--bg) 70%, transparent)"},children:"\u2715"}),O3("div",{className:"relative flex min-h-[690px] items-center justify-center overflow-hidden bg-surface-2 max-[1100px]:min-h-[450px]",children:[N&&X0("img",{...j0(N,{fallbackWidth:1280}),sizes:rs1,alt:`${(v?m.car:m.wheel||m.car)||"Photo"} \u2014 ${P+1} of ${f.length}`,className:"block h-full max-h-[88vh] w-full object-cover"},N),f.length>1&&O3(vs,{children:[X0("button",{type:"button","aria-label":"Previous photo",onClick:k,className:"absolute left-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"\u25C1"}),X0("button",{type:"button","aria-label":"Next photo",onClick:L,className:"absolute right-4 top-1/2 flex h-16 w-16 -translate-y-1/2 cursor-pointer items-center justify-center border border-fg-dim/40 bg-overlay-scrim/40 font-mono text-[length:var(--size-label,24px)] text-fg-dim transition-colors hover:border-accent hover:text-accent",children:"\u25B7"}),O3("span",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 border border-fg-dim/30 bg-overlay-scrim/50 px-4 py-1.5 font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em] text-fg-dim backdrop-blur-[4px]",children:[P+1," / ",f.length]})]})]}),v?O3("div",{className:"flex flex-col gap-[30px] px-[60px] py-[72px] max-[1100px]:px-9 max-[1100px]:py-[54px]",children:[m.process&&X0("span",{className:"font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.3em] text-accent",children:M(m.process)}),m.wheel&&X0("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(42px,4.5vw,60px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.025em]",children:Y(m.wheel,!1)}),m.car&&O3("div",{className:"font-heading3 text-[length:var(--size-headingSmall,27px)] leading-[1.4] text-fg",children:["on ",X0("em",{className:"font-serif font-normal italic text-accent tracking-[-0.01em]",children:M(m.car,!0)})]}),O3("dl",{className:"mt-3 grid grid-cols-[auto_1fr] gap-x-7 gap-y-[18px] border-y border-line py-[30px] font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.22em]",children:[m.wheel&&O3(vs,{children:[X0("dt",{className:"text-fg-dim",children:"Wheel"}),X0("dd",{className:"text-fg",children:M(m.wheel)})]}),m.process&&O3(vs,{children:[X0("dt",{className:"text-fg-dim",children:"Process"}),X0("dd",{className:"text-fg",children:M(m.process)})]}),m.finish&&O3(vs,{children:[X0("dt",{className:"text-fg-dim",children:"Finish"}),X0("dd",{className:"text-fg",children:M(m.finish)})]}),m.car&&O3(vs,{children:[X0("dt",{className:"text-fg-dim",children:"Vehicle"}),X0("dd",{className:"text-fg",children:M(m.car)})]})]}),O3("div",{className:"mt-auto flex flex-col gap-3.5 pt-6",children:[O3(V1,{href:m.href||"/wheels",onClick:()=>A(!1),className:"group flex items-center justify-between gap-6 border border-btn bg-btn px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-btn-ink transition-colors hover:border-fg hover:bg-fg",children:[X0("span",{children:"View product"}),X0("span",{className:"transition-transform group-hover:translate-x-[6px]",children:"\u2192"})]}),O3(V1,{href:r,onClick:()=>A(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[X0("span",{children:"See more builds"}),X0("span",{children:"\u2192"})]}),O3(V1,{href:i,onClick:()=>A(!1),className:"flex items-center justify-between gap-6 border border-line px-9 py-6 font-mono text-[length:var(--size-label,16px)] uppercase tracking-[0.3em] text-fg transition-colors hover:border-accent hover:text-accent",children:[X0("span",{children:"Submit your build"}),X0("span",{children:"\u2192"})]})]})]}):!g&&X0(ps1,{build:m})]})})]})}function jI(e){return[e.process,e.car,e.finish].filter((t,a,s)=>!!t&&t!==e.wheel&&s.indexOf(t)===a)}function hs1(e){return!!e.wheel||jI(e).length>0}function UI(e){let t=e.wheel||e.car;return t?`Open photo of ${t}`:"Open photo"}function ps1({build:e}){let t=e.wheel,a=jI(e);return O3("div",{className:"flex flex-col gap-[24px] px-[60px] py-[72px] max-[1100px]:px-9 max-[1100px]:py-[54px]",children:[t&&X0("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(42px,4.5vw,60px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.025em]",children:Y(t,!1)}),a.map(s=>X0("p",{className:"text-[length:var(--size-body,18px)] leading-[1.5] text-fg",children:M(s)},s))]})}import{createContext as gs1,useContext as vs1,useEffect as mm,useId as fs1,useMemo as bs1,useState as l3}from"react";var ms1=14,ds1=3;function Wx(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function us1(e,t){let a=new Date(`${e}T00:00:00`);return a.setDate(a.getDate()+t),Wx(a)}async function KI(e,t,a={}){let s=a.days??ms1,o=a.read??Se.getAvailability,r=0,i=0;for(let n=0;n<s;n++){if(a.signal?.aborted)return{outcome:"unreadable"};let l=us1(t,n);try{let c=await o(e,l);if(r=0,i++,c.slots.length>0)return{outcome:"found",date:l,availability:c}}catch{if(r++,r>=ds1)return{outcome:"unreadable"}}}return i===s?{outcome:"noneInWindow",days:s}:{outcome:"unreadable"}}import{jsx as ys1}from"react/jsx-runtime";var YI=gs1(null);function v9(){let e=vs1(YI);if(!e)throw new Error("useBookingForm must be used inside <BookingFormProvider>");return e}var Ux=[{id:"example-1",name:"Example service",durationMinutes:45,price:"80.00",description:"What this appointment includes, in a sentence."},{id:"example-2",name:"Second example",durationMinutes:30,price:"0",description:""}];function xs1(e){return{timezone:"UTC",slots:[`${e}T09:00:00.000Z`,`${e}T10:30:00.000Z`,`${e}T13:00:00.000Z`].map(t=>({start:t}))}}var qx={bookingNumber:"EXAMPLE-0000",service:"Example service",startAt:"2026-01-01T00:00:00.000Z",timezone:"UTC",customerTimezone:"",manageToken:"example"};function ws1(e,t){return e&&t?.length===0}function XI({editing:e=!1,previewConfirmation:t=!1,children:a}){let s=fs1(),o=bs1(()=>Wx(new Date),[]),[r,i]=l3(),[n,l]=l3(""),[c,h]=l3(""),[p,m]=l3(o),[u,v]=l3(o),[g,f]=l3(!1),[x,b]=l3(null),[w,S]=l3(),[T,A]=l3(""),[P,E]=l3(""),[k,L]=l3(""),[N,R]=l3(""),[V,I]=l3(""),[_,D]=l3(()=>kf()),[G,K]=l3(null),[t1,Z]=l3(!1),[a1,n1]=l3(!1),[r1,B]=l3(null),[j,$]=l3("");mm(()=>{$(Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC")},[]),mm(()=>{let A1=!1;return Se.listServices().then(R1=>{A1||(i(R1.results),l(R1.currency),h(k1=>k1||R1.results[0]?.id||""))}).catch(()=>{A1||i([])}),()=>{A1=!0}},[]),mm(()=>{if(g||!c)return;let A1={aborted:!1};return A(""),S(void 0),B(null),b(null),Z(!0),KI(c,o,{signal:A1}).then(R1=>{if(!A1.aborted){if(R1.outcome==="found"){m(R1.date),v(R1.date),S(R1.availability);return}b(R1.outcome==="noneInWindow"?`No times are available in the next ${R1.days} days.`:"We couldn't load available times. Please try again.")}}).finally(()=>{A1.aborted||Z(!1)}),()=>{A1.aborted=!0}},[g,c,o]),mm(()=>{if(!g||!c||!p)return;let A1=!1;return A(""),S(void 0),B(null),b(null),Z(!0),Se.getAvailability(c,p).then(R1=>{A1||(S(R1),R1.slots.length===0&&b("No times are available on this date."))}).catch(()=>{A1||b("We couldn't load available times. Please try again.")}).finally(()=>{A1||Z(!1)}),()=>{A1=!0}},[p,g,c]);let p1=r?.find(A1=>A1.id===c),L1=p1?.depositAmountDue!=null,i0=!!(!e&&!a1&&p1&&T&&P.trim()&&k.trim()&&!L1);async function n0(A1){if(A1.preventDefault(),!(!i0||!p1)){n1(!0),B(null);try{let R1=await Se.create({serviceId:p1.id,start:T,customer:{name:P.trim(),email:k.trim(),phone:N.trim()},notes:V.trim(),idempotencyKey:_,customerTimezone:j});K(R1),D(kf())}catch(R1){B(R1 instanceof _4&&R1.status===409?"That time was just booked. Choose another available time.":"Your appointment wasn't submitted. Please check your details and try again."),R1 instanceof _4&&R1.status===409&&(A(""),Se.getAvailability(p1.id,p).then(S).catch(()=>{}))}finally{n1(!1)}}}let J=ws1(e,r);return ys1(YI.Provider,{value:{fieldPrefix:s,editing:e,services:J?Ux:r,currency:J?"AUD":n,serviceId:J?Ux[0].id:c,setServiceId:h,service:J?Ux[0]:p1,requiresPayment:J?!1:L1,date:p,earliestDate:u,setDate:m,setDateTouched:f,availability:J?xs1(p):w,loadingSlots:J?!1:t1,noSlotsMessage:x,selectedStart:J?`${p}T09:00:00.000Z`:T,setSelectedStart:A,customerTimezone:j,name:P,setName:E,email:k,setEmail:L,phone:N,setPhone:R,notes:V,setNotes:I,confirmation:G??(t?qx:null),submitting:a1,error:r1,canSubmit:J?!1:i0,handleSubmit:n0,sample:!!J},children:a})}import{jsx as dm,Fragment as JI,jsxs as QI}from"react/jsx-runtime";var zs1="sf-button group inline-flex items-center justify-center gap-2.5 border px-[22px] py-4 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em] transition-colors",eV={primary:"border-btn bg-btn text-btn-ink hover:border-btn-2 hover:bg-btn-2",ghost:"border-current bg-transparent hover:bg-white/10"};function B3(e){let{variant:t="primary",arrow:a,glyphBefore:s,className:o,style:r,children:i,href:n,newTab:l,...c}=e,h=`${zs1} ${eV[t]??eV.primary} ${o??""}`,p=s?QI(JI,{children:[a!==null&&dm("span",{"aria-hidden":!0,className:"inline-flex",children:a??"\u2192"}),i]}):QI(JI,{children:[i,a!==null&&dm("span",{"aria-hidden":!0,className:"transition-transform group-hover:translate-x-[3px]",children:a??"\u2192"})]});return n?dm(d0,{href:n,className:h,style:r,...l?{target:"_blank",rel:"noopener noreferrer"}:{},children:p}):dm("button",{type:"button",className:h,style:r,...c,children:p})}import{jsx as O0,jsxs as b4}from"react/jsx-runtime";var Zi="w-full border-2 border-line bg-bg px-4 py-4 font-[family-name:var(--bk-value-font,var(--font-display))] text-[length:var(--bk-value-size,17px)] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent";function ks1(e,t){let a=Number(e);if(a===0)return Ce;try{return IH(a,t)}catch{return`${t} ${e}`}}function tV(e,t){try{return new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit",timeZone:t}).format(new Date(e))}catch{return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}}function aV(e,t){try{return new Intl.DateTimeFormat(void 0,{weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit",timeZone:t,timeZoneName:"short"}).format(new Date(e))}catch{return new Date(e).toLocaleString()}}var Gi="font-[family-name:var(--bk-name-font,var(--font-mono))] text-[length:var(--bk-name-size,12px)]";function $x({number:e,children:t}){return b4("div",{className:"mb-4 flex items-center gap-3",children:[O0("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full border border-line font-[family-name:var(--bk-step-font,var(--font-mono))] text-[length:var(--bk-step-size,11px)] font-semibold text-fg-dim",children:e}),O0("h3",{className:"font-[family-name:var(--bk-step-font,var(--font-mono))] text-[length:var(--bk-step-size,12px)] font-semibold uppercase tracking-[0.2em] text-fg",children:t})]})}function um({eyebrow:e,heading:t,intro:a}){return b4("div",{className:"mb-10 max-w-[760px]",children:[(e??"").trim()&&O0("p",{className:"mb-4 font-mono text-[12px] font-semibold uppercase tracking-[0.24em] text-accent",children:e}),(t??"").trim()&&O0("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.98] tracking-[-0.025em] text-fg max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:t}),(a??"").trim()&&O0("p",{className:"mt-5 max-w-[660px] font-display text-[17px] leading-[1.65] text-fg-dim",children:a})]})}function gm({style:e}={}){let{fieldPrefix:t,services:a,currency:s,serviceId:o,setServiceId:r,requiresPayment:i,date:n,earliestDate:l,setDate:c,setDateTouched:h,availability:p,loadingSlots:m,noSlotsMessage:u,selectedStart:v,setSelectedStart:g,customerTimezone:f}=v9();return a?b4("div",{className:"flex flex-col gap-10",style:e,children:[b4("div",{children:[O0($x,{number:"01",children:"Choose a service"}),O0("div",{className:"grid gap-3 sm:grid-cols-2",children:a.map(x=>{let b=x.id===o;return b4("button",{type:"button","aria-pressed":b,onClick:()=>r(x.id),className:`min-h-11 border p-4 text-left transition-colors ${b?"border-accent bg-accent/10":"border-line bg-bg hover:border-fg-dim"}`,children:[O0("span",{className:"block font-[family-name:var(--bk-name-font,var(--font-display))] text-[length:var(--bk-name-size,18px)] font-medium text-fg",children:x.name}),b4("span",{className:"mt-1 block font-[family-name:var(--bk-value-font,var(--font-mono))] text-[length:var(--bk-value-size,11px)] uppercase tracking-[0.14em] text-fg-dim",children:[x.durationMinutes," min \xB7 ",ks1(x.price,s)]}),x.description&&O0("span",{className:"mt-3 block font-[family-name:var(--bk-note-font,var(--font-display))] text-[length:var(--bk-note-size,14px)] leading-[1.5] text-fg-dim",children:x.description})]},x.id)})}),i&&O0("p",{className:"mt-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.14em] text-alert",role:"alert",children:"This service requires an upfront payment and cannot be booked through this form yet."})]}),b4("div",{children:[O0($x,{number:"02",children:"Choose a date and time"}),O0(b3,{separate:!0,htmlFor:`${t}-date`,label:"Date",required:!0,labelFace:Gi,children:O0("input",{id:`${t}-date`,type:"date",min:l,value:n,onChange:x=>{h(!0),c(x.target.value)},className:Zi,required:!0})}),O0("div",{className:"mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3 min-[1200px]:grid-cols-4",role:"group","aria-label":"Available appointment times",children:m?O0("p",{className:"col-span-full py-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.18em] text-fg-dim",children:"Loading times\u2026"}):p?.slots.length?p.slots.map(x=>b4("button",{type:"button","aria-pressed":v===x.start,onClick:()=>g(x.start),className:`min-h-11 border px-3 py-2 font-[family-name:var(--bk-value-font,var(--font-mono))] text-[length:var(--bk-value-size,12px)] font-semibold uppercase tracking-[0.12em] transition-colors ${v===x.start?"border-accent bg-accent text-bg":"border-line bg-bg text-fg hover:border-accent"}`,children:[O0("span",{className:"block",children:tV(x.start,f||p.timezone)}),f&&f!==p.timezone&&b4("span",{className:"mt-0.5 block text-[9px] font-normal tracking-[0.08em] opacity-70",children:[tV(x.start,p.timezone)," business"]})]},x.start)):u?O0("p",{className:"col-span-full py-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.18em] text-fg-dim",role:"status",children:u}):null}),p?.timezone&&b4("p",{className:"mt-3 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,10px)] uppercase tracking-[0.16em] text-fg-dim",children:["Times shown in ",f||p.timezone,f&&f!==p.timezone?` \xB7 business timezone ${p.timezone}`:""]})]})]}):null}function vm({buttonLabel:e,style:t}){let{fieldPrefix:a,editing:s,name:o,setName:r,email:i,setEmail:n,phone:l,setPhone:c,notes:h,setNotes:p,submitting:m,error:u,canSubmit:v}=v9();return b4("div",{className:"sf-card border border-line bg-bg p-5 min-[640px]:p-8",style:t,children:[O0($x,{number:"03",children:"Your details"}),b4("div",{className:"flex flex-col gap-4",children:[O0(b3,{separate:!0,htmlFor:`${a}-name`,label:"Name",required:!0,labelFace:Gi,children:O0("input",{id:`${a}-name`,type:"text",autoComplete:"name",value:o,onChange:g=>r(g.target.value),className:Zi,required:!0})}),O0(b3,{separate:!0,htmlFor:`${a}-email`,label:"Email",required:!0,labelFace:Gi,children:O0("input",{id:`${a}-email`,type:"email",inputMode:"email",autoComplete:"email",value:i,onChange:g=>n(g.target.value),className:Zi,required:!0})}),O0(b3,{separate:!0,htmlFor:`${a}-phone`,label:"Phone",labelFace:Gi,children:O0("input",{id:`${a}-phone`,type:"tel",inputMode:"tel",autoComplete:"tel",value:l,onChange:g=>c(g.target.value),className:Zi})}),O0(b3,{separate:!0,htmlFor:`${a}-notes`,label:"What would you like to cover?",labelFace:Gi,children:O0("textarea",{id:`${a}-notes`,rows:4,value:h,onChange:g=>p(g.target.value),className:`${Zi} resize-y`})})]}),u&&O0("p",{className:"mt-4 font-[family-name:var(--bk-note-font,var(--font-mono))] text-[length:var(--bk-note-size,11px)] uppercase tracking-[0.16em] text-alert",role:"alert",children:u}),O0(B3,{type:s?"button":"submit",disabled:!v,arrow:null,className:"mt-6 w-full disabled:cursor-not-allowed disabled:opacity-50",children:m?"Submitting\u2026":(e??"").trim()||"Book appointment"})]})}function fm({successMessage:e}){let{confirmation:t,customerTimezone:a}=v9();return t?b4("div",{className:"sf-card max-w-[760px] border border-line bg-bg p-6 min-[640px]:p-10",role:"status",children:[b4("p",{className:"font-mono text-[12px] font-semibold uppercase tracking-[0.22em] text-accent",children:["Request received \xB7 ",t.bookingNumber]}),O0("h3",{className:"mt-4 font-display text-[28px] font-medium uppercase text-fg",children:t.service}),O0("p",{className:"mt-2 font-display text-[17px] text-fg-dim",children:aV(t.startAt,t.customerTimezone||a||t.timezone)}),t.customerTimezone&&t.timezone!==t.customerTimezone&&b4("p",{className:"mt-1 font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:["Business time: ",aV(t.startAt,t.timezone)]}),(e??"").trim()&&O0("p",{className:"mt-5 max-w-[620px] font-serif text-[18px] italic leading-[1.6] text-fg-dim",children:e}),O0(B3,{href:`/book/${encodeURIComponent(t.manageToken)}`,newTab:t!==qx,variant:"ghost",className:"mt-8",children:"Manage booking"})]}):null}var bm=["step","name","value","note"],jx={step:"Step",name:"Name",value:"Value",note:"Note"},xm={step:"styleStep",name:"styleName",value:"styleValue",note:"styleNote"},sV={step:{font:"--bk-step-font",size:"--bk-step-size"},name:{font:"--bk-name-font",size:"--bk-name-size"},value:{font:"--bk-value-font",size:"--bk-value-size"},note:{font:"--bk-note-font",size:"--bk-note-size"}};function Ss1(e){return typeof e=="string"&&q6.includes(e)?e:null}var Cs1={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:900};function oV(e){let t={};for(let a of bm){let s=Ss1(e[xm[a]]);if(!s)continue;let o=ea({role:s},Cs1);o.fontFamily&&(t[sV[a].font]=o.fontFamily),o.fontSize&&(t[sV[a].size]=o.fontSize)}return t}import{jsx as fs}from"react/jsx-runtime";var rV=["head","booking","details","confirm"],iV={head:"Head",booking:"Booking",details:"Your details",confirm:"Confirmation"};function Kx({region:e,eyebrow:t,heading:a,intro:s,buttonLabel:o,successMessage:r,...i}){let{confirmation:n,services:l}=v9(),c=oV(i);return e==="head"?fs("div",{className:"min-[960px]:col-span-2",style:c,children:fs(um,{eyebrow:t,heading:a,intro:s})}):e==="confirm"?n?fs("div",{className:"min-[960px]:col-span-2",style:c,children:fs(fm,{successMessage:r})}):null:n||!l||l.length===0?null:e==="booking"?fs(gm,{style:c}):e==="details"?fs(vm,{buttonLabel:o,style:c}):null}import{useEffect as nV,useState as qe}from"react";import{jsx as bs,jsxs as Ls1}from"react/jsx-runtime";function c7(e,t){let[a,s]=qe(void 0),[o,r]=qe(0);return nV(()=>{if(t!==void 0)return;if(!e){s(null);return}let i=!1;return F0.getForm(e).then(n=>{i||s(n)}).catch(()=>{i||s(null)}),()=>{i=!0}},[t,e,o]),nV(()=>{if(t===void 0)return op(()=>r(i=>i+1))},[t]),t!==void 0?t:a}var Ms1="Something went wrong \u2014 your submission wasn't sent. Please try again.";function xs(e,t="Thanks \u2014 we've received your submission."){return e.successMessage?.trim()||t}function f9({form:e,formSlug:t,editing:a=!1}){let[s,o]=qe({}),[r,i]=qe(""),[n,l]=qe(!1),[c,h]=qe(!1),[p,m]=qe(null);async function u(v){if(v.preventDefault(),!(a||n||!e||!t)){l(!0),m(null);try{let g=e.fields.map(f=>({fieldKey:f.key,value:s[f.key]??""}));await F0.submitForm(t,{answers:g,...r?{company:r}:{}}),h(!0)}catch{m(Ms1)}finally{l(!1)}}}return{valueOf:v=>s[v]??"",set:(v,g)=>o(f=>({...f,[v]:g})),honeypot:r,setHoneypot:i,submitting:n,done:c,error:p,handleSubmit:u}}function ws({value:e,onChange:t}){return bs("input",{type:"text",name:"company",tabIndex:-1,autoComplete:"off","aria-hidden":"true",className:"hidden",value:e,onChange:a=>t(a.target.value)})}function b9({field:e,value:t,onChange:a,className:s,rows:o=5,placeholder:r}){let i=r??e.placeholder;return e.type==="textarea"?bs("textarea",{required:e.required,rows:o,value:t,placeholder:i,onChange:n=>a(n.target.value),className:s}):e.type==="select"?Ls1("select",{required:e.required,value:t,onChange:n=>a(n.target.value),className:s,children:[bs("option",{value:"",children:i||"Select\u2026"}),e.options.map(n=>bs("option",{value:n,children:n},n))]}):e.type==="checkbox"?bs("input",{type:"checkbox",required:e.required,checked:t==="true",onChange:n=>a(n.target.checked?"true":""),className:s}):bs("input",{type:e.type==="email"?"email":e.type==="tel"?"tel":"text",required:e.required,value:t,placeholder:i,onChange:n=>a(n.target.value),className:s})}import{jsx as B0,jsxs as J3,Fragment as Fs1}from"react/jsx-runtime";var $e="solid",Yx=[{label:"Solid",value:"solid"},{label:"Outlined",value:"outlined"}];function lV(e){return y2(Yx,$e,e)}var Xx="sf-secnum-outline",cV="font-display text-[length:var(--size-headingMedium,clamp(48px,6vw,96px))] font-medium leading-[0.8] tracking-[-0.02em]",hV=`@supports (-webkit-text-stroke: 1px currentColor){.${Xx}{color:var(--site-surface-2);-webkit-text-stroke:1px var(--site-line)}}`;import{jsx as Jx,jsxs as Ts1}from"react/jsx-runtime";import{jsx as As1}from"react/jsx-runtime";function pV(){return As1("span",{className:"block h-px w-[30px] bg-current"})}var Qx={labelUpTo800:"max-[800px]:text-[length:var(--size-label,12px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,14px)]"};function Es1(e,t){return`font-mono text-[length:var(--size-label,${e}px)] uppercase tracking-[0.3em] text-accent`}var Hs1=`inline-block w-fit bg-accent px-3.5 py-1.5 font-mono ${Qx.labelSmall} font-semibold uppercase tracking-[0.16em] text-bg`,Ps1=`flex items-center gap-3.5 font-mono ${Qx.labelLarge} uppercase tracking-[0.3em] opacity-80 ${Qx.labelUpTo800} max-[800px]:tracking-[0.25em]`;function U1({text:e,look:t="plain",size:a=13,scaled:s=!0,className:o="",classNameAfter:r=""}){if(t==="line")return Ts1("div",{className:[o,Ps1,r].filter(Boolean).join(" "),children:[Jx(pV,{}),Jx("span",{children:M(e)})]});let i=t==="filled"?Hs1:Es1(a,s);return Jx("span",{className:[o,i,r].filter(Boolean).join(" "),children:M(e)})}var c2={headingMediumUpTo800Small:"max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMediumUpTo800Large:"max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",headingSmallUpTo800:"max-[800px]:text-[length:var(--size-headingSmall,28px)]",headingMedium2:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]",headingMedium3:"text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))]",headingMedium1:"text-[length:var(--sf-heading-max,var(--size-headingMedium,38px))]",bodySmall:"text-[length:var(--size-body,14px)]",bodyLarge:"text-[length:var(--size-body,16px)]",label:"text-[length:var(--size-label,14px)]",shelfLabel:"text-[length:var(--size-label,13px)]",shelfLabelSmall:"text-[length:var(--size-label,12px)]",shelfBody:"text-[length:var(--size-body,13px)]",shelfHeadingUpTo800Xs:"max-[800px]:text-[length:var(--size-headingMedium,28px)]",shelfHeadingUpTo800Small:"max-[800px]:text-[length:var(--size-headingMedium,32px)]",shelfHeadingUpTo800Large:"max-[800px]:text-[length:var(--size-headingMedium,36px)]",shelfHeadingUpTo800Xl:"max-[800px]:text-[length:var(--size-headingMedium,40px)]",shelfHeading1:"text-[length:var(--size-headingMedium,40px)]",shelfHeading2:"text-[length:var(--size-headingMedium,48px)]",shelfHeading3:"text-[length:var(--size-headingMedium,56px)]",shelfHeading4:"text-[length:var(--size-headingMedium,64px)]"},mV=[{value:"para",label:"Paragraph size \u2014 13px",cls:`font-mono font-normal uppercase tracking-[0.22em] ${c2.shelfLabel}`},{value:"sm",label:"Small \u2014 40px",cls:`font-heading2 font-medium tracking-[-0.03em] ${c2.shelfHeading1} ${c2.shelfHeadingUpTo800Xs}`},{value:"md",label:"Medium \u2014 48px",cls:`font-heading2 font-medium tracking-[-0.03em] ${c2.shelfHeading2} ${c2.shelfHeadingUpTo800Small}`},{value:"lg",label:"Large \u2014 56px",cls:`font-heading2 font-medium tracking-[-0.03em] ${c2.shelfHeading3} ${c2.shelfHeadingUpTo800Large}`},{value:"xl",label:"Extra large \u2014 64px",cls:`font-heading2 font-medium tracking-[-0.03em] ${c2.shelfHeading4} ${c2.shelfHeadingUpTo800Xl}`}],Ns1="lg";function Rs1(e){return(mV.find(t=>t.value===e)??mV.find(t=>t.value===Ns1)).cls}var ys=(e,t=!1)=>typeof e=="string"?Y(e,t):e,s8=(e,t=!1)=>typeof e=="string"?M(e,t):e;function u0({num:e,title:t,link:a,logo:s,description:o,accent:r,accentNum:i,numStyle:n=$e,look:l="standard",titleAccent:c,accentTracking:h="-0.02em",spaceBelow:p,rowGap:m,descriptionSize:u,className:v="",eyebrowLook:g=Ah,titleSize:f,count:x,capped:b=!1}){let w=p??(l==="editorial"?"mb-[60px]":"");if(l==="shelf")return e||t||o||a?J3("div",{className:`${i9} sticky top-[var(--sf-header-h,88px)] z-30 mb-5 flex items-center justify-between gap-4 max-[800px]:flex-wrap max-[800px]:gap-y-2 border-b border-line bg-bg/95 py-3 backdrop-blur-md ${b?"":"-mx-[var(--sf-site-gutter,40px)] px-[var(--sf-site-gutter,40px)] max-[800px]:-mx-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]"}`,children:[J3("div",{className:"flex min-w-0 items-end gap-6 max-[800px]:flex-col max-[800px]:items-stretch max-[800px]:gap-3",children:[e&&B0("span",{className:`font-mono ${c2.shelfLabel} leading-none uppercase tracking-[0.22em] text-fg-dim`,children:s8(e)}),t&&B0("h2",{className:`${Rs1(f)} leading-none text-fg max-[800px]:leading-[1] [&>span]:block`,children:ys(t)})]}),(o||a||x)&&J3("div",{className:"flex items-center gap-5 max-[800px]:gap-3 min-[800px]:grow min-[800px]:justify-end",children:[o&&B0("span",{className:`max-w-[340px] truncate font-display ${c2.shelfBody} leading-[1.4] text-fg-dim max-[800px]:hidden min-[800px]:w-0 min-[800px]:grow min-[800px]:text-right`,children:s8(o)}),a&&J3(d0,{href:a.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${c2.shelfLabel} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[s8(a.text),B0("span",{"aria-hidden":!0,children:"\u2192"})]}),x&&B0("span",{className:`whitespace-nowrap font-mono ${c2.shelfLabelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:x})]})]}):null;if(l==="editorial"){let k=!!t||!!c;return J3("header",{className:`${w} grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-8 max-[1100px]:grid-cols-1 max-[1100px]:gap-3.5 ${v}`.trim(),children:[e&&(typeof e=="string"?B0(U1,{text:e,className:"pb-2"}):B0("span",{className:"pb-2",children:e})),k&&J3("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5.5vw,80px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:[t,c&&J3(Fs1,{children:[" ",B0("em",{className:"font-serif font-normal italic text-accent",style:{letterSpacing:h},children:c})]})]}),o&&B0("p",{className:`max-w-[360px] pb-1 text-right font-display ${c2.bodySmall} leading-[1.5] text-fg-dim max-[1100px]:max-w-full max-[1100px]:text-left`,children:o})]})}if(l==="simple"){let k=`${w} ${v}`.trim();return J3("div",{className:k||void 0,children:[e&&(typeof e=="string"?B0(U1,{text:e,look:g,className:"mb-4 block"}):B0("span",{className:"mb-4 block",children:e})),t&&B0("h2",{className:`font-heading2 ${c2.headingMedium2} font-medium uppercase leading-none tracking-[-0.02em] text-fg ${c2.headingMediumUpTo800Small}`,children:ys(t)})]})}if(l==="statement"){let k=`${w} ${v}`.trim();return J3("div",{className:k||void 0,children:[e&&(typeof e=="string"?B0(U1,{text:e,look:g,className:"mb-4 block"}):B0("span",{className:"mb-4 block",children:e})),t&&B0("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(40px,5vw,72px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em] text-fg",children:ys(t,!0)})]})}if(l==="natural"){let k=`flex max-w-[680px] flex-col ${m??"gap-5"} ${w} ${v}`.replace(/\s+/g," ").trim();return J3("div",{className:k,children:[e&&(typeof e=="string"?B0(U1,{text:e,look:g}):B0("span",{children:e})),t&&B0("h2",{className:`font-heading2 ${c2.headingMedium2} font-medium leading-[1.05] tracking-[-0.03em] ${c2.headingMediumUpTo800Small}`,children:ys(t)}),o&&B0("p",{className:`${u??`${c2.bodyLarge}`} leading-[1.6] opacity-85`,children:o})]})}if(l==="essay"){let k=`${w} ${v}`.trim();return J3("div",{className:k||void 0,children:[e&&(typeof e=="string"?B0(U1,{text:e,look:g,className:"mb-4 block"}):B0("span",{className:"mb-4 block",children:e})),t&&B0("h2",{className:`font-heading2 ${c2.headingMedium1} [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.02em] text-fg ${c2.headingSmallUpTo800}`,children:ys(t)})]})}let S=!!o||!!a,T=!!t,A=lV(n)==="outlined",P=`font-mono ${c2.label} uppercase tracking-[0.3em]`,E=null;if(e)if(A)E=B0("span",{className:`${cV} text-fg-dim ${Xx}`,children:s8(e)});else if(i&&!r&&typeof e=="string"){let k=e.indexOf("/"),L=k===-1?e:e.slice(0,k),N=k===-1?"":e.slice(k);E=J3("span",{className:P,children:[B0("span",{className:"text-accent",children:s8(L)}),N&&B0("span",{className:"text-fg-dim",children:s8(N)})]})}else E=B0("span",{className:`${P} ${r?"text-accent":"text-fg-dim"}`,children:s8(e)});return J3("div",{className:"mb-16 grid grid-cols-[auto_1fr_auto] items-end gap-10 border-b border-line pb-6 max-[800px]:mb-9 max-[800px]:grid-cols-1 max-[800px]:gap-3 max-[800px]:pb-5",children:[A&&e&&B0("style",{children:hV}),J3("div",{className:"flex flex-col items-start gap-3",children:[s?.src&&B0("img",{..._s1(u4(s.src)),alt:s.alt,className:"h-8 w-auto object-contain"}),E]}),T&&B0("h2",{className:r?"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,5vw,64px)),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [text-transform:var(--sf-heading-case,uppercase)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-[0.95] tracking-[-0.025em]":`font-heading2 ${c2.headingMedium3} [font-weight:var(--sf-heading-weight,500)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.03em] whitespace-pre-line ${c2.headingMediumUpTo800Large} max-[800px]:leading-[1]`,children:ys(t)}),S&&J3("div",{className:"flex flex-col items-end gap-3 max-[800px]:items-start",children:[o&&B0("p",{className:`max-w-[340px] font-display ${c2.bodySmall} leading-[1.5] text-fg-dim text-right max-[800px]:max-w-full max-[800px]:text-left`,children:s8(o)}),a&&J3(d0,{href:a.href,className:`inline-flex items-center gap-2 whitespace-nowrap font-mono ${c2.label} uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg`,children:[s8(a.text),B0("span",{"aria-hidden":!0,children:"\u2192"})]})]})]})}function _s1(e){let t=j0(e,{fallbackWidth:640,maxWidth:960});return t.srcSet?{src:t.src,srcSet:t.srcSet,sizes:"240px"}:{src:e}}import{jsx as D5,jsxs as Wi}from"react/jsx-runtime";function Is1(e){return e.type==="textarea"||e.type==="select"||e.type==="checkbox"}function dV({eyebrow:e,title:t}){return Wi("div",{className:"flex flex-col gap-4",children:[e&&D5(U1,{text:e,scaled:!1}),t&&D5("h2",{className:"font-display text-[min(clamp(40px,5vw,72px),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:Y(t,!0)})]})}function wm({body:e,buttonLabel:t,consent:a,form:s,submission:o,showForm:r,resolving:i,editing:n}){return Wi("div",{className:"flex flex-col gap-8",children:[e&&P0(e).map((l,c)=>D5("p",{className:"max-w-[480px] font-display text-[16px] leading-[1.6] text-fg-dim",children:M(l)},c)),r&&(s?o.done?D5("p",{role:"status",className:"max-w-[480px] font-[family-name:var(--sb-thanks-font,var(--font-serif))] text-[length:var(--sb-thanks-size,17px)] italic leading-[1.6] text-fg-dim",children:xs(s)}):Wi("form",{className:"grid grid-cols-2 gap-2",onSubmit:o.handleSubmit,children:[s.fields.map(l=>{let c=["border border-line bg-transparent px-4 py-4 font-[family-name:var(--sb-field-font,var(--font-mono))] text-[length:var(--sb-field-size,14px)] tracking-[0.1em] text-fg outline-none focus:border-accent",Is1(l)?"col-span-2":""].join(" ");return l.type==="checkbox"?Wi("label",{className:"col-span-2 flex items-start gap-3 font-[family-name:var(--sb-tick-font,var(--font-mono))] text-[length:var(--sb-tick-size,12px)] uppercase tracking-[0.18em] text-fg-dim",children:[D5(b9,{field:l,value:o.valueOf(l.key),onChange:h=>o.set(l.key,h),className:"mt-0.5 size-4 accent-accent"}),Wi("span",{children:[l.label,l.required?D5("span",{className:"text-accent",children:" *"}):null]})]},l.key):D5(b9,{field:l,value:o.valueOf(l.key),onChange:h=>o.set(l.key,h),rows:4,placeholder:l.placeholder||l.label,className:l.type==="textarea"?`${c} resize-y`:c},l.key)}),D5(ws,{value:o.honeypot,onChange:o.setHoneypot}),o.error&&D5("p",{role:"alert",className:"col-span-2 font-mono text-[12px] uppercase tracking-[0.18em] text-alert",children:o.error}),t&&D5("button",{type:n?"button":"submit",disabled:o.submitting,className:"col-span-2 cursor-pointer bg-btn px-6 py-4 font-mono text-[14px] uppercase tracking-[0.32em] text-btn-ink transition-colors hover:bg-fg hover:text-bg disabled:cursor-wait disabled:opacity-60",children:o.submitting?"Sending\u2026":M(t)})]}):D5("p",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim",children:i?d("Loading form\u2026"):d("Choose a form in the inspector, under Form \u2014 until then this form is hidden on the live page and nothing can be submitted.")})),r&&a&&D5("span",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim/70",children:M(a)})]})}var ym=["field","tick","thanks"],ew={field:"Form rows",tick:"Tick label",thanks:"Thank-you message"},zm={field:"styleField",tick:"styleTick",thanks:"styleThanks"},uV={field:{font:"--sb-field-font",size:"--sb-field-size"},tick:{font:"--sb-tick-font",size:"--sb-tick-size"},thanks:{font:"--sb-thanks-font",size:"--sb-thanks-size"}};function Vs1(e){return typeof e=="string"&&q6.includes(e)?e:null}var Os1={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:900};function gV(e){let t={};for(let a of ym){let s=Vs1(e[zm[a]]);if(!s)continue;let o=ea({role:s},Os1);o.fontFamily&&(t[uV[a].font]=o.fontFamily),o.fontSize&&(t[uV[a].size]=o.fontSize)}return t}import{jsx as km}from"react/jsx-runtime";var vV=["head","form"],fV={head:"Head",form:"Form"};function tw({region:e,eyebrow:t,title:a,body:s,buttonText:o,consent:r,formSlug:i,form:n,editing:l=!1,...c}){let h=c7(i,n),p=f9({form:h,formSlug:i,editing:l}),m=gV(c);return e==="head"?km("div",{style:m,children:km(u0,{look:"statement",num:t,title:a})}):km("div",{style:m,children:km(wm,{body:s??"",buttonLabel:o??"",consent:r??"",form:h,submission:p,showForm:!!h||l,resolving:h===void 0,editing:l})})}var Bs1={AppointmentBooking:{slot:"boxes",childType:"BookingBox",addLabel:"Add box",fixed:!0,seeds:()=>rV.map(e=>({region:e,name:iV[e]})),addBlocked:()=>d("A Booking Form is these three boxes. They cannot be added to or removed."),skipSeed:e=>e.layout!=="boxes"},SubmitBuild:{slot:"boxes",childType:"SubmitBox",addLabel:"Add box",fixed:!0,seeds:()=>vV.map(e=>({region:e,name:fV[e]})),addBlocked:()=>d("A Submit-a-build section is these two boxes. They cannot be added to or removed."),skipSeed:e=>e.layout!=="boxes"},Collections:{slot:"cards",childType:"CollectionCard",addLabel:"Add card",seeds:()=>Array.from({length:II},()=>({collection:null}))},ProductGrid:{slot:"products",childType:"ProductRef",addLabel:"Add product",seeds:()=>[{code:""},{code:""},{code:""}],legacy:e=>Array.isArray(e.design_codes)?e.design_codes.map(t=>t?.code).filter(t=>!!t).map(t=>({code:t})):[]},GalleryB:{slot:"items",childType:"GalleryItem",addLabel:"Add image",seeds:()=>$I.map(e=>({...e})),legacy:e=>Array.isArray(e.cards)?e.cards.map(t=>({...t})):[]}};nL(Bs1);function zs(e,t){let a={};for(let s of Object.keys(e))a[s]={...e[s],...t[s]};return a}import{jsx as Ds1}from"react/jsx-runtime";import{OpacityIcon as Zs1}from"efficient-easel/icons";var bV={fields:{_gContent:y("Content"),eyebrow:O("Eyebrow","Limited release"),title:U("Heading","Banner headline"),body:U("Body","A line or two of supporting copy."),_gBackground:y("Background image"),imageSrc:J1("Image","image/*"),overlay:o1("Overlay",Ds1(Zs1,{}),0,100,5,60,"%"),_gButton:y("Button"),...V5,_gLayout:y("Layout")}};var Sm={meta:"Trailing note"},xV={label:"Breadcrumb",defaultProps:{items:[],meta:""}};var wV={fields:{_gContent:y("Content"),items:{type:"array",label:"Crumbs",arrayFields:{label:q("Label"),href:o3(q("Link"))},getItemSummary:e=>e?.label||"Crumb"},meta:O("Trailing note",Sm.meta)}};import{jsx as z3,jsxs as Gs1}from"react/jsx-runtime";import{ButtonIcon as Ws1,ButtonIconIcon as Us1,GroundIcon as qs1,IconAfterTextIcon as $s1,IconBeforeTextIcon as js1,StylesIcon as Ks1,TextColorIcon as Ys1,WidthIcon as Xs1}from"efficient-easel/icons";import*as Js1 from"efficient-easel/icons";import{SettingsField as Qs1}from"efficient-easel/panel";import{useSelectedFields as kV}from"efficient-easel/easel";import{IconPicker as eo1,Segmented as to1}from"efficient-shell/ui";function Cm(e){return typeof e=="boolean"?e:!0}var aw=["none","arrow-right","arrow-long-right","arrow-up-right","chevron-right","external","cart","bag","tag","email","location","play","download","search","car"];function sw(e){return typeof e=="string"&&aw.includes(e)?e:void 0}function yV(e,t){return sw(e)??(Cm(t)?"arrow-right":"none")}function Mm(e){return e==="before"?"before":"after"}function zV(e){return e==="fill"?"fill":"fit"}import{NoControlMark as ao1,noControlField as so1}from"efficient-easel/screen/lib/puck/panel-no-control-mark";var ow=e=>({...so1({type:"custom",render:()=>z3(ao1,{})},"always"),reachedBy:e});function oo1(e){let t=(e==="none"?"no-symbol":e).replace(/(^|-)([a-z])/g,(s,o,r)=>r.toUpperCase()),a=Js1[`${t}Icon`];return a?z3(a,{size:16}):null}var ro1=aw.map(e=>({value:e,icon:oo1(e)}));function io1({value:e,onChange:t}){let a=kV(),s=a.values.href,o=typeof e=="string"?e:e&&typeof e=="object"&&"text"in e?String(e.text??""):"";return z3(CT,{label:"Button",icon:z3(Ws1,{size:18}),text:o,onTextChange:t,link:typeof s=="string"?s:"",onLinkChange:r=>a.onChange("href",r)})}function no1({value:e,onChange:t}){let a=kV(),s=yV(e,a.values.arrow),o=Mm(a.values.iconPosition);return z3(Qs1,{label:d("Icon"),icon:z3(Us1,{size:18}),children:Gs1("div",{className:"flex items-center gap-2",children:[z3(eo1,{label:d("Icon"),value:s,emptyValue:"none",options:ro1,onChange:t}),s!=="none"&&z3(to1,{size:"sm",block:!0,label:d("Icon position"),value:o,onChange:r=>a.onChange("iconPosition",r),options:[{value:"before",icon:z3(js1,{size:16}),label:z3("span",{className:"sr-only",children:d("Icon before text")}),title:d("Icon before text")},{value:"after",icon:z3($s1,{size:16}),label:z3("span",{className:"sr-only",children:d("Icon after text")}),title:d("Icon after text")}]})]})})}var SV={fields:{label:IT(q("Button"),e=>z3(io1,{value:e.value,onChange:e.onChange})),href:{...$1("Button link"),...ow("label")},_dSize:c0("Size"),widthFit:f1("Width",z3(Xs1,{}),[{label:"Fit content",value:"fit"},{label:"Fill",value:"fill"}],"fit"),_gStyle:y("Style"),variant:f1("Style",z3(Ks1,{}),[{label:"Filled",value:"primary"},{label:"Outline",value:"ghost"}],"primary"),icon:{type:"custom",render:e=>z3(no1,{value:e.value,onChange:e.onChange})},iconPosition:ow("icon"),arrow:ow("icon"),buttonColor:Y3("Fill color",tE,z3(qs1,{})),buttonTextColor:Y3("Text color",aE,z3(Ys1,{})),_dLayout:c0("Layout"),align:O5()}};import{jsx as iw}from"react/jsx-runtime";import{ColumnsIcon as mo1,StylesIcon as EV}from"efficient-easel/icons";import{jsx as lo1}from"react/jsx-runtime";import{ListIcon as co1}from"efficient-easel/icons";function Z5(e,t){return y1(e,lo1(co1,{}),[{label:t,value:""}],"")}var CV=new WeakMap,MV=-1,rw={},LV=new WeakMap;function ho1(e,t,a){MV!==Oe()&&(MV=Oe(),rw={});let s=CV.get(t);(!s||LV.get(s)!==rw)&&(s=new Map,LV.set(s,rw),CV.set(t,s));let o=di(e),r=a&&!o.some(l=>l.key===a)?a:"",i=`${e}\0${r}`,n=s.get(i);return n||(n={...t,options:[...t.options,...o.map(l=>({label:l.label,value:l.key})),...r?[{label:r,value:r}]:[]]},s.set(i,n)),n}var AV=new WeakMap,po1={not:{field:o9,set:!0}};function G5(e,t,a,s={}){let o=t[o9];if(!o)return t;let r=w3(a),i=di(e).length>0||r!=="",n=i?ho1(e,o,r):null,l=AV.get(t);l||AV.set(t,l=new Map);let c=`${Oe()}\0${i?"1":"0"}\0${r}\0${(s.hides??[]).join(",")}`,h=l.get(c);if(h)return h;let p=new Set(s.hides??[]),m={};for(let[u,v]of Object.entries(t))u===o9?n&&(m[u]=n):m[u]=p.has(u)&&v&&typeof v=="object"?R3(v,po1):v;return l.set(c,m),m}var ks={eyebrow:"Label",title:"Section *heading.*"},TV={label:"Cards",defaultProps:{eyebrow:"",title:"",items:[],columns:3}};var HV={fields:{_gContent:y("Content"),eyebrow:O("Eyebrow",ks.eyebrow),eyebrowLook:y1("Eyebrow style",iw(EV,{}),[...N5],W7("Cards")),title:U("Heading",ks.title),dataSource:Z5("Cards from","Typed here"),items:{type:"array",label:"Cards",arrayFields:{title:w1("Card title"),body:W1("Card body")},defaultItemProps:{title:"",body:""},getItemSummary:e=>e?.title||e?.body||"Card"},_gStyle:y("Style"),cardStyle:y1("Card style",iw(EV,{}),[{label:"Cards",value:"cards"},{label:"Label only",value:"label-only"}],"cards"),columns:o1("Columns",iw(mo1,{}),2,4,1,3)},resolveFields:(e,{fields:t,parent:a})=>{let s=t0(s0(G5("Cards",t,e.props,{hides:["items"]}),a,o0),e.props.headPlacement,X1.Cards.headRows);if(e.props.cardStyle!=="label-only")return s;let o=s.items,r=s.eyebrowLook;return{...s,...o?{items:{...o,arrayFields:{title:w1("Feature label"),href:o3(q("Link"))}}}:{},...r?{eyebrowLook:{...r,fallback:W7("KeyFeatures")}}:{}}}};import{jsx as do1}from"react/jsx-runtime";import{StickyIcon as uo1}from"efficient-easel/icons";var PV={fields:{tabs:{type:"array",label:"Tabs",arrayFields:{label:q("Label"),count:q("Count")},getItemSummary:e=>e?.label?`${e.label}${e.count?` \xB7 ${e.count}`:""}`:"Tab"},activeTab:O2(o3(q("Active tab","All"))),_gLinks:y("Links"),links:{type:"array",label:"Right links",arrayFields:{label:q("Label"),href:o3(q("Link"))},getItemSummary:e=>e?.label||"Link"},_gStyle:y("Style"),sticky:i1("Stick to top",!0,do1(uo1,{}))}};import{jsx as go1}from"react/jsx-runtime";import{StylesIcon as vo1}from"efficient-easel/icons";var Ss={eyebrow:"By the numbers",title:`A picture worth
|
|
18
18
|
*a thousand rows.*`},FV={label:"Chart",defaultProps:{eyebrow:"",title:"",body:"",items:[],caption:"",chartStyle:"bars",valueSuffix:""}};var NV={fields:{_gContent:y("Content"),eyebrow:O("Chip label",Ss.eyebrow),title:U("Heading",Ss.title),body:U("Body",""),items:{type:"array",label:"Data points",arrayFields:{label:w1("Label"),value:q("Value")},defaultItemProps:{label:"",value:""},getItemSummary:e=>[e?.label,e?.value].filter(Boolean).join(" \xB7 ")||"Point"},caption:O("Caption","Illustrative example"),_gStyle:y("Style"),chartStyle:y1("Chart style",go1(vo1,{}),[{label:"Bars (comparison / funnel)",value:"bars"},{label:"Line (trend)",value:"line"},{label:"Donut (split of a whole)",value:"donut"}],"bars"),valueSuffix:O2(O("Value suffix","%"))}};import{jsx as Io1}from"react/jsx-runtime";import{jsx as O1,Fragment as cw,jsxs as S6}from"react/jsx-runtime";import{useId as yo1,useState as zo1}from"react";import{InspectorUpLevel as Ui}from"efficient-easel/chrome";import{useEasel as ko1}from"efficient-easel/easel";import{ListField as BV}from"efficient-easel/fields";import{SettingsField as DV}from"efficient-easel/panel";import{ClockIcon as IV,ContrastIcon as So1,GlobeIcon as Co1,LinkIcon as Mo1,LocationIcon as Lo1,PhoneIcon as Ao1,SquareIcon as To1,TypeIcon as hw}from"efficient-easel/icons";import{useSectionOps as Eo1}from"efficient-easel/screen/lib/puck/use-section-ops";import{ROOT_ZONE as Ho1}from"efficient-easel/draw";function fo1(){return typeof document>"u"?!1:document.documentElement.getAttribute("data-theme")==="light"}function Lm(e="auto"){return e==="light"?!0:e==="dark"?!1:fo1()}function RV(e){if(typeof document>"u")return()=>{};let t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>t.disconnect()}function Cs(e,t){return Number.isFinite(e)&&Number.isFinite(t)&&!(e===0&&t===0)}function Ms(e){let t=Number.parseFloat(e??"");return Number.isFinite(t)?t:0}var bo1=["tall","square","wide"],xo1="tall";function Am(e){return bo1.includes(String(e??""))?String(e):xo1}var S2={sectionNumber:"\xB7 Locations",heading:"Our *locations.*",tagline:"Visit us in person \u2014 find your nearest studio below.",galleryKicker:"Gallery",galleryHint:"Hover to see in colour \xB7 click to jump",mapTheme:"auto"},Ls=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
19
19
|
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""},{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|