efficient-storefront-blocks 0.134.5 → 0.135.1

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/chunks/{CustomHtmlCodeWindow-PCCIJDTP.js → CustomHtmlCodeWindow-FKPYCXCD.js} +1 -1
  3. package/dist/chunks/{EditorPreviewCheckout-PUHW43VL.js → EditorPreviewCheckout-FVJV7XRD.js} +1 -1
  4. package/dist/chunks/SiteEditorProvider-QDGGCHUC.js +1 -0
  5. package/dist/chunks/{chunk-UYU65XIT.js → chunk-75GXE5JB.js} +1 -1
  6. package/dist/chunks/chunk-ESXERZQ3.js +9 -0
  7. package/dist/chunks/chunk-RDWFRHEV.js +337 -0
  8. package/dist/chunks/{chunk-ITZRFN64.js → chunk-S63MCVEE.js} +1 -1
  9. package/dist/chunks/{chunk-JHEIFPET.js → chunk-VBCLGIPA.js} +1 -1
  10. package/dist/chunks/{chunk-VJSXEYRL.js → chunk-VLFGNHX5.js} +1 -1
  11. package/dist/chunks/{chunk-4HZQEMGD.js → chunk-XMX3KEE4.js} +1 -1
  12. package/dist/chunks/{chunk-GZKBN53C.js → chunk-Y3CRPIPD.js} +1 -1
  13. package/dist/chunks/{fitment-data-OO37TN7S.js → fitment-data-UPS55DR5.js} +1 -1
  14. package/dist/chunks/{section-css-style-K25L45AT.js → section-css-style-VSIE7KKW.js} +1 -1
  15. package/dist/index.js +24 -24
  16. package/dist/links.js +1 -1
  17. package/dist/render/built-with.json +1 -1
  18. package/dist/render/components/GalleryCard.d.ts +3 -1
  19. package/dist/render/components/GalleryCard.js +1 -1
  20. package/dist/render/components/GalleryGrid.js +3 -3
  21. package/dist/render/components/GalleryItem.d.ts +1 -0
  22. package/dist/render/components/GalleryItem.js +1 -1
  23. package/dist/render/lib/sections/gallery-toolbar.d.ts +1 -0
  24. package/dist/render/lib/sections/gallery-toolbar.js +1 -1
  25. package/dist/routine-index.json +1 -1
  26. package/dist/value-index.json +1 -1
  27. package/dist/words.d.ts +2 -0
  28. package/dist/words.js +2 -2
  29. package/package.json +3 -3
  30. package/dist/chunks/SiteEditorProvider-5GQBSTAR.js +0 -1
  31. package/dist/chunks/chunk-AKNNDIRL.js +0 -9
  32. package/dist/chunks/chunk-MM7TBACQ.js +0 -337
  33. /package/dist/chunks/{chunk-YMJRKOEC.js → chunk-62AOYUOH.js} +0 -0
  34. /package/dist/chunks/{chunk-XPDSLIZ3.js → chunk-GAND7LXQ.js} +0 -0
  35. /package/dist/chunks/{chunk-MM7TBACQ.js.LEGAL.txt → chunk-RDWFRHEV.js.LEGAL.txt} +0 -0
  36. /package/dist/chunks/{chunk-DSTQVJ5G.js → chunk-RNSKQVLG.js} +0 -0
  37. /package/dist/chunks/{chunk-ITZRFN64.js.LEGAL.txt → chunk-S63MCVEE.js.LEGAL.txt} +0 -0
