efficient-web-builder 0.8.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +109 -1
- package/README.md +24 -5
- package/dist/chunks/{EditorPreviewCheckout-RALICX2M.js → EditorPreviewCheckout-5KOAA2SK.js} +3 -3
- package/dist/chunks/PreviewFooter-H6XJUR5S.js +1 -0
- package/dist/chunks/SectionEditorShell-EEZR7KFE.js +1 -0
- package/dist/chunks/{SiteEditorProvider-4NZYBEVE.js → SiteEditorProvider-ECGZVKLG.js} +1 -1
- package/dist/chunks/StorefrontEditorChrome-4TFS62GY.js +1 -0
- package/dist/chunks/chunk-6CP4D6VJ.js +1 -0
- package/dist/chunks/chunk-7QXLVNFD.js +1 -0
- package/dist/chunks/chunk-BJOS4Y35.js +15 -0
- package/dist/chunks/chunk-EIXUXJQ5.js +153 -0
- package/dist/chunks/chunk-H7O6ZYX6.js +1 -0
- package/dist/chunks/chunk-IFRGL3GL.js +1 -0
- package/dist/chunks/chunk-ML2AR222.js +1 -0
- package/dist/chunks/chunk-RRHBLOH4.js +1 -0
- package/dist/chunks/chunk-S6SXIMIG.js +2 -0
- package/dist/chunks/chunk-SNH7IFTZ.js +1 -0
- package/dist/chunks/chunk-Y4CZD2YY.js +230 -0
- package/dist/chunks/{chunk-6VNEBJKI.js → chunk-YVQUISDX.js} +1 -1
- package/dist/chunks/fitment-data-6NXSKODX.js +1 -0
- package/dist/chunks/render-client-YGYDU3K2.js +1 -0
- package/dist/editor.css +1 -1
- package/dist/index.d.ts +184 -4
- package/dist/index.js +920 -648
- package/dist/links.js +1 -1
- package/package.json +2 -2
- package/dist/chunks/PreviewFooter-SNJQZ6JZ.js +0 -1
- package/dist/chunks/SectionEditorShell-U5FUJW2M.js +0 -1
- package/dist/chunks/StorefrontEditorChrome-6OQOFCL6.js +0 -1
- package/dist/chunks/chunk-4MT74TMP.js +0 -1
- package/dist/chunks/chunk-764WH3TY.js +0 -11
- package/dist/chunks/chunk-CZ46NWN5.js +0 -230
- package/dist/chunks/chunk-DN65SLZM.js +0 -1
- package/dist/chunks/chunk-KZIT3J33.js +0 -1
- package/dist/chunks/chunk-RTCXXI5U.js +0 -143
- package/dist/chunks/chunk-TX7ND7AF.js +0 -1
- package/dist/chunks/chunk-WQ7W4AXL.js +0 -15
- package/dist/chunks/chunk-XMRSKZIR.js +0 -2
- package/dist/chunks/fitment-data-6EHBA26C.js +0 -1
- package/dist/chunks/render-client-ISZ5CGAI.js +0 -1
- /package/dist/chunks/{chunk-WQ7W4AXL.js.LEGAL.txt → chunk-BJOS4Y35.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-RTCXXI5U.js.LEGAL.txt → chunk-EIXUXJQ5.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-UBYBQ3KR.js → chunk-HVOO2GNE.js} +0 -0
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{$b as la,Aa as zd,Ab as mu,Bb as xu,Cb as oa,Da as ms,Db as cr,Eb as ra,F as lo,Fb as na,G as Eo,Gb as aa,Ha as Kd,Hb as gu,I as so,Ia as Kt,Ib as Iu,J as Xn,Jb as hu,Ka as ar,Kb as bu,Nb as Xe,Nc as vu,Oc as en,Pb as co,Ra as et,Sa as ru,Ta as Qn,Ub as yu,Va as nu,_a as hs,bb as au,cc as Su,db as lu,dc as Cu,eb as su,ec as Pu,f as fs,fd as ys,g as Qr,gd as Tu,hc as ku,id as Ru,j as Bd,k as no,kb as Pe,kc as wu,l as ao,lb as io,m as rr,n as nr,na as Hd,o as Dd,ob as ir,pb as iu,qa as Lo,qb as cu,r as ds,ra as ps,rb as fu,rd as Fu,sa as jn,sb as bs,sd as sa,t as Md,ta as Gd,tb as du,u as us,ub as uu,ud as uo,vb as ea,wb as ta,wd as Ss,xa as Wd,ya as Ud,zb as pu}from"./chunk-764WH3TY.js";import{A as _o,E as at,F as Qd,G as lr,H as eu,J as tu,P as Rt,Q as Ao,R as ou,S as sr,T as oe,e as xs,i as $d,j as gs,l as Vd,m as qd,n as Ye,o as Is,p as Yd,r as Jn,s as Xd,t as jd,u as Jd,v as Zn,w as $t,y as Zd}from"./chunk-4MT74TMP.js";import{b as fo}from"./chunk-UBYBQ3KR.js";import{useMemo as PS}from"react";import{useEasel as kS}from"efficient-easel/easel";function Eu(e={}){let{dispatch:t}=kS(r=>r),o=e.readOnly===!0;return PS(()=>{let r=(a,l,s)=>{let i=Lo(l);return o||t({type:"insert",componentType:l,destinationZone:a,destinationIndex:s,id:i}),i},n=(a,l,s)=>{o||t({type:"replace",destinationZone:a,destinationIndex:l,data:s})};return{insertComponent:r,insertSection:(a,l)=>r(Gd,a,l),replaceComponent:n,seedChild:(a,l,s,i)=>{let c=r(a,s,l);n(a,l,{type:s,props:{id:c,...i}})},insertNode:(a,l,s)=>{let i=r(a,s.type,l);return n(a,l,{type:s.type,props:{...s.props,id:i}}),i},removeComponent:(a,l)=>{o||t({type:"remove",index:l,zone:a})},reorderComponent:(a,l,s)=>{o||t({type:"reorder",sourceIndex:l,destinationIndex:s,destinationZone:a})},duplicateComponent:(a,l)=>{o||t({type:"duplicate",sourceIndex:l,sourceZone:a})},select:a=>t({type:"setUi",ui:{itemSelector:a}}),setDocument:a=>{o||t({type:"setData",data:a})},commitDocument:a=>{o||t({type:"setData",data:()=>a,recordHistory:!0})}}},[t,o])}var bt=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],ia="bottom-left";var tn={"top-left":"Top left","top-center":"Top center","top-right":"Top right",left:"Left",center:"Center",right:"Right","bottom-left":"Bottom left","bottom-center":"Bottom center","bottom-right":"Bottom right"};function wS(e){let t=bt.indexOf(po(e));return{band:Math.floor(t/3),column:["start","center","end"][t%3]}}function vS(e){return 1+wS(e).band*6}function cN(e){return vS(e)+1}function po(e){return bt.includes(e)?e:ia}function fN(e){let t=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-40,Math.min(40,Math.round(t)))}function dN(e,t=60){let o=typeof e=="number"&&Number.isFinite(e)?e:t;return Math.max(30,Math.min(100,Math.round(o)))}function Cs(e,t){let o=po(t);return e.filter(r=>po(r?.props?.placement)===o).length}function Lu(e){return`${tn[po(e)]} already holds 4 boxes. Move one somewhere else first.`}function Ps(e,t){let o=e.filter(r=>r?.props?.id!==t);return bt.map(r=>{let n=Cs(o,r)>=4,a=tn[r];return n?{value:r,label:a,disabled:!0,title:Lu(r)}:{value:r,label:a}})}function ca(e,t){let o=t===void 0?ia:po(t?.props?.placement);return Cs(e,o)>=4?Lu(o):null}var _u="HeroGroup";function uN(e){let t=new Map,o=!1,r=e.filter(n=>{let a=po(n?.props?.placement),l=(t.get(a)??0)+1;return t.set(a,l),l<=4?!0:(o=!0,!1)});return o?r:e}function TS(e){return bt.map(t=>{let o=Cs(e,t);return{anchor:t,total:o,hidden:o-4}}).filter(t=>t.hidden>0)}function ks(e){let t=TS(e);return t.length===0?null:t.map(({anchor:o,total:r,hidden:n})=>{let a=tn[o],l=n===1?"1 is not shown":`${n} are not shown`;return`${a} holds ${r} boxes. The published page draws the first 4, so ${l}. ${n===1?"Move it":"Move them"} somewhere else.`}).join(" ")}function pN(e,t){let o=t;if(o?.type!==_u)return null;let r=o.props?.id===void 0?"":String(o.props.id);return r?ca(ws(e,r),o):null}function ws(e,t){let o=Au(e,t);return o&&o.ownerType===FS?o.siblings:[]}function mN(e,t){let o=Au(e,t);return o?o.ancestorTypes.filter(r=>r===_u).length:RS}var RS=1,FS="HeroSlide";function Au(e,t){let o=n=>Array.isArray(n)&&n.length>0&&n.every(a=>!!a&&typeof a=="object"&&typeof a.type=="string"),r=(n,a,l)=>{if(a>12||!n||typeof n!="object")return null;if(o(n)){if(n.some(s=>s?.props?.id===t))return{siblings:n,ownerType:l.at(-1)??null,ancestorTypes:l};for(let s of n){let i=s.type,c=r(s,a+1,[...l,String(i)]);if(c)return c}return null}for(let s of Object.values(n)){let i=r(s,a+1,l);if(i)return i}return null};return r(e,0,[])}var lt="site-footer";var gN=lt,IN={desktop:!0,tablet:!0,mobile:!0},hN={desktop:!1,tablet:!1,mobile:!1},vs=1,Ou=6,bN=Array.from({length:Ou-vs+1},(e,t)=>vs+t),fa={desktop:6,tablet:3,mobile:2},ES={2:{desktop:2,tablet:2,mobile:1},3:{desktop:3,tablet:3,mobile:1},4:{desktop:4,tablet:2,mobile:2},5:{desktop:5,tablet:3,mobile:2},6:{desktop:6,tablet:3,mobile:2}},Oo=e=>Math.min(Math.max(Math.round(e),vs),Ou);function yN(e){if(typeof e=="number")return ES[Oo(e)]??{desktop:Oo(e),tablet:Oo(e),mobile:Oo(e)};if(e&&typeof e=="object"){let t=e;return{desktop:Oo(t.desktop??fa.desktop),tablet:Oo(t.tablet??fa.tablet),mobile:Oo(t.mobile??fa.mobile)}}return{...fa}}function LS(e){let t=e?.content;return Array.isArray(t)?t.find(r=>!!r&&typeof r=="object"&&r.type==="Footer")??null:null}function SN(e){let t=e?.content;return Array.isArray(t)?t.find(r=>!!r&&typeof r=="object"&&r.type===_S)??LS(e):null}var _S="SiteFooter",AS="SiteHeader";function CN(e){let t=e?.content;return Array.isArray(t)?t.find(r=>!!r&&typeof r=="object"&&r.type===AS)??null:null}function je(e,t){if(typeof e=="string")return e||t;if(e&&typeof e=="object"&&"text"in e){let o=e.text;return typeof o=="string"&&o?o:t}return t}function Nu(e,t){return typeof e=="number"&&Number.isFinite(e)?e:t}function Bu(e,t){return typeof e=="boolean"?e:t}function da(e,t){if(!Array.isArray(e))return t;let o=e.map(r=>typeof r=="string"?r:je(r?.text,"")).map(r=>r.trim()).filter(Boolean);return o.length?o:t}var ua="cart-drawer",vN="cart-drawer";var OS={kickerBadge:"",kickerText:"Your order",titleLead:"Your",titleAccent:"cart.",subtitleEmpty:"Empty for now.",subtitleOne:"One set in your cart.",subtitleMany:"{count} sets in your cart.",leadTimeValue:"",shipsToFallback:"",promises:[],emptyKicker:"No wheels yet",emptyBody:"Your cart is empty. Pick a wheel to get started."};function TN(e,t){return t===0?e.subtitleEmpty:t===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(t))}function RN(e){let t=e??{},o=OS;return{kickerBadge:je(t.kickerBadge,o.kickerBadge),kickerText:je(t.kickerText,o.kickerText),titleLead:je(t.titleLead,o.titleLead),titleAccent:je(t.titleAccent,o.titleAccent),subtitleEmpty:je(t.subtitleEmpty,o.subtitleEmpty),subtitleOne:je(t.subtitleOne,o.subtitleOne),subtitleMany:je(t.subtitleMany,o.subtitleMany),leadTimeValue:je(t.leadTimeValue,o.leadTimeValue),shipsToFallback:je(t.shipsToFallback,o.shipsToFallback),promises:da(t.promises,o.promises),emptyKicker:je(t.emptyKicker,o.emptyKicker),emptyBody:je(t.emptyBody,o.emptyBody)}}var NS=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],LN={meta:"Meta line",eyebrow:"Eyebrow",heading:"Heading",body:"Body",statName:"Stat name",statValue:"Stat value",formEyebrow:"Form eyebrow",formHeading:"Form heading",formIntro:"Form intro",fieldLabel:"Field label",option:"Option",finePrint:"Fine print",dismiss:"Dismiss link",doneHeading:"Success heading",doneBody:"Success message"},BS={meta:"styleMeta",eyebrow:"styleEyebrow",heading:"styleHeading",body:"styleBody",statName:"styleStatName",statValue:"styleStatValue",formEyebrow:"styleFormEyebrow",formHeading:"styleFormHeading",formIntro:"styleFormIntro",fieldLabel:"styleFieldLabel",option:"styleOption",finePrint:"styleFinePrint",dismiss:"styleDismiss",doneHeading:"styleDoneHeading",doneBody:"styleDoneBody"},_N={meta:{font:"--pp-meta-font",size:"--pp-meta-size"},eyebrow:{font:"--pp-eyebrow-font",size:"--pp-eyebrow-size"},heading:{font:"--pp-heading-font",size:"--pp-heading-size"},body:{font:"--pp-body-font",size:"--pp-body-size"},statName:{font:"--pp-statname-font",size:"--pp-statname-size"},statValue:{font:"--pp-statvalue-font",size:"--pp-statvalue-size"},formEyebrow:{font:"--pp-formeyebrow-font",size:"--pp-formeyebrow-size"},formHeading:{font:"--pp-formheading-font",size:"--pp-formheading-size"},formIntro:{font:"--pp-formintro-font",size:"--pp-formintro-size"},fieldLabel:{font:"--pp-fieldlabel-font",size:"--pp-fieldlabel-size"},option:{font:"--pp-option-font",size:"--pp-option-size"},finePrint:{font:"--pp-fineprint-font",size:"--pp-fineprint-size"},dismiss:{font:"--pp-dismiss-font",size:"--pp-dismiss-size"},doneHeading:{font:"--pp-doneheading-font",size:"--pp-doneheading-size"},doneBody:{font:"--pp-donebody-font",size:"--pp-donebody-size"}};function DS(e){return typeof e=="string"&&Kt.includes(e)?e:null}function Du(e){let t={};for(let o of NS){let r=DS(e[BS[o]]);r&&(t[o]=r)}return t}var Fs="subscribe-popup",MN="subscribe-popup";var MS=[Fs,lt,ua];function on(e){return MS.includes(e)}var HS=["delay","scroll","exit"],GS=["all","chosen"],WS=["visit","days","never"],US=["right","left"],zS={min:0,max:60},KS={min:10,max:90},$S={min:1,max:90},Rs={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
|
|
2
|
-
*Highlight line*`,deck:"Add a sentence or two of supporting copy.",stats:[{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"}],formLabel:"Section label",formHeading:"Main heading *highlight*",formIntro:"Add a sentence or two of supporting copy.",firstNameLabel:"Field label",firstNamePlaceholder:"Placeholder",emailLabel:"Field label",emailPlaceholder:"Placeholder",interestsLabel:"Field label",interests:["Option one","Option two","Option three"],frequencyLabel:"Field label",frequencies:["Option one","Option two","Option three"],submitText:"Button label",finePrint:"Fine print",dismissText:"Dismiss link",emailInvalidText:"Enter a valid email address.",submitErrorText:"Could not subscribe right now. Please try again.",successHeading:"Main heading *highlight*",successBody:"Add a sentence or two of supporting copy \u2014 the {email} and {issue} tokens are substituted here.",keepBrowsingText:"Button label",autoOpen:!1,autoOpenDelaySec:15,formSlug:"",trigger:"delay",scrollPercent:50,showOn:"all",showOnPages:[],hideAfter:"days",hideDays:7,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},xe=je,VS=Nu,Mu=Bu,Gu=da;function pa(e,t,o){return typeof t=="string"&&e.includes(t)?t:o}function Ts(e,t,o){let r=VS(e,o);return Math.min(t.max,Math.max(t.min,Math.round(r)))}function qS(e){return typeof e.hideAfter=="string"?pa(WS,e.hideAfter,Rs.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":Rs.hideAfter}function YS(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t.trim():"").filter(Boolean).map(t=>t.startsWith("/")?t:`/${t}`):[]}function Hu(e,t){if(e==null)return t;let o=r=>r.trim()?r:"";if(typeof e=="string")return o(e);if(typeof e=="object"&&"text"in e){let r=e.text;return typeof r=="string"?o(r):""}return t}function XS(e,t){return Array.isArray(e)?Gu(e,[]):t}function jS(e,t){return Array.isArray(e)?e.map(o=>{let r=o??{};return{label:xe(r.label,""),value:xe(r.value,"")}}).filter(o=>o.label||o.value):t}function HN(e){let t=e??{},o=Rs;return{metaLabel:xe(t.metaLabel,o.metaLabel),issueLabel:Hu(t.issueLabel,o.issueLabel),issueNumber:Hu(t.issueNumber,o.issueNumber),kicker:xe(t.kicker,o.kicker),heading:xe(t.heading,o.heading),deck:xe(t.deck,o.deck),stats:jS(t.stats,o.stats),formLabel:xe(t.formLabel,o.formLabel),formHeading:xe(t.formHeading,o.formHeading),formIntro:xe(t.formIntro,o.formIntro),firstNameLabel:xe(t.firstNameLabel,o.firstNameLabel),firstNamePlaceholder:xe(t.firstNamePlaceholder,o.firstNamePlaceholder),emailLabel:xe(t.emailLabel,o.emailLabel),emailPlaceholder:xe(t.emailPlaceholder,o.emailPlaceholder),interestsLabel:xe(t.interestsLabel,o.interestsLabel),interests:Gu(t.interests,o.interests),frequencyLabel:xe(t.frequencyLabel,o.frequencyLabel),frequencies:XS(t.frequencies,o.frequencies),submitText:xe(t.submitText,o.submitText),finePrint:xe(t.finePrint,o.finePrint),dismissText:xe(t.dismissText,o.dismissText),emailInvalidText:xe(t.emailInvalidText,o.emailInvalidText),submitErrorText:xe(t.submitErrorText,o.submitErrorText),successHeading:xe(t.successHeading,o.successHeading),successBody:xe(t.successBody,o.successBody),keepBrowsingText:xe(t.keepBrowsingText,o.keepBrowsingText),formSlug:typeof t.formSlug=="string"?t.formSlug.trim():o.formSlug,autoOpen:Mu(t.autoOpen,o.autoOpen),autoOpenDelaySec:Ts(t.autoOpenDelaySec,zS,o.autoOpenDelaySec),trigger:pa(HS,t.trigger,o.trigger),scrollPercent:Ts(t.scrollPercent,KS,o.scrollPercent),showOn:pa(GS,t.showOn,o.showOn),showOnPages:YS(t.showOnPages),hideAfter:qS(t),hideDays:Ts(t.hideDays,$S,o.hideDays),formSide:pa(US,t.formSide,o.formSide),valuePanelOnPhone:Mu(t.valuePanelOnPhone,o.valuePanelOnPhone),sectionAccent:t.sectionAccent,sectionCorners:t.sectionCorners,sectionCornerSides:t.sectionCornerSides,textStyles:Du(t)}}var mo=class extends Error{constructor(t,o,r={}){super(o??JS[t],r.cause===void 0?void 0:{cause:r.cause}),this.name="WebsiteBackendError",this.kind=t,this.conflict=r.conflict,this.holder=r.holder}},JS={unauthorized:"The editor's sign-in was refused.","changed-elsewhere":"This page was changed somewhere else.","lock-taken":"Somebody else is editing this page.","not-found":"This no longer exists.",invalid:"The request was refused.",unavailable:"The server could not be reached."};function ma(e,t){if(!e||typeof e!="object")return!1;let o=e;return o.name!=="WebsiteBackendError"||typeof o.kind!="string"?!1:t===void 0||o.kind===t}import{readLockHolder as gC}from"efficient-easel/edit-lock";var Ls="/api/storefront/section-templates/",Es=e=>`${Ls}${encodeURIComponent(e)}/`,_s=e=>e.node!=null;function xa(e){if(!_s(e))throw new Error(`Section template ${e.id} has no design`);return e}var Os=(e,t)=>e instanceof at&&e.status===t;function ZS(e){return{list:()=>sr(`${Ls}?no_page=true`,{token:e()}).then(t=>Array.isArray(t)?t:t.results??[]),get:t=>sr(Es(t),{token:e()}).catch(o=>{if(Os(o,404))return null;throw o}),create:t=>sr(Ls,{method:"POST",token:e(),body:JSON.stringify(t)}),patch:(t,o)=>sr(Es(t),{method:"PATCH",token:e(),body:JSON.stringify(o)}),remove:t=>sr(Es(t),{method:"DELETE",token:e()})}}var As="sf:section-templates",Wu=`${As}.imported`,QS="Untitled section",eC=160,ga=e=>(typeof e=="string"?e.trim().slice(0,eC):"")||QS;function tC(e){try{let t=JSON.parse(e);return Array.isArray(t)?t.filter(o=>{let r=o?.node;return typeof o?.id=="string"&&typeof r?.type=="string"}):[]}catch{return[]}}async function oC(e,t=xs){let o={created:0,seeded:0,left:0,skipped:0,kept:!1},r=t.getItem(As);if(r===null)return o;for(let n of tC(r))try{let a=await e.get(n.id);if(a)a.node==null?(await e.patch(n.id,{node:n.node}),o.seeded+=1):o.left+=1;else try{await e.create({id:n.id,name:ga(n.name),node:n.node}),o.created+=1}catch(l){if(!Os(l,400))throw l;o.skipped+=1}}catch{return{...o,kept:!0}}return t.setItem(Wu,r),t.getItem(Wu)===r&&t.removeItem(As),o}var Ia=class{constructor(t,o=xs){this.readToken=t;this.storage=o;this.imported=null;this.http=ZS(t)}ready(){return this.imported?this.imported:this.readToken()?(this.imported=oC(this.http,this.storage).catch(()=>{}),this.imported):Promise.resolve()}async list(){return await this.ready(),(await this.http.list()).filter(_s)}async get(t){return await this.ready(),this.http.get(t)}async ensure(t,o,r){await this.ready();let n=async l=>l?_s(l)?l:xa(await this.http.patch(t,{node:r})):null,a=await n(await this.http.get(t));if(a)return a;try{return xa(await this.http.create({id:t,name:ga(o),node:r}))}catch(l){if(Os(l,400)){let s=await n(await this.http.get(t));if(s)return s}throw l}}async save(t,o){return await this.ready(),xa(await this.http.create({name:ga(t),node:o}))}async update(t,o){return await this.ready(),xa(await this.http.patch(t,{node:o}))}async rename(t,o){return await this.ready(),this.http.patch(t,{name:ga(o)})}async remove(t){await this.ready(),await this.http.remove(t)}};var dt="homepage";var rC="product",nC="tyre";var aC="productType",lC={[rC]:"alloy-wheel",[nC]:"tyre"},sC=["alloy-wheel","tyre"];function VN(e,t){return iC(t)??lC[e]??null}function iC(e){let t=e?.[aC];return typeof t=="string"&&sC.includes(t)?t:null}var cC=["home","products","gallery","about","contact"],fC=e=>{let t=e.slug.trim().toLowerCase(),o=(e.title??"").trim().toLowerCase(),r=cC.findIndex(n=>n===t||n===o);return r===-1?Number.POSITIVE_INFINITY:r},Uu=e=>e.map((t,o)=>({page:t,idx:o,rank:fC(t)})).sort((t,o)=>t.rank-o.rank||t.idx-o.idx).map(t=>t.page);var $u="Popups",zu="Site",dC="Main Pages",uC="Dynamic Pages",pC="dynamic",mC="dynamic";function xC(e){return e.kind===mC}var Vu={[Fs]:{label:"Site popup",group:$u},[lt]:{label:"Footer",group:zu},[ua]:{label:"Cart drawer",group:zu}};function rn(e){return Vu[e.slug]?.label||e.title||e.slug}function Ns(e){let t=e.group?.trim();return t||null}function Ku(e,t){let o=new Map;for(let r of e){let n=t(r),a=o.get(n);a?a.push(r):o.set(n,[r])}return o}function qu(e){let t=Uu(e),o=[],r=t.filter(s=>!on(s.slug)),n=r.filter(s=>!Ns(s));n.length&&o.push({key:"top",group:null,pages:n});let a=r.filter(s=>Ns(s));for(let[s,i]of Ku(a,c=>Ns(c)))o.push({key:`folder:${s}`,group:s,pages:i});let l=t.filter(s=>on(s.slug));for(let[s,i]of Ku(l,c=>Vu[c.slug]?.group??$u))o.push({key:`system:${s}`,group:s,pages:i});return o}function tB(e){let t=[],o=[];for(let r of e){if(xC(r)){o.push(r);continue}let n=r.groupKey??(r.group?`folder:${r.group}`:"top"),a=t[t.length-1];a&&a.key===n?a.rows.push(r):t.push({key:n,label:r.group??dC,rows:[r]})}if(o.length){let r=t.findIndex(n=>n.key.startsWith("system:"));t.splice(r===-1?t.length:r,0,{key:pC,label:uC,rows:o})}return t}var an="page_changed_elsewhere",nn=e=>e.layout_updated_at??e.updated_at??null;function IC(e){if(!e||typeof e!="object")return null;let t=e;return t.code!==an?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 hC(e){return e===401||e===403?"unauthorized":e===404?"not-found":e===lr||e>=500?"unavailable":"invalid"}function bC(e){if(!(e instanceof at))return e;if(e.status===409){let t=IC(e.data);if(t)return new mo("changed-elsewhere",e.message,{conflict:t,cause:e});let o=gC(e.data);if(o)return new mo("lock-taken",e.message,{holder:o,cause:e})}return new mo(hC(e.status),e.message,{cause:e})}var yC={group:"Template pages",groupKey:"template"},Yu=e=>({id:e.id,slug:e.slug,label:e.title||e.slug,...yC,draft:!1});function ju(e){let t=async s=>{let i=e.token();if(!i)throw new mo("unauthorized","The editor has no sign-in yet.");try{return await s(i)}catch(c){throw bC(c)}},o={list:s=>t(async i=>{let c=await oe.listPages(i,s?.siteId);return qu(c.filter(f=>f.slug!==lt)).flatMap(f=>f.pages.map(u=>({id:u.id,slug:u.slug,label:rn(u),group:f.group,groupKey:f.key,draft:!u.is_published,kind:u.kind??null})))}),load:s=>t(async i=>{let c="id"in s?s.id:(await oe.findPageBySlug(s.slug,i,s.siteId))?.id,f=c?await oe.getPageById(c,i):null;return f?{id:f.id,layout:f.layout,kind:f.kind,version:nn(f)}:null}),save:(s,i,c)=>{let{version:f}=c;return f?t(async u=>({version:nn(await oe.saveLayout(s,i.layout,u,f,c.clientId||void 0))})):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:s=>t(i=>oe.getPageById(s,i).then(nn)),publish:(s,i)=>t(async c=>({version:nn(await oe.publishPage(s,c,i?.version))}))},r=s=>({list:()=>t(async i=>(await oe.listTemplatePages(s,i)).map(Yu)),load:i=>t(async c=>{let f=x=>"id"in i?x.id===i.id:x.slug===i.slug,u=x=>({id:x.id,layout:x.layout,version:null}),d=await oe.listTemplatePages(s,c);if(d.length)return u(d.find(f)??d[0]);let p=await oe.getTemplate(s,c).catch(()=>null);try{return u(await oe.createTemplatePage(s,{slug:dt,title:"Home",layout:p?.layout??{}},c))}catch{let x=await oe.listTemplatePages(s,c),g=x.find(f)??x[0];return g?u(g):null}}),save:(i,c)=>t(async f=>(await oe.saveTemplatePageLayout(i,c.layout,f),{version:null})),create:i=>t(async c=>Yu(await oe.createTemplatePage(s,{slug:i.slug,title:i.title,layout:i.layout},c))),remove:i=>t(c=>oe.deleteTemplatePage(i,c))}),n=s=>{let i=s?.siteId??e.siteId();if(!i)throw new mo("not-found","This editor is not connected to a website.");return i},a=s=>({name:s.name,slug:s.slug,mapsApiKey:s.maps_api_key,mapsMapId:s.maps_map_id}),l={pages:o,lock:{claim:(s,i,c)=>t(async f=>({heartbeatSeconds:(await oe.claimPageEditLock(s,f,i,c)).heartbeat_seconds})),release:s=>t(i=>oe.releasePageEditLock(s,i))},site:{get:s=>t(async i=>a(await oe.getSite(n(s),i))),update:(s,i)=>t(async c=>a(await oe.updateSite(n(i),s.mapsApiKey===void 0?{}:{maps_api_key:s.mapsApiKey},c)))},media:{resolve:jd},sectionTemplates:new Ia(e.token),templates:{get:s=>t(async i=>{let c=await oe.getTemplate(s,i);return{id:c.id,name:c.name}}),pages:r}};return l[$d]=!0,l}var Xu=new WeakMap;function ln(e=Ye()){if(e.hostBackend)return e.hostBackend;let t=Xu.get(e);return t||(t=ju({token:()=>e.auth.token,siteId:()=>e.siteId()}),Xu.set(e,t)),t}function uB(e={}){return ju({token:()=>Ye().auth.token,siteId:()=>e.siteId??Ye().siteId()})}var Ju=["general","commerce","service"],fr=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero Slideshow",set:"general"},{type:"HeroSingle",label:"Hero",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"BrandStrip",label:"Brand Strip",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"Gallery",label:"Tabbed Gallery",set:"commerce"},{type:"GalleryB",label:"Customer Photo Grid",set:"commerce"},{type:"SpecStrip",label:"Spec Strip",set:"general"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"},{type:"TyreFitment",label:"Tyre Fitment Form",set:"commerce"},{type:"EuTyreLabel",label:"EU Tyre Label",set:"commerce"},{type:"RelatedProducts",label:"Related Products",set:"commerce"},{type:"BundleOffer",label:"Bundle Products",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"DeliveryOptions",label:"Delivery Options",set:"commerce"},{type:"PaymentBadges",label:"Payment Methods",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Cards",label:"Cards",set:"general"},{type:"KeyFeatures",label:"Key Features",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"StatsParagraph",label:"Stats with Text",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Testimonials",label:"Testimonials",set:"general"},{type:"Reviews",label:"Reviews",set:"service"},{type:"Logos",label:"Logos",set:"general"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Banner",label:"Banner",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"Masthead",label:"Issue Header",set:"general"},{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"Series",label:"Recurring Columns",set:"general"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"},{type:"CategoryBar",label:"Category Bar",set:"general"},{type:"DocTabs",label:"Document Tabs",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocMasthead",label:"Document Header",set:"general"},{type:"DocBody",label:"Document Text",set:"general"},{type:"DocMetaCards",label:"Document Detail Cards",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Spacer",label:"Spacer",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]}];function mB(){return Object.fromEntries(fr.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var SC={Grid:'Lewis, 2026-09-14: Box and Grid duplicate each other and it feels confusing. 2026-09-15 he chose the order: give Box uneven widths FIRST, then merge Grid into Box. Shown three ways to pick the widths (mockup "Uneven Box Widths"), he chose A \u2014 shape pictures on the Box\'s `Block widths` row, the same "a row is a shape, pick a picture of it" rule he set for the photo wall on 2026-09-07.\n\nWHAT REPLACES IT: a Box set to One row, with `Block widths` at Equal or a shape (Big left, Big right, Bigger left, Bigger right) and its own `Columns on phone`. Measured on PRODUCTION 2026-09-16 ~09:28 AEST (database `efficient-system`, all 10 tenant schemas, 128 storefront pages, both `layout` and `published_layout` \u2014 256 documents): 2 Grid nodes, and they are ONE Grid counted twice \u2014 the 9DIEM homepage on 9diem.com (`xtreme_mudder` schema), once as draft and once as published. It is top-level, holds three `ImageBlock`s at `columns` 3 \u2014 equal thirds \u2014 and NO block sets `Positions`. A Box draws that with `Block widths` at Equal.\n\n\u26A0\uFE0F THE COUNT MOVES; THE RULE MUST NOT DEPEND ON IT. This entry has already carried three different readings. A local-clone snapshot said no Grid used `Positions`. A PRODUCTION reading on 2026-09-15 ~13:15 AEST found 6 nodes on two sites, 4 of them spanned \u2014 hartesmetal.com.au homepage and about, 4 columns, spans 1 + 3. That one was TRUE when it was taken and stopped being true the same day: those two pages were rebuilt on Box (`Block widths: Bigger right`), and on 2026-09-16 they hold zero Grid nodes and are built from `Flex`. \u26D4 So the rule is NOT "there are still N spanned Grids". NEVER delete the Grid component or its `gridSpan` handling, whatever a census says \u2014 Grid still renders, still edits, still drags, and a merchant may rebuild a page either way on any day. Re-run the census on production before anyone PROPOSES deleting either, and read any number written here as the reading of its own day, not as the state of the world.\n\nWHAT A MERCHANT LOSES: a new Grid, and with it a fixed "N per row" that wraps by itself past three across, and the per-block `Positions` number. Box wraps with `Wrap`, but by content width, not by a fixed count.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Grid still renders through it and can still be edited, dragged and added to; no document is rewritten and NO MIGRATION RUNS \u2014 the owner redoes live sections himself.\n\n\u26A0\uFE0F AND IT STAYS DROPPABLE WHERE IT LIVES. The drop rule in lib/puck/config.tsx read the nestable containers off the catalogue\'s `structure` row, so leaving the catalogue would have made every open slot \u2014 a Box included \u2014 refuse a Grid already stored inside one. `scripts/test-retired-grid-stays-editable.tsx` \xA73 pins it.',CompatibleTyres:'Lewis, 2026-09-09: "Do not bother counting. Delete Compatible Tyres and use the new one. The new one needs complete settings \u2014 it must have every setting our cards have." Shown three ways to finish it, he chose C: retire from the menu now, and take styling the card text as its own card.\n\nWHAT REPLACES IT: `RelatedProducts` with its `Show` dropdown set to "Tyres that fit this product". That block is the GENERIC relationship section from card 1128 \u2014 it knows nothing about wheels or tyres, it asks the registry for a relationship by name. The two have rendered through the SAME renderer (`DynamicRelatedProducts`) since that card; this one is the pre-registry one-off that was never removed.\n\n\u26A0\uFE0F THE SWAP WAS NOT SAFE UNTIL #1305, AND SAYING SO IS THE POINT. The first old-versus-new table put in front of the owner was WRONG. `DynamicRelatedProducts` returns EARLY on a tyre answer and draws this component, so the seven card settings, the head split and the Width control all stopped at that call \u2014 nine settings, measured NO EFFECT, on precisely the relationship that replaces this block. #1283 gave the new block the card settings, #1299 the head split and its own Width, #1305 carried all of it onto the tyre branch. Only then was the claim true.\n\nWHAT WAS MEASURED BEFORE RETIRING, four ways, because the premise decides the card:\n \u2022 settable text kinds (SECTION_TEXT_KINDS): both blocks ABSENT \u2014 the map holds only TimelineTrack and Footprint, both AUTHORED lists\n \u2022 read-only text regions: neither `components/CompatibleTyres` nor `components/TyreCard` stamps one\n \u2022 panel rows through resolveFields: this block 31, `RelatedProducts` 42. This block\'s only style-ish key is `_sStyle`, the bucket HEADER, not a control\n \u2022 head text (num/title/description) is authored on both, so `_partStyles` reaches it identically\nSo on the CARD runs the two are zero against zero \u2014 neither can style them \u2014 and everywhere else the new block is ahead. Styling those runs needs a section-level prop family and a paint path for DERIVED text, which no section has yet: a part is anchored by matching an AUTHORED prop\'s string against the DOM, and `lib/puck/source-bound-parts` keeps hydrated copy unreachable on purpose so a merchant cannot type into a copy of a product name and lose it at the next sync. That is its own card, and `lib/sections/text-regions` is the read-only half that already ships.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT, the same contract Subscribe, Split and SubscribeBlogs have. Every page holding a `CompatibleTyres` still renders through it, no published document is rewritten, and NO MIGRATION RUNS \u2014 the owner\'s standing ruling of 2026-09-05: he redoes live sections himself and deletes the old ones when he does. He also said explicitly not to count them first.\n\n\u26A0\uFE0F AND THIS COMPONENT IS LOAD-BEARING FOR ITS OWN REPLACEMENT: `DynamicRelatedProducts` draws it for EVERY tyre answer. Deleting it would blank the block that replaces it, not just the pages still holding this one.',SubscribeBlogs:"card 66396 \u2014 folded into `Subscribe`, which now chooses its rail's content with a `Type` control (the newsletter's own issues, or live blog posts). The two shared 21 of their fields and rendered THE SAME BYTES from equivalent rows, so offering both asked a merchant to choose between two names for one section. The type key stays because it is stored on published pages, and the component stays because those pages still render through it."},xB=["Grid"],gB=Array.from(new Set([...fr.flatMap(e=>e.sections.map(t=>t.type)),...Object.keys(SC)])),IB=Object.fromEntries(fr.flatMap(e=>e.sections.map(t=>[t.type,t.label]))),CC={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",MenuBlock:"service",EmailFormBlock:"service",SocialLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},ha={...CC,...Object.fromEntries(fr.flatMap(e=>e.sections.map(t=>[t.type,t.set])))};function Zu(e){return Object.prototype.hasOwnProperty.call(ha,e)?ha[e]:void 0}function Bs(e){return Object.keys(ha).filter(t=>ha[t]===e).sort()}var hB=Bs("general"),bB=Bs("commerce"),yB=Bs("service"),PC="Flex",xo="Box",SB=`${xo}es`;function kC(e){return e==="section"?"Blank section":xo}function CB(e,t,o){return e===PC?kC(t):o}import{createContext as wC,useContext as vC,useEffect as TC}from"react";import{jsx as RC}from"react/jsx-runtime";var Qu=wC(null);function vB({session:e,children:t}){return Is(e),TC(()=>(Is(e),()=>Yd(e)),[e]),RC(Qu.Provider,{value:e,children:t})}function ba(){return vC(Qu)??Ye()}var Ds="sf-editor-footer-return";function FB(e){if(!(typeof window>"u"))try{window.sessionStorage.setItem(Ds,e)}catch{}}function Ms(){if(typeof window>"u")return null;try{return window.sessionStorage.getItem(Ds)}catch{return null}}function Hs(){if(!(typeof window>"u"))try{window.sessionStorage.removeItem(Ds)}catch{}}import{accessForNewDocument as FC}from"efficient-easel/edit-lock";function ep(e){return e.failed?"error":e.pending?"saving":e.saved?"saved":"idle"}function _B(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}function tp(e,t){t.resetAutosave(),t.setVersion(null),t.setSaveConflict(null),t.setAccess(FC(e))}import{useEffect as EC,useState as LC}from"react";function dr(){return Ye().auth.token}function op({fetch:e,keyBy:t}){let o=null,r=null,n=null;return(a=!1)=>{let l=dr(),s=t?t():null;return(a||!o||r===null&&l!==null||n!==s)&&(r=l,n=s,o=l?e(l,s).catch(()=>[]):Promise.resolve([])),o}}var ya=op({fetch:(e,t)=>oe.listProducts(e,{siteId:t,kinds:["alloy-wheel","tyre"]}),keyBy:_o}),No=(e=!1)=>ya(e).then(t=>t.filter(o=>o.kind==="alloy-wheel"));function rp(e){let[t,o]=LC(null);return EC(()=>{let r=!1;return e().then(n=>{r||o(n)}),()=>{r=!0}},[e]),t}function UB(){return rp(No)}function zB(){return rp(ya)}import{createContext as _C,useContext as AC,useEffect as OC,useSyncExternalStore as NC}from"react";import{jsx as HC}from"react/jsx-runtime";var np=_C(null),sn=null;function VB({panel:e,children:t}){return sn=e,OC(()=>(sn=e,()=>{sn===e&&(sn=null,ip(Ft?.request.requestId??"",null))}),[e]),HC(np.Provider,{value:e,children:t})}function qB(){return AC(np)}function ap(){return sn!==null}var Ft=null,Gs=new Set,lp=()=>{for(let e of[...Gs])e()};function sp(e){return new Promise(t=>{let o=Ft;Ft={request:e,resolve:t},lp(),o?.resolve(null)})}function ip(e,t){if(!Ft||Ft.request.requestId!==e)return;let{resolve:o}=Ft;Ft=null,lp(),o(t)}function YB(){Ft&&ip(Ft.request.requestId,null)}function BC(e){return Gs.add(e),()=>{Gs.delete(e)}}var DC=()=>Ft?.request??null,MC=()=>null;function XB(){return NC(BC,DC,MC)}var Ws=new Map,cp=0;function GC(){return cp+=1,`mp-${typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():String(cp)}`}function Us(e,t){if(!e.connected)return Promise.resolve(null);let o=GC();return ap()?sp({requestId:o,accept:t.accept,title:t.title,file:t.file??null}):new Promise(r=>{Ws.set(o,r),e.send("storefront-editor:open-media-picker",{requestId:o,accept:t.accept,title:t.title,...t.file?{file:t.file}:{}})})}function zs(e,t){let o=Ws.get(e);o&&(Ws.delete(e),o(t))}var WC={"Logos.logosPerRow":"columns","HeroSlide.tintOpacity":"overlay","Split.textBgTint":"overlay"};function UC(e){return Array.isArray(e)&&e.length>0&&e.every(t=>!!t&&typeof t=="object"&&typeof t.type=="string")}function Ks(e){let t=e.props,o=!1;if(e.type&&t)for(let[r,n]of Object.entries(WC)){let a=r.indexOf("."),l=r.slice(0,a),s=r.slice(a+1);if(l!==e.type||!(s in t))continue;let i=t[s],c={...t};delete c[s],(!(n in c)||c[n]===void 0)&&(c[n]=i),t=c,o=!0}if(t){let r=t;for(let[n,a]of Object.entries(t)){if(!UC(a))continue;let l=a.map(Ks);l.some((s,i)=>s!==a[i])&&(r===t&&(r={...t}),r[n]=l,o=!0)}t=r}return o?{...e,props:t}:e}function fp(e){let t=e;if(!t||typeof t!="object")return e;let o=!1,r={...e};if(Array.isArray(t.content)){let n=t.content.map(Ks);n.some((a,l)=>a!==t.content[l])&&(r.content=n,o=!0)}if(t.zones&&typeof t.zones=="object"){let n=!1,a=Object.fromEntries(Object.entries(t.zones).map(([l,s])=>{if(!Array.isArray(s))return[l,s];let i=s.map(Ks);return i.some((c,f)=>c!==s[f])&&(n=!0),[l,i]}));n&&(r.zones=a,o=!0)}return o?r:e}import{createContext as wT,useCallback as we,useContext as vT,useEffect as ut,useMemo as bc,useRef as ot,useState as Ct}from"react";var zC={general:!0,commerce:!0,service:!0};function $s(e){let t=e?.sets;return t?Object.fromEntries(Ju.map(o=>[o,t.includes(o)])):zC}function cn(e=Ye()){return $s(e.blocks)}function dp(e,t){let o=t?{siteId:t}:void 0;return{resolve:r=>e.load({slug:r,...o}),saveLayout:(r,n,a,l)=>e.save(r,{layout:n},{version:a,clientId:l??""}),rereadVersion:e.version?r=>e.version(r):void 0,publish:e.publish?(r,n)=>e.publish(r,n?{version:n}:void 0):void 0,listPages:()=>e.list(o),createPage:e.create?r=>e.create({...r,...o}):void 0,deletePage:e.remove?r=>e.remove(r):void 0}}function up(e,t=ln(),o=cn()){let r=gs(t),n=e?{siteId:e}:void 0,a=r?!!e:!0,l=t.site.update;return{capabilities:{canPublish:!!t.pages.publish,hasSiteSettings:r,hasSiteTheme:r,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!t.pages.create,canDeletePagesInline:!!t.pages.remove,hasEditLock:!!t.lock,hasEditGuard:!0,hasPinnedChrome:r&&o.commerce&&o.service,explainsSiteSettings:!1,hasSiteRecord:a,canEditSiteRecord:a&&!!l,hasPreviewLink:r||!!t.preview,hasCatalog:r&&o.commerce,hasForms:r&&o.service,offersCommerce:o.commerce,offersService:o.service},...dp(t.pages,e),lock:t.lock,site:a?()=>t.site.get(n):void 0,updateSite:a&&l?s=>l(s,n):void 0,previewHref:t.preview?s=>t.preview.href(s):void 0}}function pp(e,t=ln(),o=cn()){let r=gs(t),n=t.templates,a=n?n.pages(e):{list:()=>Promise.reject(new Error(Vs)),load:()=>Promise.reject(new Error(Vs)),save:()=>Promise.reject(new Error(Vs))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!a.create,canDeletePagesInline:!!a.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:r&&o.commerce&&o.service,explainsSiteSettings:r,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:r&&o.commerce,hasForms:r&&o.service,offersCommerce:o.commerce,offersService:o.service},...dp(a,void 0),publish:void 0,templateName:n?()=>n.get(e).then(l=>l.name):void 0}}var Vs="This editor's backend has no website templates.";import{EDIT_LOCK_TAKEN as KC}from"efficient-easel/edit-lock";var $C={unauthorized:401,"changed-elsewhere":409,"lock-taken":409,"not-found":404,invalid:400,unavailable:lr};function qs(e){if(e instanceof at)return{status:e.status,data:e.data};if(!ma(e))return null;if(e.cause instanceof at)return{status:e.cause.status,data:e.cause.data};let t=$C[e.kind];return e.kind==="changed-elsewhere"?{status:t,data:{code:an,saved_by:e.conflict?.savedBy??"",saved_by_you:e.conflict?.savedByYou===!0,seconds_ago:e.conflict?.secondsAgo??0}}:e.kind==="lock-taken"?{status:t,data:{code:KC,holder_name:e.holder?.name??"",seconds_since_seen:e.holder?.secondsSinceSeen??0,seconds_since_held:e.holder?.secondsSinceHeld??0}}:{status:t,data:null}}function mp(e){return qs(e)?.status===401}import{Fragment as VC}from"react";function Sa(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}import{jsx as qC,jsxs as YC}from"react/jsx-runtime";var Ca=["FusionForge\xAE","Precision Forged","Monoblock Cast"];function Ys(e){return Sa(e)}function xp(e){let t=e.split("\xAE");return t.length===1?e:t.map((o,r)=>YC(VC,{children:[o,r<t.length-1&&qC(ru,{})]},r))}var gp=Ca.map((e,t)=>({key:e,num:String(t+1).padStart(2,"0"),title:xp(e)}));function Xs(e){if(e.length===0)return[...Ca];let t=new Set(e.map(o=>o.process));return Ca.filter(o=>t.has(o))}function Ip(e){return Xs(e).map((t,o)=>({key:t,num:String(o+1).padStart(2,"0"),title:xp(t)}))}var I1=Object.fromEntries(Ca.map(e=>[e,Ys(e)]));var hp=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],bp={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Et="var(--wheel-stage)",Lt="transparent",fn="inherit";function Pa(e,t){return e===fn?Et:e==null?t:e===!0?Et:e===!1?Lt:e}function y1(e){return typeof e=="string"&&e!==fn?e:Et}function yp(e){return e!==Lt&&e!=="none"&&e!==""}function Sp(e,t){return e===fn||e===!0?!0:e==null?t===Et:!1}import{useEffect as Ag,useId as Qv,useMemo as wr}from"react";var Cp=1;function XC(e){return so(e)}function Pp(e){let t=XC(e);return t===null?{}:{"--sf-card-image-radius":`${t}px`}}var vp="sf.gapContainer",go={min:-32,max:64,step:2},Tp={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},ka={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},jC=new Set(["Events","GalleryB"]);function Js(e,t,o){if(typeof t=="number"&&Number.isFinite(t)&&t>=go.min)return t;if(typeof t=="string"){let r=Tp[e]?.[t];if(typeof r=="number")return r}return typeof o=="number"&&Number.isFinite(o)?o:ka[e]}var JC="sf-gap-overlap",ZC="--sf-gap-overlap",Rp="--sf-block-gap",QC="--sf-block-gap-rem",js={min:0,max:go.max,step:go.step};function eP(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.min(Math.max(Math.round(e),js.min),js.max);return t-t%js.step}function k1(e){let t=eP(e);return t===null?{}:{[Rp]:`${t}px`,[QC]:`${t/16}rem`}}var kp="sf-gap-zone",wp="--sf-gap-len";function Zs(e,t){return typeof t=="number"&&Number.isFinite(t)&&t>=go.min?!0:typeof t=="string"&&typeof Tp[e]?.[t]=="number"}var tP={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function Fp(e,t,o){if(!Zs(e,t)){let n=`${ka[e]}px`,a=jC.has(e)?`var(--sf-card-gap, ${n})`:n;return{className:` ${kp}`,style:{[wp]:`var(${Rp}, ${a})`}}}let r=Js(e,t);return r>=0?{className:` ${kp}`,style:{[wp]:`${r}px`}}:{className:` ${JC} ${tP[o]}`,style:{gap:"0px",[ZC]:`${-r/2}px`}}}import{useMemo as bk,useState as yk}from"react";function oP(e){return(e.components??[]).reduce((o,r)=>o+r.wheels,0)>4}function T1(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(oP)}var rP=150,nP="Front + rear",Ep="L/R pair",Lp="Not handed",aP="L/R";function lP(e){return e.et==null||e.rearEt==null?0:Math.abs(e.rearEt-e.et)}function sP(e){return lP(e)>=rP}function R1(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(sP)}function ur(e){return e.directional===!0}function _p(e){return e.rearWidth!=null||e.rearEt!=null&&e.rearEt!==e.et}function Ap(e){return{twoObjects:cP(e),handed:e.handed??!1,staggered:!1}}function Op(e){let t=[e.twoObjects?nP:"",e.handed?aP:""].filter(Boolean);return t.length?t.join(" \xB7 "):null}function Np(e){return e.handed}function iP(e){return new Set((e.components??[]).map(t=>t.partNumber)).size>1}function F1(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(iP)}function cP(e){return(e.setWheelCount??0)>4}var fP=new Set(["boltPattern"]);function E1(e,t){return e&&fP.has(t)}function dP(e){return typeof e=="number"?String(e):""}function Bp(e){let t=dP(e);return t&&`${t} LUG`}function Qs(e){let t=e.spec?.lugs;return typeof t=="number"?t:null}function Dp(e){let t=new Set;for(let o of e){let r=Qs(o);r!==null&&t.add(r)}return[...t].sort((o,r)=>o-r)}function Be(e){return Number.isInteger(e)?String(e):String(Number(e.toFixed(2)))}function Mp(e,t){return e===t?`ET ${e}`:`ET ${e}\u2013${t}`}function Hp(e,t){return e===t?`${Be(e)}"`:`${Be(e)}"\u2013${Be(t)}"`}function A1(e){return e==="\u2014"?e:`${e}"`}function uP(e){return e.length===0?null:{min:Math.min(...e),max:Math.max(...e)}}function wa(e){let t=uP(e);return t?Hp(t.min,t.max):null}function Gp(e){let t=new Set;for(let o of e)for(let r of o.sizes??[])typeof r=="number"&&t.add(r);return[...t].sort((o,r)=>o-r)}var Wp=5,Kp=.2;function $p(e){if(!e)return{holes:null,circles:[]};let t=e.replace(/\([^)]*\)?/g," ").trim(),o=t.match(/^\s*(\d+)\s*[x×*]\s*(.+)$/i),r=o?Number(o[1]):null,a=(o?o[2]:t).split(/[-/,]/).map(l=>Number(l.trim().replace(/[^\d.]/g,""))).filter(l=>Number.isFinite(l)&&l>0);return{holes:r,circles:a}}function ei(e){if(!e||e.length<2)return null;let[t,o]=e;return!Number.isFinite(t)||!Number.isFinite(o)?null:[Math.min(t,o),Math.max(t,o)]}function G1(e){if(!e)return null;let t=$p(e.pcd||e.boltPattern);if(t.holes===null||t.circles.length===0)return null;let o=t.circles[0],r=ei(e.etRange),n=r?[r[0]-Wp,r[1]+Wp]:null;return{holes:t.holes,circle:o,centreBore:typeof e.centreBore=="number"&&e.centreBore>0?e.centreBore:null,etRange:n}}function pP(e,t){return Math.abs(e-t)<=Kp}function Vp(e,t,o){let r=$p(e);return(r.holes??t)!==o.holes?!1:r.circles.some(a=>pP(a,o.circle))}function qp(e,t){return t.centreBore===null?!0:e+Kp>=t.centreBore}function mP(e,t){return e[0]<=t[1]&&e[1]>=t[0]}function va(e,t){let o=`${t.holes}\xD7${t.circle}`;return e.pcds.length===0?{key:"unverifiable",wheel:"",vehicle:o}:e.pcds.some(r=>Vp(r,e.lugs,t))?t.etRange!==null&&e.etRange!==null&&!mP(e.etRange,t.etRange)?{key:"et",wheel:Ta(e.etRange),vehicle:Ta(t.etRange)}:e.centreBores.length>0&&!e.centreBores.some(r=>qp(r,t))?{key:"bore",wheel:`${e.centreBores.join(" / ")} mm`,vehicle:`${t.centreBore} mm`}:null:{key:"pcd",wheel:e.pcds.join(" / "),vehicle:o}}function Yp(e){return{pcds:e.spec?.pcds??[],lugs:e.spec?.lugs??null,etRange:ei(e.spec?.etRange),centreBores:e.spec?.centreBores??[]}}function Xp(e){let t=e.et,o=e.rearEt??e.et;return{pcds:e.boltPattern?[e.boltPattern]:[],lugs:null,etRange:t==null||o==null?null:[Math.min(t,o),Math.max(t,o)],centreBores:e.centreBore==null?[]:[e.centreBore]}}function jp(e,t){let o=va(e,t);return o===null||o.key!=="et"?o:va(e,{...t,etRange:null})}function W1(e,t){return va(Yp(e),t)}function U1(e,t){return va(Xp(e),t)}function xP(e,t){return jp(Xp(e),t)===null}function Jp(e,t){return t?e.filter(o=>xP(o,t)):[...e]}function gP(e,t){return jp(Yp(e),t)===null}function Zp(e,t){return t?e.filter(o=>gP(o,t)):e}var Up=1;function IP(e,t){let o=e.spec?.pcds??[],r=e.spec?.centreBores??[],n=ei(e.spec?.etRange);if(!t)return{pcds:o,etRange:n,centreBores:r};let a=e.spec?.lugs??null,l=o.filter(i=>Vp(i,a,t)),s=r.filter(i=>qp(i,t));return{pcds:l.length>0?l:o,etRange:n,centreBores:s.length>0?s:r}}function Ta(e){return Mp(e[0],e[1])}function zp(e){let t=e.slice(0,Up).join(" / "),o=e.length-Up;return o>0?`${t} +${o}`:t}var z1="\xB7";function Qp(e){return[{fieldKey:"diameter",text:wa(e.sizes)},{fieldKey:"holes",text:Bp(e.spec?.lugs)}].filter(t=>!!t.text)}function K1(e,t){let{pcds:o,etRange:r,centreBores:n}=IP(e,t),a=[];return o.length>0&&a.push({fieldKey:"pcd",text:`PCD ${zp(o)}`}),r!==null&&a.push({fieldKey:"et",text:Ta(r)}),n.length>0&&a.push({fieldKey:"center_bore",text:`C/B ${zp(n)} mm`}),a}function hP(e){return e?[{key:"pcd",name:"Bolt pattern",value:`${e.holes}\xD7${e.circle}`},{key:"bore",name:"Hub bore",value:e.centreBore!==null?`${e.centreBore} mm bore`:null},{key:"et",name:"Offset",value:e.etRange!==null?Ta(e.etRange):null}]:[]}function $1(e){return hP(e).map(t=>t.value).filter(t=>t!==null).join(" \xB7 ")}var pr="off",Io="none",ti=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],oi=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function em(e){return Xe(ti,pr,e)}function Y1(e){return Xe(oi,Io,e)}var Ra="sf-card-index",dn="sf-card-index",tm="pointer-events-none absolute left-[18px] top-[18px] z-10 border border-line bg-bg/70 px-2 py-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.16em] text-fg-dim",bP={plain:`counter(${dn})`,padded:`counter(${dn}, decimal-leading-zero)`,numero:`"N\xB0" counter(${dn}, decimal-leading-zero)`};function om(e,t){return t==="off"?"":`.${e}{counter-reset:${dn}}.${e} .${Ra}{counter-increment:${dn}}.${e} .${Ra}::before{content:${bP[t]}}`}function rm(e){return e==="hairline"?"border border-line hover:border-accent":""}var nm=[{value:"1",label:"1st rendering"},{value:"2",label:"2nd rendering"},{value:"3",label:"3rd rendering"},{value:"4",label:"4th rendering"},{value:"5",label:"5th rendering"}];function j1(e){let t=typeof e=="number"?e:Number.parseInt(String(e??""),10);return!Number.isFinite(t)||t<1||t>5?1:Math.trunc(t)}function yP(e,t){if(!e||!t||!Number.isFinite(t)||t<=0)return null;let o=e.lugRenderings?.[String(t)];if(!Array.isArray(o))return null;let r=o.filter(n=>typeof n=="string"&&n.length>0);return r.length>0?r:null}function SP({carRenderings:e,renderings:t,coverIndex:o,shownFinishName:r,defaultFinishName:n,shownSrc:a}){if(e&&e.length>0){let s=Math.min(Math.max(o,1)-1,e.length-1);return e[s]??a}if(o<=1||!t||t.length===0||!n||r!==n)return a;let l=Math.min(o-1,t.length-1);return t[l]??a}function am({overrideSrc:e,hookSrc:t,failed:o}){return e&&!o.has(e)?e:t&&t!==e&&!o.has(t)?t:null}function lm(e,t,o,r,n){let a=o===void 0?void 0:e.finishes?.find(l=>l.name===o);return SP({carRenderings:yP(a,n),renderings:e.defaultFinishRenderings,coverIndex:t,shownFinishName:o,defaultFinishName:e.defaultFinish,shownSrc:r})}function mr(e,t){return e.length===0?e:e.filter(o=>o.kind===void 0||o.kind===t)}function sm(e,t){if(t.length===0)return e;let o=xr(t);return Fa(e.filter(r=>o(r.fieldKey)),r=>r.fieldKey,t,"cardOrder")}function im(e,t){let o=t==="filter"?"filterOrder":"cardOrder",r=new Map;for(let n of e){let a=n[o];if(typeof a!="number"||!Number.isFinite(a))continue;let l=r.get(n.fieldKey);(l===void 0||a<l)&&r.set(n.fieldKey,a)}return n=>n?r.get(n):void 0}function CP(e){return La(e,"spec")}function Z1(e){return La(e,"fitment")}function Q1(e,t){if(t.length===0)return e;let o=CP(t),r=e.filter(n=>o(n.fieldKey));return Fa(r,n=>n.fieldKey,t,"specOrder")}function Fa(e,t,o,r){let n=new Map;for(let i of o){let c=i[r];typeof c=="number"&&n.set(i.fieldKey,c)}if(n.size===0)return e;let a=[],l=[];e.forEach((i,c)=>{let f=t(i);f&&(a.push(c),l.push({item:i,index:c,order:n.get(f)}))}),l.sort((i,c)=>i.order!==void 0&&c.order!==void 0?i.order-c.order||i.index-c.index:i.order!==void 0?-1:c.order!==void 0?1:i.index-c.index);let s=[...e];return a.forEach((i,c)=>{s[i]=l[c].item}),s.every((i,c)=>i===e[c])?e:s}function xr(e){return La(e,"card")}function cm(e){return La(e,"filter")}var Ea="collection";function ri(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":Ea},pcds:{"alloy-wheel":"pcd"},tyreTypes:{tyre:"tire_type"},speedRatings:{tyre:"speed_rating"}}[e]?.[t]}function La(e,t){let o=new Set(e.filter(r=>r[t]===!1).map(r=>r.fieldKey));return r=>!r||!o.has(r)}import{Fragment as PP,jsx as fm,jsxs as kP}from"react/jsx-runtime";function ni(e,t){return!e&&!t?null:kP(PP,{children:[e&&fm("span",{className:"text-fg",children:e}),e&&t?fm("span",{className:"mx-[6px] text-fg-dim",children:"\xB7"}):null,t]})}function ai(e,t){let o=xr(t);return e.kind||e.brand&&o("brand")?!0:e.process&&o(Ea)}function dm({kindLabel:e,brand:t,process:o},r){if(!ai({kind:!!e,brand:!!t,process:!!o},r))return null;let n=xr(r);return ni(e,n("brand")?t:null)??(n(Ea)?o:null)}import{jsx as li,jsxs as wP}from"react/jsx-runtime";function si({finishes:e,availability:t,selectedIdx:o,hoverIdx:r,activeFinish:n,onSelect:a,onHover:l,showLabel:s=!0,className:i}){return wP("div",{className:["mt-4",i].filter(Boolean).join(" "),children:[li("div",{className:"flex flex-wrap items-center gap-2",onMouseLeave:()=>l(null),onClick:c=>c.preventDefault(),children:e.map((c,f)=>{if(!t[f])return null;let u=f===o,d=r===f&&r!==o;return li("button",{type:"button",title:c.name,"aria-label":c.name,"aria-pressed":u,onMouseEnter:()=>l(f),onFocus:()=>l(f),onBlur:()=>l(null),onClick:p=>{p.preventDefault(),p.stopPropagation(),a(f)},className:["h-4 w-4 shrink-0 rounded-full transition-all",u?"ring-2 ring-accent ring-offset-2 ring-offset-surface":d?"ring-1 ring-fg ring-offset-2 ring-offset-surface":"ring-1 ring-fg/30 ring-offset-1 ring-offset-surface"].join(" "),style:{background:c.color,border:"1px solid var(--swatch-border)"}},c.name)})}),s&&n&&li("div",{className:"mt-2 truncate font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.18em] text-fg-dim",children:n.name})]})}import{useEffect as vP,useMemo as TP,useState as ii}from"react";import{jsx as um}from"react/jsx-runtime";function _a(e,t,o){let[r,n]=ii(()=>{let I=o?e.findIndex(h=>h.name===o):-1;return I>=0?I:0}),[a,l]=ii(null),[s,i]=ii(()=>e.map(()=>!0)),c=I=>{i(h=>{if(h[I]===!1)return h;let C=[...h];return C[I]=!1,C})},f=TP(()=>s.map((I,h)=>I?h:-1).filter(I=>I!==-1),[s]);vP(()=>{if(f.length===0){r!==-1&&n(-1),a!==null&&l(null);return}r>=0&&!f.includes(r)&&n(f[0]),a!==null&&!f.includes(a)&&l(null)},[f,r,a]);let u=a??r,d=u>=0?e[u]:void 0,p=d?.src??t,x=f.length>=2,g=e.length>0?um("div",{className:"hidden","aria-hidden":!0,children:e.map((I,h)=>um(io,{src:I.src,alt:"",width:16,height:16,loading:"eager",onError:()=>c(h)},I.src))}):null;return{selectedIdx:r,setSelectedIdx:n,hoverIdx:a,setHoverIdx:l,availability:s,finish:d,shownSrc:p,showSwatches:x,probes:g}}import{useState as RP}from"react";import{jsx as gr,jsxs as pm}from"react/jsx-runtime";function ci({src:e,alt:t=""}){let[o,r]=RP(!1),n=e||"";return gr("div",{className:"relative aspect-square overflow-hidden bg-bg",children:pm("div",{className:"absolute inset-0 flex items-center justify-center transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)] group-hover:rotate-[60deg]",children:[gr("div",{className:"absolute inset-0 z-[1] flex items-center justify-center",children:pm("div",{className:"relative flex h-[70%] w-[70%] items-center justify-center rounded-full border-2",style:{borderColor:"var(--accent)"},children:[gr("div",{className:"absolute inset-[10%] rounded-full border",style:{borderColor:"var(--accent)",opacity:.4}}),gr("div",{className:"absolute left-1/2 top-1/2 h-[18%] w-[18%] -translate-x-1/2 -translate-y-1/2 rounded-full border-2",style:{borderColor:"var(--accent)"}}),gr("div",{className:"absolute left-1/2 top-1/2 h-[6%] w-[6%] -translate-x-1/2 -translate-y-1/2 rounded-full",style:{background:"var(--accent)"}})]})}),n&&gr("img",{src:n,alt:t,className:"absolute inset-0 z-[2] h-full w-full object-contain",style:{display:o?"none":"block"},onError:()=>r(!0)})]})})}import{createContext as FP,useContext as EP,useMemo as LP}from"react";import{jsx as AP}from"react/jsx-runtime";var mm=[],_P={imageBackgroundFill:Et,spinOnHover:!0,coverIndex:1,indexBadge:pr,outline:Io,showBadge:!0,fieldUsage:mm,reserveEyebrow:!1,showCardPrice:!0,showCardFinishes:!0,showCardSizes:!1,showCardBuy:!1,showCardPage:!1},xm=FP(_P);function gm({imageBackgroundFill:e,spinOnHover:t,coverIndex:o=1,indexBadge:r=pr,outline:n=Io,showBadge:a=!0,fieldUsage:l=mm,reserveEyebrow:s=!1,showCardPrice:i=!0,showCardFinishes:c=!0,showCardSizes:f=!1,showCardBuy:u=!1,showCardPage:d=!1,children:p}){let x=LP(()=>({imageBackgroundFill:e,spinOnHover:t,coverIndex:o,indexBadge:r,outline:n,showBadge:a,fieldUsage:l,reserveEyebrow:s,showCardPrice:i,showCardFinishes:c,showCardSizes:f,showCardBuy:u,showCardPage:d}),[e,t,o,r,n,a,l,s,i,c,f,u,d]);return AP(xm.Provider,{value:x,children:p})}function Im(){return EP(xm)}import{useCallback as vm,useEffect as pi,useMemo as Ba,useRef as mi,useState as Tm}from"react";import{useEffect as OP,useState as hm}from"react";var fi=new Map;function NP(e){let t=fi.get(e);if(t)return t;let o=Rt.getWheel(e).catch(r=>{throw fi.delete(e),r});return fi.set(e,o),o}function bm(e,t){let[o,r]=hm("idle"),[n,a]=hm(null);return OP(()=>{if(!t)return;let l=!1;return r("loading"),NP(e).then(s=>{l||(a(s),r("ready"))}).catch(()=>{l||r("error")}),()=>{l=!0}},[e,t]),{state:o,wheel:n}}function ym(e,t){return t.length===0?-1:e.findIndex(o=>t.includes(o.family))}function Sm(e){if(e.diameter==null||e.width==null)return e.size;let t=e.rearWidth!=null?`${Be(e.width)}/${Be(e.rearWidth)}`:Be(e.width);return`${e.diameter}" \xD7 ${t}`}function Aa(e){return e.et==null?null:e.rearEt!=null&&e.rearEt!==e.et?`${e.et}/${e.rearEt}`:String(e.et)}function di(e){return e.diameter==null||e.width==null?JSON.stringify([e.size]):JSON.stringify([e.kind,e.diameter,e.width,e.rearWidth??null])}function Cm(e){return e.diameter==null||e.width==null?e.size:`${e.diameter}" ${e.kind}`}function Pm(e){return e.diameter==null||e.width==null?"":e.rearWidth!=null?`${Be(e.width)} front / ${Be(e.rearWidth)} rear`:`${Be(e.width)} all round`}function wD(e){if(e.diameter==null||e.width==null)return e.size;let t=(o,r)=>`${e.diameter} \xD7 ${Be(o)}${r!=null?` ET ${r}`:""}`;return _p(e)?`${t(e.width,e.et)} front \xB7 ${t(e.rearWidth??e.width,e.rearEt)} rear`:t(e.width,e.et)}function ui(e,t){return t?e.filter(o=>o.finishName===t):[]}var BP="dually";function Oa(e){let t=e.components.reduce((n,a)=>n+a.wheels,0)||4,o=e.kind,r=[o==="staggered"?"Staggered":o===BP?"Dually":"",ur(e)?"L/R":""].filter(Boolean);return r.length?`${r.join(" ")} set of ${t}`:`Set of ${t}`}function DP(e,t){return[...new Set(e.filter(o=>!t||o.finishName===t).map(o=>o.size))]}function Na(e,t,o){if(!(!t||!o))return e.find(r=>r.finishName===t&&r.size===o)}function un(e){return e!=null&&e.inStock===!1}function km(e,t){return t?e.filter(o=>o.finishName===t&&un(o)):[]}function wm(e,t,o){return t.findIndex((r,n)=>o[n]!==!1&&DP(e,r).length>0)}var MP=[];function Rm(e,t=MP){let o=Ba(()=>e.finishes.filter(Jn),[e.finishes]),r=o.length>0,n=_a(o,e.coverImage??null,e.defaultFinish??void 0),[a,l]=Tm(!1),s=vm(()=>{r&&l(!0)},[r]),{state:i,wheel:c}=bm(e.slug,a),f=Ba(()=>c?.variants??[],[c]),u=n.selectedIdx>=0?o[n.selectedIdx]?.name??null:null,[d,p]=Tm(null),{setSelectedIdx:x}=n,g=mi(!1),I=vm(R=>{g.current=!0,x(R)},[x]),h=t.join(","),C=mi(null);pi(()=>{if(C.current===h)return;C.current=h;let R=ym(o,t);R<0||(g.current=!0,x(R))},[h,t,o,x]);let S=mi(!1);pi(()=>{if(S.current||g.current||f.length===0||!u||(S.current=!0,ui(f,u).length>0))return;let R=wm(f,o.map(L=>L.name),n.availability);R>=0&&x(R)},[f,u,o,n.availability,x]);let P=Ba(()=>ui(f,u),[f,u]);pi(()=>{p(R=>R&&P.some(L=>L.size===R)?R:P.length===1?P[0].size:null)},[P]);let T=Na(f,u,d),b=un(T),w=T!=null&&!b,O=!r||i==="error"||i==="ready"&&P.length===0,D=Ba(()=>km(f,u),[f,u]);return{...n,setSelectedIdx:I,finishes:o,arm:s,detailState:i,confirmedFinishName:u,sizeOptions:P,size:d,setSize:p,selectedVariant:T,outOfStock:b,outOfStockVariants:D,canAdd:w,unsellable:O}}import{useEffect as xk,useState as gk}from"react";var qt=["width","profile","rim"],Fm={width:"Width",profile:"Profile",rim:"Rim"},HP=/^\s*(\d{2,3})\s*\/\s*(\d{2,3})\s*[A-Za-z]*\s*(\d{2}(?:\.\d+)?)\s*$/,GP={width:[100,500],profile:[20,100],rim:[10,30]};function Yt(e){let t=HP.exec(e??"");if(!t)return null;let o={width:Number(t[1]),profile:Number(t[2]),rim:Number(t[3])};return qt.every(n=>{let[a,l]=GP[n];return o[n]>=a&&o[n]<=l})?o:null}function Vt(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 Em(e){return[Vt({width:e.width}),Vt({width:e.width,profile:e.profile}),Vt(e)]}var ho=["alloy-wheel","tyre"],Lm=["alloy-wheel"],Do={"alloy-wheel":"Alloy wheels",tyre:"Tyres"},_m="All products",Am="All product types";function Om(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 GD=ho.map(e=>({value:e,label:Do[e]}));function pn(e){return e==null?[...Lm]:Array.isArray(e)?ho.filter(t=>e.includes(t)):[...Lm]}var Je=e=>e;function ke(e){return Je(e).kind==="tyre"?"tyre":"alloy-wheel"}function WD(e,t){return e.filter(o=>t.includes(ke(o)))}function UD(e){return Je(e).slug??""}function xi(e){return Je(e).name??""}function Da(e){return Je(e).brand??""}function zD(e){let t=new Set;for(let o of e)if(t.add(Da(o)),t.size>1)return!0;return!1}function WP(e){return Je(e).process??""}function KD(e){let t=new Set;for(let o of e)if(t.add(WP(o)),t.size>1)return!0;return!1}function Mo(e){return Je(e).prices??void 0}function gi(e){return Je(e).inStock!==!1}function Nm(e){let t=Je(e),o=ke(e)==="tyre"?t.rimDiameters:t.sizes;return Array.isArray(o)?o.filter(r=>typeof r=="number"&&Number.isFinite(r)):[]}function Ii(e){return ke(e)!=="tyre"&&Je(e).badge==="new"}function hi(e){return ke(e)==="tyre"?[]:(Je(e).finishes??[]).filter(t=>typeof t?.family=="string").map(t=>({family:t.family,color:t.color??null}))}function Bm(e){return hi(e).map(t=>t.family)}function Dm(e){if(ke(e)==="tyre")return[];let t=Je(e),o=t.categories;return o&&o.length>0?o:t.process?[t.process]:[]}function Mm(e){return ke(e)==="tyre"?[]:Je(e).spec?.pcds??[]}function Hm(e){return ke(e)!=="tyre"?[]:Je(e).tyreTypes??[]}function Gm(e){return ke(e)!=="tyre"?[]:Je(e).speedRatings??[]}function Ma(e){if(ke(e)!=="tyre")return[];let t=Je(e).sizes;return Array.isArray(t)?t.map(o=>Yt(typeof o=="string"?o:null)).filter(o=>o!==null):[]}var UP={recommended:"Recommended","price-asc":"Price \xB7 low to high","price-desc":"Price \xB7 high to low",new:"Newest",name:"Name A\u2013Z"},Wm=Object.keys(UP);function Um(e){return Xe(Wm,"recommended",e)}function zP(e){return Wm.filter(t=>t!=="recommended"||e.length<=1)}function ZD(e,t){let o=Um(e);return zP(t).includes(o)?o:"name"}var mn=["tyreSizes","brands","finishes","diameters","collections","pcds","tyreTypes","speedRatings"],KP={tyreSizes:["tyre"],brands:["alloy-wheel","tyre"],finishes:["alloy-wheel"],diameters:["alloy-wheel","tyre"],collections:["alloy-wheel"],pcds:["alloy-wheel"],tyreTypes:["tyre"],speedRatings:["tyre"]},$P={diameters:"tyreSizes"};function zm(e){if(e.length===0)return[];let t=mn.filter(o=>e.every(r=>KP[o].includes(r)));return t.filter(o=>{let r=$P[o];return!r||!t.includes(r)})}function QD(e,t){return t&&e.includes(t)?[t]:[...e]}function Km(e){let t=new Set;for(let o of e)t.add(ke(o));return[...t]}var VP={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function qP(e){return`${YP(e.width)}\xD7${e.diameter}`}function $m(e){return(e.sizePairs??[]).map(qP)}function YP(e){return Be(e)}function xn(e,t,o,r=null){if(r!=="kind"&&t.kind&&ke(e)!==t.kind)return!1;for(let n of mn){if(r===n)continue;let a=t[n];if(a.length===0)continue;let l=a.map(String);if(!Vm(e,n).some(s=>l.includes(s)))return!1}return!(r!=="price"&&!ra(Mo(e),o,null,t.priceMax)||r!=="inStock"&&t.inStockOnly&&!gi(e))}function eM(e,t,o){return e.filter(r=>gi(r)&&xn(r,t,o,"inStock")).length}function XP(e,t,o){let r=[...e],n=(l,s)=>xi(l).localeCompare(xi(s)),a=Km(e).length>1;switch(t){case"price-asc":return r.sort((l,s)=>cr(Mo(l),Mo(s),o,"asc"));case"price-desc":return r.sort((l,s)=>cr(Mo(l),Mo(s),o,"desc"));case"name":return r.sort(n);case"new":return r.sort((l,s)=>{let i=(Ii(s)?1:0)-(Ii(l)?1:0);return i!==0||!a?i:n(l,s)});default:return r}}function tM(e,t,o){return XP(e.filter(r=>xn(r,t,o)),t.sort,o)}function oM(e){return mn.some(t=>e[t].length>0)||e.priceMax!=null||e.inStockOnly||e.kind!=null}var jP={tyreSizes:"Size",brands:"Brand",finishes:"Colour",diameters:"Size \xB7 diameter",collections:"Collection",pcds:"PCD \xB7 fitment",tyreTypes:"Tyre type",speedRatings:"Speed rating"};function Vm(e,t){switch(t){case"tyreSizes":return[...new Set(Ma(e).flatMap(Em))];case"brands":return Da(e)?[Da(e)]:[];case"finishes":return Bm(e);case"diameters":return Nm(e).map(String);case"collections":return Dm(e);case"pcds":return Mm(e);case"tyreTypes":return Hm(e);case"speedRatings":return Gm(e)}}function JP(e){let t=new Map;for(let o of e)for(let r of hi(o))r.color&&!t.has(r.family)&&t.set(r.family,r.color);return t}function ZP(e,t,o,r=Km(e),n=[]){let a=c=>ek(c,r,n),l=JP(e),s=zm(r).filter(c=>c!=="tyreSizes").filter(a).map(c=>{let f=t[c].map(String),u=new Set,d=new Map,p=new Map;for(let g of e){let I=Vm(g,c);for(let h of I)u.add(h);for(let h of new Set(I))p.set(h,(p.get(h)??0)+1);if(xn(g,t,o,c))for(let h of new Set(I))d.set(h,(d.get(h)??0)+1)}let x=[...u].map(g=>({value:g,label:c==="diameters"?`${g}\u2033`:g,count:d.get(g)??0,checked:f.includes(g),swatch:c==="finishes"?l.get(g)??null:null})).sort((g,I)=>{if(c==="diameters")return Number(g.value)-Number(I.value);let h=(p.get(I.value)??0)-(p.get(g.value)??0);return h!==0?h:g.value.localeCompare(I.value)});return{key:c,label:jP[c],options:x}}).filter(c=>c.options.length>qm),i=[];for(let c of s){let f=tk(c.key,r,n);f!==void 0&&i.push({fieldKey:c.key,filterOrder:f})}return[...Fa(s,c=>c.key,i,"filterOrder")]}var qm=1;function QP(e){return e.showCollection===!1?["collections"]:[]}function ek(e,t,o){return t.length===0||o.length===0?!0:t.some(r=>cm(mr(o,r))(ri(e,r)))}function tk(e,t,o){if(o.length===0)return;let r;for(let n of t){let a=im(mr(o,n),"filter")(ri(e,n));a!==void 0&&(r===void 0||a<r)&&(r=a)}return r}function ok(e){let t=new Set;for(let o of e)for(let r of Ma(o))t.add(Vt(r));return t.size}function rM(e,t){return zm(t).includes("tyreSizes")?ok(e)>qm:!1}function Ym(e){let t=Yt(e);if(t)return t;let[o,r]=e.split("/");return{width:o?Number(o):void 0,profile:r?Number(r):void 0}}function rk(e,t,o){return qt.slice(0,qt.indexOf(o)).every(r=>{let n=t[r];return n==null||e[r]===n})}function nM(e,t,o){let r=Ym(t.tyreSizes[0]??""),n=new Set(e.filter(a=>xn(a,t,o,"tyreSizes")));return qt.map(a=>{let l=new Map;for(let i of e){let c=Ma(i).filter(f=>rk(f,r,a));for(let f of new Set(c.map(u=>u[a])))l.has(f)||l.set(f,0),n.has(i)&&l.set(f,(l.get(f)??0)+1)}let s=[...l.keys()].sort((i,c)=>i-c).map(i=>({value:i,label:a==="rim"?`R${i}`:String(i),count:l.get(i)??0}));return{part:a,label:Fm[a],value:r[a]??null,options:s}})}function aM(e,t,o,r){let n={...Ym(t)},a=qt.indexOf(o);n[o]=r??void 0;for(let l of qt.slice(a+1))n[l]!=null&&e.some(c=>qt.slice(0,qt.indexOf(l)+1).every(f=>n[f]==null||c[f]===n[f]))||(n[l]=void 0);return Vt(n)}function lM(e,t,o,r){if(t.length<2)return[];let n=e.filter(a=>xn(a,o,r,"kind"));return[{kind:null,label:_m,count:n.length,checked:o.kind===null},...t.map(a=>({kind:a,label:Do[a],count:n.filter(l=>ke(l)===a).length,checked:o.kind===a}))]}function sM(e,t){if(e.length===0)return null;let o=e.map(a=>oa(Mo(a),t)).filter(a=>a!==null);if(o.length===0)return null;let r=Math.floor(Math.min(...o)),n=Math.ceil(Math.max(...o));return n>r?{min:r,max:n}:null}function iM(e,t,o){let r=[];e.kind&&r.push({key:"kind",value:e.kind,label:Do[e.kind]}),e.inStockOnly&&r.push({key:"inStock",value:"",label:"In stock"});for(let n of mn)for(let a of e[n]){let l=String(a);r.push({key:n,value:l,label:n==="diameters"?`${l}\u2033`:n==="pcds"?`PCD ${l}`:l})}return e.priceMax!=null&&r.push({key:"price",value:"",label:`Up to ${o(e.priceMax,t)}`}),r}var yt={tyreSizes:"tyreSize",brands:"brand",finishes:"colour",diameters:"size",collections:"collection",pcds:"pcd",tyreTypes:"tyreType",speedRatings:"speed"},bo="type",Xm="maxPrice",jm="inStock",Jm="sort",Zm="page";function cM(e){let t=a=>e.getAll(a).flatMap(l=>l.split(",")).filter(Boolean),o=Number(e.get(Xm)),r=Number(e.get(Zm)),n=e.get(bo);return{tyreSizes:t(yt.tyreSizes),brands:t(yt.brands),finishes:t(yt.finishes),diameters:t(yt.diameters).map(Number).filter(Number.isFinite),collections:t(yt.collections),pcds:t(yt.pcds),tyreTypes:t(yt.tyreTypes),speedRatings:t(yt.speedRatings),priceMax:Number.isFinite(o)&&o>0?o:null,inStockOnly:e.get(jm)==="1",kind:ho.find(a=>a===n)??null,sort:Um(e.get(Jm)),page:Number.isFinite(r)&&r>=1?Math.floor(r):1}}function fM(e){let t=new URLSearchParams;for(let o of mn){let r=e[o];r.length>0&&t.set(yt[o],r.join(","))}return e.priceMax!=null&&t.set(Xm,String(e.priceMax)),e.inStockOnly&&t.set(jm,"1"),e.kind&&t.set(bo,e.kind),e.sort!=="recommended"&&t.set(Jm,e.sort),e.page>1&&t.set(Zm,String(e.page)),t}function dM(e,t){if(e<=7)return Array.from({length:e},(a,l)=>l+1);let o=[1],r=Math.max(2,t-1),n=Math.min(e-1,t+1);r>2&&o.push(null);for(let a=r;a<=n;a++)o.push(a);return n<e-1&&o.push(null),o.push(e),o}function uM(e,t,o){let r=e.length,n=Math.max(1,Math.floor(o)),a=Math.max(1,Math.ceil(r/n)),l=Math.min(Math.max(1,Math.floor(t)),a),s=(l-1)*n;return{items:e.slice(s,s+n),page:l,pageCount:a,total:r,from:r===0?0:s+1,to:Math.min(s+n,r)}}function hr(e){let t=e.lastIndexOf(" ");return t===-1?{lead:"",accent:e}:{lead:e.slice(0,t+1),accent:e.slice(t+1)}}import{Fragment as nk}from"react";import{Fragment as bi,jsx as St,jsxs as _t}from"react/jsx-runtime";var Ha="mt-3 flex h-[26px] items-center gap-1",Ga="flex min-w-0 items-center gap-1 overflow-hidden",Wa="shrink-0 border border-line px-1.5 py-0.5 font-mono text-[length:var(--size-label,11px)] tracking-[0.08em] text-fg-dim",gn="border px-1.5 py-0.5 font-mono text-[length:var(--size-label,11px)] tracking-[0.08em] whitespace-nowrap",Ua=`${gn} border-accent/60 text-accent`,ak=e=>`calc((100% - ${e}px) / 2)`,lk=2,sk=28,Qm=e=>lk+2*sk+(e?10:0);var ik=16;var ck="whitespace-nowrap",fk=e=>typeof e=="string"?e:e.text;function ex(e,t="\xB7"){return e.map((o,r)=>{let n=fk(o),a=typeof o!="string"&&o.accent;return _t(nk,{children:[St("span",{className:`${ck}${a?" text-accent":""}`,children:r<e.length-1?`${n} ${t}`:n}),r<e.length-1?" ":null]},n)})}var za="mt-3 flex flex-col gap-2",br="cursor-pointer bg-btn px-4 py-2.5 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-btn-ink transition-colors hover:bg-fg",Ka="border border-btn px-4 py-2.5 text-center font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-btn transition-colors hover:bg-btn hover:text-btn-ink",dk="border px-2 py-1 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.3em]",yi="absolute right-[18px] top-[18px] z-10";function Si({tone:e,className:t,children:o}){return St("span",{className:[t,dk,e==="solid"?"border-accent bg-accent text-bg":"border-accent text-accent"].filter(Boolean).join(" "),children:o})}function In({variant:e="catalog",wide:t=!1,href:o,identityLink:r=!1,outline:n="none",imageBackgroundFill:a=Lt,containerProps:l,probes:s,indexBadge:i,badges:c,image:f,imageSecond:u,plate:d,eyebrow:p,reserveEyebrow:x=!1,name:g,spec:I,was:h,price:C,metaLine:S,swatches:P,showPrice:T=!0,reserveSwatches:b=!0,extras:w}){let O=e==="catalog",D=yp(a),R=D&&a===Et,L=R?"bg-[var(--wheel-stage)] p-[5px]":D?"p-[5px]":"",G=D&&!R?{backgroundColor:a}:{},Y=(he,de)=>St("figure",{className:`m-0 aspect-square [flex:0_0_auto] max-w-full max-[800px]:w-[252px] ${de}`,style:{width:ak(Qm(D))},children:he}),M=O?_t("div",{className:t?`relative mt-2 mb-5 flex items-center justify-center [&_img]:object-top max-[800px]:flex-col ${L}`:`relative mt-2 mb-5 flex aspect-square items-center justify-center overflow-hidden [&_img]:object-top ${L}`,style:t?{...G,borderRadius:10,columnGap:Qm(D),rowGap:ik}:{...G,borderRadius:"var(--sf-card-image-radius, 10px)"},children:[t?_t(bi,{children:[Y(f,"max-[800px]:-translate-x-[38px]"),Y(u??f,"max-[800px]:translate-x-[38px]")]}):f,d]}):_t("div",{className:"relative mb-[18px] aspect-square overflow-hidden bg-bg p-[30px] [&_img]:object-top",style:{borderRadius:"var(--sf-card-image-radius, 10px)"},children:[f,d]}),v=`font-mono text-[length:var(--size-label,12px)] uppercase text-accent ${O?"tracking-[0.3em]":"tracking-[0.25em]"}`,j=p?St("div",{className:v,children:p}):O&&x?St("div",{"aria-hidden":!0,className:v,children:"\xA0"}):null,F=St("div",{className:O?"mt-2 h-[60px] overflow-hidden break-words font-heading3 text-[length:var(--size-headingSmall,30px)] font-medium uppercase leading-none tracking-[-0.02em]":"mt-[6px] font-heading3 text-[length:var(--size-headingSmall,22px)] font-medium tracking-[-0.02em]",children:g}),E=St("div",{className:O?"mt-2 h-[38px] overflow-hidden font-mono text-[length:var(--size-label,13px)] leading-[19px] tracking-[0.14em] text-fg-dim":"mt-[4px] font-mono text-[length:var(--size-label,13px)] tracking-[0.1em] text-fg-dim",children:I}),se=T?_t("div",{className:"mt-2 font-mono text-[length:var(--size-label,13px)]",children:[h&&St("span",{className:"mr-2 text-fg-dim line-through",children:h}),C]}):null,N=T&&S?St("div",{className:"mt-[2px] font-mono text-[length:var(--size-label,11px)] tracking-[0.08em] text-fg-dim",children:S}):null,le=O&&!P?b?St("div",{"aria-hidden":!0,className:"mt-4 h-4"}):null:P,ge=[O?"sf-card sf-card-fill group relative flex min-h-[460px] flex-col bg-[var(--card-bg)] px-7 pt-8 pb-7 transition-colors duration-200 hover:bg-[var(--card-bg-hover)]":"sf-card sf-card-fill group relative block bg-[var(--card-bg)] p-5 transition-colors duration-300 hover:bg-[var(--card-bg-hover)]",rm(n),t?"col-span-2 max-[800px]:col-span-1 @max-[720px]:col-span-1":""].filter(Boolean).join(" "),ie=_t(bi,{children:[M,j,F]}),te=_t(bi,{children:[E,se,N,le,w]});return o?r?_t("article",{...l,className:ge,children:[s,i,c,St(Pe,{href:o,className:"flex flex-col",children:ie}),te]}):_t(Pe,{href:o,className:ge,children:[s,i,c,ie,te]}):_t("article",{...l,className:ge,children:[s,i,c,ie,te]})}import{useId as ax,useRef as mk,useState as Pi}from"react";import{useEffect as Ci}from"react";function tx({active:e,onDismiss:t,focusRef:o,lockScroll:r=!0}){Ci(()=>{if(!e)return;let n=a=>{a.key==="Escape"&&t()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e,t]),Ci(()=>{if(!e||!r)return;let n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}},[e,r]),Ci(()=>{e&&o?.current?.focus()},[e,o])}import{useCallback as rx,useRef as uk,useState as pk}from"react";function PM({email:e,firstName:t,interests:o,frequency:r},n){return{email:e.trim(),firstName:t?.trim()||void 0,interests:o&&o.length?o:void 0,frequency:r||void 0,source:n}}var ox={popup:"shop_popup",subscribeSection:"subscribe_section",subscribeBlogsSection:"subscribe_blogs_section",footerSignup:"footer_signup",stockAlertOptIn:"stock_alert_optin"};function nx(){let[e,t]=pk("idle"),o=uk(!1),r=rx(()=>{o.current=!1,t("idle")},[]),n=rx(async({partNumbers:a,email:l,productSlug:s,subscribeToOffers:i=!1,dryRun:c=!1})=>{if(o.current)return;let f=l.trim();if(!yu(f)){t("invalid");return}o.current=!0,t("sending");try{if(!c)for(let u of a)await Rt.createStockAlert({partNumber:u,email:f,productSlug:s})}catch{o.current=!1,t("error");return}if(i&&!c)try{await Rt.createNewsletterSubscription({email:f,source:ox.stockAlertOptIn})}catch{}o.current=!1,t("sent")},[]);return{status:e,submit:n,reset:r}}import{jsx as ae,jsxs as Ge}from"react/jsx-runtime";function ki({wheelName:e,productSlug:t,finishName:o,variants:r,initialSize:n,onClose:a,editing:l=!1}){let s=ax(),i=ax(),c=mk(null),{currency:f}=co(),u=nx(),[d,p]=Pi(()=>n??r[0]?.size??""),[x,g]=Pi(""),[I,h]=Pi(!1);tx({active:!0,onDismiss:a,focusRef:c});let C=r.find(w=>w.size===d)??r[0];if(!C)return null;let S=u.status==="sent",P=u.status==="sending",T=u.status==="invalid"?"Please enter a valid email address.":u.status==="error"?"Couldn't save that \u2014 please try again.":null;function b(){C&&u.submit({partNumbers:C.components.map(w=>w.partNumber),email:x,productSlug:t,subscribeToOffers:I,dryRun:l})}return ae("div",{role:"dialog","aria-modal":"true","aria-labelledby":s,onClick:w=>{w.target===w.currentTarget&&a()},className:"fixed inset-0 z-[90] flex items-center justify-center overflow-y-auto p-6 backdrop-blur-[6px]",style:{background:"color-mix(in oklab, var(--bg) 78%, transparent)"},children:Ge("div",{ref:c,tabIndex:-1,className:"relative w-[420px] max-w-full border-2 border-accent bg-surface text-left shadow-[0_24px_60px_rgba(0,0,0,0.55)] outline-none",children:[ae("button",{type:"button",onClick:a,"aria-label":"Close",className:"absolute right-[10px] top-[10px] z-[2] flex h-9 w-9 cursor-pointer items-center justify-center text-fg-dim transition-colors hover:text-accent",children:ae("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:ae("path",{d:"M6 6l12 12M18 6 6 18"})})}),S?Ge("div",{className:"px-6 py-8 text-center",children:[ae("span",{className:"mx-auto mb-4 grid h-16 w-16 place-items-center rounded-full border-[1.5px] border-accent bg-accent/15",children:ae("svg",{width:"30",height:"30",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2.5","aria-hidden":!0,children:ae("path",{d:"M20 6 9 17l-5-5"})})}),ae("h3",{id:s,className:"font-display text-[22px] font-medium uppercase leading-tight tracking-[-0.02em]",children:"You're on the list"}),Ge("p",{className:"mx-auto mt-2 max-w-[34ch] text-[13px] leading-[1.6] text-fg-dim",children:["We'll alert ",ae("strong",{className:"font-normal text-fg",children:x.trim()})," as soon as the ",et(e)," in ",C.size," is back. Keep an eye on your inbox."]}),ae("button",{type:"button",onClick:a,className:"mt-6 w-full cursor-pointer border border-line px-4 py-3 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-fg transition-colors hover:border-accent hover:text-accent",children:"Continue browsing"})]}):Ge("form",{className:"p-6",noValidate:!0,onSubmit:w=>{w.preventDefault(),b()},children:[Ge("div",{className:"mb-2 flex items-center gap-3",children:[ae("span",{className:"grid h-11 w-11 flex-none place-items-center border-[1.5px] border-accent bg-accent/15",children:Ge("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2","aria-hidden":!0,children:[ae("path",{d:"M18 8a6 6 0 1 0-12 0c0 7-3 9-3 9h18s-3-2-3-9"}),ae("path",{d:"M13.7 21a2 2 0 0 1-3.4 0"})]})}),Ge("div",{children:[ae("div",{className:"font-mono text-[10px] uppercase tracking-[0.3em] text-accent",children:"Back-in-stock alert"}),ae("h3",{id:s,className:"mt-0.5 font-display text-[22px] font-medium uppercase leading-tight tracking-[-0.02em]",children:"Notify me"})]})]}),Ge("p",{className:"mb-5 text-[13px] leading-[1.6] text-fg-dim",children:["We'll email you the moment the"," ",ae("strong",{className:"font-normal text-fg",children:et(e)}),o?` in ${o}`:""," ","is back in stock. No spam \u2014 one alert, then we're done."]}),Ge("fieldset",{className:"mb-4 border-0 p-0",children:[ae("legend",{className:"mb-2 font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:"Which fitment?"}),ae("div",{className:"flex flex-wrap gap-2",children:r.map(w=>{let O=w.size===C.size;return Ge("button",{type:"button","aria-pressed":O,onClick:()=>p(w.size),className:["flex min-w-[calc(50%-4px)] flex-1 cursor-pointer flex-col items-start gap-0.5 border-[1.5px] px-3 py-2.5 text-left transition-colors",O?"border-accent bg-accent/15":"border-line hover:border-accent/60"].join(" "),children:[ae("span",{className:"font-mono text-[12px] font-bold tracking-[0.08em] text-fg",children:w.size}),ae("span",{className:"font-mono text-[10px] tracking-[0.08em] text-fg-dim",children:(()=>{let D=Iu(w.components,f);return D.setTotal!=null?pu(D.setTotal,f):mu})()})]},w.size)})})]}),Ge("div",{className:"mb-4",children:[ae("label",{htmlFor:i,className:"mb-2 block font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:"Email address"}),ae("input",{id:i,type:"email",value:x,onChange:w=>{g(w.target.value),(u.status==="invalid"||u.status==="error")&&u.reset()},placeholder:"you@example.com",disabled:P,className:"w-full border-2 border-line bg-bg px-3.5 py-3 font-display text-[15px] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent disabled:opacity-60"})]}),Ge("label",{className:"mb-5 flex cursor-pointer items-start gap-2.5 text-[12px] leading-[1.5] text-fg-dim",children:[ae("input",{type:"checkbox",checked:I,onChange:w=>h(w.target.checked),className:"mt-0.5 h-[18px] w-[18px] flex-none cursor-pointer accent-[var(--accent)]"}),ae("span",{children:"Also send me fitment tips and occasional offers for my vehicle."})]}),Ge("button",{type:"submit",disabled:P,className:"flex h-[50px] w-full cursor-pointer items-center justify-center gap-2 bg-btn px-4 font-mono text-[12px] font-bold uppercase tracking-[0.24em] text-btn-ink transition-colors hover:bg-fg disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-btn",children:[Ge("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[ae("path",{d:"m22 2-7 20-4-9-9-4Z"}),ae("path",{d:"M22 2 11 13"})]}),P?"Sending\u2026":"Notify me when available"]}),T&&ae("p",{role:"alert",className:"mt-2.5 text-[12px] leading-[1.5]",style:{color:"var(--alert)"},children:T}),Ge("div",{className:"mt-3 flex items-center justify-center gap-1.5 text-[11px] text-fg-dim",children:[Ge("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:[ae("rect",{x:"3",y:"11",width:"18",height:"11",rx:"1"}),ae("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),"We never share your details."]})]})]})})}import{Fragment as hk,jsx as Xt,jsxs as $a}from"react/jsx-runtime";var wi=3;function Ik({wheel:e,sel:t,price:o,editing:r,detailReady:n}){let{add:a,open:l,warmCatalog:s}=la();xk(()=>{r||s()},[r,s]);function i(){let c=t.selectedVariant;!c||!t.canAdd||o.priced&&(r||(a({id:`${e.slug}|${c.finishName}|${c.size}|quick`,slug:e.slug,name:hr(e.name),process:e.process,positionNo:"01",config:[{label:c.size},{label:c.finishName,gold:!0},{label:Oa(c)}],finishName:c.finishName,size:c.size,components:c.components,qty:1}),l()))}return Xt("button",{type:"button",onClick:i,[ta]:"",disabled:!t.canAdd,className:t.canAdd?br:n?"cursor-not-allowed border border-dashed border-accent/50 px-4 py-2.5 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-accent/70":`${br} opacity-80`,children:n&&!t.canAdd?"Select a size":"Add to basket"})}function lx({wheel:e,sel:t,price:o,editing:r,show:n,href:a}){let[l,s]=gk(!1),i=$m(e),c=i.length>0?i:e.sizes.map(S=>`${S}\u2033`),f=t.detailState==="ready",u=t.unsellable,d=S=>["cursor-pointer transition-colors",gn,S?"border-accent bg-accent text-bg":"border-accent/60 text-accent hover:border-accent hover:bg-accent/10"].join(" "),p=f&&!u?t.sizeOptions.length:c.length,x=Math.max(0,p-wi),g=n.sizes?$a("div",{className:Ha,children:[Xt("div",{className:Ga,children:f&&!u?t.sizeOptions.slice(0,wi).map(S=>Xt("button",{type:"button",title:S.size,"aria-label":S.size,"aria-pressed":t.size===S.size,onClick:()=>t.setSize(S.size),className:d(t.size===S.size),children:Sm(S)},S.size)):u?Xt("span",{className:"truncate font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.16em] text-fg-dim",children:"Options on the product page"}):c.slice(0,wi).map(S=>Xt("span",{className:Ua,children:S},S))}),!u&&x>0&&$a("span",{className:Wa,children:["+",x]})]}):null,I=n.buy&&!u?t.outOfStock?Xt("button",{type:"button",onClick:()=>s(!0),className:br,children:"Notify me when back"}):o.priced?Xt(Ik,{wheel:e,sel:t,price:o,editing:r,detailReady:f}):null:null,h=n.page?Xt(Pe,{href:a,className:Ka,children:"Open product page"}):null,C=I||h?$a("div",{className:za,children:[I,h]}):null;return{extras:g||C?$a(hk,{children:[g,C]}):null,dialog:l?Xt(ki,{wheelName:e.name,productSlug:e.slug,finishName:t.confirmedFinishName,variants:t.outOfStockVariants,initialSize:t.selectedVariant?.size,onClose:()=>s(!1),editing:r}):null}}import{Fragment as sx,jsx as yo,jsxs as ix}from"react/jsx-runtime";function hn({wheel:e,variant:t="compact",defaultFinish:o}){let r=t==="catalog",n=bk(()=>e.finishes.filter(Jn),[e.finishes]),a=e.coverImage??null,{currency:l}=co(),{imageBackgroundFill:s,spinOnHover:i,coverIndex:c,indexBadge:f,outline:u,showBadge:d,fieldUsage:p,reserveEyebrow:x,showCardPrice:g,showCardFinishes:I,showCardSizes:h,showCardBuy:C,showCardPage:S}=Im(),P=r&&(h||C||S),T=na(e.prices[l],e.msrpPrices?.[l]),b=aa(T,l,"from "),w=gu(T,l),O=Ap(e),D=Np(O),R=Op(O),L=sm([...Qp(e).map(Ne=>({fieldKey:Ne.fieldKey,field:Ne.text})),...R?[{field:{text:R,accent:!0}}]:[]],p).map(Ne=>Ne.field),{selectedIdx:G,setSelectedIdx:Y,hoverIdx:M,setHoverIdx:v,availability:j,finish:F,shownSrc:E,showSwatches:se,probes:N}=_a(n,a,o??e.defaultFinish??void 0),le=lm(e,c,F?.name,E),ge="h-full w-full",ie=i?`transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)] ${r?"group-hover:rotate-[72deg]":"group-hover:rotate-[60deg]"}`:"",[te,he]=yk(()=>new Set),de=Ne=>he(Ve=>Ve.has(Ne)?Ve:new Set(Ve).add(Ne)),z=am({overrideSrc:le,hookSrc:E,failed:te}),Ae=z?yo(io,{src:z,alt:F?`${e.name} \u2014 ${F.name}`:e.name,width:1e3,height:1e3,sizes:"(max-width: 640px) 90vw, (max-width: 1024px) 45vw, 300px",className:`block object-contain ${ie} ${ge}`,draggable:!1,onError:()=>de(z)},z):yo(ci,{imageLabel:e.name}),Fe=r&&d&&e.badge?yo(Si,{className:yi,tone:e.badge==="new"?"solid":"outline",children:e.badge==="new"?"New":"Bestseller"}):null,Oe=R&&r?yo(Si,{className:yi,tone:"outline",children:R}):Fe,ne=dm({kindLabel:null,brand:null,process:e.process?et(e.process):null},p),K=D?ix(sx,{children:[ne,yo("span",{className:`${ne?"ml-2":""} inline-block bg-accent px-1.5 py-[2px] align-middle font-mono text-[10px] font-bold uppercase tracking-[0.18em] text-bg`,children:"Set"})]}):ne,H=f!=="off"?yo("span",{"aria-hidden":!0,className:`${Ra} ${tm}`}):null,He=Rm(e),Ze=hu(e,He.selectedVariant,l,1),It=lx({wheel:e,sel:He,price:Ze,href:`/wheels/${e.slug}`,show:{sizes:P&&h,buy:P&&C,page:P&&S}}),oo=I&&se?yo(si,{finishes:n,availability:j,selectedIdx:G,hoverIdx:M,activeFinish:F,onSelect:Y,onHover:v,showLabel:!1}):null;return ix(sx,{children:[yo(In,{variant:t,wide:D&&r,href:`/wheels/${e.slug}`,outline:u,imageBackgroundFill:s,probes:N,reserveEyebrow:x,indexBadge:H,badges:Oe,image:Ae,imageSecond:void 0,eyebrow:K,name:et(e.name),spec:ex(L),was:D?void 0:w,price:D?T.priced?b:xu:P?bu(Ze,l):b,metaLine:D?"the set":void 0,swatches:oo,reserveSwatches:I,showPrice:g,identityLink:P,extras:It.extras}),It.dialog]})}import{Fragment as Xx}from"react";import{applyMark as R2,markupTools as F2,MARKUP_TOOLS as E2,COPY_FIELD_TOOLS as L2,STOREFRONT_MARKUP as _2,tokenizeInline as A2,stripInline as O2,isSafeLinkHref as N2}from"efficient-easel/markup";import{applyMark as Sk,markedAt as Ck,markupTools as Pk,MARKUP_TOOLS as kk,parseMarkup as wk,STOREFRONT_MARKUP as vk,tokenizeInline as k2}from"efficient-easel/markup";var Va=["highlight","strong","quiet"],Ho={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},At={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},cx=Object.fromEntries(Va.map(e=>[At[e].kind,e])),fx="data-sf-ws",b2=["accent","text","labels"],y2={accent:"Accent",text:"Text",labels:"Labels"},yr={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"};var vi={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},S2={highlight:{...vi},strong:{...vi},quiet:{...vi}};var ux=Va.map(e=>({open:At[e].delimiter,close:At[e].delimiter,kind:At[e].kind})),px=[{style:At.highlight.kind,label:Ho.highlight,title:`${Ho.highlight} word style`},{style:At.strong.kind,label:Ho.strong,title:`${Ho.strong} word style`},{style:At.quiet.kind,label:Ho.quiet,title:`${Ho.quiet} word style`}],Tk=new Set(ux.map(e=>e.open)),mx=[...vk.filter(e=>!Tk.has(e.open)),...ux];function Ti(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function Ri(e){return wk(typeof e=="string"?e:"",mx)}var Rk=["quiet"],dx=[...kk.map(e=>e.style).filter(e=>!Rk.includes(e)),...px.map(e=>e.style)].filter(e=>mx.some(t=>t.kind===e));function xx(){return[...Pk(dx),...px].filter(e=>dx.includes(e.style))}var gx=Object.fromEntries(Va.map(e=>[At[e].kind,At[e].delimiter]));function Ix(e,t,o,r){let n=gx[r];if(!n)return Sk(e,t,o,r);let a=e.slice(t,o),l=e.slice(Math.max(0,t-n.length),t),s=e.slice(o,o+n.length);if(l===n&&s===n)return{text:e.slice(0,t-n.length)+a+e.slice(o+n.length),selectionStart:t-n.length,selectionEnd:t-n.length+a.length};let i=a||"styled text";return{text:e.slice(0,t)+n+i+n+e.slice(o),selectionStart:t+n.length,selectionEnd:t+n.length+i.length}}function hx(e,t,o,r){let n=gx[r];return n?t>=n.length&&e.slice(t-n.length,t)===n&&e.slice(o,o+n.length)===n:Ck(e,t,o,r)}function jt(e){return Ri(e).map(t=>Ti(t)+bx(t.children)).join(`
|
|
3
|
-
`)}function bx(e){return e.map(t=>t.kind==="text"?t.text:bx(t.children)).join("")}function Fi(e,t){return t?`${e}[${t.index}].${t.rowKey}`:e}function Ei(e){let t=/^([A-Za-z0-9_$]+)\[(\d+)\]\.([A-Za-z0-9_$]+)$/u.exec(e);return t?{key:t[1],row:{index:Number(t[2]),rowKey:t[3]}}:{key:e,row:null}}var Le="__text",bn="__link",yn="__scaffold";function Jt(e){return e&&typeof e=="object"?{text:e.text??"",hidden:!!e.hidden}:{text:typeof e=="string"?e:"",hidden:!1}}function Sr(e){return Jt(e).text}var yx={text:"scalar",textarea:"scalar",plainText:"scalar",copyText:"scalar",plainTextarea:"scalar",textList:"list"},Go=Object.entries(yx).filter(([,e])=>e==="scalar").map(([e])=>e);var Sx={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},Cx={Events:["posts"],SubscribeBlogs:["posts"]};var Fk=["anchor"],Ek=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function Sn(e){return Fk.includes(e)||Ek.test(e)}var Lk={Gallery:{source:{verb:"snapshot",keep:[]}},ProductHero:{source:{verb:"snapshot",keep:[]}},SpecTable:{source:{verb:"snapshot",keep:[]},wheel:{verb:"reference"},finish:{verb:"reference"},size:{verb:"reference"}},CollectionCard:{collection:{verb:"snapshot",keep:[]}},FooterMenu:{menu:{verb:"snapshot",keep:[]}},MenuBlock:{menu:{verb:"snapshot",keep:[]}},BrandStrip:{picks:{verb:"reference"}},ProductGrid:{design_codes:{verb:"reference"}},ProductRef:{code:{verb:"reference"},finish:{verb:"reference"}},FitmentTable:{wheel:{verb:"reference"}},GalleryItem:{fromProduct:{verb:"reference"}},Footprint:{"offices[].group":{verb:"groupKey"},"offices[].lat":{verb:"pii"},"offices[].lng":{verb:"pii"},"offices[].geocode":{verb:"pii"}}};Lk.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var U2=Object.fromEntries(Object.entries(Sx).map(([e,t])=>[e,Object.keys(t)])),z2=Object.fromEntries(Object.entries(Cx).map(([e,t])=>[e,[...t]]));var _k=Go,Ak=["text","textarea"];function Ok(e){return!e||typeof e!="object"?null:e[Le]?.control??null}function Px(e){let t=Ok(e);return t&&_k.includes(t)?t:null}function qa(e){return Jt(e).text}function Li(e,t,o){return Ak.includes(e)?{text:o,hidden:Jt(t).hidden}:o}function Y2(e,t,o,r){return qa(e[t])===r?null:{...e,[t]:Li(o,e[t],r)}}function Nk(e){if(!(!e||typeof e!="object"))return e[Le]}function Bk(e){if(!e||typeof e!="object")return null;let t=e.arrayFields;return t&&typeof t=="object"?t:null}function kx(e,t){if(!Array.isArray(t))return[];let o=Nk(e),r=[];if(o?.control==="textList"){let a=o.itemKey??"text";return t.forEach((l,s)=>{let i=l?.[a];typeof i=="string"&&i&&r.push({row:{index:s,rowKey:a},text:i})}),r}let n=Bk(e);return n?(t.forEach((a,l)=>{for(let[s,i]of Object.entries(n)){if(!Px(i))continue;let c=qa(a?.[s]);c&&r.push({row:{index:l,rowKey:s},text:c})}}),r):[]}function Dk(e,t){if(Array.isArray(e))return e[t.index]?.[t.rowKey]}function Mk(e,t,o,r){let n=e[t];return!Array.isArray(n)||o.index<0||o.index>=n.length?null:{...e,[t]:n.map((a,l)=>l===o.index?{...a,[o.rowKey]:r}:a)}}function Z2(e,t,o,r,n){let a=Dk(e[t],o);return qa(a)===n?null:Mk(e,t,o,Li(r,a,n))}function Q2(e,t){return t?`${e} \xB7 row ${t.index+1}`:e}var iH="data-sf-part",cH="data-sf-part-selected",fH="data-sf-part-kind",_i="::",wx=2;function dH(e,t){return`${e}${_i}${t??""}`}function Xa(e){let t=e.indexOf(_i);return t<=0?null:{nodeId:e.slice(0,t),propKey:e.slice(t+_i.length)||null}}function uH(e,t){if(!e)return!1;let o=Xa(e);return!!o?.propKey&&o.nodeId===t}function Cr(e){return jt(e).replace(/\s+/gu,"")}function Ya(e,t,o){let r=e[Le];if(r){if(r.control==="textList"){let a=r.itemKey??"text";if(!Array.isArray(t))return;for(let l of t){let s=l?.[a];typeof s=="string"&&o.push(s)}return}let{text:n}=Jt(t);n?o.push(n):r.placeholder&&o.push(r.placeholder);return}if(!e[bn]){if(e.type==="text"||e.type==="textarea"){typeof t=="string"&&t&&o.push(t);return}if(e.arrayFields&&Array.isArray(t)){for(let n of t)for(let[a,l]of Object.entries(e.arrayFields))Ya(l,n?.[a],o);return}if(e.objectFields&&t&&typeof t=="object")for(let[n,a]of Object.entries(e.objectFields))Ya(a,t[n],o)}}function pH(e){if(!e||typeof e!="object")return!1;let t=e;return t[bn]?!1:!!t[Le]||t.type==="text"||t.type==="textarea"}function vx(e,t){let o=e[Le];return o?.label?o.label:typeof e.label=="string"?e.label:t}function Hk(e){let t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function mH(e,t){if(!e)return[];let o=[];for(let[r,n]of Object.entries(e)){if(!n||typeof n!="object"||Sn(r))continue;let a=n,l=[];Ya(a,t?.[r],l),!l.length&&a[yn]!==void 0&&Ya(a,a[yn],l);let s=vx(a,r),i=new Set;for(let{row:u,text:d}of kx(a,t?.[r])){let p=Cr(d);p.length<wx||(i.add(p),o.push({key:r,label:s,texts:[p],row:u}))}let c=new Set(i),f=[];for(let u of l){let d=Cr(u);d.length<wx||c.has(d)||(c.add(d),f.push(d))}f.length&&o.push({key:r,label:s,texts:f})}return o}var Gk=Go;function Tx(e,t){if(!t||typeof t!="object"||Sn(e))return null;let o=t[Le];return!o||!Gk.includes(o.control)?null:o}function xH(e,t){let o=Tx(e,t);return o!==null&&o.identifier!==!0}function gH(e,t){if(!e)return[];let o=[];for(let[r,n]of Object.entries(e)){let a=Tx(r,n);if(!a)continue;let{text:l,hidden:s}=Jt(t?.[r]),i=l||a.placeholder||"",c=jt(i).replace(/\s+/gu," ").trim();o.push({key:r,label:Hk(vx(n,r)),preview:c,offPage:a.offPage===!0,identifier:a.identifier===!0,hidden:!!s})}return o}var Ni="_partStyles",Mi="data-sf-part-styled",Wk=["none","upper","lower"],Uk=[400,500,600,700],zk=["left","center","right"],Kk=9,$k=144,Vk=-5,qk=10,Yk=0,Xk=64,jk=2,Jk=200,ja=900,Zk=10,Rx={size:{min:Kk,max:$k,step:1},padding:{min:Yk,max:Xk,step:jk},width:{min:Jk,max:ja,step:Zk}},Qk=.05,ew=.01,tw=["line","letter"],Bi={none:"none",upper:"uppercase",lower:"lowercase"};function Cn(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function _x(e){return Cn(e?.[Ni])??{}}function ow(e,t){let o=_x(e);return Object.hasOwn(o,t)?Cn(o[t])??{}:{}}function Ax(e,t,o){let r={..._x(e)};if(rw(o).length?r[t]=o:delete r[t],!Object.keys(r).length){let{[Ni]:n,...a}=e;return a}return{...e,[Ni]:r}}function rw(e){return Object.entries(e).filter(([,t])=>t!==void 0)}function nw(e){return tw.includes(e)}var Fx=(e,t,o)=>Math.min(o,Math.max(t,e));function aw(e,t){if(nw(e)){let o=Math.round(Number(t));return!Number.isFinite(o)||o===0?null:Fx(o,Vk,qk)}if(Object.hasOwn(Rx,e)){let{min:o,max:r}=Rx[e],n=Math.round(Number(t));return Number.isFinite(n)?Fx(n,o,r):null}return e==="role"?Kt.includes(String(t))?t:null:t}var lw=[["font","role"]];function sw(e){let t=[];for(let[o,r]of lw)o===e?t.push(r):r===e&&t.push(o);return t}function CH(e,t,o,r){let n={...ow(e,t)},a=r==null?null:aw(o,r);if(a===null)delete n[o];else{n[o]=a;for(let l of sw(o))delete n[l]}return Ax(e,t,n)}function PH(e,t){return Ax(e,t,{})}function iw(e){for(let t of Wk)if(Bi[t]===e)return t;return"none"}function cw(e){return!e||!Object.hasOwn(Bi,e)?"":Bi[e]}var fw={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function dw(e){let t=e.role;return t&&Kt.includes(t)?t:null}var uw={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function So(e,t,o){let r=dw(e),n=e.size?`${e.size}px`:r?o?.has(ar[r])?`var(--size-${ar[r]})`:uw[ar[r]]??"":"";return{fontFamily:e.font?gw(e.font):r?`var(${fw[r]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:n,minWidth:n?"0":"",overflowWrap:n?"break-word":"",lineHeight:e.line?String(Ja(t.lineRatio+e.line*Qk,3)):"",letterSpacing:e.letter?`${Ja(t.letterEm+e.letter*ew,4)}em`:"",textTransform:cw(e.case),textAlign:e.align??"",paddingTop:Ai(e.padding),paddingBottom:Ai(e.padding),maxWidth:Ai(e.width),color:pw(e.color)}}var pw=e=>e===void 0||e===""?"":Object.hasOwn(yr,e)?yr[e]:Ox.test(e)?e:"",Ox=/^#[0-9a-fA-F]{6}$/;function Nx(e){return Ox.test(e)}var Ai=e=>e===void 0?"":`${e}px`,Ja=(e,t)=>Number(e.toFixed(t));function kH(e,t){let o=Number.parseFloat(e.fontSize)||16,r=Number.parseFloat(e.lineHeight),n=Number.parseFloat(e.letterSpacing),a=Number.parseFloat(e.paddingTop),l=Number.parseFloat(e.maxWidth);return{fontKey:t,sizePx:o,weight:mw(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(r)?Ja(r/o,3):1.2,letterEm:Number.isFinite(n)?Ja(n/o,4):0,align:xw(e.textAlign),case:iw(e.textTransform),paddingPx:Number.isFinite(a)?Math.round(a):0,widthPx:Number.isFinite(l)&&l<ja?Math.round(l):ja}}function mw(e){return Number.isFinite(e)?Uk.reduce((t,o)=>Math.abs(o-e)<Math.abs(t-e)?o:t):400}function xw(e){for(let t of zk)if(t===e)return t;return e==="end"?"right":"left"}function wH(e,t){let o=Ex(e);if(!o)return"";for(let r of ms)if(Ex(t(r.cssVar))===o)return r.key;return""}var Ex=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function gw(e){let t=Kd(e);return t?`var(${t.cssVar})`:""}function vH(e,t,o,r){return!t||Xa(t)?.nodeId!==e?null:o.find(a=>r(a.getAttribute("class")))??o[0]??null}function Iw(e){let t=new Set,o=e;if(typeof window>"u"||!o?.ownerDocument)return t;let r=window.getComputedStyle(o);for(let n of hw)r.getPropertyValue(`--size-${n}`).trim()&&t.add(n);return t}var hw=["headingLarge","headingMedium","headingSmall","accent","body","label"];function TH(e,t,o=()=>Pn,r=a=>a,n=Sw){let a=0;for(let{element:l,partId:s}of e){let i=Xa(s)?.propKey;if(!i)continue;let c=r(i),f=Object.hasOwn(t,c)?Cn(t[c])??{}:{},u=!!f.line||!!f.letter,d=So(f,u?o(l):Pn,Iw(l)),p=Oi.some(I=>l.style[I]),x=!1;for(let[I,h]of Object.entries(d))l.style[I]=h,h&&(x=!0);if(p||Oi.some(I=>d[I]))for(let I of bw(l,n))for(let h of Oi)I.style[h]=d[h]??"";x&&(a+=1)}return a}function bw(e,t){let o=Cr(e.textContent??""),r=[],n=e;for(let a=0;a<yw&&t(n);a+=1){let l=n.parentElement;if(!l||Cr(l.textContent??"")!==o)break;r.push(l),n=l}return r}var yw=8;function Sw(e){let t=e;return typeof window>"u"||!t?.ownerDocument?!1:window.getComputedStyle(t).display==="inline"}var Pn={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:ja},Cw=Object.keys(So({},Pn)),Di=new Set(["color","overflowWrap"]),Oi=Cw.filter(e=>!Di.has(e));function Bx(e,t,o,r=n=>n){let n=new Map;for(let s of e){let i=Fi(s.key,s.row);for(let c of s.texts){let f=n.get(c);f?(f.keys.add(s.key),f.partKeys.add(i)):n.set(c,{keys:new Set([s.key]),partKeys:new Set([i])})}}let a=new Map;for(let s of Object.keys(t)){if(!Pw(s))continue;let i=Cn(t[s])??{},c=So(i,Pn);Object.values(c).some(Boolean)&&a.set(s,{stamp:Lx(o,s),declarations:c})}let l=new Map;for(let[s,{keys:i,partKeys:c}]of n){let f=c.size===1?[...c][0]:i.size===1?[...i][0]:null;if(!f)continue;let u=r(f);if(!Object.hasOwn(t,u))continue;let d=Cn(t[u])??{},p=So(d,Pn);Object.values(p).some(Boolean)&&l.set(s,{stamp:Lx(o,f),declarations:p})}return l.size||a.size?{rules:l,kindRules:a,drawn:new Set(n.keys())}:null}function Pw(e){return e.startsWith("@")}function Dx(e,t){return e?.kindRules.get(t)??null}function Lx(e,t){let o=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${o(e)}~${o(t)}`}function Mx(e){let t=[],o=new Set,r=n=>{let{stamp:a,declarations:l}=n;if(o.has(a))return;o.add(a);let s=Object.entries(l).filter(([,d])=>d!==""),i=d=>d.map(([p,x])=>`${kw(p)}: ${x}`).join("; "),c=`[${Mi}="${a}"]`,f=s.filter(([d])=>!Di.has(d)),u=s.filter(([d])=>Di.has(d));f.length&&t.push(`${c}, *:has(> ${c}) { ${i(f)} }`),u.length&&t.push(`${c} { ${i(u)} }`)};for(let n of e.rules.values())r(n);for(let n of e.kindRules.values())r(n);return t.join(`
|
|
4
|
-
`)}var kw=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function Hx(e,t){if(!e)return null;let o=Cr(t),r=e.rules.get(o);if(r)return r;if(o.length<ww||e.drawn.has(o))return null;let n=null;for(let[a,l]of e.rules)if(a.includes(o)){if(n&&n.stamp!==l.stamp)return null;n=l}return n}var ww=8;import{createContext as Kx,useContext as Hi,useId as Rw,useMemo as Fw}from"react";var kn="@name",Gx="@body",Wx="@value",EH={[kn]:"Name",[Gx]:"Body",[Wx]:"Value"},vw={TimelineTrack:{"entries.date":kn,"entries.title":kn,"entries.blurb":Gx},Footprint:{"offices.city":kn},Stats:{"items.label":kn,"items.value":Wx}};function Tw(e){let{key:t,row:o}=Ei(e);return o?`${t}.${o.rowKey}`:null}function Ux(e,t){if(!e)return t;let o=Tw(t);return o?vw[e]?.[o]??t:t}import{Fragment as zx,jsx as Za,jsxs as Ew}from"react/jsx-runtime";var Gi=Kx(null),$x=Kx(null);function BH({needles:e,styles:t,type:o,children:r}){let n=Rw(),a=JSON.stringify([n,e,t,o]),l=Fw(()=>Bx(e,t,n,s=>Ux(o,s)),[a]);return l?Ew(zx,{children:[Za("style",{"data-sf-part-styles":"",dangerouslySetInnerHTML:{__html:Mx(l)}}),Za(Gi.Provider,{value:l,children:r})]}):Za(zx,{children:r})}function Vx(e){let t=Hi(Gi),o=Hi($x),r=Hx(t,e);return r&&r.stamp!==o?r:null}function DH(e){return Dx(Hi(Gi),e)}function qx({stamp:e,children:t}){return Za($x.Provider,{value:e,children:t})}import{Fragment as Lw,jsx as Wi}from"react/jsx-runtime";function Pr({value:e,children:t}){let o=Vx(e);return o?Wi(qx,{stamp:o.stamp,children:Wi("span",{[Mi]:o.stamp,children:t})}):Wi(Lw,{children:t})}import{jsx as ue,jsxs as Ui}from"react/jsx-runtime";function re(e,t=!1){let o=Hw(t),r=Ri(e);if(r.length===1){let[a]=r,l=Ti(a),s=l?Dw(l,a.children):a.children;return ue(Pr,{value:e,children:Qa(s,o)})}let n=[];return r.forEach((a,l)=>{if(a.bullet){n.push(ue("span",{"data-sf-bullet":"",className:_w,children:Qa(a.children,o)},l));return}if(a.number!=null){n.push(Ui("span",{"data-sf-number":a.number,className:Aw,children:[Ui("span",{className:Ow,children:[a.number,"."]}),Qa(a.children,o)]},l));return}l>0&&!Nw(r[l-1])&&n.push(ue("br",{},`br${l}`)),n.push(ue(Xx,{children:Qa(a.children,o)},l))}),ue(Pr,{value:e,children:n})}var _w="relative block pl-6 before:absolute before:left-1.5 before:font-bold before:text-accent before:content-['\xB7']",Aw="relative block pl-[2em]",Ow="absolute left-0 w-[1.6em] text-right tabular-nums";function Nw(e){return e.bullet||e.number!=null}var Bw="text-accent underline underline-offset-[0.18em]";function Dw(e,t){let[o,...r]=t;return o?.kind==="text"?[{kind:"text",text:`${e}${o.text}`},...r]:[{kind:"text",text:e},...t]}function Mw(e){if(e)return Nx(e)?e:Object.hasOwn(yr,e)?yr[e]:void 0}function Qa(e,t){let o=[],r=!1;return e.forEach((n,a)=>{if(n.kind==="text"){o.push(ue("span",{children:et(n.text)},a)),r=!0;return}r||o.push(ue("span",{},`e${a}`)),o.push(jx(n,a,t)),r=!1}),r||o.push(ue("span",{},"end")),o}function Yx(e,t){return e.length===1&&e[0].kind==="text"?et(e[0].text):e.map((o,r)=>o.kind==="text"?ue(Xx,{children:et(o.text)},r):jx(o,r,t))}function Hw(e){return e?"font-normal italic text-accent":"not-italic text-accent"}function jH(e){return ue(Pr,{value:e,children:ue("span",{children:e})})}function jx(e,t,o){if(e.kind==="link")return ue("a",{href:e.href,className:Bw,children:Yx(e.children,o)},t);let r=Yx(e.children,o),n=cx[e.kind];if(n)return ue("span",{[fx]:n,children:r},t);switch(e.kind){case"underline":return ue("u",{children:r},t);case"sup":return ue("sup",{children:r},t);case"sub":return ue("sub",{children:r},t);case"color":{let a=Mw(e.color);return a?ue("span",{style:{color:a},children:r},t):ue("span",{children:r},t)}case"accent":case"highlight":return ue("em",{className:o,children:r},t);case"bold":return ue("strong",{className:"font-semibold",children:r},t);case"italic":return ue("em",{className:"italic",children:r},t);case"strike":return ue("s",{className:"line-through",children:r},t);default:return ue("span",{children:r},t)}}function Ot(e,t=!0){let o=e.split(`
|
|
5
|
-
`);return ue(Pr,{value:e,children:o.map((r,n)=>Ui("span",{children:[re(r,t),n<o.length-1?ue("br",{}):null]},n))})}function el(e){return e.split(/\n\s*\n/).map(t=>t.trim()).filter(Boolean)}import{jsxs as Jx}from"react/jsx-runtime";function zi({text:e,linkText:t,linkHref:o}){let r=(t??"").trim(),n=(o??"").trim(),a=!!r&&!!n;return!e&&!a?null:Jx("p",{className:"mt-5 font-mono text-[length:var(--size-label,13px)] tracking-[0.06em] text-fg-dim",children:[e?re(e):null,e&&a?" ":null,a&&Jx(Pe,{href:n,className:"text-accent transition-colors hover:text-fg",children:[re(r)," \u2192"]})]})}import{createContext as Gw,useCallback as Zx,useContext as Ww,useEffect as Uw,useId as zw,useMemo as Kw,useRef as $w,useState as Vw}from"react";import{jsx as qw}from"react/jsx-runtime";var Qx=Gw(null);function nG({reason:e,children:t}){let[o,r]=Vw([]),n=$w(null),a=Zx(c=>{r(f=>f.includes(c)?f:[...f,c])},[]),l=Zx(c=>{r(f=>f.filter(u=>u!==c))},[]),s=e==="none-configured",i=Kw(()=>({noCurrencyConfigured:s,live:o,firstRendered:n,join:a,leave:l}),[s,o,a,l]);return qw(Qx.Provider,{value:i,children:t})}function eg(e){let t=Ww(Qx),o=zw(),r=!!e&&!!t?.noCurrencyConfigured;r&&t&&t.firstRendered.current===null&&(t.firstRendered.current=o);let n=t?.join,a=t?.leave;return Uw(()=>{if(!(!r||!n||!a))return n(o),()=>a(o)},[r,n,a,o]),!r||!t?!1:(t.live.length>0?t.live[0]:t.firstRendered.current)===o}import{jsx as Xw}from"react/jsx-runtime";var Yw="This website has no currency yet. Add one in Settings and these cards will price. Only you can see this line.";function Ki({editing:e}){return eg(e)?Xw(zi,{text:Yw}):null}import{createContext as jw,useContext as Jw,useEffect as Zw,useState as tg}from"react";import{jsx as tl}from"react/jsx-runtime";var og=jw({wheels:[],loading:!1});function rg({children:e}){let[t,o]=tg([]),[r,n]=tg(!0);return Zw(()=>{let a=!1;return No().then(l=>{a||(o(l),n(!1))}).catch(()=>{a||n(!1)}),()=>{a=!0}},[]),tl(og.Provider,{value:{wheels:t,loading:r},children:e})}function Qw({code:e,finish:t,wheel:o}){let{wheels:r,loading:n}=Jw(og),a=o??(e?r.find(l=>l.slug===e):void 0);return a?tl(hn,{wheel:a,variant:"catalog",defaultFinish:t},t??""):tl("div",{className:"sf-card flex aspect-square w-full items-center justify-center bg-surface-2 p-4 text-center",children:tl("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:n?"Loading\u2026":e||"Set a design code"})})}import{createContext as ov,useCallback as tt,useContext as rv,useEffect as nv,useMemo as av,useRef as sg,useState as kr}from"react";var bG={default:"Sort \xB7 Featured",new:"Newest","price-asc":"Price \xB7 Low","price-desc":"Price \xB7 High",name:"Name A\u2013Z"},ol={process:null,size:null,lugs:null,finish:null,priceMin:null,priceMax:null,sort:"default"};function ev(e,t,o){return!(t.process&&e.process!==t.process||t.size&&!e.sizes.includes(t.size)||t.lugs!=null&&Qs(e)!==t.lugs||t.finish&&!e.finishes.some(r=>r.family===t.finish)||!ra(e.prices,o,t.priceMin,t.priceMax))}function tv(e,t,o){return[...e].sort((r,n)=>{switch(t){case"price-asc":return cr(r.prices,n.prices,o,"asc");case"price-desc":return cr(r.prices,n.prices,o,"desc");case"name":return r.name.localeCompare(n.name);case"new":return(n.badge==="new"?1:0)-(r.badge==="new"?1:0);default:return 0}})}function ng(e,t,o,r=null){let n=Zp(e,r);return tv(n.filter(a=>ev(a,t,o)),t.sort,o)}import{jsx as sv}from"react/jsx-runtime";var ig={fit:null,name:"",resolving:!1,unresolved:!1};function lv(e,t){return e.fit===t.fit&&e.name===t.name&&e.resolving===t.resolving&&e.unresolved===t.unresolved}var st=()=>{},cg=ov({filters:ol,setProcess:st,setSize:st,setLugs:st,setFinish:st,setPriceMin:st,setPriceMax:st,setSort:st,clearAll:st,reportCount:st,total:0,reportLugs:st,lugOptions:[],reportSizes:st,sizeOptions:[],reportFinishes:st,finishOptions:[],optionsReported:!1,scrollProcess:null,vehicle:ig,publishVehicle:st}),rl="data-catalog-collection",ag=(e,t)=>e-t;function lg(e,t){return e.length===t.length&&e.every((o,r)=>o===t[r])}function $i(e){let t=sg(new Map),[o,r]=kr([]),n=tt((a,l)=>{let s=t.current.get(a);if(s&&lg(s,l))return;t.current.set(a,l);let i=new Set;for(let f of t.current.values())for(let u of f)i.add(u);let c=[...i].sort(e);r(f=>lg(f,c)?f:c)},[e]);return[o,n]}function kG({children:e,initial:t}){let[o,r]=kr(t??ol),n=tt(F=>r(E=>({...E,process:F})),[]),a=tt(F=>r(E=>({...E,size:F})),[]),l=tt(F=>r(E=>({...E,lugs:F})),[]),s=tt(F=>r(E=>({...E,finish:F})),[]),i=tt(F=>r(E=>({...E,priceMin:F})),[]),c=tt(F=>r(E=>({...E,priceMax:F})),[]),f=tt(F=>r(E=>({...E,sort:F})),[]),u=tt(()=>r(F=>({...ol,sort:F.sort})),[]),[d,p]=kr(ig),x=tt(F=>{p(E=>lv(E,F)?E:F)},[]),g=sg(new Map),[I,h]=kr(0),C=tt((F,E)=>{if(g.current.get(F)===E)return;g.current.set(F,E);let N=0;for(let le of g.current.values())N+=le;h(N)},[]),[S,P]=$i(ag),[T,b]=$i(ag),[w,O]=$i(Cu),[D,R]=kr(!1),L=tt((F,E)=>{R(!0),P(F,E)},[P]),G=tt((F,E)=>{R(!0),b(F,E)},[b]),Y=tt((F,E)=>{R(!0),O(F,E)},[O]),[M,v]=kr(null);nv(()=>{let E=0,se=()=>{E=0;let le=null,ge=document.querySelectorAll(`[${rl}]`);for(let ie of ge){let te=ie.getBoundingClientRect();if(te.top<=140&&te.bottom>140){le=ie.getAttribute(rl)??null;break}}v(le)},N=()=>{E||(E=requestAnimationFrame(se))};return se(),window.addEventListener("scroll",N,{passive:!0}),window.addEventListener("resize",N),()=>{window.removeEventListener("scroll",N),window.removeEventListener("resize",N),E&&cancelAnimationFrame(E)}},[]);let j=av(()=>({filters:o,setProcess:n,setSize:a,setLugs:l,setFinish:s,setPriceMin:i,setPriceMax:c,setSort:f,clearAll:u,reportCount:C,total:I,reportLugs:L,lugOptions:S,reportSizes:G,sizeOptions:T,reportFinishes:Y,finishOptions:w,optionsReported:D,scrollProcess:M,vehicle:d,publishVehicle:x}),[o,n,a,l,s,i,c,f,u,C,I,L,S,G,T,Y,w,D,M,d,x]);return sv(cg.Provider,{value:j,children:e})}function fg(){return rv(cg)}function iv(e){if(!e.includes("_"))return e;let t=e.replace(/^_+/,""),o=e.slice(0,e.length-t.length),[r,...n]=t.split("_");return o+r+n.map(a=>a.slice(0,1).toUpperCase()+a.slice(1)).join("")}function Vi(e){if(Array.isArray(e))return e.map(Vi);if(e&&typeof e=="object"){let t={};for(let[o,r]of Object.entries(e))t[iv(o)]=Vi(r);return t}return e}function cv(e){return Vi(e)}function nl(e){return e.map(t=>ke(t)==="tyre"?t:cv(t))}import{useCallback as $v,useEffect as Vv,useMemo as qv,useState as _g}from"react";import{useState as fv}from"react";import{jsx as qi}from"react/jsx-runtime";function Yi({brand:e,logo:t}){let[o,r]=fv(!1),n=(e??"").trim();if(!n)return null;let a=o?void 0:$t(t??void 0);return qi("div",{className:"sf-card-plate absolute inset-x-0 bottom-0 flex h-1/4 items-center justify-center bg-[var(--card-bg)] px-4 transition-colors duration-200 group-hover:bg-[var(--card-bg-hover)]",children:a?qi("img",{src:a,alt:n,className:"max-h-[52%] max-w-[78%] object-contain",draggable:!1,onError:()=>r(!0)}):qi("span",{className:"truncate font-display text-[length:var(--size-body,18px)] font-medium uppercase leading-none tracking-[-0.01em] text-fg",children:n})})}import{useEffect as Iv,useState as hv}from"react";import{createContext as dv,lazy as uv,Suspense as pv,useContext as mv}from"react";import{jsx as al}from"react/jsx-runtime";var xv={Link:Pe,Image:io},gv=dv(xv);function dg(){return mv(gv)}function ll(e){let{Link:t}=dg();return al(t,{...e})}function sl(e){let{Image:t}=dg();return al(t,{...e})}function BG(e){let t=uv(e);return function(r){return al(pv,{fallback:null,children:al(t,{...r})})}}import{jsx as Xi,jsxs as bv}from"react/jsx-runtime";function Wo({fallback:e,className:t,src:o,alt:r="",objectPosition:n,objectFit:a="cover",sizes:l="100vw",priority:s=!1,deferFetch:i=!1,showBackground:c=!0,treatment:f}){let[u,d]=hv(!1),p=o||"";Iv(()=>{d(!1)},[p]);let x=Zn(p),g=!p||u;return bv("div",{className:`relative h-full w-full overflow-hidden ${t??""}`,children:[Xi("div",{className:"absolute inset-0 flex items-center justify-center",style:c?{background:"var(--surface)"}:void 0,children:g?e:null}),p&&(x?Xi("img",{src:p,alt:r,decoding:"async",...i?{loading:"lazy"}:{},className:`absolute inset-0 h-full w-full${f?.className?` ${f.className}`:""}`,style:{display:u?"none":"block",objectFit:a,...n?{objectPosition:n}:{},...f?.style??{}},onError:()=>d(!0)}):Xi(sl,{src:p,alt:r,fill:!0,sizes:l,priority:s,...f?.className?{className:f.className}:{},style:{display:u?"none":"block",objectFit:a,...n?{objectPosition:n}:{},...f?.style??{}},onError:()=>d(!0)}))]})}import{useId as Tv}from"react";var yv=25.4,wn=400,cl=152,Sv=58,ug=cl*Math.cos(Sv*Math.PI/180),Cv=14,Pv=wn/2,kv={sectionWidth:225,aspectRatio:60,rimDiameter:17};function mg(e){let t=Yt(e);return t?{sectionWidth:t.width,aspectRatio:t.profile,rimDiameter:t.rim}:kv}function xg(e){let t=e.rimDiameter*yv/2,o=t+e.sectionWidth*e.aspectRatio/100,r=cl*(e.sectionWidth/o),n=t/o;return{cy:Pv,rx:ug,ry:cl,cxf:wn/2-r/2-Cv,dx:r,rimRx:ug*n,rimRy:cl*n}}var X=e=>e.toFixed(1);function fl(e,t,o,r=!1){let n=e.cxf+t*e.dx,[a,l]=r?[e.cy+e.ry,e.cy-e.ry]:[e.cy-e.ry,e.cy+e.ry];return`M${X(n)} ${X(a)} A${X(e.rx)} ${X(e.ry)} 0 0 ${o} ${X(n)} ${X(l)}`}function ji(e,t,o){let r=e.cxf+t*e.dx,n=e.cxf+o*e.dx,a=e.cy-e.ry,l=e.cy+e.ry;return`M${X(r)} ${X(a)} L${X(n)} ${X(a)} A${X(e.rx)} ${X(e.ry)} 0 0 1 ${X(n)} ${X(l)} L${X(r)} ${X(l)} A${X(e.rx)} ${X(e.ry)} 0 0 0 ${X(r)} ${X(a)} Z`}function il(e,t,o){let r=o*Math.PI;return[e.cxf+t*e.dx+e.rx*Math.sin(r),e.cy-e.ry*Math.cos(r)]}function gg(e,t,o,r,n){let[a,l]=il(e,t,r),[s,i]=il(e,t,n),[c,f]=il(e,o,n),[u,d]=il(e,o,r);return`M${X(a)} ${X(l)} A${X(e.rx)} ${X(e.ry)} 0 0 1 ${X(s)} ${X(i)} L${X(c)} ${X(f)} A${X(e.rx)} ${X(e.ry)} 0 0 0 ${X(u)} ${X(d)} L${X(a)} ${X(l)} Z`}var pg=[{f:[0,.215]},{f:[.245,.485]},{f:[.515,.755]},{f:[.785,1]}],wv={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}}]},vv=[["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 Ig(e){let t=` ${(e??"").toLowerCase().replace(/[^a-z0-9]+/g," ").trim()} `;if(t.trim()==="")return pg;for(let[o,r]of vv)if(t.includes(` ${o} `))return wv[r];return pg}var $G="Illustrations are drawn to each tyre's listed size and represent its category; supplier photography replaces them where available.";import{Fragment as vn,jsx as V,jsxs as Nt}from"react/jsx-runtime";var it={rib:.2,grooveWall:.16,shoulder:.22,silhouette:.26,relief:[.26,.15,.11],lettering:.1,dishFill:.06,dishEdge:.3,spoke:.3,hubFill:.16,hubEdge:.34},Rv=[.8,.52,.24],hg=.4,bg=.88,yg=.3,Sg=5,Cg=.3,Pg=.84,Fv=7,Q=e=>Math.round(e*10)/10;function Ji({size:e,type:t,className:o}){let r=Tv().replace(/[^a-zA-Z0-9]/g,""),n={tread:`${r}-tread`,wall:`${r}-wall`,rim:`${r}-rim`,shadow:`${r}-shadow`,crown:`${r}-crown`},a=xg(mg(e)),l=ji(a,0,1),s=e?`${e} tyre illustration`:"Tyre illustration";return Nt("svg",{"data-tyre-placeholder":"",viewBox:`0 0 ${wn} ${wn}`,role:"img","aria-label":s,fill:"none",className:o??"block h-full w-full",children:[V("title",{children:s}),Nt("defs",{children:[V(Lv,{id:n}),V("clipPath",{id:n.crown,children:V("path",{d:l})})]}),V("ellipse",{cx:Q(a.cxf+a.dx/2),cy:Q(a.cy+a.ry-4),rx:Q(a.dx*1.5),ry:16,fill:`url(#${n.shadow})`}),V(_v,{g:a,id:n}),V(Av,{g:a,id:n}),V("path",{d:l,fill:`url(#${n.tread})`}),V("g",{clipPath:`url(#${n.crown})`,children:Ig(t).map(i=>V(Ev,{g:a,column:i},i.f[0]))}),V("path",{d:fl(a,0,0,!0),stroke:"currentColor",strokeOpacity:it.shoulder,strokeWidth:1.2}),V("path",{d:fl(a,1,1),stroke:"currentColor",strokeOpacity:it.silhouette,strokeWidth:1.4})]})}function Ev({g:e,column:t}){let[o,r]=t.f;if(!t.blocks)return Nt(vn,{children:[V("path",{d:ji(e,o,r),fill:"currentColor",fillOpacity:it.rib}),V("path",{d:fl(e,o,1),stroke:"currentColor",strokeOpacity:it.grooveWall,strokeWidth:1})]});let{count:n,gap:a,phase:l=0}=t.blocks,s=1/n,i=[];for(let c=-1;c<=n;c+=1){let f=Math.max((c+l+a/2)*s,0),u=Math.min((c+l+1-a/2)*s,1);u-f>s*.15&&i.push([f,u])}return V(vn,{children:i.map(([c,f])=>V("path",{d:gg(e,o,r,c,f),fill:"currentColor",fillOpacity:it.rib,stroke:"currentColor",strokeOpacity:it.grooveWall,strokeWidth:1},c))})}function Lv({id:e}){return Nt(vn,{children:[Nt("linearGradient",{id:e.tread,x1:"0",y1:"0",x2:"1",y2:"0",children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.07}),V("stop",{offset:"0.14",stopColor:"currentColor",stopOpacity:.24}),V("stop",{offset:"0.45",stopColor:"currentColor",stopOpacity:.18}),V("stop",{offset:"0.84",stopColor:"currentColor",stopOpacity:.1}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.05})]}),Nt("linearGradient",{id:e.wall,x1:"0.15",y1:"0",x2:"0.9",y2:"1",children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.28}),V("stop",{offset:"0.45",stopColor:"currentColor",stopOpacity:.17}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.08})]}),Nt("linearGradient",{id:e.rim,x1:"0.1",y1:"0",x2:"0.9",y2:"1",children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.46}),V("stop",{offset:"0.5",stopColor:"currentColor",stopOpacity:.26}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:.12})]}),Nt("radialGradient",{id:e.shadow,children:[V("stop",{offset:"0",stopColor:"currentColor",stopOpacity:.22}),V("stop",{offset:"1",stopColor:"currentColor",stopOpacity:0})]})]})}function _v({g:e,id:t}){let o=e.rimRy/e.ry,r=a=>o+(1-o)*a,n=Math.max(6,(e.ry-e.rimRy)*.3);return Nt(vn,{children:[V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rx),ry:Q(e.ry),fill:`url(#${t.wall})`}),Rv.map((a,l)=>{let s=r(a);return V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rx*s),ry:Q(e.ry*s),stroke:"currentColor",strokeOpacity:it.relief[l],strokeWidth:1},a)}),V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rx*r(hg)),ry:Q(e.ry*r(hg)),stroke:"currentColor",strokeOpacity:it.lettering,strokeWidth:Q(n)})]})}function Av({g:e,id:t}){let o=Array.from({length:Sg},(r,n)=>{let a=(n*(360/Sg)-90)*Math.PI/180;return{x1:e.cxf+e.rimRx*Cg*Math.cos(a),y1:e.cy+e.rimRy*Cg*Math.sin(a),x2:e.cxf+e.rimRx*Pg*Math.cos(a),y2:e.cy+e.rimRy*Pg*Math.sin(a)}});return Nt(vn,{children:[V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rimRx),ry:Q(e.rimRy),fill:`url(#${t.rim})`}),V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rimRx*bg),ry:Q(e.rimRy*bg),fill:"currentColor",fillOpacity:it.dishFill,stroke:"currentColor",strokeOpacity:it.dishEdge,strokeWidth:1}),o.map((r,n)=>V("line",{x1:Q(r.x1),y1:Q(r.y1),x2:Q(r.x2),y2:Q(r.y2),stroke:"currentColor",strokeOpacity:it.spoke,strokeWidth:Fv,strokeLinecap:"round"},n)),V("ellipse",{cx:Q(e.cxf),cy:Q(e.cy),rx:Q(e.rimRx*yg),ry:Q(e.rimRy*yg),fill:"currentColor",fillOpacity:it.hubFill,stroke:"currentColor",strokeOpacity:it.hubEdge,strokeWidth:1})]})}import{jsx as Zi}from"react/jsx-runtime";function Qi({image:e,size:t,type:o,sizes:r,priority:n=!1,className:a="aspect-square",showBackground:l=!0}){return Zi("div",{className:`text-fg ${a}`,style:{padding:"var(--sf-tyre-image-inset, 0)"},children:Zi(Wo,{label:t||"Tyre",src:$t(e??void 0),alt:t?`${t} tyre`:"Tyre",objectFit:"contain",sizes:r,priority:n,showBackground:l,fallback:Zi(Ji,{size:t,type:o,className:"block h-full w-full p-3"})})})}import{useEffect as Ov,useState as kg}from"react";var ec=new Map;function Nv(e){let t=ec.get(e);if(t)return t;let o=Rt.getTyre(e).catch(r=>{throw ec.delete(e),r});return ec.set(e,o),o}function wg(e,t){let[o,r]=kg("idle"),[n,a]=kg(null);return Ov(()=>{if(!t||!e)return;let l=!1;return r("loading"),Nv(e).then(s=>{l||(a(s),r("ready"))}).catch(()=>{l||r("error")}),()=>{l=!0}},[e,t]),{state:o,tyre:n}}function s4(e){if(!e||e.year===null)return null;let{make:t,model:o,year:r,modification:n}=e;return!t||!o||!n?null:{make:t,model:o,year:r,modification:n}}function Bv(e,t){let o=new URLSearchParams({make:t.make,model:t.model,year:String(t.year),modification:t.modification});return`/api/v1/tyres/${encodeURIComponent(e)}/fitment?${o.toString()}`}function dl(e,t=""){return{vehicle:{...e,region:t},status:"unknown",oemSizes:[],variants:[]}}function Dv(e,t){if(typeof t!="object"||t===null)return dl(e);let o=t,r=typeof o.vehicle=="object"&&o.vehicle!==null?o.vehicle:{},n=typeof r.region=="string"?r.region:"",a=o.status;if(a!=="fits"&&a!=="doesNotFit")return dl(e,n);let l=Array.isArray(o.variants)?o.variants.filter(s=>typeof s=="object"&&s!==null&&typeof s.sku=="string"&&typeof s.fits=="boolean"):[];return l.length===0?dl(e,n):{vehicle:{make:typeof r.make=="string"?r.make:e.make,model:typeof r.model=="string"?r.model:e.model,year:typeof r.year=="number"?r.year:e.year,modification:typeof r.modification=="string"?r.modification:e.modification,region:n},status:a,oemSizes:Array.isArray(o.oemSizes)?o.oemSizes.filter(s=>typeof s=="string"):[],variants:l.map(s=>({sku:s.sku,size:typeof s.size=="string"?s.size:"",fits:s.fits}))}}async function i4(e,t){try{let o=await eu(Bv(e,t),{baseUrl:tu});return Dv(t,o)}catch{return dl(t)}}function c4(e){if(!e)return[];let t=[];for(let o of[...e.frontTyres,...e.rearTyres]){let r=Yt(o);if(!r)continue;let n=Vt(r);t.includes(n)||t.push(n)}return t}function f4(e,t){if(t.length===0)return null;for(let o of e){let r=Yt(o);if(!r)continue;let n=Vt(r);if(t.includes(n))return n}return null}function Mv(e,t){if(!e||e.status==="unknown")return"unknown";let o=e.variants.find(r=>r.sku===t);return o?o.fits?"fits":"doesNotFit":"unknown"}var Hv="/tyres";function ul(e){return e?`${Hv}/${e}`:null}function tc(e,t){return fu({partNumber:e.sku,prices:e.prices},t)}var Gv="Tyre";function pl(e,t,o,r){return{id:`${e.slug}|${t.sku}|${o.unit}|${o.spares>0?"spare":"no-spare"}`,slug:e.slug,name:hr(e.name),process:e.brand||Gv,positionNo:"01",config:[{label:t.size},{label:ea(o)}],finishName:"",size:t.size,components:tc(t,o),qty:r,href:ul(e.slug)??void 0,kind:"tyre",sku:t.sku,pack:o}}function I4(e){return e.kind==="tyre"}function vg(e,t){let o=e.prices?.[t];return typeof o!="number"||!Number.isFinite(o)||o<=0?!1:e.inStock}var Tg="handed",Rg="plain";function w4(e){let t=e.variants??[],o=e.finishes.map(d=>({value:d.name,label:d.name,swatch:d.color}));function r(d){let p=[];for(let x of t){let g=d(x);!g||p.some(I=>I.value===g.value)||p.push(g)}return p}let n=r(d=>({value:di(d),label:Cm(d),note:Pm(d)})),a=r(d=>d.boltPattern?{value:d.boltPattern,label:d.boltPattern}:null),l=r(d=>{let p=Aa(d);return p===null?null:{value:p,label:`ET ${p}`}}),s=r(d=>d.centreBore==null?null:{value:Be(d.centreBore),label:`${Be(d.centreBore)} mm`}),i=r(d=>({value:ur(d)?Tg:Rg,label:ur(d)?Ep:Lp})),c=t.map(d=>({id:`${d.finishName}|${d.size}`,options:{finish:d.finishName,size:di(d),variantSize:d.size,...d.boltPattern?{boltPattern:d.boltPattern}:{},...Aa(d)!==null?{et:Aa(d)}:{},...d.centreBore==null?{}:{centreBore:Be(d.centreBore)},pairing:ur(d)?Tg:Rg},inStock:!un(d),image:null,components:d.components})),u=((e.defaultFinish?o.find(d=>d.value===e.defaultFinish):void 0)??o[0])?.value;return{kind:"alloy-wheel",source:e,slug:e.slug,name:e.name,eyebrow:e.process,badge:e.badge==="new"?"New 2026":e.badge?"Bestseller":"",href:`/wheels/${e.slug}`,crumbs:[{label:"Home",href:"/"},{label:"Wheels",href:"/wheels"},{label:e.process,href:"/wheels"},{label:e.name}],cover:e.coverImage??null,inStock:e.inStock===!0,mediaGroups:e.mediaGroups,optionFields:[{key:"finish",label:"Finish",prompt:"Select a finish",role:"resolves",display:"swatch",defaultValue:u},{key:"size",label:"Size",prompt:"Select a size",role:"resolves",display:"pill",empty:{text:"This wheel isn't available to order online in this finish.",linkText:"Contact us about it \u2192",href:"/contact"}},{key:"boltPattern",label:"Bolt pattern",prompt:"Select a bolt pattern",role:"describes",display:"pill"},{key:"et",label:"Offset",prompt:"Select an offset",role:"describes",display:"pill"},{key:"centreBore",label:"Centre bore",prompt:"Select a centre bore",role:"describes",display:"pill"},{key:"pairing",label:"Wheels",prompt:"Select a pairing",role:"describes",display:"pill"}],optionValues:{finish:o,size:n,boltPattern:a,et:l,centreBore:s,pairing:i},parts:c,anchorPrices:e.prices,anchorMsrpPrices:e.msrpPrices??{}}}function v4(e,t){if(e.kind!=="alloy-wheel"||t===null)return e;let o=new Set(Jp(e.source.variants??[],t));if(o.size===0)return e;let r=e.parts.filter(s=>{let i=ml(e.source,s);return i!==null&&o.has(i)});if(r.length===0||r.length===e.parts.length)return e;let n=(s,i)=>new Set(s.map(c=>c.options[i]).filter(c=>c!==void 0)),a={},l=[];for(let s of e.optionFields){let i=n(e.parts,s.key),c=n(r,s.key),f=(e.optionValues[s.key]??[]).filter(d=>c.has(d.value)||!i.has(d.value));a[s.key]=f;let u=s.defaultValue!==void 0&&!f.some(d=>d.value===s.defaultValue)?f[0]?.value:s.defaultValue;l.push(u===s.defaultValue?s:{...s,defaultValue:u})}return{...e,optionFields:l,optionValues:a,parts:r}}function ml(e,t){return t?Na(e.variants??[],t.options.finish,t.options.variantSize)??null:null}function T4(e,t){return e.finishes.find(o=>o.name===t)??e.finishes[0]??Su}function O4(e){return e.kind==="tyre"?"advisory":"required"}var oc={choice:cu,qty:1};function Wv(e,t){if(e.kind!=="alloy-wheel")return`Set of ${4}`;let o=ml(e.source,t);return o?Oa(o):`Set of ${4}`}var Fg=(e,t)=>e===1?t:`${e} \xD7 ${t}`;function Eg(e){return e.unit==="set"?{label:`Add a spare \u2014 ${ir+1} instead of ${ir}`}:null}var Tn={howMany:"How many wheels",oneSet:"One set",oneSetPlusSpare:"One set + 1 spare",whichSide:"Which side is the spare?",left:"Left",right:"Right"};function Uv(e,t){return t.unit!=="set"||du(e)===null?null:{counts:[{value:ir,label:Tn.oneSet},{value:ir+iu,label:Tn.oneSetPlusSpare}],side:t.spares>0?{label:Tn.whichSide,options:[{value:"left",label:Tn.left},{value:"right",label:Tn.right}]}:null}}function zv(e,t,o){if(e.kind==="tyre")return{packs:[{value:"set",label:`A set of ${ir}`},{value:"single",label:"Just one"}],extra:Eg(o.choice),spareCounts:[],spareSide:null,components:t?tc({sku:t.id,prices:t.components[0].prices},o.choice):[],quantityLabel:Fg(o.qty,ea(o.choice))};let r=t?Uv(t.components,o.choice):null;return{packs:[],extra:r?null:Eg(o.choice),spareCounts:r?.counts??[],spareSide:r?.side??null,components:t?bs(t.components,o.choice):[],quantityLabel:Fg(o.qty,uu(Wv(e,t),o.choice))}}function N4(e,t,o,r,n){if(!t)return null;if(e.kind==="tyre"){let f=(e.source.variants??[]).find(u=>u.sku===t.id);return f?pl(e.source,f,r.choice,r.qty):null}let a=e.source,l=ml(a,t);if(!l)return null;let s=t.options.finish??"",i=l.size,c=r.choice.spares>0;return{id:`${a.slug}|${s}|${i}|${n.fitmentKey}${c?"|spare":""}`,slug:a.slug,name:hr(a.name),process:a.process,positionNo:"01",config:[{label:i},{label:s,gold:!0},{label:n.fitmentLabel},{label:zv(e,t,r).quantityLabel}],finishName:s,size:i,components:bs(t.components,r.choice),qty:r.qty,...c?{pack:r.choice}:{}}}function Lg(e,t){let o=t.trim(),r=e.trim();return!r||!Kv(o,r)?o:o.slice(r.length).replace(/^[^\p{L}\p{N}]+/u,"")||o}function Kv(e,t){if(e.length<t.length||e.slice(0,t.length).toLowerCase()!==t.toLowerCase())return!1;let o=e[t.length];return o===void 0||!/[\p{L}\p{N}]/u.test(o)}import{Fragment as Jv,jsx as Co,jsxs as Rn}from"react/jsx-runtime";var Yv="from ",Xv=2,jv=[];function rc({brand:e,brandLogo:t,brandPlate:o=!0,kindLabel:r=null,showBrand:n=!0,name:a,slug:l,sizes:s,fitSize:i=null,rimDiameters:c,prices:f,image:u,currency:d,editing:p=!1,fieldUsage:x=jv}){let g=xr(x),{add:I,open:h,warmCatalog:C}=la();Vv(()=>{p||C("tyre")},[p,C]);let{currency:S}=co(),P=na(oa(f,d),null),T=aa(P,d,Yv),b=[s.length>0?`${s.length} ${s.length===1?"size":"sizes"}`:null,g("rim_diameter")?wa(c):null].filter(Boolean).join(" \xB7 "),w=ul(l),[O,D]=_g(!1),R=$v(()=>{l&&D(!0)},[l]),{state:L,tyre:G}=wg(l??null,O),Y=qv(()=>G?.variants??[],[G]),[M,v]=_g(null),j=Y.length===1?Y[0].size:null,F=M??j,E=Y.find(z=>z.size===F),se=E!=null&&vg(E,S),N=L==="ready",le=!w||L==="error"||N&&Y.length===0;function ge(){!G||!E||!se||p||(I(pl(G,E,oc.choice,oc.qty)),h())}let ie=N&&Y.length>0?Y.map(z=>z.size):s,te=ie.slice(0,Xv),he=ie.length-te.length,de=z=>["cursor-pointer transition-colors",gn,z?"border-accent bg-accent text-bg":"border-accent/60 text-accent hover:border-accent hover:bg-accent/10"].join(" ");return Co(In,{href:w,identityLink:!0,containerProps:{onPointerEnter:R,onTouchStart:R,onFocusCapture:R},image:Co(Qi,{image:u,className:"h-full w-full",sizes:"(max-width: 640px) 90vw, (max-width: 1024px) 45vw, 280px",showBackground:!1}),plate:o?Co(Yi,{brand:e,logo:t}):null,eyebrow:ni(r,n&&g("brand")&&e||null),name:Lg(e??"",a),spec:b,price:T,metaLine:P.priced?"each":null,extras:Rn(Jv,{children:[i&&Rn("p",{className:"font-mono text-[length:var(--size-label,11px)] font-medium uppercase tracking-[0.14em] text-green",children:["Fits \xB7 ",i]}),Rn("div",{className:Ha,children:[Co("div",{className:Ga,children:te.map(z=>N&&Y.length>0?Co("button",{type:"button",title:z,"aria-label":z,"aria-pressed":F===z,onClick:()=>v(z),className:de(F===z),children:z},z):Co("span",{className:Ua,children:z},z))}),he>0&&Rn("span",{className:Wa,children:["+",he]})]}),Rn("div",{className:za,children:[!le&&P.priced&&Co("button",{type:"button",onClick:ge,[ta]:"",disabled:N&&!se,className:se||!N?`${br}${se?"":" opacity-80"}`:"cursor-not-allowed border border-dashed border-accent/50 px-4 py-2.5 font-mono text-[length:var(--size-label,11px)] font-bold uppercase tracking-[0.24em] text-accent/70",children:N&&!se?"Select a size":"Add to basket"}),w&&Co(Pe,{href:w,className:Ka,children:"Open product page"})]})]})})}import{jsx as Zv}from"react/jsx-runtime";function nc({item:e,currency:t,kindLabel:o=null,showBrand:r=!0,fitSize:n=null,editing:a=!1,fieldUsage:l}){return Zv(rc,{brand:e.brand,brandLogo:e.brandLogo,kindLabel:o,showBrand:r,name:e.name,slug:e.slug,sizes:e.sizes,fitSize:n,rimDiameters:e.rimDiameters,prices:e.prices,image:e.coverImage,currency:t,editing:a,fieldUsage:l})}import{Fragment as oT,jsx as We,jsxs as Uo}from"react/jsx-runtime";var Og={1:"grid-cols-1",2:"grid-cols-2 max-[800px]:grid-cols-1",3:"grid-cols-3 max-[800px]:grid-cols-1",4:"grid-cols-4 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",5:"grid-cols-5 max-[1100px]:grid-cols-2 max-[800px]:grid-cols-1",6:"grid-cols-6 max-[1100px]:grid-cols-3 max-[800px]:grid-cols-1"},Ng=[{value:"para",label:"Paragraph size \u2014 13px",cls:"font-mono font-normal uppercase tracking-[0.22em] text-[length:var(--size-label,13px)]"},{value:"sm",label:"Small \u2014 40px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,40px)] max-[800px]:text-[length:var(--size-headingMedium,28px)]"},{value:"md",label:"Medium \u2014 48px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,48px)] max-[800px]:text-[length:var(--size-headingMedium,32px)]"},{value:"lg",label:"Large \u2014 56px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,56px)] max-[800px]:text-[length:var(--size-headingMedium,36px)]"},{value:"xl",label:"Extra large \u2014 64px",cls:"font-heading2 font-medium tracking-[-0.03em] text-[length:var(--size-headingMedium,64px)] max-[800px]:text-[length:var(--size-headingMedium,40px)]"}],ac="lg";function eT(e){return(Ng.find(t=>t.value===e)??Ng.find(t=>t.value===ac)).cls}function tT({num:e,catalog:t,kinds:o,title:r,titleSize:n,padTop:a,description:l,link:s,products:i,source:c,columns:f,limit:u,editing:d,capWidth:p,imageBackground:x,spinOnHover:g,coverIndex:I,indexBadge:h,outline:C,showBadge:S,fieldUsage:P,showCardPrice:T,showCardFinishes:b,showCardSizes:w,showCardBuy:O,showCardPage:D,cardImage:R,gap:L}){let G=wr(()=>P?mr(P,"alloy-wheel"):void 0,[P]),Y=wr(()=>P?mr(P,"tyre"):void 0,[P]),M=`pg-${Qv().replace(/:/g,"")}`,v=Og[Math.min(6,Math.max(1,f??4))]??Og[4],j=typeof u=="number"&&u>0,F=typeof p=="number",E=wr(()=>{let Ee=t??c?.wheels??null;return Ee?nl(Ee):null},[t,c]),se=c?.process,N=!!se,{filters:le,reportCount:ge,reportLugs:ie,reportSizes:te,reportFinishes:he,vehicle:de}=fg(),{currency:z}=co(),Ae=N&&!!le.process&&le.process!==se,Fe=wr(()=>E?N?ng(E,le,z,de.fit):E:null,[E,N,le,z,de.fit]);Ag(()=>{if(N)return ge(M,Ae?0:Fe?.length??0),()=>ge(M,0)},[N,Ae,Fe,ge,M]);let Oe=wr(()=>{let Ee=(Fe??[]).filter(B=>ke(B)!=="tyre");if(Ee.length===0)return!1;let A=Ee.some(B=>!!B.process);return Ee.some(B=>!!B.setWords)||ai({kind:!1,brand:!1,process:A},G??[])},[Fe,G]),ne=wr(()=>({lugs:Dp(E??[]),sizes:Gp(E??[]),finishes:Pu(E??[])}),[E]);Ag(()=>(ie(M,ne.lugs),te(M,ne.sizes),he(M,ne.finishes),()=>{ie(M,[]),te(M,[]),he(M,[])}),[ne,ie,te,he,M]);let K=Fp("ProductGrid",L,"both"),H=`${M} grid${K.className} bg-[var(--catalog-grid-bg)] ${v}`,He=Fe?Fe.length>0?We("div",{className:H,style:K.style,children:Fe.map((Ee,A)=>ke(Ee)==="tyre"?We(nc,{item:Ee,currency:z,editing:d,fieldUsage:Y},`tyre:${Ee.slug}-${A}`):We(hn,{wheel:Ee,variant:"catalog"},`${Ee.slug}-${A}`))}):d?We("div",{className:"flex min-h-[320px] items-center justify-center rounded bg-surface-2 p-4 text-center",children:Uo("span",{className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:["No products in \u201C",c?.name,"\u201D yet"]})}):null:We(i,{className:H,style:K.style,minEmptyHeight:320}),Ze=Fe?Fe.length:null,It=Om(pn(o)),Ne=e||r||l||s?Uo("div",{className:`${wu} sticky top-[var(--sf-header-h,88px)] z-30 mb-[18px] 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 ${F?"":"-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:[Uo("div",{className:"flex min-w-0 items-end gap-[21px]",children:[e&&We("span",{className:"font-mono text-[length:var(--size-label,13px)] leading-none uppercase tracking-[0.22em] text-fg-dim",children:re(e)}),r&&We("h2",{className:`${eT(n)} leading-none text-fg max-[800px]:leading-[1] [&>span]:block`,children:Ot(r,!1)})]}),(l||s||Ze!==null)&&Uo("div",{className:"flex items-center gap-5 max-[800px]:gap-3",children:[l&&We("span",{className:"max-w-[340px] truncate font-display text-[length:var(--size-body,13px)] leading-[1.4] text-fg-dim max-[800px]:hidden",children:re(l)}),s&&Uo(Pe,{href:s.href,className:"inline-flex items-center gap-2 whitespace-nowrap font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg",children:[re(s.text),We("span",{"aria-hidden":!0,children:"\u2192"})]}),Ze!==null&&Uo("span",{className:"whitespace-nowrap font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.2em] text-fg-dim",children:[Ze," ",Ze===1?It.one:It.many]})]})]}):null,Ve=typeof a=="number"?a:120,ht=em(h),rt=om(M,ht),zt=Uo(oT,{children:[j&&We("style",{children:`.${M} > *:nth-child(n+${u+1}){display:none}`}),rt&&We("style",{children:rt}),Ne,He,We(Ki,{editing:d})]});if(Ae)return null;let tr=We("section",{...N?{[rl]:se}:{},className:"relative z-[2] bg-bg px-[var(--sf-site-gutter,40px)] pt-[var(--pg-pt)] pb-[120px] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[800px]:pt-[70px] max-[800px]:pb-[70px]",style:{"--pg-pt":`${Ve}px`,...Pp(R)},children:F?We("div",{style:nu(!1,p)??void 0,children:zt}):zt}),Jr=d&&!E?We(rg,{children:tr}):tr;return We(gm,{imageBackgroundFill:Pa(x,Lt),spinOnHover:g??!0,coverIndex:I??1,indexBadge:ht,outline:C??Io,showBadge:S??!0,fieldUsage:G,reserveEyebrow:Oe,showCardPrice:T??!0,showCardFinishes:b??!0,showCardSizes:w??!1,showCardBuy:O??!1,showCardPage:D??!1,children:Jr})}var lc="wheels",rT="collection:",nT=60;function aT(e){let t=e?.props?.source;return e?.type==="ProductGrid"&&!!t?.process}function lT(e){return e.some(t=>t?.type==="CatalogFilterBar"||aT(t))}function sT(){return{type:"CatalogFilterBar",props:{id:"CatalogFilterBar-wheels-seed",showProcess:!0,showLugs:!0,showPrice:!0,showCount:!0,showSort:!0}}}function iT(e,t){let o=Ys(e);return{type:"ProductGrid",props:{id:`ProductGrid-wheels-${o}`,dynamic:!1,num:t,title:e,titleSize:ac,padTop:100,description:"",linkText:"Explore the collection",linkHref:`/wheels/collections/${o}`,columns:4,showAll:!0,limit:8,imageBackground:Lt,spinOnHover:!0,source:{slug:`${rT}${o}`,name:e,process:e,wheels:[]},fullWidth:!0,pageWidth:Qn.default,products:[]}}}function cT(e){let t=e?Ip(e):gp;return[sT(),...t.map(o=>iT(o.key,o.num))]}function Bg(e,t,o){if(e!==lc)return t;let r=t?.content??[];if(lT(r))return t;let n=cT(o),a=r.findIndex(s=>s?.type===jn),l=a===-1?[...r,...n]:[...r.slice(0,a),...n,...r.slice(a)];return{...t,content:l}}function Dg(e,t,o={}){let r=e?.content??[],n=o.scopeToCatalog?Xs(t):null,a=r.map(l=>{let s=l?.props?.source;if(l?.type==="CatalogFilterBar"&&n)return{...l,props:{...l.props,processOptions:n}};if(l?.type!=="ProductGrid"||!s?.process)return l;if(n&&!n.includes(s.process))return null;if(o.onlyEmpty&&(s.wheels?.length??0)>0)return l;let i=t.filter(c=>c.process===s.process).slice(0,nT);return{...l,props:{...l.props,source:{...s,wheels:i}}}}).filter(l=>l!==null);return{...e,content:a}}var fT="__all__",G5="All products";function Mg(e){return e?.slug===fT}var zo="AlloyWheelsListing",dT="ProductGrid",Hg="catalog",uT="CatalogFilterBar",xl="fieldUsage";function vr(e){return e?.type===dT&&Mg(e.props?.source)}function sc(e){return e?.type===uT}function pT(e){return e?.type===zo||vr(e)||sc(e)}function mT(e){let t=e.content??[],o=e.zones??{};return[...t,...Object.values(o).flat()]}function gl(e){return e?mT(e).some(t=>t?.type===zo||vr(t)):!1}function Gg(e,t){return gT(e,o=>vr(o)?{...o,props:{...cc(o).props,[Hg]:xT(t,pn(o.props?.kinds))}}:{...o,props:{...fc(o).props,products:t}})}function ic(e){return Ug(e,pT,t=>sc(t)?Wg(t):vr(t)?cc(t):fc(t))}function Wg(e){if(!e.props||!(xl in e.props))return e;let{[xl]:t,...o}=e.props;return{...e,props:o}}function cc(e){let{[Hg]:t,[xl]:o,...r}=e.props??{};return{...e,props:r}}function xT(e,t){let o=new Set(t);return e.filter(r=>{let n=r.kind??"alloy-wheel";return o.has(n)})}function K5(e){return vr(e)?cc(e):sc(e)?Wg(e):e?.type===zo?fc(e):e}function fc(e){let{wheels:t,products:o,[xl]:r,...n}=e.props??{};return{...e,props:n}}function gT(e,t){return Ug(e,o=>o?.type===zo||vr(o),t)}function Ug(e,t,o){let r=l=>t(l)?o(l):l,n=e,a={...e};return n.content&&(a.content=n.content.map(r)),n.zones&&(a.zones=Object.fromEntries(Object.entries(n.zones).map(([l,s])=>[l,s.map(r)]))),a}import{useEffect as Kg,useRef as dc,useState as $g}from"react";var IT="data-editor-theme";function zg(e){typeof document>"u"||document.documentElement.setAttribute(IT,"light")}var hT=500,Vg={canCreatePlatformTemplate:!1};function bT(e){return!e||typeof e!="object"?Vg:{canCreatePlatformTemplate:e.canCreatePlatformTemplate===!0}}function yT(e,t={}){let o=t.session??Ye();o.auth.token=e.token,o.auth.brandId=e.brandId??null,qd(o,e.siteId),(t.stampChromeTheme??!0)&&zg(e.theme)}function qg(e){let[t,o]=$g(null),r=dc(null),[n,a]=$g(Vg),l=dc(e?.onAuth),s=dc(e?.onMessage);Kg(()=>{l.current=e?.onAuth,s.current=e?.onMessage});let i=fo(),c=ba();return Kg(()=>{let f=i.subscribe(d=>{let p=d;if(p.type==="storefront-editor:auth"&&typeof p.token=="string"&&p.token){let x=!!r.current;r.current=p.token,o(p.token),yT({...p,token:p.token},{stampChromeTheme:i.ownsDocument,session:c}),a(bT(p.can)),l.current?.(x)}else s.current?.(d)});if(i.send("storefront-editor:ready"),!c.usesBridgedToken)return f;let u=window.setInterval(()=>{r.current?window.clearInterval(u):i.send("storefront-editor:ready")},hT);return()=>{f(),window.clearInterval(u)}},[i,c]),{token:t,tokenRef:r,capabilities:n}}var uc=new Set,pc=new Set,mc=new Set;function Q5(e){return uc.add(e),()=>uc.delete(e)}function Yg(){uc.forEach(e=>e())}function eW(e){return pc.add(e),()=>pc.delete(e)}function Xg(){pc.forEach(e=>e())}function Il(e){return mc.add(e),()=>mc.delete(e)}function xc(){mc.forEach(e=>e())}var gc=new Map,ST=9e5,jg=0;function CT(){return jg+=1,`fe-${typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():String(jg)}`}function Jg(e,t){e.connected&&e.send("storefront-editor:open-form",{mode:"edit",formId:t})}function Zg(e,t){if(!e.connected)return Promise.resolve({status:"closed"});let o=CT();return new Promise(r=>{let n=setTimeout(()=>Qg(o,{status:"timeout"}),t.timeoutMs??ST);gc.set(o,a=>{clearTimeout(n),r(a)}),e.send("storefront-editor:open-form",{requestId:o,mode:t.mode,...t.formId?{formId:t.formId}:{}})})}function Qg(e,t){let o=gc.get(e);o&&(gc.delete(e),o(t))}function Ic(e,t){Qg(e,t?{status:"saved",form:t}:{status:"closed"})}function eI(e){switch(e?.type){case"storefront-editor:category-updated":return Yg(),!0;case"storefront-editor:menus-updated":return Xg(),!0;case"storefront-editor:form-saved":{let o=e;return xc(),o.requestId&&Ic(o.requestId,o.form??null),!0}case"storefront-editor:form-closed":{let o=e;return xc(),o.requestId&&Ic(o.requestId,null),!0}case"storefront-editor:media-picked":{let o=e;return o.requestId&&zs(o.requestId,o.media??null),!0}case"storefront-editor:media-pick-cancelled":{let o=e;return o.requestId&&zs(o.requestId,null),!0}default:return!1}}var PT={unauthorized:"the editor's sign-in was refused (unauthorized).","changed-elsewhere":"the page changed while it was being opened (changed-elsewhere).","lock-taken":"somebody else holds this page (lock-taken).","not-found":"this page no longer exists (not-found).",invalid:"the backend refused the request (invalid).",unavailable:"the backend could not be reached (unavailable)."};function hc(e){return ma(e)?e.cause instanceof at?hc(e.cause):`${PT[e.kind]} ${e.message}`.trim():e instanceof at?e.status===lr?`${Qd} (no response)`:e.status===401||e.status===403?`the editor's sign-in was refused (${e.status}). Reload the console and open the editor again; if it keeps happening the bridged token is not valid for this site.`:e.status===404?"this page no longer exists (404).":e.status>=500?`the server failed (${e.status}). ${e.message}`:`the server refused the request (${e.status}). ${e.message}`:e instanceof Error?`${e.name}: ${e.message}`:String(e)}import{canWriteDocument as Ko,holderOf as TT,newEaselClientId as RT,reloadIfVersionMoved as FT}from"efficient-easel/edit-lock";import{useAutosave as ET}from"efficient-easel/autosave";import{createEditLock as kT}from"efficient-easel/edit-lock";var hl=kT({readFailure:qs,conflictCode:an});import{jsx as AT}from"react/jsx-runtime";var LT={content:[],root:{},zones:{}};function _T(e,t){if(e.kind!==t.kind)return!1;if(e.kind==="template"){let r=t;return e.id===r.id&&(e.pageSlug??dt)===(r.pageSlug??dt)}let o=t;return e.slug===o.slug&&e.siteId===o.siteId}var Po=wT(null);function tI(){let e=vT(Po);if(!e)throw new Error("useStorefrontDocument must be used within StorefrontDocumentProvider");return e}function HW({target:e,children:t}){let[o,r]=Ct(e),n=fo(),a=ba(),l=bc(()=>ln(a),[a]),s=o.kind==="template",i=o.kind==="template"?o.id:null,c=o.kind==="template"?o.pageSlug??dt:o.slug,f=o.kind==="page"?o.siteId??null:null,u=bc(()=>cn(a),[a]),d=bc(()=>o.kind==="template"?pp(o.id,l,u):up(o.siteId,l,u),[l,u,o.kind,o.kind==="template"?o.id:o.siteId]),p=d.capabilities,x=o.kind==="page"?o.originSlug??null:null;ut(()=>{Vd(a,f)},[a,f]);let g=ot(o);ut(()=>{g.current=o},[o]);let{token:I,tokenRef:h,capabilities:C}=qg({onMessage:k=>{if(eI(k))return;if(k?.type==="storefront-editor:navigate"){let ye=k;ye?.target&&Ad(ye.target)}}}),S=a.usesBridgedToken?I!==null:!0,P=d.lock,T=!!l.lock,[b,w]=Ct(null),[O,D]=Ct(null),[R,L]=Ct(null),[G,Y]=Ct(null),M=ot(null),[v,j]=Ct(!1),F=ot(null),[E,se]=Ct(null),N=ot(null),[le,ge]=Ct(null),ie=ot(null);ut(()=>{ie.current=le},[le]);let[te,he]=Ct(p.hasEditLock?{kind:"checking"}:{kind:"editing"}),de=ot(te);ut(()=>{de.current=te},[te]);let z=ot(()=>Promise.resolve(!1)),Ae=we(k=>{M.current=k,j(!0)},[]),Fe=ET({save:async({id:k,data:_})=>{if(!Ko(de.current)){Ae({id:k,data:_});return}if(!await z.current(k,_)){if(!Ko(de.current)){Ae({id:k,data:_});return}throw new Error("page save did not land")}},onFailure:(k,_)=>{_===0&&n.send("storefront-editor:save-failed")}}),{state:Oe,push:ne,flush:K,pause:H,resume:He,stop:Ze,reset:It,retryNow:oo,hasPending:Ne}=Fe,Ve=ot(Oe);ut(()=>{Ve.current=Oe},[Oe]);let ht=ep(Oe),rt=we(()=>{let k=M.current;k&&(M.current=null,j(!1),ne(k))},[ne]),zt=ot("");zt.current||(zt.current=RT());let[tr,Jr]=Ct(0),Ee=ot(!1),A=e.kind==="page"&&e.slug===lt,[W,B]=Ct(e.kind==="template"||A),ce=ot(!1);ut(()=>{if(ce.current)return;ce.current=!0;let k=n.address.search();if(e.kind==="page"&&e.slug===lt){let _=Ms(),ye=_&&_!==lt?_:dt;n.address.load({kind:"page",slug:ye,siteId:e.siteId});return}if(e.kind==="template"){if(new URLSearchParams(k).get("editTemplate")==="1"){B(!1);return}n.address.load({kind:"page",slug:dt})}},[e,n]);let Ie=n.send;ut(()=>{if(!S)return;let k=!1,_=d.resolve(c),Se=p.hasCatalog&&!s&&c===lc?No().catch(()=>[]):Promise.resolve([]);return Promise.all([_,Se]).then(async([me,qe])=>{if(k)return;if(!me){if(!s&&c!==dt){n.address.load({kind:"page",slug:dt,siteId:f??void 0});return}Y(s?"Couldn\u2019t open a page in this template.":`No storefront page with slug "${c}".`);return}w(me.id),D(me.kind??null),N.current=me.version??null;let Qe=me.layout,SS=Qe&&Object.keys(Qe).length?Qe:LT,CS=fp(SS),Od=Bg(s||!p.hasCatalog?"":c,CS,qe),cs=qe.length?Dg(Od,qe,{onlyEmpty:!0}):Od;if(p.hasCatalog&&gl(cs)){let Nd=await ya().catch(()=>[]);if(k)return;if(Nd.length){L(Gg(cs,nl(Nd)));return}}L(cs)}).catch(me=>{k||(console.error("[storefront-editor] document load failed",me),Y(me instanceof ou?`\u201C${c}\u201D exists on more than one website. Open it from the site you want to edit.`:`Could not load the document \u2014 ${hc(me)}`))}),()=>{k=!0}},[S,I,s,d,c]);let ro=we(k=>new Promise(_=>{let ye=Date.now(),Se=setInterval(()=>{let me=h.current;me&&me!==k?(clearInterval(Se),_(me)):Date.now()-ye>6e3&&(clearInterval(Se),_(null))},200)}),[]),nt=we(async k=>{let _=h.current;if(!_&&a.usesBridgedToken)return{ok:!1,error:new Error("no editor token")};try{return{ok:!0,value:await k(_??"")}}catch(ye){if(mp(ye)){Ie("storefront-editor:auth-expired");let Se=_?await ro(_):null;if(Se)try{return{ok:!0,value:await k(Se)}}catch(me){return{ok:!1,error:me}}}return{ok:!1,error:ye}}},[Ie,ro,a]),Zr=we(async k=>{let _=h.current?await nt(k):{ok:!1,error:new Error("no editor token")};return _.ok||Ie("storefront-editor:save-failed"),_.ok},[Ie,nt]),Yn=we(async(k,_,ye=!1)=>{if(!Ko(de.current)||ie.current)return!1;let Se=await nt(()=>d.saveLayout(k,_,N.current,zt.current));if(Se.ok)return N.current=Se.value.version??N.current,!0;let me=hl.readLockTaken(Se.error);if(me){let Qe={kind:"takenover",holder:me};return de.current=Qe,he(Qe),!1}let qe=hl.readSaveConflict(Se.error);if(qe){if(qe.savedByYou&&!ye&&d.rereadVersion){let Qe=await nt(()=>d.rereadVersion(k));if(Qe.ok&&Qe.value)return N.current=Qe.value,z.current(k,_,!0)}Ze(),ie.current=qe,ge(qe)}return!1},[d,nt,Ze]);ut(()=>{z.current=Yn},[Yn]);let uS=we(k=>{if(Ie("storefront-editor:dirty"),!b)return;let _=gl(k)?ic(k):k;if(F.current=_,!Ko(de.current)){Ae({id:b,data:_});return}ne({id:b,data:_})},[b,Ie,Ae,ne]),or=we(async()=>(Ko(de.current)&&rt(),await K()&&M.current==null),[rt,K]),Ld=ot(or);ut(()=>{Ld.current=or},[or]);let ss=ot(nt);ut(()=>{ss.current=nt},[nt]);let is=we(()=>{n.address.reload()},[n]),_d=ot(()=>Promise.resolve(!1));ut(()=>{_d.current=()=>{let k=d.rereadVersion;return!b||!k?Promise.resolve(!1):FT({ours:N.current,stored:async()=>{let _=await ss.current(()=>k(b));return _.ok?_.value:null},hasPending:()=>M.current!=null||Ne(),reload:is})}},[d,b,Ne,is]),ut(()=>{if(!P||!b||!S)return;let k=!1,_=null,ye=zt.current,Se=hl.makeClaimBeat({claim:async qe=>{let Qe=await ss.current(()=>P.claim(b,ye,qe));if(Qe.ok)return{heartbeat_seconds:Qe.value.heartbeatSeconds};throw Qe.error},cancelled:()=>k,currentAccess:()=>de.current,heldWrite:()=>({pending:M.current!=null||Ne(),autoSaveEnabled:!Ve.current.paused,saveConflict:ie.current!=null}),setAccess:qe=>{de.current=qe,he(qe)},releaseHeldWrite:()=>{Ld.current()},startHeartbeat:qe=>{_=setInterval(()=>{Se(!1)},qe)},stopHeartbeat:()=>{_&&(clearInterval(_),_=null)},reloadIfMoved:()=>{_d.current()}}),me=Ee.current;return Ee.current=!1,me||he({kind:"checking"}),Se(me),()=>{k=!0,_&&clearInterval(_),P.release(b,ye).catch(()=>{})}},[b,P,S,I,tr]);let pS=we(()=>{!P||!b||(Ee.current=!0,Jr(k=>k+1))},[b,P]),mS=we(()=>{he(k=>{let _=k.kind==="blocked"||k.kind==="takenover"?k.holder:null;return _?{kind:"readonly",holder:_}:k})},[]),xS=we(()=>{Ve.current.paused?(Ko(de.current)&&rt(),He()):H()},[rt,H,He]),gS=we(()=>{oo()},[oo]),Fo=we(k=>{if(F.current=null,tp(k.kind!=="template"&&T,{resetAutosave:()=>{It(),M.current=null,j(!1)},setVersion:_=>{N.current=_},setSaveConflict:ge,setAccess:he}),k.kind==="page"){let _=Ms();k.slug!==lt&&k.slug!==_&&Hs()}else Hs();r(k),w(null),D(null),L(null),Y(null),n.address.show(k),k.kind==="page"&&k.slug!==lt&&n.send("storefront-editor:navigated",{target:k})},[It,n,T]),Ad=we(k=>{if(_T(k,g.current))return;let _=M.current!=null;if(!_&&!Ne()){Fo(k);return}let ye=Ve.current;if(_||ye.paused||ye.failed||ye.stopped){se(k);return}K().then(Se=>{Se?Fo(k):se(k)})},[Fo,Ne,K]),IS=we(()=>se(null),[]),hS=we(()=>{se(k=>(k&&Fo(k),null))},[Fo]),bS=we(async()=>{let k=E;if(!k)return;await or()&&(se(null),Fo(k))},[E,or,Fo]),yS=we(async k=>{if(!b||!Ko(de.current)||ie.current)return;let _=gl(k)?ic(k):k;if(!await Yn(b,_)){ie.current||Ie("storefront-editor:save-failed");return}let Se=d.publish;if(!p.canPublish||!Se){Ie("storefront-editor:saved");return}let me=await nt(()=>Se(b,N.current??void 0));if(!me.ok){Ie("storefront-editor:save-failed");return}N.current=me.value.version??N.current,Ie("storefront-editor:published")},[b,d,p.canPublish,Ie,Yn,nt]);return AT(Po.Provider,{value:{target:o,adapter:d,capabilities:p,templateId:i,currentSlug:c,currentKind:O,siteId:f,ready:S,token:I,tokenRef:h,notifyParent:Ie,bridgeCapabilities:C,runAuthed:Zr,docId:b,data:R,getLiveData:()=>F.current??R,footerOriginSlug:x,error:G,redirecting:W,saveStatus:ht,saveState:Oe,autoSaveEnabled:!Oe.paused,autoSaveStoppedByConflict:Oe.stopped,hasUnsavedEdits:Oe.pending||v,toggleAutoSave:xS,retrySave:gS,onChange:uS,flushSave:or,onPublish:yS,access:te,readOnly:TT(te)!==null,takeOverEditing:pS,viewReadOnly:mS,saveConflict:le,reloadFromServer:is,navigate:Ad,pendingNav:E,cancelPendingNav:IS,discardAndNavigate:hS,saveAndNavigate:bS},children:t})}import{createContext as OT,useContext as NT}from"react";var BT=OT("desktop"),yc=()=>NT(BT);var Tr="content",_e="Flex",DT="Text & media",MT="Layout & structure",HT=[{type:"Eyebrow",label:"Eyebrow"},{type:"Heading",label:"Heading"},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"ButtonBlock",label:"Button"},{type:"Form",label:"Form"},{type:"PostCard",label:"Post Card"},{type:"Stats",label:"Stats"},{type:"MenuBlock",label:"Menu"},{type:"EmailFormBlock",label:"Email Form"},{type:"SocialLogosBlock",label:"Social Logos"},{type:"LegalLineBlock",label:"Legal Line"},{type:"SearchBlock",label:"Search"},{type:"CartBlock",label:"Cart"},{type:"CountrySwitchBlock",label:"Country Switch"}].map(e=>({...e,group:DT})),GT=(fr.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:MT})),oI=[...HT,...GT],Sc=[{type:"Eyebrow",label:"Eyebrow"},{type:"Heading",label:"Heading"},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"ButtonBlock",label:"Button"},{type:"HeroGroup",label:xo}],$W=Sc.map(e=>e.type),WT=1,UT=Sc.filter(e=>e.type!=="HeroGroup");function zT(e){return e<WT?Sc:UT}var KT={Flex:{slot:Tr,choices:()=>oI},Grid:{slot:Tr,choices:()=>oI},HeroGroup:{slot:Tr,choices:zT}};function rI(e,t=0){let o=KT[e];return o?{slot:o.slot,choices:o.choices(t)}:null}var bl="SiteHeader",Cc="SiteFooter",nI="sections",qW=[bl,Cc],YW=e=>e===bl||e===Cc,XW=e=>`${e}:${nI}`;function jW(e,t,o=[]){return{type:e,props:{id:t,[nI]:o}}}var $T=new Set(["Footer",bl,Cc]);function JW(e){let t=new Set,o=!1,r=e.filter(n=>{let a=n?.type??"";return a==="Header"?(o=!0,!1):$T.has(a)?t.has(a)?(o=!0,!1):(t.add(a),!0):!0});return o?r:e}function ZW(e,t){return e.some(o=>o?.type===t.type)?e:t.type===bl?[t,...e]:[...e,t]}import{createContext as VT,useCallback as qT,useContext as YT,useState as XT}from"react";import{jsx as jT}from"react/jsx-runtime";var aI={enabled:!0,title:"",subtitle:"",greeting:""},lI=VT({chat:aI,setChat:()=>{},selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function oU({children:e,chat:t=aI,onChatChange:o}){let[r,n]=XT(!1),a=qT(i=>o?.(i),[o]),{select:l,setSelectHandler:s}=Fu();return jT(lI.Provider,{value:{chat:t,setChat:a,selected:r,setSelected:n,select:l,setSelectHandler:s},children:e})}var rU=()=>YT(lI);import{BlockBannerIcon as JT,BlockBoxIcon as ZT,BlockButtonIcon as QT,BlockDividerIcon as sI,BlockFooterIcon as iI,BlockHeadingIcon as eR,BlockProductIcon as tR,BlockSocialIcon as oR,BlockTextIcon as rR,ChatIcon as nR,GridIcon as aR,ImageIcon as lR,PageIcon as sR}from"efficient-easel/icons";import{Fragment as $,jsx as y,jsxs as q}from"react/jsx-runtime";var iR={header:q($,{children:[y("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),y("path",{d:"M3 9.5h18"})]}),website:q($,{children:[y("circle",{cx:"12",cy:"12",r:"9"}),y("path",{d:"M3 12h18M12 3c2.6 2.7 2.6 15.3 0 18M12 3c-2.6 2.7-2.6 15.3 0 18"})]}),social:q($,{children:[y("circle",{cx:"6",cy:"12",r:"2.5"}),y("circle",{cx:"18",cy:"6",r:"2.5"}),y("circle",{cx:"18",cy:"18",r:"2.5"}),y("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:q($,{children:[y("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),y("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:q($,{children:[y("path",{d:"M4 15.5h6M4 18h4"}),y("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:y("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:q($,{children:[y("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),y("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:y("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:q($,{children:[y("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),y("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:q($,{children:[y("circle",{cx:"11",cy:"11",r:"6"}),y("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:vu,CountrySwitchBlock:q($,{children:[y("circle",{cx:"12",cy:"12",r:"8.5"}),y("path",{d:"M3.5 12h17M12 3.5c2.6 2.4 3.6 5.2 3.6 8.5s-1 6.1-3.6 8.5M12 3.5c-2.6 2.4-3.6 5.2-3.6 8.5s1 6.1 3.6 8.5"})]}),LegalLineBlock:q($,{children:[y("path",{d:"M3 9h18"}),y("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:q($,{children:[y("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),y("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),y("path",{d:"M7 17h7"})]}),Collections:q($,{children:[y("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),y("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),y("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:q($,{children:[y("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),y("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:q($,{children:[y("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),y("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),y("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),y("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),y("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:q($,{children:[y("path",{d:"M3 7h9M15.5 7H21"}),y("circle",{cx:"13.5",cy:"7",r:"1.7"}),y("path",{d:"M3 12h4M10.5 12H21"}),y("circle",{cx:"8.5",cy:"12",r:"1.7"}),y("path",{d:"M3 17h9M15.5 17H21"}),y("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:q($,{children:[y("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),y("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:q($,{children:[y("path",{d:"M3 5h10"}),y("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),y("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),y("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:q($,{children:[y("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),y("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),y("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:q($,{children:[y("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),y("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),y("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),y("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:q($,{children:[y("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),y("circle",{cx:"9",cy:"10",r:"1.6"}),y("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:q($,{children:[y("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),y("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:q($,{children:[y("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),y("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),y("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:q($,{children:[y("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),y("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:q($,{children:[y("path",{d:"M3.5 20h17"}),y("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:q($,{children:[y("circle",{cx:"6",cy:"12",r:"2.6"}),y("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),y("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:q($,{children:[y("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),y("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:q($,{children:[y("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),y("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:q($,{children:[y("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),y("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:q($,{children:[y("path",{d:"M4 8.5h4.5M11 8.5h9"}),y("path",{d:"M4 14.5h16"})]}),HeroGroup:q($,{children:[y("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),y("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:q($,{children:[y("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),y("path",{d:"M6.5 9h11M6.5 12.5h11"}),y("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:y($,{children:y("path",{d:"M12 3.5l7.5 3.2v5.1c0 4.2-3.2 7.1-7.5 8.7-4.3-1.6-7.5-4.5-7.5-8.7V6.7z"})}),Spacer:q($,{children:[y("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),y("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:q($,{children:[y("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),y("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),y("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),y("path",{d:"M4 13.5h11M4 17.5h7"}),y("path",{d:"M17 15l3 2-3 2"})]}),CustomHTML:y("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},cR=y("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),fR={footer:iI,Footer:iI,Divider:sI,FooterDivider:sI,Banner:JT,Flex:ZT,FooterSocial:oR,page:sR,chat:nR,Heading:eR,Text:rR,ImageBlock:lR,ButtonBlock:QT,Grid:aR,ProductRef:tR},dR={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",SiteHeader:"header",SiteFooter:"footer"};function uR({type:e,size:t=16,className:o}){let r=dR[e]??e,n=fR[r];return n?y(n,{size:t,className:o}):y("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:o,"aria-hidden":"true",children:iR[r]??cR})}function dU(){return{type:ps,props:{id:Lo(ps)}}}function uU(e){let t=[];for(let o of e){let r=t[t.length-1];r&&r.group===o.group?r.items.push(o):t.push({group:o.group,items:[o]})}return t}var cI=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterGroup",label:"Footer Box"},{type:"FooterDivider",label:"Divider"}],pR=cI.filter(e=>e.type!=="FooterLogo"&&e.type!=="FooterGroup"),mR="FooterGroup",fI="blocks";function dI(e){return e===jn?cI:e===mR?pR:null}function pU(){let e=(t,o)=>({type:t,props:{id:`${t}-${crypto.randomUUID()}`,...o}});return[e("FooterLogo",{widthPct:100,align:"left",tagline:""}),e("FooterGroup",{direction:"vertical",align:"start",blocks:[e("FooterText",{text:"Join our email list",size:"md",tone:"default"}),e("FooterEmailSignup",{heading:"",placeholder:"Email address",buttonLabel:"Subscribe"})]})]}import{createContext as xR,useContext as gR}from"react";import{jsx as IR}from"react/jsx-runtime";var uI=xR(null);function gU({value:e,children:t}){return IR(uI.Provider,{value:e,children:t})}function IU(){return gR(uI)}function Ue(e,t,o,r={}){return{type:e,props:{...t(e),id:o(e),...r}}}var hR={Manifesto:(e,t)=>({type:_e,props:{...e(_e),id:t(_e),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[Ue(_e,e,t,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[Ue("Eyebrow",e,t,{eyebrowLook:"plain"}),Ue("Heading",e,t),Ue("Text",e,t),Ue("Stats",e,t)]}),Ue(_e,e,t,{direction:"column",name:"Picture",content:[]})]}}),Split:(e,t)=>({type:_e,props:{...e(_e),id:t(_e),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[Ue(_e,e,t,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[Ue("Eyebrow",e,t,{eyebrowLook:"plain"}),Ue("Heading",e,t),Ue("Text",e,t),Ue("ButtonBlock",e,t)]}),Ue(_e,e,t,{direction:"column",name:"Image",content:[Ue("ImageBlock",e,t)]})]}}),Subscribe:(e,t)=>({type:_e,props:{...e(_e),id:t(_e),direction:"column",name:"Subscribe",content:[Ue("Heading",e,t),Ue("Text",e,t),Ue("Form",e,t)]}})};function pI(e){return hR[e]??null}var Pc="plain",mI=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],bR="line",yR={KeyFeatures:"filled"};function SR(e){return yR[e]??Pc}function PU(e,t){return Xe(mI,SR(t),e)}function kU(e){return Xe(mI,bR,e)}import{createContext as kR,useContext as wR}from"react";var kc={tag:{label:"Tag",follows:"Labels",builtIn:"13px",writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:"48px",writable:!0},body:{label:"Body",follows:"Body",builtIn:"14px",writable:!0},price:{label:"Price",follows:"Labels",builtIn:"15px",writable:!0},link:{label:"Link",follows:"Labels",builtIn:"14px",writable:!0}},xI=kc;var Rr="data-sf-spec-region";function gI(e,t,o){if(!e)return;let r=o[e];if(r)return{fontFamily:`var(--font-role-${e})`,fontSize:`var(--size-${r}, ${t.builtIn})`}}function wc(e){return`@${e}`}function CR(e,t){if(!t.startsWith("@"))return null;let o=t.slice(1);return o in e?o:null}function II(e,t){return t&&t in e?t:null}function PR(e,t){let o=t?.closest(`[${Rr}]`)?.getAttribute(Rr);return II(e,o??null)}import{jsx as ko,jsxs as vc}from"react/jsx-runtime";function vR(e){return Jd(e)??void 0}var TR=kR({}),hI=3;function RR({tag:e,name:t,desc:o,href:r,imageSrc:n,imageLabel:a,price:l}){let{showPrice:s,cardStyle:i,partStyles:c,editing:f}=wR(TR),u=i==="bordered"?" border border-line":i==="shadow"?" shadow-[0_8px_30px_rgba(0,0,0,0.12)]":"",d=vR(n),p=g=>f?{[Rr]:g}:{},x=g=>gI(c?.[wc(g)]?.role,kc[g],ar);return vc(Pe,{href:r||"#",className:`sf-card group relative block w-full min-w-0 overflow-hidden bg-surface-2${u}`,children:[ko("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:ko(Wo,{label:a||"collection.jpg",src:d})}),ko("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"}}),vc("div",{className:"absolute inset-x-8 bottom-8 z-[2] flex flex-col gap-2.5 text-overlay-fg max-[800px]:relative max-[800px]:inset-auto max-[800px]:p-6 max-[800px]:gap-3 max-[800px]:text-fg",children:[e&&ko("span",{...p("tag"),style:x("tag"),className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.25em] opacity-70",children:re(e)}),t&&ko("h3",{...p("name"),style:x("name"),className:"font-heading2 text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))] font-medium leading-none tracking-[-0.03em] max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",children:typeof t=="string"?Ot(t,!1):t}),o&&el(o).map((g,I)=>ko("p",{...p("body"),style:x("body"),className:"max-w-[420px] text-[length:var(--size-body,14px)] leading-[1.5] opacity-80",children:re(g)},I)),s&&l&&ko("span",{...p("price"),style:x("price"),className:"font-mono text-[length:var(--size-label,15px)] tracking-[0.05em] text-accent",children:re(l)}),vc("span",{...p("link"),style:x("link"),className:"mt-2 inline-flex items-center gap-2.5 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em]",children:["Explore",ko("span",{className:"transition-transform group-hover:translate-x-[3px]","aria-hidden":!0,children:"\u2192"})]})]})]})}import{createContext as ER,useCallback as LR,useContext as _R,useEffect as SI,useRef as AR,useState as Rc}from"react";import{useState as FR}from"react";function bI(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 yI(e){return e==="below"}import{jsx as Pt,jsxs as Fr}from"react/jsx-runtime";function Tc({build:e,hiddenMobile:t,alwaysShowOverlay:o,forceHover:r,index:n,total:a,ratio:l,captionPlace:s}){let[i,c]=FR(!1),f=yI(s),u=Fr("div",{className:["sf-card group relative overflow-hidden bg-surface-2",bI(l),t?"max-[800px]:hidden":""].join(" "),children:[Fr("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)]",r?"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:[Pt(Wo,{label:e.imageLabel,src:e.imageSrc}),Pt("div",{className:"absolute inset-0",style:{background:"rgba(0,0,0,0.35)"}})]}),Pt("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)]",r?"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(--surface)"},children:e.detailSrc&&Pt(io,{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:i?"none":"block"},onError:()=>c(!0)})}),n!=null&&a!=null&&Fr("span",{className:"pointer-events-none absolute top-3 right-3 z-[3] font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.24em] max-[800px]:top-2.5 max-[800px]:right-2.5",style:{color:"rgba(245,241,232,0.7)"},children:[String(n).padStart(2,"0")," / ",String(a).padStart(2,"0")]}),e.process&&Pt("span",{className:["pointer-events-none absolute top-3 left-3 z-[3] inline-block max-w-[60%] truncate font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.24em] text-accent max-[800px]:top-2.5 max-[800px]:left-2.5","transition-opacity duration-300 ease-out",o||r?"opacity-100":"opacity-0 group-hover:opacity-100 max-[800px]:opacity-100"].join(" "),children:et(e.process)}),Fr("div",{className:["absolute inset-0 z-[2] flex flex-col justify-end gap-1 p-6","transition-[opacity,transform] duration-300 ease-out",o||r?"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","max-[800px]:p-3.5"].join(" "),style:{color:"var(--overlay-fg)",background:"linear-gradient(180deg, transparent 40%, rgba(10,10,10,.85) 100%)"},children:[e.car&&Pt("div",{className:"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]",children:e.car}),e.wheel&&Pt("div",{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)]",children:e.wheel}),e.finish&&Pt("div",{className:"mt-1.5 flex gap-3.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.12em]",style:{color:"rgba(245,241,232,0.7)"},children:Pt("span",{children:et(e.finish)})})]})]});return f?Fr("div",{className:t?"max-[800px]:hidden":"",children:[u,Fr("div",{className:"bg-surface px-3.5 pt-3 pb-3.5",children:[e.wheel&&Pt("div",{className:"font-display text-[length:var(--size-body,15px)] font-medium leading-[1.25] tracking-[-0.01em] text-fg",children:e.wheel}),(e.finish||e.car)&&Pt("div",{className:"mt-0.5 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.14em] text-fg-dim",children:et(e.finish||e.car)})]})]}):u}import{Fragment as Er,jsx as pe,jsxs as ze}from"react/jsx-runtime";var OR=ER({}),NR="data-gallery-grid",Fc="data-gallery-tile";function BR(e,t){let[o,r]=Rc(null);return SI(()=>{let n=e.current,a=n?.closest(`[${NR}]`);if(!n||!a)return;let l=()=>{let i=Array.from(a.querySelectorAll(`[${Fc}]`)),c=i.indexOf(n),f=c>=0?{index:c+1,total:i.length}:null;r(u=>u?.index===f?.index&&u?.total===f?.total?u:f)};if(l(),!t)return;let s=new MutationObserver(l);return s.observe(a,{childList:!0,subtree:!0}),()=>s.disconnect()},[e,t]),o}var CI=[{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"},{image:"",href:"#",process:"Category",eyebrow:"Subtitle",name:"Item name",meta:"Detail"}];function DR(e,t){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||t}function MR(e){let t=(e.photos??[]).map(a=>a?.src).filter(a=>!!a),o=e.image||t[0]||"",r=[o,...t].filter(a=>!!a),n=DR(e.name,"gallery-item");return{car:e.eyebrow??"",wheel:e.name??"",process:e.process??"",finish:e.meta??"",imageLabel:`${n}.jpg`,detailLabel:`${n}-detail.jpg`,imageSrc:o||void 0,detailSrc:t[0]||o||void 0,photos:r,href:e.href}}function HR({editing:e=!1,previewHover:t,ratio:o,captionPlace:r,...n}){let{galleryHref:a="/gallery",submitHref:l="/contact",previewHover:s}=_R(OR),i=MR(n),c=i.photos??(i.imageSrc?[i.imageSrc]:[]),f=AR(null),u=LR(S=>{f.current=S},[]),d=BR(f,e),p=e&&(!!t||!!s),[x,g]=Rc(!1),[I,h]=Rc(0);SI(()=>{if(!x)return;let S=T=>{T.key==="Escape"?g(!1):T.key==="ArrowLeft"&&c.length>1?h(b=>(b-1+c.length)%c.length):T.key==="ArrowRight"&&c.length>1&&h(b=>(b+1)%c.length)};window.addEventListener("keydown",S);let P=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",S),document.body.style.overflow=P}},[x,c.length]);let C=pe(Tc,{build:i,forceHover:p,index:d?.index,total:d?.total,ratio:o,captionPlace:r});return ze(Er,{children:[e?pe("div",{ref:u,[Fc]:"",className:"block w-full text-left",children:C}):pe("button",{ref:u,[Fc]:"",type:"button","aria-label":`Open ${i.car||"build"} on ${i.wheel||"wheel"}`,onClick:()=>{h(0),g(!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:C}),x&&(()=>{let S=c[I]??i.imageSrc??"",P=()=>h(b=>(b-1+c.length)%c.length),T=()=>h(b=>(b+1)%c.length);return pe("div",{role:"dialog","aria-modal":"true","aria-label":`${i.car} on ${i.wheel}`,onClick:()=>g(!1),className:"fixed inset-0 z-[100] 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:ze("div",{onClick:b=>b.stopPropagation(),className:"relative grid w-[min(1800px,100%)] max-h-[calc(100vh-48px)] 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 rgba(0,0,0,0.7)"},children:[pe("button",{type:"button",onClick:()=>g(!1),"aria-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"}),ze("div",{className:"relative flex min-h-[690px] items-center justify-center overflow-hidden bg-surface-2 max-[1100px]:min-h-[450px]",children:[S&&pe("img",{src:S,alt:`${i.car} \u2014 ${I+1} of ${c.length}`,className:"block h-full max-h-[88vh] w-full object-cover"},S),c.length>1&&ze(Er,{children:[pe("button",{type:"button","aria-label":"Previous photo",onClick:P,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"}),pe("button",{type:"button","aria-label":"Next photo",onClick:T,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"}),ze("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:[I+1," / ",c.length]})]})]}),ze("div",{className:"flex flex-col gap-[30px] px-[60px] py-[72px] max-[1100px]:px-9 max-[1100px]:py-[54px]",children:[i.process&&pe("span",{className:"font-mono text-[length:var(--size-label,15px)] uppercase tracking-[0.3em] text-accent",children:re(i.process)}),i.wheel&&pe("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:Ot(i.wheel,!1)}),i.car&&ze("div",{className:"font-heading3 text-[length:var(--size-headingSmall,27px)] leading-[1.4] text-fg",children:["on ",pe("em",{className:"font-serif font-normal italic text-accent tracking-[-0.01em]",children:re(i.car,!0)})]}),ze("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:[i.wheel&&ze(Er,{children:[pe("dt",{className:"text-fg-dim",children:"Wheel"}),pe("dd",{className:"text-fg",children:re(i.wheel)})]}),i.process&&ze(Er,{children:[pe("dt",{className:"text-fg-dim",children:"Process"}),pe("dd",{className:"text-fg",children:re(i.process)})]}),i.finish&&ze(Er,{children:[pe("dt",{className:"text-fg-dim",children:"Finish"}),pe("dd",{className:"text-fg",children:re(i.finish)})]}),i.car&&ze(Er,{children:[pe("dt",{className:"text-fg-dim",children:"Vehicle"}),pe("dd",{className:"text-fg",children:re(i.car)})]})]}),ze("div",{className:"mt-auto flex flex-col gap-3.5 pt-6",children:[ze(Pe,{href:i.href||"/wheels",onClick:()=>g(!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:[pe("span",{children:"View product"}),pe("span",{className:"transition-transform group-hover:translate-x-[6px]",children:"\u2192"})]}),ze(Pe,{href:a,onClick:()=>g(!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:[pe("span",{children:"See more builds"}),pe("span",{children:"\u2192"})]}),ze(Pe,{href:l,onClick:()=>g(!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:[pe("span",{children:"Submit your build"}),pe("span",{children:"\u2192"})]})]})]})]})})})()]})}import{createContext as aF,useContext as lF}from"react";import{useEffect as Lc,useRef as qR,useState as yl}from"react";import{useEffect as GR,useRef as PI,useState as WR}from"react";import{Fragment as $R,jsx as kI,jsxs as VR}from"react/jsx-runtime";var UR="#t=0.001",zR=2;function KR(e,t){if(e.readyState<zR||!e.videoWidth||!e.videoHeight)return!1;let o=t.getContext("2d");return o?(t.width=e.videoWidth,t.height=e.videoHeight,o.drawImage(e,0,0,t.width,t.height),!0):!1}function Ec({src:e,objectPosition:t="50% 50%",onError:o}){let r=PI(null),n=PI(null),[a,l]=WR(!1);return GR(()=>{let s=r.current,i=n.current;if(a||!s||!i)return;let c=()=>{KR(s,i)&&l(!0)};return c(),s.addEventListener("loadeddata",c),s.addEventListener("seeked",c),()=>{s.removeEventListener("loadeddata",c),s.removeEventListener("seeked",c)}},[a]),VR($R,{children:[kI("canvas",{ref:n,"aria-hidden":!0,className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:t,visibility:a?"visible":"hidden"}}),!a&&kI("video",{ref:r,src:`${e}${UR}`,muted:!0,playsInline:!0,preload:"auto",className:"hidden",onError:o})]})}import{jsx as Lr,jsxs as wI}from"react/jsx-runtime";var YR=.5;function _c({videoSrc:e,posterSrc:t,showVideo:o=!0,playbackRate:r=YR,objectPosition:n="50% 50%",quiet:a=!1}){let l=t||"",s=e||"",[i,c]=yl(!1),[f,u]=yl(!1),[d,p]=yl(!1),[x,g]=yl(!1),I=qR(null);Lc(()=>{c(!1),u(!1),p(!1)},[e,t]),Lc(()=>{if(typeof window>"u")return;let C=()=>{let S=window;S.requestIdleCallback?S.requestIdleCallback(()=>g(!0),{timeout:2e3}):setTimeout(()=>g(!0),800)};if(document.readyState==="complete"){C();return}return window.addEventListener("load",C,{once:!0}),()=>window.removeEventListener("load",C)},[]),Lc(()=>{let C=I.current;if(!C)return;let S=()=>{C.playbackRate=r};return S(),C.addEventListener("loadedmetadata",S),()=>C.removeEventListener("loadedmetadata",S)},[e,r]);let h=Zn(l);return wI("div",{className:"absolute inset-0 z-[1]",children:[Lr("div",{className:"absolute inset-0",style:{background:"var(--surface)"}}),l&&(h?Lr("img",{src:l,alt:"",className:"absolute inset-0 z-[2] h-full w-full object-cover",style:{display:i?"none":"block",objectPosition:n},onError:()=>c(!0)},l):Lr(sl,{src:l,alt:"",fill:!0,priority:!0,sizes:"100vw",className:"z-[2] object-cover",style:{display:i?"none":"block",objectPosition:n},onError:()=>c(!0)},l)),o&&!a&&s&&x&&!f&&wI("video",{ref:I,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:n},onError:()=>u(!0),children:[Zd(s)&&Lr("source",{src:s.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),Lr("source",{src:s,type:"video/mp4"})]},s),o&&a&&s&&x&&!d&&(!l||i)&&Lr(Ec,{src:s,objectPosition:n,onError:()=>p(!0)},s)]})}var vI=["top","middle","bottom"],TI=["left","center","right"],RI="bottom",FI="left",XR={top:"Top",middle:"Middle",bottom:"Bottom"},jR={left:"Left",center:"Center",right:"Right"};var s6="Up and down",i6="Sideways",JR={top:"flex-start",middle:"center",bottom:"flex-end"},ZR={left:"flex-start",center:"center",right:"flex-end"},QR="--sf-hero-phone-y",eF="--sf-hero-phone-x";function tF(e){return vI.includes(e)?e:RI}function oF(e){return TI.includes(e)?e:FI}function EI(e,t){let o=tF(e),r=oF(t),n={};return o!==RI&&(n[QR]=JR[o]),r!==FI&&(n[eF]=ZR[r]),n}function c6(){return vI.map(e=>({label:XR[e],value:e}))}function f6(){return TI.map(e=>({label:jR[e],value:e}))}var rF="#0A0A0A",nF=[[0,".5"],[30,".1"],[60,".1"],[100,".85"]];function LI(e){let t=e.trim().replace(/^#/,""),o=t.length===3?t.split("").map(n=>n+n).join(""):t;if(!/^[0-9a-fA-F]{6}$/.test(o))return null;let r=Number.parseInt(o,16);return`${r>>16&255},${r>>8&255},${r&255}`}function _I(e){return e==null?!0:e!==!1}function AI(e){let t=(e?LI(e):null)??LI(rF);return`linear-gradient(180deg, ${nF.map(([r,n])=>`rgba(${t},${n}) ${r}%`).join(", ")})`}import{jsx as Fn,jsxs as iF}from"react/jsx-runtime";var Ac=aF({});function sF({name:e,process:t,mediaType:o="video",mediaSrc:r,videoSpeed:n,poster:a,objectPosition:l,tintColor:s="#000000",tintOpacity:i=0,groups:c,editing:f=!1,themeClassName:u,themeStyle:d}){let{alignment:p="left",textureOpacity:x,textureOn:g,textureColor:I,quietVideo:h,phoneUpDown:C,phoneSideways:S}=lF(Ac),P=o==="video",T=P?$t(r):void 0,b=P?$t(a):$t(r)??$t(a),w=typeof n=="number"?n/100:1;return iF("section",{className:u?`relative h-full w-full overflow-hidden ${u}`:"relative h-full w-full overflow-hidden",style:d,"data-slide-name":e??"","data-slide-process":t??"","data-slide-media":T?"video":"still",children:[Fn(_c,{videoSrc:T,posterSrc:b,showVideo:P,playbackRate:w,objectPosition:l,quiet:h}),i>0&&Fn("div",{className:"absolute inset-0 z-[2]",style:{background:s,opacity:Math.min(Math.max(i,0),100)/100}}),_I(g)&&Fn("div",{className:"absolute inset-0 z-[2]",style:{background:AI(I),...x!==void 0?{opacity:x/100}:null}}),Fn("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",f?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{color:"var(--overlay-fg)",...EI(C,S)},children:c&&Fn(c,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}var OI=Array.from({length:3},(e,t)=>({name:`Slide ${t+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));import{createContext as uF,useContext as pF,useEffect as Sl,useId as mF,useMemo as xF,useState as ve}from"react";var cF=14,fF=3;function Oc(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function dF(e,t){let o=new Date(`${e}T00:00:00`);return o.setDate(o.getDate()+t),Oc(o)}async function NI(e,t,o={}){let r=o.days??cF,n=o.read??Ao.getAvailability,a=0,l=0;for(let s=0;s<r;s++){if(o.signal?.aborted)return{outcome:"unreadable"};let i=dF(t,s);try{let c=await n(e,i);if(a=0,l++,c.slots.length>0)return{outcome:"found",date:i,availability:c}}catch{if(a++,a>=fF)return{outcome:"unreadable"}}}return l===r?{outcome:"noneInWindow",days:r}:{outcome:"unreadable"}}import{jsx as hF}from"react/jsx-runtime";var BI=uF(null);function _r(){let e=pF(BI);if(!e)throw new Error("useBookingForm must be used inside <BookingFormProvider>");return e}var Nc=[{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 gF(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 Bc={bookingNumber:"EXAMPLE-0000",service:"Example service",startAt:"2026-01-01T00:00:00.000Z",timezone:"UTC",customerTimezone:"",manageToken:"example"};function IF(e,t){return e&&t?.length===0}function v6({editing:e=!1,previewConfirmation:t=!1,children:o}){let r=mF(),n=xF(()=>Oc(new Date),[]),[a,l]=ve(),[s,i]=ve(""),[c,f]=ve(""),[u,d]=ve(n),[p,x]=ve(n),[g,I]=ve(!1),[h,C]=ve(null),[S,P]=ve(),[T,b]=ve(""),[w,O]=ve(""),[D,R]=ve(""),[L,G]=ve(""),[Y,M]=ve(""),[v,j]=ve(()=>Ss()),[F,E]=ve(null),[se,N]=ve(!1),[le,ge]=ve(!1),[ie,te]=ve(null),[he,de]=ve("");Sl(()=>{de(Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC")},[]),Sl(()=>{let K=!1;return Ao.listServices().then(H=>{K||(l(H.results),i(H.currency),f(He=>He||H.results[0]?.id||""))}).catch(()=>{K||l([])}),()=>{K=!0}},[]),Sl(()=>{if(g||!c)return;let K={aborted:!1};return b(""),P(void 0),te(null),C(null),N(!0),NI(c,n,{signal:K}).then(H=>{if(!K.aborted){if(H.outcome==="found"){d(H.date),x(H.date),P(H.availability);return}C(H.outcome==="noneInWindow"?`No times are available in the next ${H.days} days.`:"We couldn't load available times. Please try again.")}}).finally(()=>{K.aborted||N(!1)}),()=>{K.aborted=!0}},[g,c,n]),Sl(()=>{if(!g||!c||!u)return;let K=!1;return b(""),P(void 0),te(null),C(null),N(!0),Ao.getAvailability(c,u).then(H=>{K||(P(H),H.slots.length===0&&C("No times are available on this date."))}).catch(()=>{K||C("We couldn't load available times. Please try again.")}).finally(()=>{K||N(!1)}),()=>{K=!0}},[u,g,c]);let z=a?.find(K=>K.id===c),Ae=z?.depositAmountDue!=null,Fe=!!(!e&&!le&&z&&T&&w.trim()&&D.trim()&&!Ae);async function Oe(K){if(K.preventDefault(),!(!Fe||!z)){ge(!0),te(null);try{let H=await Ao.create({serviceId:z.id,start:T,customer:{name:w.trim(),email:D.trim(),phone:L.trim()},notes:Y.trim(),idempotencyKey:v,customerTimezone:he});E(H),j(Ss())}catch(H){te(H instanceof at&&H.status===409?"That time was just booked. Choose another available time.":"Your appointment wasn't submitted. Please check your details and try again."),H instanceof at&&H.status===409&&(b(""),Ao.getAvailability(z.id,u).then(P).catch(()=>{}))}finally{ge(!1)}}}let ne=IF(e,a);return hF(BI.Provider,{value:{fieldPrefix:r,editing:e,services:ne?Nc:a,currency:ne?"AUD":s,serviceId:ne?Nc[0].id:c,setServiceId:f,service:ne?Nc[0]:z,requiresPayment:ne?!1:Ae,date:u,earliestDate:p,setDate:d,setDateTouched:I,availability:ne?gF(u):S,loadingSlots:ne?!1:se,noSlotsMessage:h,selectedStart:ne?`${u}T09:00:00.000Z`:T,setSelectedStart:b,customerTimezone:he,name:w,setName:O,email:D,setEmail:R,phone:L,setPhone:G,notes:Y,setNotes:M,confirmation:F??(t?Bc:null),submitting:le,error:ie,canSubmit:ne?!1:Fe,handleSubmit:Oe,sample:!!ne},children:o})}import{Fragment as yF,jsx as Dc,jsxs as SF}from"react/jsx-runtime";var bF="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",DI={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 Cl(e){let{variant:t="primary",arrow:o,className:r,style:n,children:a,href:l,newTab:s,...i}=e,c=`${bF} ${DI[t]??DI.primary} ${r??""}`,f=SF(yF,{children:[a,o!==null&&Dc("span",{"aria-hidden":!0,className:"transition-transform group-hover:translate-x-[3px]",children:o??"\u2192"})]});return l?Dc(ll,{href:l,className:c,style:n,...s?{target:"_blank",rel:"noopener noreferrer"}:{},children:f}):Dc("button",{type:"button",className:c,style:n,...i,children:f})}import{jsx as J,jsxs as De}from"react/jsx-runtime";var En="w-full border-2 border-line bg-bg px-4 py-3.5 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 CF(e,t){let o=Number(e);if(o===0)return"Free";try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(o)}catch{return`${t} ${e}`}}function MI(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 HI(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()}}function Ln({id:e,label:t,required:o,children:r}){return De("div",{className:"flex flex-col gap-2",children:[De("label",{htmlFor:e,className:"font-[family-name:var(--bk-name-font,var(--font-mono))] text-[length:var(--bk-name-size,12px)] font-semibold uppercase tracking-[0.2em] text-fg",children:[t,o?J("span",{className:"text-accent",children:" *"}):null]}),r]})}function Mc({number:e,children:t}){return De("div",{className:"mb-4 flex items-center gap-3",children:[J("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}),J("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 GI({eyebrow:e,heading:t,intro:o}){return De("div",{className:"mb-10 max-w-[760px]",children:[(e??"").trim()&&J("p",{className:"mb-4 font-mono text-[12px] font-semibold uppercase tracking-[0.24em] text-accent",children:e}),(t??"").trim()&&J("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}),(o??"").trim()&&J("p",{className:"mt-5 max-w-[660px] font-display text-[17px] leading-[1.65] text-fg-dim",children:o})]})}function WI({style:e}={}){let{fieldPrefix:t,services:o,currency:r,serviceId:n,setServiceId:a,requiresPayment:l,date:s,earliestDate:i,setDate:c,setDateTouched:f,availability:u,loadingSlots:d,noSlotsMessage:p,selectedStart:x,setSelectedStart:g,customerTimezone:I}=_r();return o?De("div",{className:"flex flex-col gap-9",style:e,children:[De("div",{children:[J(Mc,{number:"01",children:"Choose a service"}),J("div",{className:"grid gap-3 sm:grid-cols-2",children:o.map(h=>{let C=h.id===n;return De("button",{type:"button","aria-pressed":C,onClick:()=>a(h.id),className:`min-h-11 border p-4 text-left transition-colors ${C?"border-accent bg-accent/10":"border-line bg-bg hover:border-fg-dim"}`,children:[J("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:h.name}),De("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:[h.durationMinutes," min \xB7 ",CF(h.price,r)]}),h.description&&J("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:h.description})]},h.id)})}),l&&J("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."})]}),De("div",{children:[J(Mc,{number:"02",children:"Choose a date and time"}),J(Ln,{id:`${t}-date`,label:"Date",required:!0,children:J("input",{id:`${t}-date`,type:"date",min:i,value:s,onChange:h=>{f(!0),c(h.target.value)},className:En,required:!0})}),J("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:d?J("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"}):u?.slots.length?u.slots.map(h=>De("button",{type:"button","aria-pressed":x===h.start,onClick:()=>g(h.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 ${x===h.start?"border-accent bg-accent text-bg":"border-line bg-bg text-fg hover:border-accent"}`,children:[J("span",{className:"block",children:MI(h.start,I||u.timezone)}),I&&I!==u.timezone&&De("span",{className:"mt-0.5 block text-[9px] font-normal tracking-[0.08em] opacity-70",children:[MI(h.start,u.timezone)," business"]})]},h.start)):p?J("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:p}):null}),u?.timezone&&De("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 ",I||u.timezone,I&&I!==u.timezone?` \xB7 business timezone ${u.timezone}`:""]})]})]}):null}function UI({buttonLabel:e,style:t}){let{fieldPrefix:o,editing:r,name:n,setName:a,email:l,setEmail:s,phone:i,setPhone:c,notes:f,setNotes:u,submitting:d,error:p,canSubmit:x}=_r();return De("div",{className:"sf-card border border-line bg-bg p-5 min-[640px]:p-7",style:t,children:[J(Mc,{number:"03",children:"Your details"}),De("div",{className:"flex flex-col gap-4",children:[J(Ln,{id:`${o}-name`,label:"Name",required:!0,children:J("input",{id:`${o}-name`,type:"text",autoComplete:"name",value:n,onChange:g=>a(g.target.value),className:En,required:!0})}),J(Ln,{id:`${o}-email`,label:"Email",required:!0,children:J("input",{id:`${o}-email`,type:"email",inputMode:"email",autoComplete:"email",value:l,onChange:g=>s(g.target.value),className:En,required:!0})}),J(Ln,{id:`${o}-phone`,label:"Phone",children:J("input",{id:`${o}-phone`,type:"tel",inputMode:"tel",autoComplete:"tel",value:i,onChange:g=>c(g.target.value),className:En})}),J(Ln,{id:`${o}-notes`,label:"What would you like to cover?",children:J("textarea",{id:`${o}-notes`,rows:4,value:f,onChange:g=>u(g.target.value),className:`${En} resize-y`})})]}),p&&J("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:p}),J(Cl,{type:r?"button":"submit",disabled:!x,arrow:null,className:"mt-6 w-full disabled:cursor-not-allowed disabled:opacity-50",children:d?"Submitting\u2026":(e??"").trim()||"Book appointment"})]})}function zI({successMessage:e}){let{confirmation:t,customerTimezone:o}=_r();return t?De("div",{className:"sf-card max-w-[760px] border border-line bg-bg p-6 min-[640px]:p-9",role:"status",children:[De("p",{className:"font-mono text-[12px] font-semibold uppercase tracking-[0.22em] text-accent",children:["Request received \xB7 ",t.bookingNumber]}),J("h3",{className:"mt-4 font-display text-[28px] font-medium uppercase text-fg",children:t.service}),J("p",{className:"mt-2 font-display text-[17px] text-fg-dim",children:HI(t.startAt,t.customerTimezone||o||t.timezone)}),t.customerTimezone&&t.timezone!==t.customerTimezone&&De("p",{className:"mt-1 font-mono text-[10px] uppercase tracking-[0.16em] text-fg-dim",children:["Business time: ",HI(t.startAt,t.timezone)]}),(e??"").trim()&&J("p",{className:"mt-5 max-w-[620px] font-serif text-[18px] italic leading-[1.6] text-fg-dim",children:e}),J(Cl,{href:`/book/${encodeURIComponent(t.manageToken)}`,newTab:t!==Bc,variant:"ghost",className:"mt-7",children:"Manage booking"})]}):null}var PF=["step","name","value","note"],M6={step:"Step",name:"Name",value:"Value",note:"Note"},kF={step:"styleStep",name:"styleName",value:"styleValue",note:"styleNote"},KI={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 wF(e){return typeof e=="string"&&Kt.includes(e)?e:null}var vF={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:900};function $I(e,t){let o={};for(let r of PF){let n=wF(e[kF[r]]);if(!n)continue;let a=So({role:n},vF,t);a.fontFamily&&(o[KI[r].font]=a.fontFamily),a.fontSize&&(o[KI[r].size]=a.fontSize)}return o}import{jsx as Ar}from"react/jsx-runtime";var VI=["head","booking","details","confirm"],qI={head:"Head",booking:"Booking",details:"Your details",confirm:"Confirmation"};function TF({region:e,eyebrow:t,heading:o,intro:r,buttonLabel:n,successMessage:a,...l}){let{confirmation:s,services:i}=_r(),c=$I(l);return e==="head"?Ar("div",{className:"min-[960px]:col-span-2",style:c,children:Ar(GI,{eyebrow:t,heading:o,intro:r})}):e==="confirm"?s?Ar("div",{className:"min-[960px]:col-span-2",style:c,children:Ar(zI,{successMessage:a})}):null:s||!i||i.length===0?null:e==="booking"?Ar(WI,{style:c}):e==="details"?Ar(UI,{buttonLabel:n,style:c}):null}import{useEffect as YI,useState as $o}from"react";import{jsx as Or,jsxs as FF}from"react/jsx-runtime";function XI(e,t){let[o,r]=$o(void 0),[n,a]=$o(0);return YI(()=>{if(t!==void 0)return;if(!e){r(null);return}let l=!1;return Rt.getForm(e).then(s=>{l||r(s)}).catch(()=>{l||r(null)}),()=>{l=!0}},[t,e,n]),YI(()=>{if(t===void 0)return Il(()=>a(l=>l+1))},[t]),t!==void 0?t:o}var RF="Something went wrong \u2014 your submission wasn't sent. Please try again.";function jI(e,t="Thanks \u2014 we've received your submission."){return e.successMessage?.trim()||t}function JI({form:e,formSlug:t,editing:o=!1}){let[r,n]=$o({}),[a,l]=$o(""),[s,i]=$o(!1),[c,f]=$o(!1),[u,d]=$o(null);async function p(x){if(x.preventDefault(),!(o||s||!e||!t)){i(!0),d(null);try{let g=e.fields.map(I=>({fieldKey:I.key,value:r[I.key]??""}));await Rt.submitForm(t,{answers:g,...a?{company:a}:{}}),f(!0)}catch{d(RF)}finally{i(!1)}}}return{valueOf:x=>r[x]??"",set:(x,g)=>n(I=>({...I,[x]:g})),honeypot:a,setHoneypot:l,submitting:s,done:c,error:u,handleSubmit:p}}function ZI({value:e,onChange:t}){return Or("input",{type:"text",name:"company",tabIndex:-1,autoComplete:"off","aria-hidden":"true",className:"hidden",value:e,onChange:o=>t(o.target.value)})}function Hc({field:e,value:t,onChange:o,className:r,rows:n=5,placeholder:a}){let l=a??e.placeholder;return e.type==="textarea"?Or("textarea",{required:e.required,rows:n,value:t,placeholder:l,onChange:s=>o(s.target.value),className:r}):e.type==="select"?FF("select",{required:e.required,value:t,onChange:s=>o(s.target.value),className:r,children:[Or("option",{value:"",children:l||"Select\u2026"}),e.options.map(s=>Or("option",{value:s,children:s},s))]}):e.type==="checkbox"?Or("input",{type:"checkbox",required:e.required,checked:t==="true",onChange:s=>o(s.target.checked?"true":""),className:r}):Or("input",{type:e.type==="email"?"email":e.type==="tel"?"tel":"text",required:e.required,value:t,placeholder:l,onChange:s=>o(s.target.value),className:r})}var Gc="solid",EF=[{label:"Solid",value:"solid"},{label:"Outlined",value:"outlined"}];function QI(e){return Xe(EF,Gc,e)}var Wc="sf-secnum-outline",eh="font-display text-[length:var(--size-headingMedium,clamp(48px,6vw,96px))] font-medium leading-[0.8] tracking-[-0.02em]",th=`@supports (-webkit-text-stroke: 1px currentColor){.${Wc}{color:var(--surface-2);-webkit-text-stroke:1px var(--line)}}`;import{jsx as LF}from"react/jsx-runtime";function Uc(){return LF("span",{className:"block h-px w-[30px] bg-current"})}import{jsx as zc,jsxs as NF}from"react/jsx-runtime";function _F(e,t){return`font-mono text-[length:var(--size-label,${e}px)] uppercase tracking-[0.3em] text-accent`}var AF="inline-block w-fit bg-accent px-3.5 py-1.5 font-mono text-[length:var(--size-label,12px)] font-semibold uppercase tracking-[0.16em] text-bg",OF="flex items-center gap-3.5 font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.3em] opacity-80 max-[800px]:text-[length:var(--size-label,12px)] max-[800px]:tracking-[0.25em]";function Zt({text:e,look:t="plain",size:o=13,scaled:r=!0,className:n="",classNameAfter:a=""}){if(t==="line")return NF("div",{className:[n,OF,a].filter(Boolean).join(" "),children:[zc(Uc,{}),zc("span",{children:re(e)})]});let l=t==="filled"?AF:_F(o,r);return zc("span",{className:[n,l,a].filter(Boolean).join(" "),children:re(e)})}import{Fragment as BF,jsx as fe,jsxs as pt}from"react/jsx-runtime";var _n=(e,t=!1)=>typeof e=="string"?Ot(e,t):e,Nr=(e,t=!1)=>typeof e=="string"?re(e,t):e;function Kc({num:e,title:t,link:o,logo:r,description:n,accent:a,accentNum:l,numStyle:s=Gc,look:i="standard",titleAccent:c,accentTracking:f="-0.02em",spaceBelow:u,rowGap:d,descriptionSize:p,className:x="",eyebrowLook:g=Pc}){let I=u??(i==="editorial"?"mb-[60px]":"");if(i==="editorial"){let b=!!t||!!c;return pt("header",{className:`${I} 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 ${x}`.trim(),children:[e&&(typeof e=="string"?fe(Zt,{text:e,className:"pb-2"}):fe("span",{className:"pb-2",children:e})),b&&pt("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&&pt(BF,{children:[" ",fe("em",{className:"font-serif font-normal italic text-accent",style:{letterSpacing:f},children:c})]})]}),n&&fe("p",{className:"max-w-[360px] pb-1 text-right font-display text-[length:var(--size-body,14px)] leading-[1.5] text-fg-dim max-[1100px]:max-w-full max-[1100px]:text-left",children:n})]})}if(i==="simple"){let b=`${I} ${x}`.trim();return pt("div",{className:b||void 0,children:[e&&(typeof e=="string"?fe(Zt,{text:e,look:g,className:"mb-4 block"}):fe("span",{className:"mb-4 block",children:e})),t&&fe("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.02em] text-fg max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:_n(t)})]})}if(i==="statement"){let b=`${I} ${x}`.trim();return pt("div",{className:b||void 0,children:[e&&(typeof e=="string"?fe(Zt,{text:e,look:g,className:"mb-4 block"}):fe("span",{className:"mb-4 block",children:e})),t&&fe("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:_n(t,!0)})]})}if(i==="natural"){let b=`flex max-w-[680px] flex-col ${d??"gap-5"} ${I} ${x}`.replace(/\s+/g," ").trim();return pt("div",{className:b,children:[e&&(typeof e=="string"?fe(Zt,{text:e,look:g}):fe("span",{children:e})),t&&fe("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium leading-[1.05] tracking-[-0.03em] max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:_n(t)}),n&&fe("p",{className:`${p??"text-[length:var(--size-body,16px)]"} leading-[1.6] opacity-85`,children:n})]})}if(i==="essay"){let b=`${I} ${x}`.trim();return pt("div",{className:b||void 0,children:[e&&(typeof e=="string"?fe(Zt,{text:e,look:g,className:"mb-4 block"}):fe("span",{className:"mb-4 block",children:e})),t&&fe("h2",{className:"font-heading2 text-[length:var(--sf-heading-max,var(--size-headingMedium,38px))] [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 max-[800px]:text-[length:var(--size-headingSmall,28px)]",children:_n(t)})]})}let h=!!n||!!o,C=!!t,S=QI(s)==="outlined",P="font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.3em]",T=null;if(e)if(S)T=fe("span",{className:`${eh} text-fg-dim ${Wc}`,children:Nr(e)});else if(l&&!a&&typeof e=="string"){let b=e.indexOf("/"),w=b===-1?e:e.slice(0,b),O=b===-1?"":e.slice(b);T=pt("span",{className:P,children:[fe("span",{className:"text-accent",children:Nr(w)}),O&&fe("span",{className:"text-fg-dim",children:Nr(O)})]})}else T=fe("span",{className:`${P} ${a?"text-accent":"text-fg-dim"}`,children:Nr(e)});return pt("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:[S&&e&&fe("style",{children:th}),pt("div",{className:"flex flex-col items-start gap-3",children:[r?.src&&fe("img",{src:Xd(r.src),alt:r.alt,className:"h-8 w-auto object-contain"}),T]}),C&&fe("h2",{className:a?"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 text-[length:min(var(--size-headingMedium,56px),var(--sf-heading-max,9999px))] [font-weight:var(--sf-heading-weight,500)] [&_em]:[font-weight:var(--sf-heading-weight-strong,inherit)] leading-none tracking-[-0.03em] whitespace-pre-line max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))] max-[800px]:leading-[1]",children:_n(t)}),h&&pt("div",{className:"flex flex-col items-end gap-3 max-[800px]:items-start",children:[n&&fe("p",{className:"max-w-[340px] font-display text-[length:var(--size-body,14px)] leading-[1.5] text-fg-dim text-right max-[800px]:max-w-full max-[800px]:text-left",children:Nr(n)}),o&&pt(ll,{href:o.href,className:"inline-flex items-center gap-2 whitespace-nowrap font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em] text-fg-dim transition-colors hover:text-fg",children:[Nr(o.text),fe("span",{"aria-hidden":!0,children:"\u2192"})]})]})]})}import{jsx as mt,jsxs as An}from"react/jsx-runtime";function DF(e){return e.type==="textarea"||e.type==="select"||e.type==="checkbox"}function xz({eyebrow:e,title:t}){return An("div",{className:"flex flex-col gap-4",children:[e&&mt(Zt,{text:e,scaled:!1}),t&&mt("h2",{className:"font-display text-[min(clamp(40px,5vw,72px),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:Ot(t,!0)})]})}function oh({body:e,buttonLabel:t,consent:o,form:r,submission:n,showForm:a,resolving:l,editing:s}){return An("div",{className:"flex flex-col gap-7",children:[e&&el(e).map((i,c)=>mt("p",{className:"max-w-[480px] font-display text-[16px] leading-[1.6] text-fg-dim",children:re(i)},c)),a&&(r?n.done?mt("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:jI(r)}):An("form",{className:"grid grid-cols-2 gap-2",onSubmit:n.handleSubmit,children:[r.fields.map(i=>{let c=["border border-line bg-transparent px-4 py-3.5 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",DF(i)?"col-span-2":""].join(" ");return i.type==="checkbox"?An("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:[mt(Hc,{field:i,value:n.valueOf(i.key),onChange:f=>n.set(i.key,f),className:"mt-0.5 size-4 accent-accent"}),An("span",{children:[i.label,i.required?mt("span",{className:"text-accent",children:" *"}):null]})]},i.key):mt(Hc,{field:i,value:n.valueOf(i.key),onChange:f=>n.set(i.key,f),rows:4,placeholder:i.placeholder||i.label,className:i.type==="textarea"?`${c} resize-y`:c},i.key)}),mt(ZI,{value:n.honeypot,onChange:n.setHoneypot}),n.error&&mt("p",{role:"alert",className:"col-span-2 font-mono text-[12px] uppercase tracking-[0.18em] text-alert",children:n.error}),t&&mt("button",{type:s?"button":"submit",disabled:n.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:n.submitting?"Sending\u2026":re(t)})]}):mt("p",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim",children:l?"Loading form\u2026":"Choose a form in the inspector, under Form \u2014 until then this form is hidden on the live page and nothing can be submitted."})),a&&o&&mt("span",{className:"font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim/70",children:re(o)})]})}var MF=["field","tick","thanks"],yz={field:"Form rows",tick:"Tick label",thanks:"Thank-you message"},HF={field:"styleField",tick:"styleTick",thanks:"styleThanks"},rh={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 GF(e){return typeof e=="string"&&Kt.includes(e)?e:null}var WF={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:900};function nh(e,t){let o={};for(let r of MF){let n=GF(e[HF[r]]);if(!n)continue;let a=So({role:n},WF,t);a.fontFamily&&(o[rh[r].font]=a.fontFamily),a.fontSize&&(o[rh[r].size]=a.fontSize)}return o}import{jsx as Pl}from"react/jsx-runtime";var ah=["head","form"],lh={head:"Head",form:"Form"};function UF({region:e,eyebrow:t,title:o,body:r,buttonText:n,consent:a,formSlug:l,form:s,editing:i=!1,...c}){let f=XI(l,s),u=JI({form:f,formSlug:l,editing:i}),d=nh(c);return e==="head"?Pl("div",{style:d,children:Pl(Kc,{look:"statement",num:t,title:o})}):Pl("div",{style:d,children:Pl(oh,{body:r??"",buttonLabel:n??"",consent:a??"",form:f,submission:u,showForm:!!f||i,resolving:f===void 0,editing:i})})}var zF="ImageBlock",KF=3,kl=(e,t,o={})=>({type:e,props:{...t?.(e)??{},id:Lo(e),...o}}),$F=e=>({...e?.(_e)??{},direction:"column",[Tr]:[kl(zF,e),kl(_e,e,{direction:"column",[Tr]:[kl("Heading",e),kl("Text",e)]})]}),On={AppointmentBooking:{slot:"boxes",childType:"BookingBox",addLabel:"Add box",fixed:!0,seeds:()=>VI.map(e=>({region:e,name:qI[e]})),addBlocked:()=>"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:()=>ah.map(e=>({region:e,name:lh[e]})),addBlocked:()=>"A Submit-a-build section is these two boxes. They cannot be added to or removed.",skipSeed:e=>e.layout!=="boxes"},Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>OI.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${xo.toLowerCase()}`,seeds:()=>[],addBlocked:ca,notice:ks},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${xo.toLowerCase()}`,seeds:()=>[],addBlocked:ca,notice:ks},Collections:{slot:"cards",childType:"CollectionCard",addLabel:"Add card",seeds:()=>Array.from({length:hI},()=>({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:()=>CI.map(e=>({...e})),legacy:e=>Array.isArray(e.cards)?e.cards.map(t=>({...t})):[]},ProcessSteps:{slot:"boxes",childType:_e,addLabel:`Add ${xo.toLowerCase()}`,seeds:e=>Array.from({length:KF},()=>$F(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}};function Dz(e,t){let o=On[e];return o?{slot:o.slot,children:o.seeds(t).map(r=>({type:o.childType,props:{id:Lo(o.childType),...r}}))}:null}var Vo=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function $c(e){return Vo(e)&&typeof e.type=="string"&&e.type!==""&&Vo(e.props)}function sh(e,t,o){if(Array.isArray(e))for(let r of e)$c(r)?Vc(r,t,o):Vo(r)&&typeof r.type=="string"&&r.type!==""&&t.add(r.type)}function wl(e,t,o){if(Array.isArray(e)){if(o.has(e))return;o.add(e);for(let r of e)$c(r)?Vc(r,t,o):wl(r,t,o);return}if(!(!Vo(e)||o.has(e))){o.add(e);for(let r of Object.values(e))wl(r,t,o)}}function Vc(e,t,o){if(!o.has(e)){o.add(e),t.add(e.type);for(let r of Object.values(e.props))wl(r,t,o)}}function qc(e){let t=new Set,o=new Set;if($c(e))Vc(e,t,o);else if(Vo(e)){if(sh(e.content,t,o),Vo(e.zones))for(let r of Object.values(e.zones))sh(r,t,o);Vo(e.root)&&wl(e.root,t,o)}return[...t].sort()}var ih=()=>({}),ch=new Map;function VF(e){let t=ch.get(e);if(t)return t;let o=new Set,r=On[e];if(r)for(let l of r.seeds(ih))for(let s of qc({type:r.childType,props:l}))o.add(s);let n=pI(e);if(n){let l=0;for(let s of qc(n(ih,i=>`${i}-${l+=1}`)))o.add(s)}o.delete(e);let a=[...o].sort();return ch.set(e,a),a}function qF(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;let t=$s(e),o=e.allow?new Set(e.allow):null,r=new Set(e.deny??[]),n=new Set(Object.keys(e.host??{})),a=i=>{if(r.has(i))return!1;if(n.has(i))return!0;let c=Zu(i);return!c||!t[c]?!1:o?o.has(i):!0},l=new Map,s=i=>{let c=l.get(i);if(c!==void 0)return c;l.set(i,!1);let f=a(i)&&VF(i).every(s);return l.set(i,f),f};return{sets:t,offers:s}}var YF="block-offer";function Yc(e=Ye()){return e.cache(YF,()=>qF(e.blocks))}function Vz(e,t=Ye()){let o=Yc(t);return o?o.offers(e):!0}function Zz(e,t=0){let o=jF(e,t),r=o?Yc():null;return o&&r?XF(o,r):o}function XF(e,t){if(e.spec)return t.offers(e.spec.childType)?e:null;let o=e.choices??[],r=o.filter(n=>t.offers(n.type));return r.length===o.length?e:r.length>0?{...e,choices:r}:null}function jF(e,t){let o=On[e];if(o)return{source:"section",slot:o.slot,choices:null,spec:o};let r=rI(e,t);if(r)return{source:"container",slot:r.slot,choices:r.choices,spec:null};let n=dI(e);return n?{source:"footer",slot:fI,choices:n,spec:null}:null}var t3="Scrolling Bar",{Provider:o3,useSelection:fh}=sa("selectedHeroId");import{createContext as JF,useCallback as dh,useContext as ZF,useMemo as QF,useRef as eE}from"react";import{jsx as oE}from"react/jsx-runtime";var tE=Object.fromEntries(Tu.map(e=>[e,{value:"",error:null}])),uh=JF({links:Ru,rows:tE,canSave:!1,saveLink:async()=>({ok:!1,error:"There is no website to save to."}),openPanel:()=>{},setOpenHandler:()=>{}});function l3({children:e,value:t}){let o=eE(()=>{}),r=dh(()=>o.current(),[]),n=dh(l=>{o.current=l},[]),a=QF(()=>({...t,openPanel:r,setOpenHandler:n}),[t,r,n]);return oE(uh.Provider,{value:a,children:e})}var s3=()=>ZF(uh);import{useRef as Zf,useState as Jl}from"react";import{useEasel as $r}from"efficient-easel/easel";var ph="50% 50%";var Dr=e=>e<0?0:e>100?100:Math.round(e);function Xc(e){let t=String(e??"").trim().split(/\s+/);if(t.length!==2)return{x:50,y:50};let o=a=>{let l=/^(-?\d+(?:\.\d+)?)%$/.exec(a);return l?Number(l[1]):null},r=o(t[0]),n=o(t[1]);return r===null||n===null?{x:50,y:50}:{x:Dr(r),y:Dr(n)}}function Br(e,t){return`${Dr(e)}% ${Dr(t)}%`}function mh(e,t,o=!1){let r=o?10:1,{x:n,y:a}=Xc(e);switch(t){case"ArrowLeft":return Br(n-r,a);case"ArrowRight":return Br(n+r,a);case"ArrowUp":return Br(n,a-r);case"ArrowDown":return Br(n,a+r);default:return null}}function xh(e,t,o){return!(e.width>0)||!(e.height>0)?{x:50,y:50}:{x:Dr((t-e.left)/e.width*100),y:Dr((o-e.top)/e.height*100)}}import{useCallback as lE,useEffect as sE,useRef as iE,useState as cE}from"react";import{useEasel as fE}from"efficient-easel/easel";import{SettingsAction as dE}from"efficient-easel/panel";function jc(e){return typeof e=="number"&&Number.isFinite(e)}function u3(e,t){if(!jc(e))return;let o=Xn(so(e));if(Object.keys(o).length===0)return;let r=o[vl];if(typeof r!="string")return o;let n=Mr(t)?Hr(r,xt(t)??[]):r;return{...o,[rE]:n}}var rE="--sf-section-radius",vl="--sf-card-radius",ct=["tl","tr","br","bl"];function xt(e){if(!Array.isArray(e))return null;let t=e.filter(o=>ct.includes(o));return ct.filter(o=>t.includes(o))}function Mr(e){let t=xt(e);return t!==null&&t.length<ct.length}function Hr(e,t){return ct.map(o=>t.includes(o)?e:"0").join(" ")}var wo="Which corners",Gr=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];function Tl(e){let t=o=>e.includes(o);if(e.length===ct.length)return"All four";if(e.length===0)return"None";if(e.length===1)return Gr.find(o=>o.value===e[0])?.label??"1 corner";if(e.length===2){if(t("tl")&&t("tr"))return"Top two";if(t("bl")&&t("br"))return"Bottom two";if(t("tl")&&t("bl"))return"Left two";if(t("tr")&&t("br"))return"Right two"}return`${e.length} corners`}var nE="--sf-card-box-radius",aE="--sf-site-card-radius",g3="sf-section-bleeds";function Nn(e){return typeof e=="number"&&Number.isFinite(e)}function I3(e,t){if(!Nn(e))return;let o=Xn(so(e))[vl];if(typeof o!="string")return;let r=Mr(t)?Hr(o,xt(t)??[]):o;return{[nE]:r}}function h3(e){let t=e[vl];return typeof t=="string"?{[aE]:t}:{}}function gh(e,t){let o=e.find(a=>a?.props?.id===t);if(!o)return[...e];let r=o.props?.cardCorners,n=o.props?.cardCornerSides;return e.map(a=>a?.props?.id===t?a:{...a,props:{...a.props,cardCorners:r,cardCornerSides:n}})}function Ih(e,t,o){let r=o?.zone??"",n=r.lastIndexOf(":"),a=n>0?r.slice(0,n):"",l=n>0?r.slice(n+1):"",s=a?Hd(e,t,a):null,i=s&&Array.isArray(s.item.props[l])?s.item.props[l]:[],c=o?.index??-1,f=c>=0?i[c]:void 0,u=f?.props?.id?String(f.props.id):"",d=Math.max(i.length-1,0);return!s||!u?{can:!1,reason:"unreachable",others:0}:i.length<=1?{can:!1,reason:"alone",others:d}:Nn(f?.props?.cardCorners)?{can:!0,others:d,zone:s.zone,index:s.index,data:{...s.item,props:{...s.item.props,[l]:gh(i,u)}}}:{can:!1,reason:"unset",others:d}}function hh(e){if(!e.can)return e.reason==="alone"?"This is the only card in the section.":e.reason==="unset"?"Set this card's corners first.":"This card is not in a section that can share corners.";let t=e.others;return`Gives the other ${t===1?"card":`${t} cards`} this card's Corners and Which corners.`}function bh(e){return`Applied to ${e} ${e===1?"card":"cards"}`}function yh(e,t){e.can&&t(e.zone,e.index,e.data)}import{jsx as Sh}from"react/jsx-runtime";var uE=2200,pE="apply-corners-to-siblings",mE="Apply to all cards";function xE({plan:e,doneCount:t,onPress:o}){return Sh(dE,{id:pE,label:mE,note:hh(e),disabled:!e.can,done:t!==null,doneLabel:bh(t??0),onPress:o})}function Jc(){let{appState:e,config:t}=fE(i=>i),o=Eu(),[r,n]=cE(null),a=iE(null);sE(()=>()=>{a.current&&clearTimeout(a.current)},[]);let l=Ih(t,e.data.content??[],e.ui.itemSelector),s=lE(()=>{yh(l,o.replaceComponent),l.can&&(n(l.others),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>n(null),uE))},[l,o]);return Sh(xE,{plan:l,doneCount:r,onPress:s})}import{jsx as Bn,jsxs as Ch}from"react/jsx-runtime";function Rl({label:e,onClear:t,what:o="override"}){return Bn("button",{type:"button",className:"sf-part-mark",title:`Clear ${o}`,"aria-label":`Clear ${o}: ${e}`,onClick:t,children:Bn(gE,{})})}function gE(){return Ch("svg",{width:"12",height:"12",viewBox:"0 0 16 16","aria-hidden":"true",children:[Bn("circle",{className:"sf-part-mark-dot",cx:"8",cy:"8",r:"3",fill:"currentColor"}),Ch("g",{className:"sf-part-mark-arrow",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",children:[Bn("path",{d:"M13 8a5 5 0 1 1-1.6-3.7"}),Bn("path",{d:"M13 2.5V5h-2.6"})]})]})}var Ph=1,kh="Corners";function IE(e){return so(e)}function N3(e,t){let o=IE(e);if(o===null)return null;let r=`${o}px`;return{borderRadius:Mr(t)?Hr(r,xt(t)??[]):r}}import{createContext as bE,useContext as yE,useMemo as SE}from"react";var hE=["vehicle","process","size","lugs","finish","price"],Fl={vehicle:"My Car",process:"Process",size:"Size",lugs:"Lugs",finish:"Finish",price:"Price"};function wh(e){if(!e)return Fl;let t={...Fl};for(let o of hE){let r=e[o];if(typeof r!="string")continue;let n=r.trim();n&&(t[o]=n)}return t}import{jsx as CE}from"react/jsx-runtime";var vh=bE(Fl);function G3({labels:e,children:t}){let o=SE(()=>wh(e),[e]);return CE(vh.Provider,{value:o,children:t})}function Zc(){return yE(vh)}var Bt={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]}},Qc=Object.keys(Bt),Rh=[2,3,4,6];function Fh(e){return typeof e!="string"||e===""?null:Bt[e]??null}function Th(e,t){return t?6/e.acrossPhone:12/e.across}var PE="sf-wall--";function kE(e){return`${PE}${e}`}function z3(e){let t=Bt[e],o=`.${kE(e)}`,r=[],n=(a,l)=>{let s=[],i=a.length;a.forEach(([c,f],u)=>{s.push(`${o} > :nth-child(${i}n+${u+1}){grid-column:span ${c};grid-row:span ${f}}`)});for(let c=1;c<i;c+=1)s.push(`${o}:has(> :nth-child(${i}n+${c}):last-child) > :nth-last-child(-n+${c}){grid-column:span ${l};grid-row:span 1}`);return s};return r.push(`${o}{grid-template-columns:repeat(12,minmax(0,1fr))}`),r.push(...n(t.desktop,Th(t,!1))),r.push("@media (max-width:800px){"),r.push(`${o}{grid-template-columns:repeat(6,minmax(0,1fr))}`),r.push(...n(t.phone,Th(t,!0))),r.push("}"),r.join("")}var El=12,Eh=1,wE=3;var vE=3;function ef(e,t,o){let r=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(r)?Math.min(o,Math.max(t,Math.trunc(r))):null}function TE(e){return ef(e,1,El)??vE}function V3(e,t){let o=ef(e,Eh,wE);return o??(TE(t)===4?2:Eh)}function q3(e){return e==null||e===""?null:ef(e,1,El)}var Y3="data-sf-span";function X3(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if(Fh(e.props?.layout))return!1;let t=e.props?.columns;return t!=null&&t!==""}return!1}import{AlignLeftIcon as aA,AlignSeparateIcon as lA,AnimationIcon as Xb,BackgroundIcon as sA,CartIcon as iA,ColumnWidthsIcon as jb,ColumnsIcon as cA,CornerIcon as Jb,DirectionDownIcon as fA,DirectionLeftIcon as dA,DirectionRightIcon as uA,DirectionUpIcon as pA,DollarIcon as mA,FinishIcon as xA,GapIcon as Zb,GridIcon as gA,GroundIcon as IA,HashIcon as Qb,ImageIcon as hA,LayoutIcon as bA,ListIcon as yA,LocationIcon as jf,PaddingBottomIcon as SA,PaddingLeftIcon as CA,PaddingRightIcon as PA,PaddingTopIcon as kA,PageIcon as ey,PhoneIcon as wA,PlacementIcon as vA,ProductSizeIcon as TA,RotateIcon as RA,SquareIcon as FA,StylesIcon as EA,TextLinesIcon as LA,WidthIcon as _A,WrapIcon as AA}from"efficient-easel/icons";import{TitleIcon as RE,ButtonIcon as FE,DollarIcon as EE,HashIcon as LE,LinkIcon as _E,NoteIcon as AE,TagIcon as OE,TextLinesIcon as NE}from"efficient-easel/icons";import{Fragment as Dt,jsx as Z,jsxs as Mt}from"react/jsx-runtime";var Lh={body:NE,button:FE,link:_E,label:OE,number:LE,price:EE,note:AE,title:RE},_h={eyebrow:Mt(Dt,{children:[Z("path",{d:"M5 6.5h5"}),Z("path",{d:"M5 12.5h14"}),Z("path",{d:"M5 18h11"})]}),heading:Mt(Dt,{children:[Z("path",{d:"M6.5 5v14"}),Z("path",{d:"M17.5 5v14"}),Z("path",{d:"M6.5 12h11"})]}),intro:Mt(Dt,{children:[Z("path",{d:"M4 5.5v13"}),Z("path",{d:"M8 7.5h12"}),Z("path",{d:"M8 12h12"}),Z("path",{d:"M8 16.5h8"})]}),value:Mt(Dt,{children:[Z("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),Z("path",{d:"M6.5 12h7"})]}),name:Mt(Dt,{children:[Z("path",{d:"M6 3.5v17"}),Z("path",{d:"M6 5h11.5l-2.6 3.6L17.5 12H6z"})]}),date:Mt(Dt,{children:[Z("rect",{x:"4",y:"5.5",width:"16",height:"15",rx:"2"}),Z("path",{d:"M4 10.5h16"}),Z("path",{d:"M9 3.2v4.4"}),Z("path",{d:"M15 3.2v4.4"})]}),caption:Mt(Dt,{children:[Z("rect",{x:"3.5",y:"4.5",width:"17",height:"11",rx:"2"}),Z("path",{d:"M3.5 12.8l4.2-3.2 3.6 2.8 3.4-2.4 5.8 4"}),Z("path",{d:"M6.5 19.5h11"})]}),quote:Mt(Dt,{children:[Z("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),Z("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:Mt(Dt,{children:[Z("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),Z("path",{d:"M8 9.5h8"}),Z("path",{d:"M12 9.5v5"})]}),meta:Mt(Dt,{children:[Z("path",{d:"M4 7h16"}),Z("path",{d:"M4 14h3.5"}),Z("path",{d:"M10.5 14h3"}),Z("path",{d:"M17 14h3"})]})};function tf({noun:e,size:t=14,strokeWidth:o=1.8,className:r,style:n}){let a=Lh[e];return a?Z("span",{className:r,style:{display:"inline-flex",...n},"aria-hidden":"true",children:Z(a,{size:t})}):Z("svg",{className:r,style:n,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:_h[e]})}var Z3=Object.keys(Lh);var Q3=Object.keys(_h);var BE="#ffffff",DE=/^#[0-9a-fA-F]{6}$/;function of(e){return ME(e)?e:BE}function ME(e){return typeof e=="string"&&DE.test(e)}function oK(e){return{"--bg":of(e)}}var HE=["fade","rise","scale"],rf="none",Ah=[{label:"None",value:rf},{label:"Fade",value:"fade"},{label:"Rise",value:"rise"},{label:"Scale",value:"scale"}];function aK(e){return HE.includes(e)?e:null}var Oh="data-sf-anim",Dn="data-sf-anim-state";function lK(e){let t=()=>{};if(typeof IntersectionObserver>"u"||!e.getAttribute(Oh))return t;let o=window.innerHeight||document.documentElement.clientHeight;if(e.getBoundingClientRect().top<o)return t;e.setAttribute(Dn,"armed");let r=new IntersectionObserver(n=>{for(let a of n)if(a.isIntersecting){r.disconnect(),GE(e);break}},{threshold:0});return r.observe(e),()=>{r.disconnect(),e.removeAttribute(Dn)}}function GE(e){if(!e.getAttribute(Oh))return;e.removeAttribute(Dn),e.offsetWidth,e.setAttribute(Dn,"play");let t=o=>{o.target===e&&(e.removeAttribute(Dn),e.removeEventListener("animationend",t))};e.addEventListener("animationend",t)}var sK=Ud;function af(e,t){let o=e?.content;if(!Array.isArray(o))return null;for(let r of o){if(!r||typeof r!="object")continue;let n=r.props;if(n?.id===t)return null;if(nf(r,t,0))return n??{}}return null}function nf(e,t,o){if(o>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(n=>nf(n,t,o+1));let r=e.props;return r&&typeof r=="object"&&r.id===t?!0:Object.values(e).some(n=>nf(n,t,o+1))}import{SettingsCorners as ty,SettingsField as be,SettingsGroupHead as OA,SettingsGroupSub as NA,SettingsPlacement as BA,SettingsSegmented as DA,SettingsSwitch as oy}from"efficient-easel/panel";import{ListField as MA}from"efficient-easel/fields";import{useContext as KE,useEffect as Dh,useRef as Nl,useState as Bl}from"react";import{useEffect as Nh,useMemo as Ll,useRef as WE,useState as lf}from"react";import{jsx as Ht,jsxs as _l}from"react/jsx-runtime";function UE(e,t){let o=t.trim().toLowerCase(),r=o?e.filter(l=>l.label.toLowerCase().includes(o)):[...e],n=[],a;for(let l of r)l.group&&l.group!==a&&n.push({type:"group",label:l.group,count:r.filter(s=>s.group===l.group).length}),a=l.group,n.push({type:"option",option:l});return n}function Al({label:e,options:t,fallback:o,value:r,onChange:n,placeholder:a,bare:l=!1}){let[s,i]=lf(!1),[c,f]=lf(""),[u,d]=lf(0),p=WE(null),x=r??"",g=Ll(()=>t.find(b=>b.value===x)??t.find(b=>b.value===o)??null,[t,x,o]),I=Ll(()=>UE(t,c),[t,c]),h=Ll(()=>I.filter(b=>b.type==="option").map(b=>b.option),[I]),C=Ll(()=>t.some(b=>b.thumb!==void 0),[t]);Nh(()=>{if(!s)return;let b=w=>{p.current&&!p.current.contains(w.target)&&(i(!1),f(""))};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[s]),Nh(()=>{d(b=>b>=h.length?0:b)},[h.length]);let S=b=>{n(b.value),i(!1),f("")},P=b=>{b.key==="Escape"?(i(!1),f("")):b.key==="ArrowDown"?(b.preventDefault(),i(!0),d(w=>Math.min(w+1,Math.max(h.length-1,0)))):b.key==="ArrowUp"?(b.preventDefault(),d(w=>Math.max(w-1,0))):b.key==="Enter"&&s&&h[u]&&(b.preventDefault(),S(h[u]))},T=-1;return _l("div",{className:l?"sf-combo":"sf-field sf-combo",ref:p,children:[!l&&Ht("div",{className:"sf-field-label",children:e}),_l("div",{className:"sf-combo-control",children:[Ht("input",{type:"text",className:"sf-combo-input",role:"combobox",...l?{"aria-label":e}:{},"aria-expanded":s,"aria-autocomplete":"list",value:s?c:g?.label??"",placeholder:a??"Search\u2026",onChange:b=>{f(b.target.value),i(!0),d(0)},onFocus:()=>{i(!0),f("")},onClick:()=>i(!0),onKeyDown:P}),Ht("span",{className:"sf-combo-caret","aria-hidden":"true",children:"\u25BE"})]}),s&&Ht("ul",{className:"sf-combo-menu",role:"listbox",children:h.length===0?Ht("li",{className:"sf-combo-empty",children:"No matches"}):I.map(b=>{if(b.type==="group")return _l("li",{className:"sf-combo-group",role:"presentation",children:[b.label,Ht("span",{className:"sf-combo-group-count",children:b.count})]},`group:${b.label}`);let w=b.option,O=++T;return _l("li",{role:"option","aria-selected":w.value===x,className:"sf-combo-option"+(O===u?" is-active":"")+(w.value===x?" is-selected":""),onMouseDown:D=>{D.preventDefault(),S(w)},onMouseEnter:()=>d(O),children:[C&&Ht("span",{className:"sf-combo-thumb","aria-hidden":"true",children:w.thumb?Ht("img",{src:w.thumb,alt:"",loading:"lazy"}):null}),Ht("span",{className:"sf-combo-option-label",children:w.label}),w.meta!==void 0&&Ht("span",{className:"sf-combo-meta",children:w.meta})]},w.value||"__none__")})})]})}var Mn=class extends Error{constructor(o){super("The storefront forms list could not be loaded.");this.cause=o;this.name="FormsUnavailableError"}},Ol=null,sf=null,cf=null;function zE(){Ol=null,sf=null,cf=null}function Bh(e=!1){let t=dr(),o=_o();return(e||!Ol||sf===null&&t!==null||cf!==o)&&(sf=t,cf=o,Ol=(t?oe.listForms(t,{siteId:o}):Promise.reject(new Mn)).catch(r=>{throw zE(),r instanceof Mn?r:new Mn(r)})),Ol}import{jsx as Te,jsxs as kt}from"react/jsx-runtime";var Mh="__create-a-new-form__";function $E({value:e,forms:t,loadFailed:o,emptyLabel:r="No form yet"}){let n=t??[],a=e?n.some(u=>u.slug===e):!0,l=t===null&&!o,s={value:"",label:l?"Loading\u2026":o?"Forms couldn\u2019t be loaded":r},i=e&&!a?[{value:e,label:l||o?e:`${e} \u2014 no form with this name`}]:[],c=n.map(u=>({value:u.slug,label:u.is_active?u.title:`${u.title} (switched off)`})),f=l?[]:[{value:Mh,label:"Create a new form\u2026"}];return[s,...i,...c,...f]}function VE(e){return e===Mh?{action:"create"}:{action:"store",slug:e}}function qE({value:e,pickedId:t,forms:o}){if(!e||!t||o.some(n=>n.slug===e))return null;let r=o.find(n=>n.id===t);return r&&r.slug&&r.slug!==e?r.slug:null}function YE(e){let t=["Goes to Storefront \u2192 Forms"],o=(e.notify_email??"").trim();return o&&t.push(`Emails a copy to ${o}`),e.mailing_list_name&&t.push(e.subscribe_mode==="checkbox"?`Joins the \u201C${e.mailing_list_name}\u201D audience, but only when the consent box is ticked`:`Joins the \u201C${e.mailing_list_name}\u201D audience`),e.kind==="account_signup"&&t.push(e.signup_customer_type==="importer"?"Creates a wholesale account":"Creates a retail account"),t}function ff({value:e,onChange:t,label:o="Form",emptyLabel:r}){let n=fo(),a=KE(Po),l=a?a.capabilities.hasForms:!0,[s,i]=Bl(null),[c,f]=Bl(!1),[u,d]=Bl(!1),[p,x]=Bl(!1),g=Nl(!0),I=Nl(e);I.current=e;let h=Nl(t);h.current=t;let C=Nl(null),S=(R=!1)=>Bh(R).then(L=>{if(g.current){i(L),f(!1);let G=qE({value:I.current,pickedId:C.current,forms:L});G&&h.current(G)}return L},()=>(g.current&&f(!0),[]));Dh(()=>(g.current=!0,l&&S(),()=>{g.current=!1}),[l]),Dh(()=>l?Il(()=>{S(!0)}):void 0,[l]);let T=e?(s??[]).find(R=>R.slug===e)??null:null;T?C.current=T.id:e||(C.current=null);let b=!!e&&!T&&s!==null&&!c,w=$E({value:e,forms:s,loadFailed:c,emptyLabel:r}),O=async()=>{d(!0),x(!1);try{let R=await Zg(n,{mode:"create"}),L=await S(!0);if(!g.current)return;if(R.status==="timeout"){x(!0);return}if(R.status!=="saved")return;let{form:G}=R;G.slug!==I.current&&h.current(G.slug),L.some(Y=>Y.id===G.id)||S(!0)}finally{g.current&&d(!1)}},D=R=>{let L=VE(R);L.action==="create"?O():(x(!1),t(L.slug))};return l?kt("div",{className:"sf-formpicker",children:[Te(Al,{label:o,options:w,fallback:"",value:e??"",onChange:D,placeholder:"Search forms\u2026"}),p&&Te("p",{className:"sf-formsummary-warn",children:"That didn\u2019t come back \u2014 pick the form from the list, or try again."}),T?kt("div",{className:"sf-blogsource sf-formsummary",children:[kt("div",{children:[Te("div",{className:"sf-formsummary-caption",children:T.fields.length===1?"1 field":`${T.fields.length} fields`}),T.fields.length?Te("ol",{className:"sf-formsummary-fields",children:T.fields.map((R,L)=>Te("li",{children:R.label},R.key||`${R.label}-${L}`))}):Te("p",{className:"sf-blogsource-hint",children:"This form has no fields yet, so there is nothing for a visitor to fill in."})]}),kt("div",{children:[Te("div",{className:"sf-formsummary-caption",children:"Where the answers go"}),Te("ul",{className:"sf-formsummary-fields",children:YE(T).map(R=>Te("li",{children:R},R))})]}),!T.is_active&&Te("p",{className:"sf-formsummary-warn",children:"This form is switched off, so it won\u2019t appear on the published page. Turn it back on in Storefront \u2192 Forms."}),kt("div",{className:"sf-formsummary-actions",children:[Te("button",{type:"button",className:"sf-blogsource-btn",onClick:()=>Jg(n,T.id),children:"Edit form \u270E"}),Te("button",{type:"button",className:"sf-blogsource-btn",disabled:u,onClick:()=>{O()},children:"New form +"})]}),Te("p",{className:"sf-blogsource-hint",children:"The questions, the button text and the thank-you message all come from Storefront \u2192 Forms. Edit them there \u2014 this section updates to match."})]}):kt("div",{className:"sf-blogsource sf-formsummary",children:[c?kt("p",{className:"sf-blogsource-hint",children:["This website\u2019s forms couldn\u2019t be loaded, so there is nothing to choose from yet.",e?` This section still points at \u201C${e}\u201D, and that is unchanged.`:""]}):b&&kt("p",{className:"sf-formsummary-warn",children:["This section points at \u201C",e,"\u201D, and this website has no form with that name. Pick one from the list above, or leave it \u2014 nothing has been changed."]}),kt("div",{className:"sf-formsummary-actions",children:[c&&Te("button",{type:"button",className:"sf-blogsource-btn",disabled:u,onClick:()=>{S(!0)},children:"Try again"}),Te("button",{type:"button",className:"sf-blogsource-btn",disabled:u,onClick:()=>{O()},children:"New form +"})]}),!c&&Te("p",{className:"sf-blogsource-hint",children:"Pick a form to show here, or build a new one. Forms are made once in Storefront \u2192 Forms and can be shown on any number of pages."})]})]}):Te("div",{className:"sf-formpicker",children:Te("div",{className:"sf-blogsource sf-formsummary",children:kt("div",{children:[Te("div",{className:"sf-formsummary-caption",children:o}),kt("p",{className:"sf-blogsource-hint",children:["Forms aren\u2019t available in this editor, so there is nothing to choose here.",e?` This section still points at \u201C${e}\u201D, and that is unchanged.`:""]})]})})})}import{ColourPicker as jE}from"efficient-easel/pick";import{typedHex as XE}from"efficient-easel/pick";function Hh(e){let t=new Set,o=[];return Qr(e).themes.forEach((r,n)=>{let a=[[`Theme ${n+1} main color`,r.accent],[`Theme ${n+1} text color`,r.text],[`Theme ${n+1} background`,r.background]];for(let[l,s]of a){let i=s?XE(s):null;!i||t.has(i)||(t.add(i),o.push({name:l,value:i}))}}),o}import{jsx as Gh}from"react/jsx-runtime";function Qt({value:e,onChange:t,label:o,id:r,caption:n,ariaLabel:a}){return Gh(JE,{value:e,onChange:t,label:a??o,id:r,caption:n})}function JE({value:e,onChange:t,label:o,id:r,caption:n}){let{theme:a}=uo();return Gh(jE,{value:e,onChange:t,label:o,id:r,caption:n,theme:Hh(a)})}import{useEffect as ZE,useState as QE}from"react";import{MarkBar as eL,markSelection as tL,useCaretEdit as oL}from"efficient-easel/copy";import{RevertIcon as rL}from"efficient-easel/icons";import{Fragment as Dl,jsx as Ke,jsxs as Ml}from"react/jsx-runtime";function nL({style:e}){let t=o=>Ke("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o});switch(e){case"bold":return t(Ke("path",{d:"M7 5h6.5a3.5 3.5 0 0 1 0 7H7zm0 7h7.5a3.5 3.5 0 0 1 0 7H7z"}));case"italic":return t(Ml(Dl,{children:[Ke("line",{x1:"10",y1:"5",x2:"19",y2:"5"}),Ke("line",{x1:"5",y1:"19",x2:"14",y2:"19"}),Ke("line",{x1:"14",y1:"5",x2:"10",y2:"19"})]}));case"strike":return t(Ml(Dl,{children:[Ke("path",{d:"M16.5 6.5A4.2 4.2 0 0 0 12.7 4.7C10 4.7 8.4 6 8.4 7.9c0 1.6 1.2 2.5 3.4 3.1"}),Ke("path",{d:"M7.6 17.4A4.4 4.4 0 0 0 11.7 19.3c2.8 0 4.5-1.4 4.5-3.4 0-1-.4-1.8-1.2-2.4"}),Ke("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]}));case"highlight":return t(Ml(Dl,{children:[Ke("path",{d:"M14.5 4.5l5 5-8 8H6.5v-5z"}),Ke("line",{x1:"4",y1:"21",x2:"20",y2:"21"})]}));case"quiet":return t(Ml(Dl,{children:[Ke("path",{d:"M12 4.5l5.5 7.5L12 19.5 6.5 12z"}),Ke("line",{x1:"9.4",y1:"12",x2:"14.6",y2:"12"})]}));default:return null}}var aL=["bold","italic","strike","highlight"],lL=Object.fromEntries(aL.map(e=>[e,Ke(nL,{style:e},e)])),Wh="Clear formatting";function sL(e,t,o){return tL(e,t,o,Ix)}function iL(e){let[t,o]=QE(null);return ZE(()=>{let r=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!r)return;let n=()=>{let a=e.current;if(!a||r.activeElement!==a)return;let l=a.selectionStart??a.value.length,s=a.selectionEnd??l;o(i=>i&&i.start===l&&i.end===s?i:{start:l,end:s})};return r.addEventListener("selectionchange",n),()=>r.removeEventListener("selectionchange",n)},[e]),[t,o]}function cL({target:e,value:t,onChange:o,disabled:r=!1,label:n="Formatting"}){let a=oL({target:e,onChange:o}),[l,s]=iL(e),i=d=>a(p=>{let x=sL(t,d,p);return s({start:x.selectionStart,end:x.selectionEnd}),x}),c=xx(),f={};if(l)for(let d of c)f[d.style]=hx(t,l.start,l.end,d.style);let u=jt(t);return Ke(eL,{tools:c,onApply:i,pressed:f,disabled:r,glyphs:lL,ariaLabel:n,actions:Ke("button",{type:"button",className:"sf-markup-btn sf-markup-clear",onMouseDown:d=>d.preventDefault(),onClick:()=>o(u),disabled:r||u===t,title:Wh,"aria-label":Wh,children:Ke(rL,{size:14})})})}var df=cL;import{jsx as dL}from"react/jsx-runtime";var fL="data-sf-no-control";function Uh(){return dL("span",{[fL]:"",hidden:!0})}var zh="__noControl";function GK(e){return e?.[zh]??null}function Hl(e,t){return{...e,[zh]:t}}import{jsx as qo}from"react/jsx-runtime";function uL(e){return e==="mobile"?"mobile":"desktop"}var pL={desktop:null,tablet:"Tablet uses the desktop settings.",mobile:"Showing the phone settings for this section."},mL="data-sf-device-hidden";function Kh(){return qo("span",{hidden:!0,[mL]:""})}function xL({tier:e,render:t,...o}){let r=yc();return uL(r)===e?qo(t,{...o}):qo(Kh,{})}var $h="__device";function uf(e){return e?.[$h]??null}function $K(e){return uf(e)?.inner??e}function wt(e,t){let o=t.render,r=n=>qo(xL,{tier:e,render:o,...n});return{...t,[$h]:{tier:e,inner:t},render:r}}function gL(){let e=pL[yc()];return e?qo("div",{className:"sf-device-scope",children:e}):qo(Kh,{})}function VK(){return Hl({type:"custom",render:()=>qo(gL,{})},"always")}function Hn(e){return`${e}Phone`}function Gl(e,t,o){return typeof e=="number"?e:typeof t=="number"?t:o}import{createContext as IL,useContext as hL}from"react";import{Fragment as yL,jsx as pf}from"react/jsx-runtime";var Vh=IL(!1);function QK({children:e}){return pf(Vh.Provider,{value:!0,children:e})}function bL(){return hL(Vh)}function qh({name:e,children:t}){return!bL()||!e||Sn(e)?pf(yL,{children:t}):pf(Uh,{})}var mf="Enter",SL="Escape",CL=/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)$/,PL=/(px|%)$/i;function kL(e,t,o,r){let n=e.trim().replace(/\s+/g,"").replace(PL,"");if(!CL.test(n))return null;let a=Number(n);if(!Number.isFinite(a))return null;let l=Math.min(o,Math.max(t,a));if(!(r>0))return l;let s=t+Math.round((l-t)/r)*r,i=Math.min(o,Math.max(t,s));return Number(i.toFixed(4))}function xf(e,t,o,r,n){return e===mf?{handled:!0,editing:!1,commit:kL(t,o,r,n)}:e===SL?{handled:!0,editing:!1,commit:null}:{handled:!1,editing:!0,commit:null}}import{useRef as Xh,useState as TL}from"react";import{ChevronIcon as wL}from"efficient-easel/icons";import{jsx as Gt,jsxs as Yh}from"react/jsx-runtime";function gf({styleKey:e,label:t,icon:o,value:r,sampleStyle:n,open:a,onToggle:l,saved:s=!1,children:i}){return Yh("div",{"data-sf-style-row":e,className:`sf-style-row${a?" is-open":""}`,children:[Yh("button",{type:"button",className:"sf-style-head","aria-expanded":a,onClick:l,children:[Gt("span",{className:"sf-style-caret","aria-hidden":"true",children:Gt(wL,{size:13})}),o?Gt("span",{className:"es-field-icon",children:o}):null,Gt("span",{className:"sf-style-name",children:t}),r!=null?Gt("span",{className:"sf-style-sample",style:n,title:typeof r=="string"?r:void 0,children:r}):null,Gt("span",{className:`sf-style-slot${s?" is-saved":""}`,children:Gt(vL,{})})]}),a&&Gt("div",{className:"sf-style-body",children:i})]})}function vL(){return Gt("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:Gt("polyline",{points:"20 6 9 17 4 12"})})}import{Fragment as RL,jsx as Wt,jsxs as If}from"react/jsx-runtime";function hf({label:e,value:t,onChange:o,image:r}){let[n,a]=TL(!1),l=Xh(null),s=Xh(!1),{x:i,y:c}=Xc(t),f=(g,I)=>{let h=l.current?.getBoundingClientRect();if(!h)return;let C=xh(h,g,I);o(Br(C.x,C.y))},u=g=>{let I=mh(t,g.key,g.shiftKey);I!==null&&(g.preventDefault(),o(I))},d=g=>{g.currentTarget.setPointerCapture?.(g.pointerId),s.current=!0,f(g.clientX,g.clientY)},p=g=>{s.current&&f(g.clientX,g.clientY)},x=()=>{s.current=!1};return Wt(gf,{styleKey:"imageFocal",label:e,value:t,sampleStyle:{fontSize:11,fontVariantNumeric:"tabular-nums"},open:n,onToggle:()=>a(g=>!g),children:n?Wt("div",{className:"sf-focus","data-sf-focusing":"",children:r?If(RL,{children:[Wt("button",{type:"button",className:"sf-focus-canvas","aria-label":`${e}: ${t}. Use the arrow keys to move the point.`,onKeyDown:u,onPointerDown:d,onPointerMove:p,onPointerUp:x,onPointerCancel:x,onLostPointerCapture:x,children:If("span",{className:"sf-focus-pane",ref:l,children:[Wt("img",{className:"sf-focus-img",src:r,alt:"",draggable:!1}),Wt("span",{className:"sf-focus-cross sf-focus-cross--h",style:{top:`${c}%`}}),Wt("span",{className:"sf-focus-cross sf-focus-cross--v",style:{left:`${i}%`}}),Wt("span",{className:"sf-focus-marker",style:{left:`${i}%`,top:`${c}%`}})]})}),If("div",{className:"sf-focus-bar",children:[Wt("span",{className:"sf-focus-hint",children:"Press the picture, or nudge the point with the arrow keys."}),Wt("button",{type:"button",className:"sf-image-btn",onClick:()=>a(!1),children:"Done"})]})]}):Wt("p",{className:"sf-field-hint",children:"Choose a background image first \u2014 there\u2019s nothing to focus yet."})}):null})}import{SettingsField as Zh}from"efficient-easel/panel";import{ImageIcon as Qh,PlayIcon as eb}from"efficient-easel/icons";import{ImageBox as FL}from"efficient-easel/pick";import{useContext as EL,useState as tb}from"react";import{FileIntakeAlert as LL,useFileIntake as _L}from"efficient-shell/file-intake";var jh={"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 Jh(e,t){let o=jh[e][t];return{maxSizeBytes:o.max_bytes,maxFiles:o.max_files,accept:o.accept==="*"||o.accept==="*/*"?void 0:o.accept,acceptHint:o.hint}}import{jsx as vt,jsxs as ob}from"react/jsx-runtime";var AL=Jh("POST /api/storefront/media/","file");function bf({value:e,onChange:t,label:o,accept:r,placeholder:n}){let a=fo(),[l,s]=tb(!1),[i,c]=tb(null),f=r.startsWith("video"),u=EL(Po),d=_L({accept:r,maxSizeBytes:AL.maxSizeBytes,acceptHint:f?"videos only":"images only",multiple:!1,disabled:l,onAccept:([x])=>{c(null),s(!0),Us(a,{accept:r,title:o,file:x}).then(g=>{g&&t(g.url)}).catch(()=>c("Couldn\u2019t open the media picker \u2014 please try again.")).finally(()=>s(!1))}}),p=()=>(d.clearRejections(),c(null),Us(a,{accept:r,title:o}).then(x=>x?.url??null));return u&&!u.capabilities.mediaEditing?vt(Zh,{label:o,icon:f?vt(eb,{}):vt(Qh,{}),children:ob("div",{className:"sf-image-slot-inert",children:["Templates don\u2019t store ",f?"videos":"images"," \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."]})}):ob("div",{children:[vt(Zh,{label:o,icon:f?vt(eb,{}):vt(Qh,{}),children:vt("div",{className:`sf-image-drop${d.dragOver?" is-dragover":""}`,...d.zoneProps,children:vt(FL,{value:e,onChange:t,label:o,kind:f?"video":"image",placeholder:n,openLibrary:l?void 0:p})})}),l&&vt("div",{className:"sf-image-status",role:"status",children:"Opening the picker\u2026"}),i&&vt("div",{className:"sf-image-status sf-image-status--error",role:"alert",children:i}),vt(LL,{rejections:d.rejections,className:"sf-image-status sf-image-status--error"})]})}import{useEffect as OL,useId as NL,useRef as rb,useState as BL}from"react";import{jsx as Yo,jsxs as yf}from"react/jsx-runtime";function Sf({label:e,options:t,value:o,onChange:r,emptyLabel:n="None"}){let[a,l]=BL(!1),s=rb(null),i=rb(null),c=NL(),f=Array.isArray(o)?o:[];OL(()=>{if(!a)return;let p=x=>{s.current&&!s.current.contains(x.target)&&l(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[a]);let u=(p,x)=>{let g=t.map(I=>I.value).filter(I=>I===p?x:f.includes(I));r(g)},d=t.filter(p=>f.includes(p.value)).map(p=>p.label).join(", ");return yf("div",{className:"sf-field sf-multi",ref:s,children:[Yo("div",{className:"sf-field-label",id:`${c}-label`,children:e}),yf("button",{ref:i,type:"button",className:"sf-multi-btn","aria-expanded":a,"aria-controls":c,"aria-labelledby":`${c}-label ${c}-value`,onClick:()=>l(p=>!p),onKeyDown:p=>{p.key==="Escape"&&a&&(p.preventDefault(),l(!1))},children:[Yo("span",{id:`${c}-value`,className:`sf-multi-value${d?"":" is-empty"}`,children:d||n}),Yo("span",{className:"sf-multi-caret","aria-hidden":"true",children:"\u25BE"})]}),a&&Yo("div",{className:"sf-multi-menu",id:c,role:"group","aria-labelledby":`${c}-label`,onKeyDown:p=>{p.key==="Escape"&&(p.preventDefault(),l(!1),i.current?.focus())},children:t.map(p=>yf("label",{className:"sf-multi-option",children:[Yo("input",{type:"checkbox",checked:f.includes(p.value),onChange:x=>u(p.value,x.target.checked)}),Yo("span",{children:p.label}),p.note?Yo("span",{className:"sf-note","aria-hidden":"true",children:p.note}):null]},p.value))})]})}import{useCallback as r_,useContext as n_,useEffect as a_,useId as pb,useRef as db,useState as ub}from"react";import{ThemeIcon as l_}from"efficient-easel/icons";import{SettingsField as s_}from"efficient-easel/panel";import{SettingsField as kf,SettingsGroupSub as zL}from"efficient-easel/panel";import{SettingsField as DL}from"efficient-easel/panel";import{AccentIcon as ML}from"efficient-easel/icons";import{jsx as Xo,jsxs as nb}from"react/jsx-runtime";function Cf(e){return no(e).background}function HL(e){let t=ao(e.accent,Cf(e));return t===null?null:{ratio:t,grade:nr(t)}}function GL(e){let t=Cf(e),o=ao(e.accent,t);return o===null?[]:Dd(e.accent).filter(r=>{let n=ao(r,t);return n!==null&&n>o&&nr(n)==="good"})}var WL={good:"Easy to read","large-only":rr["large-only"],hard:rr.hard};function Pf({value:e,onChange:t}){let o=HL(e),r=o?.grade,n=o&&o.grade!=="good"?GL(e):[];return Xo(DL,{label:"Main color",icon:Xo(ML,{}),hint:o?WL[o.grade]:void 0,action:Xo(Qt,{value:e.accent,onChange:a=>t({...e,accent:a}),label:"Main color"}),children:n.length>0?Xo("div",{className:"w-full min-w-0",children:nb("div",{className:"sf-readability",children:[Xo("p",{className:"sf-readability-advice",children:UL(r,!0)}),Xo("div",{className:"sf-readability-suggestions",children:n.map(a=>{let l=ao(a,Cf(e));return nb("button",{type:"button",className:"sf-readability-suggestion",onClick:()=>t({...e,accent:a}),title:`Use ${a.toUpperCase()}`,children:[Xo("span",{className:"sf-readability-chip",style:{background:a},"aria-hidden":!0}),l?`${l.toFixed(1)}:1`:a.toUpperCase()]},a)})})]})}):null})}function UL(e,t){return e?e==="good"?"This color reads clearly on your pages.":t?"This color is hard to read on this theme's page. The buttons below are the same hue, darkened.":"This color is hard to read on your page background. Pick one further from it \u2014 lighter if your pages are dark, deeper if they are light.":"Pick a color to see how it reads."}import{ButtonIcon as KL,GroundIcon as $L,LayoutIcon as VL,SquareIcon as qL,TextSmallIcon as YL,TypeIcon as ab}from"efficient-easel/icons";import{Fragment as QL,jsx as U,jsxs as vo}from"react/jsx-runtime";var Gn=e=>`Theme ${e+1}`;function lb({colors:e}){let t=no(e),o=ds(e)??t.accent;return vo("span",{className:"sf-theme-page",style:{background:t.background,color:t.text},"aria-hidden":!0,children:[U("span",{className:"sf-theme-eyebrow",style:{color:t.muted},children:"label"}),vo("span",{className:"sf-theme-headline",children:["Heading ",U("span",{style:{color:t.accent},children:"accent"})]}),U("span",{className:"sf-theme-body",children:"body text"}),vo("span",{className:"sf-theme-row",children:[U("span",{className:"sf-theme-btn",style:{background:o,color:us(e,t.accent)},children:"button"}),U("span",{className:"sf-theme-mini",style:{background:t.surface,borderColor:t.line},children:"card"})]})]})}var wf={"Text color":U(ab,{}),"Label color":U(YL,{}),Background:U($L,{}),"Panels & cards":U(VL,{}),Borders:U(qL,{}),"Button color":U(KL,{}),"Button text color":U(ab,{})};function XL({label:e,colorKey:t,value:o,onChange:r,idPrefix:n="sf-theme-ink"}){let a=`${n}-${t}`;return U(kf,{label:e,icon:wf[e],htmlFor:a,action:U(Qt,{id:a,label:e,value:o,onChange:l=>r(t,l)})})}function jL({value:e,accent:t,onChange:o,idPrefix:r="sf-theme-ink"}){let n=`${r}-button`,a=/^#[0-9a-fA-F]{6}$/.test(e??""),l=a?e:t;return U(kf,{label:"Button color",icon:wf["Button color"],htmlFor:n,action:U(Qt,{id:n,label:"Button color",value:l,caption:a?l:"Main",onChange:o})})}function JL({colors:e,accent:t,onChange:o,idPrefix:r="sf-theme-ink"}){let n=`${r}-button-ink`,a=Md(e),l=us(e,t),s=ds(e)??t,i=nr(ao(l,s)??0);return U(kf,{label:"Button text color",icon:wf["Button text color"],hint:a&&i!=="good"?`${rr[i]} on the button`:void 0,htmlFor:n,action:U(Qt,{id:n,label:"Button text color",value:l,caption:a?l:"Auto",onChange:o})})}var ZL=[{colour:!0},{label:"Text color",key:"text"},{label:"Label color",key:"muted"},{button:!0},{buttonInk:!0},{group:"Surfaces"},{label:"Background",key:"background"},{label:"Panels & cards",key:"surface"},{label:"Borders",key:"line"}];function vf({colors:e,onChange:t,idPrefix:o}){let r=no(e);return U(QL,{children:ZL.map(n=>"colour"in n?U(Pf,{value:e,onChange:t},"colour"):"group"in n?U(zL,{title:n.group},n.group):"button"in n?U(jL,{value:e.button,accent:r.accent,onChange:a=>t({...e,button:a}),idPrefix:o},"button"):"buttonInk"in n?U(JL,{colors:e,accent:r.accent,onChange:a=>t({...e,buttonInk:a}),idPrefix:o},"buttonInk"):U(XL,{label:n.label,colorKey:n.key,value:r[n.key],onChange:(a,l)=>t({...e,[a]:l}),idPrefix:o},n.key))})}function sb({index:e,colors:t,selected:o,role:r="radio",open:n,editable:a=!0,onPick:l,onEdit:s,onChangeColors:i}){let c=no(t),f=Gn(e),u=e<fs.length&&!t.brandInk?fs[e]:null,d=nr(ao(c.text,c.background)??0),p=u?JSON.stringify(t)!==JSON.stringify(u):!1,x=n!==void 0;return vo("div",{className:`sf-theme-card${o?" is-selected":""}`,children:[U("button",{type:"button",role:r,"aria-checked":r==="radio"?o:void 0,"aria-selected":r==="option"?o:void 0,"aria-label":f,className:"sf-theme-pick",onClick:l,children:U(lb,{colors:t})}),vo("div",{className:"sf-theme-foot",children:[U("span",{className:"sf-theme-name",children:f}),d!=="good"&&U("span",{className:"sf-theme-warn",children:rr[d]}),a&&s&&U("button",{type:"button",className:`sf-theme-edit${n?" is-open":""}`,"aria-expanded":x?n:void 0,"aria-controls":x?`sf-theme-colours-${e}`:void 0,"aria-label":`${n?"Done":"Edit"} ${f}`,onClick:s,children:n?"Done":"Edit"})]}),n&&vo("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[U(vf,{colors:t,onChange:g=>i?.(g)}),u&&U("button",{type:"button",className:"sf-theme-reset",disabled:!p,onClick:()=>i?.({...u}),children:p?`Reset ${f} to the preset`:"Not changed"})]})]})}function ib({colors:e,name:t,nameId:o,open:r,menuId:n,labelId:a,buttonRef:l,onClick:s,onKeyDown:i,onEdit:c}){return vo("div",{className:"sf-secttheme-btn",children:[U("button",{ref:l,type:"button",className:"sf-theme-pick","aria-expanded":r,"aria-controls":n,"aria-labelledby":`${a} ${o}`,onClick:s,onKeyDown:i,children:e?U(lb,{colors:e}):U("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),vo("div",{className:"sf-theme-foot",children:[U("span",{id:o,className:"sf-theme-name",children:t}),c&&U("button",{type:"button",className:"sf-theme-edit","aria-label":`Edit ${t}`,onClick:c,children:"Edit"}),U("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:s,children:U("span",{className:"sf-multi-caret",children:"\u25BE"})})]})]})}import{useCallback as Tf,useEffect as e_,useRef as Wl}from"react";function cb(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function t_(e,t=oe.updateThemeSettings){let{themeFromDocument:o,token:r,siteId:n,patch:a}=e,l=cb({themeFromDocument:o,token:r});if(l)return l;if(Object.keys(a).length===0)return{status:"skipped",reason:"empty"};try{return await t(a,r,n??void 0),{status:"saved"}}catch(s){return{status:"failed",error:s}}}function fb({themeFromDocument:e,tokenRef:t,siteId:o,onResult:r}){let n=Wl(null),a=Wl({}),l=Wl(r);l.current=r;let s=Wl(null),i=Tf(u=>{if(u.status==="skipped"){let d=`skipped:${u.reason}`;if(s.current===d)return;s.current=d}else s.current=null;l.current?.(u)},[]),c=Tf(async()=>{n.current&&(clearTimeout(n.current),n.current=null);let u=a.current;a.current={};let d=await t_({themeFromDocument:e,token:t?.current,siteId:o,patch:u});return i(d),d},[e,t,o,i]),f=Tf((u,d=!1)=>{let p=cb({themeFromDocument:e,token:t?.current});if(p){i(p);return}a.current={...a.current,...u},n.current&&clearTimeout(n.current),d?c():n.current=setTimeout(()=>{c()},500)},[e,t,c,i]);return e_(()=>()=>{c()},[c]),{persist:f,flush:c}}import{Fragment as p_,jsx as Re,jsxs as jo}from"react/jsx-runtime";var i_="Follow the page",Q8="Follow the slideshow",c_=e=>`Editing ${e} changes it everywhere.`;function f_({colors:e}){if(!e)return Re("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let t=no(e);return jo("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[Re("i",{style:{background:t.background}}),Re("i",{className:"sf-secttheme-chip-accent",style:{background:t.accent}})]})}function d_({themes:e,value:t,onPick:o,onEdit:r,menuId:n,followLabel:a}){return jo("div",{className:"sf-multi-menu sf-secttheme-menu",id:n,role:"listbox",children:[a!==void 0&&jo(p_,{children:[jo("button",{type:"button",role:"option","aria-selected":t===null,className:`sf-secttheme-item${t===null?" is-active":""}`,onClick:()=>o(-1),children:[Re(f_,{}),Re("span",{className:"sf-secttheme-name",children:a})]}),Re("div",{className:"sf-secttheme-sep",role:"presentation"})]}),t!==null&&e[t]&&Re("p",{className:"sf-secttheme-oncard",role:"presentation",children:`${Gn(t)} is on this section`}),e.map((l,s)=>s===t?null:Re(sb,{role:"option",index:s,colors:l,selected:!1,onPick:()=>o(s),onEdit:()=>r(s)},s))]})}function u_({index:e,colors:t,onChange:o,onDone:r}){let n=Gn(e),a=pb();return jo("div",{className:"sf-secttheme-sheet",children:[jo("div",{className:"sf-secttheme-sheet-head",children:[Re("span",{children:n}),Re("button",{type:"button",className:"sf-secttheme-done",onClick:r,children:"Done"})]}),Re("div",{className:"sf-secttheme-rows",children:Re(vf,{colors:t,onChange:o,idPrefix:a})}),Re("p",{className:"sf-secttheme-warn",children:c_(n)})]})}function Rf({value:e,onChange:t,followLabel:o}){let{theme:r,setTheme:n}=uo(),a=Qr(r),l=n_(Po),s=l?.tokenRef,i=l?.siteId??null,c=!l?.capabilities?.hasSiteTheme,{persist:f,flush:u}=fb({themeFromDocument:c,tokenRef:s,siteId:i}),d=Qr(a),p=d.themes,x=zd(e),g=x!==null?p[x]:void 0,I=g??(p.length?Bd(d):void 0),[h,C]=ub(!1),[S,P]=ub(null),T=db(null),b=db(null),w=pb(),O=r_(()=>{C(!1),P(null)},[]);a_(()=>{if(!h&&S===null)return;let L=G=>{T.current&&!T.current.contains(G.target)&&(u(),O())};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[h,S,O,u]);let D=L=>{t(L),O()},R=L=>{if(S===null)return;let G=p.map((M,v)=>v===S?L:M),Y={...d,themes:G};n(Y),f({selected_preset:Y.selected,theme_presets:Y.themes})};return jo("div",{className:"sf-secttheme",ref:T,children:[Re(s_,{label:"Theme",icon:Re(l_,{}),labelId:`${w}-label`,children:Re(ib,{colors:I,onEdit:x!==null?()=>{P(x),C(!1)}:void 0,name:g?Gn(x):o??i_,nameId:`${w}-value`,labelId:`${w}-label`,open:h,menuId:w,buttonRef:b,onClick:()=>{P(null),C(L=>!L)},onKeyDown:L=>{L.key==="Escape"&&(h||S!==null)&&(L.preventDefault(),O())}})}),h&&S===null&&Re("div",{onKeyDown:L=>{L.key==="Escape"&&(L.preventDefault(),O(),b.current?.focus())},children:Re(d_,{themes:p,value:x,onPick:D,onEdit:L=>{P(L),C(!1)},menuId:w,followLabel:o})}),S!==null&&p[S]&&Re(u_,{index:S,colors:p[S],onChange:R,onDone:()=>{u(),O(),b.current?.focus()}})]})}import{SettingsField as y_}from"efficient-easel/panel";import{LinkIcon as S_}from"efficient-easel/icons";import{useEffect as Sb,useRef as C_,useState as zl}from"react";var Ff=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"custom",label:"Custom URL"}];function Ef(e){return e.offersCommerce&&e.offersService?Ff:Ff.filter(t=>!t.needs||(t.needs==="commerce"?e.offersCommerce:e.offersService))}function Jo(e){return e===dt?"/":`/${e}`}function Lf(e){return`/journal/${e}`}function _f(e){return`/wheels/${e}`}function Ul(e,t){return`${Jo(e)}#${t}`}function mb(e){return Sa(e)}function m_(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function Af(...e){let t=new Set,o=[];for(let r of e)for(let n of r?.content??[]){let a=m_(n?.props?.anchor);if(!a)continue;let l=mb(a);!l||t.has(l)||(t.add(l),o.push({slug:l,name:a}))}return o}var xb="/wheels";var s$=[bo,...Object.entries(yt).filter(([e])=>e!=="tyreSizes").map(([,e])=>e)];function u$(){return xb}function x_(e){return(e.layout?.content??[]).some(o=>o?.type===zo)}function gb(e){return e.filter(x_).map(t=>Jo(t.slug))}function Of(e){let t=e.indexOf("#"),o=t===-1?"":e.slice(t),r=t===-1?e:e.slice(0,t),n=r.indexOf("?");return{path:n===-1?r:r.slice(0,n),params:new URLSearchParams(n===-1?"":r.slice(n+1)),hash:o}}function Ib(e){return Of(e).path}function hb(e){return Of(e).params.get(bo)||null}function bb(e,t){let{path:o,params:r,hash:n}=Of(e);t?r.set(bo,t):r.delete(bo);let a=r.toString();return`${o}${a?`?${a}`:""}${n}`}function yb(e,t){if(!e)return"page";if(e.startsWith("/journal/"))return"blog";if(e.startsWith("/wheels/"))return"product";if(e.includes("#")){let o=e.slice(0,e.indexOf("#"));if(o===""||o==="/"||t.includes(o))return"anchor"}return e==="/"||t.includes(e)?"page":"custom"}import{SettingsField as g_}from"efficient-easel/panel";import{CategoryIcon as I_}from"efficient-easel/icons";import{Fragment as h_,jsx as Wr,jsxs as b_}from"react/jsx-runtime";function Nf({value:e,onChange:t}){let o=hb(e),r=o&&!ho.some(n=>n===o)?o:null;return Wr(g_,{label:"Product type",icon:Wr(I_,{}),hint:Wr(h_,{children:"The same page can sit in the menu more than once, each entry opening it on a different type."}),children:b_("select",{value:o??"",onChange:n=>t(bb(e,n.target.value||null)),"aria-label":"Product type this link opens the listing on",children:[Wr("option",{value:"",children:Am}),ho.map(n=>Wr("option",{value:n,children:Do[n]},n)),r&&Wr("option",{value:r,children:`${r} (unavailable)`})]})})}import{jsx as gt,jsxs as Kl}from"react/jsx-runtime";function Cb(e){let t=new Map;return(o="")=>{let r=dr(),n=t.get(o);if(!n||n.token===null&&r!==null){let a=r?e(r,o).catch(()=>[]):Promise.resolve([]);return t.set(o,{promise:a,token:r}),a}return n.promise}}var P_=Cb((e,t)=>oe.listPages(e,t||void 0)),k_=Cb((e,t)=>oe.listBlogPosts(e,{visibleOnly:!0,siteId:t||void 0}));function Bf(e,t){return e&&!t.some(o=>o.value===e)?[{value:e,label:`${e} (unavailable)`},...t]:t}function Df({value:e,onChange:t,label:o="Link"}){let r=typeof e=="string"?e:"",{siteId:n,capabilities:a}=tI(),{offersCommerce:l,offersService:s}=a,i=Ef({offersCommerce:l,offersService:s}),[c,f]=zl([]),[u,d]=zl([]),[p,x]=zl([]),[g,I]=zl(null),h=C_(!0);Sb(()=>(h.current=!0,()=>{h.current=!1}),[]),Sb(()=>{let v=!0;return P_(n??void 0).then(j=>v&&h.current&&f(j)),s&&k_(n??void 0).then(j=>v&&h.current&&d(j)),l&&No().then(j=>v&&h.current&&x(j)),()=>{v=!1}},[n,l,s]);let C=c.map(v=>Jo(v.slug)),S=g??yb(r,C),P=i.some(v=>v.value===S)?S:"custom",T=l&&P==="page"&&gb(c).includes(Ib(r)),b=v=>{I(v),v!=="custom"&&t("")},w=c.filter(v=>!on(v.slug)),O=Bf(r,w.map(v=>({value:Jo(v.slug),label:rn(v)}))),D=Bf(r,u.map(v=>({value:Lf(v.slug),label:v.title||v.slug}))),R=Bf(r,p.map(v=>({value:_f(v.slug),label:v.name}))),L=(v,j)=>Kl("select",{value:r,onChange:F=>t(F.target.value),children:[gt("option",{value:"",children:j}),v.map((F,E)=>gt("option",{value:F.value,children:F.label},`${F.value}:${E}`))]}),G=w.map(v=>({page:v,anchors:Af(v.layout)})).filter(v=>v.anchors.length>0),Y=G.flatMap(v=>v.anchors.map(j=>Ul(v.page.slug,j.slug))),M=Kl("select",{value:r,onChange:v=>t(v.target.value),children:[gt("option",{value:"",children:G.length?"Select a section\u2026":"No section anchors yet"}),r&&!Y.includes(r)&>("option",{value:r,children:`${r} (unavailable)`}),G.map(v=>gt("optgroup",{label:rn(v.page),children:v.anchors.map(j=>{let F=Ul(v.page.slug,j.slug);return gt("option",{value:F,children:j.name},F)})},v.page.id))]});return Kl("div",{children:[gt(y_,{label:o,icon:gt(S_,{}),children:Kl("div",{className:"sf-linkstack",children:[gt("select",{"aria-label":"Link type",value:P,onChange:v=>b(v.target.value),children:i.map(v=>gt("option",{value:v.value,children:v.label},v.value))}),P==="page"&&L(O,"Select a page\u2026"),P==="anchor"&&M,P==="blog"&&L(D,"Select a blog post\u2026"),P==="product"&&L(R,"Select a product\u2026"),P==="custom"&>("input",{type:"text",value:r,placeholder:"Link (e.g. /wheels or https://\u2026)",onChange:v=>t(v.target.value)})]})}),T&>(Nf,{value:r,onChange:t})]})}var Tt={min:10,max:200,step:10};function Pb(e,t){let o=typeof e=="number"?e:void 0,r=typeof t=="number"?t:void 0;if(!(o===void 0&&r===void 0))return{paddingTop:o,paddingBottom:r}}var w_="sf-pad-top-phone",v_="sf-pad-bottom-phone",T_="--sf-pad-t-phone",R_="--sf-pad-b-phone",F_="sf-pad-left-phone",E_="sf-pad-right-phone",L_="--sf-pad-l-phone",__="--sf-pad-r-phone";function O$(e,t,o,r,n,a,l,s){let i=Pb(e,t)??{},c={},f=["sf-section-pad"];typeof o=="number"&&(f.push(w_),c[T_]=`${o}px`),typeof r=="number"&&(f.push(v_),c[R_]=`${r}px`);let u={};return typeof n=="number"&&(u.paddingLeft=n),typeof a=="number"&&(u.paddingRight=a),typeof l=="number"&&(f.push(F_),c[L_]=`${l}px`),typeof s=="number"&&(f.push(E_),c[__]=`${s}px`),f.length===1&&Pb(e,t)===void 0&&!Object.keys(u).length?null:{className:f.join(" "),style:{...i,...u,...c}}}var kb=e=>typeof e=="number"?e:void 0;function wb(e,t,o){let r=kb(e)??o,n=kb(t);return r===void 0?n:n===void 0?r:r+n}function N$(e,t={}){return{top:wb(e.padTop,e.sectionPaddingTop,t.top),bottom:wb(e.padBottom,e.sectionPaddingBottom,t.bottom)}}var A_=["auto","fixed","screen"],O_=["px","%"];var N_="var(--sf-header-h, 88px)",Mf={min:40,max:2e3,step:10,fallback:600},Hf={min:10,max:200,step:5,fallback:100},B_="sf-section-minh",vb={base:"--sf-section-minh",small:"--sf-section-minh-s"},Rb=e=>typeof e=="string"&&A_.includes(e),D_=e=>typeof e=="string"&&O_.includes(e);function $l(e){let t=Rb(e.sectionHeightMode)?e.sectionHeightMode:"auto",o=t==="screen"?"%":D_(e.sectionHeightUnit)?e.sectionHeightUnit:"px",r=t==="screen"?Hf.fallback:Mf.fallback,n=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:r;return{mode:t,value:n,unit:o}}function Fb(e){let{mode:t,value:o,unit:r}=$l(e);if(t==="auto")return;if(t==="fixed"&&r==="px")return[`${o}px`,null];let n=o/100,a=l=>t==="screen"?`(100${l} - ${N_})`:`100${l}`;return[`calc(${a("vh")} * ${n})`,`calc(${a("svh")} * ${n})`]}function M_(e){let t=Fb(e);if(!t)return;let[o,r]=t;return{display:"grid",[vb.base]:o,...r?{[vb.small]:r}:{}}}var D$=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),Ur="Height",H_="sf-section-minh-phone",Tb={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function Gf(e){return Rb(e.sectionHeightModePhone)}function M$(e){return $l({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function G_(e){let t=M_(e),o=Gf(e)?Fb({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone}):void 0;if(!t&&!o)return null;let r=[B_],n={...t??{}};return o&&(r.push(H_),n[Tb.base]=o[0],o[1]&&(n[Tb.small]=o[1])),{className:r.join(" "),style:n}}function H$(e){return G_(e)!==null}var W$=["desktop","tablet","mobile"],zr={desktop:"Desktop",tablet:"Tablet",mobile:"Mobile"},W_=720,U_=1100;function U$(e){return e>=U_?"desktop":e>=W_?"tablet":"mobile"}var z_=["column","row","tabs"],Eb="Direction",K_={column:"Stacked",row:"One row",tabs:"Tabs"},Lb={Flex:z_,HeroGroup:["column","row"]},$_={Flex:"row",HeroGroup:"column"},V_={column:"flex-col",row:"flex-row",tabs:"flex-col"};function Vl(e,t){return Lb[e].includes(t)?t:$_[e]}function K$(e,t){return V_[Vl(e,t)]}function _b(e){return Lb[e].map(t=>({label:K_[t],value:t}))}var Wf=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],Nb=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Stretch",value:"stretch"}],Bb="Wrap",Uf=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],Ab={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},Ob={start:"items-start",center:"items-center",stretch:"items-stretch"};function V$(e,t){let o=typeof e=="string"&&e in Ab?Ab[e]:"",r=typeof t=="string"&&t in Ob?Ob[t]:"";return[o,r].filter(Boolean).join(" ")}function q$(e){return e===!0||e==="wrap"?"flex-wrap":""}var zf="Block widths",ql=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]}],Wn="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",q_={equal:Wn,bigLeft:`${Wn} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${Wn} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${Wn} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${Wn} [&>*:last-child]:min-[800px]:grow-[3]`};function Y$(e){return typeof e=="string"?q_[e]??"":""}var Db="Columns on phone",Kf=1,Mb=3,Y_={2:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]",3:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]"};function X$(e){let t=Number(e);return Y_[t]??"max-[800px]:flex-col"}var Hb="Block spacing",$f=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],X_="sf-box-gap-only";function j$(e){return e==="gap"?X_:""}var Gb=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],Wb={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Yl="var(--section-bg)",Xl="inherit";function Z$(e,t){return e===Xl?Yl:e===void 0?t:e}function Ub(e,t){return e===Xl?!0:e===void 0&&t===Yl}var zb="inherit",jl="fixed",Kb=e=>typeof e!="number"&&e!==jl,j_="var(--sf-heading-max, 9999px)";function eV(e,t,o,r){if(typeof e=="number")return`${e}px`;if(e===jl)return t;let n=r?`var(--size-${r}, ${t})`:t;return o==="heading"?`min(${n}, ${j_})`:n}var J_=["contained","page","full"],$b=["full","page"],Vb={full:"Full width",page:"Content width"},Vf="inherit",Z_=e=>typeof e=="string"&&J_.includes(e),Q_=e=>e===Vf;function qf(e,t){let o=typeof e.pageWidth=="number"?e.pageWidth:Qn.default;return Q_(e.widthMode)?{mode:"full",pageWidth:o,inherited:!0}:e.widthMode==="contained"?{mode:"page",pageWidth:o,inherited:!1}:Z_(e.widthMode)?{mode:e.widthMode,pageWidth:o,inherited:!1}:e.contained===!0?{mode:"page",pageWidth:o,inherited:!1}:typeof e.fullWidth=="boolean"?{mode:e.fullWidth?"full":"page",pageWidth:o,inherited:!1}:e.contained===!1?{mode:"full",pageWidth:o,inherited:!1}:{mode:t,pageWidth:o,inherited:t==="full"}}function Yf(e){return qf(e,"page").mode==="full"}import{createContext as eA,useContext as tA}from"react";import{jsx as nA}from"react/jsx-runtime";var oA=2,rA=oA+1,qb=eA(2);function aV({tier:e,children:t}){return nA(qb.Provider,{value:e,children:t})}function Xf(e){let t=tA(qb);return rA+Math.max(0,e-t)}import{withStyleKind as HA}from"efficient-easel/style-clipboard";import{Fragment as eo,jsx as m,jsxs as Ce}from"react/jsx-runtime";function Un(e){for(let[t,o]of Object.entries(e))o&&typeof o=="object"&&!qr(o)&&HA(o,`section:${t}`);return e}function ry(){return null}function GA(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return m(ry,{},e)}function WA(e){return e.type===ry}function Zl(e){return WA(e)?void 0:e}function Ro({inherited:e,source:t,detail:o,onReset:r,onOptOut:n,optOutTitle:a,label:l}){if(e){let i=o?`Following the ${t.toLowerCase()} setting \u2014 ${o}`:`Following the ${t.toLowerCase()} setting`;if(!n)return Ce("span",{className:"sf-inherit",title:o?i:void 0,children:["Inherits \xB7 ",t]});let c=`${i}. ${a??`Click to keep ${l} at this section's own size instead`}`;return Ce("button",{type:"button",className:"sf-inherit sf-inherit--following",onClick:n,title:c,"aria-label":c,children:["Inherits \xB7 ",t,m("span",{className:"sf-inherit-revert","aria-hidden":"true",children:"\u21F1"})]})}let s=`Reset ${l} to follow the ${t.toLowerCase()} setting${o?` (${o})`:""}`;return Ce("button",{type:"button",className:"sf-inherit sf-inherit--over",onClick:r,title:s,"aria-label":s,children:["Overridden",m("span",{className:"sf-inherit-revert","aria-hidden":"true",children:"\u21BA"})]})}function UA(){let{appState:e}=$r(n=>n),t=e.data.root?.props??{},{mode:o,pageWidth:r}=qf(t,"full");return o==="page"?`Page width \u2014 ${r}px`:o==="contained"?"Page width \u2014 Contained":"Page width \u2014 Full"}function zA(){let{blockGap:e}=uo();return e===null?"Site block gap \u2014 not set, so this container keeps its own spacing":`Site block gap \u2014 ${e}px`}function KA({inherited:e,onReset:t,label:o}){return m(Ro,{inherited:e,source:"Site",detail:zA(),onReset:t,label:o})}function $A({inherited:e,onReset:t,label:o}){return m(Ro,{inherited:e,source:"Page",detail:UA(),onReset:t,label:o})}function VA(){return Ce("svg",{className:"sf-field-type",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,"aria-hidden":"true",children:[m("polyline",{points:"4 7 4 4 20 4 20 7"}),m("line",{x1:"9",x2:"15",y1:"20",y2:"20"}),m("line",{x1:"12",x2:"12",y1:"4",y2:"20"})]})}function Qo({value:e,onChange:t,label:o,placeholder:r,hint:n,multiline:a,hideable:l=!0,markup:s=!0}){let{text:i,hidden:c}=Jt(e),f=Zf(null),u=Zf(null),d=g=>t(l?{text:g,hidden:c}:g),p=()=>t({text:i,hidden:!c});return Ce("div",{className:`sf-field${l&&c?" is-hidden":""}`,children:[Ce("div",{className:"sf-field-head",children:[m(VA,{}),m("span",{className:"sf-field-label sf-field-label--inline",children:o}),l&&m("button",{type:"button",className:"sf-field-eye","aria-pressed":c,"aria-label":c?`Show ${o} on the slide`:`Hide ${o} on the slide`,title:c?`Show ${o} on the slide`:`Hide ${o} on the slide`,onClick:p,children:c?m(en,{name:"eye-off",size:14}):m(en,{name:"eye",size:14})})]}),Ce("div",{className:"sf-copybox",children:[s&&m(df,{target:a?u:f,value:i,onChange:d}),a?m("textarea",{ref:u,value:i,placeholder:r,onChange:g=>d(g.target.value)}):m("input",{ref:f,type:"text",value:i,placeholder:r,onChange:g=>d(g.target.value)})]}),n&&m("p",{className:`sf-field-hint${JA(n)?" sf-field-hint--while-typing":""}`,children:n})]})}function xq(e,t){return{...e,[yn]:t}}function gq(e){let t=e[Le];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[Le]:{...t,offPage:!0}}}function Iq(e){return!e||typeof e!="object"?!1:e[Le]?.offPage===!0}function hq(e){let t=e[Le];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[Le]:{...t,identifier:!0}}}function ny(e){return!e||typeof e!="object"?!1:e[Le]?.identifier===!0}var qA=new Set(Go),Vr=(e,t)=>{let o={...t,[Le]:e};if(!qA.has(e.control))return o;let r=t.render;return{...Hl(o,"authored-copy"),render:n=>m(qh,{name:n.name,children:r(n)})}},bq="Everything else on this block comes from the linked post. Unlink it to edit by hand.",YA="Select a word, then press the highlighter.",XA="A short name so a link can jump straight to this section, like yoursite.com/page#about.",jA=new Set([YA]),JA=e=>jA.has(e);function yq(e,t,o){return Vr({control:"text",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o})})}function Sq(e,t,o){return Vr({control:"textarea",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,multiline:!0})})}function ZA(e,t,o){return Vr({control:"plainText",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,hideable:!1,markup:!1})})}function Cq(e,t,o){return Vr({control:"copyText",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,hideable:!1})})}function Pq(e){return{type:"custom",[bn]:{label:e},render:({value:t,onChange:o})=>m(Df,{value:Sr(t),onChange:o,label:e})}}function kq(e,t,o){return Vr({control:"plainTextarea",label:e,placeholder:t,hint:o},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:e,placeholder:t,hint:o,multiline:!0,hideable:!1})})}var wq={Content:LA,Style:EA,Layout:bA,Animation:Xb};function vq(e,t){return e.includes("Content")?t!=="Content":null}function QA({label:e}){return m(OA,{title:e,level:Xf(1)})}function e0({level:e,label:t}){return e===1?m(QA,{label:t}):m(t0,{label:t})}var Qf="__fold";function qr(e){return e?.[Qf]??null}function ay(e,t){return{type:"custom",[Qf]:{label:e,level:t},render:()=>m(e0,{level:t,label:e})}}function ft(e){return ay(e,2)}function Tq(e){return{type:"custom",render:()=>m(ly,{text:e})}}function ly({text:e}){return m("p",{className:"sf-note",children:e})}function Rq(e){return ay(e,1)}function Fq(e){return qr(e)!==null&&e?.tabs!==void 0}var Yb=new Map;function Ql(e,t){let o=`${e}\0${t?t.join(""):""}`,r=Yb.get(o)??{type:"custom",tabs:t,[Qf]:{label:e,level:1},bucket:e,marker:!0,render:()=>m(eo,{})};return Yb.set(o,r),r}function t0({label:e}){return m(NA,{title:e,level:Xf(2)})}function sy({swatches:e,current:t,onPick:o,names:r}){let n=e.find(l=>l.toLowerCase()===t.toLowerCase()),a=(n?r?.[n]:void 0)??t;return Ce("div",{className:"sf-swatches",children:[e.map(l=>{let s=r?.[l]??l;return m("button",{type:"button","aria-pressed":t.toLowerCase()===l.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===l.toLowerCase()?"is-active":""}`,style:{background:l},onClick:()=>o(l),"aria-label":s,title:s},l)}),m("span",{className:"sf-swatch-hex",children:a})]})}function Eq(e,t){return{type:"custom",render:({value:o,onChange:r})=>{let n=Ub(o,t);return m(be,{label:e,icon:m(sA,{}),action:m(Ro,{inherited:n,source:"Theme",detail:"the theme's section background",onReset:()=>r(Xl),label:e}),children:sy({swatches:Gb,current:n?Yl:o??t??"",onPick:r,names:Wb})})}}}function o0(e,t){return{type:"custom",render:({value:o,onChange:r})=>{let n=o,a=Sp(n,t);return m(be,{label:e,icon:m(IA,{}),action:m(Ro,{inherited:a,source:"Theme",detail:"the theme's image stage",onReset:()=>r(fn),label:e}),children:sy({swatches:hp,current:a?Et:Pa(n,t),onPick:r,names:bp})})}}}function iy(e=o=>o,t){return Un({_gSectionTheme:ft(Wd),sectionAccent:{type:"custom",render:({value:o,onChange:r})=>m(Rf,{value:e(o),onChange:r,followLabel:t})}})}function er({min:e,max:t,step:o,value:r,onChange:n,suffix:a="",readout:l=!0,notch:s,ariaLabel:i,disabled:c=!1}){let f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return Ce("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:[m("input",{type:"range",min:e,max:t,step:o,value:r,"aria-label":i,disabled:c||void 0,onChange:u=>n(Number(u.target.value))}),l&&m(r0,{value:r,min:e,max:t,step:o,suffix:a,ariaLabel:i,onChange:n})]})}function r0({value:e,min:t,max:o,step:r,onChange:n,suffix:a="",ariaLabel:l,children:s}){let[i,c]=Jl(null),f=u=>{u.editing||c(null),u.commit!==null&&u.commit!==e&&n(u.commit)};return i===null?m("button",{type:"button",className:"sf-slider-val",title:"Click to type a value","aria-label":l?`${l}: type a value`:"Type a value",onClick:()=>c(String(e)),children:s??Ce(eo,{children:[e,a]})}):m("input",{autoFocus:!0,type:"text",inputMode:"decimal",className:"sf-slider-val sf-slider-typed",value:i,"aria-label":l,onChange:u=>c(u.target.value),onFocus:u=>u.currentTarget.select(),onKeyDown:u=>{let d=xf(u.key,i,t,o,r);d.handled&&(u.preventDefault(),u.stopPropagation(),f(d))},onBlur:()=>f(xf(mf,i,t,o,r))})}function Kr(e,t,o,r,n,a,l="",s){return{type:"custom",render:i=>m(be,{label:e,icon:Zl(t),action:s?s("storedValue"in i?i.storedValue:i.value,i.onChange):void 0,children:er({min:o,max:r,step:n,value:typeof i.value=="number"?i.value:a,suffix:l,onChange:i.onChange})})}}function cy({min:e,max:t,step:o,px:r,label:n,onChange:a,disabled:l=!1}){let{cornerRadiusPx:s}=uo();return m(eo,{children:er({min:e,max:t,step:o,value:r??(typeof s=="number"?s:e),readout:!1,ariaLabel:n,disabled:l,onChange:a})})}function zn(e,t){let{min:o,max:r,step:n=1,unsetLabel:a="Not set",hint:l,restAtSite:s=!1,restTrack:i,unsetMark:c}=t;return{type:"custom",render:({value:f,onChange:u})=>{let d=typeof f=="number"?f:null,p=d===null;return m(be,{label:e,value:p?c?"":a:`${d}px`,changed:!p,action:p?c??null:m(Rl,{label:e,what:"change",onClear:()=>u(null)}),hint:l,children:i?i({min:o,max:r,step:n,px:d,label:e,onChange:u}):s?m(cy,{min:o,max:r,step:n,px:d,label:e,onChange:u}):er({min:o,max:r,step:n,value:d??o,readout:!1,ariaLabel:e,onChange:u})})}}}function Lq(e){let t=Kr("Gap",m(Zb,{}),go.min,go.max,go.step,ka[e],"px",(o,r)=>m(KA,{inherited:!Zs(e,o),onReset:()=>r(void 0),label:"Gap"}));return{type:"custom",[vp]:e,render:o=>t.render({...o,value:Js(e,o.value,o.field?.siteGap),storedValue:o.value,onChange:r=>o.onChange(r)})}}function n0(){return{type:"custom",render:({value:e,onChange:t})=>{let r=xt(e)??[...ct],n=r.length===ct.length;return m(be,{label:wo,icon:m(Jb,{}),value:Tl(r),changed:!n,action:n?null:m(Rl,{label:wo,what:"change",onClear:()=>t(null)}),hint:"Corners left off stay square. The row above sets how round the others are.",children:m(i0,{value:r,onChange:a=>{let l=xt(a)??[];t(l.length===ct.length?null:l)}})})}}}function a0(){return zn("Corners",{min:lo,max:Eo,unsetLabel:"Inherits \xB7 Site",restTrack:e=>m(l0,{...e}),hint:m(s0,{})})}var fy="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function ed(){return Yf(es())}function l0(e){return m(cy,{...e,disabled:ed()})}function s0(){return m(eo,{children:ed()?fy:"Follows Site styles \u25B8 Basics \u25B8 Corners until you set a number here."})}function i0({value:e,onChange:t}){let o=ed();return m(ty,{label:wo,value:e,corners:o?Gr.map(r=>({...r,disabled:!0,title:fy})):Gr,onChange:t})}function dy(){return Un({_gShape:ft("Shape"),sectionCorners:a0(),sectionCornerSides:n0()})}function uy(){return{_gMotion:ft("Motion"),sectionAnimation:rd("Entrance",m(Xb,{}),[...Ah],rf)}}function td(){let e=null;try{let{appState:t,selectedItem:o}=$r(n=>n),r=o?.props?.id?String(o.props.id):void 0;e=r?af(t?.data,r):null}catch{e=null}return e!==null&&Yf(e)}function py(e){let{cornerRadiusPx:t}=uo(),o=td(),r=typeof t=="number"?t:e,n=null;try{let{appState:l,selectedItem:s}=$r(c=>c),i=s?.props?.id?String(s.props.id):void 0;n=i?af(l?.data,i):null}catch{n=null}if(o||!n)return r;let a=n.sectionCorners;return jc(a)?a:r}function c0({min:e,max:t,step:o,px:r,label:n,onChange:a}){let l=py(e);return m(eo,{children:er({min:e,max:t,step:o,value:r??l,readout:!1,ariaLabel:n,onChange:a})})}function f0({label:e}){let t=td(),o=py(lo);return m(Ro,{inherited:!0,source:t?"Site":"Section",detail:`${t?"Site":"Section"} \u2014 ${o}px`,onReset:()=>{},label:e})}function d0(){return m(eo,{children:td()?"The section is full width, so this card follows Site styles \u25B8 Basics \u25B8 Corners.":"Follows the section's Corners until you set a number here."})}function u0(){return zn("Corners",{min:lo,max:Eo,unsetLabel:"Inherits \xB7 Section",unsetMark:m(f0,{label:"Corners"}),restTrack:e=>m(c0,{...e}),hint:m(d0,{})})}function p0({value:e,onChange:t}){return m(ty,{label:wo,value:e,corners:Gr,onChange:t})}function m0({unset:e}){return m(eo,{children:e?"Set a number above first \u2014 there is nothing to shape yet.":"Corners left off stay square. The row above sets how round the others are."})}function x0(){return{type:"custom",render:({value:e,onChange:t})=>{let r=xt(e)??[...ct],n=r.length===ct.length;return m(be,{label:wo,icon:m(Jb,{}),value:Tl(r),changed:!n,action:n?null:m(Rl,{label:wo,what:"change",onClear:()=>t(null)}),hint:m(m0,{unset:!Nn(e)}),children:m(p0,{value:r,onChange:a=>{let l=xt(a)??[];t(l.length===ct.length?null:l)}})})}}}function g0(){return{type:"custom",render:()=>m(Jc,{})}}function _q(){return{_gShape:ft("Shape"),cardCorners:u0(),cardCornerSides:x0(),cardCornersApplyAll:g0()}}function Aq(){return To("Justify",m(lA,{}),Wf,Wf[0].value)}function Oq(){return To("Item alignment",m(aA,{}),Nb,"stretch")}function Nq(){return To(Bb,m(AA,{}),Uf,Uf[0].value)}function Bq(){return{type:"custom",render:({value:e,onChange:t})=>{let o=ql.find(r=>r.value===e)??ql[0];return m(be,{label:zf,icon:m(jb,{}),value:o.label,children:m("div",{className:"sf-gallery-layouts",role:"group","aria-label":zf,children:ql.map(r=>m("button",{type:"button","aria-pressed":o.value===r.value,"aria-label":r.label,title:r.label,onClick:()=>t(r.value),children:m("span",{className:"sf-gallery-pic",children:I0(r.weights).map((n,a)=>m("i",{style:{gridColumn:`span ${n}`}},a))})},r.value))})})}}}function I0(e){if(!e)return[3,4];let t=e.reduce((o,r)=>o+r,0);return e.map(o=>Math.round(o/t*12))}function Dq(){return To(Hb,m(Zb,{}),$f,$f[0].value)}function Mq(){return Kr(Db,m(wA,{}),Kf,Mb,1,Kf)}function Hq(e){let t=rd(Eb,GA("`Direction` names how a container's children run \u2014 a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),_b(e),Vl(e,void 0));return{type:"custom",render:o=>t.render({...o,value:Vl(e,o.value),onChange:r=>o.onChange(r)})}}function Gq(e,t,o,r,n,a){return{type:"custom",render:({value:l,onChange:s})=>m(be,{label:e,icon:m(tf,{noun:a}),action:m(Ro,{inherited:Kb(l),source:"Text",detail:"Website settings \u2192 Text",onReset:()=>s(zb),onOptOut:()=>s(jl),optOutTitle:`Click to keep ${e} at this section's own built-in size instead`,label:e}),children:er({min:t,max:o,step:r,value:typeof l=="number"?l:n,suffix:"px",onChange:s})})}}function Wq(){return{_gCellWidth:ft("Cell width"),gridSpan:To("Positions",m(jb,{}),[{label:"Auto",value:""},...Array.from({length:El},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function es(){let e=null;try{e=$r(t=>t).selectedItem}catch{e=null}return e?.props??{}}function h0({min:e,max:t,step:o,px:r,label:n,onChange:a,desktopKey:l,fallback:s}){let i=es()[l],c=Gl(void 0,i,s);return m(eo,{children:er({min:e,max:t,step:o,value:Gl(r,i,s),readout:!1,ariaLabel:n,notch:c,onChange:a})})}function b0({label:e,desktopKey:t,fallback:o}){let r=es()[t],n=Gl(void 0,r,o);return m(Ro,{inherited:!0,source:zr.desktop,detail:`${zr.desktop} \u2014 ${n}px`,onReset:()=>{},label:e})}function y0(e){return zn(e.label,{min:e.min,max:e.max,step:e.step,unsetLabel:`Inherits \xB7 ${zr.desktop}`,unsetMark:m(b0,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>m(h0,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function my(e={}){let t=e.keys?.top??"sectionPaddingTop",o=e.keys?.bottom??"sectionPaddingBottom",r=e.group!==!1,n=I=>r?I:`Padding ${I.toLowerCase()}`,a=I=>Kr(n("Top"),m(kA,{}),Tt.min,Tt.max,Tt.step,I,"px"),l=(I,h,C,S=Tt)=>wt("mobile",y0({label:n(I),desktopKey:h,min:S.min,max:S.max,step:S.step,fallback:C})),s=e.top??Tt.min,i=e.bottom??Tt.min,c="sectionPaddingLeft",f="sectionPaddingRight",u=e.sideBounds??Tt,d=e.side??u.min,p=e.sidePhone??d,x=e.phone===!0,g=I=>x?wt("desktop",I):I;return Un({...r?{_gSpacing:ft("Padding")}:{},[t]:g(a(s)),...x?{[Hn(t)]:l("Top",t,s)}:{},...e.only==="top"?{}:{[o]:g(Kr(n("Bottom"),m(SA,{}),Tt.min,Tt.max,Tt.step,i,"px")),...x?{[Hn(o)]:l("Bottom",o,i)}:{}},...e.sides?{[c]:g(Kr(n("Left"),m(CA,{}),u.min,u.max,u.step,d,"px")),...x?{[Hn(c)]:l("Left",c,p,u)}:{},[f]:g(Kr(n("Right"),m(PA,{}),u.min,u.max,u.step,d,"px")),...x?{[Hn(f)]:l("Right",f,p,u)}:{}}:{}})}var S0={contained:"Contained",page:"Page",full:"Full"},Jf="Width";function xy(e,t=$b,o=!0){let r=t.map(n=>({label:Vb[n]??S0[n],value:n}));return Un({...o?{_gWidth:ft(Jf)}:{},widthMode:{type:"custom",render:({onChange:n,field:a})=>m(be,{label:"Width",icon:m(_A,{}),action:o?m($A,{inherited:a?.inherited??!1,onReset:()=>n(Vf),label:Jf}):void 0,children:od({options:r,value:a?.currentValue||e,onChange:n,ariaLabel:Jf})})}})}function gy(){let e=r=>({type:"custom",render:({value:n,onChange:a})=>Ce("div",{className:"sf-field",children:[r?Ce("div",{className:"sf-field-head",children:[m("span",{className:"sf-field-label sf-field-label--inline",children:Ur}),r(a)]}):null,m("div",{children:od({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(n)?n:"auto",onChange:a,ariaLabel:Ur})})]})}),t=()=>({type:"custom",render:({value:r,onChange:n,field:a})=>{let l=a?.unit==="%"?"%":"px",s=l==="%"?Hf:Mf;return m("div",{className:"sf-field",children:er({min:s.min,max:s.max,step:s.step,value:typeof r=="number"?r:s.fallback,suffix:l,ariaLabel:Ur,onChange:n})})}}),o=()=>rd("Unit",m(Qb,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return Un({_gHeight:ft(Ur),sectionHeightMode:wt("desktop",e()),sectionHeightValue:wt("desktop",t()),sectionHeightUnit:wt("desktop",o()),sectionHeightModePhone:wt("mobile",e(r=>m(C0,{onClear:()=>r(void 0)}))),sectionHeightValuePhone:wt("mobile",t()),sectionHeightUnitPhone:wt("mobile",o())})}function C0({onClear:e}){let t=es(),o=Gf(t),r=$l(t),n=`${zr.desktop} \u2014 ${r.mode==="auto"?"Auto":`${r.value}${r.unit}`}`;return m(Ro,{inherited:!o,source:zr.desktop,detail:n,onReset:e,label:Ur})}function Iy(){return{_gAnchor:ft("Anchor"),anchor:ZA("Anchor name","e.g. about",XA)}}function Zo(e,t,o){return{type:"custom",render:({value:r,onChange:n,id:a,name:l})=>{let s=typeof r=="boolean"?r:t,i=`${a??l??e}-label`;return m(be,{label:e,labelId:i,icon:o,action:m(oy,{checked:s,onChange:n,ariaLabelledBy:i})})}}}function Uq(){return{type:"custom",render:({value:e,onChange:t,id:o,name:r})=>{let n=`${String(o??r??"pageBackground")}-colour`;return m(be,{label:"Background",icon:m(ey,{}),htmlFor:n,action:m(Qt,{id:n,label:"Background",value:of(e),onChange:t})})}}}function P0({facet:e,fallback:t,value:o,onChange:r,fieldId:n}){let l=Zc()[e],s=typeof o=="boolean"?o:t,i=`${n}-label`;return m(be,{label:l,labelId:i,action:m(oy,{checked:s,onChange:r,ariaLabelledBy:i})})}function zq(e,t){return{type:"custom",render:({value:o,onChange:r,id:n,name:a})=>m(P0,{facet:e,fallback:t,value:o,onChange:r,fieldId:String(n??a??e)})}}function Kq(e,t){return{type:"custom",render:()=>m(k0,{facets:e,rest:t})}}function k0({facets:e,rest:t}){let o=Zc(),r=e.map(a=>o[a]),n=r.length>1?`${r.slice(0,-1).join(", ")} and ${r[r.length-1]}`:r.join("");return m(ly,{text:`${n} ${t}`})}function $q(e,t){return{type:"custom",render:({value:o,onChange:r})=>Ce("div",{className:"sf-field sf-field--row",children:[m("span",{className:"sf-field-label sf-field-label--inline",children:e}),Qt({value:o||t,onChange:r,label:e})]})}}var w0=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function hy({label:e,value:t,onChange:o,points:r=w0}){return m(BA,{label:e,value:t,points:r,onChange:o})}function Vq(e,t=ph,o="mediaImage"){return{type:"custom",render:({value:r,onChange:n})=>m("div",{className:"sf-field",children:m(v0,{label:e,value:r||t,onChange:n,imageProp:o})})}}function v0({label:e,value:t,onChange:o,imageProp:r}){let{selectedItem:n}=$r(l=>l),a=n?.props?.[r];return m(hf,{label:e,value:t,onChange:o,image:typeof a=="string"?a:void 0})}var T0=Ps([]);function qq(e,{stacking:t,fallback:o=ia}){return{type:"custom",render:({value:r,onChange:n})=>{let a=bt.includes(r)?r:o;return t?m(R0,{label:e,value:a,onChange:n}):by({label:e,value:a,onChange:n,points:T0})}}}function R0({label:e,value:t,onChange:o}){let{appState:r,selectedItem:n}=$r(s=>s),a=n?.props?.id?String(n.props.id):void 0,l=a?ws(r?.data,a):[];return by({label:e,value:t,onChange:o,points:Ps(l,a)})}function by({label:e,value:t,onChange:o,points:r}){let n=r.find(a=>a.disabled);return m(be,{label:e,icon:m(vA,{}),hint:n?n.title:void 0,children:hy({label:e,value:po(t),onChange:o,points:r})})}var Yq={top:m(pA,{}),right:m(uA,{}),bottom:m(fA,{}),left:m(dA,{})};function Xq(e,t,o,r,n,a){let l=f=>t.find(u=>u.value===f),s=f=>({value:f,label:"",disabled:!0,title:r}),i=f=>{let u=t.find(p=>p.cell===f);if(!u)return s(`missing-${f}`);let d=a?.[f];return d?{value:u.value,label:u.label,icon:d}:{value:u.value,label:u.label}},c=[s("corner-top-left"),i("top"),s("corner-top-right"),i("left"),s("centre"),i("right"),s("corner-bottom-left"),i("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:u})=>{let d=t.some(p=>p.value===f)?f:o;return m(be,{label:e,icon:n,value:l(d)?.label??"",children:hy({label:e,value:d,onChange:u,points:c})})}}}function To(e,t,o,r,n){return{type:"custom",options:o,fallback:r,render:({value:a,onChange:l,field:s})=>{let i=s.options??o,c=s.fallback??r,f=i.some(u=>u.value===a)?a:c;return m(be,{label:e,icon:Zl(t),children:Ce("select",{value:f,onChange:u=>l(u.target.value),children:[n?m("option",{disabled:!0,value:"",children:n}):null,i.map(u=>m("option",{value:u.value,children:u.label},u.value))]})})}}}function jq(e,t,o){return{type:"custom",options:t,render:({value:r,onChange:n,field:a})=>m(Sf,{label:e,options:a.options??t,value:Array.isArray(r)?r:[],onChange:n,...o?{emptyLabel:o}:{}})}}function Jq(e,t){return{type:"custom",render:({value:o,onChange:r})=>m(ff,{value:o,onChange:r,...e?{label:e}:{},...t?{emptyLabel:t}:{}})}}function Zq(e,t={}){return{type:"custom",render:({value:o,onChange:r})=>{let n={value:o,onChange:r,...t};return m(e,{...n})}}}function od({options:e,value:t,onChange:o,ariaLabel:r,disabled:n=!1}){return m(DA,{options:e.map(a=>({id:a.value,label:a.label,title:a.title})),value:t,onChange:o,ariaLabel:r,disabled:n})}var Qq=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function rd(e,t,o,r){let n=o.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:l,field:s})=>m(be,{label:e,icon:Zl(t),children:od({options:n,value:n.some(i=>i.value===a)?a:a||s?.currentValue||r,onChange:l,ariaLabel:e})})}}var F0="__media";function e9(e,t,o){return{type:"custom",[F0]:!0,render:({value:r,onChange:n})=>m(bf,{value:r||"",onChange:n,label:e,accept:t,placeholder:o})}}function t9({value:e,onChange:t,label:o}){let r=e||{},n=!!r.pending,a=n?"var(--fg-dim, #888)":r.ok?"#1d9e75":"#d85a30",l=(s,i)=>t({...r,[s]:i===""?void 0:Number(i)});return Ce(be,{label:o,icon:m(jf,{}),children:[m("button",{type:"button",disabled:n,onClick:()=>t({...r,pending:!0,ok:!1,status:"Finding\u2026"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:n?"default":"pointer",opacity:n?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:n?"Finding\u2026":"Find coordinates"}),r.status&&m("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:r.status}),m("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:"Coordinates from OpenStreetMap"}),m("button",{type:"button",onClick:()=>t({...r,manual:!r.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:r.manual?"Hide manual coordinates":"Enter coordinates manually"}),r.manual&&Ce("div",{style:{marginTop:8,display:"grid",gap:8},children:[m(be,{label:"Latitude",icon:m(jf,{}),children:m("input",{type:"number",step:"any",placeholder:"e.g. 34.0990198",value:typeof r.lat=="number"?r.lat:"",onChange:s=>l("lat",s.target.value)})}),m(be,{label:"Longitude",icon:m(jf,{}),children:m("input",{type:"number",step:"any",placeholder:"e.g. -117.9842833",value:typeof r.lng=="number"?r.lng:"",onChange:s=>l("lng",s.target.value)})})]})]})}function o9({items:e,placeholder:t,onChange:o,markup:r=!1}){let n=Zf(null),[a,l]=Jl(null),s=u=>u.map(d=>({text:d?.text??""})),i=(u,d)=>o(L0(e,u,d)),c=u=>{let d=_0(a,u);d===null&&(n.current=null),l(d),o(s(e.filter((p,x)=>x!==u)))},f=()=>o([...s(e),{text:""}]);return Ce("div",{className:"sf-textlist",children:[r&&m(df,{target:n,value:E0(e,a),onChange:u=>i(a??-1,u),disabled:a===null,label:a===null?"Formatting \u2014 click a row first":`Formatting \u2014 row ${a+1}`}),e.map((u,d)=>Ce("div",{className:`sf-textlist-row${r&&a===d?" is-marking":""}`,children:[m("input",{type:"text",value:u?.text??"",placeholder:t,onChange:p=>i(d,p.target.value),onFocus:p=>{n.current=p.currentTarget,l(d)}}),m("button",{type:"button",className:"sf-textlist-x",onClick:()=>c(d),"aria-label":"Remove item",title:"Remove item",children:"\xD7"})]},d)),m("button",{type:"button",className:"sf-textlist-add",onClick:f,children:"+ Add item"})]})}function E0(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function L0(e,t,o){let r=e.map(n=>({text:n?.text??""}));return t===null||t<0||t>=e.length?r:r.map((n,a)=>a===t?{text:o}:n)}function _0(e,t){return e===null?null:t>e?e:null}var r9={label:"Ticker items",icon:m(yA,{})};function n9(e,t,o,r){return{type:"custom",[Le]:{control:"textList",label:e,placeholder:o,itemKey:"text",rendering:r},render:({value:n,onChange:a})=>m(A0,{label:e,icon:Zl(t),items:Array.isArray(n)?n:[],placeholder:o,onChange:a,markup:r==="markup"})}}function A0({label:e,icon:t,items:o,placeholder:r,onChange:n,markup:a=!1}){let[l,s]=Jl(null),i=c=>c.map(f=>({text:f?.text??""}));return m(MA,{label:e,icon:t,noun:"line",items:o,onChange:c=>n(i(c)),newItem:()=>({text:""}),itemName:(c,f)=>`Line ${f+1}`,summary:c=>jt(c?.text??"")||r,open:l,onOpen:s,renderItem:(c,f,u)=>m(Qo,{value:c?.text??"",onChange:d=>u({text:typeof d=="string"?d:d?.text??""}),label:`${e} \u2014 line ${f+1}`,placeholder:r,hideable:!1,markup:a})})}function a9(e,t){let o=`${e.label} \u2014 row ${t+1}`;return Vr({control:"plainText",label:o,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:r,onChange:n})=>m(Qo,{value:r,onChange:n,label:o,placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function yy(e){return{_gCards:ft("Cards"),coverIndex:To("Cover image",m(hA,{}),nm,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:o0("Image background",Lt),cardImage:O0(),spinOnHover:Zo("Rotate on hover",e?.spinDefault??!0,m(RA,{}))}}function Sy(){return{outline:To("Card outline",m(FA,{}),oi,Io),indexBadge:To("Card number",m(Qb,{}),ti,pr),showBadge:Zo("Product badge",!0,m(tf,{noun:"tag"}))}}function Cy(e){let t=e?.bottomDefault??!0;return{_gShowOnCard:ft("Show on a card"),showCardPrice:Zo("Price",!0,m(mA,{})),showCardFinishes:Zo("Finish swatches",!0,m(xA,{})),showCardSizes:Zo("Sizes",t,m(TA,{})),showCardBuy:Zo("Buy button",t,m(iA,{})),showCardPage:Zo("Page button",t,m(ey,{}))}}function O0(){return zn("Card image",{min:lo,max:Eo,step:Cp,hint:"Rounds the picture. The card's own corner is in Site styles."})}function l9(){return zn(kh,{min:lo,max:Eo,step:Ph,unsetLabel:"Square",hint:"Rounds the picture. Left alone it stays square."})}function s9(){return{type:"custom",render:({value:e,onChange:t})=>m(N0,{value:typeof e=="string"?e:"",onChange:t})}}function N0({value:e,onChange:t}){let[o,r]=Jl(null),n=Qc.filter(l=>o===null||Bt[l].across===o),a=e&&e in Bt?Bt[e]:null;return Ce(eo,{children:[m(be,{label:"Photos in a row",icon:m(cA,{}),children:Ce("div",{className:"sf-gallery-filter",children:[m("button",{type:"button","aria-pressed":o===null,onClick:()=>r(null),children:"All"}),Rh.map(l=>m("button",{type:"button","aria-pressed":o===l,onClick:()=>r(l),children:l},l))]})}),m(be,{label:"Layout",icon:m(gA,{}),value:a?a.label:"Not chosen",hint:`${n.length} of ${Qc.length} layouts`,children:m("div",{className:"sf-gallery-layouts",children:n.map(l=>m("button",{type:"button","aria-pressed":e===l,"aria-label":Bt[l].label,title:Bt[l].label,onClick:()=>t(e===l?"":l),children:m("span",{className:"sf-gallery-pic",children:Bt[l].desktop.map(([s,i],c)=>m("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${i}`}},c))})},l))})})]})}function B0(e,t){let o=Sr(e.props.name);if(o)return o;let r=Sr(e.props.altName);if(r)return r;let n=e.props.collection?.name;if(n)return n;let a=e.props.source?.title;if(a)return a;let l=e.props.code;return l?t?.(l)??l:""}function p9(e,t,o){return jt(B0(e,o))||t(e.type)}function m9(e){if(!e)return null;for(let t of["name","altName"])if(ny(e[t]))return t;return null}function x9(e,t){return Sr(e.props?.name).trim()||t}import{SETTINGS_BUCKETS as D0}from"efficient-easel/panel";var Yr=D0,$e={Content:"_sContent",Style:"_sStyle",Layout:"_sLayout",Animation:"_sAnimation"},y9=[$e.Layout,...Object.keys(my({phone:!0})),...Object.keys(xy("full")),...Object.keys(gy()),...Object.keys(Iy())],S9=[$e.Style,...Object.keys(iy())],C9=[$e.Style,...Object.keys(dy())],P9=[$e.Animation,...Object.keys(uy())],M0=Object.keys(yy()),H0=new Set(["cardImage","imageBackground"]),k9=[$e.Style,...M0.filter(e=>e.startsWith("_g")||H0.has(e))],w9=Object.keys(Sy()),v9=Object.keys(Cy({bottomDefault:!0})),G0="Editor only \u2014 not shown live",Py={"Archive link":"Content",Article:"Content",Boxes:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content","Opening filter":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel \xB7 actions":"Content","Right panel \xB7 choices":"Content","Right panel \xB7 form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","\u201COther\u201D reason":"Content","Background images":"Style",Gallery:"Style",Image:"Style","Image column":"Style",Images:"Style",Logo:"Style",Media:"Style","Background image":"Style",Color:"Style","Image tint":"Style",Style:"Style",Shape:"Style",Texture:"Style","Text style":"Style",Motion:"Animation",Animation:"Animation",Anchor:"Layout",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Layout",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[G0]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Layout","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Layout",Height:"Layout"},ky={"AlloyWheelsListing._gCards":"Style","ProductGrid._gCards":"Style"};function W0(e,t,o){return ky[`${e}.${t}`]??Py[o]}var U0={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) \u2014 the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) \u2014 the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"};function T9(e){let t=new Set(Object.values($e));for(let[o,r]of Object.entries(e))if(!t.has(o)&&qr(r)?.level===1)return 1;return 2}function z0(e){let t=`${e}.`;return Object.keys(U0).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function K0(e,t){let o=uf(e),r=ft(t);return o?wt(o.tier,r):r}function R9(e,t){let o=[],r=new Set(z0(t)),n=new Set,a=null;for(let[d,p]of Object.entries(e)){let x=qr(p);if(!x){a||o.push(a={bucket:"Content",entries:[]}),a.entries.push([d,p]);continue}if(r.has(d)){let h=Py[x.label];if(x.level!==2||!h||x.label!==h)throw new Error(`${t}.${d}: RETIRED (lib/puck/field-groups.ts) lists this sub-heading as one whose name duplicates its bucket, but it is a level-${x.level} "${x.label}" header in the ${h??"(unclassified)"} bucket. Only a level-2 header whose label IS its bucket's name may be retired \u2014 anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);n.add(d),o.push(a={bucket:h,entries:[]});continue}let g=W0(t,d,x.label);if(!g)throw new Error(`${t}.${d}: the inspector group "${x.label}" is not classified in LABEL_BUCKET (lib/puck/field-groups.ts), so there is no way to say which of ${Yr.join(" / ")} its controls belong under. Classify it \u2014 an unclassified group silently lands wherever it was declared, which is the whole bug.`);let I=d===$e[g]&&x.level===1;if(!I&&d===$e[g])throw new Error(`${t}.${d}: that key is reserved for the ${g} bucket header, but this field is a level-${x.level} "${x.label}" header, so it cannot serve as one. Rename the section's own field.`);o.push(a={bucket:g,entries:[[d,I||x.level===2?p:K0(p,x.label)]],isBucketHeader:I})}let l=new Set(Object.entries(e).filter(([,d])=>qr(d)).map(([d])=>d)),s=Object.keys(ky).filter(d=>d.startsWith(`${t}.`)).filter(d=>!l.has(d.slice(t.length+1)));if(s.length)throw new Error(`${t}: KEY_BUCKET (lib/puck/field-groups.ts) lists ${JSON.stringify(s)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key \u2014 an override that quietly matches nothing is worse than no override.`);let c=o.some(d=>d.isBucketHeader)?[]:[...r].filter(d=>!n.has(d));if(c.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(c)}, but this section has no such fold header${c.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section \u2014 a list that quietly matches nothing is worse than no list.`);for(let d of Yr){let p=$e[d];if(p in e&&!o.some(x=>x.isBucketHeader&&x.entries[0]?.[0]===p))throw new Error(`${t}.${p} is reserved for the ${d} bucket header but is not a level-1 "${d}" fold header. Rename the section's own field.`)}let f=Yr.filter(d=>o.some(p=>p.bucket===d)),u={};for(let d of Yr){let p=o.filter(I=>I.bucket===d);if(!p.length)continue;let x=p.findIndex(I=>I.isBucketHeader);x>0&&p.unshift(...p.splice(x,1));let g=Ql(d,d===f[0]?f:null);x<0&&(u[$e[d]]=g);for(let I of p)for(let[h,C]of I.entries)u[h]=I.isBucketHeader&&h===$e[d]?g:C}return u}function F9(e){return $e.Content in e?e:{[$e.Content]:Ql("Content",null),...e}}function E9(e){return Yr.some(t=>$e[t]in e)}function L9(e){let t=Yr.filter(r=>$e[r]in e);if(t.length===0)return e;let o={...e};for(let r of t)o[$e[r]]=Ql(r,r===t[0]?t:null);return o}var{Provider:O9,useSelection:N9}=sa("selectedPartId");import{createContext as $0,useContext as V0,useMemo as q0,useState as Y0}from"react";import{jsx as j0}from"react/jsx-runtime";var X0={partStyle:null,setPartStyle:()=>{}},wy=$0(X0);function M9({children:e}){let[t,o]=Y0(null),r=q0(()=>({partStyle:t,setPartStyle:o}),[t]);return j0(wy.Provider,{value:r,children:e})}function H9(){return V0(wy)}import{useCallback as Xr,useEffect as jr,useId as EO,useRef as to,useState as Vn}from"react";var vy="data-puck-overlay-portal";function ts(e){return e.setAttribute(vy,"true"),()=>e.removeAttribute(vy)}var nd="small",ad="dot",J0=[{label:"Small",value:"small"},{label:"Display",value:"display"}],Z0=[{label:"Dot \u25CF",value:"dot"},{label:"Cross \u2715",value:"cross"},{label:"Slash /",value:"slash"},{label:"Triangle \u25BC",value:"triangle"},{label:"None",value:"none"}],Ty={dot:"\u25CF",cross:"\u2715",slash:"/",triangle:"\u25BC",none:""},Q0={small:"font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.25em] max-[800px]:text-[length:var(--size-label,12px)]",display:"font-display font-medium text-[length:var(--size-headingMedium,44px)] uppercase leading-none tracking-[0.005em] max-[800px]:text-[length:var(--size-headingMedium,28px)]"},eO={small:{dot:"",cross:"text-[0.77em]",slash:"text-[0.77em]",triangle:"",none:""},display:{dot:"text-[0.3em]",cross:"text-[0.64em]",slash:"text-[0.64em]",triangle:"text-[0.3em]",none:""}};function Ry(e){return Xe(J0,nd,e)}function Fy(e){return Xe(Z0,ad,e)}function Ey(e){return Q0[e]}function Ly(e,t){return eO[e][t]}var ld="left",tO=[{label:"Left",value:"left",cell:"left"},{label:"Right",value:"right",cell:"right"},{label:"Up",value:"up",cell:"top"},{label:"Down",value:"down",cell:"bottom"}],oO={left:"storefront-ticker",right:"storefront-ticker-right",up:"storefront-ticker-up",down:"storefront-ticker-down"};function _y(e){return Xe(tO,ld,e)}function Ay(e){return e==="up"||e==="down"}function Oy(e,t){return`${oO[e]} ${t}s linear infinite`}import{jsx as Kn,jsxs as Ny}from"react/jsx-runtime";var rO={"themed-band":"text-fg/70","themed-section":"text-fg-dim","dark-media":"text-overlay-fg/70"};function sd({items:e,separator:t=ad,size:o=nd,durationSec:r=50,scroll:n=ld,backdrop:a="themed-band",className:l}){let s=Ry(o),i=_y(n),c=Fy(t),f=`text-accent ${Ly(s,c)}`.trim(),u=Ty[c],d=u===""?Kn("span",{}):Kn("span",{className:f,children:u}),p=Ay(i),x=p?"inline-flex flex-col items-center gap-[60px] pb-[60px] max-[800px]:gap-8 max-[800px]:pb-8":"inline-flex items-center gap-[60px] pr-[60px] max-[800px]:gap-8 max-[800px]:pr-8",g=p?"inline-flex flex-col items-center gap-[60px] max-[800px]:gap-8":"inline-flex items-center gap-[60px] max-[800px]:gap-8",I=h=>Kn("span",{className:x,children:e.map((C,S)=>{let P=typeof C=="string"?C:C.text,T=typeof C=="object"&&C.gold;return Ny("span",{className:g,children:[Kn("span",{className:T?"text-accent":void 0,children:re(P)}),d]},S)})},h);return Kn("div",{className:`overflow-hidden ${l??""}`,children:Ny("div",{className:`flex ${p?"flex-col ":""}whitespace-nowrap ${Ey(s)} ${rO[a]}`,style:{animation:Oy(i,r)},children:[I("a"),I("b")]})})}var nO={"top-left":"left-0 top-[120px]","top-center":"left-1/2 top-[120px] -translate-x-1/2","top-right":"right-0 top-[120px]",left:"left-0 top-1/2 -translate-y-1/2",center:"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",right:"right-0 top-1/2 -translate-y-1/2","bottom-left":"left-0 bottom-[120px]","bottom-center":"left-1/2 bottom-[120px] -translate-x-1/2","bottom-right":"right-0 bottom-[120px]"},aO=`calc(${au} - ${hs}*2)`,By=`var(${lu},${hs})`,e7=`pointer-events-none absolute inset-y-0 left-[${By}] right-[${By}] z-[6] mx-auto max-w-[var(${su},${aO.replace(/ /g,"_")})]`;function os(e,t){return`pointer-events-auto absolute ${nO[e]} z-[6] sf-hero-overlay-rail flex ${t}`}function Dy(e){return bt.includes(e)?e:null}var lO="bottom-right",sO=["outline","solid","square","bare"],iO="outline",n7={outline:"Outline",solid:"Solid",square:"Square",bare:"Bare"},a7=!1,My=["prev","next"],Hy={prev:"Previous slide",next:"Next slide"};function cO(e){return sO.includes(e)?e:iO}function fO(e){return Dy(e)??lO}var dO="flex-row items-center gap-2";function Gy(e){return os(fO(e),dO)}var uO={outline:"grid h-10 w-10 cursor-pointer place-items-center rounded-full border border-overlay-chrome/60 text-overlay-fg transition-colors hover:border-overlay-chrome hover:bg-overlay-scrim/30",solid:"grid h-10 w-10 cursor-pointer place-items-center rounded-full border border-overlay-chrome bg-overlay-chrome text-overlay-scrim transition-colors hover:bg-overlay-chrome/85",square:"grid h-10 w-10 cursor-pointer place-items-center rounded-md border border-overlay-chrome/60 text-overlay-fg transition-colors hover:border-overlay-chrome hover:bg-overlay-scrim/30",bare:"grid h-10 w-10 cursor-pointer place-items-center text-overlay-fg transition-colors hover:text-overlay-chrome"};function Wy(e){return uO[cO(e)]}function Uy(e){return e.shown===!0&&(e.count??0)>1}function rs(e,t,o){if(o<=1)return t;let r=Math.min(Math.max(t,0),o-1);return e==="prev"?(r-1+o)%o:(r+1)%o}import{jsx as id}from"react/jsx-runtime";function cd({shape:e,placement:t,ref:o}){let r=Wy(e);return id("div",{ref:o,className:Gy(t),style:{color:"var(--overlay-fg)"},children:My.map(n=>id("button",{type:"button","data-hero-nav":n,"aria-label":Hy[n],className:r,children:id(en,{name:"chevron-right",size:18,rounded:!0,style:n==="prev"?{rotate:"180deg"}:void 0})},n))})}var pO=bt;var mO="top-right",xO=["cards","dots","numbers","bar","tabs"],gO=["cards","dots","numbers","bar"],zy="cards",p7={cards:"Cards",dots:"Dots",numbers:"Numbers",bar:"Bar",tabs:"Tabs"},m7=!0;function ns(e){return xO.includes(e)?e:zy}function Ky(e){return gO.includes(e)?e:zy}function IO(e){return pO.includes(e)?e:mO}var $y={cards:"flex-col gap-2.5",dots:"flex-row items-center gap-2",numbers:"flex-col gap-2",bar:"h-0.5 w-[34%] max-w-[420px] gap-px overflow-hidden rounded-full",tabs:"flex-row items-stretch w-full overflow-x-auto"};function Vy(e,t){return os(IO(t),$y[ns(e)])}function qy(e){return`flex ${$y[ns(e)]}`}function Yy(e){return e.shown!==!1&&(e.count??0)>1}function hO(e){return{name:e.dataset.slideName||"",process:e.dataset.slideProcess||"",video:e.dataset.slideMedia==="video"}}function bO(e,t){return e===t?!0:e.length!==t.length?!1:e.every((o,r)=>o.name===t[r].name&&o.process===t[r].process&&o.video===t[r].video)}function Xy(e,t){let o=Array.from(t,hO);return bO(e,o)?e:o}import{Fragment as $n,jsx as Me,jsxs as fd}from"react/jsx-runtime";function dd({slides:e,active:t,shape:o,placement:r,ref:n,tone:a="media",label:l}){let s=ns(o),i=a==="surface"?{"--overlay-fg":"var(--fg)","--overlay-chrome":"var(--fg)","--overlay-scrim":"var(--surface-2)"}:void 0;return fd("aside",{ref:n,"aria-label":l??"Featured slides",className:a==="surface"?qy(s):Vy(s,r),style:{color:"var(--overlay-fg)",...i},children:[s==="cards"&&Me(yO,{slides:e,active:t}),s==="dots"&&Me(SO,{count:e.length,active:t}),s==="numbers"&&Me(CO,{count:e.length,active:t}),s==="bar"&&Me(PO,{count:e.length,active:t}),s==="tabs"&&Me(kO,{slides:e,active:t})]})}function yO({slides:e,active:t}){return fd($n,{children:[Me("span",{className:"mb-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.28em] text-overlay-chrome/55",children:"Reel \xB7 pick a slide"}),e.map((o,r)=>{let n=r===t;return fd("button",{type:"button","data-idx":r,"aria-pressed":n,"aria-label":`Go to ${o.name||`slide ${r+1}`}`,className:["group flex w-[170px] cursor-pointer flex-col items-start gap-0.5 border bg-overlay-scrim/55 px-3 py-2.5 text-left transition-all motion-reduce:transition-none max-[1100px]:w-[140px]",n?"border-accent bg-overlay-scrim/70":"border-overlay-chrome/15 hover:border-overlay-chrome/45 hover:bg-overlay-scrim/70"].join(" "),children:[Me("span",{className:["font-display text-[length:var(--size-body,13px)] font-medium uppercase leading-tight tracking-[-0.01em]",n?"text-accent":"text-overlay-fg"].join(" "),children:o.name||`Slide ${r+1}`}),Me("span",{className:"font-mono text-[length:var(--size-label,9px)] uppercase tracking-[0.2em] text-overlay-chrome/55",children:n?"\u25B6 Now playing":o.process||" "})]},r)})]})}function SO({count:e,active:t}){return Me($n,{children:Array.from({length:e},(o,r)=>Me("button",{type:"button","data-idx":r,"aria-pressed":r===t,"aria-label":`Go to slide ${r+1}`,className:`h-2 cursor-pointer rounded-full transition-all motion-reduce:transition-none ${r===t?"w-5 bg-accent":"w-2 bg-overlay-chrome/45 hover:bg-overlay-chrome/70"}`},r))})}function CO({count:e,active:t}){return Me($n,{children:Array.from({length:e},(o,r)=>Me("button",{type:"button","data-idx":r,"aria-pressed":r===t,"aria-label":`Go to slide ${r+1}`,className:`cursor-pointer font-mono text-[length:var(--size-label,11px)] leading-none tracking-[0.06em] transition-colors ${r===t?"text-overlay-fg":"text-overlay-chrome/45 hover:text-overlay-chrome/80"}`,children:String(r+1).padStart(2,"0")},r))})}function PO({count:e,active:t}){return Me($n,{children:Array.from({length:e},(o,r)=>Me("button",{type:"button","data-idx":r,"aria-pressed":r===t,"aria-label":`Go to slide ${r+1}`,className:`h-full flex-1 cursor-pointer transition-colors ${r<=t?"bg-overlay-fg":"bg-overlay-chrome/25"}`},r))})}function kO({slides:e,active:t}){return Me($n,{children:e.map((o,r)=>{let n=r===t;return Me("button",{type:"button","data-idx":r,"aria-pressed":n,className:["flex min-w-[140px] flex-1 cursor-pointer items-end px-6 py-7 text-left transition-colors",r>0?"border-l border-overlay-chrome/15":"",n?"bg-overlay-scrim/70":"hover:bg-overlay-scrim/40"].join(" "),children:Me("span",{className:["font-heading3 text-[length:var(--size-headingSmall,24px)] font-medium uppercase leading-tight tracking-[-0.02em]",n?"text-overlay-fg":"text-overlay-chrome/55"].join(" "),children:o.name})},r)})})}import{useEffect as wO,useState as vO}from"react";var jy="(prefers-reduced-motion: reduce)";function TO(){return globalThis.window?.matchMedia?.(jy)?.matches??!1}function y7(){return TO()?"auto":"smooth"}function Jy(){let[e,t]=vO(!1);return wO(()=>{let o=globalThis.window?.matchMedia?.(jy);if(!o||(t(o.matches),typeof o.addEventListener!="function"))return;let r=n=>t(n.matches);return o.addEventListener("change",r),()=>o.removeEventListener("change",r)},[]),e}var Zy={min:40,max:100,step:5,fallback:100,unit:"vh"};function ud(e){return`${typeof e=="number"?e:Zy.fallback}${Zy.unit}`}function Qy(...e){return e.some(t=>typeof t=="number")}var RO=40;function FO(e,t){return Math.abs(e)<=RO||Math.abs(e)<=Math.abs(t)?null:e<0?"next":"prev"}function eS(e,t,o,r){let n=FO(e,t);return n?rs(n,o,r):o}function tS(e){return(e.count??0)>1&&e.editing!==!0}function oS(e){return e.editing!==!0?!1:(e.slides??[])[e.shown??0]?.video===!0}function rS(e){return e.editing!==!0?!1:!(e.playing===!0&&e.controlShown===!0)}import{jsx as Ut,jsxs as as}from"react/jsx-runtime";var LO=`
|
|
6
|
-
.hero-ticker-pick { cursor: pointer; }
|
|
7
|
-
.hero-ticker-pick:hover {
|
|
8
|
-
outline: 2px solid color-mix(in srgb, ${ys.accent} 45%, transparent);
|
|
9
|
-
outline-offset: -2px;
|
|
10
|
-
}
|
|
11
|
-
.hero-ticker-pick[data-selected] {
|
|
12
|
-
outline: 2px solid ${ys.accent};
|
|
13
|
-
outline-offset: -2px;
|
|
14
|
-
}
|
|
15
|
-
`,_O="Play video",AO="Hold video",OO="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",NO="item",BO=["","","","","",""],nS=new Map,aS="hero-slider:goto";function DO(e,t){let o=e?.ownerDocument?.defaultView;if(o)return o.addEventListener(aS,t),()=>o.removeEventListener(aS,t)}function MO({slides:e,alignment:t,textureOpacity:o,showTexture:r,textureColor:n,phoneUpDown:a,phoneSideways:l,autoplay:s,autoplayInterval:i,showTicker:c,tickerItems:f,heightDesktop:u,heightMobile:d,showPicker:p,pickerShape:x,pickerPlacement:g,showArrows:I,arrowsShape:h,arrowsPlacement:C,editing:S}){let P=Qy(u,d),T=P?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",b=P?{"--sf-hero-h-d":ud(u),"--sf-hero-h-m":ud(d)}:void 0,O=(f??BO.map(A=>({text:A}))).map(A=>A?.text?.trim()?A.text:S?NO:"").filter(Boolean),D=c!==!1,R=to(null),L=to(null),G=to(null),Y=to(null),M=to(null),v=EO(),j=to(v),[F,E]=Vn([]),[se,N]=Vn(0),le=to(0),[ge,ie]=Vn(!1),[te,he]=Vn(!1),[de,z]=Vn(null),Ae=Jy(),{selectedHeroId:Fe,select:Oe}=fh(),ne=Xr(()=>R.current?.querySelector(".hero-track")??null,[]),K=Xr((A,W=!1)=>{N(A),le.current=A,nS.set(j.current,A);let B=R.current?.querySelector(".hero-track");if(B)if(W){let ce=B.style.transition;B.style.transition="none",B.style.transform=`translateX(-${Math.max(0,A)*100}%)`,B.offsetHeight,B.style.transition=ce}else B.style.transform=`translateX(-${Math.max(0,A)*100}%)`},[]);jr(()=>{let A=R.current,W=A?.getAttribute("data-puck-component")||A?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||v;j.current=W,z(W);let B=nS.get(W);typeof B=="number"&&(N(B),le.current=B)},[]),jr(()=>{let A=ne();if(!A)return;let W=()=>{E(ce=>Xy(ce,A.querySelectorAll("[data-slide-name]")))};W();let B=new MutationObserver(W);return B.observe(A,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{B.disconnect()}},[ne]),jr(()=>{if(!S)return;let A=W=>{let B=W.detail;if(!B||typeof B.index!="number")return;let ce=R.current,Ie=ce?.getAttribute("data-puck-component")||ce?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||j.current;B.id&&B.id!==Ie||K(B.index,!0)};return DO(R.current,A)},[S,K]);let H=F.length,He=Math.min(Math.max(se,0),Math.max(0,H-1)),Ze=Yy({shown:p,count:H}),It=Uy({shown:I,count:H}),oo=oS({editing:S,shown:He,slides:F}),Ne=rS({editing:S,playing:te,controlShown:oo}),Ve=tS({count:H,editing:S}),ht=to(null),rt=to(null),zt=Xr(A=>{if(ht.current=null,rt.current=null,!Ve||A.touches.length!==1)return;let W=A.touches[0];ht.current={x:W.clientX,y:W.clientY},rt.current={x:W.clientX,y:W.clientY}},[Ve]),tr=Xr(A=>{if(!ht.current)return;if(A.touches.length!==1){ht.current=null;return}let W=A.touches[0];rt.current={x:W.clientX,y:W.clientY}},[]),Jr=Xr(()=>{let A=ht.current,W=rt.current;if(ht.current=null,rt.current=null,!Ve||!A||!W)return;let B=eS(W.x-A.x,W.y-A.y,le.current,H);B!==le.current&&K(B)},[Ve,H,K]);jr(()=>{if(S||!s||ge||Ae||H<=1)return;let W=Math.max(1,typeof i=="number"?i:6)*1e3,B=window.setTimeout(()=>K((He+1)%H),W);return()=>window.clearTimeout(B)},[S,s,i,ge,Ae,H,He,K]),jr(()=>{let A=[L.current,G.current,Y.current].filter(Boolean),W=A.map(ce=>ts(ce)),B=ce=>{let Ie=ce.target,ro=Ie.closest("[data-hero-nav]"),nt=ro??Ie.closest("[data-idx]");if(!nt)return;ce.stopPropagation(),ce.preventDefault();let Zr=ro?rs(ro.dataset.heroNav,le.current,H):Number(nt.dataset.idx);Number.isNaN(Zr)||(K(Zr,S),ne()?.querySelectorAll("[data-slide-name]")[Zr]?.click())};return A.forEach(ce=>ce.addEventListener("click",B,{capture:!0})),()=>{W.forEach(ce=>ce?.()),A.forEach(ce=>ce.removeEventListener("click",B,{capture:!0}))}},[H,K,ne,S]),jr(()=>{if(!S)return;let A=M.current;if(!A)return;let W=ts(A),B=ce=>{ce.stopPropagation(),ce.preventDefault();let Ie=R.current,ro=Ie?.getAttribute("data-puck-component")||Ie?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||j.current;Oe(ro)};return A.addEventListener("click",B,{capture:!0}),()=>{W?.(),A.removeEventListener("click",B,{capture:!0})}},[S,Oe,D,O.length]);let Ee=Xr(A=>{if(!A)return;let W=ts(A),B=ce=>{ce.stopPropagation(),ce.preventDefault(),he(Ie=>!Ie)};return A.addEventListener("click",B,{capture:!0}),()=>{W?.(),A.removeEventListener("click",B,{capture:!0})}},[]);return Ut(Ac.Provider,{value:{alignment:t,textureOpacity:o,textureOn:r,textureColor:n,quietVideo:Ne,phoneUpDown:a,phoneSideways:l},children:as("div",{ref:R,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${T} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:b,onMouseEnter:()=>ie(!0),onMouseLeave:()=>ie(!1),onTouchStart:zt,onTouchMove:tr,onTouchEnd:Jr,children:[Ut(e,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${He*100}%)`,transition:Ae?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),oo&&Ut("div",{ref:Ee,"data-hero-video-control":te?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${ku} + 16px)`},children:as("button",{type:"button",className:OO,children:[Ut("span",{"aria-hidden":"true",children:te?"\u275A\u275A":"\u25B6"}),te?AO:_O]})}),(Ze||It)&&as("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))_-_var(--sf-site-gutter,40px)*2))]",children:[Ze&&Ut(dd,{ref:L,slides:F,active:He,shape:Ky(x),placement:g}),It&&Ut(cd,{ref:Y,shape:h,placement:C})]}),Ze&&Ut("div",{ref:G,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:F.map((A,W)=>Ut("button",{type:"button","data-idx":W,"aria-label":`Go to slide ${W+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${W===He?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},W))}),D&&O.length>0&&as("div",{ref:M,className:`sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5${S?" hero-ticker-pick":""}`,"data-selected":S&&de!=null&&Fe===de?"":void 0,style:{background:"rgba(10,10,10,.55)"},children:[S&&Ut("style",{children:LO}),Ut(sd,{items:O,backdrop:"dark-media"})]})]})})}var qn=new Map,lS=e=>e??"";function pd(e,t,o){o&&qn.clear();let r=lS(t),n=qn.get(r);if(!n){let a=oe.listMenus(e,t);qn.set(r,a),a.catch(()=>{qn.get(r)===a&&qn.delete(r)}),n=a}return n}var ls=new Map;function sS(e,t){let o=lS(t),r=ls.get(o);if(!r){let n=pd(e,t,!0);ls.set(o,n);let a=()=>{ls.get(o)===n&&ls.delete(o)};n.then(a,a),r=n}return r}function $7(e,t=!1){return pd(e,_o(),t)}function V7(e){return sS(e,_o())}function q7(e,t=!1){return pd(e,null,t)}function Y7(e){return sS(e,null)}var X7={ids:new Set,handles:new Set};function j7(e){return{ids:new Set(e.map(t=>t.id).filter(Boolean)),handles:new Set(e.map(t=>t.handle).filter(Boolean))}}function J7({id:e,handle:t,editing:o,ready:r,live:n}){if(!o)return!1;let a=e??"",l=t??"";return!a&&!l?!0:r?a?!n.ids.has(a):!n.handles.has(l):!1}function Z7(e,t){if(t){if(t.id)return e.find(o=>o.id===t.id);if(t.handle)return e.find(o=>o.handle===t.handle)}}var HO={number:{label:"Number",follows:"Labels",builtIn:"14px",writable:!0},question:{label:"Question",follows:"Body",builtIn:"18px",writable:!0},answer:{label:"Answer",follows:"Body",builtIn:"15px",writable:!0}},iS=HO;var rY=Rr;var cS={rowLabel:{label:"Spec row name",follows:"Labels",builtIn:"14px"},rowValue:{label:"Spec row value",follows:"Labels",builtIn:"14px"},diagramTitle:{label:"Diagram title",follows:"Labels",builtIn:"12px"},diagramCallout:{label:"Diagram measurement",follows:"Labels",builtIn:"12px"},diagramStatLabel:{label:"Diagram stat name",follows:"Labels",builtIn:"11px"},diagramStatValue:{label:"Diagram stat value",follows:"Labels",builtIn:"11px"}};var fS={SpecTable:cS,FAQ:iS,Collections:xI};function iY(e){return e&&Object.hasOwn(fS,e)?fS[e]:null}import{forwardRef as GO,createElement as md}from"react";var dS={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};var ee=(e,t,o,r)=>{let n=GO(({color:a="currentColor",size:l=24,stroke:s=2,title:i,className:c,children:f,...u},d)=>md("svg",{ref:d,...dS[e],width:l,height:l,className:["tabler-icon",`tabler-icon-${t}`,c].join(" "),...e==="filled"?{fill:a}:{strokeWidth:s,stroke:a},...u},[i&&md("title",{key:"svg-title"},i),...r.map(([p,x])=>md(p,x)),...Array.isArray(f)?f:[f]]));return n.displayName=`${o}`,n};var WO=[["path",{d:"M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3",key:"svg-0"}]],xd=ee("outline","brand-facebook","BrandFacebook",WO);var UO=[["path",{d:"M4 8a4 4 0 0 1 4 -4h8a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-8a4 4 0 0 1 -4 -4l0 -8",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}],["path",{d:"M16.5 7.5v.01",key:"svg-2"}]],gd=ee("outline","brand-instagram","BrandInstagram",UO);var zO=[["path",{d:"M8 11v5",key:"svg-0"}],["path",{d:"M8 8v.01",key:"svg-1"}],["path",{d:"M12 16v-5",key:"svg-2"}],["path",{d:"M16 16v-3a2 2 0 1 0 -4 0",key:"svg-3"}],["path",{d:"M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10",key:"svg-4"}]],Id=ee("outline","brand-linkedin","BrandLinkedin",zO);var KO=[["path",{d:"M8 20l4 -9",key:"svg-0"}],["path",{d:"M10.7 14c.437 1.263 1.43 2 2.55 2c2.071 0 3.75 -1.554 3.75 -4a5 5 0 1 0 -9.7 1.7",key:"svg-1"}],["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-2"}]],hd=ee("outline","brand-pinterest","BrandPinterest",KO);var $O=[["path",{d:"M21 7.917v4.034a9.948 9.948 0 0 1 -5 -1.951v4.5a6.5 6.5 0 1 1 -8 -6.326v4.326a2.5 2.5 0 1 0 4 2v-11.5h4.083a6.005 6.005 0 0 0 4.917 4.917",key:"svg-0"}]],bd=ee("outline","brand-tiktok","BrandTiktok",$O);var VO=[["path",{d:"M3 21l1.65 -3.8a9 9 0 1 1 3.4 2.9l-5.05 .9",key:"svg-0"}],["path",{d:"M9 10a.5 .5 0 0 0 1 0v-1a.5 .5 0 0 0 -1 0v1a5 5 0 0 0 5 5h1a.5 .5 0 0 0 0 -1h-1a.5 .5 0 0 0 0 1",key:"svg-1"}]],yd=ee("outline","brand-whatsapp","BrandWhatsapp",VO);var qO=[["path",{d:"M4 4l11.733 16h4.267l-11.733 -16l-4.267 0",key:"svg-0"}],["path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772",key:"svg-1"}]],Sd=ee("outline","brand-x","BrandX",qO);var YO=[["path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8",key:"svg-0"}],["path",{d:"M10 9l5 3l-5 3l0 -6",key:"svg-1"}]],Cd=ee("outline","brand-youtube","BrandYoutube",YO);var XO=[["path",{d:"M18 2a1 1 0 0 1 .993 .883l.007 .117v4a1 1 0 0 1 -.883 .993l-.117 .007h-3v1h3a1 1 0 0 1 .991 1.131l-.02 .112l-1 4a1 1 0 0 1 -.858 .75l-.113 .007h-2v6a1 1 0 0 1 -.883 .993l-.117 .007h-4a1 1 0 0 1 -.993 -.883l-.007 -.117v-6h-2a1 1 0 0 1 -.993 -.883l-.007 -.117v-4a1 1 0 0 1 .883 -.993l.117 -.007h2v-1a6 6 0 0 1 5.775 -5.996l.225 -.004h3z",key:"svg-0"}]],Pd=ee("filled","brand-facebook-filled","BrandFacebookFilled",XO);var jO=[["path",{d:"M16 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-8a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-4 5a4 4 0 0 0 -3.995 3.8l-.005 .2a4 4 0 1 0 4 -4m4.5 -1.5a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1",key:"svg-0"}]],kd=ee("filled","brand-instagram-filled","BrandInstagramFilled",jO);var JO=[["path",{d:"M17 2a5 5 0 0 1 5 5v10a5 5 0 0 1 -5 5h-10a5 5 0 0 1 -5 -5v-10a5 5 0 0 1 5 -5zm-9 8a1 1 0 0 0 -1 1v5a1 1 0 0 0 2 0v-5a1 1 0 0 0 -1 -1m6 0a3 3 0 0 0 -1.168 .236l-.125 .057a1 1 0 0 0 -1.707 .707v5a1 1 0 0 0 2 0v-3a1 1 0 0 1 2 0v3a1 1 0 0 0 2 0v-3a3 3 0 0 0 -3 -3m-6 -3a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1",key:"svg-0"}]],wd=ee("filled","brand-linkedin-filled","BrandLinkedinFilled",JO);var ZO=[["path",{d:"M17 3.34a10 10 0 0 1 -8.512 18.023l2.364 -5.315a3.5 3.5 0 0 0 2.398 .952c2.708 0 4.75 -2.089 4.75 -5a6 6 0 1 0 -11.64 2.041a1 1 0 1 0 1.88 -.682a4 4 0 1 1 7.76 -1.36c0 1.818 -1.156 3.001 -2.75 3.001c-.609 0 -1.153 -.361 -1.478 -1.022l1.142 -2.572a1 1 0 0 0 -1.828 -.812l-4.392 9.882a10 10 0 0 1 -4.694 -8.476l.005 -.324a10 10 0 0 1 14.995 -8.336",key:"svg-0"}]],vd=ee("filled","brand-pinterest-filled","BrandPinterestFilled",ZO);var QO=[["path",{d:"M16.083 2h-4.083a1 1 0 0 0 -1 1v11.5a1.5 1.5 0 1 1 -2.519 -1.1l.12 -.1a1 1 0 0 0 .399 -.8v-4.326a1 1 0 0 0 -1.23 -.974a7.5 7.5 0 0 0 1.73 14.8l.243 -.005a7.5 7.5 0 0 0 7.257 -7.495v-2.7l.311 .153c1.122 .53 2.333 .868 3.59 .993a1 1 0 0 0 1.099 -.996v-4.033a1 1 0 0 0 -.834 -.986a5.005 5.005 0 0 1 -4.097 -4.096a1 1 0 0 0 -.986 -.835z",key:"svg-0"}]],Td=ee("filled","brand-tiktok-filled","BrandTiktokFilled",QO);var eN=[["path",{d:"M18.497 4.409a10 10 0 0 1 -10.36 16.828l-.223 -.098l-4.759 .849l-.11 .011a1 1 0 0 1 -.11 0l-.102 -.013l-.108 -.024l-.105 -.037l-.099 -.047l-.093 -.058l-.014 -.011l-.012 -.007l-.086 -.073l-.077 -.08l-.067 -.088l-.056 -.094l-.034 -.07l-.04 -.108l-.028 -.128l-.012 -.102a1 1 0 0 1 0 -.125l.012 -.1l.024 -.11l.045 -.122l1.433 -3.304l-.009 -.014a10 10 0 0 1 1.549 -12.454l.215 -.203a10 10 0 0 1 13.226 -.217m-8.997 3.09a1.5 1.5 0 0 0 -1.5 1.5v1a6 6 0 0 0 6 6h1a1.5 1.5 0 0 0 0 -3h-1l-.144 .007a1.5 1.5 0 0 0 -1.128 .697l-.042 .074l-.022 -.007a4.01 4.01 0 0 1 -2.435 -2.435l-.008 -.023l.075 -.041a1.5 1.5 0 0 0 .704 -1.272v-1a1.5 1.5 0 0 0 -1.5 -1.5",key:"svg-0"}]],Rd=ee("filled","brand-whatsapp-filled","BrandWhatsappFilled",eN);var tN=[["path",{d:"M8.267 3a1 1 0 0 1 .73 .317l.076 .092l4.274 5.828l5.946 -5.944a1 1 0 0 1 1.497 1.32l-.083 .094l-6.163 6.162l6.262 8.54a1 1 0 0 1 -.697 1.585l-.109 .006h-4.267a1 1 0 0 1 -.73 -.317l-.076 -.092l-4.276 -5.829l-5.944 5.945a1 1 0 0 1 -1.497 -1.32l.083 -.094l6.161 -6.163l-6.26 -8.539a1 1 0 0 1 .697 -1.585l.109 -.006h4.267z",key:"svg-0"}]],Fd=ee("filled","brand-x-filled","BrandXFilled",tN);var oN=[["path",{d:"M18 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-12a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-9 6v6a1 1 0 0 0 1.514 .857l5 -3a1 1 0 0 0 0 -1.714l-5 -3a1 1 0 0 0 -1.514 .857z",key:"svg-0"}]],Ed=ee("filled","brand-youtube-filled","BrandYoutubeFilled",oN);import{jsx as nN}from"react/jsx-runtime";var fX="outline",rN={instagram:{outline:gd,solid:kd},facebook:{outline:xd,solid:Pd},tiktok:{outline:bd,solid:Td},youtube:{outline:Cd,solid:Ed},x:{outline:Sd,solid:Fd},linkedin:{outline:Id,solid:wd},pinterest:{outline:hd,solid:vd},whatsapp:{outline:yd,solid:Rd}};function dX({platform:e,iconStyle:t,size:o}){let r=rN[e][t];return nN(r,{size:o,stroke:1.75,"aria-hidden":"true",focusable:"false"})}export{Jt as a,Sr as b,ph as c,Le as d,bn as e,u3 as f,g3 as g,I3 as h,h3 as i,Eu as j,Rl as k,Pp as l,N3 as m,G3 as n,Zc as o,Fh as p,kE as q,z3 as r,El as s,Eh as t,wE as u,vE as v,TE as w,V3 as x,q3 as y,Y3 as z,X3 as A,ia as B,wS as C,cN as D,po as E,fN as F,dN as G,_u as H,uN as I,pN as J,mN as K,FS as L,tf as M,ME as N,oK as O,aK as P,Oh as Q,lK as R,GE as S,sK as T,b2 as U,y2 as V,Ri as W,jt as X,Al as Y,lt as Z,gN as _,IN as $,hN as aa,bN as ba,fa as ca,yN as da,SN as ea,CN as fa,dt as ga,je as ha,vN as ia,OS as ja,TN as ka,RN as la,NS as ma,LN as na,BS as oa,_N as pa,MN as qa,on as ra,zS as sa,KS as ta,$S as ua,Rs as va,HN as wa,rC as xa,aC as ya,VN as za,Uu as Aa,dC as Ba,xC as Ca,rn as Da,qu as Ea,tB as Fa,mo as Ga,ln as Ha,uB as Ia,mB as Ja,xB as Ka,gB as La,IB as Ma,PC as Na,xo as Oa,SB as Pa,CB as Qa,up as Ra,vB as Sa,ba as Ta,FB as Ua,Ms as Va,Hs as Wa,ep as Xa,_B as Ya,Sa as Za,Ys as _a,gp as $a,Et as ab,Lt as bb,Pa as cb,y1 as db,vp as eb,ka as fb,js as gb,eP as hb,k1 as ib,Fp as jb,oP as kb,T1 as lb,R1 as mb,F1 as nb,E1 as ob,dP as pb,Be as qb,Mp as rb,A1 as sb,$p as tb,G1 as ub,va as vb,Xp as wb,jp as xb,W1 as yb,U1 as zb,Zp as Ab,z1 as Bb,Qp as Cb,K1 as Db,hP as Eb,$1 as Fb,pr as Gb,Io as Hb,em as Ib,Y1 as Jb,Ra as Kb,tm as Lb,om as Mb,rm as Nb,j1 as Ob,yP as Pb,am as Qb,lm as Rb,mr as Sb,sm as Tb,CP as Ub,Z1 as Vb,Q1 as Wb,Fa as Xb,cm as Yb,Ea as Zb,ri as _b,ai as $b,dm as ac,si as bc,ci as cc,gm as dc,wD as ec,Oa as fc,Na as gc,Rm as hc,Yt as ic,Vt as jc,ho as kc,Lm as lc,Do as mc,Am as nc,Om as oc,GD as pc,pn as qc,ke as rc,WD as sc,UD as tc,Da as uc,zD as vc,KD as wc,Ma as xc,UP as yc,Um as zc,zP as Ac,ZD as Bc,QD as Cc,VP as Dc,qP as Ec,eM as Fc,tM as Gc,oM as Hc,jP as Ic,ZP as Jc,qm as Kc,QP as Lc,rM as Mc,nM as Nc,aM as Oc,lM as Pc,sM as Qc,iM as Rc,cM as Sc,fM as Tc,dM as Uc,uM as Vc,ex as Wc,yi as Xc,Si as Yc,In as Zc,tx as _c,PM as $c,ox as ad,nx as bd,lx as cd,hn as dd,Fi as ed,Ei as fd,Sn as gd,Px as hd,Y2 as id,Nk as jd,Bk as kd,Dk as ld,Mk as md,Z2 as nd,Q2 as od,iH as pd,cH as qd,fH as rd,dH as sd,Xa as td,uH as ud,Cr as vd,pH as wd,vx as xd,Hk as yd,mH as zd,xH as Ad,gH as Bd,Mi as Cd,Vk as Dd,qk as Ed,ja as Fd,Rx as Gd,_x as Hd,ow as Id,CH as Jd,PH as Kd,So as Ld,kH as Md,wH as Nd,vH as Od,TH as Pd,Cw as Qd,kn as Rd,Gx as Sd,EH as Td,Ux as Ud,BH as Vd,DH as Wd,Pr as Xd,re as Yd,jH as Zd,Ot as _d,el as $d,zi as ae,nG as be,Ki as ce,dr as de,op as ee,ya as fe,No as ge,UB as he,zB as ie,Qw as je,bG as ke,ol as le,kG as me,fg as ne,Yi as oe,ll as pe,sl as qe,BG as re,Wo as se,$G as te,Qi as ue,s4 as ve,i4 as we,c4 as xe,f4 as ye,Mv as ze,ul as Ae,I4 as Be,w4 as Ce,v4 as De,ml as Ee,T4 as Fe,O4 as Ge,oc as He,Tn as Ie,zv as Je,N4 as Ke,Lg as Le,nc as Me,Ng as Ne,ac as Oe,tT as Pe,fT as Qe,G5 as Re,Mg as Se,ic as Te,K5 as Ue,Vg as Ve,qg as We,Q5 as Xe,eW as Ye,VB as Ze,qB as _e,ip as $e,YB as af,XB as bf,Us as cf,eI as df,fp as ef,Po as ff,tI as gf,HW as hf,Qt as if,BT as jf,yc as kf,Uh as lf,GK as mf,Hl as nf,uf as of,$K as pf,wt as qf,VK as rf,QK as sf,gf as tf,bf as uf,Sf as vf,sb as wf,fb as xf,i_ as yf,Q8 as zf,Rf as Af,Jo as Bf,mb as Cf,u$ as Df,Ib as Ef,hb as Ff,bb as Gf,P_ as Hf,O$ as If,N$ as Jf,$l as Kf,D$ as Lf,Gf as Mf,M$ as Nf,G_ as Of,H$ as Pf,W$ as Qf,zr as Rf,U$ as Sf,K_ as Tf,Vl as Uf,K$ as Vf,_b as Wf,V$ as Xf,q$ as Yf,Y$ as Zf,X$ as _f,j$ as $f,Yl as ag,Xl as bg,Z$ as cg,zb as dg,eV as eg,Vb as fg,qf as gg,Yf as hg,aV as ig,GA as jg,Zl as kg,xq as lg,gq as mg,Iq as ng,hq as og,bq as pg,YA as qg,yq as rg,Sq as sg,ZA as tg,Cq as ug,Pq as vg,kq as wg,wq as xg,vq as yg,qr as zg,ft as Ag,Tq as Bg,Rq as Cg,Fq as Dg,t0 as Eg,Eq as Fg,iy as Gg,er as Hg,r0 as Ig,Kr as Jg,Lq as Kg,n0 as Lg,dy as Mg,uy as Ng,_q as Og,Aq as Pg,Oq as Qg,Nq as Rg,Bq as Sg,Dq as Tg,Mq as Ug,Hq as Vg,Gq as Wg,Wq as Xg,my as Yg,xy as Zg,gy as _g,Iy as $g,Zo as ah,Uq as bh,zq as ch,Kq as dh,$q as eh,Vq as fh,qq as gh,Yq as hh,Xq as ih,To as jh,jq as kh,Jq as lh,Zq as mh,od as nh,Qq as oh,rd as ph,F0 as qh,e9 as rh,t9 as sh,o9 as th,r9 as uh,n9 as vh,a9 as wh,yy as xh,Sy as yh,Cy as zh,O0 as Ah,l9 as Bh,s9 as Ch,Yr as Dh,$e as Eh,y9 as Fh,S9 as Gh,C9 as Hh,P9 as Ih,k9 as Jh,w9 as Kh,v9 as Lh,G0 as Mh,T9 as Nh,R9 as Oh,F9 as Ph,E9 as Qh,L9 as Rh,_e as Sh,oI as Th,$W as Uh,bl as Vh,Cc as Wh,qW as Xh,YW as Yh,XW as Zh,jW as _h,JW as $h,ZW as ai,ts as bi,O9 as ci,N9 as di,M9 as ei,H9 as fi,$7 as gi,V7 as hi,q7 as ii,Y7 as ji,X7 as ki,j7 as li,J7 as mi,Z7 as ni,XI as oi,jI as pi,JI as qi,ZI as ri,Hc as si,Zt as ti,y7 as ui,aI as vi,oU as wi,rU as xi,uR as yi,dU as zi,uU as Ai,pU as Bi,gU as Ci,IU as Di,pI as Ei,qc as Fi,Rr as Gi,gI as Hi,wc as Ii,CR as Ji,II as Ki,PR as Li,vR as Mi,TR as Ni,RR as Oi,bI as Pi,OR as Qi,NR as Ri,HR as Si,_c as Ti,RI as Ui,FI as Vi,s6 as Wi,i6 as Xi,c6 as Yi,f6 as Zi,rF as _i,sF as $i,_r as aj,v6 as bj,Cl as cj,GI as dj,WI as ej,UI as fj,zI as gj,PF as hj,M6 as ij,kF as jj,TF as kj,Gc as lj,EF as mj,Pc as nj,mI as oj,bR as pj,SR as qj,PU as rj,kU as sj,Kc as tj,xz as uj,oh as vj,MF as wj,yz as xj,HF as yj,UF as zj,On as Aj,Dz as Bj,qF as Cj,Yc as Dj,Vz as Ej,Zz as Fj,Zy as Gj,ud as Hj,Qy as Ij,HO as Jj,rY as Kj,iY as Lj,mO as Mj,gO as Nj,zy as Oj,p7 as Pj,m7 as Qj,dd as Rj,lO as Sj,sO as Tj,iO as Uj,n7 as Vj,a7 as Wj,nd as Xj,ad as Yj,J0 as Zj,Z0 as _j,ld as $j,tO as ak,sd as bk,t3 as ck,o3 as dk,fh as ek,BO as fk,aS as gk,MO as hk,tE as ik,l3 as jk,s3 as kk,B0 as lk,p9 as mk,m9 as nk,x9 as ok,fX as pk,dX as qk};
|