efficient-web-builder 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +26 -0
- package/dist/chunks/{EditorPreviewCheckout-NMJHO2WR.js → EditorPreviewCheckout-RALICX2M.js} +3 -3
- package/dist/chunks/PreviewFooter-TTWVSN7F.js +1 -0
- package/dist/chunks/SectionEditorShell-QHF74BM4.js +1 -0
- package/dist/chunks/StorefrontEditorChrome-VAFMI23Y.js +1 -0
- package/dist/chunks/{chunk-YMLSAFSM.js → chunk-23HYGLAH.js} +1 -1
- package/dist/chunks/chunk-2Z43RC3L.js +143 -0
- package/dist/chunks/chunk-4MT74TMP.js +1 -0
- package/dist/chunks/{chunk-G3X5WFSD.js → chunk-5WIA75VU.js} +1 -1
- package/dist/chunks/chunk-764WH3TY.js +11 -0
- package/dist/chunks/chunk-DN65SLZM.js +1 -0
- package/dist/chunks/chunk-FEL3RPX5.js +230 -0
- package/dist/chunks/chunk-KZIT3J33.js +1 -0
- package/dist/chunks/chunk-X2DL3VCU.js +15 -0
- package/dist/chunks/chunk-XMRSKZIR.js +2 -0
- package/dist/chunks/{fitment-data-6OYGRNMJ.js → fitment-data-6EHBA26C.js} +1 -1
- package/dist/chunks/render-client-3H6QYWG7.js +1 -0
- package/dist/editor.css +1 -1
- package/dist/index.js +23 -81
- package/dist/links.d.ts +86 -0
- package/dist/links.js +1 -0
- package/package.json +8 -1
- package/dist/chunks/PreviewFooter-E3AVT663.js +0 -1
- package/dist/chunks/SectionEditorShell-CNJJULHO.js +0 -1
- package/dist/chunks/StorefrontEditorChrome-OF6DKLWG.js +0 -1
- package/dist/chunks/chunk-6C5FL63W.js +0 -2
- package/dist/chunks/chunk-A2QNXDQ6.js +0 -11
- package/dist/chunks/chunk-INA2LIFW.js +0 -230
- package/dist/chunks/chunk-JSOIOPWC.js +0 -1
- package/dist/chunks/chunk-NTGUUW2T.js +0 -1
- package/dist/chunks/chunk-PAXN7G3Y.js +0 -1
- package/dist/chunks/chunk-QVG6K5WY.js +0 -15
- package/dist/chunks/chunk-V2G3QFLM.js +0 -143
- package/dist/chunks/render-client-O7623TWA.js +0 -1
- /package/dist/chunks/{chunk-V2G3QFLM.js.LEGAL.txt → chunk-2Z43RC3L.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{chunk-QVG6K5WY.js.LEGAL.txt → chunk-X2DL3VCU.js.LEGAL.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var L="x-forwarded-for";function X(e){let t=(e??"").split(",").map(n=>n.trim()).filter(Boolean);return t.length>0?t[t.length-1]:null}var Ue="x-forwarded-host";function ee(e,t,n){let r={};return e&&(r[Ue]=e),t&&n==="uncached"&&(r[L]=t),r}function te(e){if(e?.cache==="no-store"||e?.cache==="no-cache")return"uncached";if(e?.cache==="force-cache")return"data-cached";let t=e?.next?.revalidate;return typeof t=="number"&&t>0?"data-cached":"uncached"}var Me=Symbol.for("efficient-web.efficient-backend");function He(e){return!!e&&e[Me]===!0}function ne(e){return e?.trim()||null}function De(e={}){let t=e.backend??null,n=new Map,r={token:null,brandId:null},s={documentId:null,bridgedId:null};return{hostBackend:t,usesBridgedToken:t===null||He(t),blocks:e.blocks??null,auth:r,site:s,siteId:()=>s.documentId??s.bridgedId,cache(i,u){return n.has(i)||n.set(i,u()),n.get(i)},forget(i){i===void 0?n.clear():n.delete(i)}}}function We(e,t){e.site.documentId=ne(t)}function Je(e,t){e.site.bridgedId=ne(t)}var Ge=De(),O=null,N=new Set;function _(){return O??Ge}function Dt(e){N.delete(e),O=e}function Wt(e){N.add(e),queueMicrotask(()=>{N.delete(e)&&O===e&&(O=null)})}function re(){return _().usesBridgedToken}var Ve={siteSlug:null,shopOrigin:""},$=Ve;function Gt(e){$={siteSlug:e.siteSlug?.trim()||null,shopOrigin:(e.shopOrigin??"").trim().replace(/\/+$/,"")}}function U(){return $.siteSlug}function se(){return $.shopOrigin}var ie="x-storefront-site",oe="x-storefront-host";var ae={contentHash:"db2b679aad5380c6",schema:1,mediaFields:{ImageBlock:["src"],LogoBlock:["src"],Flex:["bgImage"],FeaturedCover:["image"],LongRead:["image"],Banner:["imageSrc"],Timeline:["imageSrc"],Logos:["items[].src"],ContactLocations:["locations[].photo"],HeroSingle:["imageFocal","mediaImage","mediaVideo","poster"],HeroSlide:["mediaImage","mediaVideo","poster"],PostCard:["image"],Gallery:["othersCards[].image","othersCards[].photos[].src","vehicleCards[].image","vehicleCards[].photos[].src","wheelCards[].image","wheelCards[].photos[].src"],GalleryItem:["image","photos[].src"],Manifesto:["imageSrc"],SectionHeader:["logoSrc"],IntroBleed:["imageSrc","imageSrcMobile"],Split:["imageSrc","textBgSrc"],ProcessSteps:["steps[].image"],DetailRows:["rows[].image"],PaymentBadges:["badges[].src"]},mediaKeyNames:["bgImage","image","imageFocal","imageSrc","imageSrcMobile","logoSrc","mediaImage","mediaVideo","photo","poster","src","textBgSrc"],snapshotObjects:{ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},hydratedLists:{Events:["posts"],SubscribeBlogs:["posts"]},technicalStateKeys:["imageFocal"]};function M(e){return{getItem(t){try{return e()?.getItem(t)??null}catch{return null}},setItem(t,n){try{e()?.setItem(t,n)}catch{}},removeItem(t){try{e()?.removeItem(t)}catch{}}}}var A="__storefront_probe__";function jt(e){try{e.setItem(A,A);let t=e.getItem(A)===A;return e.removeItem(A),t}catch{return!1}}var v=M(()=>typeof window>"u"?null:window.localStorage),Zt=M(()=>typeof window>"u"?null:window.sessionStorage);function Qt(e){return M(()=>e.defaultView?.localStorage??null)}var ze="shop_access_token",le="shop_refresh_token",H=null;function D(){v.removeItem(ze),v.removeItem(le)}var b={getAccess(){return H},takeLegacyRefresh(){let e=v.getItem(le);return D(),e},setTokens(e){H=e,D()},clear(){H=null,D()}};function je(e){return!!e.src}function R(e){let t=e.finishes.filter(je);if(t.length===e.finishes.length)return e;let n=e.defaultFinish&&t.some(r=>r.name===e.defaultFinish)?e.defaultFinish:null;return{...e,finishes:t,defaultFinish:n}}function Ze(e){return e.listable!==!1}function W(e){return e.map(R).filter(Ze)}var I="https://cdn.inovit.com"?.replace(/\/+$/,"");function J(e,t){let n=_().hostBackend?.media.resolve;if(!(!n||n===Ye))return n(e,t)??e}function Qe(e){return/^(?:https?:)?\/\//i.test(e)||/^(?:data|blob):/i.test(e)}function G(e){return J(e)??ce(e)}function ce(e){return!I||Qe(e)?e:I+e.replace(/^\/media/,"")}var Ye=e=>ce(e),Xe="";function E(e){if(!e)return null;let t=J(e);return t!==void 0?t:e.startsWith("/")?`${Xe}${e}`:e}function on(e){return/^https?:\/\//i.test(e)&&!(I&&e.startsWith(I+"/"))}function an(e){if(!e)return;let t=J(e);return t!==void 0?t:e.startsWith("/media/")?G(e):e}function ln(e){let t=e.split("?")[0],n=t.substring(t.lastIndexOf("/")+1);try{return decodeURIComponent(n.replace(/^[0-9a-f]{32}_/i,""))||n}catch{return n}}var et="/videos/products/";function cn(e){return!!e&&e.includes(et)}var pe=["fill","stroke","stop-color","color","flood-color","lighting-color","solid-color"],ge=new Set(["none","transparent","currentcolor","inherit","initial","unset","context-fill","context-stroke"]),F={black:[0,0,0],white:[255,255,255],gray:[128,128,128],grey:[128,128,128],darkgray:[169,169,169],darkgrey:[169,169,169],dimgray:[105,105,105],dimgrey:[105,105,105],lightgray:[211,211,211],lightgrey:[211,211,211],gainsboro:[220,220,220],silver:[192,192,192],whitesmoke:[245,245,245]},he=12,ye=/\burl\(/i,fe=new RegExp(`(?<![-\\w])(${pe.join("|")})(\\s*=\\s*)(["'])([^"']*)\\3`,"gi"),Se=new RegExp(`((?:^|[;{\\s"'])(?:${pe.join("|")})\\s*:\\s*)([^;}"'<>]+)`,"gi"),tt=/<svg\b([^>]*)>/i,nt=/\bfill\s*[=:]/i;function rt(e){let t=e.replace(fe,(n,r,s,i,u)=>{let m=ue(u);return m===null?n:`${r}${s}${i}${m}${i}`}).replace(Se,(n,r,s)=>{let i=ue(s);return i===null?n:`${r}${i}`});return t=t.replace(tt,(n,r)=>nt.test(r)?n:`<svg fill="#ffffff"${r}>`),t}function ue(e){let t=/!important/i.test(e),r=e.replace(/!important/gi,"").trim().toLowerCase();if(!r||ye.test(r)||ge.has(r))return null;let s=r in F?[...F[r],1]:Pe(r);if(!s)return null;let[i,u,m,d]=s;if(Math.max(i,u,m)-Math.min(i,u,m)>he)return null;let y=st(255-i,255-u,255-m,d);return t?`${y} !important`:y}function st(e,t,n,r){if(r<1)return`rgba(${e}, ${t}, ${n}, ${r})`;let s=i=>i.toString(16).padStart(2,"0");return`#${s(e)}${s(t)}${s(n)}`}function Pe(e){return e.startsWith("#")?it(e):e.startsWith("rgb")?ot(e):e.startsWith("hsl")?lt(e):null}function it(e){let t=e.slice(1),n=1;if(t.length===3||t.length===4)t.length===4&&(n=parseInt(t[3]+t[3],16)/255),t=t.slice(0,3).split("").map(r=>r+r).join("");else if(t.length===6||t.length===8)t.length===8&&(n=parseInt(t.slice(6,8),16)/255),t=t.slice(0,6);else return null;return/^[0-9a-f]{6}$/.test(t)?[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),n]:null}function ot(e){let t=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),[n,r]=t.split("/"),s=n.split(/[\s,]+/).filter(Boolean).slice(0,3);if(s.length<3)return null;let i=s.map(m=>m.endsWith("%")?Math.round(parseFloat(m)/100*255):Math.round(parseFloat(m)));if(i.some(m=>Number.isNaN(m)))return null;let u=r?B(r):at(n);return[i[0],i[1],i[2],u]}function at(e){let t=e.split(/[\s,]+/).filter(Boolean);return t.length>=4?B(t[3]):1}function B(e){let t=e.trim().endsWith("%")?parseFloat(e)/100:parseFloat(e);return Number.isNaN(t)?1:t}function lt(e){let t=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),[n,r]=t.split("/"),s=n.split(/[\s,]+/).filter(Boolean);if(s.length<3)return null;let i=parseFloat(s[0]),u=parseFloat(s[1])/100,m=parseFloat(s[2])/100;if([i,u,m].some($e=>Number.isNaN($e)))return null;let d=r?B(r):s.length>=4?B(s[3]):1,[y,S,P]=ct(i,u,m);return[y,S,P,d]}function ct(e,t,n){let r=(1-Math.abs(2*n-1))*t,s=(e%360+360)%360/60,i=r*(1-Math.abs(s%2-1)),u=0,m=0,d=0;s<1?[u,m,d]=[r,i,0]:s<2?[u,m,d]=[i,r,0]:s<3?[u,m,d]=[0,r,i]:s<4?[u,m,d]=[0,i,r]:s<5?[u,m,d]=[i,0,r]:[u,m,d]=[r,0,i];let y=n-r/2;return[Math.round((u+y)*255),Math.round((m+y)*255),Math.round((d+y)*255)]}var me=512*1024;function V(e){return/\.svg(\?|$)/i.test(e)}function ut(e){return`data:image/svg+xml,${encodeURIComponent(rt(e))}`}function mt(e){let t=e.replace(/!important/gi,"").trim().toLowerCase();if(!t||ye.test(t)||ge.has(t))return null;let n=t in F?[...F[t],1]:Pe(t);if(!n)return null;let[r,s,i]=n;return Math.max(r,s,i)-Math.min(r,s,i)>he?null:(.2126*r+.7152*s+.0722*i)/255}function dt(e){let t=[],n=r=>{let s=mt(r);s!==null&&t.push(s)};for(let r of e.matchAll(fe))n(r[4]);for(let r of e.matchAll(Se))n(r[2]);return t.length?t.reduce((r,s)=>r+s,0)/t.length<.5:null}var de=/^(?:\uFEFF|\s+|<\?xml[^>]*\?>|<!--[\s\S]*?-->|<!DOCTYPE\s+svg[^>[]*>)/i;function pt(e){let t=e;for(let n=de.exec(t);n&&n[0].length>0;n=de.exec(t))t=t.slice(n[0].length);return/^<svg[\s>/]/i.test(t)}async function gt(e,t){if(!V(e))return null;try{let n=await fetch(e,{signal:t,redirect:"manual"});if(!n.ok)return null;let r=Number(n.headers.get("content-length"));if(Number.isFinite(r)&&r>me)return null;let s=await n.text();return s.length>me?null:pt(s)?s:null}catch{return null}}async function be(e,t){let n=await gt(e,t);return n===null?null:{reversed:ut(n),inkIsDark:dt(n)}}function we(){return _().siteId()}var ht="",f=class extends Error{constructor(t,n,r){super(n),this.status=t,this.data=r}},z="Unable to reach the server. This could be a problem with your internet connection, or the server may be undergoing maintenance or an upgrade. Please try again shortly.",yt=new Set([502,503,504]),K=0,ft="This editor runs on its host's own backend, which does not serve this request.",St=5e3,Pt=15e3,bt=()=>typeof window>"u"?St:Pt;function Ie(e){let t=(e.method??"GET").toUpperCase();if(!(e.body!=null||t!=="GET"&&t!=="HEAD")&&e.audience!=="admin"&&typeof AbortSignal?.timeout=="function")return AbortSignal.timeout(bt())}var _e=e=>e instanceof Error&&e.name==="TimeoutError",Ae=(e,t)=>yt.has(e)?z:t;function wt(e){if(typeof window>"u"||!e.startsWith("/api/v1/"))return e;let t=U();return!t||/[?&]site=/.test(e)?e:j(e,`site=${encodeURIComponent(t)}`)}async function o(e,t={}){let{token:n,baseUrl:r,headers:s,audience:i,...u}=t;if(typeof window<"u"&&!re())throw new f(K,ft,null);if(typeof window>"u"&&r===void 0)throw new Error(`apiFetch(${JSON.stringify(e)}) ran on the server without an explicit baseUrl. The API_URL default it would inherit is browser-only (the prod image bakes NEXT_PUBLIC_API_URL="" for same-origin use, which a Node fetch cannot resolve). Pass a base explicitly: \`await backendOpts()\` (or baseUrl: PRODUCT_FETCH_BASE) for product reads, or the server-only PRODUCT_BACKEND_URL env for other backend surfaces.`);let m=typeof FormData<"u"&&u.body instanceof FormData,d;try{d=await fetch(`${r??ht}${wt(e)}`,{...u,headers:{...m?{}:{"Content-Type":"application/json"},...n?{Authorization:`Bearer ${n}`}:{},...i===null?{}:{"X-Portal-Audience":i??"shop"},...s},signal:u.signal??Ie({...u,audience:i})})}catch(P){throw P instanceof TypeError||_e(P)?new f(K,z,null):P}let y;try{y=await d.text()}catch(P){throw _e(P)?new f(K,z,null):P}let S=null;if(y)try{S=JSON.parse(y)}catch{throw new f(d.status,d.ok?"Expected JSON but received a non-JSON response":Ae(d.status,d.statusText),y)}if(!d.ok){let P=(S&&typeof S=="object"&&"detail"in S&&typeof S.detail=="string"?S.detail:null)??Ae(d.status,d.statusText);throw new f(d.status,P,S)}return S}var x=null;async function Ee(){return x||(x=_t().finally(()=>{x=null}),x)}async function _t(){let e=b.takeLegacyRefresh(),t=await At.refresh(e??void 0);return b.setTokens(t.access),t.access}async function Fe(){return b.getAccess()??Ee()}async function p(e,t={}){let n;try{n=await Fe()}catch{throw b.clear(),new f(401,"Not signed in",null)}try{return await o(e,{...t,token:n})}catch(r){if(!(r instanceof f)||r.status!==401)throw r;try{let s=await Ee();return await o(e,{...t,token:s})}catch{throw b.clear(),r}}}async function Re(e,t={}){if(b.getAccess())try{return{data:await p(e,t),asShopper:!0}}catch(n){if(!(n instanceof f)||n.status!==401)throw n}return{data:await o(e,t),asShopper:!1}}async function xe(){let e=await p("/api/auth/me/");if(e.portal!=="shop")throw b.clear(),new f(403,"This session is not valid for this shop.",null);return e}var At={login:(e,t)=>o("/api/auth/login/",{method:"POST",body:JSON.stringify({email:e,password:t,portal:"shop"}),credentials:"include"}),refresh:e=>o("/api/auth/refresh/",{method:"POST",body:JSON.stringify(e?{refresh:e,portal:"shop"}:{portal:"shop"}),credentials:"include"}),logout:async()=>{b.clear();try{await o("/api/auth/logout/",{method:"POST",body:JSON.stringify({portal:"shop"}),credentials:"include"})}catch{}},restoreSession:async()=>{let e=await Fe();return await xe(),e},me:xe,updateMe:e=>p("/api/auth/me/",{method:"PATCH",body:JSON.stringify(e)}),changePassword:(e,t)=>p("/api/auth/me/",{method:"PATCH",body:JSON.stringify({password:t,old_password:e})}),changeEmail:(e,t)=>p("/api/shop-portal/change-email/",{method:"POST",body:JSON.stringify({new_email:e,current_password:t})}),myProfile:()=>p("/api/shop-portal/profile/"),updateMyProfile:e=>p("/api/shop-portal/profile/",{method:"PATCH",body:JSON.stringify(e)}),myAddresses:()=>p("/api/shop-portal/delivery-locations/"),createAddress:e=>p("/api/shop-portal/delivery-locations/",{method:"POST",body:JSON.stringify(e)}),updateAddress:(e,t)=>p(`/api/shop-portal/delivery-locations/${e}/`,{method:"PATCH",body:JSON.stringify(t)}),deleteAddress:e=>p(`/api/shop-portal/delivery-locations/${e}/`,{method:"DELETE"}),passwordResetRequest:e=>o("/api/auth/password-reset/",{method:"POST",body:JSON.stringify({email:e})}),passwordResetConfirm:(e,t,n)=>o("/api/auth/password-reset/confirm/",{method:"POST",body:JSON.stringify({uid:e,token:t,new_password:n})}),brands:()=>p("/api/products/brands/"),myOrders:()=>p("/api/shop-portal/orders/").then(e=>e.results),myOrder:e=>p(`/api/shop-portal/orders/${e}/`),cancelOrder:e=>p(`/api/shop-portal/orders/${e}/cancel/`,{method:"POST"}),myReturns:e=>p(`/api/shop-portal/returns/${e?`?order=${encodeURIComponent(e)}`:""}`).then(t=>t.results),createReturn:e=>p("/api/shop-portal/returns/",{method:"POST",body:JSON.stringify(e)}),withdrawReturn:e=>p(`/api/shop-portal/returns/${e}/cancel/`,{method:"POST"}),uploadReturnPhoto:(e,t)=>{let n=new FormData;return n.append("claim_item",e),n.append("file",t),n.append("media_type",t.type.startsWith("video/")?"video":"image"),p("/api/shop-portal/return-media/",{method:"POST",body:n})}};function h(e){if(typeof e=="string")return e.startsWith("/media/")?G(e):e;if(Array.isArray(e))return e.map(h);if(e&&typeof e=="object"){let t={};for(let[n,r]of Object.entries(e))t[n]=n==="captions"&&r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r).map(([s,i])=>[h(s),i])):h(r);return t}return e}var Rt="",Be="".replace(/\/+$/,""),qe=typeof window>"u"&&Be!=="",xt=qe?Be:Rt,kt=se,w=()=>({baseUrl:kt(),audience:null});function l(e,t){let n=t?`?process=${encodeURIComponent(t)}`:"";return`/api/v1${e}${n}`}var Tt=100,ke=50;function Le(e,t,n){let r=new URLSearchParams;for(let[s,i]of Object.entries(t))i!=null&&i!==""&&r.set(s,String(i));return r.set("pageSize",String(Tt)),n&&r.set("cursor",n),`/api/v1${e}?${r.toString()}`}function Ct(e,t){return Le("/wheels",{process:e},t)}function Ot(e,t,n){return Le("/products",{kind:e.join(","),make:t?.make,model:t?.model,year:t?.year,modification:t?.modification},n)}function vt(e){if(!e)return null;try{return new URL(e,"http://cursor.invalid").searchParams.get("cursor")}catch{return null}}async function Te(e,t,n=()=>!1){let r=[],s=null;try{for(let i=0;i<ke;i++){let u=await o(await t(s),await a());if(r.push(...u.results),s=vt(u.next),!s)break}s&&console.warn(`[${e}] stopped at ${ke} pages (${r.length} rows); catalog may be truncated`)}catch(i){if(n(i))throw i;console.warn(`[${e}] product API unavailable, returning []`,i)}return r}var It=e=>e instanceof f&&e.status===400;function Et(e){return e.flatMap(t=>t.kind==="alloy-wheel"?W([t]):[t])}async function Ne(){return(await Ft()).host}async function Ft(){try{let{headers:e}=await import("./headers-3CAQXQEY.js"),t=await e(),n=i=>i?.split(",")[0]?.split(":")[0]?.trim().toLowerCase()||null,r=n(t.get(oe)??t.get("x-forwarded-host")??t.get("host")),s=n(t.get("host"));return{host:r,matchesRequestHost:r!==null&&r===s}}catch{return{host:null,matchesRequestHost:!1}}}async function Bt(){try{let{headers:e}=await import("./headers-3CAQXQEY.js");return X((await e()).get(L))}catch{return null}}async function qt(){try{let{headers:e}=await import("./headers-3CAQXQEY.js");return(await e()).get(ie)||null}catch{return null}}async function Lt(){let e=await qt();if(e)return`site=${encodeURIComponent(e)}`;let t=await Ne();return t?`host=${encodeURIComponent(t)}`:""}async function g(e){if(typeof window<"u"){let t=U();return t?j(e,`site=${encodeURIComponent(t)}`):e}return j(e,await Lt())}function j(e,t){return t?`${e}${e.includes("?")?"&":"?"}${t}`:e}async function Nt(e){if(!qe)return;let[t,n]=await Promise.all([Ne(),Bt()]),r=ee(t,n,e);return Object.keys(r).length>0?r:void 0}async function a(e){let t=await Nt(te(e)),n={baseUrl:xt,...e};return t&&(n.headers={...t,...e?.headers}),n}var k=typeof window>"u";function T(e,t){let n=new URLSearchParams;for(let[s,i]of Object.entries(t))i!==void 0&&i!==""&&n.set(s,String(i));let r=n.toString();return`/api/v1/fitment${e}${r?`?${r}`:""}`}var xn={listMakes:async e=>{if(k){let{fitmentData:n}=await import("./fitment-data-6EHBA26C.js");return n.makes(e)}return(await o(T("/makes",{region:e}),w())).results},listModels:async(e,t)=>{if(k){let{fitmentData:r}=await import("./fitment-data-6EHBA26C.js");return r.models(e,t)}return(await o(T("/models",{make:e,region:t}),w())).results},listYears:async(e,t,n)=>{if(k){let{fitmentData:s}=await import("./fitment-data-6EHBA26C.js");return s.years(e,t,n)}return(await o(T("/years",{make:e,model:t,region:n}),w())).results},listModifications:async(e,t,n,r)=>{if(k){let{fitmentData:i}=await import("./fitment-data-6EHBA26C.js");return i.modifications(e,t,n,r)}return(await o(T("/modifications",{make:e,model:t,year:n,region:r}),w())).results},getStockFitment:async(e,t,n,r,s)=>{if(k){let{fitmentData:i}=await import("./fitment-data-6EHBA26C.js");return i.stockFitment(e,t,n,r,s)}return o(T("/stock-fitment",{make:e,model:t,year:n,modification:r,region:s}),w())}},kn={listWheels:async e=>{let t=await Te("products.listWheels",async n=>await g(Ct(e,n)));return W(h(t))},listCatalog:async(e,t)=>{if(e.length===0)throw new Error("products.listCatalog() needs at least one kind. An empty list would omit `kind`, which the contract reads as `alloy-wheel` \u2014 so the call would silently return the wheel catalog instead of nothing.");let n=await Te("products.listCatalog",async r=>await g(Ot(e,t,r)),It);return Et(h(n))},getWheel:async e=>R(h(await o(await g(l(`/wheels/${e}`)),await a()))),getTyre:async e=>h(await o(await g(l(`/tyres/${e}`)),await a())),listBundles:async()=>{try{return await o(await g(l("/bundles")),await a())}catch{return[]}},getBundle:async e=>o(await g(l(`/bundles/${e}`)),await a()),listGalleryBuilds:async(e={})=>{let{process:t=null,wheelSlug:n=null}=e;if(typeof window>"u"){let{listGalleryBuilds:r}=await import("./gallery-builds-data-SWA6XKFF.js");return h(r(t,n))}try{let r=new URLSearchParams;t&&r.set("process",t),n&&r.set("wheelSlug",n);let s=r.toString(),i=await o(`/api/v1/gallery-builds${s?`?${s}`:""}`,w());return h(i.results)}catch(r){return console.warn("[products.listGalleryBuilds] product API unavailable, returning []",r),[]}},getSite:async()=>o(await g(l("/site")),await a()),getSiteBySlug:async e=>o(`${l("/site")}?${new URLSearchParams({site:e})}`,typeof window>"u"?await a():void 0),listBrands:async()=>{try{return(await o(await g(l("/brands")),await a())).results??[]}catch(e){return console.warn("[products.listBrands] product API unavailable, returning []",e),[]}},listBrandsForSite:async e=>(await o(`${l("/brands")}?${new URLSearchParams({site:e})}`,typeof window>"u"?await a():void 0)).results??[],listPages:async()=>h(await o(await g(l("/pages")),await a())),listProductTemplates:async()=>{try{return await o(await g(l("/product-templates")),await a())}catch(e){return console.warn("[products.listProductTemplates] unavailable, returning []",e),[]}},listProductTypeChoices:async()=>{try{return await o(await g(l("/product-type-choices")),await a())}catch(e){return console.warn("[products.listProductTypeChoices] unavailable, returning []",e),[]}},listFieldUsage:async()=>{try{return await o(await g(l("/field-usage")),await a())}catch(e){return console.warn("[products.listFieldUsage] unavailable, returning []",e),[]}},getPage:async(e,t={})=>h(await o(await g(l(`/pages/${e}`)),await a(t.revalidate!==void 0?{next:{revalidate:t.revalidate}}:void 0))),listBlogPosts:async()=>{try{return(await o(l("/blog-posts"),await a())).map(t=>({...t,coverImage:E(t.coverImage)??""}))}catch(e){return console.warn("[products.listBlogPosts] blog API unavailable, returning []",e),[]}},getBlogPost:async e=>{let t=await o(l(`/blog-posts/${e}`),await a());return{...t,coverImage:E(t.coverImage)??""}},createOrder:async e=>o(l("/orders"),await a({method:"POST",body:JSON.stringify(e)})),createOrderAuthed:async e=>p(l("/orders"),await a({method:"POST",body:JSON.stringify(e)})),lookupOrder:async e=>o(l("/orders/lookup"),await a({method:"POST",body:JSON.stringify(e)})),createPaymentIntent:async e=>o(l("/payments/intent"),await a({method:"POST",body:JSON.stringify(e)})),createPaypalOrder:async e=>o(l("/payments/paypal/order"),await a({method:"POST",body:JSON.stringify(e)})),capturePaypalOrder:async e=>o(l("/payments/paypal/capture"),await a({method:"POST",body:JSON.stringify(e)})),createAfterpayCheckout:async e=>o(l("/payments/afterpay/checkout"),await a({method:"POST",body:JSON.stringify(e)})),captureAfterpayPayment:async e=>o(l("/payments/afterpay/capture"),await a({method:"POST",body:JSON.stringify(e)})),chargeSquare:async e=>o(l("/payments/square/charge"),await a({method:"POST",body:JSON.stringify(e)})),createGocardlessBillingRequest:async e=>o(l("/payments/gocardless/billing-request"),await a({method:"POST",body:JSON.stringify(e)})),completeGocardlessPayment:async e=>o(l("/payments/gocardless/complete"),await a({method:"POST",body:JSON.stringify(e)})),createZipCheckout:async e=>o(l("/payments/zip/checkout"),await a({method:"POST",body:JSON.stringify(e)})),captureZipPayment:async e=>o(l("/payments/zip/capture"),await a({method:"POST",body:JSON.stringify(e)})),createKlarnaCheckout:async e=>o(l("/payments/klarna/checkout"),await a({method:"POST",body:JSON.stringify(e)})),captureKlarnaPayment:async e=>o(l("/payments/klarna/capture"),await a({method:"POST",body:JSON.stringify(e)})),createStockAlert:async e=>o(l("/stock-alerts"),await a({method:"POST",body:JSON.stringify(e)})),createPreOrderIntent:async e=>o(l("/pre-order-intents"),await a({method:"POST",body:JSON.stringify(e)})),createNewsletterSubscription:async e=>o(l("/newsletter-subscriptions"),await a({method:"POST",body:JSON.stringify(e)})),unsubscribeNewsletter:async e=>o(l("/newsletter-unsubscribe"),await a({method:"POST",body:JSON.stringify(e)})),captureCart:async e=>o(l("/carts"),await a({method:"POST",body:JSON.stringify(e)})),restoreCart:async e=>o(l("/carts/restore"),await a({method:"POST",body:JSON.stringify(e)})),unsubscribeCartReminders:async e=>o(l("/carts/unsubscribe"),await a({method:"POST",body:JSON.stringify(e)})),listReviews:async(e={})=>{let t=new URLSearchParams;e.limit&&t.set("limit",String(e.limit)),e.designCode&&t.set("designCode",e.designCode);let n=l("/reviews"),r=t.toString();try{return await o(await g(r?`${n}?${r}`:n),await a())}catch(s){return console.warn("[products.listReviews] product API unavailable, returning []",s),[]}},submitReview:async e=>o(l("/reviews"),await a({method:"POST",body:JSON.stringify(e)})),getForm:async e=>o(l(`/forms/${encodeURIComponent(e)}`),await a()),submitForm:async(e,t)=>o(l(`/forms/${encodeURIComponent(e)}/submissions`),await a({method:"POST",body:JSON.stringify(t)})),listShippingMethods:async()=>{try{return await o(l("/shipping-methods"),await a())}catch(e){return console.warn("[products.listShippingMethods] product API unavailable, returning []",e),[]}},listCountrySubdivisions:async e=>{try{return await o(l(`/countries/${encodeURIComponent(e)}/subdivisions`),await a())}catch(t){return console.warn("[products.listCountrySubdivisions] unavailable, returning []",t),[]}},quoteCart:async e=>{let t=l("/cart/quote"),n=await a({method:"POST",body:JSON.stringify(e)});return e.couponCode?(await Re(t,n)).data:o(t,n)},validateCoupon:async e=>{let{data:t,asShopper:n}=await Re(l("/coupons/validate"),await a({method:"POST",body:JSON.stringify(e)}));return{...t,askedAsShopper:n}},getHeaderSettings:async()=>{let e=Ie({method:"GET"}),t=await o(await g(l("/header-settings")),await a({signal:e})),n=E(t.logoUrl),r=null,s=null;if(n&&V(n)){let i=await be(n,e);i&&(r=i.reversed,s=i.inkIsDark)}return{...t,logoUrl:n,logoReversed:r,logoInkIsDark:s}},getThemeSettings:async()=>o(await g(l("/theme-settings")),await a()),getChatSettings:async()=>o(await g(l("/chat-settings")),await a())},Tn={listServices:async()=>{try{return await o(l("/bookings/services"),await a())}catch(e){return console.warn("[bookings.listServices] API unavailable, returning []",e),{results:[],currency:"USD"}}},getAvailability:async(e,t)=>o(l(`/bookings/availability?service=${encodeURIComponent(e)}&date=${t}`),await a()),create:async e=>o(l("/bookings"),await a({method:"POST",body:JSON.stringify(e)})),get:async e=>o(l(`/bookings/manage/${encodeURIComponent(e)}`),await a()),cancel:async e=>o(l(`/bookings/manage/${encodeURIComponent(e)}/cancel`),await a({method:"POST"})),createPaymentIntent:async e=>o(l("/bookings/payments/intent"),await a({method:"POST",body:JSON.stringify({manageToken:e})}))},Z=class extends Error{constructor(n,r){super(`Slug "${n}" exists on ${r} websites; a site is required to pick one.`);this.slug=n;this.count=r;this.name="AmbiguousPageSlugError"}},C=e=>e?`/api/storefront/header-settings/?${new URLSearchParams({site:e})}`:"/api/storefront/header-settings/",Ce=e=>e?`/api/storefront/theme-settings/?${new URLSearchParams({site:e})}`:"/api/storefront/theme-settings/",Oe=e=>e?`/api/storefront/chat-settings/?${new URLSearchParams({site:e})}`:"/api/storefront/chat-settings/",ve=e=>`/api/storefront/social-settings/?${new URLSearchParams({site:e})}`,Q=e=>`/api/storefront/sites/${encodeURIComponent(e)}/`,$t=e=>`${Q(e)}currencies/`,Ut="/api/storefront/media/ingest/",Y=class extends Error{constructor(){super("This editor is not connected to a website, so an upload has nowhere to go. Open the page from the website the file should belong to, then try again."),this.name="MediaUploadDestinationError"}};function Mt(){let e=we();if(!e)throw new Y;return`${Ut}?${new URLSearchParams({site:e})}`}var q={"X-Puck-Media-Manifest":ae.contentHash},c=(e,t={})=>o(e,{...t,audience:"admin"}),Cn={findPageBySlug:async(e,t,n)=>{let r=new URLSearchParams({slug:e});n&&r.set("site",n);let s=await c(`/api/storefront/pages/?${r.toString()}`,{token:t}),i=Array.isArray(s)?s:s.results??[];if(!n&&i.length>1)throw new Z(e,i.length);return i[0]??null},getPageById:(e,t)=>c(`/api/storefront/pages/${e}/`,{token:t}),saveLayout:(e,t,n,r,s)=>c(`/api/storefront/pages/${e}/`,{method:"PATCH",body:JSON.stringify({layout:t,expected_updated_at:r,...s?{client_id:s}:{}}),token:n}),publishPage:(e,t,n)=>c(`/api/storefront/pages/${e}/publish/`,{method:"POST",body:n?JSON.stringify({expected_updated_at:n}):void 0,token:t}),claimPageEditLock:(e,t,n,r=!1)=>c(`/api/storefront/pages/${e}/edit-lock/`,{method:"POST",body:JSON.stringify({client_id:n,takeover:r}),token:t}),releasePageEditLock:(e,t)=>c(`/api/storefront/pages/${e}/edit-lock/`,{method:"DELETE",token:t}),createTemplate:(e,t,n)=>c("/api/storefront/page-templates/",{method:"POST",body:JSON.stringify({name:e,layout:t}),headers:q,token:n}),getTemplate:(e,t)=>c(`/api/storefront/page-templates/${e}/`,{token:t}),saveTemplateLayout:(e,t,n)=>c(`/api/storefront/page-templates/${e}/`,{method:"PATCH",body:JSON.stringify({layout:t}),headers:q,token:n}),listTemplatePages:async(e,t)=>{let n=await c(`/api/storefront/template-pages/?template=${encodeURIComponent(e)}`,{token:t});return Array.isArray(n)?n:n.results??[]},findTemplatePageBySlug:async(e,t,n)=>{let r=await c(`/api/storefront/template-pages/?template=${encodeURIComponent(e)}&slug=${encodeURIComponent(t)}`,{token:n});return(Array.isArray(r)?r:r.results??[])[0]??null},createTemplatePage:(e,t,n)=>c("/api/storefront/template-pages/",{method:"POST",body:JSON.stringify({template:e,...t}),headers:q,token:n}),saveTemplatePageLayout:(e,t,n)=>c(`/api/storefront/template-pages/${e}/`,{method:"PATCH",body:JSON.stringify({layout:t}),headers:q,token:n}),deleteTemplatePage:(e,t)=>c(`/api/storefront/template-pages/${e}/`,{method:"DELETE",token:t}),listPages:async(e,t)=>{let n=new URLSearchParams({no_page:"true"});t&&n.set("site",t);let r=await c(`/api/storefront/pages/?${n.toString()}`,{token:e});return Array.isArray(r)?r:r.results??[]},createPage:(e,t,n,r)=>c("/api/storefront/pages/",{method:"POST",body:JSON.stringify({title:e,slug:t,layout:n}),token:r}),deletePage:(e,t)=>c(`/api/storefront/pages/${e}/`,{method:"DELETE",token:t}),getHeaderSettings:(e,t)=>c(C(t),{token:e}),listMenus:async(e,t)=>{let n=new URLSearchParams({no_page:"true"});t&&n.set("site",t);let r=await c(`/api/storefront/menus/?${n}`,{token:e});return Array.isArray(r)?r:r.results??[]},listBlogPosts:async(e,t={})=>{let n=new URLSearchParams({no_page:"true"});t.visibleOnly&&n.set("is_visible","true"),t.siteId&&n.set("site",t.siteId);let r=await c(`/api/storefront/blog-posts/?${n.toString()}`,{token:e});return Array.isArray(r)?r:r.results??[]},listCategories:async(e,t={})=>{let n=new URLSearchParams({no_page:"true"});t.visibleOnly&&n.set("is_visible","true"),t.siteId&&n.set("site",t.siteId);let r=await c(`/api/storefront/categories/?${n.toString()}`,{token:e});return[...Array.isArray(r)?r:r.results??[]].sort((i,u)=>i.sort_order-u.sort_order||i.name.localeCompare(u.name))},listForms:async(e,t={})=>{let n=new URLSearchParams({no_page:"true"});t.siteId&&n.set("site",t.siteId);let r=await c(`/api/storefront/forms/?${n.toString()}`,{token:e});return[...Array.isArray(r)?r:r.results??[]].sort((i,u)=>i.title.localeCompare(u.title))},listWheelSummaries:async(e,t={})=>{let n=new URLSearchParams;t.siteId&&n.set("site",t.siteId);let r=n.toString(),s=await c(`/api/storefront/wheel-curations/summaries/${r?`?${r}`:""}`,{token:e});return h(s)},listProducts:async(e,t={})=>{let n=new URLSearchParams;t.kinds?.length&&n.set("kind",t.kinds.join(",")),t.siteId&&n.set("site",t.siteId);let r=n.toString(),s=await c(`/api/storefront/products/${r?`?${r}`:""}`,{token:e});return h(s)},getWheelDetail:async(e,t,n={})=>{let r=new URLSearchParams({slug:t});return n.siteId&&r.set("site",n.siteId),R(h(await c(`/api/storefront/wheel-curations/detail/?${r.toString()}`,{token:e})))},updateHeaderSettings:(e,t,n)=>c(C(n),{method:"PATCH",body:JSON.stringify(e),token:t}),getSite:(e,t)=>c(Q(e),{token:t}),listSiteCurrencies:async(e,t)=>{let n=await c($t(e),{token:t});return Array.isArray(n)?n:[]},updateSite:(e,t,n)=>c(Q(e),{method:"PATCH",body:JSON.stringify(t),token:n}),getThemeSettings:(e,t)=>c(Ce(t),{token:e}),updateThemeSettings:(e,t,n)=>c(Ce(n),{method:"PATCH",body:JSON.stringify(e),token:t}),getChatSettings:(e,t)=>c(Oe(t),{token:e}),updateChatSettings:(e,t,n)=>c(Oe(n),{method:"PATCH",body:JSON.stringify(e),token:t}),getSocialSettings:(e,t)=>c(ve(t),{token:e}),updateSocialSettings:(e,t,n)=>c(ve(n),{method:"PATCH",body:JSON.stringify(e),token:t}),uploadHeaderLogo:(e,t,n)=>{let r=new FormData;return r.append("logo",e),c(C(n),{method:"PATCH",body:r,token:t})},clearHeaderLogo:(e,t)=>c(C(t),{method:"PATCH",body:JSON.stringify({logo:null}),token:e}),setHeaderLogoFromAsset:(e,t,n)=>c(C(n),{method:"PATCH",body:JSON.stringify({logo_asset_id:e}),token:t}),uploadMedia:async(e,t)=>{let n=new FormData;return n.append("file",e),c(Mt(),{method:"POST",body:n,token:t})},listMedia:async(e,t)=>{let n=new URLSearchParams({no_page:"true"});t&&n.set("kind",t);let r=await c(`/api/storefront/media-assets/?${n.toString()}`,{token:e});return Array.isArray(r)?r:r.results??[]}};export{ee as a,te as b,ae as c,jt as d,v as e,Zt as f,Qt as g,b as h,Me as i,He as j,De as k,We as l,Je as m,_ as n,Dt as o,Wt as p,re as q,je as r,G as s,Ye as t,E as u,on as v,an as w,ln as x,cn as y,V as z,we as A,Gt as B,se as C,ht as D,f as E,z as F,K as G,o as H,At as I,Rt as J,Ne as K,Ft as L,Bt as M,qt as N,xn as O,kn as P,Tn as Q,Z as R,c as S,Cn as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ai as p,yi as l}from"./chunk-X2DL3VCU.js";import{Fragment as r,useState as d}from"react";import{Fragment as b,jsx as s,jsxs as o}from"react/jsx-runtime";function g({choices:m,onPick:c,open:i,onToggle:u}){let[f,a]=d(!1),n=i??f;return o(b,{children:[o("button",{type:"button",className:"sf-add-card","aria-expanded":n,onClick:u??(()=>a(e=>!e)),children:[s("span",{className:"sf-plus sf-plus--sm",children:"+"}),"Add block"]}),n&&s("div",{className:"sf-blockmenu",role:"menu",children:p(m).map(e=>o(r,{children:[e.group&&o("div",{className:"sf-menugroup-head",role:"presentation",children:[s("span",{className:"sf-menugroup-title",children:e.group}),s("span",{className:"sf-menugroup-count",children:e.items.length})]}),e.items.map(t=>o("button",{type:"button",className:"sf-blockmenu-item",role:"menuitem",onClick:()=>{a(!1),c(t.type)},children:[s("span",{className:"sf-chip",children:s(l,{type:t.type,size:13})}),s("span",{className:"sf-row-name",children:t.label})]},t.type))]},e.group??"all"))})]})}export{g as a};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{C as Hn,E as je,L as On,N as Dn,P as re,e as Ge,g as At,q as Pn,z as Nn}from"./chunk-4MT74TMP.js";function Mn(e,t){let n=e.components?.[t]?.fields??{};return Object.keys(n).filter(r=>n[r]?.type==="slot")}function To(e,t){return Mn(e,t.type).flatMap(n=>(Array.isArray(t.props[n])?t.props[n]:[]).map((o,s)=>({child:o,zone:`${t.props.id}:${n}`,index:s})))}function Hi(e,t,n){let r=(o,s,a,i)=>{if(!o||typeof o!="object"||!o.props)return null;if(o.props.id===n)return{item:o,zone:s,index:a};if(i>=12)return null;for(let{child:u,zone:l,index:d}of To(e,o)){let c=r(u,l,d,i+1);if(c)return c}return null};for(let o=0;o<t.length;o+=1){let s=r(t[o],wo,o,0);if(s)return s}return null}var _o=6;function Oi(e,t,n){return n<_o&&Mn(e,t).length>0}var Di=e=>`${e}-${crypto.randomUUID()}`,Xe="Header",kt="Footer",wo="root:default-zone",Fn=[Xe,kt];function Ro(e){let t=new Set,n=[];return e.forEach((r,o)=>{let s=r?.type;s===void 0||!Fn.includes(s)||(t.has(s)?n.push(o):t.add(s))}),n}function Mi(e){return Ro(e).map(t=>e[t]?.props?.id).filter(t=>typeof t=="string")}function Fi(e,t){let n=(r,o)=>r.some(s=>s?.type===o);return Fn.filter(r=>!n(e,r)&&!n(t,r))}import{createContext as ko,useContext as Lo,useEffect as Po,useMemo as Qe,useState as Vn}from"react";function $n(e,t){return e.map(n=>({partNumber:n.partNumber,quantity:n.wheels*t}))}function Be(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 Lt=4,Ui=1,Vi={unit:"set",spares:0,spareSide:"left"};function Un(e){return e.unit==="single"?1:Lt+e.spares}function Gi(e,t){return[{partNumber:e.partNumber,wheels:Un(t),prices:e.prices}]}function Bi(e,t){let n=Un(t)-Lt;if(n<=0||e.length===0)return e;let r=Io(e),o=r?r[t.spareSide]:0;return e.map((s,a)=>a===o?{...s,wheels:s.wheels+n}:s)}function Io(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 Ao(e,t){return t.spares>0?`${e} + spare`:e}function Wi(e){return e.unit==="single"?"Single":Ao(`Set of ${Lt}`,e)}var zi="data-add-to-basket",Pt=9,Nt="en";function Ze(e,t,n=0){return new Intl.NumberFormat(Nt,{style:"currency",currency:t,minimumFractionDigits:0,maximumFractionDigits:n}).format(e)}import{jsx as Oo}from"react/jsx-runtime";var Gn="storefront-country",Bn=ko(null);function No(e){return Wn(e,"catalogue")}function Ho(e){return Wn(e,"money")}function Wn(e,t){let n=new Map(e.map(o=>[o.code,o.decimalPlaces])),r=new Map;return(o,s)=>{if(!s)return"";let a=r.get(s);if(!a){let i=n.get(s)??0;a=new Intl.NumberFormat(Nt,{style:"currency",currency:s,minimumFractionDigits:t==="money"?i:0,maximumFractionDigits:i}),r.set(s,a)}return a.format(o)}}function Xi({children:e,currencies:t,countries:n,defaultCurrency:r,defaultCountry:o}){let s=Qe(()=>t??[],[t]),a=Qe(()=>n??[],[n]),i=Qe(()=>r||s.find(_=>_.isDefault)?.code||s[0]?.code||"",[r,s]),u=Qe(()=>o||a.find(_=>_.isDefault)?.code||a[0]?.code||"",[o,a]),[l,d]=Vn(u),[c,S]=Vn(!1);Po(()=>{let _=Ge.getItem(Gn);_&&a.some(L=>L.code===_)&&d(_),S(!0)},[a]);function m(_){d(_),Ge.setItem(Gn,_)}let g=Qe(()=>{let _=a.find(h=>h.code===l)??null,L=_?.currency,I=L&&s.some(h=>h.code===L)?L:i,H=No(s),$=Ho(s);return{country:l,currency:I,setCountry:m,currencies:s,countries:a,activeCountry:_,formatPrice:(h,P)=>H(h,P??I),formatMoney:(h,P)=>$(h,P??I),ready:c}},[l,s,a,i,c]);return Oo(Bn.Provider,{value:g,children:e})}function Je(){let e=Lo(Bn);if(!e)throw new Error("useCurrency must be used within a CurrencyProvider");return e}import{createContext as Yo,useCallback as X,useContext as qo,useEffect as Ce,useMemo as Jn,useRef as We,useState as Z}from"react";function Kn(e,t){return e.valid?!1:e.reason==="firstOrderOnly"?!0:e.reason==="notEligible"&&!t}var el="We'll confirm this discount when you place your order.",tl="Confirmed at checkout";function nl(e){return e&&(e.valid||e.deferred)?e.code:void 0}var zn="coupon_code: ";function rl(e){return!(e instanceof je)||e.status!==400||!e.message.startsWith(zn)?null:e.message.slice(zn.length)}function Yn(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 lt="Price on request",Mo="Request a quote";function Ht(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function Ot(e,t){let n=e?.[t];return Ht(n)?n:null}function il(e,t,n,r){let o=Ot(e,n),s=Ot(t,n);return o===null&&s===null?0:o===null?1:s===null?-1:r==="asc"?o-s:s-o}function ll(e,t,n,r){if(n==null&&r==null)return!0;let o=Ot(e,t);return!(o===null||n!=null&&o<n||r!=null&&o>r)}var Fo={priced:!1,unit:null,was:null,onSale:!1,setTotal:null};function $o(e,t,n){if(!Ht(e))return Fo;let r=Ht(t)&&t>e?t:null;return{priced:!0,unit:e,was:r,onSale:r!==null,setTotal:n!=null?e*n:null}}function cl(e,t,n=""){return!e.priced||e.unit==null?lt:`${n}${Ze(e.unit,t)}`}function ul(e,t){return e.was==null?null:Ze(e.was,t)}function Uo(e,t,n=1){let r=Be(e,t);if(r===null)return{priced:!1,unit:null,isFrom:!1,setTotal:null};let o=e.reduce((a,i)=>a+i.wheels,0),s=Math.min(...e.map(a=>a.prices[t]));return{priced:!0,unit:s,isFrom:s*o!==r,setTotal:r*n}}var Vo={priced:!1,unit:null,isFrom:!1,was:null,onSale:!1,setTotal:null};function dl(e,t,n,r=1){let o=$o(e.prices[n],e.msrpPrices?.[n],4),s=o.setTotal==null?null:o.setTotal*r;if(!t)return{priced:o.priced,unit:o.unit,isFrom:!0,was:o.was,onSale:o.onSale,setTotal:null,fromSetTotal:s};let a=Uo(t.components,n,r);return a.priced?{priced:!0,unit:a.unit,isFrom:a.isFrom,was:null,onSale:!1,setTotal:a.setTotal,fromSetTotal:s}:{...Vo,fromSetTotal:s}}function Go(e,t){return!e.priced||e.unit==null?lt:`${e.isFrom?"from ":""}${Ze(e.unit,t)}`}function pl(e,t){return e.was==null?null:Ze(e.was,t)}function ml(e,t){return!e.priced||e.unit==null?Mo:Go(e,t)}var Bo=/^[^@\s]+@[^@\s]+\.[^@\s]+$/;function qn(e){return Bo.test(e.trim())}var jn="sf:ga-purchases",Wo=20;function Zn(){return typeof window>"u"||window.parent!==window}function et(...e){try{if(Zn()||typeof window.gtag!="function")return;window.gtag(...e)}catch{}}function zo(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:Be(e.components,t)??0,quantity:e.qty}}function Dt(e,t){return e.filter(ct).map(n=>zo(n,t))}function bl(e){et("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 Qn(e,t){let n=Dt([e],t);n.length!==0&&et("event","add_to_cart",{currency:t,value:n[0].price*n[0].quantity,items:n})}function Sl(e){let t=Dt(e.lines,e.currency);t.length!==0&&et("event","begin_checkout",{currency:e.currency,value:e.value,...e.coupon?{coupon:e.coupon}:{},items:t})}var Xn=new Set;function Ko(e){if(Xn.has(e))return!1;Xn.add(e);try{let t=JSON.parse(Ge.getItem(jn)??"[]");if(t.includes(e))return!1;Ge.setItem(jn,JSON.stringify([...t,e].slice(-Wo)))}catch{}return!0}function El(e){let t=e.confirmation;if(Zn()||!Ko(t.orderNumber))return;let n=t.currency,r=Number(t.grandTotal);et("event","purchase",{transaction_id:t.orderNumber,currency:n,value:r,shipping:Number(t.freightCharge),...t.couponCode?{coupon:t.couponCode}:{},items:Dt(e.lines,n)}),e.adsSendTo&&et("event","conversion",{send_to:e.adsSendTo,transaction_id:t.orderNumber,currency:n,value:r})}import{jsx as Qo}from"react/jsx-runtime";var jo=400,Xo=400,Zo=1500;function ct(e){return(e.components?.length??0)>0}function er(e,t){return{code:e,valid:t.valid,deferred:Kn(t,t.askedAsShopper),message:t.message||void 0,effects:t.effects??void 0}}function nr(e,t){return Be(e.components,t)}function Mt(e,t){let n=nr(e,t);return n===null?null:n*e.qty}function tr(e){return e!=="tyre"}var rr=Yo(null);function Pl({children:e,preview:t=!1}){let{currency:n,country:r,formatMoney:o}=Je(),[s,a]=Z(t),[i,u]=Z([]),[l,d]=Z([]),[c,S]=Z([]),[m,g]=Z(!1),[_,L]=Z(!1),[I,H]=Z(!1),[$,h]=Z(!1),[P,b]=Z(null),[J,z]=Z(void 0),w=We(r),M=We("");w.current=w.current||r;let[y,q]=Z(null),[pe,ee]=Z(!1),[V,te]=Z(null),oe=We(void 0),F=X(()=>a(!0),[]),xe=X(()=>a(!1),[]),j=X(()=>a(p=>!p),[]);Ce(()=>{t||typeof window>"u"||new URLSearchParams(window.location.search).get("cart")==="open"&&F()},[F,t]);let me=X(p=>{h(!0),tr(p)&&H(!0)},[]),se=I||i.some(p=>tr(p.kind)),be=$||i.length>0;Ce(()=>{if(t||!se||m)return;let p=!0;return re.listWheels().then(E=>{p&&(d(E),g(!0))}),()=>{p=!1}},[t,se,m]),Ce(()=>{if(t||!be||_)return;let p=!0;return re.listBundles().then(E=>{p&&(S(E),L(!0))}),()=>{p=!1}},[t,be,_]);let G=P?.deliveryOptions??[];Ce(()=>{G.length!==0&&te(p=>p&&G.some(E=>E.id===p)?p:G[0]?.id??null)},[P]);let A=X(()=>i.filter(ct).flatMap(p=>$n(p.components,p.qty)),[i]),B=X(async(p,E)=>{let v=p.trim().toUpperCase();if(!v)return;let C=A();if(C.length===0){q({code:v,valid:!1,message:"Add a wheel to the cart first."});return}ee(!0),oe.current=E;try{let k=await re.validateCoupon({code:v,items:C,currency:n,shippingMethodId:V??void 0,customerEmail:E});q(er(v,k))}catch{q({code:v,valid:!1,message:"Could not check that code. Please try again."})}finally{ee(!1)}},[A,n,V]),O=X(()=>{q(null),oe.current=void 0},[]),we=X(p=>{if(!y)return;let{code:E}=y;q(v=>v&&v.code===E?{code:E,valid:!1,refused:!0,message:p}:v)},[y]);Ce(()=>{if(!y||y.refused)return;let p=y.code,E=C=>C!==null&&C.code===p&&!C.refused,v=setTimeout(async()=>{let C=A();if(C.length===0){q(k=>E(k)?{code:p,valid:!1,message:"Add a wheel to the cart first."}:k);return}ee(!0);try{let k=await re.validateCoupon({code:p,items:C,currency:n,shippingMethodId:V??void 0,customerEmail:oe.current});q(ce=>E(ce)?er(p,k):ce)}catch{}finally{ee(!1)}},jo);return()=>clearTimeout(v)},[i,n,V]);let Re=y&&!y.refused?y.code:void 0;Ce(()=>{if(t)return;let p=!0,E=setTimeout(async()=>{let v=A();if(v.length===0){b(null),z(void 0);return}try{let C=await re.quoteCart({items:v,currency:n,shippingMethodId:V??void 0,couponCode:Re,customerEmail:oe.current||void 0,country:w.current||void 0,subdivision:M.current||void 0});if(!p)return;b(C)}catch{if(!p)return}z(Re)},Xo);return()=>{p=!1,clearTimeout(E)}},[i,n,V,Re,r]),Ce(()=>{if(t||!s)return;let p=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=p}},[s,t]);let Oe=X(p=>{u(E=>{let v=E.findIndex(C=>C.id===p.id);return v===-1?[...E,p]:E.map((C,k)=>k===v?{...C,qty:Math.min(Pt,C.qty+p.qty)}:C)}),Qn(p,n)},[n]),De=X(p=>{u(E=>E.filter(v=>v.id!==p))},[]),Ie=X((p,E)=>{let v=Math.max(1,Math.min(Pt,E));u(C=>C.map(k=>k.id===p?{...k,qty:v}:k))},[]),fe=X(p=>{u(p)},[]),[ne,Se]=Z(null),Me=We(null);Me.current=ne;let W=We(null),ge=We(""),Ae=X((p,E)=>{let v=p.trim().toLowerCase();qn(v)&&Se(C=>C&&C.email===v&&C.firstName===(E??"")?C:{email:v,firstName:E??""})},[]);Ce(()=>{if(t||!ne)return;let p=Yn(i.filter(ct),C=>Mt(C,n)===null?lt:o(Mt(C,n),n)),E={email:ne.email,firstName:ne.firstName,currency:n,items:p},v=JSON.stringify(E);if(v!==ge.current)return W.current&&clearTimeout(W.current),W.current=setTimeout(()=>{W.current=null,ge.current=v,re.captureCart(E).catch(C=>{})},Zo),()=>{W.current&&(clearTimeout(W.current),W.current=null)}},[i,ne,n,t]);let Fe=X(()=>{W.current&&(clearTimeout(W.current),W.current=null);let p=Me.current;p&&(ge.current="",re.captureCart({email:p.email,firstName:p.firstName,currency:n,items:[]}).catch(E=>{}))},[n]),he=Jn(()=>{let p=i.reduce((D,ue)=>{let ae=Mt(ue,n);return ae===null?D:D+ae},0),E=i.some(D=>nr(D,n)===null),v=i.reduce((D,ue)=>D+ue.qty,0),C=y?.valid?y.effects:void 0,k=C?Math.min(p,Number(C.discountAmount)):0,ce=P?.bundleDiscount??0,ke=P?.appliedBundles??[],K=!!C?.freeShipping,$e=G.find(D=>D.id===V),Ue=K?0:P?.shipping??$e?.amount??0,x={};for(let D of C?.freeUnits??[])x[D.partNumber]=(x[D.partNumber]??0)+D.quantity;let Le=P?.tax??null,qe=P?P.grandTotal:p-k-ce+Ue;return{sets:v,units:i.reduce((D,ue)=>D+(ue.components??[]).reduce((ae,it)=>ae+it.wheels*ue.qty,0),0),subtotal:p,hasUnpricedLine:E,discount:k,bundleDiscount:ce,appliedBundles:ke,shipping:Ue,freeShipping:K,freeUnitsByPartNumber:x,tax:Le,grand:qe,repricing:!!y?.refused&&P!==null&&J===y?.code,currency:n}},[i,n,y,G,V,P,J]),Ee=Jn(()=>({isOpen:s,open:F,close:xe,toggle:j,items:i,catalog:l,bundles:c,warmCatalog:me,add:Oe,remove:De,setQty:Ie,replaceItems:fe,identify:Ae,clearCapturedCart:Fe,coupon:y,applyCoupon:B,removeCoupon:O,refuseCoupon:we,couponBusy:pe,deliveryOptions:G,shippingMethodId:V,setShippingMethodId:te,totals:he}),[s,F,xe,j,i,l,c,me,Oe,De,Ie,fe,Ae,Fe,y,B,O,we,pe,G,V,he]);return Qo(rr.Provider,{value:Ee,children:e})}function or(){let e=qo(rr);if(!e)throw new Error("useCart() must be called inside <CartProvider>. Mount the provider in app/layout.tsx.");return e}var ve="Storefront";import{Fragment as tt,jsx as Q,jsxs as nt}from"react/jsx-runtime";var Jo={eye:nt(tt,{children:[Q("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7S2 12 2 12z"}),Q("circle",{cx:"12",cy:"12",r:"2.6"})]}),"eye-off":Q("path",{d:"M3 3l18 18M10.6 10.6a2 2 0 002.8 2.8M9.4 5.2A9.7 9.7 0 0112 5c7 0 10 7 10 7a16 16 0 01-3.6 4.4M6.1 6.1A16 16 0 002 12s3 7 10 7a9.6 9.6 0 004.1-.9"}),search:nt(tt,{children:[Q("circle",{cx:"11",cy:"11",r:"7"}),Q("path",{d:"M21 21l-3.8-3.8"})]}),"external-link":nt(tt,{children:[Q("path",{d:"M14 4h6v6"}),Q("path",{d:"M20 4l-9 9"}),Q("path",{d:"M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5"})]}),pencil:nt(tt,{children:[Q("path",{d:"M12 20h9"}),Q("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"})]}),trash:nt(tt,{children:[Q("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),Q("path",{d:"M10 11v6M14 11v6"})]}),"chevron-right":Q("path",{d:"M9 6l6 6-6 6"})};function Ft({name:e,size:t,strokeWidth:n=1.8,rounded:r=!1,className:o,style:s}){return Q("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:r?"round":void 0,strokeLinejoin:r?"round":void 0,className:o,style:s,"aria-hidden":"true",children:Jo[e]})}import{cache as ds}from"react";function sr(e,t,n,r){for(;e.size>=t;){let o,s;for(let[i,u]of e){if(u.expiresAt<=r){o=i;break}s===void 0&&n(i)&&(s=i)}let a=o??s??e.keys().next().value;if(a===void 0)return;e.delete(a)}}var es=6e4,ts=5e3,ns=500,$t=new Map;async function rs(e){let{host:t,matchesRequestHost:n}=await On();if(!t)return"";let r=await Dn();return r?`${e}|slug:${encodeURIComponent(t)}/${encodeURIComponent(r)}`:n?`${e}|host:${t}`:`${e}|xhost:${t}`}var os=e=>e.includes("|slug:")||e.includes("|xhost:");async function ar(e,t){let n=await rs(e);if(!n)return t();let r=Date.now(),o=$t.get(n);if(o&&o.expiresAt>r)return o.load;let s=await t(),a=s.outcome.state==="failed"?ts:es;return sr($t,ns,os,r),$t.set(n,{load:s,expiresAt:r+a}),s}var ss=404;function as(e){if(e instanceof je&&e.status===ss)return{state:"absent"};let t=e instanceof je?e.status:-1,n=e instanceof Error?e.message:String(e);return{state:"failed",status:t,detail:n}}var is="[storefront:chrome-load-failed]";function ls(e,t){console.error(`${is} ${e} status=${t.status} \u2014 serving fallback chrome`,t.detail)}async function ir(e,t,n,r){try{let o=await t();return r?.(o)?{value:o,outcome:{state:"absent"}}:{value:o,outcome:{state:"ok"}}}catch(o){let s=as(o);return s.state==="failed"&&ls(e,s),{value:n,outcome:s}}}function cs(e){return e==="production"?"silent":"banner"}var Bl=cs("production");var lr=["instagram","facebook","tiktok","youtube","x","linkedin","pinterest","whatsapp"],us={instagram:"Instagram",facebook:"Facebook",tiktok:"TikTok",youtube:"YouTube",x:"X",linkedin:"LinkedIn",pinterest:"Pinterest",whatsapp:"WhatsApp"},ut={};function cr(e){if(!e||typeof e!="object")return ut;let t={};for(let n of lr){let r=e[n];if(typeof r!="string")continue;let o=r.trim();!o||!/^https?:\/\//i.test(o)||(t[n]=o)}return t}function zl(e){return lr.flatMap(t=>{let n=e[t];return n?[{platform:t,href:n,label:us[t]}]:[]})}var Kl=e=>`${e}_url`;function ps(e){return e?.trim()||ve}function ms(e,t){return e?.trim()||t}function ec({legalName:e,foundedYear:t,siteName:n},r=new Date().getFullYear()){let o=ms(e,n);return`\xA9 ${t&&t<r?`${t}\u2013${r}`:`${r}`} ${o}`}var fs={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,mapsApiKey:null,mapsMapId:null,socialLinks:ut},tc=ds(async()=>ar("site",()=>ir("site",async()=>{let e=await re.getSite();return{name:ps(e.name),legalName:e.legalName?.trim()||null,foundedYear:e.foundedYear??null,faviconUrl:e.faviconUrl??null,currencies:e.currencies??[],defaultCurrency:e.defaultCurrency??null,countries:e.countries??[],defaultCountry:e.defaultCountry??null,commerceEnabled:e.commerceEnabled??!0,cardPayments:e.cardPayments??!1,paymentMethods:e.paymentMethods??(e.cardPayments?["card"]:[]),paypalClientId:e.paypalClientId??null,paypalEnvironment:e.paypalEnvironment??null,squareApplicationId:e.squareApplicationId??null,squareLocationId:e.squareLocationId??null,squareEnvironment:e.squareEnvironment??null,ga4MeasurementId:e.ga4MeasurementId??null,googleAdsId:e.googleAdsId??null,googleAdsConversionLabel:(e.googleAdsId?e.googleAdsConversionLabel:null)??null,metaPixelId:e.metaPixelId??null,mapsApiKey:e.mapsApiKey??null,mapsMapId:e.mapsMapId??null,socialLinks:cr(e.socialLinks)}},fs)));var nc={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,mapsApiKey:null,mapsMapId:null,socialLinks:ut};import{createContext as vi,useCallback as U,useContext as Ti,useMemo as _i,useState as Eo}from"react";import{forwardRef as gs}from"react";import{jsx as xs}from"react/jsx-runtime";function hs(e){if(typeof e=="string")return e;let t=e.query?`?${new URLSearchParams(e.query).toString()}`:"",n=e.hash?e.hash.startsWith("#")?e.hash:`#${e.hash}`:"";return`${e.pathname??""}${t}${n}`}var ys=gs(function({href:t,prefetch:n,replace:r,scroll:o,shallow:s,legacyBehavior:a,passHref:i,locale:u,onClick:l,children:d,...c},S){let m=g=>{l?.(g),!(g.defaultPrevented||c.target==="_blank")&&g.preventDefault()};return xs("a",{ref:S,href:hs(t),onClick:m,...c,children:d})}),ie=ys;function ur(){return"/edit"}import{useEffect as Tt,useState as _t}from"react";import{createContext as bs,useCallback as Ut,useContext as Ss,useEffect as Es,useMemo as Cs,useState as vs}from"react";import{jsx as _s}from"react/jsx-runtime";var Ts={isOpen:!1,open:()=>{},close:()=>{},toggle:()=>{}},dr=bs(Ts);function cc({children:e,shortcut:t=!0}){let[n,r]=vs(!1),o=Ut(()=>r(!0),[]),s=Ut(()=>r(!1),[]),a=Ut(()=>r(u=>!u),[]);Es(()=>{if(!t)return;let u=l=>{(l.metaKey||l.ctrlKey)&&(l.key==="k"||l.key==="K")&&(l.preventDefault(),r(d=>!d))};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[t]);let i=Cs(()=>({isOpen:n,open:o,close:s,toggle:a}),[n,o,s,a]);return _s(dr.Provider,{value:i,children:e})}function pr(){return Ss(dr)}import{Children as Rs,isValidElement as Is,useEffect as fr,useId as As,useLayoutEffect as ks,useRef as Pe,useState as gr}from"react";var dt=(e,t)=>!!e[t]&&!e[t].disabled;function Vt(e,t,n){let r=e.length;for(let o=1;o<=r;o++){let s=((t+n*o)%r+r)%r;if(dt(e,s))return s}return t}function Gt(e,t){return Vt(e,t===1?-1:e.length,t)}function Bt(e,t){return dt(e,t)?t:Math.max(Gt(e,1),0)}function mr(e,t,n){let{open:r,focus:o}=e,s=a=>({...e,...a});if(t.length===1&&/\S/.test(t)){let a=e.typed+t.toLowerCase(),i=n.findIndex((u,l)=>dt(n,l)&&u.label.toLowerCase().startsWith(a));return{state:s({open:!0,typed:a,focus:i>=0?i:o}),handled:!0}}if(!r)return t==="ArrowDown"||t==="ArrowUp"||t==="Enter"||t===" "?{state:s({open:!0,typed:""}),handled:!0}:{state:e,handled:!1};switch(t){case"ArrowDown":return{state:s({focus:Vt(n,o,1)}),handled:!0};case"ArrowUp":return{state:s({focus:Vt(n,o,-1)}),handled:!0};case"Home":return{state:s({focus:Gt(n,1)}),handled:!0};case"End":return{state:s({focus:Gt(n,-1)}),handled:!0};case"Enter":case" ":return dt(n,o)?{state:s({open:!1,typed:""}),commit:o,refocus:!0,handled:!0}:{state:e,handled:!0};case"Escape":return{state:s({open:!1,typed:""}),refocus:!0,handled:!0};case"Tab":return{state:s({open:!1,typed:""}),handled:!1};default:return{state:e,handled:!1}}}import{Fragment as Ns,jsx as Te,jsxs as hr}from"react/jsx-runtime";function Wt({items:e,value:t,onPick:n,open:r,onOpen:o,onClose:s}){let[a,i]=gr(!1),u=r!==void 0,l=u?r:a,[d,c]=gr(0),S=Pe({text:"",timer:0}),m=Pe(null),g=Pe(null),_=Pe(null),L=As(),I=Pe(null),H=e.findIndex(w=>w.value===t),$=w=>{w!==l&&(u||i(w),w?o?.():s?.())},h=w=>{let M=e[w];!M||M.disabled||(n(M.value),$(!1),g.current?.focus())},P=w=>{let M={open:l,focus:l?d:Bt(e,H),typed:S.current.text},y=mr(M,w,e);return!y.handled&&y.state.open===l?!1:(y.state.typed!==M.typed&&(S.current.text=y.state.typed,window.clearTimeout(S.current.timer),S.current.timer=window.setTimeout(()=>{S.current.text=""},500)),c(y.state.focus),y.commit!==void 0?h(y.commit):$(y.state.open),y.refocus&&g.current?.focus(),y.handled)},b=Pe(P);b.current=P;let J=Pe(()=>$(!1));J.current=()=>$(!1);let z=w=>{l||(I.current=w.nativeEvent,b.current(w.key)&&w.preventDefault())};return fr(()=>{if(!l)return;let w=y=>{m.current?.contains(y.target)||J.current()},M=y=>{y!==I.current&&b.current(y.key)&&y.preventDefault()};return document.addEventListener("mousedown",w),document.addEventListener("keydown",M),()=>{document.removeEventListener("mousedown",w),document.removeEventListener("keydown",M)}},[l]),fr(()=>{l&&(S.current.text||c(Bt(e,H)))},[l]),ks(()=>{if(!l||!_.current)return;_.current.children.item(d)?.scrollIntoView({block:"nearest"})},[d,l]),{open:l,toggle:()=>$(!l),close:()=>$(!1),focusIdx:d,setFocusIdx:c,pick:w=>h(e.findIndex(M=>M.value===w)),wrapRef:m,triggerRef:g,listRef:_,listId:L,onTriggerKeyDown:z,activeId:l?`${L}-${d}`:void 0}}var Ls={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-2.5 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 text-[length:var(--size-label,13px)] 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 text-[length:var(--size-body,14px)] 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-3.5 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 zt({id:e,tone:t,items:n,value:r,focusIdx:o,onFocus:s,onPick:a,listRef:i,ariaLabel:u}){let l=Ls[t];return Te("ul",{ref:i,id:e,role:"listbox","aria-label":u,...l.pickerMarker?{"data-picker-menu":""}:{},className:l.list,children:n.map((d,c)=>{let S=d.value===r;return Te("li",{id:`${e}-${c}`,role:"option","aria-selected":S,"aria-disabled":d.disabled||void 0,onMouseEnter:()=>!d.disabled&&s(c),onMouseDown:m=>{m.preventDefault(),d.disabled||a(d.value)},className:l.item(c===o,S&&d.value!=="",!!d.disabled,c===n.length-1),style:l.itemStyle?.(S),children:d.meta===void 0?d.label:hr(Ns,{children:[Te("span",{className:"flex-1 whitespace-nowrap",children:d.label}),Te("span",{className:"ml-auto text-[12px] opacity-50",children:d.meta})]})},`${d.value}_${c}`)})})}function Ps({value:e,onChange:t,disabled:n,children:r,className:o,style:s,name:a,id:i,"aria-label":u}){let l=Rs.toArray(r).flatMap(g=>{if(!Is(g))return[];if(g.type!=="option")return[];let L=g.props,I=L.value!==void 0?String(L.value):"",H=L.children,$=typeof H=="string"||typeof H=="number"?String(H):I;return[{value:I,label:$,disabled:!!L.disabled}]}),d=e??"",c=Wt({items:l,value:d,onPick:g=>t?.({target:{value:g}})}),m=l.find(g=>g.value===d)?.label??l[0]?.label??"";return hr("div",{ref:c.wrapRef,className:"relative",children:[a&&Te("input",{type:"hidden",name:a,value:d}),Te("button",{ref:g=>{c.triggerRef.current=g},type:"button",disabled:n,"aria-haspopup":"listbox","aria-expanded":c.open,"aria-controls":c.open?c.listId:void 0,"aria-activedescendant":c.activeId,"aria-label":u,id:i,onClick:()=>!n&&c.toggle(),onKeyDown:g=>!n&&c.onTriggerKeyDown(g),className:`block w-full ${o??""}`,style:s,children:Te("span",{className:"block w-full truncate text-left",children:m})}),c.open&&Te(zt,{id:c.listId,tone:"select",items:l,value:d,focusIdx:c.focusIdx,onFocus:c.setFocusIdx,onPick:c.pick,listRef:c.listRef})]})}var Hs=[{code:"US",name:"United States"},{code:"GB",name:"United Kingdom"},{code:"AU",name:"Australia"},{code:"CA",name:"Canada"},{code:"IE",name:"Ireland"},{code:"NZ",name:"New Zealand"},{code:"DE",name:"Germany"},{code:"FR",name:"France"},{code:"IT",name:"Italy"},{code:"ES",name:"Spain"},{code:"NL",name:"Netherlands"},{code:"BE",name:"Belgium"},{code:"AT",name:"Austria"},{code:"CH",name:"Switzerland"},{code:"SE",name:"Sweden"},{code:"NO",name:"Norway"},{code:"DK",name:"Denmark"},{code:"FI",name:"Finland"},{code:"PT",name:"Portugal"},{code:"PL",name:"Poland"},{code:"JP",name:"Japan"},{code:"SG",name:"Singapore"},{code:"AE",name:"United Arab Emirates"},{code:"HK",name:"Hong Kong"},{code:"ZA",name:"South Africa"}],Os=Object.fromEntries(Hs.map(e=>[e.code,e.name]));function yr(e){return Os[e]??e}import{jsx as Kt,jsxs as xr}from"react/jsx-runtime";function br(e,t,n){let r=new Map(e.map(o=>[o.code,o]));return(t?.length?t:e.map(o=>o.code)).map(o=>{let s=r.get(o);return{code:o,name:s?.name||yr(o),currency:s?.currency,url:s?.url||n?.[o]||""}})}function Sr(e){let{countries:t}=Je();return br(t,e).length>0}function Yt({urls:e,countries:t}={}){let{country:n,setCountry:r,countries:o}=Je(),s=br(o,t,e),a=s.find(c=>c.code===n)??s[0];function i(c){let S=(e?s.find(m=>m.code===c)?.url:"")?.trim();if(S){window.location.href=S;return}o.some(m=>m.code===c)&&r(c)}let u=s.map(c=>({value:c.code,label:c.name,meta:c.currency})),l=Wt({items:u,value:n,onPick:i});if(!a)return null;let d=l.open;return xr("div",{ref:l.wrapRef,className:"relative",children:[xr("button",{ref:c=>{l.triggerRef.current=c},type:"button","aria-haspopup":"listbox","aria-expanded":d,"aria-controls":d?l.listId:void 0,"aria-activedescendant":l.activeId,"aria-label":`Region: ${a.name}. Click to change.`,onClick:l.toggle,onKeyDown:l.onTriggerKeyDown,suppressHydrationWarning:!0,className:"inline-flex items-center gap-2 whitespace-nowrap border border-fg-dim px-2.5 py-1.5 font-mono text-[13px] uppercase tracking-[0.18em] transition-colors hover:border-fg",style:{color:"color-mix(in oklab, currentColor 80%, transparent)"},children:[Kt("span",{children:a.name}),Kt("span",{"aria-hidden":!0,className:`text-[11px] opacity-70 transition-transform ${d?"rotate-180":""}`,children:"\u25BE"})]}),d&&Kt(zt,{id:l.listId,tone:"region",ariaLabel:"Choose region",items:u,value:n,focusIdx:l.focusIdx,onFocus:l.setFocusIdx,onPick:l.pick,listRef:l.listRef})]})}import{useEffect as Ds,useId as Ms,useRef as Er,useState as Fs}from"react";function pt(e){let t=(e??"").trim();return t===""||t==="#"}import{jsx as Y,jsxs as qt}from"react/jsx-runtime";function mt({item:e,mobile:t=!1,onNavigate:n,dropdownAlign:r="start"}){let[o,s]=Fs(!1),a=Ms(),i=Er(null),u=Er(null),l=e.dropdownItems.length>0,d=!pt(e.href);Ds(()=>{if(!o)return;let m=i.current?.ownerDocument??document,g=_=>{i.current?.contains(_.target)||s(!1)};return m.addEventListener("pointerdown",g),()=>m.removeEventListener("pointerdown",g)},[o]);let c=()=>{s(!1),n?.()};if(!l)return d?Y(ie,{href:e.href,onClick:c,className:t?"flex min-h-11 items-center font-display text-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent":"whitespace-nowrap opacity-80 transition-opacity hover:opacity-100 focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label}):Y("span",{className:t?"flex min-h-11 items-center font-display text-3xl":"whitespace-nowrap opacity-80",children:e.label});let S=Y("button",{ref:u,type:"button","aria-label":`${o?"Close":"Open"} ${e.plainLabel} menu`,"aria-expanded":o,"aria-controls":a,onClick:()=>s(m=>!m),className:t?"flex h-11 w-11 shrink-0 items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent":"flex h-8 w-8 shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:Y("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":"true",className:`transition-transform ${o?"rotate-180":""}`,children:Y("path",{d:"m3 5 4 4 4-4"})})});return t?qt("div",{ref:i,children:[qt("div",{className:"flex min-h-11 items-center justify-between gap-3",children:[d?Y(ie,{href:e.href,onClick:c,className:"min-w-0 flex-1 font-display text-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label}):Y("span",{className:"min-w-0 flex-1 font-display text-3xl",children:e.label}),S]}),o?Y("div",{id:a,className:"mt-3 flex flex-col border-l border-line pl-5",children:e.dropdownItems.map((m,g)=>pt(m.href)?Y("span",{className:"flex min-h-11 items-center text-base opacity-80",children:m.label},`${m.href}-${g}`):Y(ie,{href:m.href,onClick:c,className:"flex min-h-11 items-center text-base opacity-80 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:m.label},`${m.href}-${g}`))}):null]}):qt("div",{ref:i,className:"relative flex items-center whitespace-nowrap",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onBlurCapture:m=>{m.currentTarget.contains(m.relatedTarget)||s(!1)},onKeyDown:m=>{m.key==="Escape"&&(s(!1),u.current?.focus())},children:[d?Y(ie,{href:e.href,onClick:c,onFocus:()=>s(!0),className:"opacity-80 transition-opacity hover:opacity-100 focus-visible:rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:e.label}):Y("span",{className:"opacity-80",children:e.label}),S,o?Y("div",{id:a,className:`absolute top-full z-[60] w-72 pt-3 text-fg ${r==="end"?"right-0":r==="center"?"left-1/2 -translate-x-1/2":"left-0"}`,children:Y("div",{className:"overflow-hidden rounded-lg border border-line bg-bg p-2 shadow-xl",children:e.dropdownItems.map((m,g)=>pt(m.href)?Y("span",{className:"flex min-h-11 items-center rounded-md px-4 py-2 text-sm opacity-80",children:m.label},`${m.href}-${g}`):Y(ie,{href:m.href,onClick:c,className:"flex min-h-11 items-center rounded-md px-4 py-2 text-sm opacity-80 transition-[background,opacity] hover:bg-[var(--card-bg)] hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent",children:m.label},`${m.href}-${g}`))})}):null]})}import{useEffect as ft,useRef as vr,useState as gt}from"react";var rt=new Map,$s=64;async function Us(e){if(!Pn())return null;try{let t=await fetch(`${Hn()}/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 Cr(e){let t=rt.get(e);if(t)return t;let n=Us(e);if(rt.set(e,n),rt.size>$s){let r=rt.keys().next();r.done||rt.delete(r.value)}return n}import{jsx as Tr,jsxs as _r}from"react/jsx-runtime";var Vs={small:54,medium:66,large:84},Gs=44,Bs=202/22,Fc=16,$c=140,Ws=.88,zs="invert(1)";function jt({variant:e="header",scrolled:t=!0,src:n,reverse:r=!1,onLightSurface:o,reversedSrc:s,inkIsDark:a,size:i="medium",sizePx:u,wordmark:l,siteName:d=ve,fitToContainer:c=!1}){let S=l&&l.trim()?l.trim():d,[m,g]=gt(!1),_=vr(null),L=A=>{_.current=A};ft(()=>{let A=_.current?.ownerDocument??document,B=()=>{g(A.documentElement.getAttribute("data-theme")==="light")};B();let O=new MutationObserver(B);return O.observe(A.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>O.disconnect()},[]);let I=n&&n.trim()?n.trim():null,H=!!I&&Nn(I),$=o??(m&&t),h=r&&H&&I&&s!=null?{reversed:s,inkIsDark:a??null}:null,P=h!==null,[b,J]=gt(null);ft(()=>{if(!r||!I||!H||P){J(null);return}let A=!1;return J(null),Cr(I).then(B=>{A||J(B)}),()=>{A=!0}},[r,I,H,P]);let z=h??b,w=!!z&&z.inkIsDark!==null&&($?!z.inkIsDark:z.inkIsDark),M=r&&!!I&&!H&&!$,y=w&&z?z.reversed:I,q=y?[y]:[],[pe,ee]=gt(0);ft(()=>{ee(0)},[I,w]);let V=e==="footer"?Gs:Vs[i],te=u&&u>0?u:V,oe=Math.round(te*Bs),F=pe<q.length?q[pe]:null,[xe,j]=gt(y),me=F!==null&&F===xe,se=vr(null);ft(()=>{let A=se.current;if(!A||!A.complete)return;if(A.naturalWidth>0||A.naturalHeight>0){j(F);return}let B=!1;return A.decode().then(()=>!B&&j(F),()=>!B&&ee(O=>O+1)),()=>{B=!0}},[F]);let be=c?`min(${te}px, calc(100cqi / ${((S.length+1)*Ws).toFixed(2)}))`:`${te}px`;return _r("span",{ref:L,className:"inline-flex items-center",children:[!me&&_r("span",{className:"font-display font-bold tracking-[0.18em] whitespace-nowrap",style:{fontSize:be,lineHeight:1},"aria-label":S,children:[S,Tr("span",{className:"text-accent",children:"."})]}),F&&Tr("img",{ref:se,src:F,alt:S,width:oe,height:te,className:"shrink-0 object-contain",style:{...me?{height:`${te}px`,width:"auto",...c?{maxWidth:"100cqi"}:{}}:{display:"none"},...M?{filter:zs}:{}},onLoad:()=>j(F),onError:()=>ee(A=>A+1)},F)]})}var wr="Menu Item";var Gc="Menu",Bc="Link a menu in the inspector \u2192",Wc="This menu has no links yet \u2014 add them in Storefront \u2192 Menus.",zc="This column isn't linked to a menu, so the preview shows placeholder links. Pick a menu above.";function Kc(e){return`\u201C${e}\u201D no longer exists in Storefront \u2192 Menus, so the preview shows placeholder links. Pick another menu.`}var Yc="The menu linked here no longer exists in Storefront \u2192 Menus, so the header shows placeholder links. Pick another menu.";import{jsx as Ks}from"react/jsx-runtime";function Xt(){return Ks("span",{className:"opacity-50",children:wr})}import{Fragment as Ys,jsx as Zt}from"react/jsx-runtime";function Rr({className:e=""}){return Zt("sup",{className:`text-accent tracking-normal ${e}`,children:"\xAE"})}function Qt(e){if(!e.includes("\xAE"))return e;let t=e.split("\xAE"),n=[];return t.forEach((r,o)=>{r&&n.push(r),o<t.length-1&&n.push(Zt(Rr,{},`r${o}`))}),Zt(Ys,{children:n})}var Qc=Rr;import{Fragment as qs,jsx as Jt,jsxs as js}from"react/jsx-runtime";var Ir=js(qs,{children:[Jt("circle",{cx:"9",cy:"20",r:"1.3"}),Jt("circle",{cx:"18",cy:"20",r:"1.3"}),Jt("path",{d:"M2.5 3.5h3l2.3 11.3a1.6 1.6 0 0 0 1.6 1.3h8.1a1.6 1.6 0 0 0 1.6-1.2L21 7H6"})]});import{Fragment as Xs,jsx as de,jsxs as en}from"react/jsx-runtime";var tn={search:"Search",account:"Account",cart:"Bag"},nn="whitespace-nowrap";function Ar({onClick:e,count:t,asText:n,className:r}){return de("button",{type:"button",onClick:e,"aria-label":`Open cart, ${t} item${t===1?"":"s"}`,className:`mono-eyebrow-ctl inline-flex items-center gap-1.5 opacity-80 transition-opacity hover:opacity-100 ${r??""}`,children:n?en("span",{className:nn,children:[tn.cart,t>0?` ${t}`:""]}):en(Xs,{children:[de("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:Ir}),de("span",{className:"rounded-lg border border-current px-1.5 font-mono text-[12px]",children:t})]})})}function kr({asText:e,className:t}){return de(ie,{href:"/account","aria-label":"Account",className:`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${t??""}`,children:e?de("span",{className:nn,children:tn.account}):en("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[de("circle",{cx:"12",cy:"8",r:"3.4"}),de("path",{d:"M5 20a7 7 0 0 1 14 0"})]})})}function Lr({onClick:e,asText:t,className:n}){return de("button",{type:"button",onClick:e,"aria-label":"Search",title:"Search (\u2318K)",className:`mono-eyebrow-ctl inline-flex items-center opacity-80 transition-opacity hover:opacity-100 ${n??""}`,children:t?de("span",{className:nn,children:tn.search}):de(Ft,{name:"search",size:18,strokeWidth:1.6,rounded:!0})})}import{useEffect as ot,useRef as ra,useState as Or}from"react";var Zs=new Set(["Hero","HeroSingle","IntroBleed"]),ht={min:56,max:140,default:88},cu={min:0,max:120,step:2,default:28},uu=`var(--sf-header-h, ${ht.default}px)`,rn="--sf-header-set-h",on="--sf-header-h",Pr=`var(${rn}, ${ht.default}px)`,du="sf-header-clearance",pu="sf-sticky-underheader";function sn(e){return e?.find(t=>t?.type&&t.type!==Xe)??null}function Nr(e){let t=sn(e)?.type;return!t||!Zs.has(t)}function Hr(e){return!Nr(e)}function mu(e){return!!e?.some(t=>t?.type===Xe)}function fu(e){return!e||e.length===0?!1:!e.some(t=>t?.type===Xe||t?.type===kt)}var Qs=["auto","shared","own"],Js="auto",ea="topSpace",gu="data-top-space";function ta(e){return Qs.includes(e)?e:Js}function na(e,t){let n=ta(e?.props?.[ea]);return n==="own"?!0:n==="shared"?!1:Nr(t)}function hu(e,t){return na(e,t)?"own":null}function Dr({stickyMode:e,heightPx:t}){let n=ra(null),[r,o]=Or(!1),[s,a]=Or(!1);return ot(()=>{let i=n.current?.ownerDocument?.defaultView??window,u=t,l=i.scrollY;function d(){let c=i.scrollY;o(c>10),e==="on_scroll_up"&&(c<=u?a(!1):c>l+4?a(!0):c<l-4&&a(!1)),l=c}return d(),i.addEventListener("scroll",d,{passive:!0}),()=>i.removeEventListener("scroll",d)},[e,t]),ot(()=>{e!=="on_scroll_up"&&a(!1)},[e]),ot(()=>{let i=n.current?.ownerDocument?.documentElement;i&&i.style.setProperty(rn,`${t}px`)},[t]),ot(()=>{let i=n.current,u=i?.ownerDocument,l=u?.defaultView;if(!i||!u||!l)return;let d="",c=m=>{let g=`${Math.round(m)}px`;g!==d&&(d=g,u.documentElement.style.setProperty(on,g),u.body?.style.setProperty(on,g))};if(typeof l.ResizeObserver!="function"){c(i.getBoundingClientRect().height);return}let S=new l.ResizeObserver(m=>{let g=m[0]?.borderBoxSize?.[0];c(g?g.blockSize:i.getBoundingClientRect().height)});return S.observe(i),()=>S.disconnect()},[]),ot(()=>{let i=n.current?.ownerDocument?.documentElement;i&&i.setAttribute("data-header-sticky",e)},[e]),{headerRef:n,scrolled:r,navHidden:s}}import{useEffect as Ua,useRef as Va,useState as Qr}from"react";var pn="storefront-theme",Eu="sf:theme-mode",Cu="sf:theme-switch",vu="hide",mn="light";function oa(e){return e>=7&&e<18}function Mr(e){let{mode:t,override:n,switchShown:r,hour:o}=e;return r&&(n==="light"||n==="dark")?n:t==="auto"?oa(o)?"light":"dark":t==="light"?"light":"dark"}var ze={background:"#0a0a0a",surface:"#131313",line:"#2a2a2a",muted:"#9a9388"},sa=[{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"}],bt={selected:0,themes:sa};function Fr(e){return!e||!Array.isArray(e.themes)||e.themes.length===0?{...bt}:{selected:Math.min(Math.max(0,e.selected??0),e.themes.length-1),themes:e.themes}}function an(e,t,n){let r=xt(e),o=xt(t);if(r===null||o===null)return e;let s=a=>Math.max(0,Math.min(255,Math.round(a))).toString(16).padStart(2,"0");return`#${r.map((a,i)=>s(a+(o[i]-a)*n)).join("")}`}var aa={light:"#ffffff",dark:"#0a0a0a"},Tu=["light","dark"];function _u(e,t){let n=aa[t],r=t==="light"?"#ffffff":"#000000";return{text:n,accent:n,background:e,surface:an(e,r,.1),line:an(e,r,.22),muted:an(n,e,.35),brandInk:t}}function St(e){let t=Fr(e);return t.themes[t.selected]}function $r(e){return{text:e.text,accent:e.accent,background:e.background||ze.background,surface:e.surface||ze.surface,line:e.line||ze.line,muted:e.muted||ze.muted}}function xt(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!t)return null;let n=t[1].length===3?[...t[1]].map(a=>a+a).join(""):t[1],[r,o,s]=[0,2,4].map(a=>parseInt(n.slice(a,a+2),16));return[r,o,s]}function dn(e){let t=xt(e);if(t===null)return null;let[n,r,o]=t.map(s=>{let a=s/255;return a<=.04045?a/12.92:((a+.055)/1.055)**2.4});return .2126*n+.7152*r+.0722*o}var ia=.4,la=4.5,ca=3;function ua(e,t){let n=dn(e),r=dn(t);if(n===null||r===null)return null;let[o,s]=n>=r?[n,r]:[r,n];return(o+.05)/(s+.05)}var wu={good:"Good","large-only":"Large text only",hard:"Hard to read"};function Ru(e){return e>=la?"good":e>=ca?"large-only":"hard"}var ln=["#000000","#ffffff"];function Et(e){let t=ln[0],n=-1;for(let r of ln){let o=ua(e,r);if(o===null)return ln[0];o>n&&(n=o,t=r)}return t}var da=[.25,.4,.55];function Iu(e){let t=xt(e);return t===null?[]:da.map(n=>"#"+t.map(r=>Math.round(r*(1-n)).toString(16).padStart(2,"0")).join(""))}function Au(e){let t=St(e),n={"--theme-fg":t.text},r=dn(t.text);return(r===null||r>=ia)&&(n["--overlay-fg"]=t.text),n}var pa=82;function fn(e){return`color-mix(in srgb, ${e} ${pa}%, #000)`}function ku(e){let t=St(e);return{"--theme-accent":t.accent,"--theme-accent-2":fn(t.accent),"--theme-accent-ink":Et(t.accent)}}function Ur(e){let t=e?.button;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function Lu(e){let t=St(e),n=Ur(t),r=Vr(t);if(n===null&&r===null)return{};let o={};return n!==null&&(o["--theme-btn"]=n,o["--theme-btn-2"]=fn(n)),o["--theme-btn-ink"]=r??Et(n),o}function Vr(e){let t=e?.buttonInk;return/^#[0-9a-fA-F]{6}$/.test(t??"")?t.toLowerCase():null}function Pu(e,t){return Vr(e)??Et(Ur(e)??t)}function Nu(e){let t={};return Fr(e).themes.forEach((n,r)=>{let o=$r(n);t[`--theme-preset-${r}-accent`]=o.accent,t[`--theme-preset-${r}-accent-2`]=fn(o.accent),t[`--theme-preset-${r}-accent-ink`]=Et(o.accent),t[`--theme-preset-${r}-bg`]=o.background,t[`--theme-preset-${r}-fg`]=o.text,t[`--theme-preset-${r}-surface`]=o.surface,t[`--theme-preset-${r}-surface-2`]=`color-mix(in srgb, ${o.surface} 60%, ${o.line})`,t[`--theme-preset-${r}-line`]=o.line,t[`--theme-preset-${r}-muted`]=o.muted}),t}var Gr=["--theme-bg","--theme-surface","--theme-surface-2","--theme-line","--theme-muted"];function Br(e){let t=$r(St(e)),n=`color-mix(in srgb, ${t.surface} 60%, ${t.line})`,r={"--theme-bg":t.background,"--theme-surface":t.surface,"--theme-line":t.line,"--theme-muted":t.muted};return(t.surface!==ze.surface||t.line!==ze.line)&&(r["--theme-surface-2"]=n),r}var ma=["heading","body","label"];function Hu(e){if(!e)return null;for(let t of ma)if(e.includes(`--size-${t}`))return t;return/--size-heading(Large|Medium|Small)/.test(e)?"heading":null}var Wr=["headingLarge","headingMedium","headingSmall","accent","body","label"];var gn={headingLarge:null,headingMedium:null,headingSmall:null,accent:null,body:null,label:null},fa=8,ga=200,Ou=1;function ha(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.round(e);return t>=fa&&t<=ga?t:null}function ya(e){let t={};for(let n of Wr)t[n]=ha(e?.[n]);return t}function Du(e){let t=ya(e),n={};for(let r of Wr){let o=t[r];o!==null&&(n[`--size-${r}`]=`${o}px`)}return n}var xa=["square","small","large"],ba="small";function Mu(e){return xa.includes(e??"")?e:ba}var Sa=0,Ea=40,Fu={square:0,small:null,large:16},Ca={"--sf-card-radius":1,"--sf-button-radius":.5,"--radius":.5,"--radius-xs":.25,"--radius-sm":.5,"--radius-md":.75,"--radius-lg":1,"--radius-xl":1.25,"--radius-2xl":1.5,"--radius-3xl":2,"--radius-4xl":2.5};function va(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(Ea,Math.max(Sa,Math.round(t))):null}function $u(e){let t=va(e);return t===null?{}:Object.fromEntries(Object.entries(Ca).map(([n,r])=>{let o=t*r/16;return[n,o===0?"0":`${o}rem`]}))}var Ta=["none","soft","lifted"],_a="soft",zr="none",wa=["tight","normal","roomy"],Ra="normal",Ct="normal",Ia=["none","lift","highlight"],Aa="lift",ka="highlight",Kr="#141416";function Yr(e){return Ta.includes(e??"")?e:_a}function La(e){return wa.includes(e??"")?e:Ra}function qr(e){return Ia.includes(e??"")?e:Aa}function Pa(e){return/^#[0-9a-fA-F]{6}$/.test(e??"")?e.toLowerCase():Kr}function Uu(e){let t=Yr(e);return t===zr?void 0:t}function Vu(e){let t=La(e);return t===Ct?void 0:t}function Gu(e){let t=qr(e);return t===ka?void 0:t}function Bu(e,t,n){let r=Pa(t);return r===Kr?{}:Yr(e)!==zr||qr(n)==="lift"?{"--sf-shadow-color":r}:{}}var Na=["normal","tight","compressed"],st="normal";function jr(e){return Na.includes(e??"")?e:st}function Wu(e){let t=jr(e);return t===st?void 0:t}function zu(e){switch(jr(e)){case"tight":return{lineHeight:.95,letterSpacing:-.01};case"compressed":return{lineHeight:.86,letterSpacing:-.01};default:return{}}}var hn={case:"authored",weight:null,weightStrong:null,maxPx:null,weight2:null,weight3:null,case2:"authored",case3:"authored"},cn=100,un=900,Ha=24,Oa=200;function yt(e,t,n){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,t),n))}function yn(e){let t=yt(e?.weight,cn,un),n=e?.case==="sentence"?"sentence":"authored",r=s=>s==null?t:yt(s,cn,un),o=s=>s==="sentence"?"sentence":s==="authored"?"authored":n;return{case:n,weight:t,weightStrong:yt(e?.weightStrong,cn,un),maxPx:yt(e?.maxPx,Ha,Oa),weight2:r(e?.weight2),weight3:r(e?.weight3),case2:o(e?.case2),case3:o(e?.case3)}}function Ku(e){let t=yn(e),n={};return t.case==="sentence"&&(n["--sf-heading-case"]="none"),t.weight!==null&&(n["--sf-heading-weight"]=String(t.weight)),t.weightStrong!==null&&(n["--sf-heading-weight-strong"]=String(t.weightStrong)),t.maxPx!==null&&(n["--sf-heading-max"]=`${t.maxPx}px`),t.weight2!==null&&t.weight2!==t.weight&&(n["--sf-heading-2-weight"]=String(t.weight2)),t.weight3!==null&&t.weight3!==t.weight&&(n["--sf-heading-3-weight"]=String(t.weight3)),t.case2!==t.case&&(n["--sf-heading-2-case"]=t.case2==="sentence"?"none":"uppercase"),t.case3!==t.case&&(n["--sf-heading-3-case"]=t.case3==="sentence"?"none":"uppercase"),n}function Yu(e){return yn({case:e?.heading_case??void 0,weight:e?.heading_weight,weightStrong:e?.heading_weight_strong,maxPx:e?.heading_max_px,weight2:e?.heading_2_weight??void 0,weight3:e?.heading_3_weight??void 0,case2:e?.heading_2_case??void 0,case3:e?.heading_3_case??void 0})}function qu(e){let t=yn(e);return{heading_case:t.case,heading_weight:t.weight,heading_weight_strong:t.weightStrong,heading_max_px:t.maxPx,heading_2_weight:t.weight2,heading_3_weight:t.weight3,heading_2_case:t.case2,heading_3_case:t.case3}}var Ke="data-theme",Xr="light";function xn(e){return e.getAttribute(Ke)===Xr?"light":"dark"}function bn(e,t){return xn(e)===t?!1:(t==="light"?e.setAttribute(Ke,Xr):e.removeAttribute(Ke),!0)}function Da(e){return At(e).getItem(pn)}function Zr(e,t){At(e).setItem(pn,t)}function Ma(e,t,n=new Date().getHours()){return Mr({mode:t.mode,override:Da(e),switchShown:t.switchShown,hour:n})}function Qu(e,t){let n=e.documentElement;if(!n)return()=>{};let r=()=>bn(n,Ma(e,t));r();let o=e.defaultView?.MutationObserver;if(!o)return()=>{};let s=new o(r);return s.observe(n,{attributes:!0,attributeFilter:[Ke]}),()=>s.disconnect()}var Fa="style";function $a(e,t){let n=Br(t),r=!1;for(let o of Gr){let s=n[o]??"";e.style.getPropertyValue(o)!==s&&(s?e.style.setProperty(o,s):e.style.removeProperty(o),r=!0)}return r}function Ju(e,t){let n=e.body;if(!n)return()=>{};let r=()=>$a(n,t);r();let o=e.defaultView?.MutationObserver;if(!o)return()=>{};let s=new o(r);return s.observe(n,{attributes:!0,attributeFilter:[Fa]}),()=>s.disconnect()}import{jsx as Jr}from"react/jsx-runtime";function Sn(){let[e,t]=Qr("dark"),[n,r]=Qr(!1),o=Va(null),s=()=>o.current?.ownerDocument??document;Ua(()=>{let i=s().documentElement,u=()=>t(xn(i));u(),r(!0);let l=new MutationObserver(u);return l.observe(i,{attributes:!0,attributeFilter:[Ke]}),()=>l.disconnect()},[]);function a(){let i=s(),u=e==="dark"?"light":"dark";t(u),bn(i.documentElement,u),Zr(i,u)}return Jr("button",{ref:o,type:"button",onClick:a,"aria-label":`Switch to ${e==="dark"?"light":"dark"} theme`,"aria-pressed":e==="light",className:"relative inline-flex h-5 w-9 items-center rounded-full border border-line bg-surface-2 p-0.5",children:Jr("span",{className:"block h-3.5 w-3.5 rounded-full bg-accent transition-transform duration-200 ease-out",style:{transform:n&&e==="light"?"translateX(16px)":"translateX(0)"}})})}function eo({editorPreview:e,hasPreviewSettings:t,hasInitialSettings:n}){return!e&&!t&&!n}var ye={min:1e3,max:2e3,step:50,default:1600};function to(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}function ad(e,t){if(e!==!1)return null;let n=typeof t=="number"?t:ye.default;return to(n)}var no="--sf-site-width",vt=`var(${no},${ye.default}px)`,id=`max-w-[${vt}]`,ld=`max-w-[${ye.default}px]`;function Ga(e){return typeof e!="number"||!Number.isFinite(e)?ye.default:Math.round(Math.min(Math.max(e,ye.min),ye.max))}function cd(e){let t=Ga(e);return t===ye.default?{}:{[no]:`${t}px`}}var at={min:0,max:80,step:4,default:40},ro="--sf-site-gutter",le=`var(${ro},${at.default}px)`,Ba=`px-[${le}]`;var _e={md:`min(24px,${le})`,sm:`min(20px,${le})`,frame:`min(24px,${le})`,tabs:`min(16px,${le})`},ud=[[`max-[1100px]:px-[${_e.md}]`,"max-[1100px]:px-6"],[`max-[1100px]:px-[${_e.tabs}]`,"max-[1100px]:px-4"],[`max-[960px]:px-[${_e.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${_e.md}]`,"max-[900px]:px-6"],[`max-[800px]:px-[${_e.md}]`,"max-[800px]:px-6"],[`max-[720px]:px-[${_e.sm}]`,"max-[720px]:px-5"],[`max-[800px]:px-[${_e.sm}]`,"max-[800px]:px-5"],[`max-[640px]:px-[${_e.sm}]`,"max-[640px]:px-5"],[`min-[800px]:px-[${le}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${le})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${le})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${le})]`,"max-[720px]:-mx-5"],[`-mx-[${le}]`,"-mx-10"],[Ba,"px-10"]];function Wa(e){return typeof e!="number"||!Number.isFinite(e)?at.default:Math.round(Math.min(Math.max(e,at.min),at.max))}function dd(e){let t=Wa(e);return t===at.default?{}:{[ro]:`${t}px`}}var oo=`min(var(--sf-page-cap,${vt}),${vt})`,pd=`max-w-[${oo}]`,md=`max-w-[min(var(--sf-page-cap,${ye.default}px),${ye.default}px)]`,so="--sf-hero-cap",za=`var(${so},none)`,fd=`max-w-[${za}]`,En="--sf-hero-bleed-m",Cn="--sf-hero-bleed-w",gd=`var(${En},calc(50% - 50vw))`,hd=`var(${Cn},100vw)`,yd=`mx-[var(${En},calc(50%_-_50vw))]`,xd=`w-[var(${Cn},100vw)]`,Ka="--sf-hero-chrome-x",Ya="--sf-hero-chrome-cap";function bd(e){return e===!0?{[so]:oo,[En]:"auto",[Cn]:"100%",[Ka]:"24px",[Ya]:"none"}:{}}var vn=`calc(${vt} - ${le}*2)`,Sd=`max-w-[${vn.replace(/ /g,"_")}]`;var qa="--sf-chrome-cap",ja=`var(${qa},${vn})`,Ed="data-page-width";function Cd(e){return e==="full"?"full":null}function ao(e){return e==="full"?null:to(e==="content"?vn:ja)}function io(e){if(e==="full")return"full";if(e==="content")return"content"}var Xa="sf-section-accent",Td="Color",_d=new Set(["CategoryBar","DocTabs"]),wd=new Set(["Flex"]),Za=0;function Qa(e){return e===-1?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:Za}function Rd(e){return e??-1}function Tn(e){let t=`--theme-preset-${e}`;return{"--sf-sec-accent":`var(${t}-accent)`,"--sf-sec-accent-2":`var(${t}-accent-2)`,"--sf-sec-accent-ink":`var(${t}-accent-ink)`,"--sf-sec-bg":`var(${t}-bg, var(--theme-bg))`,"--sf-sec-fg":`var(${t}-fg, var(--theme-fg))`,"--sf-sec-surface":`var(${t}-surface, var(--theme-surface))`,"--sf-sec-surface-2":`var(${t}-surface-2, var(--theme-surface-2))`,"--sf-sec-line":`var(${t}-line, var(--theme-line))`,"--sf-sec-muted":`var(${t}-muted, var(--theme-muted))`}}function Id(e){let t=Qa(e.sectionAccent);return t===null?null:{className:Xa,style:Tn(t)}}var Ld=-1,ei="sf-header-theme";function ti(e){return typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}function lo(e){let t=ti(e);return t===null?null:{className:ei,style:Tn(t)}}function co(e,t,n){return e.some(o=>(typeof o=="object"?o.value:o)===n)?n:t}var ni="overlay",ri=[{label:"Copy over image",value:"overlay"},{label:"Copy above image",value:"stacked"}];function uo(e){return co(ri,ni,e)}var Od={desktop:40,mobile:45,min:20,max:80,step:5};function Dd(e,t){return`${typeof e=="number"?e:t}%`}var po="data-lead-ink",mo="data-header-ink";var oi="auto";function si(e){return e.type==="IntroBleed"?uo(e.props?.layout)!=="stacked":!0}function Ud(e){let t=sn(e);return t&&Hr(e)&&si(t)?"light":null}function fo(e){return e==="light"||e==="dark"?e:oi}import{Fragment as wt,jsx as R,jsxs as N}from"react/jsx-runtime";var go={stacked:{grid:"hidden min-[1501px]:grid",flex:"hidden min-[1501px]:flex"},inline:{grid:"hidden min-[801px]:grid",flex:"hidden min-[801px]:flex"}},ii=Array.from({length:6},()=>({href:"#",label:R(Xt,{})}));function _n({previewSettings:e,initialSettings:t,editorPreview:n,showThemeToggle:r,wordmark:o,hideLogo:s,hideMenu:a,siteName:i,commerceEnabled:u=!0}={}){let l=ur(),[d,c]=_t(!1);Tt(()=>{let f=ge.current?.ownerDocument??document,T=()=>c(f.querySelector(`[${po}="light"]`)!=null);T();let Ve=requestAnimationFrame(T);return()=>cancelAnimationFrame(Ve)},[l]);let S=l.startsWith("/wheels/")&&l!=="/wheels",[m,g]=_t(!1),{open:_,totals:L}=or(),{open:I}=pr(),[H,$]=_t(!1),[h,P]=_t(t??null),b=e??(h?{logoUrl:h.logoUrl,reverseLogo:h.reverseLogo,logoReversed:h.logoReversed,logoInkIsDark:h.logoInkIsDark,logoPosition:h.logoPosition,logoSize:h.logoSize,logoSizePx:h.logoSizePx,menuItems:(h.menuItems??[]).map(f=>({label:f.label,url:f.url,dropdown_menu:null,dropdown_items:f.dropdownItems??[]})),menuSplit:h.menuSplit??3,menuPosition:h.menuPosition,menuRow:h.menuRow,menuGapPx:h.menuGapPx??null,searchEnabled:h.searchEnabled,searchPosition:h.searchPosition,searchRow:h.searchRow,countrySelectorEnabled:h.countrySelectorEnabled,countryUrls:h.countryUrls,accountEnabled:h.accountEnabled,cartEnabled:h.cartEnabled,utilStyle:h.utilStyle,navTextCase:h.navTextCase,lightReverseText:h.lightReverseText,topTextColor:h.topTextColor,transparentTop:h.transparentTop,surface:h.surface,theme:h.theme,width:h.width,heightPx:h.heightPx,sticky:h.sticky}:null),J=s?null:b?.logoUrl??null,z=b?.reverseLogo??!1,w=b?.logoReversed??null,M=b?.logoInkIsDark??null,y=b?.logoPosition??"center",q=b?.logoSize??"medium",pe=b?.logoSizePx??null,ee=Math.min(Math.max(b?.menuSplit??3,1),4),V=(b?.menuPosition??"left")==="center",te=(b?.menuPosition??"left")==="beside",oe=(b?.menuRow??"top")==="inline",F=b?.menuGapPx??null,xe=F!=null?{gap:`${F}px`}:void 0,j=oe?go.inline:go.stacked,me=b?.searchEnabled??!1,se=b?.searchPosition??"right",be=b?.countrySelectorEnabled??!0,G=b?.accountEnabled??!0,A=b?.cartEnabled??!0,B=(b?.utilStyle??"icon")==="text",O=`mono-eyebrow${(b?.navTextCase??"uppercase")==="capitalised"?" mono-eyebrow-plain":""}`,we=b?.countryUrls??{},Re=io(b?.width),Oe=ao(Re)??void 0,De=b?.heightPx??ht.default,Ie=b?.sticky??"always",fe=fo(b?.topTextColor),ne=lo(b?.theme),Se=Object.keys(we),Me=Sr(Se.length?Se:void 0),W=be?R(Yt,{countries:Se.length?Se:void 0,urls:e?void 0:we}):null,{headerRef:ge,scrolled:Ae,navHidden:Fe}=Dr({stickyMode:Ie,heightPx:De});Tt(()=>{let f=ge.current?.ownerDocument??document,T=()=>{$(f.documentElement.getAttribute("data-theme")==="light")};T();let Ve=new MutationObserver(T);return Ve.observe(f.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>Ve.disconnect()},[]);let he=r??!1?R(Sn,{}):null;Tt(()=>{if(!eo({editorPreview:!!n,hasPreviewSettings:!!e,hasInitialSettings:!!t}))return;let f=!1;return re.getHeaderSettings().then(T=>!f&&P(T)).catch(T=>{console.warn("[header] settings fetch failed; using built-in defaults",T)}),()=>{f=!0}},[n,e,t]);let Ee=Ae||S,p=fe==="auto"?d:fe==="light",E=Ee||!p,v=Ee?H:H&&!p,C=fe==="auto"?null:{[mo]:fe};Tt(()=>{if(!m)return;let f=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=f}},[m]);let k=(f,T,Ve="start")=>R(mt,{item:f,dropdownAlign:Ve},T),ce=!a&&(b?.menuItems?.length??0)>0,ke=!!n||!!e,K=ce?b.menuItems.map(f=>({href:f.url||"",label:Qt(f.label),plainLabel:f.label,dropdownItems:(f.dropdown_items??[]).map(T=>({href:T.url||"",label:Qt(T.label),plainLabel:T.label}))})):ke?ii.map(f=>({...f,plainLabel:"Menu item",dropdownItems:[]})):[],$e=y==="center"?K.slice(0,ee):y==="right"?K:[],Ue=y==="center"?K.slice(ee):y==="left"?K:[],x=me?R(Lr,{onClick:ke?void 0:I,asText:B}):null,Le=u&&G?R(kr,{asText:B}):null,qe=f=>u&&A?R(Ar,{onClick:_,count:L.sets,asText:B,className:f}):null,D=N(wt,{children:[se==="left"?x:null,W,he,Le,qe(),se==="right"?x:null]}),ue=(f,T=!1)=>R(ie,{href:"/","aria-label":i?`${i} home`:"Home",className:f,children:R(jt,{variant:"header",scrolled:E,src:J,reverse:z,onLightSurface:v,reversedSrc:w,inkIsDark:M,size:q,sizePx:pe,wordmark:o,siteName:i,fitToContainer:T})}),ae=ue("inline-flex shrink-0 items-center justify-center"),it="flex min-w-0 flex-1 items-center overflow-x-clip [container-type:inline-size]";return N(wt,{children:[R("header",{ref:ge,"data-scrolled":Ae||void 0,...C,className:["sf-site-header",...ne?[ne.className]:[],Ie==="none"?"absolute":"fixed","inset-x-0 top-0 z-50","flex items-center","px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",Ee?"border-b border-line backdrop-blur-md":"border-b border-transparent","transition-[background,border-color,transform] duration-300 ease-out"].join(" "),style:{...ne?ne.style:null,minHeight:Pr,...Fe?{transform:"translateY(-100%)"}:null,...Ee?{background:!H&&S?"var(--section-bg)":"var(--bg)",color:"var(--fg)"}:{color:"var(--sf-header-overlay-fg)"}},children:N("div",{className:"w-full",style:Oe,children:[V?N("div",{className:`${j.grid} grid-cols-[1fr_auto_1fr] items-center gap-8`,children:[y==="right"?R("nav",{className:`${O} flex items-center gap-7`,children:D}):R("div",{className:"flex items-center",children:ae}),R("nav",{className:`${O} flex items-center justify-center gap-7`,children:K.map((f,T)=>k(f,`${f.href}-${T}`,"center"))}),y==="right"?R("div",{className:"flex items-center justify-end",children:ae}):R("nav",{className:`${O} flex items-center justify-end gap-7`,children:D})]}):y==="center"?N("div",{className:`${j.grid} grid-cols-[1fr_auto_1fr] items-center gap-8`,children:[R("nav",{className:`${O} flex items-center gap-7`,children:$e.map((f,T)=>k(f,`${f.href}-${T}`))}),ae,N("nav",{className:`${O} flex items-center justify-end gap-7`,children:[Ue.map((f,T)=>k(f,`${f.href}-${T}`,"end")),D]})]}):te?N("div",{className:`${j.flex} items-center justify-between gap-8`,children:[N("div",{className:"flex items-center gap-7",style:xe,children:[ae,R("nav",{className:`${O} flex items-center gap-7`,children:K.map((f,T)=>k(f,`${f.href}-${T}`))})]}),R("nav",{className:`${O} flex items-center justify-end gap-7`,children:D})]}):R("div",{className:`${j.flex} items-center justify-between gap-8`,children:y==="right"?N(wt,{children:[N("nav",{className:`${O} flex items-center gap-7`,children:[K.map((f,T)=>k(f,`${f.href}-${T}`)),D]}),ae]}):N(wt,{children:[ae,N("nav",{className:`${O} flex items-center gap-7`,children:[K.map((f,T)=>k(f,`${f.href}-${T}`)),D]})]})}),!oe&&N("div",{className:"hidden min-[801px]:max-[1500px]:flex flex-col gap-3",children:[N("div",{className:"flex items-center justify-between",children:[ue(it,!0),N("div",{className:`${O} flex shrink-0 items-center gap-5`,children:[x,W,he,Le,qe()]})]}),R("nav",{className:`${O} flex items-center gap-6 border-t border-line/60 pt-2.5`,children:K.map((f,T)=>k(f,`${f.href}-${T}`))})]}),N("div",{className:"hidden max-[800px]:flex items-center justify-between",children:[ue(it,!0),N("div",{className:"flex shrink-0 items-center gap-4",children:[x,Le,qe(O),N("button",{type:"button","aria-label":m?"Close menu":"Open menu","aria-expanded":m,onClick:()=>g(f=>!f),className:"flex h-11 w-11 flex-col items-center justify-center gap-1.5",children:[R("span",{className:`block h-px w-5 bg-current transition-transform ${m?"translate-y-[3px] rotate-45":""}`}),R("span",{className:`block h-px w-5 bg-current transition-transform ${m?"opacity-0":""}`}),R("span",{className:`block h-px w-5 bg-current transition-transform ${m?"-translate-y-[3px] -rotate-45":""}`})]})]})]})]})}),m&&N("div",{className:"fixed inset-x-0 top-0 bottom-0 z-40 hidden overflow-y-auto max-[800px]:flex max-[800px]:flex-col max-[800px]:gap-7 max-[800px]:bg-bg max-[800px]:px-6 max-[800px]:pt-24 max-[800px]:pb-10",children:[K.map((f,T)=>R(mt,{item:f,mobile:!0,onNavigate:()=>g(!1)},`${f.href}-${T}`)),N("div",{className:"mt-auto flex flex-col gap-4 border-t border-line pt-6",children:[u&&G&&N("div",{className:"flex items-center justify-between",children:[R("span",{className:"mono-eyebrow text-fg-dim",children:"Account"}),R(ie,{href:"/account",onClick:()=>g(!1),className:"mono-eyebrow underline",children:"Your account"})]}),W&&Me&&N("div",{className:"flex items-center justify-between",children:[R("span",{className:"mono-eyebrow text-fg-dim",children:"Region"}),W]}),he&&N("div",{className:"flex items-center justify-between",children:[R("span",{className:"mono-eyebrow text-fg-dim",children:"Theme"}),he]})]})]})]})}import{createContext as yo,useContext as wn}from"react";import{createContext as li}from"react";var ho=li(null);var ci=yo(null),Rn=yo({logo:null,placeholder:!1,wordmark:null});function gp(){let e=wn(ho),t=wn(ci),n=wn(Rn),r=!e&&n.placeholder,o=e?e.logoUrl:n.logo?.logoUrl??t?.logoUrl??null;return{src:r?null:o,reversedSrc:e?e.logoReversed:n.logo?.logoReversed??t?.logoReversed??null,inkIsDark:e?e.logoInkIsDark:n.logo?.logoInkIsDark??t?.logoInkIsDark??null,wordmark:e?null:n.wordmark,siteName:e?.siteName??t?.siteName}}var In={accent:"#2563eb",accentTint:"#eff6ff",accentText:"#1d4ed8",appBg:"#f9fafb",previewBg:"#f3f4f6",panel:"#ffffff",fieldBg:"#ffffff",inputBorder:"#d1d5db",text:"#111827",text2:"#374151",muted:"#6b7280",line:"#e5e7eb",chipBg:"#f3f4f6",chipFg:"#6b7280",panelRadius:12,rowRadius:8,panelShadow:"0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.06)",topbarShadow:"0 1px 3px rgba(0,0,0,.06)",panelGap:10,leftWidth:288,rightWidth:308,topbarHeight:52,labelFont:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif"};import{createContext as ui,useCallback as bo,useContext as di,useRef as pi,useState as mi}from"react";var An=0;function xo(e){An+=1;try{return e()}finally{An-=1}}function xp(){return An>0}import{jsx as fi}from"react/jsx-runtime";function kn(){let e=pi(()=>{}),t=bo((...r)=>xo(()=>e.current(...r)),[]),n=bo(r=>{e.current=r},[]);return{select:t,setSelectHandler:n}}function Cp(e){let t=`set${e.charAt(0).toUpperCase()}${e.slice(1)}`,n=(a,i,u,l)=>({[e]:a,[t]:i,select:u,setSelectHandler:l}),r=ui(n(null,()=>{},()=>{},()=>{}));function o({children:a}){let[i,u]=mi(null),{select:l,setSelectHandler:d}=kn();return fi(r.Provider,{value:n(i,u,l,d),children:a})}return{Provider:o,useSelection:()=>di(r)}}var Ln=[{key:"space-grotesk",label:"Space Grotesk",cssVar:"--font-display",category:"sans",italic:!1,italicLoaded:!1},{key:"inter",label:"Inter",cssVar:"--font-body",category:"sans",italic:!0,italicLoaded:!0},{key:"poppins",label:"Poppins",cssVar:"--font-poppins",category:"sans",italic:!0,italicLoaded:!0},{key:"dm-sans",label:"DM Sans",cssVar:"--font-dm-sans",category:"sans",italic:!0,italicLoaded:!0},{key:"sora",label:"Sora",cssVar:"--font-sora",category:"sans",italic:!1,italicLoaded:!1},{key:"oswald",label:"Oswald",cssVar:"--font-oswald",category:"sans",italic:!1,italicLoaded:!1},{key:"archivo",label:"Archivo",cssVar:"--font-archivo",category:"sans",italic:!0,italicLoaded:!0},{key:"outfit",label:"Outfit",cssVar:"--font-outfit",category:"sans",italic:!1,italicLoaded:!1},{key:"manrope",label:"Manrope",cssVar:"--font-manrope",category:"sans",italic:!1,italicLoaded:!1},{key:"big-shoulders",label:"Big Shoulders",cssVar:"--font-big-shoulders",category:"sans",italic:!1,italicLoaded:!1},{key:"michroma",label:"Michroma",cssVar:"--font-michroma",category:"sans",italic:!1,italicLoaded:!1},{key:"fraunces",label:"Fraunces",cssVar:"--font-serif",category:"serif",italic:!0,italicLoaded:!0},{key:"playfair-display",label:"Playfair Display",cssVar:"--font-playfair",category:"serif",italic:!0,italicLoaded:!0},{key:"cormorant",label:"Cormorant",cssVar:"--font-cormorant",category:"serif",italic:!0,italicLoaded:!0},{key:"jetbrains-mono",label:"JetBrains Mono",cssVar:"--font-mono-loaded",category:"mono",italic:!0,italicLoaded:!0}],Ne=new Map(Ln.map(e=>[e.key,e])),gi={sans:"Sans",serif:"Serif",mono:"Mono"};function _p(){return Object.keys(gi).map(e=>[e,Ln.filter(t=>t.category===e)]).filter(([,e])=>e.length>0)}function wp(e){return Ne.get(e)?.italicLoaded??!1}function Rp(e){return Ne.get(e)}var So=["heading","heading2","heading3","body","accent","label"],Ip={heading:"Heading 1",heading2:"Heading 2",heading3:"Heading 3",body:"Body",accent:"Accent",label:"Labels"},hi=[["font-heading2","heading2"],["font-heading3","heading3"],["font-display","heading"],["font-serif","accent"],["font-mono","label"],["font-body","body"]],yi=/var\(--size-(headingLarge|headingMedium|headingSmall|accent|body|label)\s*,/,Ap={heading:"headingLarge",heading2:"headingMedium",heading3:"headingSmall",accent:"accent",body:"body",label:"label"},xi={headingLarge:"heading",headingMedium:"heading2",headingSmall:"heading3",accent:"accent",body:"body",label:"label"};function kp(e){let t=e?yi.exec(e):null;return t?xi[t[1]]??null:bi(e)}function bi(e){if(!e)return null;let t=e.split(/\s+/).filter(n=>!n.slice(0,n.lastIndexOf(":")+1).includes("&")).map(n=>n.slice(n.lastIndexOf(":")+1));for(let[n,r]of hi)if(t.includes(n))return r;return null}var Si=["heading","heading2","heading3"];function Lp(e){return Si.includes(e)}var He={heading:"space-grotesk",heading2:"space-grotesk",heading3:"space-grotesk",body:"inter",accent:"fraunces",label:"jetbrains-mono"};function Ei(e){let t=n=>{let r=e?.[n];if(r&&Ne.has(r))return r;if(n==="heading2"||n==="heading3"){let o=e?.heading;return o&&Ne.has(o)?o:He.heading}return He[n]};return Object.fromEntries(So.map(n=>[n,t(n)]))}function Ci(e,t){return Ne.get(e[t])??Ne.get(He[t])}function Ye(e,t){return`var(${Ci(e,t).cssVar})`}var Pp=[...new Set(So.map(e=>Ne.get(He[e]).cssVar))],Np=[...new Set(Ln.map(e=>e.cssVar))];function Hp(e){let t=Ei(e);return{"--font-role-heading":Ye(t,"heading"),"--font-role-heading2":Ye(t,"heading2"),"--font-role-heading3":Ye(t,"heading3"),"--font-role-body":Ye(t,"body"),"--font-role-accent":Ye(t,"accent"),"--font-role-label":Ye(t,"label"),fontFamily:"var(--font-role-body)"}}import{jsx as It,jsxs as Ii}from"react/jsx-runtime";var Co=vi({settings:null,setSettings:()=>{},primeSettings:()=>{},websiteName:null,templateChrome:!1,templateName:null,chromePlaceholder:!1,themeMode:mn,setThemeMode:()=>{},themeSwitchShown:!1,setThemeSwitchShown:()=>{},theme:bt,setTheme:()=>{},fonts:He,setFonts:()=>{},sizes:gn,setSizes:()=>{},cornerRadiusPx:null,setCornerRadiusPx:()=>{},cardShadow:null,setCardShadow:()=>{},shadowColor:null,setShadowColor:()=>{},cardGap:Ct,setCardGap:()=>{},hoverEffect:null,setHoverEffect:()=>{},headingCompression:st,setHeadingCompression:()=>{},siteWidth:null,setSiteWidth:()=>{},siteGutter:null,blockGap:null,setSiteGutter:()=>{},setBlockGap:()=>{},headingTypography:hn,setHeadingTypography:()=>{},heroBackgroundFollowsWidth:null,setHeroBackgroundFollowsWidth:()=>{},photographyGrayscale:null,setPhotographyGrayscale:()=>{},themeFromDocument:!1,selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function Yp({children:e,websiteName:t=null,templateChrome:n=!1,templateName:r=null,chromePlaceholder:o=!1,themeMode:s=mn,onThemeModeChange:a,themeSwitchShown:i=!1,onThemeSwitchShownChange:u,theme:l=bt,onThemeChange:d,fonts:c=He,onFontsChange:S,sizes:m=gn,onSizesChange:g,cornerRadiusPx:_=null,onCornerRadiusPxChange:L,cardShadow:I=null,onCardShadowChange:H,shadowColor:$=null,onShadowColorChange:h,cardGap:P=Ct,onCardGapChange:b,hoverEffect:J=null,onHoverEffectChange:z,headingCompression:w=st,onHeadingCompressionChange:M,siteWidth:y=null,onSiteWidthChange:q,siteGutter:pe=null,blockGap:ee=null,onSiteGutterChange:V,onBlockGapChange:te,headingTypography:oe=hn,onHeadingTypographyChange:F,heroBackgroundFollowsWidth:xe=null,onHeroBackgroundFollowsWidthChange:j,photographyGrayscale:me=null,onPhotographyGrayscaleChange:se,themeFromDocument:be=!1}){let[G,A]=Eo(null),B=U(x=>A(Le=>Le??x),[]),[O,we]=Eo(!1),Re=U(x=>a?.(x),[a]),Oe=U(x=>u?.(x),[u]),De=U(x=>d?.(x),[d]),Ie=U(x=>S?.(x),[S]),fe=U(x=>g?.(x),[g]),ne=U(x=>q?.(x),[q]),Se=U(x=>V?.(x),[V]),Me=U(x=>te?.(x),[te]),W=U(x=>j?.(x),[j]),ge=U(x=>se?.(x),[se]),Ae=U(x=>L?.(x),[L]),Fe=U(x=>H?.(x),[H]),he=U(x=>h?.(x),[h]),Ee=U(x=>b?.(x),[b]),p=U(x=>z?.(x),[z]),E=U(x=>M?.(x),[M]),v=U(x=>F?.(x),[F]),{select:C,setSelectHandler:k}=kn(),ce=G?.logoUrl,ke=G?.logoReversed,K=G?.logoInkIsDark,$e=G!==null,Ue=_i(()=>({logo:$e?{logoUrl:ce,logoReversed:ke,logoInkIsDark:K}:null,placeholder:n||o,wordmark:n?r:t}),[$e,ce,ke,K,n,o,r,t]);return It(Rn.Provider,{value:Ue,children:It(Co.Provider,{value:{settings:G,setSettings:A,primeSettings:B,websiteName:t,templateChrome:n,templateName:r,chromePlaceholder:o,themeMode:s,setThemeMode:Re,themeSwitchShown:i,setThemeSwitchShown:Oe,theme:l,setTheme:De,fonts:c,setFonts:Ie,sizes:m,setSizes:fe,cornerRadiusPx:_,setCornerRadiusPx:Ae,cardShadow:I,setCardShadow:Fe,shadowColor:$,setShadowColor:he,cardGap:P,setCardGap:Ee,hoverEffect:J,setHoverEffect:p,headingCompression:w,setHeadingCompression:E,siteWidth:y,setSiteWidth:ne,siteGutter:pe,blockGap:ee,setSiteGutter:Se,setBlockGap:Me,headingTypography:oe,setHeadingTypography:v,heroBackgroundFollowsWidth:xe,setHeroBackgroundFollowsWidth:W,photographyGrayscale:me,setPhotographyGrayscale:ge,themeFromDocument:be,selected:O,setSelected:we,select:C,setSelectHandler:k},children:e})})}var wi=()=>Ti(Co),Ri=`
|
|
2
|
+
.sf-preview-header-pick header { cursor: pointer; }
|
|
3
|
+
.sf-preview-header-pick header:hover {
|
|
4
|
+
outline: 2px solid color-mix(in srgb, ${In.accent} 45%, transparent);
|
|
5
|
+
outline-offset: -2px;
|
|
6
|
+
}
|
|
7
|
+
.sf-preview-header-pick[data-selected] header {
|
|
8
|
+
outline: 2px solid ${In.accent};
|
|
9
|
+
outline-offset: -2px;
|
|
10
|
+
}
|
|
11
|
+
`;function qp(){let{settings:e,selected:t,select:n,websiteName:r,templateChrome:o,templateName:s,chromePlaceholder:a,themeSwitchShown:i}=wi(),u=o?s?.trim()||"Template":r?.trim()||ve,l=o||a;return Ii("div",{className:"sf-preview-header-pick sf-theme-surfaces","data-selected":t||void 0,onClick:d=>{d.stopPropagation(),n()},children:[It("style",{children:Ri}),It(_n,{previewSettings:e??void 0,editorPreview:!0,showThemeToggle:i,wordmark:u,hideLogo:l,hideMenu:l})]})}import{forwardRef as Ai}from"react";import{jsx as Pi}from"react/jsx-runtime";var ki={position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,color:"transparent"},Li=Ai(function({src:t,width:n,height:r,fill:o,priority:s,loading:a,style:i,quality:u,placeholder:l,blurDataURL:d,unoptimized:c,loader:S,overrideSrc:m,...g},_){let L=m??(typeof t=="string"?t:t.src);return Pi("img",{ref:_,src:L,width:o?void 0:n,height:o?void 0:r,loading:s?"eager":a??"lazy",fetchPriority:s?"high":void 0,decoding:"async",style:o?{...ki,...i}:{color:"transparent",...i},...g})}),Qp=Li;function Jp(e){return{props:{src:e.overrideSrc??(typeof e.src=="string"?e.src:e.src.src),sizes:e.sizes}}}var nm="#c9a461",vo=[{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"}],rm={name:"",color:"var(--fg)",family:"silver",src:""};function Ni(e,t){let n=r=>{let o=vo.findIndex(s=>s.f===r);return o===-1?vo.length:o};return n(e)-n(t)||e.localeCompare(t)}function om(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(Ni)}function am(){let e=typeof crypto<"u"?crypto:void 0;if(typeof e?.randomUUID=="function")return e.randomUUID();let t=new Uint8Array(16);if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<t.length;r++)t[r]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}export{pn as a,Eu as b,Cu as c,vu as d,mn as e,sa as f,Fr as g,Tu as h,_u as i,St as j,$r as k,ua as l,wu as m,Ru as n,Iu as o,Au as p,ku as q,Ur as r,Lu as s,Vr as t,Pu as u,Nu as v,Br as w,Hu as x,gn as y,fa as z,ga as A,Ou as B,ya as C,Du as D,Mu as E,Sa as F,Ea as G,Fu as H,va as I,$u as J,Ta as K,_a as L,zr as M,Ct as N,Ia as O,Aa as P,ka as Q,Kr as R,Yr as S,La as T,qr as U,Pa as V,Uu as W,Vu as X,Gu as Y,Bu as Z,st as _,jr as $,Wu as aa,zu as ba,hn as ca,cn as da,un as ea,Ha as fa,Oa as ga,yn as ha,Ku as ia,Yu as ja,qu as ka,Mn as la,To as ma,Hi as na,_o as oa,Oi as pa,Di as qa,Xe as ra,kt as sa,wo as ta,Ro as ua,Mi as va,Fi as wa,Td as xa,_d as ya,wd as za,Qa as Aa,Rd as Ba,Id as Ca,Ln as Da,gi as Ea,_p as Fa,wp as Ga,Rp as Ha,So as Ia,Ip as Ja,Ap as Ka,kp as La,bi as Ma,Lp as Na,He as Oa,Ei as Pa,Hp as Qa,Qt as Ra,Qc as Sa,ye as Ta,to as Ua,ad as Va,vt as Wa,Ga as Xa,cd as Ya,at as Za,le as _a,Wa as $a,dd as ab,oo as bb,so as cb,Ka as db,Ya as eb,bd as fb,Ed as gb,Cd as hb,ao as ib,io as jb,ie as kb,Qp as lb,Jp as mb,$n as nb,Lt as ob,Ui as pb,Vi as qb,Gi as rb,Bi as sb,Io as tb,Ao as ub,Wi as vb,zi as wb,Pt as xb,Nt as yb,Ze as zb,lt as Ab,Mo as Bb,Ot as Cb,il as Db,ll as Eb,$o as Fb,cl as Gb,ul as Hb,Uo as Ib,dl as Jb,Go as Kb,pl as Lb,ml as Mb,co as Nb,Xi as Ob,Je as Pb,el as Qb,tl as Rb,nl as Sb,rl as Tb,qn as Ub,bl as Vb,Sl as Wb,El as Xb,ct as Yb,Mt as Zb,Pl as _b,or as $b,nm as ac,vo as bc,rm as cc,Ni as dc,om as ec,ht as fc,cu as gc,uu as hc,Pr as ic,du as jc,pu as kc,mu as lc,fu as mc,Js as nc,gu as oc,na as pc,hu as qc,ur as rc,cc as sc,pr as tc,Wt as uc,zt as vc,Ps as wc,Sr as xc,Yt as yc,pt as zc,ve as Ac,Vs as Bc,Gs as Cc,Fc as Dc,$c as Ec,jt as Fc,Gc,Bc as Hc,Wc as Ic,zc as Jc,Kc,Yc as Lc,Xt as Mc,Ir as Nc,Ft as Oc,tn as Pc,Ar as Qc,Lr as Rc,Dr as Sc,Qu as Tc,Ju as Uc,Ld as Vc,ni as Wc,ri as Xc,uo as Yc,Od as Zc,Dd as _c,po as $c,mo as ad,Ud as bd,fo as cd,ho as dd,gp as ed,In as fd,lr as gd,us as hd,ut as id,cr as jd,zl as kd,Kl as ld,ps as md,ec as nd,fs as od,nc as pd,xp as qd,kn as rd,Cp as sd,Yp as td,wi as ud,qp as vd,am as wd};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$b as f,Qb as x}from"./chunk-764WH3TY.js";import{jsx as i,jsxs as y}from"react/jsx-runtime";function b({spokes:c,mesh:t=!1,className:u}){let o=e=>Math.round(e*1e3)/1e3,r=[];for(let e=0;e<c;e++){let n=e/c*Math.PI*2-Math.PI/2;if(r.push({x1:o(100+Math.cos(n)*22),y1:o(100+Math.sin(n)*22),x2:o(100+Math.cos(n)*86),y2:o(100+Math.sin(n)*86),main:!0}),t){let p=n+Math.PI/c;r.push({x1:o(100+Math.cos(p)*22*1.4),y1:o(100+Math.sin(p)*22*1.4),x2:o(100+Math.cos(p)*78),y2:o(100+Math.sin(p)*78),main:!1})}}return y("svg",{viewBox:"0 0 200 200",fill:"none",stroke:"currentColor",className:u??"block h-[70%] w-[70%] transition-transform duration-700 [transition-timing-function:cubic-bezier(.2,.6,.2,1)]",children:[i("circle",{cx:100,cy:100,r:92,strokeWidth:2}),i("circle",{cx:100,cy:100,r:84,strokeWidth:1,opacity:.4}),i("circle",{cx:100,cy:100,r:22,strokeWidth:2}),i("circle",{cx:100,cy:100,r:6,fill:"currentColor"}),r.map((e,n)=>i("line",{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stroke:"currentColor",strokeWidth:e.main?6:3,strokeLinecap:"round",opacity:e.main?1:.5},n))]})}import{useState as h}from"react";import{jsx as a,jsxs as m}from"react/jsx-runtime";function g({customerEmail:c}){let{coupon:t,applyCoupon:u,removeCoupon:d,couponBusy:s}=f(),[l,o]=h("");async function r(){s||!l.trim()||(await u(l,c),o(""))}return m("div",{className:"flex flex-col gap-2",children:[t===null?m("div",{className:"flex border border-line",children:[a("input",{type:"text",value:l,onChange:e=>o(e.target.value),onKeyDown:e=>{e.key==="Enter"&&(e.preventDefault(),r())},placeholder:"Coupon code","aria-label":"Coupon code",className:"flex-1 bg-transparent px-3.5 py-3.5 font-mono text-[11px] uppercase tracking-[0.18em] text-fg outline-none placeholder:text-fg-dim"}),a("button",{type:"button",onClick:()=>{r()},disabled:s,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:s?"\u2026":"Apply"})]}):m("div",{className:["flex items-center justify-between gap-3 border px-3.5 py-3",t.valid?"border-accent":"border-line"].join(" "),style:t.valid?{background:"color-mix(in oklab, var(--accent) 8%, transparent)"}:void 0,children:[a("span",{className:["font-mono text-[11px] uppercase tracking-[0.22em]",t.valid?"text-accent":t.deferred?"text-fg":"text-fg-dim line-through"].join(" "),children:t.code}),a("button",{type:"button",onClick:d,"aria-label":`Remove coupon ${t.code}`,className:"font-mono text-[12px] text-fg-dim transition-colors hover:text-fg",children:"\u2715"})]}),t?.deferred?a("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-fg-dim",children:x}):t&&!t.valid&&t.message&&a("p",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-alert",children:t.message})]})}export{b as a,g as b};
|