@@ -1 +1 @@
1
- import{S as Q,X as Yt,_ as Xt,aa as Qt,ba as jt,da as U,g as Vt}from"./chunk-JHEIFPET.js";import{O as Wt,aa as at,ba as lt,da as Bt,ka as ct,la as Gt}from"./chunk-UYU65XIT.js";import{j as q}from"./chunk-YMJRKOEC.js";import{Hi as ve,Ii as Kt,ji as ze,pi as qt,vf as $t,wi as ut}from"./chunk-GZKBN53C.js";import{c as zt}from"./chunk-DSTQVJ5G.js";import{createContext as pr,useContext as an,useEffect as mr,useMemo as Pe,useState as on}from"react";function Jt(e,t){return e.map(n=>({partNumber:n.partNumber,quantity:n.wheels*t}))}function he(e,t){if(e.length===0)return null;let n=0;for(let r of e){let o=r.prices?.[t];if(typeof o!="number"||!Number.isFinite(o)||o<=0)return null;n+=o*r.wheels}return n}var dt=4,si=1;function ur(e){return e.spareAxle??"front"}var ai={unit:"set",spares:0,spareSide:"left"};function en(e){return e.unit==="single"?1:dt+e.spares}function tn(e,t){return[{partNumber:e.partNumber,wheels:en(t),prices:e.prices}]}function nn(e,t){let n=en(t)-dt;if(n<=0||e.length===0)return e;let r=cr(e),o=r?null:dr(e),i=r?r[t.spareSide]:o?o[t.spareSide][ur(t)]:0;return e.map((s,a)=>a===i?{...s,wheels:s.wheels+n}:s)}function cr(e){let t,n;for(let r=0;r<e.length;r+=1){let o=e[r].hand;if(o!=="left"&&o!=="right")continue;if((o==="left"?t:n)!==void 0)return null;o==="left"?t=r:n=r}return t!==void 0&&n!==void 0?{left:t,right:n}:null}function dr(e){let t={};for(let s=0;s<e.length;s+=1){let{hand:a,axle:c}=e[s];if(a!=="left"&&a!=="right"||c!=="front"&&c!=="rear")return null;let u=`${a}-${c}`;if(t[u]!==void 0)return null;t[u]=s}let{"left-front":n,"left-rear":r,"right-front":o,"right-rear":i}=t;return n!==void 0&&r!==void 0&&o!==void 0&&i!==void 0?{left:{front:n,rear:r},right:{front:o,rear:i}}:null}function ft(e){let t=typeof e.spares=="number"?e.spares:e.spare?1:0;return{unit:e.unit,spares:t,spareSide:e.spareSide??"left",...e.spareAxle?{spareAxle:e.spareAxle}:{}}}function pt(e,t){return t.spares>0?`${e} + spare`:e}function rn(e){return e.unit==="single"?"Single":pt(`Set of ${dt}`,e)}var li="data-add-to-basket",mt=9,fr="en",Zt=new Map;function qe(e,t,n){let r=`${e}|${t??""}|${n??""}`,o=Zt.get(r);return o||(o=new Intl.NumberFormat(fr,{style:"currency",currency:e,...t===void 0?{}:{minimumFractionDigits:t},...n===void 0?{}:{maximumFractionDigits:n}}),Zt.set(r,o)),o}function te(e,t,n=0){return qe(t,0,n).format(e)}function ui(e,t){return qe(t).format(e)}function ci(e,t){let n=e.savings[t];if(n===void 0)return null;let r=te(n,t);return e.savingIsFrom?`Save from ${r}`:`Save ${r}`}import{jsx as br}from"react/jsx-runtime";var gr="storefront-country",sn=gr,gt=pr(null);function yr(e){return ln(e,"catalogue")}function hr(e){return ln(e,"money")}function ln(e,t){let n=new Map(e.map(r=>[r.code,r.decimalPlaces]));return(r,o)=>{if(!o)return"";let i=n.get(o)??0;return qe(o,t==="money"?i:0,i).format(r)}}function gi({children:e,currencies:t,countries:n,defaultCurrency:r,defaultCountry:o}){let i=Pe(()=>t??[],[t]),s=Pe(()=>n??[],[n]),a=Pe(()=>r||i.find(g=>g.isDefault)?.code||i[0]?.code||"",[r,i]),c=Pe(()=>o||s.find(g=>g.isDefault)?.code||s[0]?.code||"",[o,s]),[u,m]=on(c),[C,p]=on(!1);mr(()=>{let g=q.getItem(sn);g&&s.some(L=>L.code===g)&&m(g),p(!0)},[s]);function R(g){m(g),q.setItem(sn,g)}let k=Pe(()=>{let g=s.find(b=>b.code===u)??null,L=g?.currency,w=L&&i.some(b=>b.code===L)?L:a,D=yr(i),E=hr(i);return{country:u,currency:w,setCountry:R,currencies:i,countries:s,activeCountry:g,formatPrice:(b,F)=>D(b,F??w),formatMoney:(b,F)=>E(b,F??w),ready:C}},[u,i,s,a,C]);return br(gt.Provider,{value:k,children:e})}function un(e){let t=an(gt);if(!t&&!e?.optional)throw new Error("useCurrency must be used within a CurrencyProvider");return t}function yi(){return an(gt)?.country??""}import{createContext as Gr,useCallback as _,useContext as Vr,useEffect as $,useMemo as Ln,useRef as j,useState as v}from"react";function cn(){return"/edit"}function fn(e,t){return e.valid?!1:e.reason==="firstOrderOnly"?!0:e.reason==="notEligible"&&!t}var pn="We'll confirm this discount when you place your order.",Si="Confirmed at checkout";function Ei(e){return e&&(e.valid||e.deferred)?e.code:void 0}var dn="coupon_code: ";function vi(e){return!(e instanceof Q)||e.status!==400||!e.message.startsWith(dn)?null:e.message.slice(dn.length)}function yt(e,t){return e.map(n=>({qty:n.qty,slug:n.slug,name:`${n.name.lead}${n.name.accent}`.trim(),finish:n.finishName,size:n.size,kind:n.kind,sku:n.sku,pack:n.pack,priceLabel:t(n)}))}var Cr=["width","profile","rim"],_i={width:"Width",profile:"Profile",rim:"Rim"},xr=/^\s*(\d{2,3})\s*\/\s*(\d{2,3})\s*[A-Za-z]*\s*(\d{2}(?:\.\d+)?)\s*$/,Sr={width:[100,500],profile:[20,100],rim:[10,30]};function ht(e){let t=xr.exec(e??"");if(!t)return null;let n={width:Number(t[1]),profile:Number(t[2]),rim:Number(t[3])};return Cr.every(o=>{let[i,s]=Sr[o];return n[o]>=i&&n[o]<=s})?n:null}function be(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 Ri(e){return[be({width:e.width}),be({width:e.width,profile:e.profile}),be(e)]}function Li(e){if(!e||e.year===null)return null;let{make:t,model:n,year:r,modification:o}=e;return!t||!n||!o?null:{make:t,model:n,year:r,modification:o}}function vr(e,t){let n=new URLSearchParams({make:t.make,model:t.model,year:String(t.year),modification:t.modification});return`/api/v1/tyres/${encodeURIComponent(e)}/fitment?${n.toString()}`}function Te(e,t=""){return{vehicle:{...e,region:t},status:"unknown",oemSizes:[],variants:[]}}function Pr(e,t){if(typeof t!="object"||t===null)return Te(e);let n=t,r=typeof n.vehicle=="object"&&n.vehicle!==null?n.vehicle:{},o=typeof r.region=="string"?r.region:"",i=n.status;if(i!=="fits"&&i!=="doesNotFit")return Te(e,o);let s=Array.isArray(n.variants)?n.variants.filter(a=>typeof a=="object"&&a!==null&&typeof a.sku=="string"&&typeof a.fits=="boolean"):[];return s.length===0?Te(e,o):{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:o},status:i,oemSizes:Array.isArray(n.oemSizes)?n.oemSizes.filter(a=>typeof a=="string"):[],variants:s.map(a=>({sku:a.sku,size:typeof a.size=="string"?a.size:"",fits:a.fits}))}}async function Ni(e,t){try{let n=await Yt(vr(e,t),{baseUrl:""});return Pr(t,n)}catch(n){return n instanceof Q&&n.status>=400&&n.status<500?Te(t):{...Te(t),failed:!0}}}function Ii(e){if(!e)return[];let t=[];for(let n of[...e.frontTyres,...e.rearTyres]){let r=ht(n);if(!r)continue;let o=be(r);t.includes(o)||t.push(o)}return t}function Oi(e,t){if(t.length===0)return null;for(let n of e){let r=ht(n);if(!r)continue;let o=be(r);if(t.includes(o))return o}return null}function Tr(e,t){if(!e||e.status==="unknown")return"unknown";let n=e.variants.find(r=>r.sku===t);return n?n.fits?"fits":"doesNotFit":"unknown"}var _r="/tyres";function mn(e){return e?`${_r}/${e}`:null}function Ke(e){let t=e.lastIndexOf(" ");return t===-1?{lead:"",accent:e}:{lead:e.slice(0,t+1),accent:e.slice(t+1)}}function Rr(e,t){return tn({partNumber:e.sku,prices:e.prices},t)}var Ar="Tyre";function gn(e,t,n,r){return{id:`${e.slug}|${t.sku}|${n.unit}|${n.spares>0?"spare":"no-spare"}`,slug:e.slug,name:Ke(e.name),process:e.brand||Ar,positionNo:"01",config:[{label:t.size},{label:rn(n)}],finishName:"",size:t.size,components:Rr(t,n),qty:r,href:mn(e.slug)??void 0,kind:"tyre",sku:t.sku,pack:n}}function Bi(e){return e.kind==="tyre"}function zi(e,t){let n=e.prices?.[t];return typeof n!="number"||!Number.isFinite(n)||n<=0?!1:e.inStock}var kr="dually";function Ct(e){let t=e.components.reduce((o,i)=>o+i.wheels,0)||4,n=e.kind,r=[n==="staggered"?"Staggered":n===kr?"Dually":""].filter(Boolean);return r.length?`${r.join(" ")} set of ${t}`:`Set of ${t}`}function wr(e,t){return[...new Set(e.filter(n=>!t||n.finishName===t).map(n=>n.size))]}function yn(e,t,n){if(!(!t||!n))return e.find(r=>r.finishName===t&&r.size===n)}function Lr(e){return e!=null&&e.inStock===!1}function Gi(e,t){return t?e.filter(n=>n.finishName===t&&Lr(n)):[]}function Vi(e,t,n){return t.findIndex((r,o)=>n[o]!==!1&&wr(e,r).length>0)}function Yi(e){let t=new Set((e.sizePairs??[]).map(o=>`${o.diameter}x${o.width}`)),n=e.spec?.pcds??[],r=e.spec?.etRange??[];return t.size===1&&n.length<=1&&(r.length===0||r[0]===r[r.length-1])}var bn="alloy-wheel",Nr="tyre";function Ge(e){return e.name||e.slug||"An item from your cart"}async function Cn(e,t){let n=[],r=new Map;for(let s of e){if(!s.slug){n.push(Ge(s));continue}let a=s.kind??bn,c=`${a}\0${s.slug}`,u=r.get(c);u?u.snaps.push(s):r.set(c,{kind:a,slug:s.slug,snaps:[s]})}let o=await Promise.all([...r.values()].map(s=>Ir(s,t))),i=[];for(let s of o)for(let a of s)a.ok?i.push(a.line):n.push(a.name);return{lines:i,dropped:n}}function hn(e){if(e instanceof Q&&e.status===404)return null;throw e}async function Ir(e,t){let n=e.snaps.map(r=>({ok:!1,name:Ge(r)}));if(e.kind===bn){let r=await t.getWheel(e.slug).catch(hn);return r?e.snaps.map(o=>Or(e.slug,r,o)):n}if(e.kind===Nr){let r=await t.getTyre(e.slug).catch(hn);return r?e.snaps.map(o=>Dr(r,o)):n}return n}function Or(e,t,n){let r=yn(t.variants,n.finish,n.size);if(!r)return{ok:!1,name:Ge(n)};let o=n.pack?ft(n.pack):void 0,i=(o?.spares??0)>0;return{ok:!0,line:{id:`${e}|${r.finishName}|${r.size}${i?"|spare":""}|restored`,slug:e,name:Ke(t.name),process:t.process,positionNo:"01",config:[{label:r.size},{label:r.finishName,gold:!0},{label:o?pt(Ct(r),o):Ct(r)}],finishName:r.finishName,size:r.size,components:o&&i?nn(r.components,o):r.components,qty:n.qty,...i?{pack:o}:{}}}}function Dr(e,t){let n={ok:!1,name:Ge(t)};if(!t.pack||!t.sku)return n;let r=ft(t.pack),o=e.variants.find(i=>i.sku===t.sku);return o?{ok:!0,line:gn(e,o,r,t.qty)}:n}var Ve="Price on request",rs="Request a quote",xn="from ",os="From ",is="each",Sn="Free",ss="Updating";function xt(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function St(e,t){let n=e?.[t];return xt(n)?n:null}function as(e,t,n,r){let o=St(e,n),i=St(t,n);return o===null&&i===null?0:o===null?1:i===null?-1:r==="asc"?o-i:i-o}function ls(e,t,n,r){if(n==null&&r==null)return!0;let o=St(e,t);return!(o===null||n!=null&&o<n||r!=null&&o>r)}var Fr={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function Mr(e,t,n){if(!xt(e))return Fr;let r=xt(t)&&t>e?t:null;return{priced:!0,unit:e,was:r,onSale:r!==null,setTotal:n!=null?e*n:null}}function us(e,t,n=""){return!e.priced||e.unit==null?Ve:`${n}${te(e.unit,t)}`}function cs(e,t){return e.was==null?null:te(e.was,t)}function En(e,t,n=1){let r=he(e,t);if(r===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};let o=e.reduce((s,a)=>s+a.wheels,0),i=Math.min(...e.map(s=>s.prices[t]));return{priced:!0,unit:i,isFrom:i*o!==r,setTotal:r*n}}var Hr={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function ds(e,t,n,r=1){let o=Mr(e.prices[n],e.msrpPrices?.[n],4),i=o.setTotal==null?null:o.setTotal*r;if(!t)return{priced:o.priced,unit:o.unit,isFrom:!0,was:o.was,onSale:o.onSale,setTotal:null,fromSetTotal:i};let s=En(t.components,n,r);return s.priced?{priced:!0,unit:s.unit,isFrom:s.isFrom,was:null,onSale:!1,setTotal:s.setTotal,fromSetTotal:i}:{...Hr,fromSetTotal:i}}function fs(e,t,n=1){let r=e.map(s=>En(s,t,n)),o=r[0];return!o||o.unit==null||o.setTotal==null?null:r.every(s=>s.priced&&!s.isFrom&&s.unit===o.unit&&s.setTotal===o.setTotal)?{unit:o.unit,setTotal:o.setTotal}:null}function ps(e,t){let n=e.setTotal==null?e.openSettled:null;return`+${Ur(n?{...e,unit:n.unit,isFrom:!1}:e,t)}`}function Ur(e,t){return!e.priced||e.unit==null?Ve:`${e.isFrom?xn:""}${te(e.unit,t)}`}function ms(e,t){return e.was==null?null:te(e.was,t)}function gs(e,t){let n=e.savings[t];if(n===void 0||e.components.length===0)return null;let r=0;for(let i of e.components){let s=i.prices?.[t];if(typeof s!="number")return null;r+=s*i.quantity}let o=te(r-n,t);return{was:te(r,t),amount:e.savingIsFrom?`${xn}${o}`:o}}var $r=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function vn(e){return $r.test(e.trim())}var Pn="sf:ga-purchases",Wr=20;function _n(){return typeof window>"u"||window.parent!==window}function _e(...e){try{if(_n()||typeof window.gtag!="function")return;window.gtag(...e)}catch{}}function Br(e,t){let n=e.config.find(r=>r.gold)?.label;return{item_id:`${e.slug}|${e.finishName}|${e.size}`,item_name:`${e.name.lead}${e.name.accent}`.trim(),...n?{item_variant:n}:{},price:he(e.components,t)??0,quantity:e.qty}}function Et(e,t){return e.filter(Re).map(n=>Br(n,t))}function Ss(e){_e("event","view_item",{currency:e.currency,value:e.pricePerSet,items:[{item_id:e.itemId,item_name:e.itemName,...e.variant?{item_variant:e.variant}:{},price:e.pricePerSet,quantity:1}]})}function Rn(e,t){let n=Et([e],t);n.length!==0&&_e("event","add_to_cart",{currency:t,value:n[0].price*n[0].quantity,items:n})}function Es(e){let t=Et(e.lines,e.currency);t.length!==0&&_e("event","begin_checkout",{currency:e.currency,value:e.value,...e.coupon?{coupon:e.coupon}:{},items:t})}var Tn=new Set;function zr(e){if(Tn.has(e))return!1;Tn.add(e);try{let t=JSON.parse(q.getItem(Pn)??"[]");if(t.includes(e))return!1;q.setItem(Pn,JSON.stringify([...t,e].slice(-Wr)))}catch{}return!0}function vs(e){let t=e.confirmation;if(_n()||!zr(t.orderNumber))return;let n=t.currency,r=Number(t.grandTotal);_e("event","purchase",{transaction_id:t.orderNumber,currency:n,value:r,shipping:Number(t.freightCharge),...t.couponCode?{coupon:t.couponCode}:{},items:Et(e.lines,n)}),e.adsSendTo&&_e("event","conversion",{send_to:e.adsSendTo,transaction_id:t.orderNumber,currency:n,value:r})}var qr="Arranged after review",An="Calculated at checkout",Kr=An,_s=An;function kn({quoted:e,optionCount:t,chosenAmount:n,couponWaivesFreight:r}){return e&&t===0?"arranged":r?"free":n===void 0?"pending":n===0?"free":"charged"}function wn(e,t){return e*(100-t)/100}function Rs({discount:e,deliverySaving:t},n){return[e>0?`\u2212 ${n(e)}`:null,t>0?`${n(t)} off delivery`:null].filter(Boolean).join(" \xB7 ")}function As(e){switch(e){case"arranged":return qr;case"pending":return Kr;case"free":return Sn;case"charged":return null}}import{jsx as jr}from"react/jsx-runtime";var Yr=400,Xr=400,Qr=1500,vt="storefront-cart";function Re(e){return(e.components?.length??0)>0}function Nn(e,t){return{code:e,valid:t.valid,deferred:fn(t,t.askedAsShopper),message:t.message||void 0,effects:t.effects??void 0}}function On(e,t){return he(e.components,t)}function Pt(e,t){let n=On(e,t);return n===null?null:n*e.qty}function In(e){return e!=="tyre"}var Dn=Gr(null);function zs({children:e,preview:t=!1}){let{currency:n,country:r,formatMoney:o}=un(),[i,s]=v(t),[a,c]=v([]),[u,m]=v([]),[C,p]=v([]),[R,k]=v(!1),g=j(new Set),[L,w]=v([]),[D,E]=v(!1),[b,F]=v(null),[K,oe]=v(null),[fe,h]=v(null),[P,x]=v(0),M=_(()=>x(l=>l+1),[]),[Z,Ce]=v(void 0),[G,Ne]=v(null),[T,H]=v(null),[V,ie]=v(!1),[O,pe]=v(null),se=j(void 0),Y=_(()=>s(!0),[]),J=_(()=>s(!1),[]),Ie=_(()=>s(l=>!l),[]);$(()=>{t||typeof window>"u"||new URLSearchParams(window.location.search).get("cart")==="open"&&Y()},[Y,t]);let W=cn(),X=j(W);$(()=>{X.current!==W&&(X.current=W,t||J())},[W,t,J]);let Oe=_(l=>{Ne(f=>f?.country===l?.country&&f?.subdivision===l?.subdivision&&f?.postcode===l?.postcode?f:l)},[]),I=_((l,f)=>{E(!0),!(!f||!In(l))&&w(d=>d.includes(f)?d:[...d,f])},[]),De=D||a.length>0,ae=j(!0);$(()=>(ae.current=!0,()=>{ae.current=!1}),[]),$(()=>{if(t)return;let l=[...L,...a.filter(d=>In(d.kind)).map(d=>d.slug)],f=[...new Set(l)].filter(d=>d&&!g.current.has(d));if(f.length!==0){for(let d of f)g.current.add(d);U.listWheelsBySlug(f).then(d=>{if(!ae.current||d.length===0)return;let y=new Set(d.map(S=>S.slug));m(S=>[...S.filter(ce=>!y.has(ce.slug)),...d])})}},[t,L,a]),$(()=>{if(t||!De||R)return;let l=!0;return U.listBundles().then(f=>{l&&(p(f),k(!0))}),()=>{l=!1}},[t,De,R]);let B=b?.deliveryOptions??[],xe=b?.courier??null;$(()=>{b&&pe(l=>l&&B.some(f=>f.id===l)?l:B[0]?.id??null)},[b]);let le=_(()=>a.filter(Re).flatMap(l=>Jt(l.components,l.qty)),[a]),Se=_(async(l,f)=>{let d=l.trim().toUpperCase();if(!d)return;let y=le();if(y.length===0){H({code:d,valid:!1,message:"Add a wheel to the cart first."});return}ie(!0),se.current=f;try{let S=await U.validateCoupon({code:d,items:y,currency:n,shippingMethodId:O??void 0,customerEmail:f});H(Nn(d,S))}catch{H({code:d,valid:!1,unchecked:!0,message:"Could not check that code. Please try again."})}finally{ie(!1)}},[le,n,O]),me=_(()=>{H(null),se.current=void 0},[]),Fe=_(l=>{if(!T)return;let{code:f}=T;H(d=>d&&d.code===f?{code:f,valid:!1,refused:!0,message:l}:d)},[T]);$(()=>{if(!T||T.refused)return;let l=T.code,f=y=>y!==null&&y.code===l&&!y.refused,d=setTimeout(async()=>{let y=le();if(y.length===0){H(S=>f(S)?{code:l,valid:!1,message:"Add a wheel to the cart first."}:S);return}ie(!0);try{let S=await U.validateCoupon({code:l,items:y,currency:n,shippingMethodId:O??void 0,customerEmail:se.current});H(ce=>f(ce)?Nn(l,S):ce)}catch{}finally{ie(!1)}},Yr);return()=>clearTimeout(d)},[a,n,O]);let ue=T&&!T.refused?T.code:void 0;$(()=>{if(t)return;let l=!0,f=a,d=setTimeout(async()=>{let y=le();if(y.length===0){F(null),oe(null),Ce(void 0);return}try{let S=await U.quoteCart({items:y,currency:n,shippingMethodId:O??void 0,couponCode:ue,customerEmail:se.current||void 0,country:G?.country||r||void 0,subdivision:G?.country&&G.subdivision||void 0,postcode:G?.country&&G.postcode||void 0});if(!l)return;F(S),oe(f),h(null)}catch{if(!l)return;h(f)}Ce(ue)},Xr);return()=>{l=!1,clearTimeout(d)}},[a,n,O,ue,r,G,P]);let A=_(l=>{c(f=>{let d=f.findIndex(y=>y.id===l.id);return d===-1?[...f,l]:f.map((y,S)=>S===d?{...y,qty:Math.min(mt,y.qty+l.qty)}:y)}),Rn(l,n)},[n]),ee=_(l=>{c(f=>f.filter(d=>d.id!==l))},[]),Me=_((l,f)=>{let d=Math.max(1,Math.min(mt,f));c(y=>y.map(S=>S.id===l?{...S,qty:d}:S))},[]),He=_(l=>{c(l)},[]),[Ue,tt]=v(!1),[Lt,er]=v([]),Nt=j(a);Nt.current=a,$(()=>{if(t)return;let l=[];try{let d=JSON.parse(q.getItem(vt)??"[]");Array.isArray(d)&&(l=d)}catch{}if(l.length===0){tt(!0);return}let f=!0;return Cn(l,U).then(({lines:d,dropped:y})=>{f&&(Nt.current.length===0&&(He(d),er(y)),tt(!0))},d=>{f&&tt(!0)}),()=>{f=!1}},[t,He]),$(()=>{if(t||!Ue)return;let l=a.filter(Re);if(l.length===0){q.removeItem(vt);return}q.setItem(vt,JSON.stringify(yt(l,()=>"")))},[a,t,Ue]);let[Ee,tr]=v(null),It=j(null);It.current=Ee;let z=j(null),nt=j(""),Ot=_((l,f)=>{let d=l.trim().toLowerCase();vn(d)&&tr(y=>y&&y.email===d&&y.firstName===(f??"")?y:{email:d,firstName:f??""})},[]);$(()=>{if(t||!Ee)return;let l=yt(a.filter(Re),y=>Pt(y,n)===null?Ve:o(Pt(y,n),n)),f={email:Ee.email,firstName:Ee.firstName,currency:n,items:l},d=JSON.stringify(f);if(d!==nt.current)return z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{z.current=null,nt.current=d,U.captureCart(f).catch(y=>{})},Qr),()=>{z.current&&(clearTimeout(z.current),z.current=null)}},[a,Ee,n,t]);let Dt=_(()=>{z.current&&(clearTimeout(z.current),z.current=null);let l=It.current;l&&(nt.current="",U.captureCart({email:l.email,firstName:l.firstName,currency:n,items:[]}).catch(f=>{}))},[n]),Ft=Ln(()=>{let l=a.reduce((N,ye)=>{let Be=Pt(ye,n);return Be===null?N:N+Be},0),f=a.some(N=>On(N,n)===null),d=a.reduce((N,ye)=>N+ye.qty,0),y=T?.valid?T.effects:void 0,S=y?Math.min(l,Number(y.discountAmount)):0,ce=b?.bundleDiscount??0,rr=b?.appliedBundles??[],$e=!!y?.freeShipping,ge=B.find(N=>N.id===O),rt=Number(y?.deliveryDiscountPercent??0),We=!$e&&rt>0&&rt<100?rt:0,ot=We>0&&ge?wn(ge.amount,We):void 0,it=$e?0:ot!==void 0&&Z!==ue?ot:b?.shipping??ot??ge?.amount??0,or=We>0&&ge?Math.max(0,ge.amount-it):0,ir=kn({quoted:b!==null,optionCount:B.length,chosenAmount:ge?.amount,couponWaivesFreight:$e}),st={};for(let N of y?.freeUnits??[])st[N.partNumber]=(st[N.partNumber]??0)+N.quantity;let sr=b?.tax??null,ar=b?b.grandTotal:l-S-ce+it;return{sets:d,units:a.reduce((N,ye)=>N+(ye.components??[]).reduce((Be,lr)=>Be+lr.wheels*ye.qty,0),0),subtotal:l,hasUnpricedLine:f,discount:S,bundleDiscount:ce,appliedBundles:rr,shipping:it,freeShipping:$e,deliveryDiscountPercent:We,deliverySaving:or,shippingStatus:ir,freeUnitsByPartNumber:st,tax:sr,grand:ar,repricing:!!T?.refused&&b!==null&&Z===T?.code,quoted:b!==null&&K===a,serverSubtotal:b?.subtotal??null,quoteFailed:fe===a,currency:n}},[a,n,T,ue,B,O,b,Z,K,fe]),Mt=j(!0),Ht=_(l=>{Mt.current=l},[]),Ut=_(l=>{A(l),Mt.current&&Y()},[A,Y]),nr=Ln(()=>({isOpen:i,preview:t,open:Y,close:J,toggle:Ie,items:a,basketRead:t||Ue,catalog:u,bundles:C,warmCatalog:I,add:A,addAndOpen:Ut,setAutoOpen:Ht,remove:ee,setQty:Me,replaceItems:He,restoreDropped:Lt,identify:Ot,clearCapturedCart:Dt,coupon:T,applyCoupon:Se,removeCoupon:me,refuseCoupon:Fe,couponBusy:V,deliveryOptions:B,setQuoteDestination:Oe,courier:xe,requote:M,shippingMethodId:O,setShippingMethodId:pe,totals:Ft}),[i,t,Y,J,Ie,a,Ue,u,C,I,A,Ut,Ht,ee,Me,He,Lt,Ot,Dt,T,Se,me,Fe,V,B,Oe,xe,M,O,Ft]);return jr(Dn.Provider,{value:nr,children:e})}function Fn(){let e=Vr(Dn);if(!e)throw new Error("useCart() must be called inside <CartProvider>. Mount the provider in app/layout.tsx.");return e}import{cache as ao}from"react";function Mn(e){return/(?:^|\|)(?:slug|xhost):/.test(e)}function Hn(e,t,n,r){for(;e.size>=t;){let o,i;for(let[a,c]of e){if(c.expiresAt<=r){o=a;break}i===void 0&&n(a)&&(i=a)}let s=o??i??e.keys().next().value;if(s===void 0)return;e.delete(s)}}var Zr=6e4,Jr=5e3,eo=500,Ye=new Map;async function to(e){let{host:t,matchesRequestHost:n}=await Xt();if(!t)return"";let r=await Qt();return r?`${e}|slug:${encodeURIComponent(t)}/${encodeURIComponent(r)}`:n?`${e}|host:${t}`:`${e}|xhost:${t}`}async function Un(e,t){if(await jt()!==null)return t();let n=await to(e);if(!n)return t();let r=Date.now(),o=Ye.get(n);if(o&&o.expiresAt>r)return o.load;let i=await t(),s=i.outcome.state==="failed",a=s?Jr:Zr,c=Ye.get(n)?.lastGood,u=i.outcome.state==="ok"?i:s?c:void 0,m=s&&u?u:i;return Hn(Ye,eo,Mn,r),Ye.set(n,{load:m,expiresAt:r+a,lastGood:u}),m}var no=404;function ro(e){if(e instanceof Q&&e.status===no)return{state:"absent"};let t=e instanceof Q?e.status:-1,n=e instanceof Error?e.message:String(e);return{state:"failed",status:t,detail:n}}var oo="[storefront:chrome-load-failed]";function io(e,t){console.error(`${oo} ${e} status=${t.status} \u2014 serving fallback chrome`,t.detail)}async function $n(e,t,n,r){try{let o=await t();return r?.(o)?{value:o,outcome:{state:"absent"}}:{value:o,outcome:{state:"ok"}}}catch(o){let i=ro(o);return i.state==="failed"&&io(e,i),{value:n,outcome:i}}}function so(e){return e==="production"?"silent":"banner"}var js=so("production");function lo(e,t){return e?.trim()||t}function ia({legalName:e,foundedYear:t,siteName:n},r=new Date().getFullYear()){let o=lo(e,n);return`\xA9 ${t&&t<r?`${t}\u2013${r}`:`${r}`} ${o}`}var uo={name:ve,legalName:null,foundedYear:null,faviconUrl:null,currencies:[],defaultCurrency:null,countries:[],defaultCountry:null,commerceEnabled:!0,cardPayments:!1,paymentMethods:[],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,privacyPage:null,termsPage:null,footerCookieSettings:!0,footerSitemap:!0,socialLinks:ct},sa=ao(async()=>Un("site",()=>$n("site",async()=>{let e=await U.getSite();return{name:Kt(e.name),legalName:e.legalName?.trim()||null,foundedYear:e.foundedYear??null,faviconUrl:e.faviconUrl??null,currencies:e.currencies??[],defaultCurrency:e.defaultCurrency??null,countries:e.countries??[],defaultCountry:e.defaultCountry??null,commerceEnabled:e.commerceEnabled??!0,cardPayments:e.cardPayments??!1,paymentMethods:e.paymentMethods??(e.cardPayments?["card"]:[]),paypalClientId:e.paypalClientId??null,paypalEnvironment:e.paypalEnvironment??null,squareApplicationId:e.squareApplicationId??null,squareLocationId:e.squareLocationId??null,squareEnvironment:e.squareEnvironment??null,ga4MeasurementId:e.ga4MeasurementId??null,googleAdsId:e.googleAdsId??null,googleAdsConversionLabel:(e.googleAdsId?e.googleAdsConversionLabel:null)??null,metaPixelId:e.metaPixelId??null,consentEnabled:e.consentEnabled??!1,consentPrivacyPage:e.consentPrivacyPage??null,consentNoticeOptOut:e.consentNoticeOptOut??!1,privacyPage:e.privacyPage??null,termsPage:e.termsPage??null,footerCookieSettings:e.footerCookieSettings??!0,footerSitemap:e.footerSitemap??!0,socialLinks:Gt(e.socialLinks)}},uo)));var aa={name:ve,legalName:null,foundedYear:null,faviconUrl:null,currencies:[{code:"USD",symbol:"$",decimalPlaces:2,isDefault:!0}],defaultCurrency:"USD",countries:[{code:"US",name:"United States",currency:"USD",url:"",isDefault:!0,chargeTax:!1,taxDisplay:"none",taxName:"",taxRate:null,postalLabel:"Zip Code"}],defaultCountry:"US",commerceEnabled:!0,cardPayments:!0,paymentMethods:["card"],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,privacyPage:null,termsPage:null,footerCookieSettings:!0,footerSitemap:!0,socialLinks:ct};import{jsx as co}from"react/jsx-runtime";function ua({tone:e="bad",role:t,children:n}){return co("div",{role:t,className:["border bg-surface px-4 py-3 text-[14px] leading-relaxed text-fg",e==="good"?"border-accent":e==="bad"?"border-alert":"border-line"].join(" "),children:n})}import{jsx as ke,jsxs as Tt}from"react/jsx-runtime";import{useEffect as Xe,useId as go,useRef as Bn,useState as Qe}from"react";import{useRootIsDark as yo}from"efficient-shell/theme";import{efficientClientOpen as fo}from"efficient-easel/screen/lib/session";var Ae=new Map,po=64;async function mo(e){if(!fo())return null;try{let t=await fetch(`${zt()}/logo-analysis.json?url=${encodeURIComponent(e)}`);if(!t.ok)return null;let n=await t.json();if(!n||typeof n!="object")return null;let{reversed:r,inkIsDark:o}=n;return typeof r!="string"?null:{reversed:r,inkIsDark:typeof o=="boolean"?o:null}}catch{return null}}function Wn(e){let t=Ae.get(e);if(t)return t;let n=mo(e);if(Ae.set(e,n),Ae.size>po){let r=Ae.keys().next();r.done||Ae.delete(r.value)}return n}var ho=202/22,bo=.88,Aa=16,Co="invert(1)";function ka({variant:e="header",scrolled:t=!0,src:n,reverse:r=!1,color:o=null,onLightSurface:i,reversedSrc:s,inkIsDark:a,size:c="medium",sizePx:u,sizeUnit:m,wordmark:C,siteName:p=ve,fitToContainer:R=!1,fitWordmarkToContainer:k=!1,fitFloorPx:g,hideClass:L,hideAttrs:w,part:D}){let E=C&&C.trim()?C.trim():p,[b,F]=Qe(null),K=Bn(null),oe=A=>{K.current=A};Xe(()=>{F(K.current?.ownerDocument??null)},[]);let fe=!yo({doc:b,whenUnset:!0}),h=n&&n.trim()?n.trim():null,P=!!h&&Vt(h),x=i??(fe&&t),M=o&&o.trim()?o.trim():null,Z=r&&!M,Ce=`logo-color-${go().replace(/[^A-Za-z0-9_-]/g,"")}`,G=Z&&P&&h&&s!=null?{reversed:s,inkIsDark:a??null}:null,Ne=G!==null,[T,H]=Qe(null);Xe(()=>{if(!Z||!h||!P||Ne){H(null);return}let A=!1;return H(null),Wn(h).then(ee=>{A||H(ee)}),()=>{A=!0}},[Z,h,P,Ne]);let V=G??T,ie=!!V&&V.inkIsDark!==null&&(x?!V.inkIsDark:V.inkIsDark),O=Z&&!!h&&!P&&!x,pe=ie&&V?V.reversed:h,se=pe?[pe]:[],[Y,J]=Qe(0);Xe(()=>{J(0)},[h,ie]);let Ie=e==="footer"?lt:at[c],W=u&&u>0?u:Ie,X=(u&&u>0?$t(u,m,"size",Bt):null)??`${W}px`,Oe=Math.round(W*ho),I=Y<se.length?se[Y]:null,[De,ae]=Qe(pe),B=I!==null&&I===De,xe=Bn(null);Xe(()=>{let A=xe.current;if(!A||!A.complete)return;if(A.naturalWidth>0||A.naturalHeight>0){ae(I);return}let ee=!1;return A.decode().then(()=>!ee&&ae(I),()=>!ee&&J(Me=>Me+1)),()=>{ee=!0}},[I]);let le=R||k,Se=`calc(100cqi / ${((E.length+1)*bo).toFixed(2)})`,me=le&&g&&g>0?X===`${W}px`?`${Math.min(g,W)}px`:`min(${g}px, ${X})`:null,Fe=le?me===null?`min(${X}, ${Se})`:`clamp(${me}, ${Se}, ${X})`:X,ue=Tt("span",{className:`font-display font-bold tracking-[0.18em] ${me===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:Fe,lineHeight:1,...M?{color:M}:{}},"aria-label":E,children:[E,ke("span",{className:"text-accent",style:M?{color:M}:void 0,children:"."})]});return Tt("span",{ref:oe,className:Wt("inline-flex items-center",L??""),...w,...D,children:[!B&&ue,M&&I&&ke("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:Tt("filter",{id:Ce,colorInterpolationFilters:"sRGB",children:[ke("feFlood",{style:{floodColor:M}}),ke("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),I&&ke("img",{ref:xe,src:I,alt:E,width:Oe,height:W,className:"shrink-0 object-contain",style:{...B?{height:X,width:"auto",...R?{maxWidth:"100cqi"}:{}}:{display:"none"},...O?{filter:Co}:{},...M?{filter:`url(#${Ce})`}:{}},onLoad:()=>ae(I),onError:()=>J(A=>A+1)},I)]})}import{parseOption as je}from"efficient-shell/format";function Ia(e){return typeof e=="number"&&Number.isInteger(e)&&e>=ze.min&&e<=ze.max?e:ze.default}var Oa="fixed inset-x-0 bottom-0 top-[var(--sf-header-h,88px)]",Da=e=>!!e&&e.startsWith("/wheels/")&&e!=="/wheels",xo="data-site-main",So="shared";function Fa(e){if(!e)return!1;if(e.querySelector(`.${qt}, [${ut}="own"]`))return!0;let t=e.querySelector(`main[${xo}]`);return t!=null&&t.querySelector(`[${ut}="${So}"]`)==null}var Ma=(e,t)=>!e&&t?"var(--section-bg)":"var(--bg)",Eo=[{label:"Uppercase",value:"uppercase"},{label:"Capitalised",value:"capitalised"}],vo="uppercase",Ha=e=>je(Eo,vo,e),Po=[{label:"Icon",value:"icon"},{label:"Text",value:"text"}],To="icon",Ua=e=>je(Po,To,e),$a=[{label:"Own row",value:"top"},{label:"Same row",value:"inline"}],Wa="top",Ba=e=>e==="inline"?"inline":e==="top"||e==="bottom"?"top":null,_o="custom";function za(e,t){return e!==_o||typeof t!="string"?null:t.trim()||null}var qa=80,Ro=0,Ao=100,Ka="data-header-link-opacity",Ga="--sf-header-link-opacity";function Va(e){if(!(typeof e!="number"||!Number.isFinite(e)))return Math.min(Ao,Math.max(Ro,Math.round(e)))}var ko=[{label:"Medium",value:"medium"},{label:"Large",value:"large"}],wo="medium",Lo={medium:{size:18,stroke:1.6},large:{size:20,stroke:1.4}},No=[{label:"Cart",value:"cart"},{label:"Bag",value:"bag"}],Io="cart",Ya=e=>({cart:je(No,Io,e.cartIcon),glyph:Lo[je(ko,wo,e.iconSize)]});var Qa="w-full border-2 border-line bg-bg px-4 py-4 font-display text-[17px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent",zn="w-0 min-w-0 flex-1",ja="w-0 min-w-[7rem] flex-1";import{jsx as we,jsxs as Do}from"react/jsx-runtime";function Oo({spokes:e,mesh:t=!1,className:n}){let s=c=>Math.round(c*1e3)/1e3,a=[];for(let c=0;c<e;c++){let u=c/e*Math.PI*2-Math.PI/2;if(a.push({x1:s(100+Math.cos(u)*22),y1:s(100+Math.sin(u)*22),x2:s(100+Math.cos(u)*86),y2:s(100+Math.sin(u)*86),main:!0}),t){let m=u+Math.PI/e;a.push({x1:s(100+Math.cos(m)*22*1.4),y1:s(100+Math.sin(m)*22*1.4),x2:s(100+Math.cos(m)*78),y2:s(100+Math.sin(m)*78),main:!1})}}return Do("svg",{viewBox:"0 0 200 200",fill:"none",stroke:"currentColor",className:n??"block h-[70%] w-[70%] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",children:[we("circle",{cx:100,cy:100,r:92,strokeWidth:2}),we("circle",{cx:100,cy:100,r:84,strokeWidth:1,opacity:.4}),we("circle",{cx:100,cy:100,r:22,strokeWidth:2}),we("circle",{cx:100,cy:100,r:6,fill:"currentColor"}),a.map((c,u)=>we("line",{x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:"currentColor",strokeWidth:c.main?6:3,strokeLinecap:"round",opacity:c.main?1:.5},u))]})}var tl="#c9a461",qn=[{f:"black",label:"Black",hex:"#171717"},{f:"silver",label:"Silver",hex:"#cccccc"},{f:"bronze",label:"Bronze",hex:"#8a6438"},{f:"graphite",label:"Graphite",hex:"#3a3c3f"},{f:"red",label:"Candy Red",hex:"#7a0f14"}],nl={name:"",color:"var(--fg)",family:"silver",src:""};function Fo(e,t){let n=r=>{let o=qn.findIndex(i=>i.f===r);return o===-1?qn.length:o};return n(e)-n(t)||e.localeCompare(t)}function rl(e){let t=new Set;for(let n of e)for(let r of n.finishes??[])r?.family&&t.add(r.family);return[...t].sort(Fo)}import{useEffect as Mo,useRef as Kn,useState as Ho}from"react";import{jsx as de,jsxs as _t}from"react/jsx-runtime";function Uo({customerEmail:e,disabled:t=!1}){let{coupon:n,applyCoupon:r,removeCoupon:o,couponBusy:i}=Fn(),[s,a]=Ho(""),c=Kn(!1),u=Kn(null);Mo(()=>{!c.current||n===null||(c.current=!1,u.current?.focus())},[n]);async function m(){t||i||!s.trim()||(c.current=!0,await r(s,e),a(""))}return _t("div",{className:"flex flex-col gap-2",children:[n===null?_t("div",{className:"flex border border-line",children:[de("input",{type:"text",value:s,onChange:C=>a(C.target.value),onKeyDown:C=>{C.key==="Enter"&&(C.preventDefault(),m())},placeholder:"Coupon code","aria-label":"Coupon code",disabled:t,className:`${zn} bg-transparent px-4 py-4 font-mono text-[11px] uppercase tracking-[0.18em] text-fg outline-none placeholder:text-fg-dim`}),de("button",{type:"button",onClick:()=>{m()},disabled:i||t,className:"border-l border-line px-4 font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-wait disabled:opacity-60",children:i?"\u2026":"Apply"})]}):_t("div",{className:["flex items-center justify-between gap-3 border px-4 py-3",n.valid?"border-accent":"border-line"].join(" "),style:n.valid?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[de("span",{className:["font-mono text-[11px] uppercase tracking-[0.22em]",n.valid?"text-accent":n.deferred||n.unchecked?"text-fg":"text-fg-dim line-through"].join(" "),children:n.code}),n.unchecked&&de("button",{type:"button",onClick:()=>{r(n.code,e)},disabled:i||t,className:"ml-auto font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:text-fg disabled:cursor-wait disabled:opacity-60",children:i?"\u2026":"Try again"}),!t&&de("button",{ref:u,type:"button",onClick:o,"aria-label":`Remove coupon ${n.code}`,className:"font-mono text-[12px] text-fg-dim transition-colors hover:text-fg",children:"\u2715"})]}),n?.deferred?de("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-fg-dim",children:pn}):n&&!n.valid&&n.message&&de("p",{role:"alert",className:"font-mono text-[10px] uppercase tracking-[0.18em] text-alert",children:n.message})]})}var Rt="Ads on. Shopper can opt out.",Ze="Ads and analytics off until Accept",$o={us:{region:"us",name:"United States",model:"opt-out",law:"California CCPA / CPRA, other state laws",beforeChoice:Rt,footerLink:"Do Not Sell or Share My Personal Information",panelEyebrow:"Do not sell or share",adsRowName:"Sale or sharing for ads"},ca:{region:"ca",name:"Canada",model:"opt-in",law:"PIPEDA, Quebec Law 25",beforeChoice:Ze,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},au:{region:"au",name:"Australia",model:"opt-out",law:"Privacy Act 1988 (APPs)",beforeChoice:Rt,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},nz:{region:"nz",name:"New Zealand",model:"opt-out",law:"Privacy Act 2020",beforeChoice:Rt,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},uk:{region:"uk",name:"United Kingdom",model:"opt-in",law:"PECR, UK GDPR",beforeChoice:Ze,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},eu:{region:"eu",name:"European Union",model:"opt-in",law:"ePrivacy Directive, GDPR",beforeChoice:Ze,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},other:{region:"other",name:"All other countries",model:"opt-in",law:"Safe default",beforeChoice:Ze,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"}};function Wo(e){let t=[...e.googleAds?["Google"]:[],...e.meta?["Facebook","Instagram"]:[]];return t.length<=1?t.join(""):`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}function dl(e,t,n){let r=Wo(n),o=r?`We use cookies to count visits and to show you ${t} ads on ${r}.`:"We use cookies to count visits.";return e.model==="opt-in"?{heading:r?"Cookies and ads":"Cookies",before:`${o} Nothing loads until you choose. You can change this at any time with `,link:e.footerLink,after:" at the bottom of every page."}:{heading:r?"Cookies and ads":"Cookies",before:`${o} You can say no at any time: choose Privacy choices, or use `,link:e.footerLink,after:" at the bottom of every page."}}var fl={accept:"Accept all",reject:"Reject all",choose:"Choose",save:"Save",ok:"OK",privacyChoices:"Privacy choices",privacyPolicy:"Privacy Policy",alwaysOn:"Always on",close:"Close",cookieSettings:"Cookie settings"};var Bo={asked:!1,region:"other",model:"opt-in",analytics:!0,ads:!0,chosen:!0,gpc:!1};var zo=Bo;function yl(e=zo){if(e.asked)return e.ads?"granted":"denied"}function bl(){let e=typeof crypto<"u"?crypto:void 0;if(typeof e?.randomUUID=="function")return e.randomUUID();let t=new Uint8Array(16);if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}import{Children as Ko,isValidElement as Go,useEffect as Vn,useId as Vo,useLayoutEffect as Qn,useRef as ne,useState as Yn}from"react";var Je=(e,t)=>!!e[t]&&!e[t].disabled;function At(e,t,n){let r=e.length;for(let o=1;o<=r;o++){let i=((t+n*o)%r+r)%r;if(Je(e,i))return i}return t}function kt(e,t){return At(e,t===1?-1:e.length,t)}function wt(e,t){return Je(e,t)?t:Math.max(kt(e,1),0)}function Gn(e,t,n){let{open:r,focus:o}=e,i=s=>({...e,...s});if(t.length===1&&/\S/.test(t)){let s=e.typed+t.toLowerCase(),a=n.findIndex((c,u)=>Je(n,u)&&c.label.toLowerCase().startsWith(s));return{state:i({open:!0,typed:s,focus:a>=0?a:o}),handled:!0}}if(!r)return t==="ArrowDown"||t==="ArrowUp"||t==="Enter"||t===" "?{state:i({open:!0,typed:""}),handled:!0}:{state:e,handled:!1};switch(t){case"ArrowDown":return{state:i({focus:At(n,o,1)}),handled:!0};case"ArrowUp":return{state:i({focus:At(n,o,-1)}),handled:!0};case"Home":return{state:i({focus:kt(n,1)}),handled:!0};case"End":return{state:i({focus:kt(n,-1)}),handled:!0};case"Enter":case" ":return Je(n,o)?{state:i({open:!1,typed:""}),commit:o,refocus:!0,handled:!0}:{state:e,handled:!0};case"Escape":return{state:i({open:!1,typed:""}),refocus:!0,handled:!0};case"Tab":return{state:i({open:!1,typed:""}),handled:!1};default:return{state:e,handled:!1}}}import{placeMenu as Yo}from"efficient-shell/ui";import{Fragment as ti,jsx as re,jsxs as jn}from"react/jsx-runtime";var Xn={body:"text-[length:var(--size-body,14px)]",label:"text-[length:var(--size-label,13px)]"};function Xo({items:e,value:t,onPick:n,open:r,onOpen:o,onClose:i}){let[s,a]=Yn(!1),c=r!==void 0,u=c?r:s,[m,C]=Yn(0),p=ne({text:"",timer:0}),R=ne(null),k=ne(null),g=ne(null),L=Vo(),w=ne(null),D=e.findIndex(h=>h.value===t),E=h=>{h!==u&&(c||a(h),h?o?.():i?.())},b=h=>{let P=e[h];!P||P.disabled||(n(P.value),E(!1),k.current?.focus())},F=h=>{let P={open:u,focus:u?m:wt(e,D),typed:p.current.text},x=Gn(P,h,e);return!x.handled&&x.state.open===u?!1:(x.state.typed!==P.typed&&(p.current.text=x.state.typed,window.clearTimeout(p.current.timer),p.current.timer=window.setTimeout(()=>{p.current.text=""},500)),C(x.state.focus),x.commit!==void 0?b(x.commit):E(x.state.open),x.refocus&&k.current?.focus(),x.handled)},K=ne(F);K.current=F;let oe=ne(()=>E(!1));oe.current=()=>E(!1);let fe=h=>{u||(w.current=h.nativeEvent,K.current(h.key)&&h.preventDefault())};return Vn(()=>{if(!u)return;let h=x=>{R.current?.contains(x.target)||oe.current()},P=x=>{x!==w.current&&K.current(x.key)&&x.preventDefault()};return document.addEventListener("mousedown",h),document.addEventListener("keydown",P),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",P)}},[u]),Vn(()=>{u&&(p.current.text||C(wt(e,D)))},[u]),Qn(()=>{if(!u||!g.current)return;g.current.children.item(m)?.scrollIntoView({block:"nearest"})},[m,u]),{open:u,toggle:()=>E(!u),close:()=>E(!1),focusIdx:m,setFocusIdx:C,pick:h=>b(e.findIndex(P=>P.value===h)),wrapRef:R,triggerRef:k,listRef:g,listId:L,onTriggerKeyDown:fe,activeId:u?`${L}-${m}`:void 0}}var Qo={select:{list:"absolute left-0 top-full z-50 mt-1 max-h-[280px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:(e,t,n)=>["px-3 py-3 font-mono text-[13px] font-semibold uppercase tracking-[0.1em] transition-colors whitespace-nowrap",n?"cursor-not-allowed opacity-40":"cursor-pointer",e&&!n?"bg-accent text-bg":"bg-bg text-fg"].join(" ")},cell:{list:"absolute left-0 top-full z-50 mt-1 max-h-[320px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:e=>[`cursor-pointer whitespace-nowrap px-6 py-3 font-mono ${Xn.label} font-semibold uppercase tracking-[0.1em] transition-colors`,e?"bg-accent text-bg":"bg-bg text-fg"].join(" "),pickerMarker:!0},hairline:{list:"absolute left-0 top-full z-50 max-h-[320px] w-full overflow-y-auto border border-line bg-bg shadow-[0_6px_20px_rgba(0,0,0,0.10)]",item:(e,t)=>[`flex cursor-pointer items-center justify-between gap-4 border-b border-line px-4 py-3 text-left ${Xn.body} transition-colors last:border-b-0`,t?"border-fg font-medium text-fg":e?"border-fg text-fg":"text-fg-dim"].join(" "),pickerMarker:!0},region:{list:"absolute right-0 top-full z-[200] mt-2 flex min-w-[240px] flex-col border border-line bg-surface text-fg",item:(e,t,n,r)=>["flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors","font-mono text-[13px] uppercase tracking-[0.18em]",e?"bg-surface-2 text-fg":"",r?"":"border-b border-line",t?"text-accent":""].join(" "),itemStyle:e=>e?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"}}};function jo(e,t){Qn(()=>{let n=e.current,r=n?.ownerDocument.defaultView;if(!n||!r)return;let o=()=>{let i=n.style;i.top=i.bottom=i.marginTop=i.marginBottom=i.maxHeight=i.overflowY=i.translate="";let s=n.offsetParent??n.parentElement;if(!s)return;let a=s.getBoundingClientRect(),c=n.getBoundingClientRect(),u=Math.abs(c.right-a.right)<Math.abs(c.left-a.left)?"end":"start",m=Yo({trigger:{left:a.left,right:a.right,top:a.top,bottom:a.bottom},menu:{width:c.width,height:c.height},bounds:{left:0,top:0,right:r.innerWidth,bottom:r.innerHeight},align:u,side:"bottom"});if(m.side==="top"){i.top="auto",i.bottom="100%",i.marginTop="0px";let p=m.top+Math.min(c.height,m.maxHeight);i.marginBottom=`${Math.max(0,a.top-p)}px`}m.maxHeight<c.height&&(i.maxHeight=`${m.maxHeight}px`,i.overflowY="auto");let C=m.left-c.left;C&&(i.translate=`${C}px`)};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o,!0),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o,!0)}},[e,t])}function Zo(e){return e.split(" ").map(t=>t==="left-0"?"right-0":t).join(" ")}function Jo({id:e,tone:t,items:n,value:r,focusIdx:o,onFocus:i,onPick:s,listRef:a,ariaLabel:c,align:u="start"}){let m=Qo[t],C=ne(null);return jo(C,n.length),re("ul",{ref:p=>{C.current=p,a&&(a.current=p)},id:e,role:"listbox","aria-label":c,...m.pickerMarker?{"data-picker-menu":""}:{},className:u==="end"?Zo(m.list):m.list,children:n.map((p,R)=>{let k=p.value===r;return re("li",{id:`${e}-${R}`,role:"option","aria-selected":k,"aria-disabled":p.disabled||void 0,onMouseEnter:()=>!p.disabled&&i(R),onMouseDown:g=>{g.preventDefault(),p.disabled||s(p.value)},className:m.item(R===o,k&&p.value!=="",!!p.disabled,R===n.length-1),style:m.itemStyle?.(k),children:p.meta===void 0?p.label:jn(ti,{children:[p.lead,re("span",{className:"flex-1 whitespace-nowrap",children:p.label}),re("span",{className:"ml-auto text-[12px] opacity-50",children:p.meta})]})},`${p.value}_${R}`)})})}function ei({value:e,onChange:t,disabled:n,children:r,className:o,style:i,name:s,id:a,"aria-label":c,align:u}){let m=Ko.toArray(r).flatMap(g=>{if(!Go(g))return[];if(g.type!=="option")return[];let w=g.props,D=w.value!==void 0?String(w.value):"",E=w.children,b=typeof E=="string"||typeof E=="number"?String(E):D;return[{value:D,label:b,disabled:!!w.disabled}]}),C=e??"",p=Xo({items:m,value:C,onPick:g=>t?.({target:{value:g}})}),k=m.find(g=>g.value===C)?.label??m[0]?.label??"";return jn("div",{ref:p.wrapRef,className:"relative",children:[s&&re("input",{type:"hidden",name:s,value:C}),re("button",{ref:g=>{p.triggerRef.current=g},type:"button",disabled:n,"aria-haspopup":"listbox","aria-expanded":p.open,"aria-controls":p.open?p.listId:void 0,"aria-activedescendant":p.activeId,"aria-label":c,id:a,onClick:()=>!n&&p.toggle(),onKeyDown:g=>!n&&p.onTriggerKeyDown(g),className:`block w-full ${o??""}`,style:i,children:re("span",{className:"block w-full truncate text-left",children:k})}),p.open&&re(Jo,{id:p.listId,tone:"select",items:m,value:C,focusIdx:p.focusIdx,onFocus:p.setFocusIdx,onPick:p.pick,listRef:p.listRef,align:u})]})}import{jsx as Le,jsxs as et}from"react/jsx-runtime";var ni="font-mono text-[length:var(--size-label,12px)]",ri="font-semibold uppercase tracking-[0.22em] text-fg";function Zn(e){return`${e??ni} ${ri}`}function Jn(){return Le("span",{className:"text-accent",children:" *"})}function oi({children:e,required:t,labelFace:n}){return et("span",{className:Zn(n),children:[e,t?Le(Jn,{}):null]})}function ii({label:e,required:t,hint:n,separate:r,htmlFor:o,labelFace:i,className:s,children:a}){let c=s?`flex flex-col gap-2 ${s}`:"flex flex-col gap-2",u=n?Le("span",{className:"font-mono text-[11px] uppercase tracking-[0.22em] text-fg-dim",children:n}):null;return r||n?et("div",{className:c,children:[et("label",{htmlFor:o,className:Zn(i),children:[e,t?Le(Jn,{}):null]}),a,u]}):et("label",{htmlFor:o,className:c,children:[Le(oi,{required:t,labelFace:i,children:e}),a]})}export{cn as a,Si as b,Ei as c,vi as d,Jt as e,dt as f,si as g,ur as h,ai as i,nn as j,cr as k,dr as l,pt as m,rn as n,li as o,mt as p,qe as q,te as r,ui as s,ci as t,Cr as u,_i as v,ht as w,be as x,Ri as y,Li as z,Te as A,Ni as B,Ii as C,Oi as D,Tr as E,mn as F,Ke as G,Rr as H,gn as I,Bi as J,zi as K,Ct as L,yn as M,Lr as N,Gi as O,Vi as P,Yi as Q,Ve as R,rs as S,xn as T,os as U,is as V,Sn as W,ss as X,St as Y,as as Z,ls as _,Mr as $,us as aa,cs as ba,En as ca,ds as da,fs as ea,ps as fa,Ur as ga,ms as ha,gs as ia,vn as ja,Ss as ka,Es as la,vs as ma,_s as na,wn as oa,Rs as pa,As as qa,gi as ra,un as sa,yi as ta,Re as ua,Pt as va,zs as wa,Fn as xa,ia as ya,uo as za,aa as Aa,Ia as Ba,Oa as Ca,Da,Fa as Ea,Ma as Fa,Eo as Ga,vo as Ha,Ha as Ia,Po as Ja,Ua as Ka,$a as La,Wa as Ma,Ba as Na,_o as Oa,za as Pa,qa as Qa,Ro as Ra,Ao as Sa,Ka as Ta,Ga as Ua,Va,ko as Wa,wo as Xa,No as Ya,Io as Za,Ya as _a,Qa as $a,zn as ab,ja as bb,Oo as cb,tl as db,qn as eb,nl as fb,Fo as gb,rl as hb,Uo as ib,ua as jb,Aa as kb,ka as lb,$o as mb,dl as nb,fl as ob,Bo as pb,yl as qb,bl as rb,Xo as sb,Jo as tb,ei as ub,oi as vb,ii as wb};
1
+ import{S as Q,X as Yt,_ as Xt,aa as Qt,ba as jt,da as U,g as Vt}from"./chunk-VBCLGIPA.js";import{O as Wt,aa as at,ba as lt,da as Bt,ka as ct,la as Gt}from"./chunk-75GXE5JB.js";import{j as q}from"./chunk-62AOYUOH.js";import{Hi as ve,Ii as Kt,ji as ze,pi as qt,vf as $t,wi as ut}from"./chunk-Y3CRPIPD.js";import{c as zt}from"./chunk-RNSKQVLG.js";import{createContext as pr,useContext as an,useEffect as mr,useMemo as Pe,useState as on}from"react";function Jt(e,t){return e.map(n=>({partNumber:n.partNumber,quantity:n.wheels*t}))}function he(e,t){if(e.length===0)return null;let n=0;for(let r of e){let o=r.prices?.[t];if(typeof o!="number"||!Number.isFinite(o)||o<=0)return null;n+=o*r.wheels}return n}var dt=4,si=1;function ur(e){return e.spareAxle??"front"}var ai={unit:"set",spares:0,spareSide:"left"};function en(e){return e.unit==="single"?1:dt+e.spares}function tn(e,t){return[{partNumber:e.partNumber,wheels:en(t),prices:e.prices}]}function nn(e,t){let n=en(t)-dt;if(n<=0||e.length===0)return e;let r=cr(e),o=r?null:dr(e),i=r?r[t.spareSide]:o?o[t.spareSide][ur(t)]:0;return e.map((s,a)=>a===i?{...s,wheels:s.wheels+n}:s)}function cr(e){let t,n;for(let r=0;r<e.length;r+=1){let o=e[r].hand;if(o!=="left"&&o!=="right")continue;if((o==="left"?t:n)!==void 0)return null;o==="left"?t=r:n=r}return t!==void 0&&n!==void 0?{left:t,right:n}:null}function dr(e){let t={};for(let s=0;s<e.length;s+=1){let{hand:a,axle:c}=e[s];if(a!=="left"&&a!=="right"||c!=="front"&&c!=="rear")return null;let u=`${a}-${c}`;if(t[u]!==void 0)return null;t[u]=s}let{"left-front":n,"left-rear":r,"right-front":o,"right-rear":i}=t;return n!==void 0&&r!==void 0&&o!==void 0&&i!==void 0?{left:{front:n,rear:r},right:{front:o,rear:i}}:null}function ft(e){let t=typeof e.spares=="number"?e.spares:e.spare?1:0;return{unit:e.unit,spares:t,spareSide:e.spareSide??"left",...e.spareAxle?{spareAxle:e.spareAxle}:{}}}function pt(e,t){return t.spares>0?`${e} + spare`:e}function rn(e){return e.unit==="single"?"Single":pt(`Set of ${dt}`,e)}var li="data-add-to-basket",mt=9,fr="en",Zt=new Map;function qe(e,t,n){let r=`${e}|${t??""}|${n??""}`,o=Zt.get(r);return o||(o=new Intl.NumberFormat(fr,{style:"currency",currency:e,...t===void 0?{}:{minimumFractionDigits:t},...n===void 0?{}:{maximumFractionDigits:n}}),Zt.set(r,o)),o}function te(e,t,n=0){return qe(t,0,n).format(e)}function ui(e,t){return qe(t).format(e)}function ci(e,t){let n=e.savings[t];if(n===void 0)return null;let r=te(n,t);return e.savingIsFrom?`Save from ${r}`:`Save ${r}`}import{jsx as br}from"react/jsx-runtime";var gr="storefront-country",sn=gr,gt=pr(null);function yr(e){return ln(e,"catalogue")}function hr(e){return ln(e,"money")}function ln(e,t){let n=new Map(e.map(r=>[r.code,r.decimalPlaces]));return(r,o)=>{if(!o)return"";let i=n.get(o)??0;return qe(o,t==="money"?i:0,i).format(r)}}function gi({children:e,currencies:t,countries:n,defaultCurrency:r,defaultCountry:o}){let i=Pe(()=>t??[],[t]),s=Pe(()=>n??[],[n]),a=Pe(()=>r||i.find(g=>g.isDefault)?.code||i[0]?.code||"",[r,i]),c=Pe(()=>o||s.find(g=>g.isDefault)?.code||s[0]?.code||"",[o,s]),[u,m]=on(c),[C,p]=on(!1);mr(()=>{let g=q.getItem(sn);g&&s.some(L=>L.code===g)&&m(g),p(!0)},[s]);function R(g){m(g),q.setItem(sn,g)}let k=Pe(()=>{let g=s.find(b=>b.code===u)??null,L=g?.currency,w=L&&i.some(b=>b.code===L)?L:a,D=yr(i),E=hr(i);return{country:u,currency:w,setCountry:R,currencies:i,countries:s,activeCountry:g,formatPrice:(b,F)=>D(b,F??w),formatMoney:(b,F)=>E(b,F??w),ready:C}},[u,i,s,a,C]);return br(gt.Provider,{value:k,children:e})}function un(e){let t=an(gt);if(!t&&!e?.optional)throw new Error("useCurrency must be used within a CurrencyProvider");return t}function yi(){return an(gt)?.country??""}import{createContext as Gr,useCallback as _,useContext as Vr,useEffect as $,useMemo as Ln,useRef as j,useState as v}from"react";function cn(){return"/edit"}function fn(e,t){return e.valid?!1:e.reason==="firstOrderOnly"?!0:e.reason==="notEligible"&&!t}var pn="We'll confirm this discount when you place your order.",Si="Confirmed at checkout";function Ei(e){return e&&(e.valid||e.deferred)?e.code:void 0}var dn="coupon_code: ";function vi(e){return!(e instanceof Q)||e.status!==400||!e.message.startsWith(dn)?null:e.message.slice(dn.length)}function yt(e,t){return e.map(n=>({qty:n.qty,slug:n.slug,name:`${n.name.lead}${n.name.accent}`.trim(),finish:n.finishName,size:n.size,kind:n.kind,sku:n.sku,pack:n.pack,priceLabel:t(n)}))}var Cr=["width","profile","rim"],_i={width:"Width",profile:"Profile",rim:"Rim"},xr=/^\s*(\d{2,3})\s*\/\s*(\d{2,3})\s*[A-Za-z]*\s*(\d{2}(?:\.\d+)?)\s*$/,Sr={width:[100,500],profile:[20,100],rim:[10,30]};function ht(e){let t=xr.exec(e??"");if(!t)return null;let n={width:Number(t[1]),profile:Number(t[2]),rim:Number(t[3])};return Cr.every(o=>{let[i,s]=Sr[o];return n[o]>=i&&n[o]<=s})?n:null}function be(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 Ri(e){return[be({width:e.width}),be({width:e.width,profile:e.profile}),be(e)]}function Li(e){if(!e||e.year===null)return null;let{make:t,model:n,year:r,modification:o}=e;return!t||!n||!o?null:{make:t,model:n,year:r,modification:o}}function vr(e,t){let n=new URLSearchParams({make:t.make,model:t.model,year:String(t.year),modification:t.modification});return`/api/v1/tyres/${encodeURIComponent(e)}/fitment?${n.toString()}`}function Te(e,t=""){return{vehicle:{...e,region:t},status:"unknown",oemSizes:[],variants:[]}}function Pr(e,t){if(typeof t!="object"||t===null)return Te(e);let n=t,r=typeof n.vehicle=="object"&&n.vehicle!==null?n.vehicle:{},o=typeof r.region=="string"?r.region:"",i=n.status;if(i!=="fits"&&i!=="doesNotFit")return Te(e,o);let s=Array.isArray(n.variants)?n.variants.filter(a=>typeof a=="object"&&a!==null&&typeof a.sku=="string"&&typeof a.fits=="boolean"):[];return s.length===0?Te(e,o):{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:o},status:i,oemSizes:Array.isArray(n.oemSizes)?n.oemSizes.filter(a=>typeof a=="string"):[],variants:s.map(a=>({sku:a.sku,size:typeof a.size=="string"?a.size:"",fits:a.fits}))}}async function Ni(e,t){try{let n=await Yt(vr(e,t),{baseUrl:""});return Pr(t,n)}catch(n){return n instanceof Q&&n.status>=400&&n.status<500?Te(t):{...Te(t),failed:!0}}}function Ii(e){if(!e)return[];let t=[];for(let n of[...e.frontTyres,...e.rearTyres]){let r=ht(n);if(!r)continue;let o=be(r);t.includes(o)||t.push(o)}return t}function Oi(e,t){if(t.length===0)return null;for(let n of e){let r=ht(n);if(!r)continue;let o=be(r);if(t.includes(o))return o}return null}function Tr(e,t){if(!e||e.status==="unknown")return"unknown";let n=e.variants.find(r=>r.sku===t);return n?n.fits?"fits":"doesNotFit":"unknown"}var _r="/tyres";function mn(e){return e?`${_r}/${e}`:null}function Ke(e){let t=e.lastIndexOf(" ");return t===-1?{lead:"",accent:e}:{lead:e.slice(0,t+1),accent:e.slice(t+1)}}function Rr(e,t){return tn({partNumber:e.sku,prices:e.prices},t)}var Ar="Tyre";function gn(e,t,n,r){return{id:`${e.slug}|${t.sku}|${n.unit}|${n.spares>0?"spare":"no-spare"}`,slug:e.slug,name:Ke(e.name),process:e.brand||Ar,positionNo:"01",config:[{label:t.size},{label:rn(n)}],finishName:"",size:t.size,components:Rr(t,n),qty:r,href:mn(e.slug)??void 0,kind:"tyre",sku:t.sku,pack:n}}function Bi(e){return e.kind==="tyre"}function zi(e,t){let n=e.prices?.[t];return typeof n!="number"||!Number.isFinite(n)||n<=0?!1:e.inStock}var kr="dually";function Ct(e){let t=e.components.reduce((o,i)=>o+i.wheels,0)||4,n=e.kind,r=[n==="staggered"?"Staggered":n===kr?"Dually":""].filter(Boolean);return r.length?`${r.join(" ")} set of ${t}`:`Set of ${t}`}function wr(e,t){return[...new Set(e.filter(n=>!t||n.finishName===t).map(n=>n.size))]}function yn(e,t,n){if(!(!t||!n))return e.find(r=>r.finishName===t&&r.size===n)}function Lr(e){return e!=null&&e.inStock===!1}function Gi(e,t){return t?e.filter(n=>n.finishName===t&&Lr(n)):[]}function Vi(e,t,n){return t.findIndex((r,o)=>n[o]!==!1&&wr(e,r).length>0)}function Yi(e){let t=new Set((e.sizePairs??[]).map(o=>`${o.diameter}x${o.width}`)),n=e.spec?.pcds??[],r=e.spec?.etRange??[];return t.size===1&&n.length<=1&&(r.length===0||r[0]===r[r.length-1])}var bn="alloy-wheel",Nr="tyre";function Ge(e){return e.name||e.slug||"An item from your cart"}async function Cn(e,t){let n=[],r=new Map;for(let s of e){if(!s.slug){n.push(Ge(s));continue}let a=s.kind??bn,c=`${a}\0${s.slug}`,u=r.get(c);u?u.snaps.push(s):r.set(c,{kind:a,slug:s.slug,snaps:[s]})}let o=await Promise.all([...r.values()].map(s=>Ir(s,t))),i=[];for(let s of o)for(let a of s)a.ok?i.push(a.line):n.push(a.name);return{lines:i,dropped:n}}function hn(e){if(e instanceof Q&&e.status===404)return null;throw e}async function Ir(e,t){let n=e.snaps.map(r=>({ok:!1,name:Ge(r)}));if(e.kind===bn){let r=await t.getWheel(e.slug).catch(hn);return r?e.snaps.map(o=>Or(e.slug,r,o)):n}if(e.kind===Nr){let r=await t.getTyre(e.slug).catch(hn);return r?e.snaps.map(o=>Dr(r,o)):n}return n}function Or(e,t,n){let r=yn(t.variants,n.finish,n.size);if(!r)return{ok:!1,name:Ge(n)};let o=n.pack?ft(n.pack):void 0,i=(o?.spares??0)>0;return{ok:!0,line:{id:`${e}|${r.finishName}|${r.size}${i?"|spare":""}|restored`,slug:e,name:Ke(t.name),process:t.process,positionNo:"01",config:[{label:r.size},{label:r.finishName,gold:!0},{label:o?pt(Ct(r),o):Ct(r)}],finishName:r.finishName,size:r.size,components:o&&i?nn(r.components,o):r.components,qty:n.qty,...i?{pack:o}:{}}}}function Dr(e,t){let n={ok:!1,name:Ge(t)};if(!t.pack||!t.sku)return n;let r=ft(t.pack),o=e.variants.find(i=>i.sku===t.sku);return o?{ok:!0,line:gn(e,o,r,t.qty)}:n}var Ve="Price on request",rs="Request a quote",xn="from ",os="From ",is="each",Sn="Free",ss="Updating";function xt(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function St(e,t){let n=e?.[t];return xt(n)?n:null}function as(e,t,n,r){let o=St(e,n),i=St(t,n);return o===null&&i===null?0:o===null?1:i===null?-1:r==="asc"?o-i:i-o}function ls(e,t,n,r){if(n==null&&r==null)return!0;let o=St(e,t);return!(o===null||n!=null&&o<n||r!=null&&o>r)}var Fr={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function Mr(e,t,n){if(!xt(e))return Fr;let r=xt(t)&&t>e?t:null;return{priced:!0,unit:e,was:r,onSale:r!==null,setTotal:n!=null?e*n:null}}function us(e,t,n=""){return!e.priced||e.unit==null?Ve:`${n}${te(e.unit,t)}`}function cs(e,t){return e.was==null?null:te(e.was,t)}function En(e,t,n=1){let r=he(e,t);if(r===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};let o=e.reduce((s,a)=>s+a.wheels,0),i=Math.min(...e.map(s=>s.prices[t]));return{priced:!0,unit:i,isFrom:i*o!==r,setTotal:r*n}}var Hr={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function ds(e,t,n,r=1){let o=Mr(e.prices[n],e.msrpPrices?.[n],4),i=o.setTotal==null?null:o.setTotal*r;if(!t)return{priced:o.priced,unit:o.unit,isFrom:!0,was:o.was,onSale:o.onSale,setTotal:null,fromSetTotal:i};let s=En(t.components,n,r);return s.priced?{priced:!0,unit:s.unit,isFrom:s.isFrom,was:null,onSale:!1,setTotal:s.setTotal,fromSetTotal:i}:{...Hr,fromSetTotal:i}}function fs(e,t,n=1){let r=e.map(s=>En(s,t,n)),o=r[0];return!o||o.unit==null||o.setTotal==null?null:r.every(s=>s.priced&&!s.isFrom&&s.unit===o.unit&&s.setTotal===o.setTotal)?{unit:o.unit,setTotal:o.setTotal}:null}function ps(e,t){let n=e.setTotal==null?e.openSettled:null;return`+${Ur(n?{...e,unit:n.unit,isFrom:!1}:e,t)}`}function Ur(e,t){return!e.priced||e.unit==null?Ve:`${e.isFrom?xn:""}${te(e.unit,t)}`}function ms(e,t){return e.was==null?null:te(e.was,t)}function gs(e,t){let n=e.savings[t];if(n===void 0||e.components.length===0)return null;let r=0;for(let i of e.components){let s=i.prices?.[t];if(typeof s!="number")return null;r+=s*i.quantity}let o=te(r-n,t);return{was:te(r,t),amount:e.savingIsFrom?`${xn}${o}`:o}}var $r=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function vn(e){return $r.test(e.trim())}var Pn="sf:ga-purchases",Wr=20;function _n(){return typeof window>"u"||window.parent!==window}function _e(...e){try{if(_n()||typeof window.gtag!="function")return;window.gtag(...e)}catch{}}function Br(e,t){let n=e.config.find(r=>r.gold)?.label;return{item_id:`${e.slug}|${e.finishName}|${e.size}`,item_name:`${e.name.lead}${e.name.accent}`.trim(),...n?{item_variant:n}:{},price:he(e.components,t)??0,quantity:e.qty}}function Et(e,t){return e.filter(Re).map(n=>Br(n,t))}function Ss(e){_e("event","view_item",{currency:e.currency,value:e.pricePerSet,items:[{item_id:e.itemId,item_name:e.itemName,...e.variant?{item_variant:e.variant}:{},price:e.pricePerSet,quantity:1}]})}function Rn(e,t){let n=Et([e],t);n.length!==0&&_e("event","add_to_cart",{currency:t,value:n[0].price*n[0].quantity,items:n})}function Es(e){let t=Et(e.lines,e.currency);t.length!==0&&_e("event","begin_checkout",{currency:e.currency,value:e.value,...e.coupon?{coupon:e.coupon}:{},items:t})}var Tn=new Set;function zr(e){if(Tn.has(e))return!1;Tn.add(e);try{let t=JSON.parse(q.getItem(Pn)??"[]");if(t.includes(e))return!1;q.setItem(Pn,JSON.stringify([...t,e].slice(-Wr)))}catch{}return!0}function vs(e){let t=e.confirmation;if(_n()||!zr(t.orderNumber))return;let n=t.currency,r=Number(t.grandTotal);_e("event","purchase",{transaction_id:t.orderNumber,currency:n,value:r,shipping:Number(t.freightCharge),...t.couponCode?{coupon:t.couponCode}:{},items:Et(e.lines,n)}),e.adsSendTo&&_e("event","conversion",{send_to:e.adsSendTo,transaction_id:t.orderNumber,currency:n,value:r})}var qr="Arranged after review",An="Calculated at checkout",Kr=An,_s=An;function kn({quoted:e,optionCount:t,chosenAmount:n,couponWaivesFreight:r}){return e&&t===0?"arranged":r?"free":n===void 0?"pending":n===0?"free":"charged"}function wn(e,t){return e*(100-t)/100}function Rs({discount:e,deliverySaving:t},n){return[e>0?`\u2212 ${n(e)}`:null,t>0?`${n(t)} off delivery`:null].filter(Boolean).join(" \xB7 ")}function As(e){switch(e){case"arranged":return qr;case"pending":return Kr;case"free":return Sn;case"charged":return null}}import{jsx as jr}from"react/jsx-runtime";var Yr=400,Xr=400,Qr=1500,vt="storefront-cart";function Re(e){return(e.components?.length??0)>0}function Nn(e,t){return{code:e,valid:t.valid,deferred:fn(t,t.askedAsShopper),message:t.message||void 0,effects:t.effects??void 0}}function On(e,t){return he(e.components,t)}function Pt(e,t){let n=On(e,t);return n===null?null:n*e.qty}function In(e){return e!=="tyre"}var Dn=Gr(null);function zs({children:e,preview:t=!1}){let{currency:n,country:r,formatMoney:o}=un(),[i,s]=v(t),[a,c]=v([]),[u,m]=v([]),[C,p]=v([]),[R,k]=v(!1),g=j(new Set),[L,w]=v([]),[D,E]=v(!1),[b,F]=v(null),[K,oe]=v(null),[fe,h]=v(null),[P,x]=v(0),M=_(()=>x(l=>l+1),[]),[Z,Ce]=v(void 0),[G,Ne]=v(null),[T,H]=v(null),[V,ie]=v(!1),[O,pe]=v(null),se=j(void 0),Y=_(()=>s(!0),[]),J=_(()=>s(!1),[]),Ie=_(()=>s(l=>!l),[]);$(()=>{t||typeof window>"u"||new URLSearchParams(window.location.search).get("cart")==="open"&&Y()},[Y,t]);let W=cn(),X=j(W);$(()=>{X.current!==W&&(X.current=W,t||J())},[W,t,J]);let Oe=_(l=>{Ne(f=>f?.country===l?.country&&f?.subdivision===l?.subdivision&&f?.postcode===l?.postcode?f:l)},[]),I=_((l,f)=>{E(!0),!(!f||!In(l))&&w(d=>d.includes(f)?d:[...d,f])},[]),De=D||a.length>0,ae=j(!0);$(()=>(ae.current=!0,()=>{ae.current=!1}),[]),$(()=>{if(t)return;let l=[...L,...a.filter(d=>In(d.kind)).map(d=>d.slug)],f=[...new Set(l)].filter(d=>d&&!g.current.has(d));if(f.length!==0){for(let d of f)g.current.add(d);U.listWheelsBySlug(f).then(d=>{if(!ae.current||d.length===0)return;let y=new Set(d.map(S=>S.slug));m(S=>[...S.filter(ce=>!y.has(ce.slug)),...d])})}},[t,L,a]),$(()=>{if(t||!De||R)return;let l=!0;return U.listBundles().then(f=>{l&&(p(f),k(!0))}),()=>{l=!1}},[t,De,R]);let B=b?.deliveryOptions??[],xe=b?.courier??null;$(()=>{b&&pe(l=>l&&B.some(f=>f.id===l)?l:B[0]?.id??null)},[b]);let le=_(()=>a.filter(Re).flatMap(l=>Jt(l.components,l.qty)),[a]),Se=_(async(l,f)=>{let d=l.trim().toUpperCase();if(!d)return;let y=le();if(y.length===0){H({code:d,valid:!1,message:"Add a wheel to the cart first."});return}ie(!0),se.current=f;try{let S=await U.validateCoupon({code:d,items:y,currency:n,shippingMethodId:O??void 0,customerEmail:f});H(Nn(d,S))}catch{H({code:d,valid:!1,unchecked:!0,message:"Could not check that code. Please try again."})}finally{ie(!1)}},[le,n,O]),me=_(()=>{H(null),se.current=void 0},[]),Fe=_(l=>{if(!T)return;let{code:f}=T;H(d=>d&&d.code===f?{code:f,valid:!1,refused:!0,message:l}:d)},[T]);$(()=>{if(!T||T.refused)return;let l=T.code,f=y=>y!==null&&y.code===l&&!y.refused,d=setTimeout(async()=>{let y=le();if(y.length===0){H(S=>f(S)?{code:l,valid:!1,message:"Add a wheel to the cart first."}:S);return}ie(!0);try{let S=await U.validateCoupon({code:l,items:y,currency:n,shippingMethodId:O??void 0,customerEmail:se.current});H(ce=>f(ce)?Nn(l,S):ce)}catch{}finally{ie(!1)}},Yr);return()=>clearTimeout(d)},[a,n,O]);let ue=T&&!T.refused?T.code:void 0;$(()=>{if(t)return;let l=!0,f=a,d=setTimeout(async()=>{let y=le();if(y.length===0){F(null),oe(null),Ce(void 0);return}try{let S=await U.quoteCart({items:y,currency:n,shippingMethodId:O??void 0,couponCode:ue,customerEmail:se.current||void 0,country:G?.country||r||void 0,subdivision:G?.country&&G.subdivision||void 0,postcode:G?.country&&G.postcode||void 0});if(!l)return;F(S),oe(f),h(null)}catch{if(!l)return;h(f)}Ce(ue)},Xr);return()=>{l=!1,clearTimeout(d)}},[a,n,O,ue,r,G,P]);let A=_(l=>{c(f=>{let d=f.findIndex(y=>y.id===l.id);return d===-1?[...f,l]:f.map((y,S)=>S===d?{...y,qty:Math.min(mt,y.qty+l.qty)}:y)}),Rn(l,n)},[n]),ee=_(l=>{c(f=>f.filter(d=>d.id!==l))},[]),Me=_((l,f)=>{let d=Math.max(1,Math.min(mt,f));c(y=>y.map(S=>S.id===l?{...S,qty:d}:S))},[]),He=_(l=>{c(l)},[]),[Ue,tt]=v(!1),[Lt,er]=v([]),Nt=j(a);Nt.current=a,$(()=>{if(t)return;let l=[];try{let d=JSON.parse(q.getItem(vt)??"[]");Array.isArray(d)&&(l=d)}catch{}if(l.length===0){tt(!0);return}let f=!0;return Cn(l,U).then(({lines:d,dropped:y})=>{f&&(Nt.current.length===0&&(He(d),er(y)),tt(!0))},d=>{f&&tt(!0)}),()=>{f=!1}},[t,He]),$(()=>{if(t||!Ue)return;let l=a.filter(Re);if(l.length===0){q.removeItem(vt);return}q.setItem(vt,JSON.stringify(yt(l,()=>"")))},[a,t,Ue]);let[Ee,tr]=v(null),It=j(null);It.current=Ee;let z=j(null),nt=j(""),Ot=_((l,f)=>{let d=l.trim().toLowerCase();vn(d)&&tr(y=>y&&y.email===d&&y.firstName===(f??"")?y:{email:d,firstName:f??""})},[]);$(()=>{if(t||!Ee)return;let l=yt(a.filter(Re),y=>Pt(y,n)===null?Ve:o(Pt(y,n),n)),f={email:Ee.email,firstName:Ee.firstName,currency:n,items:l},d=JSON.stringify(f);if(d!==nt.current)return z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{z.current=null,nt.current=d,U.captureCart(f).catch(y=>{})},Qr),()=>{z.current&&(clearTimeout(z.current),z.current=null)}},[a,Ee,n,t]);let Dt=_(()=>{z.current&&(clearTimeout(z.current),z.current=null);let l=It.current;l&&(nt.current="",U.captureCart({email:l.email,firstName:l.firstName,currency:n,items:[]}).catch(f=>{}))},[n]),Ft=Ln(()=>{let l=a.reduce((N,ye)=>{let Be=Pt(ye,n);return Be===null?N:N+Be},0),f=a.some(N=>On(N,n)===null),d=a.reduce((N,ye)=>N+ye.qty,0),y=T?.valid?T.effects:void 0,S=y?Math.min(l,Number(y.discountAmount)):0,ce=b?.bundleDiscount??0,rr=b?.appliedBundles??[],$e=!!y?.freeShipping,ge=B.find(N=>N.id===O),rt=Number(y?.deliveryDiscountPercent??0),We=!$e&&rt>0&&rt<100?rt:0,ot=We>0&&ge?wn(ge.amount,We):void 0,it=$e?0:ot!==void 0&&Z!==ue?ot:b?.shipping??ot??ge?.amount??0,or=We>0&&ge?Math.max(0,ge.amount-it):0,ir=kn({quoted:b!==null,optionCount:B.length,chosenAmount:ge?.amount,couponWaivesFreight:$e}),st={};for(let N of y?.freeUnits??[])st[N.partNumber]=(st[N.partNumber]??0)+N.quantity;let sr=b?.tax??null,ar=b?b.grandTotal:l-S-ce+it;return{sets:d,units:a.reduce((N,ye)=>N+(ye.components??[]).reduce((Be,lr)=>Be+lr.wheels*ye.qty,0),0),subtotal:l,hasUnpricedLine:f,discount:S,bundleDiscount:ce,appliedBundles:rr,shipping:it,freeShipping:$e,deliveryDiscountPercent:We,deliverySaving:or,shippingStatus:ir,freeUnitsByPartNumber:st,tax:sr,grand:ar,repricing:!!T?.refused&&b!==null&&Z===T?.code,quoted:b!==null&&K===a,serverSubtotal:b?.subtotal??null,quoteFailed:fe===a,currency:n}},[a,n,T,ue,B,O,b,Z,K,fe]),Mt=j(!0),Ht=_(l=>{Mt.current=l},[]),Ut=_(l=>{A(l),Mt.current&&Y()},[A,Y]),nr=Ln(()=>({isOpen:i,preview:t,open:Y,close:J,toggle:Ie,items:a,basketRead:t||Ue,catalog:u,bundles:C,warmCatalog:I,add:A,addAndOpen:Ut,setAutoOpen:Ht,remove:ee,setQty:Me,replaceItems:He,restoreDropped:Lt,identify:Ot,clearCapturedCart:Dt,coupon:T,applyCoupon:Se,removeCoupon:me,refuseCoupon:Fe,couponBusy:V,deliveryOptions:B,setQuoteDestination:Oe,courier:xe,requote:M,shippingMethodId:O,setShippingMethodId:pe,totals:Ft}),[i,t,Y,J,Ie,a,Ue,u,C,I,A,Ut,Ht,ee,Me,He,Lt,Ot,Dt,T,Se,me,Fe,V,B,Oe,xe,M,O,Ft]);return jr(Dn.Provider,{value:nr,children:e})}function Fn(){let e=Vr(Dn);if(!e)throw new Error("useCart() must be called inside <CartProvider>. Mount the provider in app/layout.tsx.");return e}import{cache as ao}from"react";function Mn(e){return/(?:^|\|)(?:slug|xhost):/.test(e)}function Hn(e,t,n,r){for(;e.size>=t;){let o,i;for(let[a,c]of e){if(c.expiresAt<=r){o=a;break}i===void 0&&n(a)&&(i=a)}let s=o??i??e.keys().next().value;if(s===void 0)return;e.delete(s)}}var Zr=6e4,Jr=5e3,eo=500,Ye=new Map;async function to(e){let{host:t,matchesRequestHost:n}=await Xt();if(!t)return"";let r=await Qt();return r?`${e}|slug:${encodeURIComponent(t)}/${encodeURIComponent(r)}`:n?`${e}|host:${t}`:`${e}|xhost:${t}`}async function Un(e,t){if(await jt()!==null)return t();let n=await to(e);if(!n)return t();let r=Date.now(),o=Ye.get(n);if(o&&o.expiresAt>r)return o.load;let i=await t(),s=i.outcome.state==="failed",a=s?Jr:Zr,c=Ye.get(n)?.lastGood,u=i.outcome.state==="ok"?i:s?c:void 0,m=s&&u?u:i;return Hn(Ye,eo,Mn,r),Ye.set(n,{load:m,expiresAt:r+a,lastGood:u}),m}var no=404;function ro(e){if(e instanceof Q&&e.status===no)return{state:"absent"};let t=e instanceof Q?e.status:-1,n=e instanceof Error?e.message:String(e);return{state:"failed",status:t,detail:n}}var oo="[storefront:chrome-load-failed]";function io(e,t){console.error(`${oo} ${e} status=${t.status} \u2014 serving fallback chrome`,t.detail)}async function $n(e,t,n,r){try{let o=await t();return r?.(o)?{value:o,outcome:{state:"absent"}}:{value:o,outcome:{state:"ok"}}}catch(o){let i=ro(o);return i.state==="failed"&&io(e,i),{value:n,outcome:i}}}function so(e){return e==="production"?"silent":"banner"}var js=so("production");function lo(e,t){return e?.trim()||t}function ia({legalName:e,foundedYear:t,siteName:n},r=new Date().getFullYear()){let o=lo(e,n);return`\xA9 ${t&&t<r?`${t}\u2013${r}`:`${r}`} ${o}`}var uo={name:ve,legalName:null,foundedYear:null,faviconUrl:null,currencies:[],defaultCurrency:null,countries:[],defaultCountry:null,commerceEnabled:!0,cardPayments:!1,paymentMethods:[],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,privacyPage:null,termsPage:null,footerCookieSettings:!0,footerSitemap:!0,socialLinks:ct},sa=ao(async()=>Un("site",()=>$n("site",async()=>{let e=await U.getSite();return{name:Kt(e.name),legalName:e.legalName?.trim()||null,foundedYear:e.foundedYear??null,faviconUrl:e.faviconUrl??null,currencies:e.currencies??[],defaultCurrency:e.defaultCurrency??null,countries:e.countries??[],defaultCountry:e.defaultCountry??null,commerceEnabled:e.commerceEnabled??!0,cardPayments:e.cardPayments??!1,paymentMethods:e.paymentMethods??(e.cardPayments?["card"]:[]),paypalClientId:e.paypalClientId??null,paypalEnvironment:e.paypalEnvironment??null,squareApplicationId:e.squareApplicationId??null,squareLocationId:e.squareLocationId??null,squareEnvironment:e.squareEnvironment??null,ga4MeasurementId:e.ga4MeasurementId??null,googleAdsId:e.googleAdsId??null,googleAdsConversionLabel:(e.googleAdsId?e.googleAdsConversionLabel:null)??null,metaPixelId:e.metaPixelId??null,consentEnabled:e.consentEnabled??!1,consentPrivacyPage:e.consentPrivacyPage??null,consentNoticeOptOut:e.consentNoticeOptOut??!1,privacyPage:e.privacyPage??null,termsPage:e.termsPage??null,footerCookieSettings:e.footerCookieSettings??!0,footerSitemap:e.footerSitemap??!0,socialLinks:Gt(e.socialLinks)}},uo)));var aa={name:ve,legalName:null,foundedYear:null,faviconUrl:null,currencies:[{code:"USD",symbol:"$",decimalPlaces:2,isDefault:!0}],defaultCurrency:"USD",countries:[{code:"US",name:"United States",currency:"USD",url:"",isDefault:!0,chargeTax:!1,taxDisplay:"none",taxName:"",taxRate:null,postalLabel:"Zip Code"}],defaultCountry:"US",commerceEnabled:!0,cardPayments:!0,paymentMethods:["card"],paypalClientId:null,paypalEnvironment:null,squareApplicationId:null,squareLocationId:null,squareEnvironment:null,ga4MeasurementId:null,googleAdsId:null,googleAdsConversionLabel:null,metaPixelId:null,consentEnabled:!1,consentPrivacyPage:null,consentNoticeOptOut:!1,privacyPage:null,termsPage:null,footerCookieSettings:!0,footerSitemap:!0,socialLinks:ct};import{jsx as co}from"react/jsx-runtime";function ua({tone:e="bad",role:t,children:n}){return co("div",{role:t,className:["border bg-surface px-4 py-3 text-[14px] leading-relaxed text-fg",e==="good"?"border-accent":e==="bad"?"border-alert":"border-line"].join(" "),children:n})}import{jsx as ke,jsxs as Tt}from"react/jsx-runtime";import{useEffect as Xe,useId as go,useRef as Bn,useState as Qe}from"react";import{useRootIsDark as yo}from"efficient-shell/theme";import{efficientClientOpen as fo}from"efficient-easel/screen/lib/session";var Ae=new Map,po=64;async function mo(e){if(!fo())return null;try{let t=await fetch(`${zt()}/logo-analysis.json?url=${encodeURIComponent(e)}`);if(!t.ok)return null;let n=await t.json();if(!n||typeof n!="object")return null;let{reversed:r,inkIsDark:o}=n;return typeof r!="string"?null:{reversed:r,inkIsDark:typeof o=="boolean"?o:null}}catch{return null}}function Wn(e){let t=Ae.get(e);if(t)return t;let n=mo(e);if(Ae.set(e,n),Ae.size>po){let r=Ae.keys().next();r.done||Ae.delete(r.value)}return n}var ho=202/22,bo=.88,Aa=16,Co="invert(1)";function ka({variant:e="header",scrolled:t=!0,src:n,reverse:r=!1,color:o=null,onLightSurface:i,reversedSrc:s,inkIsDark:a,size:c="medium",sizePx:u,sizeUnit:m,wordmark:C,siteName:p=ve,fitToContainer:R=!1,fitWordmarkToContainer:k=!1,fitFloorPx:g,hideClass:L,hideAttrs:w,part:D}){let E=C&&C.trim()?C.trim():p,[b,F]=Qe(null),K=Bn(null),oe=A=>{K.current=A};Xe(()=>{F(K.current?.ownerDocument??null)},[]);let fe=!yo({doc:b,whenUnset:!0}),h=n&&n.trim()?n.trim():null,P=!!h&&Vt(h),x=i??(fe&&t),M=o&&o.trim()?o.trim():null,Z=r&&!M,Ce=`logo-color-${go().replace(/[^A-Za-z0-9_-]/g,"")}`,G=Z&&P&&h&&s!=null?{reversed:s,inkIsDark:a??null}:null,Ne=G!==null,[T,H]=Qe(null);Xe(()=>{if(!Z||!h||!P||Ne){H(null);return}let A=!1;return H(null),Wn(h).then(ee=>{A||H(ee)}),()=>{A=!0}},[Z,h,P,Ne]);let V=G??T,ie=!!V&&V.inkIsDark!==null&&(x?!V.inkIsDark:V.inkIsDark),O=Z&&!!h&&!P&&!x,pe=ie&&V?V.reversed:h,se=pe?[pe]:[],[Y,J]=Qe(0);Xe(()=>{J(0)},[h,ie]);let Ie=e==="footer"?lt:at[c],W=u&&u>0?u:Ie,X=(u&&u>0?$t(u,m,"size",Bt):null)??`${W}px`,Oe=Math.round(W*ho),I=Y<se.length?se[Y]:null,[De,ae]=Qe(pe),B=I!==null&&I===De,xe=Bn(null);Xe(()=>{let A=xe.current;if(!A||!A.complete)return;if(A.naturalWidth>0||A.naturalHeight>0){ae(I);return}let ee=!1;return A.decode().then(()=>!ee&&ae(I),()=>!ee&&J(Me=>Me+1)),()=>{ee=!0}},[I]);let le=R||k,Se=`calc(100cqi / ${((E.length+1)*bo).toFixed(2)})`,me=le&&g&&g>0?X===`${W}px`?`${Math.min(g,W)}px`:`min(${g}px, ${X})`:null,Fe=le?me===null?`min(${X}, ${Se})`:`clamp(${me}, ${Se}, ${X})`:X,ue=Tt("span",{className:`font-display font-bold tracking-[0.18em] ${me===null?"whitespace-nowrap":"whitespace-normal"}`,style:{fontSize:Fe,lineHeight:1,...M?{color:M}:{}},"aria-label":E,children:[E,ke("span",{className:"text-accent",style:M?{color:M}:void 0,children:"."})]});return Tt("span",{ref:oe,className:Wt("inline-flex items-center",L??""),...w,...D,children:[!B&&ue,M&&I&&ke("svg",{"aria-hidden":"true",focusable:"false",width:"0",height:"0",style:{position:"absolute"},children:Tt("filter",{id:Ce,colorInterpolationFilters:"sRGB",children:[ke("feFlood",{style:{floodColor:M}}),ke("feComposite",{in2:"SourceAlpha",operator:"in"})]})}),I&&ke("img",{ref:xe,src:I,alt:E,width:Oe,height:W,className:"shrink-0 object-contain",style:{...B?{height:X,width:"auto",...R?{maxWidth:"100cqi"}:{}}:{display:"none"},...O?{filter:Co}:{},...M?{filter:`url(#${Ce})`}:{}},onLoad:()=>ae(I),onError:()=>J(A=>A+1)},I)]})}import{parseOption as je}from"efficient-shell/format";function Ia(e){return typeof e=="number"&&Number.isInteger(e)&&e>=ze.min&&e<=ze.max?e:ze.default}var Oa="fixed inset-x-0 bottom-0 top-[var(--sf-header-h,88px)]",Da=e=>!!e&&e.startsWith("/wheels/")&&e!=="/wheels",xo="data-site-main",So="shared";function Fa(e){if(!e)return!1;if(e.querySelector(`.${qt}, [${ut}="own"]`))return!0;let t=e.querySelector(`main[${xo}]`);return t!=null&&t.querySelector(`[${ut}="${So}"]`)==null}var Ma=(e,t)=>!e&&t?"var(--section-bg)":"var(--bg)",Eo=[{label:"Uppercase",value:"uppercase"},{label:"Capitalised",value:"capitalised"}],vo="uppercase",Ha=e=>je(Eo,vo,e),Po=[{label:"Icon",value:"icon"},{label:"Text",value:"text"}],To="icon",Ua=e=>je(Po,To,e),$a=[{label:"Own row",value:"top"},{label:"Same row",value:"inline"}],Wa="top",Ba=e=>e==="inline"?"inline":e==="top"||e==="bottom"?"top":null,_o="custom";function za(e,t){return e!==_o||typeof t!="string"?null:t.trim()||null}var qa=80,Ro=0,Ao=100,Ka="data-header-link-opacity",Ga="--sf-header-link-opacity";function Va(e){if(!(typeof e!="number"||!Number.isFinite(e)))return Math.min(Ao,Math.max(Ro,Math.round(e)))}var ko=[{label:"Medium",value:"medium"},{label:"Large",value:"large"}],wo="medium",Lo={medium:{size:18,stroke:1.6},large:{size:20,stroke:1.4}},No=[{label:"Cart",value:"cart"},{label:"Bag",value:"bag"}],Io="cart",Ya=e=>({cart:je(No,Io,e.cartIcon),glyph:Lo[je(ko,wo,e.iconSize)]});var Qa="w-full border-2 border-line bg-bg px-4 py-4 font-display text-[17px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent",zn="w-0 min-w-0 flex-1",ja="w-0 min-w-[7rem] flex-1";import{jsx as we,jsxs as Do}from"react/jsx-runtime";function Oo({spokes:e,mesh:t=!1,className:n}){let s=c=>Math.round(c*1e3)/1e3,a=[];for(let c=0;c<e;c++){let u=c/e*Math.PI*2-Math.PI/2;if(a.push({x1:s(100+Math.cos(u)*22),y1:s(100+Math.sin(u)*22),x2:s(100+Math.cos(u)*86),y2:s(100+Math.sin(u)*86),main:!0}),t){let m=u+Math.PI/e;a.push({x1:s(100+Math.cos(m)*22*1.4),y1:s(100+Math.sin(m)*22*1.4),x2:s(100+Math.cos(m)*78),y2:s(100+Math.sin(m)*78),main:!1})}}return Do("svg",{viewBox:"0 0 200 200",fill:"none",stroke:"currentColor",className:n??"block h-[70%] w-[70%] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",children:[we("circle",{cx:100,cy:100,r:92,strokeWidth:2}),we("circle",{cx:100,cy:100,r:84,strokeWidth:1,opacity:.4}),we("circle",{cx:100,cy:100,r:22,strokeWidth:2}),we("circle",{cx:100,cy:100,r:6,fill:"currentColor"}),a.map((c,u)=>we("line",{x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:"currentColor",strokeWidth:c.main?6:3,strokeLinecap:"round",opacity:c.main?1:.5},u))]})}var tl="#c9a461",qn=[{f:"black",label:"Black",hex:"#171717"},{f:"silver",label:"Silver",hex:"#cccccc"},{f:"bronze",label:"Bronze",hex:"#8a6438"},{f:"graphite",label:"Graphite",hex:"#3a3c3f"},{f:"red",label:"Candy Red",hex:"#7a0f14"}],nl={name:"",color:"var(--fg)",family:"silver",src:""};function Fo(e,t){let n=r=>{let o=qn.findIndex(i=>i.f===r);return o===-1?qn.length:o};return n(e)-n(t)||e.localeCompare(t)}function rl(e){let t=new Set;for(let n of e)for(let r of n.finishes??[])r?.family&&t.add(r.family);return[...t].sort(Fo)}import{useEffect as Mo,useRef as Kn,useState as Ho}from"react";import{jsx as de,jsxs as _t}from"react/jsx-runtime";function Uo({customerEmail:e,disabled:t=!1}){let{coupon:n,applyCoupon:r,removeCoupon:o,couponBusy:i}=Fn(),[s,a]=Ho(""),c=Kn(!1),u=Kn(null);Mo(()=>{!c.current||n===null||(c.current=!1,u.current?.focus())},[n]);async function m(){t||i||!s.trim()||(c.current=!0,await r(s,e),a(""))}return _t("div",{className:"flex flex-col gap-2",children:[n===null?_t("div",{className:"flex border border-line",children:[de("input",{type:"text",value:s,onChange:C=>a(C.target.value),onKeyDown:C=>{C.key==="Enter"&&(C.preventDefault(),m())},placeholder:"Coupon code","aria-label":"Coupon code",disabled:t,className:`${zn} bg-transparent px-4 py-4 font-mono text-[11px] uppercase tracking-[0.18em] text-fg outline-none placeholder:text-fg-dim`}),de("button",{type:"button",onClick:()=>{m()},disabled:i||t,className:"border-l border-line px-4 font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:bg-btn hover:text-btn-ink disabled:cursor-wait disabled:opacity-60",children:i?"\u2026":"Apply"})]}):_t("div",{className:["flex items-center justify-between gap-3 border px-4 py-3",n.valid?"border-accent":"border-line"].join(" "),style:n.valid?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[de("span",{className:["font-mono text-[11px] uppercase tracking-[0.22em]",n.valid?"text-accent":n.deferred||n.unchecked?"text-fg":"text-fg-dim line-through"].join(" "),children:n.code}),n.unchecked&&de("button",{type:"button",onClick:()=>{r(n.code,e)},disabled:i||t,className:"ml-auto font-mono text-[10px] uppercase tracking-[0.26em] text-btn transition-colors hover:text-fg disabled:cursor-wait disabled:opacity-60",children:i?"\u2026":"Try again"}),!t&&de("button",{ref:u,type:"button",onClick:o,"aria-label":`Remove coupon ${n.code}`,className:"font-mono text-[12px] text-fg-dim transition-colors hover:text-fg",children:"\u2715"})]}),n?.deferred?de("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-fg-dim",children:pn}):n&&!n.valid&&n.message&&de("p",{role:"alert",className:"font-mono text-[10px] uppercase tracking-[0.18em] text-alert",children:n.message})]})}var Rt="Ads on. Shopper can opt out.",Ze="Ads and analytics off until Accept",$o={us:{region:"us",name:"United States",model:"opt-out",law:"California CCPA / CPRA, other state laws",beforeChoice:Rt,footerLink:"Do Not Sell or Share My Personal Information",panelEyebrow:"Do not sell or share",adsRowName:"Sale or sharing for ads"},ca:{region:"ca",name:"Canada",model:"opt-in",law:"PIPEDA, Quebec Law 25",beforeChoice:Ze,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},au:{region:"au",name:"Australia",model:"opt-out",law:"Privacy Act 1988 (APPs)",beforeChoice:Rt,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},nz:{region:"nz",name:"New Zealand",model:"opt-out",law:"Privacy Act 2020",beforeChoice:Rt,footerLink:"Privacy choices",panelEyebrow:"Privacy choices",adsRowName:"Advertising"},uk:{region:"uk",name:"United Kingdom",model:"opt-in",law:"PECR, UK GDPR",beforeChoice:Ze,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},eu:{region:"eu",name:"European Union",model:"opt-in",law:"ePrivacy Directive, GDPR",beforeChoice:Ze,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"},other:{region:"other",name:"All other countries",model:"opt-in",law:"Safe default",beforeChoice:Ze,footerLink:"Cookie settings",panelEyebrow:"Cookie settings",adsRowName:"Advertising"}};function Wo(e){let t=[...e.googleAds?["Google"]:[],...e.meta?["Facebook","Instagram"]:[]];return t.length<=1?t.join(""):`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`}function dl(e,t,n){let r=Wo(n),o=r?`We use cookies to count visits and to show you ${t} ads on ${r}.`:"We use cookies to count visits.";return e.model==="opt-in"?{heading:r?"Cookies and ads":"Cookies",before:`${o} Nothing loads until you choose. You can change this at any time with `,link:e.footerLink,after:" at the bottom of every page."}:{heading:r?"Cookies and ads":"Cookies",before:`${o} You can say no at any time: choose Privacy choices, or use `,link:e.footerLink,after:" at the bottom of every page."}}var fl={accept:"Accept all",reject:"Reject all",choose:"Choose",save:"Save",ok:"OK",privacyChoices:"Privacy choices",privacyPolicy:"Privacy Policy",alwaysOn:"Always on",close:"Close",cookieSettings:"Cookie settings"};var Bo={asked:!1,region:"other",model:"opt-in",analytics:!0,ads:!0,chosen:!0,gpc:!1};var zo=Bo;function yl(e=zo){if(e.asked)return e.ads?"granted":"denied"}function bl(){let e=typeof crypto<"u"?crypto:void 0;if(typeof e?.randomUUID=="function")return e.randomUUID();let t=new Uint8Array(16);if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}import{Children as Ko,isValidElement as Go,useEffect as Vn,useId as Vo,useLayoutEffect as Qn,useRef as ne,useState as Yn}from"react";var Je=(e,t)=>!!e[t]&&!e[t].disabled;function At(e,t,n){let r=e.length;for(let o=1;o<=r;o++){let i=((t+n*o)%r+r)%r;if(Je(e,i))return i}return t}function kt(e,t){return At(e,t===1?-1:e.length,t)}function wt(e,t){return Je(e,t)?t:Math.max(kt(e,1),0)}function Gn(e,t,n){let{open:r,focus:o}=e,i=s=>({...e,...s});if(t.length===1&&/\S/.test(t)){let s=e.typed+t.toLowerCase(),a=n.findIndex((c,u)=>Je(n,u)&&c.label.toLowerCase().startsWith(s));return{state:i({open:!0,typed:s,focus:a>=0?a:o}),handled:!0}}if(!r)return t==="ArrowDown"||t==="ArrowUp"||t==="Enter"||t===" "?{state:i({open:!0,typed:""}),handled:!0}:{state:e,handled:!1};switch(t){case"ArrowDown":return{state:i({focus:At(n,o,1)}),handled:!0};case"ArrowUp":return{state:i({focus:At(n,o,-1)}),handled:!0};case"Home":return{state:i({focus:kt(n,1)}),handled:!0};case"End":return{state:i({focus:kt(n,-1)}),handled:!0};case"Enter":case" ":return Je(n,o)?{state:i({open:!1,typed:""}),commit:o,refocus:!0,handled:!0}:{state:e,handled:!0};case"Escape":return{state:i({open:!1,typed:""}),refocus:!0,handled:!0};case"Tab":return{state:i({open:!1,typed:""}),handled:!1};default:return{state:e,handled:!1}}}import{placeMenu as Yo}from"efficient-shell/ui";import{Fragment as ti,jsx as re,jsxs as jn}from"react/jsx-runtime";var Xn={body:"text-[length:var(--size-body,14px)]",label:"text-[length:var(--size-label,13px)]"};function Xo({items:e,value:t,onPick:n,open:r,onOpen:o,onClose:i}){let[s,a]=Yn(!1),c=r!==void 0,u=c?r:s,[m,C]=Yn(0),p=ne({text:"",timer:0}),R=ne(null),k=ne(null),g=ne(null),L=Vo(),w=ne(null),D=e.findIndex(h=>h.value===t),E=h=>{h!==u&&(c||a(h),h?o?.():i?.())},b=h=>{let P=e[h];!P||P.disabled||(n(P.value),E(!1),k.current?.focus())},F=h=>{let P={open:u,focus:u?m:wt(e,D),typed:p.current.text},x=Gn(P,h,e);return!x.handled&&x.state.open===u?!1:(x.state.typed!==P.typed&&(p.current.text=x.state.typed,window.clearTimeout(p.current.timer),p.current.timer=window.setTimeout(()=>{p.current.text=""},500)),C(x.state.focus),x.commit!==void 0?b(x.commit):E(x.state.open),x.refocus&&k.current?.focus(),x.handled)},K=ne(F);K.current=F;let oe=ne(()=>E(!1));oe.current=()=>E(!1);let fe=h=>{u||(w.current=h.nativeEvent,K.current(h.key)&&h.preventDefault())};return Vn(()=>{if(!u)return;let h=x=>{R.current?.contains(x.target)||oe.current()},P=x=>{x!==w.current&&K.current(x.key)&&x.preventDefault()};return document.addEventListener("mousedown",h),document.addEventListener("keydown",P),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",P)}},[u]),Vn(()=>{u&&(p.current.text||C(wt(e,D)))},[u]),Qn(()=>{if(!u||!g.current)return;g.current.children.item(m)?.scrollIntoView({block:"nearest"})},[m,u]),{open:u,toggle:()=>E(!u),close:()=>E(!1),focusIdx:m,setFocusIdx:C,pick:h=>b(e.findIndex(P=>P.value===h)),wrapRef:R,triggerRef:k,listRef:g,listId:L,onTriggerKeyDown:fe,activeId:u?`${L}-${m}`:void 0}}var Qo={select:{list:"absolute left-0 top-full z-50 mt-1 max-h-[280px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:(e,t,n)=>["px-3 py-3 font-mono text-[13px] font-semibold uppercase tracking-[0.1em] transition-colors whitespace-nowrap",n?"cursor-not-allowed opacity-40":"cursor-pointer",e&&!n?"bg-accent text-bg":"bg-bg text-fg"].join(" ")},cell:{list:"absolute left-0 top-full z-50 mt-1 max-h-[320px] w-max min-w-full overflow-y-auto border-2 border-accent bg-bg shadow-xl",item:e=>[`cursor-pointer whitespace-nowrap px-6 py-3 font-mono ${Xn.label} font-semibold uppercase tracking-[0.1em] transition-colors`,e?"bg-accent text-bg":"bg-bg text-fg"].join(" "),pickerMarker:!0},hairline:{list:"absolute left-0 top-full z-50 max-h-[320px] w-full overflow-y-auto border border-line bg-bg shadow-[0_6px_20px_rgba(0,0,0,0.10)]",item:(e,t)=>[`flex cursor-pointer items-center justify-between gap-4 border-b border-line px-4 py-3 text-left ${Xn.body} transition-colors last:border-b-0`,t?"border-fg font-medium text-fg":e?"border-fg text-fg":"text-fg-dim"].join(" "),pickerMarker:!0},region:{list:"absolute right-0 top-full z-[200] mt-2 flex min-w-[240px] flex-col border border-line bg-surface text-fg",item:(e,t,n,r)=>["flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors","font-mono text-[13px] uppercase tracking-[0.18em]",e?"bg-surface-2 text-fg":"",r?"":"border-b border-line",t?"text-accent":""].join(" "),itemStyle:e=>e?void 0:{color:"color-mix(in oklab, currentColor 80%, transparent)"}}};function jo(e,t){Qn(()=>{let n=e.current,r=n?.ownerDocument.defaultView;if(!n||!r)return;let o=()=>{let i=n.style;i.top=i.bottom=i.marginTop=i.marginBottom=i.maxHeight=i.overflowY=i.translate="";let s=n.offsetParent??n.parentElement;if(!s)return;let a=s.getBoundingClientRect(),c=n.getBoundingClientRect(),u=Math.abs(c.right-a.right)<Math.abs(c.left-a.left)?"end":"start",m=Yo({trigger:{left:a.left,right:a.right,top:a.top,bottom:a.bottom},menu:{width:c.width,height:c.height},bounds:{left:0,top:0,right:r.innerWidth,bottom:r.innerHeight},align:u,side:"bottom"});if(m.side==="top"){i.top="auto",i.bottom="100%",i.marginTop="0px";let p=m.top+Math.min(c.height,m.maxHeight);i.marginBottom=`${Math.max(0,a.top-p)}px`}m.maxHeight<c.height&&(i.maxHeight=`${m.maxHeight}px`,i.overflowY="auto");let C=m.left-c.left;C&&(i.translate=`${C}px`)};return o(),r.addEventListener("resize",o),r.addEventListener("scroll",o,!0),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o,!0)}},[e,t])}function Zo(e){return e.split(" ").map(t=>t==="left-0"?"right-0":t).join(" ")}function Jo({id:e,tone:t,items:n,value:r,focusIdx:o,onFocus:i,onPick:s,listRef:a,ariaLabel:c,align:u="start"}){let m=Qo[t],C=ne(null);return jo(C,n.length),re("ul",{ref:p=>{C.current=p,a&&(a.current=p)},id:e,role:"listbox","aria-label":c,...m.pickerMarker?{"data-picker-menu":""}:{},className:u==="end"?Zo(m.list):m.list,children:n.map((p,R)=>{let k=p.value===r;return re("li",{id:`${e}-${R}`,role:"option","aria-selected":k,"aria-disabled":p.disabled||void 0,onMouseEnter:()=>!p.disabled&&i(R),onMouseDown:g=>{g.preventDefault(),p.disabled||s(p.value)},className:m.item(R===o,k&&p.value!=="",!!p.disabled,R===n.length-1),style:m.itemStyle?.(k),children:p.meta===void 0?p.label:jn(ti,{children:[p.lead,re("span",{className:"flex-1 whitespace-nowrap",children:p.label}),re("span",{className:"ml-auto text-[12px] opacity-50",children:p.meta})]})},`${p.value}_${R}`)})})}function ei({value:e,onChange:t,disabled:n,children:r,className:o,style:i,name:s,id:a,"aria-label":c,align:u}){let m=Ko.toArray(r).flatMap(g=>{if(!Go(g))return[];if(g.type!=="option")return[];let w=g.props,D=w.value!==void 0?String(w.value):"",E=w.children,b=typeof E=="string"||typeof E=="number"?String(E):D;return[{value:D,label:b,disabled:!!w.disabled}]}),C=e??"",p=Xo({items:m,value:C,onPick:g=>t?.({target:{value:g}})}),k=m.find(g=>g.value===C)?.label??m[0]?.label??"";return jn("div",{ref:p.wrapRef,className:"relative",children:[s&&re("input",{type:"hidden",name:s,value:C}),re("button",{ref:g=>{p.triggerRef.current=g},type:"button",disabled:n,"aria-haspopup":"listbox","aria-expanded":p.open,"aria-controls":p.open?p.listId:void 0,"aria-activedescendant":p.activeId,"aria-label":c,id:a,onClick:()=>!n&&p.toggle(),onKeyDown:g=>!n&&p.onTriggerKeyDown(g),className:`block w-full ${o??""}`,style:i,children:re("span",{className:"block w-full truncate text-left",children:k})}),p.open&&re(Jo,{id:p.listId,tone:"select",items:m,value:C,focusIdx:p.focusIdx,onFocus:p.setFocusIdx,onPick:p.pick,listRef:p.listRef,align:u})]})}import{jsx as Le,jsxs as et}from"react/jsx-runtime";var ni="font-mono text-[length:var(--size-label,12px)]",ri="font-semibold uppercase tracking-[0.22em] text-fg";function Zn(e){return`${e??ni} ${ri}`}function Jn(){return Le("span",{className:"text-accent",children:" *"})}function oi({children:e,required:t,labelFace:n}){return et("span",{className:Zn(n),children:[e,t?Le(Jn,{}):null]})}function ii({label:e,required:t,hint:n,separate:r,htmlFor:o,labelFace:i,className:s,children:a}){let c=s?`flex flex-col gap-2 ${s}`:"flex flex-col gap-2",u=n?Le("span",{className:"font-mono text-[11px] uppercase tracking-[0.22em] text-fg-dim",children:n}):null;return r||n?et("div",{className:c,children:[et("label",{htmlFor:o,className:Zn(i),children:[e,t?Le(Jn,{}):null]}),a,u]}):et("label",{htmlFor:o,className:c,children:[Le(oi,{required:t,labelFace:i,children:e}),a]})}export{cn as a,Si as b,Ei as c,vi as d,Jt as e,dt as f,si as g,ur as h,ai as i,nn as j,cr as k,dr as l,pt as m,rn as n,li as o,mt as p,qe as q,te as r,ui as s,ci as t,Cr as u,_i as v,ht as w,be as x,Ri as y,Li as z,Te as A,Ni as B,Ii as C,Oi as D,Tr as E,mn as F,Ke as G,Rr as H,gn as I,Bi as J,zi as K,Ct as L,yn as M,Lr as N,Gi as O,Vi as P,Yi as Q,Ve as R,rs as S,xn as T,os as U,is as V,Sn as W,ss as X,St as Y,as as Z,ls as _,Mr as $,us as aa,cs as ba,En as ca,ds as da,fs as ea,ps as fa,Ur as ga,ms as ha,gs as ia,vn as ja,Ss as ka,Es as la,vs as ma,_s as na,wn as oa,Rs as pa,As as qa,gi as ra,un as sa,yi as ta,Re as ua,Pt as va,zs as wa,Fn as xa,ia as ya,uo as za,aa as Aa,Ia as Ba,Oa as Ca,Da,Fa as Ea,Ma as Fa,Eo as Ga,vo as Ha,Ha as Ia,Po as Ja,Ua as Ka,$a as La,Wa as Ma,Ba as Na,_o as Oa,za as Pa,qa as Qa,Ro as Ra,Ao as Sa,Ka as Ta,Ga as Ua,Va,ko as Wa,wo as Xa,No as Ya,Io as Za,Ya as _a,Qa as $a,zn as ab,ja as bb,Oo as cb,tl as db,qn as eb,nl as fb,Fo as gb,rl as hb,Uo as ib,ua as jb,Aa as kb,ka as lb,$o as mb,dl as nb,fl as ob,Bo as pb,yl as qb,bl as rb,Xo as sb,Jo as tb,ei as ub,oi as vb,ii as wb};
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-XPDSLIZ3.js";var x="data-sf-section-css",g="customCss";function m(t,e=g){let n=t?.[e];return typeof n=="string"&&n.trim()!==""?n:""}function u(t){switch(t.id){case"heading-1":return"font-display";case"heading-2":return"font-heading2";case"heading-3":return"font-heading3";case"body-1":return"font-body";case"body-5":return"font-mono";default:return`font-${t.id}`}}var o="var(--sf-heading-weight, 500)",p={"heading-1":{step:"headingLarge",fallbackPx:76,weight:o},"heading-2":{step:"headingMedium",fallbackPx:44,weight:`var(--sf-heading-2-weight, ${o})`},"heading-3":{step:"headingSmall",fallbackPx:30,weight:`var(--sf-heading-3-weight, ${o})`},"body-1":{step:"body",fallbackPx:16},"body-5":{step:"label",fallbackPx:12}};function C(t,e){let n=new Set;for(let a of e.matchAll(/\bclass="([^"]*)"/g))for(let s of a[1].split(/\s+/))s&&n.add(s);let i=[];for(let[a,{step:s,fallbackPx:d,weight:r}]of Object.entries(p)){let c=u({id:a});if(!n.has(c))continue;let f=`var(--size-${s}, ${d}px)`,h=r?[`font-size: min(${f}, var(--sf-heading-max, 9999px))`,`font-weight: ${r}`]:[`font-size: ${f}`];i.push(`:where(${t} .${c}) { ${h.join("; ")} }`)}return i.join(`
1
+ import{a as l}from"./chunk-GAND7LXQ.js";var x="data-sf-section-css",g="customCss";function m(t,e=g){let n=t?.[e];return typeof n=="string"&&n.trim()!==""?n:""}function u(t){switch(t.id){case"heading-1":return"font-display";case"heading-2":return"font-heading2";case"heading-3":return"font-heading3";case"body-1":return"font-body";case"body-5":return"font-mono";default:return`font-${t.id}`}}var o="var(--sf-heading-weight, 500)",p={"heading-1":{step:"headingLarge",fallbackPx:76,weight:o},"heading-2":{step:"headingMedium",fallbackPx:44,weight:`var(--sf-heading-2-weight, ${o})`},"heading-3":{step:"headingSmall",fallbackPx:30,weight:`var(--sf-heading-3-weight, ${o})`},"body-1":{step:"body",fallbackPx:16},"body-5":{step:"label",fallbackPx:12}};function C(t,e){let n=new Set;for(let a of e.matchAll(/\bclass="([^"]*)"/g))for(let s of a[1].split(/\s+/))s&&n.add(s);let i=[];for(let[a,{step:s,fallbackPx:d,weight:r}]of Object.entries(p)){let c=u({id:a});if(!n.has(c))continue;let f=`var(--size-${s}, ${d}px)`,h=r?[`font-size: min(${f}, var(--sf-heading-max, 9999px))`,`font-weight: ${r}`]:[`font-size: ${f}`];i.push(`:where(${t} .${c}) { ${h.join("; ")} }`)}return i.join(`
2
2
  `)}function $(t){return t.replace(/<(?=\/)/g,"\\3c ")}var b={"\\":"\\\\",'"':'\\"',"\n":"\\a ","\r":"\\d ","\f":"\\c "};function E(t){return t.replace(/[\\"\n\r\f]/g,e=>l(b,e)??e)}function P(t){let e=2166136261;for(let n=0;n<t.length;n+=1)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return(e>>>0).toString(36)}export{x as a,g as b,m as c,u as d,p as e,C as f,$ as g,E as h,P as i};
@@ -1,4 +1,4 @@
1
- import{a as P,b as Q}from"./chunk-XPDSLIZ3.js";var R=e=>typeof e=="string"&&e?e:void 0;var Te=[{key:"space-grotesk",label:"Space Grotesk",cssVar:"--font-display",category:"sans",italic:!1,italicLoaded:!1},{key:"inter",label:"Inter",cssVar:"--font-body",category:"sans",italic:!0,italicLoaded:!0},{key:"poppins",label:"Poppins",cssVar:"--font-poppins",category:"sans",italic:!0,italicLoaded:!0},{key:"dm-sans",label:"DM Sans",cssVar:"--font-dm-sans",category:"sans",italic:!0,italicLoaded:!0},{key:"sora",label:"Sora",cssVar:"--font-sora",category:"sans",italic:!1,italicLoaded:!1},{key:"oswald",label:"Oswald",cssVar:"--font-oswald",category:"sans",italic:!1,italicLoaded:!1},{key:"archivo",label:"Archivo",cssVar:"--font-archivo",category:"sans",italic:!0,italicLoaded:!0},{key:"outfit",label:"Outfit",cssVar:"--font-outfit",category:"sans",italic:!1,italicLoaded:!1},{key:"manrope",label:"Manrope",cssVar:"--font-manrope",category:"sans",italic:!1,italicLoaded:!1},{key:"big-shoulders",label:"Big Shoulders",cssVar:"--font-big-shoulders",category:"sans",italic:!1,italicLoaded:!1},{key:"michroma",label:"Michroma",cssVar:"--font-michroma",category:"sans",italic:!1,italicLoaded:!1},{key:"assistant",label:"Assistant",cssVar:"--font-assistant",category:"sans",italic:!1,italicLoaded:!1},{key:"jost",label:"Jost",cssVar:"--font-jost",category:"sans",italic:!0,italicLoaded:!0},{key:"fraunces",label:"Fraunces",cssVar:"--font-serif",category:"serif",italic:!0,italicLoaded:!0},{key:"playfair-display",label:"Playfair Display",cssVar:"--font-playfair",category:"serif",italic:!0,italicLoaded:!0},{key:"cormorant",label:"Cormorant",cssVar:"--font-cormorant",category:"serif",italic:!0,italicLoaded:!0},{key:"jetbrains-mono",label:"JetBrains Mono",cssVar:"--font-mono-loaded",category:"mono",italic:!0,italicLoaded:!0}],_e=new Map(Te.map(e=>[e.key,e])),Wo="site-",bi="--font-site-",yi=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,v={options:Te,byKey:_e,siteFonts:new Map};function Ei(e){if(typeof e?.key!="string"||!e.key.startsWith(Wo))return null;let t=e.key.slice(Wo.length);if(!yi.test(t))return null;let o=e.italic===!0;return{key:e.key,label:R(e.label)??e.family,cssVar:`${bi}${t}`,category:Object.hasOwn(Uo,e.category)?e.category:"sans",italic:o,italicLoaded:o}}function Ou(e){if(!e?.length)return v;let t=new Map(_e),o=[],a=new Map;for(let s of e){let n=Ei(s);!n||t.has(n.key)||(t.set(n.key,n),o.push(n),a.set(n.key,s))}return a.size===0?v:{options:[...o,...Te],byKey:t,siteFonts:a}}var Uo={sans:"Sans",serif:"Serif",mono:"Mono"};function Si(e=v){return Object.keys(Uo).map(t=>[t,e.options.filter(o=>o.category===t)]).filter(([,t])=>t.length>0)}function vu(e=v){return Si(e).flatMap(([,t])=>t)}function xu(e,t=v){return t.byKey.get(e)}var Je=["heading","heading2","heading3","body","accent","label"];function ku(e){return typeof e=="string"&&Je.includes(e)?e:null}var Au={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Emphasis",label:"Labels"},Ti=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],_i=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,Ru={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},Oi={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function Lu(e){let t=e?_i.exec(e):null;return t?P(Oi,t[1])??null:vi(e)}function vi(e){if(!e)return null;let t=e.split(/\s+/).filter(o=>!o.slice(0,o.lastIndexOf(":")+1).includes("&")).map(o=>o.slice(o.lastIndexOf(":")+1));for(let[o,a]of Ti)if(t.includes(o))return a;return null}var G={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function xi(e,t=v){let o=t.byKey,a=s=>{let n=e?.[s];if(n&&o.has(n))return n;if(s==="heading2"||s==="heading3"){let i=e?.heading;return i&&o.has(i)?i:G.heading}return G[s]};return Object.fromEntries(Je.map(s=>[s,a(s)]))}function ki(e,t,o){return o.byKey.get(e[t])??_e.get(G[t])}function Z(e,t,o){return`var(${ki(e,t,o).cssVar})`}var Cu=[...new Set(Je.map(e=>_e.get(G[e]).cssVar))],Iu=[...new Set(Te.map(e=>e.cssVar))];function Pu(e,t=v){let o=xi(e,t);return{"--font-role-heading":Z(o,"heading",t),"--font-role-heading2":Z(o,"heading2",t),"--font-role-heading3":Z(o,"heading3",t),"--font-role-body":Z(o,"body",t),"--font-role-accent":Z(o,"accent",t),"--font-role-label":Z(o,"label",t),fontFamily:"var(--font-role-body)"}}import{VIEW_DESKTOP_MIN as Ai,VIEW_TABLET_MIN as Ri}from"efficient-easel/screen/lib/content/view-tiers";var Yo="v1",Ko=800,Bu=961,Li={"view-tablet":Ri,"view-desktop":Ai,"view-wide":Ko};function Mu(e){let t=e.startsWith("max-"),o=t?e.slice(4):e,a=P(Li,o);if(a!==void 0)return{px:a,max:t};let s=/^(max|min)-\[(\d+)px\]$/.exec(e);return s?{px:Number(s[2]),max:s[1]==="max"}:void 0}var Fu=`(min-width: ${Ko}px)`,Ci="data-sf-line",Ii="edge",Gu={[Ci]:Ii},Wu=(e,t)=>e==="edge"||e!=="section"&&t;import{contrastRatio as ep,hexToRgb as ve,parseHexColor as D,readableInk as qo,relativeLuminance as xe,parseOption as ct}from"efficient-shell/format";import{DEFAULT_SHADOW_COLOR as Mi,pictureShadowColor as Fi}from"efficient-easel/screen/lib/document/shadow-values";import{isLengthUnit as Gi}from"efficient-easel/screen/lib/content/length-units";import{CORNER_RADIUS_MAX as Qo}from"efficient-easel/screen/lib/content/style-keys";import{VIEW_TIERS as Pi,viewKeyAt as $o}from"efficient-easel/screen/lib/content/view-tiers";var N=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0;import{isLengthUnit as et,lengthOf as Ni,rowGrid as Hi}from"efficient-easel/screen/lib/content/length-units";function tt(e,t){let o=Ni(e,ot(t));return typeof o=="number"?`${o}px`:o}function ot(e,t="px"){return et(e)?e:t}function ju(e,t,o){return t.unitKey?ot(e[$o(t.unitKey,o)],t.base??"px"):t.base??"px"}function Xu(e,t=Pi){return e.unitKey?t.map(o=>$o(e.unitKey,o)):[]}function Di(e,t,o){let a=Hi({kind:e},t,o);return t!=="px"&&o.min>0?{...a,min:a.step}:a}function at(e,t,o,a){let s=N(e);if(!et(t)||t==="px"||s===void 0)return null;let n=Di(o,t,a),i=Math.min(n.max,Math.max(n.min,s));return Math.round(i*100)/100}function zu(e,t,o,a){let s=at(e,t,o,a);return s===null?null:tt(s,t)}var Bi={cornerRadiusUnit:"corner_radius_unit",siteWidthUnit:"site_width_unit",siteGutterUnit:"site_gutter_unit",siteGutterPhoneUnit:"site_gutter_phone_unit",blockGapUnit:"block_gap_unit",blockGapPhoneUnit:"block_gap_phone_unit"};function qu(e){let t=e;return Object.fromEntries(Object.entries(Bi).map(([o,a])=>[o,ot(t[a])]))}function Qu(e,t,o){let a=N(e);return et(t)&&t!=="px"&&a!==void 0?a:o(a??null)}import{DEFAULT_SHADOW_COLOR as Np}from"efficient-easel/screen/lib/document/shadow-values";var np="storefront-theme",ip="sf:theme-mode",rp="sf:theme-switch",lp="hide",cp=["light","dark","auto"],pt="light",mt=!1,Wi=7,Ui=18;function Yi(e){return e>=Wi&&e<Ui}function dp(e){let{mode:t,override:o,switchShown:a,hour:s}=e;return a&&(o==="light"||o==="dark")?o:t==="auto"?Yi(s)?"light":"dark":ct(["light","dark"],"dark",t)}var J={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},Ki=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],ke={selected:0,themes:Ki};function Zo(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ke}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function st(e,t,o){let a=ve(e),s=ve(t);if(a===null||s===null)return e;let n=(i,r)=>Math.max(0,Math.min(255,Math.round(i+(r-i)*o))).toString(16).padStart(2,"0");return`#${n(a.r,s.r)}${n(a.g,s.g)}${n(a.b,s.b)}`}var $i={light:"#ffffff",dark:"#0a0a0a"},hp=["light","dark"];function up(e,t){let o=$i[t],a=t==="light"?"#ffffff":"#000000";return{text:o,accent:o,background:e,surface:st(e,a,.1),line:st(e,a,.22),muted:st(o,e,.35),brandInk:t}}function te(e){let t=Zo(e);return t.themes[t.selected]}function ee(e){return{text:e.text,accent:e.accent,background:e.background||J.background,surface:e.surface||J.surface,line:e.line||J.line,muted:e.muted||J.muted}}var Vi=.4,ji="#f5f1e8",Vo="#0a0a0a";function Xi(e){let t=te(e).text,o=xe(t);return o===null||o>=Vi?t:null}var zi=4.5,qi=3,pp={good:"Good","large-only":"Large text only",hard:"Hard to read"};function mp(e){return e>=zi?"good":e>=qi?"large-only":"hard"}var Qi=["#000000","#ffffff"];function Ae(e){return qo(e,Qi)}function Jo(e,t){let o=t!==void 0&&xe(t)!==null?t:ji;return qo(e,[Vo,o])===o&&o!==Vo}var Zi=[.25,.4,.55];function fp(e){let t=ve(e);return t===null?[]:Zi.map(o=>"#"+[t.r,t.g,t.b].map(a=>Math.round(a*(1-o)).toString(16).padStart(2,"0")).join(""))}function wp(e){let t={"--theme-fg":te(e).text},o=Xi(e);return o!==null&&(t["--overlay-fg"]=o),t}var Ji=82;function ft(e){return`color-mix(in srgb, ${e} ${Ji}%, #000)`}function gp(e){let t=te(e);return{"--theme-accent":t.accent,"--theme-accent-2":ft(t.accent),"--theme-accent-ink":Ae(t.accent)}}function wt(e){let t=e?.button;return t&&D(t)===t.toLowerCase()?t.toLowerCase():null}function bp(e){let t=te(e),o=wt(t),a=ea(t);if(o===null&&a===null)return{};let s={};return o!==null&&(s["--theme-btn"]=o,s["--theme-btn-2"]=ft(o)),s["--theme-btn-ink"]=a??Ae(o),s}function ea(e){let t=e?.buttonInk;return t&&D(t)===t.toLowerCase()?t.toLowerCase():null}function er(e,t){return ea(e)??Ae(wt(e)??t)}function yp(e){let t=te(e);return{fill:wt(t)??t.accent.toLowerCase(),ink:er(t,t.accent)}}function Ep(e){let t={};return Zo(e).themes.forEach((o,a)=>{let s=ee(o);t[`--theme-preset-${a}-accent`]=s.accent,t[`--theme-preset-${a}-accent-2`]=ft(s.accent),t[`--theme-preset-${a}-accent-ink`]=Ae(s.accent),t[`--theme-preset-${a}-bg`]=s.background,t[`--theme-preset-${a}-fg`]=s.text,t[`--theme-preset-${a}-surface`]=s.surface,t[`--theme-preset-${a}-surface-2`]=`color-mix(in srgb, ${s.surface} 60%, ${s.line})`,t[`--theme-preset-${a}-line`]=s.line,t[`--theme-preset-${a}-muted`]=s.muted}),t}var nt=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},it=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function jo([e,t,o]){let[a,s,n]=[nt(e),nt(t),nt(o)],i=Math.cbrt(.4122214708*a+.5363325363*s+.0514459929*n),r=Math.cbrt(.2119034982*a+.6806995451*s+.1073969566*n),c=Math.cbrt(.0883024619*a+.2817188376*s+.6299787005*n);return[.2104542553*i+.793617785*r-.0040720468*c,1.9779984951*i-2.428592205*r+.4505937099*c,.0259040371*i+.7827717662*r-.808675766*c]}function tr([e,t,o]){let a=(e+.3963377774*t+.2158037573*o)**3,s=(e-.1055613458*t-.0638541728*o)**3,n=(e-.0894841775*t-1.291485548*o)**3;return[it(4.0767416621*a-3.3077115913*s+.2309699292*n),it(-1.2684380046*a+2.6097574011*s-.3413193965*n),it(-.0041960863*a-.7034186147*s+1.707614701*n)]}var dt=e=>{let t=ve(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},ta=(e,t,o)=>[e[0]*o+t[0]*(1-o),e[1]*o+t[1]*(1-o),e[2]*o+t[2]*(1-o)],oa=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,aa=e=>ta(dt(e.surface),dt(e.line),.6);function Sp(e){return oa(aa(ee(e)))}function or(e){let t=ee(e);return oa(tr(ta(jo(aa(t)),jo(dt(t.text)),.92)))}function sa(e,t,o,a){let s=e[t];if(!s)return-1;let n=o(s);if(!n)return-1;let i=ee(s);return e.findIndex((r,c)=>{if(c===t)return!1;let h=ee(r);return D(h.background)!==n?!1:!a||D(h.text??"")===D(i.text??"")&&D(h.accent??"")===D(i.accent??"")})}function Tp(e,t){return sa(e,t,or,!1)}function _p(e,t){return sa(e,t,o=>D(o.surface??""),!0)}var ar=1;function sr(e,t){let o=(e??[]).flatMap((a,s)=>{let n=xe(a.background??""),i=xe(a.text??"");return n!==null&&i!==null&&n<i?[s]:[]});return o.find(a=>a!==t)??o[0]??ar}function Op(e){return sr(e?.themes,e?.selected)}var vp=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function xp(e){let t=ee(te(e)),o=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,a={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==J.surface||t.line!==J.line)&&(a["--theme-surface-2"]=o),a}var nr=["heading","body","label"];function kp(e){if(!e)return null;for(let t of nr)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}var na=["headingLarge","headingMedium","headingSmall","accent","body","label"];var gt={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},ir=8,rr=200;function lr(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.round(e);return t>=ir&&t<=rr?t:null}function cr(e){let t={};for(let o of na)t[o]=lr(e?.[o]);return t}function Ap(e){let t=cr(e),o={};for(let a of na){let s=t[a];s!==null&&(o[`--size-${a}`]=`${s}px`)}return o}var dr=["square","small","large"],hr="small";function Rp(e){return dr.includes(e??"")?e:hr}var Re=0,ur={min:Re,max:Qo,step:1},Lp={square:0,small:null,large:16},ht={"--sf-card-radius":1,"--sf-button-radius":.5,"--site-radius":.5,"--site-radius-xs":.25,"--site-radius-sm":.5,"--site-radius-md":.75,"--site-radius-lg":1,"--site-radius-xl":1.25,"--site-radius-2xl":1.5,"--site-radius-3xl":2,"--site-radius-4xl":2.5};function bt(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;let t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(Qo,Math.max(Re,Math.round(t))):null}function Xo(e,t){if(Gi(t)&&t!=="px"){if(typeof e!="number"||!Number.isFinite(e))return{};let a=Math.max(0,e);return Object.fromEntries(Object.entries(ht).map(([s,n])=>{let i=Math.round(a*n*1e4)/1e4;return[s,i===0?"0":tt(i,t)]}))}let o=bt(e);return o===null?{}:Object.fromEntries(Object.entries(ht).map(([a,s])=>{let n=o*s/16;return[a,n===0?"0":`${n}rem`]}))}function Cp(e){return(bt(e)??Re)*ht["--sf-button-radius"]}function Ip(e,t){let o=at(e,t,"radius",ur);return o!==null?Xo(o,t):Xo(bt(e)??Re)}var pr=["none","soft","lifted"],mr="soft",ia="none",fr=["tight","normal","roomy"],wr="normal",Le="normal",gr=["none","lift","highlight"],br="lift",yr="highlight";function ra(e){return pr.includes(e??"")?e:mr}function Er(e){return fr.includes(e??"")?e:wr}function la(e){return gr.includes(e??"")?e:br}function Hp(e){let t=ra(e);return t===ia?void 0:t}function Dp(e){let t=Er(e);return t===Le?void 0:t}function Bp(e){let t=la(e);return t===yr?void 0:t}function Mp(e,t,o){let a=Fi(t);return a===Mi?{}:ra(e)!==ia||la(o)==="lift"?{"--sf-shadow-color":a}:{}}var Sr=["normal","tight","compressed"],me="normal";function ca(e){return Sr.includes(e??"")?e:me}function Fp(e){let t=ca(e);return t===me?void 0:t}function Gp(e){switch(ca(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}var zo=["authored","sentence"],yt={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},rt=100,lt=900,Tr=24,_r=200;function Oe(e,t,o){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),o))}function da(e){let t=Oe(e?.weight,rt,lt),o=ct(zo,"authored",e?.case),a=n=>n==null?t:Oe(n,rt,lt),s=n=>ct(zo,o,n);return{case:o,weight:t,weightStrong:Oe(e?.weightStrong,rt,lt),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:Oe(e?.maxPx,Tr,_r),weight2:a(e?.weight2),weight3:a(e?.weight3),case2:s(e?.case2),case3:s(e?.case3)}}function Wp(e){let t=da(e),o={};return t.case==="sentence"&&(o["--sf-heading-case"]="none"),t.weight!==null&&(o["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(o["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(o["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(o["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(o["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(o["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(o["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),o}function Up(e){return da({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}var ut="siteTheme";function Or(e){let t=e;if(!t||typeof t!="object"||!Array.isArray(t.themes)||!t.themes.every(a=>!!a&&typeof a=="object"))return{};let o=typeof t.selected=="number"&&Number.isInteger(t.selected)&&t.selected>=0?t.selected:0;return{[ut]:{selected:o,themes:t.themes}}}function Yp(e){return Or(e?.[ut])[ut]}import{parseHexColor as vr}from"efficient-shell/format";var Et=[{role:"bg",token:"--bg",ink:!1},{role:"fg",token:"--fg",ink:!0},{role:"surface",token:"--site-surface",ink:!1},{role:"surface-2",token:"--site-surface-2",ink:!1},{role:"line",token:"--site-line",ink:!0},{role:"muted",token:"--fg-dim",ink:!0}],xr=Et.filter(e=>e.ink);function ha(e){let t={color:e.fg};for(let{role:o,token:a}of xr)t[a]=e[o];return t}var kr={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},Ar=Object.freeze(ha(kr)),Rr={fg:"var(--overlay-fg-on-light)",line:"color-mix(in srgb, var(--overlay-fg-on-light) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg-on-light) 76%, transparent)"},Lr=Object.freeze(ha(Rr));function jp(e,t){let o=e?vr(e):null;return o?Jo(o,t)?Ar:Lr:null}import{jsx as ma}from"react/jsx-runtime";import{createContext as Pr,useCallback as m,useContext as Nr,useMemo as Hr,useState as Dr}from"react";import{createContext as pa,useContext as St}from"react";import{createContext as Cr}from"react";var ua=Cr(null);var Ir=pa(null),Tt=pa({logo:null,placeholder:!1,wordmark:null});function Jp(){let e=St(ua),t=St(Ir),o=St(Tt),a=!e&&o.placeholder,s=e?e.logoUrl:o.logo?.logoUrl??t?.logoUrl??null;return{src:a?null:s,reversedSrc:e?e.logoReversed:o.logo?.logoReversed??t?.logoReversed??null,inkIsDark:e?e.logoInkIsDark:o.logo?.logoInkIsDark??t?.logoInkIsDark??null,wordmark:e?null:o.wordmark,siteName:e?.siteName??t?.siteName}}var fa={},wa=Pr({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:pt,setThemeMode:()=>{},themeSwitchShown:mt,setThemeSwitchShown:()=>{},theme:ke,themeRow:"none",setTheme:()=>{},fonts:G,setFonts:()=>{},sizes:gt,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:Le,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:me,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,siteGutterPhone:null,blockGap:null,blockGapPhone:null,siteLengthUnits:fa,setSiteLengthUnits:()=>{},setSiteGutter:()=>{},setSiteGutterPhone:()=>{},setBlockGap:()=>{},setBlockGapPhone:()=>{},headingTypography:yt,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1});function im({children:e,websiteName:t=null,templateChrome:o=!1,templateName:a=null,chromePlaceholder:s=!1,themeMode:n=pt,onThemeModeChange:i,themeSwitchShown:r=mt,onThemeSwitchShownChange:c,theme:h=ke,themeRow:_="none",onThemeChange:O,fonts:Ze=G,onFontsChange:fo,sizes:_n=gt,onSizesChange:wo,cornerRadiusPx:On=null,onCornerRadiusPxChange:go,cardShadow:vn=null,onCardShadowChange:bo,shadowColor:xn=null,onShadowColorChange:yo,cardGap:kn=Le,onCardGapChange:Eo,hoverEffect:An=null,onHoverEffectChange:So,headingCompression:Rn=me,onHeadingCompressionChange:To,siteWidth:Ln=null,onSiteWidthChange:_o,siteGutter:Cn=null,siteGutterPhone:In=null,blockGap:Pn=null,blockGapPhone:Nn=null,siteLengthUnits:Hn=fa,onSiteLengthUnitsChange:Oo,onSiteGutterChange:vo,onSiteGutterPhoneChange:xo,onBlockGapChange:ko,onBlockGapPhoneChange:Ao,headingTypography:Dn=yt,onHeadingTypographyChange:Ro,textStyles:Bn=null,onTextStylesChange:Lo,wordStyles:Mn=null,heroBackgroundFollowsWidth:Fn=null,onHeroBackgroundFollowsWidthChange:Co,sectionBackgroundWidth:Gn=null,onSectionBackgroundWidthChange:Io,sectionContentWidth:Wn=null,onSectionContentWidthChange:Po,photographyGrayscale:Un=null,onPhotographyGrayscaleChange:No,shareButtonOnPosts:Yn=null,onShareButtonOnPostsChange:Ho,themeFromDocument:Kn=!1}){let[pe,Do]=Dr(null),$n=m(l=>Do(gi=>gi??l),[]),Vn=m(l=>i?.(l),[i]),jn=m(l=>c?.(l),[c]),Xn=m(l=>O?.(l),[O]),zn=m(l=>fo?.(l),[fo]),qn=m(l=>wo?.(l),[wo]),Qn=m(l=>_o?.(l),[_o]),Zn=m(l=>vo?.(l),[vo]),Jn=m(l=>xo?.(l),[xo]),ei=m(l=>ko?.(l),[ko]),ti=m(l=>Ao?.(l),[Ao]),oi=m(l=>Oo?.(l),[Oo]),ai=m(l=>Co?.(l),[Co]),si=m(l=>Io?.(l),[Io]),ni=m(l=>Po?.(l),[Po]),ii=m(l=>No?.(l),[No]),ri=m(l=>Ho?.(l),[Ho]),li=m(l=>go?.(l),[go]),ci=m(l=>bo?.(l),[bo]),di=m(l=>yo?.(l),[yo]),hi=m(l=>Eo?.(l),[Eo]),ui=m(l=>So?.(l),[So]),pi=m(l=>To?.(l),[To]),mi=m(l=>Ro?.(l),[Ro]),fi=m(l=>Lo?.(l),[Lo]),Bo=pe?.logoUrl,Mo=pe?.logoReversed,Fo=pe?.logoInkIsDark,Go=pe!==null,wi=Hr(()=>({logo:Go?{logoUrl:Bo,logoReversed:Mo,logoInkIsDark:Fo}:null,placeholder:o||s,wordmark:o?a:t}),[Go,Bo,Mo,Fo,o,s,a,t]);return ma(Tt.Provider,{value:wi,children:ma(wa.Provider,{value:{settings:pe,setSettings:Do,primeSettings:$n,websiteName:t,templateChrome:o,templateName:a,chromePlaceholder:s,themeMode:n,setThemeMode:Vn,themeSwitchShown:r,setThemeSwitchShown:jn,theme:h,themeRow:_,setTheme:Xn,fonts:Ze,setFonts:zn,sizes:_n,setSizes:qn,cornerRadiusPx:On,setCornerRadiusPx:li,cardShadow:vn,setCardShadow:ci,shadowColor:xn,setShadowColor:di,cardGap:kn,setCardGap:hi,hoverEffect:An,setHoverEffect:ui,headingCompression:Rn,setHeadingCompression:pi,siteWidth:Ln,setSiteWidth:Qn,siteGutter:Cn,siteGutterPhone:In,blockGap:Pn,blockGapPhone:Nn,siteLengthUnits:Hn,setSiteLengthUnits:oi,setSiteGutter:Zn,setSiteGutterPhone:Jn,setBlockGap:ei,setBlockGapPhone:ti,headingTypography:Dn,setHeadingTypography:mi,textStyles:Bn,setTextStyles:fi,wordStyles:Mn,heroBackgroundFollowsWidth:Fn,setHeroBackgroundFollowsWidth:ai,sectionBackgroundWidth:Gn,setSectionBackgroundWidth:si,sectionContentWidth:Wn,setSectionContentWidth:ni,photographyGrayscale:Un,setPhotographyGrayscale:ii,shareButtonOnPosts:Yn,setShareButtonOnPosts:ri,themeFromDocument:Kn},children:e})})}var Br=()=>Nr(wa);function rm(e,t,o){return e?t===o?"read":"loading":"none"}function lm(e,t){return{value:e,readFor:t}}function cm(e,t,o){return{value:t,readFor:e.readFor===o?o:null}}function dm(){let{sectionContentWidth:e,themeFromDocument:t}=Br();return t?null:e}var pm=["general","commerce","service"],oe=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"GalleryB",label:"Gallery",set:"commerce"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Reviews",label:"Reviews",set:"service"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"ArticleBody",label:"Article Body",set:"service"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocBody",label:"Document Text",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:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"Logos",label:"Logos",set:"general"},{type:"DocMasthead",label:"Page Header",set:"general"},{type:"DocTabs",label:"Tab Bar",set:"general"},{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Banner",label:"Banner",set:"general"}]}];function mm(){return Object.fromEntries(oe.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var Mr="2027-02-05",Fr="2027-02-14",ga={CategoryBar:{label:"Category bar",note:`The reviewer, 2026-11-06 (the page headers and the tab bars become TWO Layouts rows, Page Header and Tab Bar): Category Bar folds into the Tab Bar. Retired from the Add menu with no second preset.
1
+ import{a as P,b as Q}from"./chunk-GAND7LXQ.js";var R=e=>typeof e=="string"&&e?e:void 0;var Te=[{key:"space-grotesk",label:"Space Grotesk",cssVar:"--font-display",category:"sans",italic:!1,italicLoaded:!1},{key:"inter",label:"Inter",cssVar:"--font-body",category:"sans",italic:!0,italicLoaded:!0},{key:"poppins",label:"Poppins",cssVar:"--font-poppins",category:"sans",italic:!0,italicLoaded:!0},{key:"dm-sans",label:"DM Sans",cssVar:"--font-dm-sans",category:"sans",italic:!0,italicLoaded:!0},{key:"sora",label:"Sora",cssVar:"--font-sora",category:"sans",italic:!1,italicLoaded:!1},{key:"oswald",label:"Oswald",cssVar:"--font-oswald",category:"sans",italic:!1,italicLoaded:!1},{key:"archivo",label:"Archivo",cssVar:"--font-archivo",category:"sans",italic:!0,italicLoaded:!0},{key:"outfit",label:"Outfit",cssVar:"--font-outfit",category:"sans",italic:!1,italicLoaded:!1},{key:"manrope",label:"Manrope",cssVar:"--font-manrope",category:"sans",italic:!1,italicLoaded:!1},{key:"big-shoulders",label:"Big Shoulders",cssVar:"--font-big-shoulders",category:"sans",italic:!1,italicLoaded:!1},{key:"michroma",label:"Michroma",cssVar:"--font-michroma",category:"sans",italic:!1,italicLoaded:!1},{key:"assistant",label:"Assistant",cssVar:"--font-assistant",category:"sans",italic:!1,italicLoaded:!1},{key:"jost",label:"Jost",cssVar:"--font-jost",category:"sans",italic:!0,italicLoaded:!0},{key:"fraunces",label:"Fraunces",cssVar:"--font-serif",category:"serif",italic:!0,italicLoaded:!0},{key:"playfair-display",label:"Playfair Display",cssVar:"--font-playfair",category:"serif",italic:!0,italicLoaded:!0},{key:"cormorant",label:"Cormorant",cssVar:"--font-cormorant",category:"serif",italic:!0,italicLoaded:!0},{key:"jetbrains-mono",label:"JetBrains Mono",cssVar:"--font-mono-loaded",category:"mono",italic:!0,italicLoaded:!0}],_e=new Map(Te.map(e=>[e.key,e])),Wo="site-",bi="--font-site-",yi=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,v={options:Te,byKey:_e,siteFonts:new Map};function Ei(e){if(typeof e?.key!="string"||!e.key.startsWith(Wo))return null;let t=e.key.slice(Wo.length);if(!yi.test(t))return null;let o=e.italic===!0;return{key:e.key,label:R(e.label)??e.family,cssVar:`${bi}${t}`,category:Object.hasOwn(Uo,e.category)?e.category:"sans",italic:o,italicLoaded:o}}function Ou(e){if(!e?.length)return v;let t=new Map(_e),o=[],a=new Map;for(let s of e){let n=Ei(s);!n||t.has(n.key)||(t.set(n.key,n),o.push(n),a.set(n.key,s))}return a.size===0?v:{options:[...o,...Te],byKey:t,siteFonts:a}}var Uo={sans:"Sans",serif:"Serif",mono:"Mono"};function Si(e=v){return Object.keys(Uo).map(t=>[t,e.options.filter(o=>o.category===t)]).filter(([,t])=>t.length>0)}function vu(e=v){return Si(e).flatMap(([,t])=>t)}function xu(e,t=v){return t.byKey.get(e)}var Je=["heading","heading2","heading3","body","accent","label"];function ku(e){return typeof e=="string"&&Je.includes(e)?e:null}var Au={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Emphasis",label:"Labels"},Ti=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],_i=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,Ru={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},Oi={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function Lu(e){let t=e?_i.exec(e):null;return t?P(Oi,t[1])??null:vi(e)}function vi(e){if(!e)return null;let t=e.split(/\s+/).filter(o=>!o.slice(0,o.lastIndexOf(":")+1).includes("&")).map(o=>o.slice(o.lastIndexOf(":")+1));for(let[o,a]of Ti)if(t.includes(o))return a;return null}var G={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function xi(e,t=v){let o=t.byKey,a=s=>{let n=e?.[s];if(n&&o.has(n))return n;if(s==="heading2"||s==="heading3"){let i=e?.heading;return i&&o.has(i)?i:G.heading}return G[s]};return Object.fromEntries(Je.map(s=>[s,a(s)]))}function ki(e,t,o){return o.byKey.get(e[t])??_e.get(G[t])}function Z(e,t,o){return`var(${ki(e,t,o).cssVar})`}var Cu=[...new Set(Je.map(e=>_e.get(G[e]).cssVar))],Iu=[...new Set(Te.map(e=>e.cssVar))];function Pu(e,t=v){let o=xi(e,t);return{"--font-role-heading":Z(o,"heading",t),"--font-role-heading2":Z(o,"heading2",t),"--font-role-heading3":Z(o,"heading3",t),"--font-role-body":Z(o,"body",t),"--font-role-accent":Z(o,"accent",t),"--font-role-label":Z(o,"label",t),fontFamily:"var(--font-role-body)"}}import{VIEW_DESKTOP_MIN as Ai,VIEW_TABLET_MIN as Ri}from"efficient-easel/screen/lib/content/view-tiers";var Yo="v1",Ko=800,Bu=961,Li={"view-tablet":Ri,"view-desktop":Ai,"view-wide":Ko};function Mu(e){let t=e.startsWith("max-"),o=t?e.slice(4):e,a=P(Li,o);if(a!==void 0)return{px:a,max:t};let s=/^(max|min)-\[(\d+)px\]$/.exec(e);return s?{px:Number(s[2]),max:s[1]==="max"}:void 0}var Fu=`(min-width: ${Ko}px)`,Ci="data-sf-line",Ii="edge",Gu={[Ci]:Ii},Wu=(e,t)=>e==="edge"||e!=="section"&&t;import{contrastRatio as ep,hexToRgb as ve,parseHexColor as D,readableInk as qo,relativeLuminance as xe,parseOption as ct}from"efficient-shell/format";import{DEFAULT_SHADOW_COLOR as Mi,pictureShadowColor as Fi}from"efficient-easel/screen/lib/document/shadow-values";import{isLengthUnit as Gi}from"efficient-easel/screen/lib/content/length-units";import{CORNER_RADIUS_MAX as Qo}from"efficient-easel/screen/lib/content/style-keys";import{VIEW_TIERS as Pi,viewKeyAt as $o}from"efficient-easel/screen/lib/content/view-tiers";var N=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0;import{isLengthUnit as et,lengthOf as Ni,rowGrid as Hi}from"efficient-easel/screen/lib/content/length-units";function tt(e,t){let o=Ni(e,ot(t));return typeof o=="number"?`${o}px`:o}function ot(e,t="px"){return et(e)?e:t}function ju(e,t,o){return t.unitKey?ot(e[$o(t.unitKey,o)],t.base??"px"):t.base??"px"}function Xu(e,t=Pi){return e.unitKey?t.map(o=>$o(e.unitKey,o)):[]}function Di(e,t,o){let a=Hi({kind:e},t,o);return t!=="px"&&o.min>0?{...a,min:a.step}:a}function at(e,t,o,a){let s=N(e);if(!et(t)||t==="px"||s===void 0)return null;let n=Di(o,t,a),i=Math.min(n.max,Math.max(n.min,s));return Math.round(i*100)/100}function zu(e,t,o,a){let s=at(e,t,o,a);return s===null?null:tt(s,t)}var Bi={cornerRadiusUnit:"corner_radius_unit",siteWidthUnit:"site_width_unit",siteGutterUnit:"site_gutter_unit",siteGutterPhoneUnit:"site_gutter_phone_unit",blockGapUnit:"block_gap_unit",blockGapPhoneUnit:"block_gap_phone_unit"};function qu(e){let t=e;return Object.fromEntries(Object.entries(Bi).map(([o,a])=>[o,ot(t[a])]))}function Qu(e,t,o){let a=N(e);return et(t)&&t!=="px"&&a!==void 0?a:o(a??null)}import{DEFAULT_SHADOW_COLOR as Np}from"efficient-easel/screen/lib/document/shadow-values";var np="storefront-theme",ip="sf:theme-mode",rp="sf:theme-switch",lp="hide",cp=["light","dark","auto"],pt="light",mt=!1,Wi=7,Ui=18;function Yi(e){return e>=Wi&&e<Ui}function dp(e){let{mode:t,override:o,switchShown:a,hour:s}=e;return a&&(o==="light"||o==="dark")?o:t==="auto"?Yi(s)?"light":"dark":ct(["light","dark"],"dark",t)}var J={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},Ki=[{text:"#2e2e2e",accent:"#2e2e2e",background:"#ffffff",surface:"#f7f7f7",line:"#e0e0e0",muted:"#5c5c5c"},{text:"#f7f7f7",accent:"#f7f7f7",background:"#0a0a0a",surface:"#1b1b1b",line:"#363636",muted:"#a3a3a3"},{text:"#ffffff",accent:"#ffffff",background:"#2e2e2e",surface:"#3d3d3d",line:"#545454",muted:"#b0b0b0"},{text:"#0a0a0a",accent:"#0a0a0a",background:"#f7f7f7",surface:"#ffffff",line:"#d9d9d9",muted:"#5c5c5c"}],ke={selected:0,themes:Ki};function Zo(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...ke}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function st(e,t,o){let a=ve(e),s=ve(t);if(a===null||s===null)return e;let n=(i,r)=>Math.max(0,Math.min(255,Math.round(i+(r-i)*o))).toString(16).padStart(2,"0");return`#${n(a.r,s.r)}${n(a.g,s.g)}${n(a.b,s.b)}`}var $i={light:"#ffffff",dark:"#0a0a0a"},hp=["light","dark"];function up(e,t){let o=$i[t],a=t==="light"?"#ffffff":"#000000";return{text:o,accent:o,background:e,surface:st(e,a,.1),line:st(e,a,.22),muted:st(o,e,.35),brandInk:t}}function te(e){let t=Zo(e);return t.themes[t.selected]}function ee(e){return{text:e.text,accent:e.accent,background:e.background||J.background,surface:e.surface||J.surface,line:e.line||J.line,muted:e.muted||J.muted}}var Vi=.4,ji="#f5f1e8",Vo="#0a0a0a";function Xi(e){let t=te(e).text,o=xe(t);return o===null||o>=Vi?t:null}var zi=4.5,qi=3,pp={good:"Good","large-only":"Large text only",hard:"Hard to read"};function mp(e){return e>=zi?"good":e>=qi?"large-only":"hard"}var Qi=["#000000","#ffffff"];function Ae(e){return qo(e,Qi)}function Jo(e,t){let o=t!==void 0&&xe(t)!==null?t:ji;return qo(e,[Vo,o])===o&&o!==Vo}var Zi=[.25,.4,.55];function fp(e){let t=ve(e);return t===null?[]:Zi.map(o=>"#"+[t.r,t.g,t.b].map(a=>Math.round(a*(1-o)).toString(16).padStart(2,"0")).join(""))}function wp(e){let t={"--theme-fg":te(e).text},o=Xi(e);return o!==null&&(t["--overlay-fg"]=o),t}var Ji=82;function ft(e){return`color-mix(in srgb, ${e} ${Ji}%, #000)`}function gp(e){let t=te(e);return{"--theme-accent":t.accent,"--theme-accent-2":ft(t.accent),"--theme-accent-ink":Ae(t.accent)}}function wt(e){let t=e?.button;return t&&D(t)===t.toLowerCase()?t.toLowerCase():null}function bp(e){let t=te(e),o=wt(t),a=ea(t);if(o===null&&a===null)return{};let s={};return o!==null&&(s["--theme-btn"]=o,s["--theme-btn-2"]=ft(o)),s["--theme-btn-ink"]=a??Ae(o),s}function ea(e){let t=e?.buttonInk;return t&&D(t)===t.toLowerCase()?t.toLowerCase():null}function er(e,t){return ea(e)??Ae(wt(e)??t)}function yp(e){let t=te(e);return{fill:wt(t)??t.accent.toLowerCase(),ink:er(t,t.accent)}}function Ep(e){let t={};return Zo(e).themes.forEach((o,a)=>{let s=ee(o);t[`--theme-preset-${a}-accent`]=s.accent,t[`--theme-preset-${a}-accent-2`]=ft(s.accent),t[`--theme-preset-${a}-accent-ink`]=Ae(s.accent),t[`--theme-preset-${a}-bg`]=s.background,t[`--theme-preset-${a}-fg`]=s.text,t[`--theme-preset-${a}-surface`]=s.surface,t[`--theme-preset-${a}-surface-2`]=`color-mix(in srgb, ${s.surface} 60%, ${s.line})`,t[`--theme-preset-${a}-line`]=s.line,t[`--theme-preset-${a}-muted`]=s.muted}),t}var nt=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},it=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function jo([e,t,o]){let[a,s,n]=[nt(e),nt(t),nt(o)],i=Math.cbrt(.4122214708*a+.5363325363*s+.0514459929*n),r=Math.cbrt(.2119034982*a+.6806995451*s+.1073969566*n),c=Math.cbrt(.0883024619*a+.2817188376*s+.6299787005*n);return[.2104542553*i+.793617785*r-.0040720468*c,1.9779984951*i-2.428592205*r+.4505937099*c,.0259040371*i+.7827717662*r-.808675766*c]}function tr([e,t,o]){let a=(e+.3963377774*t+.2158037573*o)**3,s=(e-.1055613458*t-.0638541728*o)**3,n=(e-.0894841775*t-1.291485548*o)**3;return[it(4.0767416621*a-3.3077115913*s+.2309699292*n),it(-1.2684380046*a+2.6097574011*s-.3413193965*n),it(-.0041960863*a-.7034186147*s+1.707614701*n)]}var dt=e=>{let t=ve(e);return t===null?[0,0,0]:[t.r,t.g,t.b]},ta=(e,t,o)=>[e[0]*o+t[0]*(1-o),e[1]*o+t[1]*(1-o),e[2]*o+t[2]*(1-o)],oa=e=>`#${e.map(t=>Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")).join("")}`,aa=e=>ta(dt(e.surface),dt(e.line),.6);function Sp(e){return oa(aa(ee(e)))}function or(e){let t=ee(e);return oa(tr(ta(jo(aa(t)),jo(dt(t.text)),.92)))}function sa(e,t,o,a){let s=e[t];if(!s)return-1;let n=o(s);if(!n)return-1;let i=ee(s);return e.findIndex((r,c)=>{if(c===t)return!1;let h=ee(r);return D(h.background)!==n?!1:!a||D(h.text??"")===D(i.text??"")&&D(h.accent??"")===D(i.accent??"")})}function Tp(e,t){return sa(e,t,or,!1)}function _p(e,t){return sa(e,t,o=>D(o.surface??""),!0)}var ar=1;function sr(e,t){let o=(e??[]).flatMap((a,s)=>{let n=xe(a.background??""),i=xe(a.text??"");return n!==null&&i!==null&&n<i?[s]:[]});return o.find(a=>a!==t)??o[0]??ar}function Op(e){return sr(e?.themes,e?.selected)}var vp=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function xp(e){let t=ee(te(e)),o=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,a={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==J.surface||t.line!==J.line)&&(a["--theme-surface-2"]=o),a}var nr=["heading","body","label"];function kp(e){if(!e)return null;for(let t of nr)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}var na=["headingLarge","headingMedium","headingSmall","accent","body","label"];var gt={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},ir=8,rr=200;function lr(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.round(e);return t>=ir&&t<=rr?t:null}function cr(e){let t={};for(let o of na)t[o]=lr(e?.[o]);return t}function Ap(e){let t=cr(e),o={};for(let a of na){let s=t[a];s!==null&&(o[`--size-${a}`]=`${s}px`)}return o}var dr=["square","small","large"],hr="small";function Rp(e){return dr.includes(e??"")?e:hr}var Re=0,ur={min:Re,max:Qo,step:1},Lp={square:0,small:null,large:16},ht={"--sf-card-radius":1,"--sf-button-radius":.5,"--site-radius":.5,"--site-radius-xs":.25,"--site-radius-sm":.5,"--site-radius-md":.75,"--site-radius-lg":1,"--site-radius-xl":1.25,"--site-radius-2xl":1.5,"--site-radius-3xl":2,"--site-radius-4xl":2.5};function bt(e){if(e==null||typeof e=="string"&&e.trim()==="")return null;let t=typeof e=="string"?Number(e):e;return Number.isFinite(t)?Math.min(Qo,Math.max(Re,Math.round(t))):null}function Xo(e,t){if(Gi(t)&&t!=="px"){if(typeof e!="number"||!Number.isFinite(e))return{};let a=Math.max(0,e);return Object.fromEntries(Object.entries(ht).map(([s,n])=>{let i=Math.round(a*n*1e4)/1e4;return[s,i===0?"0":tt(i,t)]}))}let o=bt(e);return o===null?{}:Object.fromEntries(Object.entries(ht).map(([a,s])=>{let n=o*s/16;return[a,n===0?"0":`${n}rem`]}))}function Cp(e){return(bt(e)??Re)*ht["--sf-button-radius"]}function Ip(e,t){let o=at(e,t,"radius",ur);return o!==null?Xo(o,t):Xo(bt(e)??Re)}var pr=["none","soft","lifted"],mr="soft",ia="none",fr=["tight","normal","roomy"],wr="normal",Le="normal",gr=["none","lift","highlight"],br="lift",yr="highlight";function ra(e){return pr.includes(e??"")?e:mr}function Er(e){return fr.includes(e??"")?e:wr}function la(e){return gr.includes(e??"")?e:br}function Hp(e){let t=ra(e);return t===ia?void 0:t}function Dp(e){let t=Er(e);return t===Le?void 0:t}function Bp(e){let t=la(e);return t===yr?void 0:t}function Mp(e,t,o){let a=Fi(t);return a===Mi?{}:ra(e)!==ia||la(o)==="lift"?{"--sf-shadow-color":a}:{}}var Sr=["normal","tight","compressed"],me="normal";function ca(e){return Sr.includes(e??"")?e:me}function Fp(e){let t=ca(e);return t===me?void 0:t}function Gp(e){switch(ca(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}var zo=["authored","sentence"],yt={case:"authored",weight:null,weightStrong:null,italicStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},rt=100,lt=900,Tr=24,_r=200;function Oe(e,t,o){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),o))}function da(e){let t=Oe(e?.weight,rt,lt),o=ct(zo,"authored",e?.case),a=n=>n==null?t:Oe(n,rt,lt),s=n=>ct(zo,o,n);return{case:o,weight:t,weightStrong:Oe(e?.weightStrong,rt,lt),italicStrong:typeof e?.italicStrong=="boolean"?e.italicStrong:null,maxPx:Oe(e?.maxPx,Tr,_r),weight2:a(e?.weight2),weight3:a(e?.weight3),case2:s(e?.case2),case3:s(e?.case3)}}function Wp(e){let t=da(e),o={};return t.case==="sentence"&&(o["--sf-heading-case"]="none"),t.weight!==null&&(o["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(o["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(o["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(o["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(o["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(o["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(o["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),o}function Up(e){return da({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,italicStrong:e?.accent_italic,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}var ut="siteTheme";function Or(e){let t=e;if(!t||typeof t!="object"||!Array.isArray(t.themes)||!t.themes.every(a=>!!a&&typeof a=="object"))return{};let o=typeof t.selected=="number"&&Number.isInteger(t.selected)&&t.selected>=0?t.selected:0;return{[ut]:{selected:o,themes:t.themes}}}function Yp(e){return Or(e?.[ut])[ut]}import{parseHexColor as vr}from"efficient-shell/format";var Et=[{role:"bg",token:"--bg",ink:!1},{role:"fg",token:"--fg",ink:!0},{role:"surface",token:"--site-surface",ink:!1},{role:"surface-2",token:"--site-surface-2",ink:!1},{role:"line",token:"--site-line",ink:!0},{role:"muted",token:"--fg-dim",ink:!0}],xr=Et.filter(e=>e.ink);function ha(e){let t={color:e.fg};for(let{role:o,token:a}of xr)t[a]=e[o];return t}var kr={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},Ar=Object.freeze(ha(kr)),Rr={fg:"var(--overlay-fg-on-light)",line:"color-mix(in srgb, var(--overlay-fg-on-light) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg-on-light) 76%, transparent)"},Lr=Object.freeze(ha(Rr));function jp(e,t){let o=e?vr(e):null;return o?Jo(o,t)?Ar:Lr:null}import{jsx as ma}from"react/jsx-runtime";import{createContext as Pr,useCallback as m,useContext as Nr,useMemo as Hr,useState as Dr}from"react";import{createContext as pa,useContext as St}from"react";import{createContext as Cr}from"react";var ua=Cr(null);var Ir=pa(null),Tt=pa({logo:null,placeholder:!1,wordmark:null});function Jp(){let e=St(ua),t=St(Ir),o=St(Tt),a=!e&&o.placeholder,s=e?e.logoUrl:o.logo?.logoUrl??t?.logoUrl??null;return{src:a?null:s,reversedSrc:e?e.logoReversed:o.logo?.logoReversed??t?.logoReversed??null,inkIsDark:e?e.logoInkIsDark:o.logo?.logoInkIsDark??t?.logoInkIsDark??null,wordmark:e?null:o.wordmark,siteName:e?.siteName??t?.siteName}}var fa={},wa=Pr({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:pt,setThemeMode:()=>{},themeSwitchShown:mt,setThemeSwitchShown:()=>{},theme:ke,themeRow:"none",setTheme:()=>{},fonts:G,setFonts:()=>{},sizes:gt,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:Le,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:me,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,siteGutterPhone:null,blockGap:null,blockGapPhone:null,siteLengthUnits:fa,setSiteLengthUnits:()=>{},setSiteGutter:()=>{},setSiteGutterPhone:()=>{},setBlockGap:()=>{},setBlockGapPhone:()=>{},headingTypography:yt,setHeadingTypography:()=>{},textStyles:null,setTextStyles:()=>{},wordStyles:null,heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},sectionBackgroundWidth:null,setSectionBackgroundWidth:()=>{},sectionContentWidth:null,setSectionContentWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},shareButtonOnPosts:null,setShareButtonOnPosts:()=>{},themeFromDocument:!1});function im({children:e,websiteName:t=null,templateChrome:o=!1,templateName:a=null,chromePlaceholder:s=!1,themeMode:n=pt,onThemeModeChange:i,themeSwitchShown:r=mt,onThemeSwitchShownChange:c,theme:h=ke,themeRow:_="none",onThemeChange:O,fonts:Ze=G,onFontsChange:fo,sizes:_n=gt,onSizesChange:wo,cornerRadiusPx:On=null,onCornerRadiusPxChange:go,cardShadow:vn=null,onCardShadowChange:bo,shadowColor:xn=null,onShadowColorChange:yo,cardGap:kn=Le,onCardGapChange:Eo,hoverEffect:An=null,onHoverEffectChange:So,headingCompression:Rn=me,onHeadingCompressionChange:To,siteWidth:Ln=null,onSiteWidthChange:_o,siteGutter:Cn=null,siteGutterPhone:In=null,blockGap:Pn=null,blockGapPhone:Nn=null,siteLengthUnits:Hn=fa,onSiteLengthUnitsChange:Oo,onSiteGutterChange:vo,onSiteGutterPhoneChange:xo,onBlockGapChange:ko,onBlockGapPhoneChange:Ao,headingTypography:Dn=yt,onHeadingTypographyChange:Ro,textStyles:Bn=null,onTextStylesChange:Lo,wordStyles:Mn=null,heroBackgroundFollowsWidth:Fn=null,onHeroBackgroundFollowsWidthChange:Co,sectionBackgroundWidth:Gn=null,onSectionBackgroundWidthChange:Io,sectionContentWidth:Wn=null,onSectionContentWidthChange:Po,photographyGrayscale:Un=null,onPhotographyGrayscaleChange:No,shareButtonOnPosts:Yn=null,onShareButtonOnPostsChange:Ho,themeFromDocument:Kn=!1}){let[pe,Do]=Dr(null),$n=m(l=>Do(gi=>gi??l),[]),Vn=m(l=>i?.(l),[i]),jn=m(l=>c?.(l),[c]),Xn=m(l=>O?.(l),[O]),zn=m(l=>fo?.(l),[fo]),qn=m(l=>wo?.(l),[wo]),Qn=m(l=>_o?.(l),[_o]),Zn=m(l=>vo?.(l),[vo]),Jn=m(l=>xo?.(l),[xo]),ei=m(l=>ko?.(l),[ko]),ti=m(l=>Ao?.(l),[Ao]),oi=m(l=>Oo?.(l),[Oo]),ai=m(l=>Co?.(l),[Co]),si=m(l=>Io?.(l),[Io]),ni=m(l=>Po?.(l),[Po]),ii=m(l=>No?.(l),[No]),ri=m(l=>Ho?.(l),[Ho]),li=m(l=>go?.(l),[go]),ci=m(l=>bo?.(l),[bo]),di=m(l=>yo?.(l),[yo]),hi=m(l=>Eo?.(l),[Eo]),ui=m(l=>So?.(l),[So]),pi=m(l=>To?.(l),[To]),mi=m(l=>Ro?.(l),[Ro]),fi=m(l=>Lo?.(l),[Lo]),Bo=pe?.logoUrl,Mo=pe?.logoReversed,Fo=pe?.logoInkIsDark,Go=pe!==null,wi=Hr(()=>({logo:Go?{logoUrl:Bo,logoReversed:Mo,logoInkIsDark:Fo}:null,placeholder:o||s,wordmark:o?a:t}),[Go,Bo,Mo,Fo,o,s,a,t]);return ma(Tt.Provider,{value:wi,children:ma(wa.Provider,{value:{settings:pe,setSettings:Do,primeSettings:$n,websiteName:t,templateChrome:o,templateName:a,chromePlaceholder:s,themeMode:n,setThemeMode:Vn,themeSwitchShown:r,setThemeSwitchShown:jn,theme:h,themeRow:_,setTheme:Xn,fonts:Ze,setFonts:zn,sizes:_n,setSizes:qn,cornerRadiusPx:On,setCornerRadiusPx:li,cardShadow:vn,setCardShadow:ci,shadowColor:xn,setShadowColor:di,cardGap:kn,setCardGap:hi,hoverEffect:An,setHoverEffect:ui,headingCompression:Rn,setHeadingCompression:pi,siteWidth:Ln,setSiteWidth:Qn,siteGutter:Cn,siteGutterPhone:In,blockGap:Pn,blockGapPhone:Nn,siteLengthUnits:Hn,setSiteLengthUnits:oi,setSiteGutter:Zn,setSiteGutterPhone:Jn,setBlockGap:ei,setBlockGapPhone:ti,headingTypography:Dn,setHeadingTypography:mi,textStyles:Bn,setTextStyles:fi,wordStyles:Mn,heroBackgroundFollowsWidth:Fn,setHeroBackgroundFollowsWidth:ai,sectionBackgroundWidth:Gn,setSectionBackgroundWidth:si,sectionContentWidth:Wn,setSectionContentWidth:ni,photographyGrayscale:Un,setPhotographyGrayscale:ii,shareButtonOnPosts:Yn,setShareButtonOnPosts:ri,themeFromDocument:Kn},children:e})})}var Br=()=>Nr(wa);function rm(e,t,o){return e?t===o?"read":"loading":"none"}function lm(e,t){return{value:e,readFor:t}}function cm(e,t,o){return{value:t,readFor:e.readFor===o?o:null}}function dm(){let{sectionContentWidth:e,themeFromDocument:t}=Br();return t?null:e}var pm=["general","commerce","service"],oe=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"GalleryB",label:"Gallery",set:"commerce"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Reviews",label:"Reviews",set:"service"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Countdown",label:"Countdown",set:"general"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"ArticleBody",label:"Article Body",set:"service"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocBody",label:"Document Text",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:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]},{key:"layouts",title:"Layouts",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"SpecStrip",label:"Spec Strip",set:"general"},{type:"TimelineTrack",label:"Milestone Timeline",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"Logos",label:"Logos",set:"general"},{type:"DocMasthead",label:"Page Header",set:"general"},{type:"DocTabs",label:"Tab Bar",set:"general"},{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Banner",label:"Banner",set:"general"}]}];function mm(){return Object.fromEntries(oe.map(e=>[e.key,{title:e.title,components:e.sections.map(t=>t.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var Mr="2027-02-05",Fr="2027-02-14",ga={CategoryBar:{label:"Category bar",note:`The reviewer, 2026-11-06 (the page headers and the tab bars become TWO Layouts rows, Page Header and Tab Bar): Category Bar folds into the Tab Bar. Retired from the Add menu with no second preset.
2
2
 
3
3
  WHAT REPLACES IT: Tab Bar, a Box pinned under the header that stays above the sections after it, with a line below, holding the Menu block (One row, Menu style Tabs, Current page). Set the Menu's content to Blog categories: the blog's own categories, most posts first, each with its count in its cell (the host seeds the count card, Count on). Its converter row (\`section-to-box-rows-tabbar\` \`categoryBar\`, OFF) draws that bar for a stored page that moves later.
4
4