efficient-storefront-blocks 0.43.0 → 0.45.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 +44 -1
- package/README.md +1 -1
- package/dist/chunks/{EditorPreviewCheckout-OOIMRWPC.js → EditorPreviewCheckout-RA35QPFM.js} +2 -2
- package/dist/chunks/{SiteEditorProvider-7HBDTOHL.js → SiteEditorProvider-RRMVA76I.js} +1 -1
- package/dist/chunks/chunk-HHZH76OU.js +255 -0
- package/dist/chunks/{chunk-PF2VDYSO.js → chunk-NNJSIHWJ.js} +1 -1
- package/dist/chunks/{chunk-HKHIOXRJ.js → chunk-TREIS6WP.js} +1 -1
- package/dist/chunks/{fitment-data-XHANJXIJ.js → fitment-data-KQB6P6A2.js} +1 -1
- package/dist/index.js +49 -49
- package/dist/words.d.ts +1 -1
- package/package.json +3 -3
- package/dist/chunks/chunk-X6N32X46.js +0 -255
- /package/dist/chunks/{SectionEditorShell-L7JFXNDG.js → SectionEditorShell-JSHUZPVJ.js} +0 -0
- /package/dist/chunks/{chunk-MRRGYKU2.js → chunk-BAR34RXF.js} +0 -0
- /package/dist/chunks/{chunk-UBIWN5OB.js → chunk-BG52UY3U.js} +0 -0
- /package/dist/chunks/{chunk-X6N32X46.js.LEGAL.txt → chunk-HHZH76OU.js.LEGAL.txt} +0 -0
- /package/dist/chunks/{gallery-builds-data-VVHHVNYW.js → gallery-builds-data-TD3QJK7L.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 0.45.0 — 2026-10-20
|
|
4
|
+
|
|
5
|
+
- **On efficient-web-builder 25** (keep editor code off shopper pages; GG 2026-10-20). The builder range is `^25.0.0` (peer and dev). 25.0.0 takes the letter cases from easel's `draw` entry (#159) and deletes `PART_CASES` and `PartCase`, which the blocks never used; it accepts efficient-shell 8. The blocks stay on efficient-shell `^7.75.0`. The package bundles the builder, so a host of the package moves nothing for it; a host that vendors `src/` (the storefront) installs efficient-web-builder 25 in the same pull request that takes this pin. Nothing a shopper sees moves: the 210-render sweep is byte for byte 0.44.0's.
|
|
6
|
+
- **`scripts/test-render-config.tsx` hands its child process the nodes in a file**, not on stdin. Through the tsx CLI's process the stdin pipe sometimes never reached the child's EOF, and the guard hung (1 run in 4 on this Mac). A 5-minute timeout turns any other hang into a failure. It now also names each drawing that throws on both sides (JJ 2026-10-20), so none is only a count: today BookingBox at its defaults and filled (it needs its parent's booking form), and Chart, Integrations, Mockup, SiteHeader and SiteFooter filled, each with and without a part style.
|
|
7
|
+
- **On efficient-shell 8 too**: the shell peer is `^7.75.0 || ^8.0.0` (`package/` too) and the dev copy `^8.0.0`, so a host on shell 8 (the admin portal) is in range and the guards run on 8. ⚠️ With shell 8.1.0 every uploaded image asks for a resized copy from the live copies host; a host that installs 8.1.0 allows that host in `img-src` first (efficient-shell 8.1.0).
|
|
8
|
+
- **ChatLauncher draws its one icon** (`ChatBubbleLeftRightIcon` from `efficient-shell/icons/efficient-glyphs`), not the by-name `Icon`, which on shell 7 pulls the 72 KB by-name kit map onto every page (JJ 2026-10-20). The markup is byte for byte the same (`data-icon` is kept). `CHAT_LAUNCHER_ICON` is gone (no reader). `scripts/test-render-side.ts` now treats `efficient-shell/icons` as editor-side; ThemedSelect (`placeMenu` from `efficient-shell/ui`) is the one named exception left.
|
|
9
|
+
|
|
10
|
+
## 0.44.0 — 2026-10-19
|
|
11
|
+
|
|
12
|
+
- **The source is two folders: `src/render/` and `src/editor/`** (keep editor code off shopper pages, 1d; efficient-web-builder 24). `src/render/` is what a published page draws from (490 files); `src/editor/` is what only the editor loads (108 files). Below its folder a file keeps its path, and `@/…` looks in both folders, so no import of a block changes. The builder is imported by package name and side (`efficient-web-builder/render/…`, `/format/…`, `/editor/…`), never by `@/…`. A host that vendors `src/` reads both folders: the storefront's alias lists them, and its Tailwind entry imports `src/render/app/globals.css`. Nothing a shopper or a merchant sees moves. The builder range is `^24.0.0` (peer and dev), and the easel range `^13.2.0` (peer and dev, `package/` too): `scripts/test-render-side.ts` reads easel's render group from its `entryGroups`, so the list has one home. The package bundles the builder, so a host of the package moves nothing for it; a host that vendors `src/` (the storefront) installs efficient-web-builder 24 in the same pull request that takes this pin.
|
|
13
|
+
- Four types moved to the render side, because a render file reads them: the picked-value shapes of the category, gallery and product-hero pickers (`lib/content/source-values.ts`, their one home; the pickers no longer re-export them), and `EditorCurrencyReason` (`components/EditorCurrencyNoticeContext`).
|
|
14
|
+
- Second names are gone, so each name has one home: `lib/puck/config` no longer re-exports `PAGE_BLOCKS_FROM_FOOTER` (read it from `lib/puck/footer-page-blocks`) or `SECTION_BG_BUILT_IN` (the builder's `format/lib/puck/blocks/general/section-bg-built-in`); `lib/links/link-rules` no longer re-exports `LinkFilters` and `LinkPickerPage` (the builder's `format/lib/links/link-picker-setup`); `lib/editor-currency-source` no longer re-exports `EditorCurrencyReason`. A guard that reads a file by its path names its folder: the old `src/components/…` alias of the source view is gone.
|
|
15
|
+
- The header draws on a published page through `headerRenderConfig()` (`lib/puck/render-config`); the editor's registry lays `HeaderSection` over it.
|
|
16
|
+
- Guards: `pnpm run typecheck:render` compiles `src/render/` alone (`tsconfig.render.json`, in verify and CI), and `scripts/test-render-side.ts` fails on a render file that names an editor file, imports an editor-side package by value, or is editor-only by its path. `scripts/test-boundary.mjs` fails on a file outside the two folders, or on one path in both.
|
|
17
|
+
|
|
18
|
+
- **"Switch to Box header" keeps the logo's colour choice.** The header's
|
|
19
|
+
"Reverse the Logo" switch (`reverse_logo`) is copied into the Box header's
|
|
20
|
+
Logo block as its "Logo color": off → As uploaded (`off`), on → Auto contrast
|
|
21
|
+
(`auto`). Before, every switched site got Auto contrast, so a logo the
|
|
22
|
+
merchant showed as uploaded was recoloured. A row with no answer stores
|
|
23
|
+
nothing and keeps the block's default, as before.
|
|
24
|
+
`scripts/test-box-header-reverse-logo.tsx` holds the three cases and that the
|
|
25
|
+
stored value reaches the drawn logo.
|
|
26
|
+
|
|
27
|
+
- **CollectionCard takes its text sizes from the builder's one copy** (SSOT batch 3; efficient-web-builder #160, in the blocks' `^23.2.0`). The card's five size classes (tag, name and its phone size, body, price, link) come from `COLLECTION_CARD_TEXT_SIZE` (`efficient-web-builder/format/lib/sections/collection-card-text-regions`), the same constant the panel's built-in sizes are made from. The five class strings are byte-identical, so nothing a shopper sees moves. `scripts/test-collection-card-text-regions.tsx` §3 now reads each region's class off the drawn card instead of the source, and fails when the card writes a `--size-*` class itself.
|
|
28
|
+
|
|
29
|
+
- **A US site's own shop labels are spelled in US English** (plan step C10 of the INOVIT and Hartes Metal US websites). The theme's `englishVariant` (`international` | `us`, sent by the backend) now reaches the shop: `EnglishVariantProvider` in `StorefrontProviders` (new optional prop `englishVariant`), read by `useEnglish()`. The filter rail (`PlpSidebar`) and the product hero's option rows draw their labels through it, so a US site says "Color" and "Center bore". The one UK -> US list is `src/lib/content/english-variant.ts` (`US_SPELLING`); `scripts/test-shop-words-one-place.ts` now holds it with the shop's other words, and fails when another file pairs a UK word with its US one. International sites render what they rendered before. Keys, catalogue data and a merchant's page text never change. ProductHeroPanel's disabled button also reads `STOCK_WORDS.outOfStock`, so the shop-words guard has no pending copies left.
|
|
30
|
+
|
|
31
|
+
- **One `tel:` link, one site column** (SSOT batch 3). ContactRouting builds a phone channel's link with the website builder's `phoneHref` (`efficient-web-builder/format/lib/links/phone-href`, efficient-web-builder #155); it keeps its own rule for whether a value looks like a phone number. Events takes `SITE_COLUMN` from `efficient-web-builder/format/lib/content/page-width` instead of its own copy of the class string (the same string). Nothing a shopper sees moves; one edge changes: a value that passes the phone test but holds no digit (only brackets, dots or dashes) gives no link instead of a bare `tel:`. `scripts/test-helpers-one-place.ts` §4 and §5 hold both; GalleryGrid and DynamicGalleryGrid keep their `SITE_COLUMN` copy until #77, which holds them, merges.
|
|
32
|
+
|
|
33
|
+
- **The blocks take `truthy` from the shell's one home** (SSOT batch 1; efficient-web-builder 23.2.0, efficient-shell 7.75.0). `commerce/page-rules` no longer writes its own `truthy`: SpecTable, ProductGrid and the page rules import it through `@/lib/puck/show-when`, the same function the email designer uses. The builder's R6 now fails on a second copy of any show-when helper of the shell's. Nothing a merchant sees moves. The ranges are `efficient-web-builder ^23.2.0` and `efficient-shell ^7.75.0`.
|
|
34
|
+
|
|
35
|
+
- **The last two hand-written hides are show-when rules** (SSOT batch 1, the B3 follow-up; efficient-web-builder 23.1.0). DetailRows' Image shape, a row inside each item of `rows`, reads the section's layout as `{ context: "node.layout", is: "narrow" }`: the builder hands the node to easel's item reader, so the block has no `resolveFields` any more. ProductHero's dynamic-page allow-list puts `OFF_DYNAMIC_PAGE` on every row of the resolved list it does not keep (`KEPT_ON_DYNAMIC_PAGE`), and the preview rows read the hero's own fact `previewsTemplateProduct` (`showWhenFacts`). The builder's show-when pass re-seats the tab strip, so the block no longer calls `reseatBucketTabs`. Nothing a merchant sees moves. `scripts/test-one-show-when.ts`'s `kept` list is empty, and its `ruleFloor` now counts the rules the blocks attach. The builder range is `^23.1.0`.
|
|
36
|
+
|
|
37
|
+
- **Shopper pages draw through a render-only registry** (keep editor code off shopper pages, B2). The published renderer (`lib/puck/render-client`) and the site's header and footer (`components/PublishedHeader`, `components/PublishedFooter`) drew through the editor's registry (`lib/puck/config`), so every page loaded every block's settings code, and the Hero's settings brought in the shell's whole icon map. They now draw through `lib/puck/render-config`: the builder's general render blocks, the commerce and service render modules, the three page blocks made from a footer block and the page root, finished with the passes' draw halves only. The editor's registry draws through the same two shared modules (`lib/puck/footer-page-blocks`, `lib/puck/storefront-root`), so neither drawing is written twice. Every block draws byte for byte as before. A host that imported `lib/puck/config` only to draw a page can import `renderConfig` from `lib/puck/render-config` instead.
|
|
38
|
+
- A commerce or service block's text parts (what a stored part style is matched against) are data now: `lib/puck/blocks/text-part-shapes.json`, written from the editor's registry by `scripts/write-text-part-shapes.ts`. Run it after a text row changes; the guard below fails until it has been.
|
|
39
|
+
- Guard: `scripts/test-render-config.tsx` draws every block at its defaults, filled, and with a part style through the render registry in a process of its own, and through the editor's registry: 420 drawings, byte for byte the same. That process must load no `lib/puck/config`, no block's fields module, no controls and no editor backend.
|
|
40
|
+
- On storefront #1704 (Lighthouse, CPU 4x on one machine) the home page's total blocking time falls from 241 ms to 204 ms with this alone. The rest is the shell's icon looks module (efficient-shell, one module per look).
|
|
41
|
+
|
|
42
|
+
- **The service blocks hide their rows by the shell's one show-when rule** (SSOT batch 1, B4). AppointmentBooking, BookingBox, Events, SubmitBox, SubmitBuild and Subscribe give each row a `showWhen` rule in place of a hand-written delete, rest-destructure or allow-list; the builder's one pass reads them. BookingBox and SubmitBox put the region rule on every row of the RESOLVED list, so the rows the passes add are held to the box as before. Subscribe's `cullSubscribeFields` becomes `withSubscribeContentRules`. Nothing a merchant sees moves. Events' Limit row reads `showAll` as the page does (truthy: only `false`, `0`, `""`, `null` or no value leave the cap in use), so a `showAll` of `1` hides it, as before. AppointmentBooking's comment now says what the code does: in the boxes layout all five rows go to the boxes, `successMessage` too. The files leave `scripts/test-one-show-when.ts`'s list.
|
|
43
|
+
|
|
44
|
+
- **The page-fact commerce blocks hide their rows by the shell's one show-when rule** (SSOT batch 1, B3). DetailRows, FitmentTable, GalleryB, ProductGrid, ProductHero and SpecTable read "a dynamic page" (the builder's `dynamicPage`), their own Dynamic switch (read as the old `if (dynamic)` read it) and "the page draws another record" (`drawsOtherRecord`, the blocks' fact in `showWhenFacts`) through rules (`lib/puck/blocks/commerce/page-rules.ts`). The allow-lists of a bound ProductGrid and SpecTable put the rule on every row of the resolved list. ProductGrid's early return off a dynamic page is kept, as rules (GG 2026-10-19). Nothing a merchant sees moves: 0 differences over 128,492 cases, pages that draw another record included. Still by hand, and named in `scripts/test-one-show-when.ts`: DetailRows' Image shape (a row inside each item, hidden by the section's layout) and ProductHero's dynamic-page allow-list (it must re-seat the tab strip after the cut).
|
|
45
|
+
|
|
46
|
+
- **Six commerce blocks hide their rows by the shell's one show-when rule** (SSOT batch 1, B2). CatalogFilterBar, FitmentFinder, Gallery, GalleryItem, ProductRef and RelatedProducts give each row a `showWhen` rule in place of a hand-written `resolveFields` delete; the builder's one pass reads them. Two panels now match the page for a value never stored (GG 2026-10-19): a filter bar with no `showLugs` shows the "no link while Lugs is on" note, because the bar draws the Lugs filter (`show?.lugs ?? true`); a Gallery with no `mode` shows the Preview tab row, because it draws both galleries (`mode = "both"`). A linked slug or a product code of only spaces now counts as empty. Nothing a shopper sees changes, and no stored value is written. Guards: `scripts/test-filter-bar-lugs-default.tsx`, `scripts/test-gallery-mode-default.tsx`; the six files leave `scripts/test-one-show-when.ts`'s list.
|
|
4
47
|
|
|
5
48
|
## 0.43.0 — 2026-10-19
|
|
6
49
|
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ the editor, the general sections and the renderer, with no storefront in it.
|
|
|
15
15
|
It is not a second copy of anything: `build.mjs` compiles this repository's
|
|
16
16
|
`src/` (the storefront's blocks, editor session and API client), starting at
|
|
17
17
|
`package/src/index.tsx`, against the `efficient-web-builder` npm package, and
|
|
18
|
-
draws the editor canvas with the site's own sheet (`src/app/globals.css`,
|
|
18
|
+
draws the editor canvas with the site's own sheet (`src/render/app/globals.css`,
|
|
19
19
|
through `package/canvas.css`). The storefront itself never installs it: it
|
|
20
20
|
vendors `src/` and its pages import the same source directly.
|
|
21
21
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{K as qt,L as _t,M as Dt,N as Ft,O as Mt,P as oe,Q as Se,R as Ut,S as Wt,T as Xe,U as $t,W as Ze,a as Lt,aa as Kt,b as Ot,
|
|
1
|
+
"use client";import{K as qt,L as _t,M as Dt,N as Ft,O as Mt,P as oe,Q as Se,R as Ut,S as Wt,T as Xe,U as $t,W as Ze,a as Lt,aa as Kt,b as Ot,ba as Yt,c as Tt,ca as zt,d as jt,ha as Bt,ia as Ht,la as Qe,na as K,w as qe}from"./chunk-TREIS6WP.js";import{j as je,p as pe,w as T}from"./chunk-NNJSIHWJ.js";import{a as Rt,c as te,ya as It}from"./chunk-BAR34RXF.js";import{r as At,s as Ce,t as H}from"./chunk-BG52UY3U.js";import{a as Je,b as or}from"./chunk-Y6SLVHK3.js";var Vt=Je((na,Gt)=>{"use strict";var ir="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Gt.exports=ir});var Qt=Je((ra,Zt)=>{"use strict";var sr=Vt();function Jt(){}function Xt(){}Xt.resetWarningCache=Jt;Zt.exports=function(){function t(a,o,s,l,d,p){if(p!==sr){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Xt,resetWarningCache:Jt};return n.PropTypes=n,n}});var tn=Je((ia,en)=>{"use strict";en.exports=Qt()();var aa,oa});import{useEffect as z,useMemo as Ye,useRef as se,useState as g}from"react";var P=or(tn(),1);import x from"react";function nn(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,a=Array(e);n<e;n++)a[n]=t[n];return a}function cr(t){if(Array.isArray(t))return t}function cn(t,e,n){return(e=fr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lr(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,o,s,l,d=[],p=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(p=(a=s.call(n)).done)&&(d.push(a.value),d.length!==e);p=!0);}catch(v){u=!0,o=v}finally{try{if(!p&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw o}}return d}}function ur(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function an(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rn(Object(n),!0).forEach(function(a){cn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function pr(t,e){if(t==null)return{};var n,a,o=dr(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)n=s[a],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function dr(t,e){if(t==null)return{};var n={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;n[a]=t[a]}return n}function ln(t,e){return cr(t)||lr(t,e)||gr(t,e)||ur()}function mr(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fr(t){var e=mr(t,"string");return typeof e=="symbol"?e:e+""}function et(t){"@babel/helpers - typeof";return et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},et(t)}function gr(t,e){if(t){if(typeof t=="string")return nn(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nn(t,e):void 0}}var j=function(e,n,a){var o=!!a,s=x.useRef(a);x.useEffect(function(){s.current=a},[a]),x.useEffect(function(){if(!o||!e)return function(){};var l=function(){if(s.current)return s.current.apply(s,arguments)};return e.on(n,l),function(){e.off(n,l)}},[o,n,e,s])},tt=function(e){var n=x.useRef(e);return x.useEffect(function(){n.current=e},[e]),n.current},de=function(e){return e!==null&&et(e)==="object"},yr=function(e){return de(e)&&typeof e.then=="function"},hr=function(e){return de(e)&&typeof e.elements=="function"&&typeof e.createToken=="function"&&typeof e.createPaymentMethod=="function"&&typeof e.confirmCardPayment=="function"},on="[object Object]",vr=function t(e,n){if(e===n)return!0;if(!de(e)||!de(n))return e===n;var a=Array.isArray(e),o=Array.isArray(n);if(a!==o)return!1;var s=Object.prototype.toString.call(e)===on,l=Object.prototype.toString.call(n)===on;if(s!==l)return!1;if(!s&&!a)return e===n;var d=Object.keys(e),p=Object.keys(n);if(d.length!==p.length)return!1;for(var u={},v=0;v<d.length;v+=1)u[d[v]]=!0;for(var b=0;b<p.length;b+=1)u[p[b]]=!0;var f=Object.keys(u);if(f.length!==d.length)return!1;var h=e,A=n,k=function(S){return t(h[S],A[S])};return f.every(k)},un=function(e,n,a){return de(e)?Object.keys(e).reduce(function(o,s){var l=!de(n)||!vr(e[s],n[s]);return a.includes(s)?(l&&console.warn("Unsupported prop change: options.".concat(s," is not a mutable property.")),o):l?an(an({},o||{}),{},cn({},s,e[s])):o},null):null},pn="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",sn=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pn;if(e===null||hr(e))return e;throw new Error(n)},br=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pn;if(yr(e))return{tag:"async",stripePromise:Promise.resolve(e).then(function(o){return sn(o,n)})};var a=sn(e,n);return a===null?{tag:"empty"}:{tag:"sync",stripe:a}},xr=function(e){!e||!e._registerWrapper||!e.registerAppInfo||(e._registerWrapper({name:"react-stripe-js",version:"6.12.0"}),e.registerAppInfo({name:"react-stripe-js",version:"6.12.0",url:"https://stripe.com/docs/stripe-js/react"}))},_e=x.createContext(null);_e.displayName="ElementsContext";var dn=function(e,n){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(n," in an <Elements> provider."));return e},rt=function(e){var n=e.stripe,a=e.options,o=e.children,s=x.useMemo(function(){return br(n)},[n]),l=x.useState(function(){return{stripe:s.tag==="sync"?s.stripe:null,elements:s.tag==="sync"?s.stripe.elements(a):null}}),d=ln(l,2),p=d[0],u=d[1];x.useEffect(function(){var f=!0,h=function(k){u(function(C){return C.stripe?C:{stripe:k,elements:k.elements(a)}})};return s.tag==="async"&&!p.stripe?s.stripePromise.then(function(A){A&&f&&h(A)}):s.tag==="sync"&&!p.stripe&&h(s.stripe),function(){f=!1}},[s,p,a]);var v=tt(n);x.useEffect(function(){v!==null&&v!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[v,n]);var b=tt(a);return x.useEffect(function(){if(p.elements){var f=un(a,b,["clientSecret","fonts"]);f&&p.elements.update(f)}},[a,b,p.elements]),x.useEffect(function(){xr(p.stripe)},[p.stripe]),x.createElement(_e.Provider,{value:p},o)};rt.propTypes={stripe:P.default.any,options:P.default.object};var mn=function(e){var n=x.useContext(_e);return dn(n,e)},fn=function(){var e=mn("calls useElements()"),n=e.elements;return n},kr=function(e){var n=e.children,a=mn("mounts <ElementsConsumer>");return n(a)};kr.propTypes={children:P.default.func.isRequired};var Cr=x.createContext(null);Cr.displayName="CheckoutContext";var gn=x.createContext(null);gn.displayName="CheckoutSdkContext";var nt=function(e){var n=x.useContext(gn),a=x.useContext(_e);if(n){if(a)throw new Error("You cannot wrap the part of your app that ".concat(e," in both a checkout provider and <Elements> provider."));return n}else return dn(a,e)},Sr=["mode"],wr=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},N=function(e,n,a){var o="".concat(wr(e),"Element"),s=function(u){var v=u.id,b=u.className,f=u.options,h=f===void 0?{}:f,A=u.onBlur,k=u.onFocus,C=u.onReady,S=u.onChange,F=u.onEscape,O=u.onClick,J=u.onLoadError,G=u.onLoaderStart,me=u.onNetworksChange,ne=u.onConfirm,Ne=u.onCancel,re=u.onShippingAddressChange,Ee=u.onShippingRateChange,fe=u.onSavedPaymentMethodRemove,Re=u.onSavedPaymentMethodUpdate,ge=u.onAvailablePaymentMethodsChange,Q=nt("mounts <".concat(o,">")),ee="elements"in Q?Q.elements:null,M="checkoutSdk"in Q?Q.checkoutSdk:null,ye=x.useState(null),ce=ln(ye,2),I=ce[0],he=ce[1],_=x.useRef(null),ae=x.useRef(null);j(I,"blur",A),j(I,"focus",k),j(I,"escape",F),j(I,"click",O),j(I,"loaderror",J),j(I,"loaderstart",G),j(I,"networkschange",me),j(I,"confirm",ne),j(I,"cancel",Ne),j(I,"shippingaddresschange",re),j(I,"shippingratechange",Ee),j(I,"savedpaymentmethodremove",fe),j(I,"savedpaymentmethodupdate",Re),j(I,"availablepaymentmethodschange",ge),j(I,"change",S);var U;C&&(e==="expressCheckout"?U=C:U=function(){C(I)}),j(I,"ready",U),x.useLayoutEffect(function(){if(_.current===null&&ae.current!==null&&(ee||M)){var w=null;if(M){var B=M,ve=M;switch(e){case"paymentForm":w=ve.createForm(h);break;case"payment":w=B.createPaymentElement(h);break;case"address":if("mode"in h){var be=h.mode,Be=pr(h,Sr);if(be==="shipping")w=B.createShippingAddressElement(Be);else if(be==="billing")w=B.createBillingAddressElement(Be);else throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":w=B.createExpressCheckoutElement(h);break;case"currencySelector":w=M.createCurrencySelectorElement();break;case"taxId":w=B.createTaxIdElement(h);break;case"contactDetails":w=B.createContactDetailsElement();break;case"linkSignup":if("createLinkSignupElement"in M)w=M.createLinkSignupElement(h);else throw new Error("<LinkSignupElement> requires <CheckoutElementsProvider> and is not supported inside <CheckoutFormProvider>.");break;case"terms":w=B.createTermsElement(h);break;default:throw new Error("<".concat(o,"> is not supported inside a checkout provider. Use an <Elements> provider instead."))}}else ee&&(w=ee.create(e,h));_.current=w,he(w),w&&w.mount(ae.current)}},[ee,M,h]);var le=tt(h);return x.useEffect(function(){if(_.current){var w=un(h,le,["paymentRequest"]);w&&"update"in _.current&&_.current.update(w)}},[h,le]),x.useLayoutEffect(function(){return function(){if(_.current&&typeof _.current.destroy=="function")try{_.current.destroy(),_.current=null}catch{}}},[]),x.createElement("div",{id:v,className:b,ref:ae})},l=function(u){nt("mounts <".concat(o,">"));var v=u.id,b=u.className;return x.createElement("div",{id:v,className:b})},d=n?l:s;return d.propTypes={id:P.default.string,className:P.default.string,onChange:P.default.func,onBlur:P.default.func,onFocus:P.default.func,onReady:P.default.func,onEscape:P.default.func,onClick:P.default.func,onLoadError:P.default.func,onLoaderStart:P.default.func,onNetworksChange:P.default.func,onConfirm:P.default.func,onCancel:P.default.func,onShippingAddressChange:P.default.func,onShippingRateChange:P.default.func,onSavedPaymentMethodRemove:P.default.func,onSavedPaymentMethodUpdate:P.default.func,onAvailablePaymentMethodsChange:P.default.func,options:P.default.object},d.displayName=o,d.__elementType=e,d},E=typeof window>"u",Pr=x.createContext(null);Pr.displayName="EmbeddedCheckoutProviderContext";var yn=function(){var e=nt("calls useStripe()"),n=e.stripe;return n},ca=N("auBankAccount",E),la=N("card",E),ua=N("cardNumber",E),pa=N("cardExpiry",E),da=N("cardCvc",E),ma=N("currencySelector",E),fa=N("iban",E),hn=N("payment",E),ga=N("expressCheckout",E),ya=N("paymentRequestButton",E),ha=N("linkAuthentication",E),va=N("linkSignup",E),ba=N("contactDetails",E),xa=N("address",E),ka=N("shippingAddress",E),Ca=N("paymentMethodMessaging",E),Sa=N("taxId",E),wa=N("issuingCardNumberDisplay",E),Pa=N("issuingCardCvcDisplay",E),Na=N("issuingCardExpiryDisplay",E),Ea=N("issuingCardPinDisplay",E),Ra=N("issuingCardCopyButton",E),Ia=N("terms",E);function Me(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Me=function(e){return typeof e}:Me=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(t)}var xn="dahlia",Nr=function(e){return e===3?"v3":e},kn="https://js.stripe.com",Er="".concat(kn,"/").concat(xn,"/stripe.js"),Rr=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Ir=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,vn="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Ar=function(e){return Rr.test(e)||Ir.test(e)},Lr=function(){for(var e=document.querySelectorAll('script[src^="'.concat(kn,'"]')),n=0;n<e.length;n++){var a=e[n];if(Ar(a.src))return a}return null},bn=function(e){var n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",a=document.createElement("script");a.src="".concat(Er).concat(n);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(a),a},Or=function(e,n){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"9.17.0",startTime:n})},we=null,De=null,Fe=null,Tr=function(e){return function(n){e(new Error("Failed to load Stripe.js",{cause:n}))}},jr=function(e,n){return function(){window.Stripe?e(window.Stripe):n(new Error("Stripe.js not available"))}},qr=function(e){return we!==null?we:(we=new Promise(function(n,a){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe&&e&&console.warn(vn),window.Stripe){n(window.Stripe);return}try{var o=Lr();if(o&&e)console.warn(vn);else if(!o)o=bn(e);else if(o&&Fe!==null&&De!==null){var s;o.removeEventListener("load",Fe),o.removeEventListener("error",De),(s=o.parentNode)===null||s===void 0||s.removeChild(o),o=bn(e)}Fe=jr(n,a),De=Tr(a),o.addEventListener("load",Fe),o.addEventListener("error",De)}catch(l){a(l);return}}),we.catch(function(n){return we=null,Promise.reject(n)}))},_r=function(e,n,a){if(e===null)return null;var o=n[0];if(typeof o!="string")throw new Error("Expected publishable key to be of type string, got type ".concat(Me(o)," instead."));var s=o.match(/^pk_test/),l=Nr(e.version),d=xn;s&&l!==d&&console.warn("Stripe.js@".concat(l," was loaded on the page, but @stripe/stripe-js@").concat("9.17.0"," expected Stripe.js@").concat(d,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var p=e.apply(void 0,n);return Or(p,a),p},Pe,Cn=!1,Sn=function(){return Pe||(Pe=qr(null).catch(function(e){return Pe=null,Promise.reject(e)}),Pe)};Promise.resolve().then(function(){return Sn()}).catch(function(t){Cn||console.warn(t)});var wn=function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];Cn=!0;var o=Date.now();return Sn().then(function(s){return _r(s,n,o)})};var Dr="sf:gclid",Fr="sf:fbclid",Mr=2160*60*60*1e3;function En(){return typeof window<"u"}function Pn(t){let e=Ce.getItem(t);if(!e)return"";try{let{v:n,t:a}=JSON.parse(e);return!n||typeof a!="number"||Date.now()-a>Mr?"":n}catch{return""}}function Nn(t){if(!En())return"";let e=t.replace(/([.$?*|{}()[\]\\/+^])/g,"\\$1"),n=document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]*)`));return n?decodeURIComponent(n[1]):""}function Rn(){if(!En())return{};let t=Pn(Dr),e=Pn(Fr),n=Nn("_fbp"),a=Nn("_fbc");!a&&e&&(a=`fb.1.${Date.now()}.${e}`);let o={};return t&&(o.gclid=t),e&&(o.fbclid=e),n&&(o.fbp=n),a&&(o.fbc=a),o}var In="sf:meta-purchases",Ur=20;function Ln(){return typeof window>"u"||window.parent!==window}function Wr(...t){try{if(Ln()||typeof window.fbq!="function")return;window.fbq(...t)}catch{}}var An=new Set;function $r(t){if(An.has(t))return!1;An.add(t);try{let e=JSON.parse(Ce.getItem(In)??"[]");if(e.includes(t))return!1;Ce.setItem(In,JSON.stringify([...e,t].slice(-Ur)))}catch{}return!0}function Kr(t){return[...new Set(t.filter(Se).flatMap(e=>e.components.map(n=>n.partNumber)))]}function On(t){let e=t.confirmation;Ln()||!$r(e.orderNumber)||Wr("track","Purchase",{value:Number(e.grandTotal),currency:e.currency,content_type:"product",content_ids:Kr(t.lines)},{eventID:e.orderNumber})}var at="checkout-afterpay-context",Ue="checkout-gocardless-context",ot="checkout-zip-context",We="checkout-klarna-context";function Yr({evidence:t,parked:e}){return t?{action:"capture",evidence:t,parked:e}:e?{action:"settle",parked:e}:{action:"ignore"}}function zr(t,e){let n=t.getItem(e);if(t.removeItem(e),!n)return null;try{return JSON.parse(n)}catch{return null}}var Tn={name:"Afterpay",legParam:"afterpay",legValues:["confirm","cancel"],storageKey:at,evidenceFrom(t,e){return e==="cancel"||(t.get("status")??"").toUpperCase()==="CANCELLED"?null:t.get("orderToken")},requestFrom:t=>({token:t})},jn={name:"Zip",legParam:"zip",legValues:["return"],storageKey:ot,evidenceFrom(t){let e=(t.get("result")??"").toLowerCase();return e==="cancelled"||e==="declined"?null:t.get("checkoutId")},requestFrom:t=>({checkoutId:t})};async function it(t,e){let n=new URLSearchParams(e.search),a=n.get(t.legParam);if(!a||!t.legValues.includes(a))return;let o=zr(e.storage,t.storageKey),s=t.evidenceFrom(n,a);e.scrubQuery();let l=Yr({evidence:s,parked:o});if(l.action!=="ignore"){if(e.page.clearCart(),l.action==="settle"){e.page.note(`The ${t.name} payment was not completed \u2014 our team will follow up on payment.`),e.page.land(l.parked.confirmation);return}e.page.setConfirming(!0);try{let d=await e.capture(t.requestFrom(l.evidence));d.status==="paid"?e.page.markPaid():e.page.note(`${t.name} declined the payment \u2014 our team will follow up on payment.`),e.page.land(l.parked?.confirmation??d)}catch{l.parked?(e.page.note(`We could not confirm the ${t.name} payment \u2014 our team will follow up on payment.`),e.page.land(l.parked.confirmation)):e.page.fail(`We could not confirm your ${t.name} payment. Please contact us before trying again \u2014 your payment may already have been taken.`)}finally{e.page.setConfirming(!1)}}}import{Fragment as q,jsx as r,jsxs as c}from"react/jsx-runtime";function qn(t){let e=t.indexOf(`
|
|
3
3
|
`);return e===-1?[t,""]:[t.slice(0,e),t.slice(e+1)]}function _n(t,{canParkContext:e}={canParkContext:!0}){let n=t.paymentMethods,a=[];return n.includes("card")&&a.push({key:"card",title:"Card",body:null,price:r("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"VISA \xB7 MC \xB7 AMEX"})}),n.includes("paypal")&&t.paypalClientId&&a.push({key:"paypal",title:"PayPal",body:null,price:r("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAYPAL \xB7 CARDS"})}),n.includes("afterpay")&&a.push({key:"afterpay",title:"Afterpay",body:null,price:r("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"4 \xD7 INTEREST-FREE"})}),n.includes("square")&&t.squareApplicationId&&t.squareLocationId&&a.push({key:"square",title:"Card (Square)",body:null,price:r("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"VISA \xB7 MC \xB7 AMEX"})}),n.includes("gocardless")&&e&&a.push({key:"gocardless",title:"Bank Direct Debit",body:null,price:r("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY BY BANK"})}),n.includes("zip")&&a.push({key:"zip",title:"Zip",body:null,price:r("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY IN 4"})}),n.includes("klarna")&&e&&a.push({key:"klarna",title:"Klarna",body:null,price:r("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-accent",children:"PAY LATER"})}),a.push({key:"bank",title:"Bank transfer",body:null,price:r("span",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Invoiced"})}),a}function lt({site:t,logo:e,preview:n=!1}){let{items:a,totals:o,coupon:s,refuseCoupon:l,deliveryOptions:d,shippingMethodId:p,setShippingMethodId:u,identify:v,clearCapturedCart:b}=Xe(),f=d.find(i=>i.id===p)?.pickupLocation??null,{country:h,countries:A,activeCountry:k,formatMoney:C}=oe(),[S,F]=g(()=>_n(t)[0].key),[O,J]=g(!0);z(()=>{J(At(H))},[]);let[G,me]=g(!1),[ne,Ne]=g(""),[re,Ee]=g(""),[fe,Re]=g(""),[ge,Q]=g(""),[ee,M]=g(""),[ye,ce]=g(""),[I,he]=g(""),[_,ae]=g(""),[U,le]=g(()=>h||A[0]?.code||""),[w,B]=g(""),[ve,be]=g([]),Wn=Ye(()=>A.find(i=>i.code===U)??k,[A,U,k])?.postalLabel||"Postal Code",$n=ve[0]?.divisionType||"State / Province";z(()=>{if(!U){be([]);return}let i=!1;return T.listCountrySubdivisions(U).then(m=>{i||(be(m),B(""))}),()=>{i=!0}},[U]);let[X,ut]=g(null),[pt,dt]=g([]),[Ie,Ae]=g("new"),[He,mt]=g(!1),[ft,Kn]=g("Home"),[gt,yt]=g(null),[W]=g(()=>Ht()),[Le,$]=g(null),[ht,xe]=g(null),[vt,Yn]=g(null),[zn,Bn]=g(!1),[Hn,Gn]=g(!1),[V,Ge]=g(null),[bt,ue]=g(!1),[xt,Z]=g(null),[Vn,Jn]=g(!1),[Xn,kt]=g(!1),[Zn,Qn]=g(!1),[er,Ct]=g(!1),St=se(!1);z(()=>{n||St.current||!a.some(Se)||(St.current=!0,qt({lines:a,currency:o.currency,value:o.subtotal-o.discount,coupon:s?.valid?s.code:void 0}))},[a,o,s,n]),z(()=>{v(ne,re.trim()||void 0)},[ne,re,v]);let wt=se(null),[Oe,tr]=g(null);z(()=>{let i=wt.current;if(!Oe||!i)return;let m=()=>i.style.setProperty("--sf-checkout-header-h",`${Oe.offsetHeight}px`);m();let y=new ResizeObserver(m);return y.observe(Oe),()=>y.disconnect()},[Oe]),z(()=>{let i=y=>({setConfirming:y,land:$,markPaid:()=>ue(!0),note:Z,fail:xe,clearCart:b}),m={search:window.location.search,storage:H,scrubQuery:()=>window.history.replaceState(null,"",window.location.pathname)};it(Tn,{...m,capture:T.captureAfterpayPayment,page:i(Jn)}),it(jn,{...m,capture:T.captureZipPayment,page:i(Qn)})},[]),z(()=>{let m=new URLSearchParams(window.location.search).get("gocardless");if(m!=="confirm"&&m!=="cancel")return;let y=H.getItem(Ue);if(H.removeItem(Ue),window.history.replaceState(null,"",window.location.pathname),!y)return;let R;try{R=JSON.parse(y)}catch{return}if(b(),m==="cancel"){Z("The direct debit was not set up \u2014 our team will follow up on payment."),$(R.confirmation);return}kt(!0),T.completeGocardlessPayment({idempotencyKey:R.idempotencyKey}).then(L=>{L.status==="paid"?ue(!0):L.status==="declined"?Z("The direct debit was declined \u2014 our team will follow up on payment."):Z("Your direct debit is set up \u2014 the payment is collecting and will clear in a few days.")}).catch(()=>{Z("We could not confirm the direct debit \u2014 our team will follow up on payment.")}).finally(()=>{$(R.confirmation),kt(!1)})},[]),z(()=>{let i=new URLSearchParams(window.location.search),m=i.get("klarna");if(m!=="confirm"&&m!=="cancel")return;let y=H.getItem(We);H.removeItem(We);let R=i.get("authorization_token");if(window.history.replaceState(null,"",window.location.pathname),!y)return;let L;try{L=JSON.parse(y)}catch{return}if(b(),m==="cancel"||!R){Z("The Klarna payment was not completed \u2014 our team will follow up on payment."),$(L.confirmation);return}Ct(!0),T.captureKlarnaPayment({idempotencyKey:L.idempotencyKey,authorizationToken:R}).then(D=>{D.status==="paid"?ue(!0):D.status==="declined"?Z("Klarna declined the payment \u2014 our team will follow up on payment."):Z("Your Klarna payment is being reviewed \u2014 we'll confirm the outcome shortly.")}).catch(()=>{Z("We could not confirm the Klarna payment \u2014 our team will follow up on payment.")}).finally(()=>{$(L.confirmation),Ct(!1)})},[]);function Pt(i){let[m,y]=qn(i.address);Q(m),M(y),ce(i.city),he(i.zip_code),i.country&&le(i.country),i.phone&&ae(i.phone)}z(()=>{let i=!1;return(async()=>{try{let[m,y,R]=await Promise.all([pe.me(),pe.myProfile().catch(()=>null),pe.myAddresses().catch(()=>[])]);if(i)return;ut(m);let L=R.filter(ke=>ke.is_active);dt(L),Ne(m.email);let D=(y?.contact_name??"").split(/\s+/);Ee(m.first_name||D[0]||""),Re(m.last_name||D.slice(1).join(" "));let Et=m.phone||y?.phone;Et&&ae(Et);let Ve=L.find(ke=>ke.id===m.default_delivery_location)??L[0];if(Ve)Ae(Ve.id),Pt(Ve);else if(y){let[ke,ar]=qn(y.address??"");Q(ke),M(ar),ce(y.city??""),he(y.zip_code??""),y.country&&le(y.country)}}catch{}})(),()=>{i=!0}},[]);function nr(){pe.logout(),ut(null),dt([]),Ae("new"),mt(!1)}let Te=Ye(()=>_n(t,{canParkContext:O}),[t,O]);z(()=>{Te.some(i=>i.key===S)||F(Te[0].key)},[Te,S]);let Nt=ee.trim()?`${ge}
|
|
4
|
-
${ee.trim()}`:ge;async function rr(){if(n||G||a.length===0||o.repricing)return;let i=a.filter(Se).flatMap(m=>jt(m.components,m.qty));if(i.length===0){xe("Pick a size on each wheel's product page before checking out.");return}me(!0),xe(null);try{let y=await(X?T.createOrderAuthed:T.createOrder)({customer:{email:ne,name:`${re} ${fe}`.trim(),phone:_.trim()||void 0,address:Nt,city:ye,state:w||void 0,zipCode:I,country:U},items:i,currency:o.currency,idempotencyKey:W,shippingMethodId:p??void 0,couponCode:Ot(s),...Rn()});if(_t({confirmation:y,lines:a,adsSendTo:t.googleAdsId&&t.googleAdsConversionLabel?`${t.googleAdsId}/${t.googleAdsConversionLabel}`:null}),On({confirmation:y,lines:a}),b(),X&&He&&Ie==="new")try{await pe.createAddress({label:ft.trim()||"Home",contact_name:`${re} ${fe}`.trim(),phone:_.trim(),address:Nt,city:ye,zip_code:I,country:U}),yt("Address saved to your account.")}catch{yt("We couldn't save the address to your account \u2014 you can add it under Account \u2192 Addresses.")}if(S==="card"&&t.paymentMethods.includes("card")){let R=await T.createPaymentIntent({idempotencyKey:W});Ge(y),Yn(R)}else if(S==="paypal"&&t.paymentMethods.includes("paypal"))Ge(y),Bn(!0);else if(S==="afterpay"&&t.paymentMethods.includes("afterpay")){let R=window.location.origin,L=await T.createAfterpayCheckout({idempotencyKey:W,confirmUrl:`${R}/checkout?afterpay=confirm`,cancelUrl:`${R}/checkout?afterpay=cancel`}),D={idempotencyKey:W,confirmation:y};H.setItem(at,JSON.stringify(D)),window.location.assign(L.redirectCheckoutUrl);return}else if(S==="square"&&t.paymentMethods.includes("square"))Ge(y),Gn(!0);else if(S==="gocardless"&&t.paymentMethods.includes("gocardless")){let R=window.location.origin,L=await T.createGocardlessBillingRequest({idempotencyKey:W,confirmUrl:`${R}/checkout?gocardless=confirm`,cancelUrl:`${R}/checkout?gocardless=cancel`}),D={idempotencyKey:W,confirmation:y};H.setItem(Ue,JSON.stringify(D)),window.location.assign(L.authorisationUrl);return}else if(S==="zip"&&t.paymentMethods.includes("zip")){let R=window.location.origin,L=await T.createZipCheckout({idempotencyKey:W,redirectUrl:`${R}/checkout?zip=return`}),D={idempotencyKey:W,confirmation:y};H.setItem(ot,JSON.stringify(D)),window.location.assign(L.redirectUrl);return}else if(S==="klarna"&&t.paymentMethods.includes("klarna")){let R=window.location.origin,L=await T.createKlarnaCheckout({idempotencyKey:W,confirmUrl:`${R}/checkout?klarna=confirm`,cancelUrl:`${R}/checkout?klarna=cancel`}),D={idempotencyKey:W,confirmation:y};H.setItem(We,JSON.stringify(D)),window.location.assign(L.redirectUrl);return}else $(y)}catch(m){let y=Tt(m);y?(l(y),xe(`${y} Your order has not been placed. Place it again to continue without the code.`)):xe(m instanceof je?m.message:"Could not place the order. Please try again."),me(!1)}}return Le?c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[r("h1",{className:"font-display text-3xl",children:bt?"Payment received":"Order received"}),c("p",{className:"text-fg-dim",children:[bt?c(q,{children:["Thank you \u2014 your payment for order"," ",r("span",{className:"font-mono text-fg",children:Le.orderNumber})," has gone through."," "]}):c(q,{children:["Thank you \u2014 your order ",r("span",{className:"font-mono text-fg",children:Le.orderNumber})," is being reviewed by our team."," "]}),X?c(q,{children:["Track it under"," ",r(te,{href:"/account/orders",className:"text-accent underline",children:"your orders"}),"."]}):r(q,{children:"We\u2019ve emailed you a link to set a password and track it."})]}),xt&&r("p",{className:"text-sm text-fg-dim",children:xt}),gt&&r("p",{className:"text-sm text-fg-dim",children:gt}),!X&&c("p",{className:"text-sm text-fg-dim",children:["You can also"," ",r(te,{href:`/track?order=${encodeURIComponent(Le.orderNumber)}`,className:"text-accent underline",children:"track this order"})," ","anytime with just your order number and email \u2014 no password needed."]}),r(te,{href:"/wheels",className:"mt-2 border-2 border-line px-6 py-3 font-mono text-[12px] uppercase tracking-[0.24em] hover:border-accent",children:"Continue browsing"})]}):Vn?c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[r("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),r("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Afterpay \u2014 one moment."})]}):Xn?c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[r("h1",{className:"font-display text-3xl",children:"Setting up your direct debit\u2026"}),r("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Confirming with GoCardless \u2014 one moment."})]}):Zn?c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[r("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),r("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Zip \u2014 one moment."})]}):er?c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[r("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),r("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Klarna \u2014 one moment."})]}):vt?r(Br,{payment:vt,onPaid:()=>{ue(!0),$(V)},onSkip:()=>$(V)}):zn&&V?r(Vr,{confirmation:V,clientId:t.paypalClientId??"",idemKey:W,onPaid:()=>{ue(!0),$(V)},onSkip:()=>$(V)}):Hn&&V?r(Xr,{confirmation:V,applicationId:t.squareApplicationId??"",locationId:t.squareLocationId??"",environment:t.squareEnvironment??"production",idemKey:W,onPaid:()=>{ue(!0),$(V)},onSkip:()=>$(V)}):c("div",{ref:wt,className:"bg-bg text-fg",children:[c("header",{ref:tr,className:"sticky top-0 z-30 grid grid-cols-[1fr_auto_1fr] items-center gap-8 border-b border-line px-[var(--sf-site-gutter,40px)] py-6 backdrop-blur-md max-[640px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[640px]:py-4",style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:[c(te,{href:"/",className:"inline-flex items-center gap-3 font-mono text-[13px] uppercase tracking-[0.26em] text-fg-dim transition-colors hover:text-accent",children:["\u2190",r("span",{className:"max-[640px]:hidden",children:"Back to shop"})]}),r(te,{href:"/","aria-label":`${t.name} home`,className:"inline-flex items-center justify-center",children:r(Kt,{variant:"header",scrolled:!0,src:e?.url??null,reverse:e?.reverse??!1,reversedSrc:e?.reversed??null,inkIsDark:e?.inkIsDark??null,size:e?.size??"medium",sizePx:e?.sizePx??null,siteName:t.name})}),t.cardPayments?c("span",{className:"flex items-center justify-end gap-3 font-mono text-[12px] uppercase tracking-[0.26em] text-fg-dim",children:[r("span",{className:"text-green",children:"\u25CF"}),r("span",{className:"max-[640px]:hidden",children:"Encrypted \xB7"})," Stripe"]}):r("span",{})]}),c("section",{className:"mx-auto flex max-w-[var(--sf-site-width,1600px)] flex-wrap items-center justify-between gap-x-8 gap-y-3 border-b border-line bg-surface px-[var(--sf-site-gutter,40px)] py-4 font-mono text-[13px] font-medium uppercase tracking-[0.24em] text-fg max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]",children:[r("span",{className:"inline-flex items-center bg-accent px-3 py-1 font-bold text-bg",children:"Checkout"}),r("nav",{"aria-label":"Checkout steps",className:"flex flex-wrap items-center gap-5",children:[{n:"01",label:"Cart",state:"done"},{n:"02",label:"Ship & pay",state:"active"},{n:"03",label:"Confirmed",state:"pending"}].map(i=>c("span",{className:["relative flex items-center gap-2 transition-colors",i.state==="pending"?"text-fg-dim":"text-fg",i.state==="active"?"font-bold after:absolute after:inset-x-0 after:-bottom-1 after:h-[2px] after:bg-accent":""].join(" "),children:[r("span",{className:i.state==="done"?"text-accent font-bold":"",children:i.n}),r("span",{children:i.label})]},i.n))})]}),c("main",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[1fr_420px] items-start gap-16 px-[var(--sf-site-gutter,40px)] pt-10 pb-[100px] max-[1100px]:grid-cols-1 max-[1100px]:gap-10 max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:pt-8 max-[1100px]:pb-20",children:[c("div",{children:[c($e,{num:"N\xB0 01",title:"Contact",children:[r(K,{label:"Email",hint:X?c(q,{children:["Signed in \xB7"," ",r("button",{type:"button",onClick:nr,className:"underline transition-colors hover:text-accent",children:"Not you? Sign out"})]}):void 0,children:r("input",{type:"email",value:ne,onChange:i=>Ne(i.target.value),placeholder:"you@example.com",readOnly:X!==null,className:Y+(X?" opacity-70":"")})}),c(Fn,{children:[r(K,{label:"First name",children:r("input",{type:"text",value:re,onChange:i=>Ee(i.target.value),className:Y})}),r(K,{label:"Last name",children:r("input",{type:"text",value:fe,onChange:i=>Re(i.target.value),className:Y})})]})]}),c($e,{num:"N\xB0 02",title:f?"Collection":"Shipping address",children:[f?c("div",{className:"grid gap-2 text-[14px] leading-[1.6]",children:[r("span",{className:"font-medium",children:f.name}),[f.address,f.city,f.state,f.zipCode,f.country].filter(Boolean).length>0&&r("span",{className:"opacity-80",children:[f.address,f.city,f.state,f.zipCode,f.country].filter(Boolean).join(", ")}),f.openingHours&&r("span",{className:"opacity-80",children:f.openingHours}),f.instructions&&r("span",{className:"opacity-80",children:f.instructions}),r("span",{className:"mt-1 font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"No delivery address needed"})]}):c(q,{children:[X!==null&&pt.length>0&&c("div",{className:"grid gap-3",children:[pt.map(i=>r(Ke,{active:Ie===i.id,onClick:()=>{Ae(i.id),Pt(i)},title:i.label,body:i.formatted_address,price:null},i.id)),r(Ke,{active:Ie==="new",onClick:()=>Ae("new"),title:"New address",body:null,price:null})]}),r(K,{label:"Address line 1",children:r("input",{type:"text",value:ge,onChange:i=>Q(i.target.value),className:Y})}),r(K,{label:"Address line 2",children:r("input",{type:"text",value:ee,onChange:i=>M(i.target.value),placeholder:"Apartment, unit, garage bay\u2026",className:Y})}),c(Fn,{cols:"three",children:[r(K,{label:"City",children:r("input",{type:"text",value:ye,onChange:i=>ce(i.target.value),className:Y})}),r(K,{label:Wn,children:r("input",{type:"text",value:I,onChange:i=>he(i.target.value),className:Y})}),r(K,{label:"Country",separate:!0,children:r(Qe,{value:U,onChange:i=>le(i.target.value),className:Y+" pr-10",style:Dn,children:A.map(i=>r("option",{value:i.code,children:i.name},i.code))})})]}),r(K,{label:$n,separate:!0,children:ve.length>0?c(Qe,{value:w,onChange:i=>B(i.target.value),className:Y+" pr-10",style:Dn,children:[r("option",{value:"",children:"Select\u2026"}),ve.map(i=>r("option",{value:i.code||i.name,children:i.name},i.code||i.name))]}):r("input",{type:"text",value:w,onChange:i=>B(i.target.value),className:Y})})]}),r(K,{label:"Phone",children:r("input",{type:"tel",value:_,onChange:i=>ae(i.target.value),placeholder:"+44 7700 900000",className:Y})}),!f&&X!==null&&Ie==="new"&&c(q,{children:[r(Zr,{checked:He,onChange:mt,label:"Save this address to my account"}),He&&r(K,{label:"Address label",children:r("input",{type:"text",value:ft,onChange:i=>Kn(i.target.value),placeholder:"Home",className:Y})})]})]}),r($e,{num:"N\xB0 03",title:"Shipping",children:c("div",{className:"grid gap-3",children:[d.map(i=>{let m=i.pickupLocation,y=m?[m.address,m.city,m.state,m.zipCode].filter(Boolean).join(", "):null;return r(Ke,{active:p===i.id,onClick:()=>u(i.id),title:m?`${i.name} \u2014 ${m.name}`:i.name,body:m?[y,m.openingHours,m.instructions,i.description].filter(Boolean).join(" \xB7 "):i.description||null,price:o.freeShipping||i.amount===0?qe:C(i.amount,o.currency),tag:i.tag||void 0},i.id)}),d.length===0&&r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Shipping is arranged after your order is reviewed."})]})}),c($e,{num:"N\xB0 04",title:"Payment",children:[r("div",{className:"grid gap-3",children:Te.map(i=>r(Ke,{active:S===i.key,onClick:()=>F(i.key),title:i.title,body:i.body,price:i.price,tag:i.tag},i.key))}),S==="card"?r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll enter card details on the secure payment step after placing the order."}):S==="paypal"?r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll approve the payment with PayPal on the payment step after placing the order."}):S==="afterpay"?r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Afterpay to approve four interest-free payments, then brought straight back."}):S==="square"?r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll enter card details on the secure payment step after placing the order."}):S==="gocardless"?r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll set up a bank direct debit with GoCardless, then be brought straight back. Direct debits clear in a few days."}):S==="zip"?r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Zip to approve four instalments, then brought straight back."}):S==="klarna"?r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Klarna to choose how to pay, then brought straight back."}):r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Our team emails you the invoice and bank details after review."})]})]}),c("aside",{className:"sticky top-[var(--sf-checkout-header-h,88px)] border border-line max-[1100px]:static",style:{background:"linear-gradient(180deg, color-mix(in oklab, var(--site-surface) 70%, var(--bg)) 0%, var(--bg) 100%)"},children:[c("header",{className:"flex items-center justify-between border-b border-accent bg-accent px-6 py-4 font-mono text-[13px] font-bold uppercase tracking-[0.28em] text-bg",children:[r("span",{children:"Your order"}),r(te,{href:"/wheels",className:"text-bg/80 transition-colors hover:text-bg",children:"Edit \u2197"})]}),r("div",{className:"flex flex-col px-6 py-2",children:a.length===0?c("div",{className:"py-8 text-center font-serif text-[16px] italic leading-[1.5] text-fg-dim",children:["Your cart is empty. ",r(te,{href:"/wheels",className:"text-accent underline-offset-4 hover:underline",children:"Browse the catalog \u2192"})]}):a.map(i=>r(Qr,{slug:i.slug,name:i.name,qty:i.qty,config:i.config,configSummary:ea(i.config),price:Ut(i,o.currency)??0,currency:o.currency},i.id))}),r("div",{className:"border-t border-line px-6 pt-5",children:r(Bt,{customerEmail:ne})}),c("div",{className:"flex flex-col gap-2 border-t border-line mt-5 px-6 pt-5",children:[r(ie,{label:"Subtotal",value:C(o.subtotal,o.currency)}),o.discount>0&&s?.valid&&r(ie,{label:`Coupon \xB7 ${s.code}`,value:c("span",{className:"font-semibold text-green",children:["\u2212 ",C(o.discount,o.currency)]})}),s?.deferred&&r(ie,{label:`Coupon \xB7 ${s.code}`,value:Lt}),s?.valid&&s.effects?.gift&&r(ie,{label:`Free gift \xB7 ${s.effects.gift.partNumber}${s.effects.gift.quantity>1?` \xD7${s.effects.gift.quantity}`:""}`,value:r("span",{className:"font-semibold text-green",children:qe})}),r(ie,{label:"Shipping",value:o.shippingStatus==="free"?r("span",{className:"font-semibold text-green",children:qe}):Ft(o.shippingStatus)??C(o.shipping,o.currency)}),o.tax&&(o.tax.charged?r(ie,{label:o.tax.inclusive?`${o.tax.name} included \xB7 ${o.tax.rate}%`:o.tax.name,value:C(o.tax.amount,o.currency)}):o.tax.name?r(ie,{label:o.tax.name,value:Dt}):null)]}),c("div",{className:"mt-4 flex items-end justify-between border-y-2 border-accent px-6 py-4",style:{background:"color-mix(in oklab, var(--accent) 10%, var(--bg))"},children:[r("span",{className:"font-display text-[20px] font-bold uppercase tracking-[0.04em] text-fg",children:"Total"}),r("span",{className:"text-right font-display text-[34px] font-bold leading-none tracking-[-0.025em] text-fg",children:o.repricing?"\u2026":C(o.grand,o.currency)})]}),c("div",{className:"flex flex-col gap-3 px-6 pt-5 pb-6",children:[ht&&r("p",{className:"border border-red-300 bg-red-50 px-3 py-2 text-[13px] text-red-700",children:ht}),o.hasUnpricedLine&&c("p",{className:"border border-amber-300 bg-amber-50 px-3 py-2 text-[13px] text-amber-800",children:["One or more items have no price in ",o.currency,". Remove them, or switch region, to continue."]}),r("button",{type:"button",onClick:rr,disabled:G||a.length===0||o.hasUnpricedLine||o.repricing,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",a.length===0||G||o.hasUnpricedLine||o.repricing?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:G?c(q,{children:["Building order\u2026 ",r("span",{children:"\xB7"})]}):o.repricing?c(q,{children:["Updating total\u2026 ",r("span",{children:"\xB7"})]}):c(q,{children:[S==="bank"?"Place order":"Continue to payment"," \xB7"," ",C(o.grand,o.currency),r("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})})]})]})]}),r("footer",{className:"flex flex-wrap items-center justify-between gap-4 border-t border-line px-[var(--sf-site-gutter,40px)] py-6 font-mono text-[12px] uppercase tracking-[0.22em] text-fg-dim max-[640px]:px-[min(20px,var(--sf-site-gutter,40px))]",children:r("span",{children:$t({legalName:t.legalName,foundedYear:t.foundedYear,siteName:t.name})})})]})}var Y="w-full border-2 border-line bg-bg px-4 py-4 font-display text-[17px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent",Dn={backgroundImage:"linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%)",backgroundPosition:"calc(100% - 18px) 50%, calc(100% - 12px) 50%",backgroundSize:"6px 6px",backgroundRepeat:"no-repeat"};function $e({num:t,title:e,children:n}){return c("section",{className:"mb-6 border border-line bg-bg",children:[c("header",{className:"flex items-center gap-4 border-b border-line bg-surface px-6 py-4",children:[r("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:t}),r("h2",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:e})]}),r("div",{className:"flex flex-col gap-4 px-6 py-6",children:n})]})}function Fn({cols:t="two",children:e}){return r("div",{className:["grid gap-3 max-[640px]:grid-cols-1",t==="two"?"grid-cols-2":"grid-cols-[1.2fr_1fr_1fr]"].join(" "),children:e})}function Ke({active:t,onClick:e,title:n,body:a,price:o,tag:s}){return c("button",{type:"button",onClick:e,"aria-pressed":t,className:["relative grid grid-cols-[auto_1fr_auto] items-center gap-5 border bg-bg px-6 py-5 text-left transition-colors",t?"border-accent outline outline-1 outline-accent -outline-offset-1":"border-line hover:border-[color-mix(in_oklab,var(--accent)_50%,var(--site-line))]"].join(" "),style:t?{background:"color-mix(in oklab, var(--accent) 14%, var(--bg))"}:void 0,children:[t&&r("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-[3px] bg-accent"}),r("span",{className:["flex h-[18px] w-[18px] items-center justify-center rounded-full border-2",t?"border-accent":"border-fg-dim"].join(" "),children:t&&r("span",{className:"block h-2.5 w-2.5 rounded-full bg-accent"})}),c("span",{className:"flex min-w-0 flex-col gap-1",children:[c("span",{className:"flex flex-wrap items-baseline gap-3 font-display text-[18px] font-medium tracking-[-0.01em] text-fg",children:[n,s&&r("span",{className:"border px-2 py-0.5 font-mono text-[11px] font-normal uppercase tracking-[0.24em] text-accent",style:{background:"color-mix(in oklab, var(--accent) 14%, transparent)",borderColor:"color-mix(in oklab, var(--accent) 45%, var(--site-line))"},children:s})]}),a&&r("span",{className:"font-mono text-[12px] uppercase tracking-[0.22em] text-fg-dim",children:a})]}),r("span",{className:"whitespace-nowrap font-display text-[18px] font-medium tracking-[-0.01em] text-fg",children:o})]})}function Br({payment:t,onPaid:e,onSkip:n}){let{formatMoney:a}=oe(),o=Ye(()=>wn(t.publishableKey),[t.publishableKey]),s=Ye(()=>{if(typeof document>"u")return;let l=getComputedStyle(document.documentElement),d=(u,v)=>l.getPropertyValue(u).trim()||v,p=document.documentElement.getAttribute("data-theme")!=="light";return{theme:p?"night":"stripe",variables:{colorPrimary:d("--accent",p?"#c9a461":"#8a6a2a"),colorBackground:d("--site-surface",p?"#131313":"#ffffff"),colorText:d("--fg",p?"#f5f1e8":"#0a0a0a"),borderRadius:"0px"}}},[]);return r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:c("div",{className:"w-full max-w-xl border border-line bg-bg",children:[c("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[r("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:t.orderNumber}),r("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Payment"})]}),c("div",{className:"flex flex-col gap-4 px-6 py-6",children:[c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",r("span",{className:"text-fg",children:a(Number(t.amount),t.currency)})," ","by card to confirm it now."]}),r(rt,{stripe:o,options:{clientSecret:t.clientSecret,appearance:s},children:r(Hr,{payment:t,onPaid:e,onSkip:n})})]})]})})}function Hr({payment:t,onPaid:e,onSkip:n}){let{formatMoney:a}=oe(),o=yn(),s=fn(),[l,d]=g(!1),[p,u]=g(null);async function v(){if(!o||!s||l)return;d(!0),u(null);let b=await o.confirmPayment({elements:s,redirect:"if_required"});if(b.error){u(b.error.message??"Payment failed. Please try again."),d(!1);return}let f=b.paymentIntent?.status;if(f==="succeeded"||f==="processing"){e();return}u("Payment did not complete. Please try again."),d(!1)}return c("div",{className:"flex flex-col gap-4",children:[r(hn,{}),p&&r("p",{className:"border border-red-300 bg-red-50 px-3 py-2 text-[13px] text-red-700",children:p}),r("button",{type:"button",onClick:v,disabled:!o||!s||l,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!o||!s||l?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:l?c(q,{children:["Processing\u2026 ",r("span",{children:"\xB7"})]}):c(q,{children:["Pay ",a(Number(t.amount),t.currency),r("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})}),r("button",{type:"button",onClick:n,disabled:l,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later \u2014 our team will be in touch"})]})}var Mn="paypal-sdk-js",st=null;function Gr(t,e){let n=`${t}|${e}`;if(st?.key===n)return st.promise;let a=new Promise((o,s)=>{document.getElementById(Mn)?.remove();let l=document.createElement("script");l.id=Mn;let d=new URLSearchParams({"client-id":t,currency:e,intent:"capture"});l.src=`https://www.paypal.com/sdk/js?${d}`,l.onload=()=>{let p=window.paypal;p?o(p):s(new Error("PayPal SDK loaded without its namespace"))},l.onerror=()=>s(new Error("PayPal SDK failed to load")),document.head.appendChild(l)});return st={key:n,promise:a},a}function Vr({confirmation:t,clientId:e,idemKey:n,onPaid:a,onSkip:o}){let{formatMoney:s}=oe(),l=se(null),[d,p]=g(!1),[u,v]=g(null),b=se(a);return b.current=a,z(()=>{let f=!1,h=null;return Gr(e,t.currency).then(A=>{if(!(f||!l.current))return h=A.Buttons({style:{layout:"vertical",color:"gold",shape:"rect",label:"paypal"},createOrder:async()=>(await T.createPaypalOrder({idempotencyKey:n})).paypalOrderId,onApprove:async k=>{try{if((await T.capturePaypalOrder({idempotencyKey:n,paypalOrderId:k.orderID})).status==="paid"){b.current();return}v("PayPal did not complete the payment. Please try again.")}catch(C){v(C instanceof je?C.message:"PayPal payment failed. Please try again.")}},onError:()=>{v("PayPal could not process the payment. Please try again.")}}),h.render(l.current).then(()=>{f||p(!0)})}).catch(()=>{f||v("PayPal could not be loaded. You can pay later \u2014 your order stands either way.")}),()=>{f=!0,h?.close?.()}},[e,t.currency,n]),r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:c("div",{className:"w-full max-w-xl border border-line bg-bg",children:[c("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[r("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:t.orderNumber}),r("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"PayPal"})]}),c("div",{className:"flex flex-col gap-4 px-6 py-6",children:[c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",r("span",{className:"text-fg",children:s(Number(t.grandTotal),t.currency)})," ","with PayPal to confirm it now."]}),!d&&!u&&r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading PayPal\u2026"}),r("div",{ref:l}),u&&r("p",{className:"border border-red-300 bg-red-50 px-3 py-2 text-[13px] text-red-700",children:u}),r("button",{type:"button",onClick:o,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later \u2014 our team will be in touch"})]})]})})}var Un="square-web-sdk",ct=null;function Jr(t){let e=t==="sandbox"?"sandbox":"production";if(ct?.key===e)return ct.promise;let n=new Promise((a,o)=>{document.getElementById(Un)?.remove();let s=document.createElement("script");s.id=Un,s.src=e==="sandbox"?"https://sandbox.web.squarecdn.com/v1/square.js":"https://web.squarecdn.com/v1/square.js",s.onload=()=>{let l=window.Square;l?a(l):o(new Error("Square SDK loaded without its namespace"))},s.onerror=()=>o(new Error("Square SDK failed to load")),document.head.appendChild(s)});return ct={key:e,promise:n},n}function Xr({confirmation:t,applicationId:e,locationId:n,environment:a,idemKey:o,onPaid:s,onSkip:l}){let{formatMoney:d}=oe(),p=se(null),u=se(null),v=se(null),[b,f]=g(!1),[h,A]=g(!1),[k,C]=g(null);z(()=>{let F=!1,O=null;return Jr(a).then(async J=>{if(F||!p.current)return;let G=J.payments(e,n);v.current=G,O=await G.card(),await O.attach(p.current),u.current=O,F||f(!0)}).catch(()=>{F||C("Square could not be loaded. You can pay later \u2014 your order stands either way.")}),()=>{F=!0,O?.destroy?.()}},[e,n,a]);async function S(){let F=u.current;if(!(!F||h)){A(!0),C(null);try{let O=await F.tokenize();if(O.status!=="OK"||!O.token){C(O.errors?.[0]?.message??"Please check the card details and try again."),A(!1);return}let J;try{J=(await v.current?.verifyBuyer?.(O.token,{amount:String(t.grandTotal),currencyCode:t.currency,intent:"CHARGE"}))?.token}catch{}if((await T.chargeSquare({idempotencyKey:o,sourceId:O.token,...J?{verificationToken:J}:{}})).status==="paid"){s();return}C("Square did not complete the payment. Please try again.")}catch(O){C(O instanceof je?O.message:"Square payment failed. Please try again.")}A(!1)}}return r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:c("div",{className:"w-full max-w-xl border border-line bg-bg",children:[c("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[r("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:t.orderNumber}),r("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Card"})]}),c("div",{className:"flex flex-col gap-4 px-6 py-6",children:[c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",r("span",{className:"text-fg",children:d(Number(t.grandTotal),t.currency)})," ","by card to confirm it now."]}),!b&&!k&&r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading card form\u2026"}),r("div",{ref:p}),k&&r("p",{className:"border border-red-300 bg-red-50 px-3 py-2 text-[13px] text-red-700",children:k}),r("button",{type:"button",onClick:S,disabled:!b||h,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!b||h?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:h?c(q,{children:["Processing\u2026 ",r("span",{children:"\xB7"})]}):c(q,{children:["Pay ",d(Number(t.grandTotal),t.currency),r("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})}),r("button",{type:"button",onClick:l,disabled:h,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later \u2014 our team will be in touch"})]})]})})}function Zr({checked:t,onChange:e,label:n,sub:a}){return c("div",{className:"flex items-start gap-3 border-t border-line py-4 first:border-t-0 first:pt-0",children:[r("button",{type:"button",onClick:()=>e(!t),"aria-pressed":t,"aria-label":n,className:["mt-px flex h-5 w-5 flex-shrink-0 items-center justify-center border transition-colors",t?"border-accent":"border-line"].join(" "),style:t?{background:"color-mix(in oklab, var(--accent) 18%, transparent)"}:void 0,children:t&&r("span",{className:"text-[13px] text-accent",children:"\u2713"})}),c("span",{className:"flex-1 font-display text-[16px] leading-[1.5] text-fg",children:[n,a&&r("small",{className:"mt-1 block font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim",children:a})]})]})}function Qr({slug:t,name:e,qty:n,config:a,configSummary:o,price:s,currency:l}){let{catalog:d}=Xe(),{formatMoney:p}=oe(),u=d.find(k=>k.slug===t),v=u?.spokes??5,b=u?.mesh??!1,f=a.find(k=>k.gold)?.label,h=u?.finishes.find(k=>k.name===f&&k.src)??u?.finishes.find(k=>k.src),A=u?.finishes[0]?.color??Yt;return c("div",{className:"grid grid-cols-[60px_1fr_auto] items-center gap-4 border-b border-line py-4 last:border-b-0",children:[c("div",{className:"relative flex aspect-square items-center justify-center overflow-hidden border border-line bg-surface",children:[r("span",{className:"absolute -right-1.5 -top-1.5 z-[2] flex h-[18px] w-[18px] items-center justify-center rounded-full bg-accent font-mono text-[11px] font-bold text-bg",children:n}),h?.src?r(Rt,{src:h.src,alt:`${e.lead}${e.accent} \u2014 ${h.name}`,width:120,height:120,sizes:"60px",className:"relative block h-full w-full object-contain p-2"}):r("div",{className:"block w-[78%]",style:{color:A},children:r(zt,{spokes:v,mesh:b,className:"block w-full"})})]}),c("div",{className:"flex min-w-0 flex-col gap-0.5",children:[c("span",{className:"font-display text-[17px] font-bold uppercase leading-none tracking-[-0.005em] text-fg",children:[e.lead,r("em",{className:"font-serif font-normal italic text-accent tracking-[-0.005em] normal-case",children:e.accent})]}),r("span",{className:"font-mono text-[12px] uppercase leading-[1.5] tracking-[0.18em] text-fg-dim",children:o})]}),r("span",{className:"text-right font-display text-[17px] font-bold tracking-[-0.005em] text-fg",children:p(s,l)})]})}function ie({label:t,value:e}){return c("div",{className:"flex items-center justify-between font-mono text-[13px] font-medium uppercase tracking-[0.18em] text-fg",children:[r("span",{children:t}),r("strong",{className:"font-display text-[16px] font-medium tracking-[-0.005em] normal-case text-fg",children:e})]})}function ea(t){return t.map(e=>e.label).join(" \xB7 ")}import{jsx as ze}from"react/jsx-runtime";function ta(){let{settings:t,websiteName:e}=It(),n=e?{...Ze,name:e}:Ze,a=t?{url:t.logoUrl,reversed:t.logoReversed??null,inkIsDark:t.logoInkIsDark??null,reverse:t.reverseLogo,size:t.logoSize,sizePx:t.logoSizePx}:null;return ze("div",{style:{position:"fixed",inset:0,zIndex:2147482e3,overflowY:"auto",background:"var(--bg)",color:"var(--fg)"},children:ze(Mt,{children:ze(Wt,{preview:!0,children:ze(lt,{site:n,logo:a,preview:!0})})})})}export{ta as default};
|
|
4
|
+
${ee.trim()}`:ge;async function rr(){if(n||G||a.length===0||o.repricing)return;let i=a.filter(Se).flatMap(m=>jt(m.components,m.qty));if(i.length===0){xe("Pick a size on each wheel's product page before checking out.");return}me(!0),xe(null);try{let y=await(X?T.createOrderAuthed:T.createOrder)({customer:{email:ne,name:`${re} ${fe}`.trim(),phone:_.trim()||void 0,address:Nt,city:ye,state:w||void 0,zipCode:I,country:U},items:i,currency:o.currency,idempotencyKey:W,shippingMethodId:p??void 0,couponCode:Ot(s),...Rn()});if(_t({confirmation:y,lines:a,adsSendTo:t.googleAdsId&&t.googleAdsConversionLabel?`${t.googleAdsId}/${t.googleAdsConversionLabel}`:null}),On({confirmation:y,lines:a}),b(),X&&He&&Ie==="new")try{await pe.createAddress({label:ft.trim()||"Home",contact_name:`${re} ${fe}`.trim(),phone:_.trim(),address:Nt,city:ye,zip_code:I,country:U}),yt("Address saved to your account.")}catch{yt("We couldn't save the address to your account \u2014 you can add it under Account \u2192 Addresses.")}if(S==="card"&&t.paymentMethods.includes("card")){let R=await T.createPaymentIntent({idempotencyKey:W});Ge(y),Yn(R)}else if(S==="paypal"&&t.paymentMethods.includes("paypal"))Ge(y),Bn(!0);else if(S==="afterpay"&&t.paymentMethods.includes("afterpay")){let R=window.location.origin,L=await T.createAfterpayCheckout({idempotencyKey:W,confirmUrl:`${R}/checkout?afterpay=confirm`,cancelUrl:`${R}/checkout?afterpay=cancel`}),D={idempotencyKey:W,confirmation:y};H.setItem(at,JSON.stringify(D)),window.location.assign(L.redirectCheckoutUrl);return}else if(S==="square"&&t.paymentMethods.includes("square"))Ge(y),Gn(!0);else if(S==="gocardless"&&t.paymentMethods.includes("gocardless")){let R=window.location.origin,L=await T.createGocardlessBillingRequest({idempotencyKey:W,confirmUrl:`${R}/checkout?gocardless=confirm`,cancelUrl:`${R}/checkout?gocardless=cancel`}),D={idempotencyKey:W,confirmation:y};H.setItem(Ue,JSON.stringify(D)),window.location.assign(L.authorisationUrl);return}else if(S==="zip"&&t.paymentMethods.includes("zip")){let R=window.location.origin,L=await T.createZipCheckout({idempotencyKey:W,redirectUrl:`${R}/checkout?zip=return`}),D={idempotencyKey:W,confirmation:y};H.setItem(ot,JSON.stringify(D)),window.location.assign(L.redirectUrl);return}else if(S==="klarna"&&t.paymentMethods.includes("klarna")){let R=window.location.origin,L=await T.createKlarnaCheckout({idempotencyKey:W,confirmUrl:`${R}/checkout?klarna=confirm`,cancelUrl:`${R}/checkout?klarna=cancel`}),D={idempotencyKey:W,confirmation:y};H.setItem(We,JSON.stringify(D)),window.location.assign(L.redirectUrl);return}else $(y)}catch(m){let y=Tt(m);y?(l(y),xe(`${y} Your order has not been placed. Place it again to continue without the code.`)):xe(m instanceof je?m.message:"Could not place the order. Please try again."),me(!1)}}return Le?c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[r("h1",{className:"font-display text-3xl",children:bt?"Payment received":"Order received"}),c("p",{className:"text-fg-dim",children:[bt?c(q,{children:["Thank you \u2014 your payment for order"," ",r("span",{className:"font-mono text-fg",children:Le.orderNumber})," has gone through."," "]}):c(q,{children:["Thank you \u2014 your order ",r("span",{className:"font-mono text-fg",children:Le.orderNumber})," is being reviewed by our team."," "]}),X?c(q,{children:["Track it under"," ",r(te,{href:"/account/orders",className:"text-accent underline",children:"your orders"}),"."]}):r(q,{children:"We\u2019ve emailed you a link to set a password and track it."})]}),xt&&r("p",{className:"text-sm text-fg-dim",children:xt}),gt&&r("p",{className:"text-sm text-fg-dim",children:gt}),!X&&c("p",{className:"text-sm text-fg-dim",children:["You can also"," ",r(te,{href:`/track?order=${encodeURIComponent(Le.orderNumber)}`,className:"text-accent underline",children:"track this order"})," ","anytime with just your order number and email \u2014 no password needed."]}),r(te,{href:"/wheels",className:"mt-2 border-2 border-line px-6 py-3 font-mono text-[12px] uppercase tracking-[0.24em] hover:border-accent",children:"Continue browsing"})]}):Vn?c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[r("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),r("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Afterpay \u2014 one moment."})]}):Xn?c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[r("h1",{className:"font-display text-3xl",children:"Setting up your direct debit\u2026"}),r("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Confirming with GoCardless \u2014 one moment."})]}):Zn?c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[r("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),r("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Zip \u2014 one moment."})]}):er?c("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-bg px-6 text-center text-fg",children:[r("h1",{className:"font-display text-3xl",children:"Confirming your payment\u2026"}),r("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:"Checking with Klarna \u2014 one moment."})]}):vt?r(Br,{payment:vt,onPaid:()=>{ue(!0),$(V)},onSkip:()=>$(V)}):zn&&V?r(Vr,{confirmation:V,clientId:t.paypalClientId??"",idemKey:W,onPaid:()=>{ue(!0),$(V)},onSkip:()=>$(V)}):Hn&&V?r(Xr,{confirmation:V,applicationId:t.squareApplicationId??"",locationId:t.squareLocationId??"",environment:t.squareEnvironment??"production",idemKey:W,onPaid:()=>{ue(!0),$(V)},onSkip:()=>$(V)}):c("div",{ref:wt,className:"bg-bg text-fg",children:[c("header",{ref:tr,className:"sticky top-0 z-30 grid grid-cols-[1fr_auto_1fr] items-center gap-8 border-b border-line px-[var(--sf-site-gutter,40px)] py-6 backdrop-blur-md max-[640px]:px-[min(20px,var(--sf-site-gutter,40px))] max-[640px]:py-4",style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:[c(te,{href:"/",className:"inline-flex items-center gap-3 font-mono text-[13px] uppercase tracking-[0.26em] text-fg-dim transition-colors hover:text-accent",children:["\u2190",r("span",{className:"max-[640px]:hidden",children:"Back to shop"})]}),r(te,{href:"/","aria-label":`${t.name} home`,className:"inline-flex items-center justify-center",children:r(Kt,{variant:"header",scrolled:!0,src:e?.url??null,reverse:e?.reverse??!1,reversedSrc:e?.reversed??null,inkIsDark:e?.inkIsDark??null,size:e?.size??"medium",sizePx:e?.sizePx??null,siteName:t.name})}),t.cardPayments?c("span",{className:"flex items-center justify-end gap-3 font-mono text-[12px] uppercase tracking-[0.26em] text-fg-dim",children:[r("span",{className:"text-green",children:"\u25CF"}),r("span",{className:"max-[640px]:hidden",children:"Encrypted \xB7"})," Stripe"]}):r("span",{})]}),c("section",{className:"mx-auto flex max-w-[var(--sf-site-width,1600px)] flex-wrap items-center justify-between gap-x-8 gap-y-3 border-b border-line bg-surface px-[var(--sf-site-gutter,40px)] py-4 font-mono text-[13px] font-medium uppercase tracking-[0.24em] text-fg max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]",children:[r("span",{className:"inline-flex items-center bg-accent px-3 py-1 font-bold text-bg",children:"Checkout"}),r("nav",{"aria-label":"Checkout steps",className:"flex flex-wrap items-center gap-5",children:[{n:"01",label:"Cart",state:"done"},{n:"02",label:"Ship & pay",state:"active"},{n:"03",label:"Confirmed",state:"pending"}].map(i=>c("span",{className:["relative flex items-center gap-2 transition-colors",i.state==="pending"?"text-fg-dim":"text-fg",i.state==="active"?"font-bold after:absolute after:inset-x-0 after:-bottom-1 after:h-[2px] after:bg-accent":""].join(" "),children:[r("span",{className:i.state==="done"?"text-accent font-bold":"",children:i.n}),r("span",{children:i.label})]},i.n))})]}),c("main",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] grid-cols-[1fr_420px] items-start gap-16 px-[var(--sf-site-gutter,40px)] pt-10 pb-[100px] max-[1100px]:grid-cols-1 max-[1100px]:gap-10 max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:pt-8 max-[1100px]:pb-20",children:[c("div",{children:[c($e,{num:"N\xB0 01",title:"Contact",children:[r(K,{label:"Email",hint:X?c(q,{children:["Signed in \xB7"," ",r("button",{type:"button",onClick:nr,className:"underline transition-colors hover:text-accent",children:"Not you? Sign out"})]}):void 0,children:r("input",{type:"email",value:ne,onChange:i=>Ne(i.target.value),placeholder:"you@example.com",readOnly:X!==null,className:Y+(X?" opacity-70":"")})}),c(Fn,{children:[r(K,{label:"First name",children:r("input",{type:"text",value:re,onChange:i=>Ee(i.target.value),className:Y})}),r(K,{label:"Last name",children:r("input",{type:"text",value:fe,onChange:i=>Re(i.target.value),className:Y})})]})]}),c($e,{num:"N\xB0 02",title:f?"Collection":"Shipping address",children:[f?c("div",{className:"grid gap-2 text-[14px] leading-[1.6]",children:[r("span",{className:"font-medium",children:f.name}),[f.address,f.city,f.state,f.zipCode,f.country].filter(Boolean).length>0&&r("span",{className:"opacity-80",children:[f.address,f.city,f.state,f.zipCode,f.country].filter(Boolean).join(", ")}),f.openingHours&&r("span",{className:"opacity-80",children:f.openingHours}),f.instructions&&r("span",{className:"opacity-80",children:f.instructions}),r("span",{className:"mt-1 font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"No delivery address needed"})]}):c(q,{children:[X!==null&&pt.length>0&&c("div",{className:"grid gap-3",children:[pt.map(i=>r(Ke,{active:Ie===i.id,onClick:()=>{Ae(i.id),Pt(i)},title:i.label,body:i.formatted_address,price:null},i.id)),r(Ke,{active:Ie==="new",onClick:()=>Ae("new"),title:"New address",body:null,price:null})]}),r(K,{label:"Address line 1",children:r("input",{type:"text",value:ge,onChange:i=>Q(i.target.value),className:Y})}),r(K,{label:"Address line 2",children:r("input",{type:"text",value:ee,onChange:i=>M(i.target.value),placeholder:"Apartment, unit, garage bay\u2026",className:Y})}),c(Fn,{cols:"three",children:[r(K,{label:"City",children:r("input",{type:"text",value:ye,onChange:i=>ce(i.target.value),className:Y})}),r(K,{label:Wn,children:r("input",{type:"text",value:I,onChange:i=>he(i.target.value),className:Y})}),r(K,{label:"Country",separate:!0,children:r(Qe,{value:U,onChange:i=>le(i.target.value),className:Y+" pr-10",style:Dn,children:A.map(i=>r("option",{value:i.code,children:i.name},i.code))})})]}),r(K,{label:$n,separate:!0,children:ve.length>0?c(Qe,{value:w,onChange:i=>B(i.target.value),className:Y+" pr-10",style:Dn,children:[r("option",{value:"",children:"Select\u2026"}),ve.map(i=>r("option",{value:i.code||i.name,children:i.name},i.code||i.name))]}):r("input",{type:"text",value:w,onChange:i=>B(i.target.value),className:Y})})]}),r(K,{label:"Phone",children:r("input",{type:"tel",value:_,onChange:i=>ae(i.target.value),placeholder:"+44 7700 900000",className:Y})}),!f&&X!==null&&Ie==="new"&&c(q,{children:[r(Zr,{checked:He,onChange:mt,label:"Save this address to my account"}),He&&r(K,{label:"Address label",children:r("input",{type:"text",value:ft,onChange:i=>Kn(i.target.value),placeholder:"Home",className:Y})})]})]}),r($e,{num:"N\xB0 03",title:"Shipping",children:c("div",{className:"grid gap-3",children:[d.map(i=>{let m=i.pickupLocation,y=m?[m.address,m.city,m.state,m.zipCode].filter(Boolean).join(", "):null;return r(Ke,{active:p===i.id,onClick:()=>u(i.id),title:m?`${i.name} \u2014 ${m.name}`:i.name,body:m?[y,m.openingHours,m.instructions,i.description].filter(Boolean).join(" \xB7 "):i.description||null,price:o.freeShipping||i.amount===0?qe:C(i.amount,o.currency),tag:i.tag||void 0},i.id)}),d.length===0&&r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Shipping is arranged after your order is reviewed."})]})}),c($e,{num:"N\xB0 04",title:"Payment",children:[r("div",{className:"grid gap-3",children:Te.map(i=>r(Ke,{active:S===i.key,onClick:()=>F(i.key),title:i.title,body:i.body,price:i.price,tag:i.tag},i.key))}),S==="card"?r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll enter card details on the secure payment step after placing the order."}):S==="paypal"?r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll approve the payment with PayPal on the payment step after placing the order."}):S==="afterpay"?r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Afterpay to approve four interest-free payments, then brought straight back."}):S==="square"?r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll enter card details on the secure payment step after placing the order."}):S==="gocardless"?r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll set up a bank direct debit with GoCardless, then be brought straight back. Direct debits clear in a few days."}):S==="zip"?r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Zip to approve four instalments, then brought straight back."}):S==="klarna"?r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"You\u2019ll be taken to Klarna to choose how to pay, then brought straight back."}):r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Our team emails you the invoice and bank details after review."})]})]}),c("aside",{className:"sticky top-[var(--sf-checkout-header-h,88px)] border border-line max-[1100px]:static",style:{background:"linear-gradient(180deg, color-mix(in oklab, var(--site-surface) 70%, var(--bg)) 0%, var(--bg) 100%)"},children:[c("header",{className:"flex items-center justify-between border-b border-accent bg-accent px-6 py-4 font-mono text-[13px] font-bold uppercase tracking-[0.28em] text-bg",children:[r("span",{children:"Your order"}),r(te,{href:"/wheels",className:"text-bg/80 transition-colors hover:text-bg",children:"Edit \u2197"})]}),r("div",{className:"flex flex-col px-6 py-2",children:a.length===0?c("div",{className:"py-8 text-center font-serif text-[16px] italic leading-[1.5] text-fg-dim",children:["Your cart is empty. ",r(te,{href:"/wheels",className:"text-accent underline-offset-4 hover:underline",children:"Browse the catalog \u2192"})]}):a.map(i=>r(Qr,{slug:i.slug,name:i.name,qty:i.qty,config:i.config,configSummary:ea(i.config),price:Ut(i,o.currency)??0,currency:o.currency},i.id))}),r("div",{className:"border-t border-line px-6 pt-5",children:r(Bt,{customerEmail:ne})}),c("div",{className:"flex flex-col gap-2 border-t border-line mt-5 px-6 pt-5",children:[r(ie,{label:"Subtotal",value:C(o.subtotal,o.currency)}),o.discount>0&&s?.valid&&r(ie,{label:`Coupon \xB7 ${s.code}`,value:c("span",{className:"font-semibold text-green",children:["\u2212 ",C(o.discount,o.currency)]})}),s?.deferred&&r(ie,{label:`Coupon \xB7 ${s.code}`,value:Lt}),s?.valid&&s.effects?.gift&&r(ie,{label:`Free gift \xB7 ${s.effects.gift.partNumber}${s.effects.gift.quantity>1?` \xD7${s.effects.gift.quantity}`:""}`,value:r("span",{className:"font-semibold text-green",children:qe})}),r(ie,{label:"Shipping",value:o.shippingStatus==="free"?r("span",{className:"font-semibold text-green",children:qe}):Ft(o.shippingStatus)??C(o.shipping,o.currency)}),o.tax&&(o.tax.charged?r(ie,{label:o.tax.inclusive?`${o.tax.name} included \xB7 ${o.tax.rate}%`:o.tax.name,value:C(o.tax.amount,o.currency)}):o.tax.name?r(ie,{label:o.tax.name,value:Dt}):null)]}),c("div",{className:"mt-4 flex items-end justify-between border-y-2 border-accent px-6 py-4",style:{background:"color-mix(in oklab, var(--accent) 10%, var(--bg))"},children:[r("span",{className:"font-display text-[20px] font-bold uppercase tracking-[0.04em] text-fg",children:"Total"}),r("span",{className:"text-right font-display text-[34px] font-bold leading-none tracking-[-0.025em] text-fg",children:o.repricing?"\u2026":C(o.grand,o.currency)})]}),c("div",{className:"flex flex-col gap-3 px-6 pt-5 pb-6",children:[ht&&r("p",{className:"border border-red-300 bg-red-50 px-3 py-2 text-[13px] text-red-700",children:ht}),o.hasUnpricedLine&&c("p",{className:"border border-amber-300 bg-amber-50 px-3 py-2 text-[13px] text-amber-800",children:["One or more items have no price in ",o.currency,". Remove them, or switch region, to continue."]}),r("button",{type:"button",onClick:rr,disabled:G||a.length===0||o.hasUnpricedLine||o.repricing,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",a.length===0||G||o.hasUnpricedLine||o.repricing?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:G?c(q,{children:["Building order\u2026 ",r("span",{children:"\xB7"})]}):o.repricing?c(q,{children:["Updating total\u2026 ",r("span",{children:"\xB7"})]}):c(q,{children:[S==="bank"?"Place order":"Continue to payment"," \xB7"," ",C(o.grand,o.currency),r("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})})]})]})]}),r("footer",{className:"flex flex-wrap items-center justify-between gap-4 border-t border-line px-[var(--sf-site-gutter,40px)] py-6 font-mono text-[12px] uppercase tracking-[0.22em] text-fg-dim max-[640px]:px-[min(20px,var(--sf-site-gutter,40px))]",children:r("span",{children:$t({legalName:t.legalName,foundedYear:t.foundedYear,siteName:t.name})})})]})}var Y="w-full border-2 border-line bg-bg px-4 py-4 font-display text-[17px] tracking-[-0.005em] text-fg outline-none transition-colors placeholder:text-fg-dim hover:border-fg-dim focus:border-accent",Dn={backgroundImage:"linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%)",backgroundPosition:"calc(100% - 18px) 50%, calc(100% - 12px) 50%",backgroundSize:"6px 6px",backgroundRepeat:"no-repeat"};function $e({num:t,title:e,children:n}){return c("section",{className:"mb-6 border border-line bg-bg",children:[c("header",{className:"flex items-center gap-4 border-b border-line bg-surface px-6 py-4",children:[r("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:t}),r("h2",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:e})]}),r("div",{className:"flex flex-col gap-4 px-6 py-6",children:n})]})}function Fn({cols:t="two",children:e}){return r("div",{className:["grid gap-3 max-[640px]:grid-cols-1",t==="two"?"grid-cols-2":"grid-cols-[1.2fr_1fr_1fr]"].join(" "),children:e})}function Ke({active:t,onClick:e,title:n,body:a,price:o,tag:s}){return c("button",{type:"button",onClick:e,"aria-pressed":t,className:["relative grid grid-cols-[auto_1fr_auto] items-center gap-5 border bg-bg px-6 py-5 text-left transition-colors",t?"border-accent outline outline-1 outline-accent -outline-offset-1":"border-line hover:border-[color-mix(in_oklab,var(--accent)_50%,var(--site-line))]"].join(" "),style:t?{background:"color-mix(in oklab, var(--accent) 14%, var(--bg))"}:void 0,children:[t&&r("span",{"aria-hidden":!0,className:"absolute inset-y-0 left-0 w-[3px] bg-accent"}),r("span",{className:["flex h-[18px] w-[18px] items-center justify-center rounded-full border-2",t?"border-accent":"border-fg-dim"].join(" "),children:t&&r("span",{className:"block h-2.5 w-2.5 rounded-full bg-accent"})}),c("span",{className:"flex min-w-0 flex-col gap-1",children:[c("span",{className:"flex flex-wrap items-baseline gap-3 font-display text-[18px] font-medium tracking-[-0.01em] text-fg",children:[n,s&&r("span",{className:"border px-2 py-0.5 font-mono text-[11px] font-normal uppercase tracking-[0.24em] text-accent",style:{background:"color-mix(in oklab, var(--accent) 14%, transparent)",borderColor:"color-mix(in oklab, var(--accent) 45%, var(--site-line))"},children:s})]}),a&&r("span",{className:"font-mono text-[12px] uppercase tracking-[0.22em] text-fg-dim",children:a})]}),r("span",{className:"whitespace-nowrap font-display text-[18px] font-medium tracking-[-0.01em] text-fg",children:o})]})}function Br({payment:t,onPaid:e,onSkip:n}){let{formatMoney:a}=oe(),o=Ye(()=>wn(t.publishableKey),[t.publishableKey]),s=Ye(()=>{if(typeof document>"u")return;let l=getComputedStyle(document.documentElement),d=(u,v)=>l.getPropertyValue(u).trim()||v,p=document.documentElement.getAttribute("data-theme")!=="light";return{theme:p?"night":"stripe",variables:{colorPrimary:d("--accent",p?"#c9a461":"#8a6a2a"),colorBackground:d("--site-surface",p?"#131313":"#ffffff"),colorText:d("--fg",p?"#f5f1e8":"#0a0a0a"),borderRadius:"0px"}}},[]);return r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:c("div",{className:"w-full max-w-xl border border-line bg-bg",children:[c("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[r("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:t.orderNumber}),r("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Payment"})]}),c("div",{className:"flex flex-col gap-4 px-6 py-6",children:[c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",r("span",{className:"text-fg",children:a(Number(t.amount),t.currency)})," ","by card to confirm it now."]}),r(rt,{stripe:o,options:{clientSecret:t.clientSecret,appearance:s},children:r(Hr,{payment:t,onPaid:e,onSkip:n})})]})]})})}function Hr({payment:t,onPaid:e,onSkip:n}){let{formatMoney:a}=oe(),o=yn(),s=fn(),[l,d]=g(!1),[p,u]=g(null);async function v(){if(!o||!s||l)return;d(!0),u(null);let b=await o.confirmPayment({elements:s,redirect:"if_required"});if(b.error){u(b.error.message??"Payment failed. Please try again."),d(!1);return}let f=b.paymentIntent?.status;if(f==="succeeded"||f==="processing"){e();return}u("Payment did not complete. Please try again."),d(!1)}return c("div",{className:"flex flex-col gap-4",children:[r(hn,{}),p&&r("p",{className:"border border-red-300 bg-red-50 px-3 py-2 text-[13px] text-red-700",children:p}),r("button",{type:"button",onClick:v,disabled:!o||!s||l,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!o||!s||l?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:l?c(q,{children:["Processing\u2026 ",r("span",{children:"\xB7"})]}):c(q,{children:["Pay ",a(Number(t.amount),t.currency),r("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})}),r("button",{type:"button",onClick:n,disabled:l,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later \u2014 our team will be in touch"})]})}var Mn="paypal-sdk-js",st=null;function Gr(t,e){let n=`${t}|${e}`;if(st?.key===n)return st.promise;let a=new Promise((o,s)=>{document.getElementById(Mn)?.remove();let l=document.createElement("script");l.id=Mn;let d=new URLSearchParams({"client-id":t,currency:e,intent:"capture"});l.src=`https://www.paypal.com/sdk/js?${d}`,l.onload=()=>{let p=window.paypal;p?o(p):s(new Error("PayPal SDK loaded without its namespace"))},l.onerror=()=>s(new Error("PayPal SDK failed to load")),document.head.appendChild(l)});return st={key:n,promise:a},a}function Vr({confirmation:t,clientId:e,idemKey:n,onPaid:a,onSkip:o}){let{formatMoney:s}=oe(),l=se(null),[d,p]=g(!1),[u,v]=g(null),b=se(a);return b.current=a,z(()=>{let f=!1,h=null;return Gr(e,t.currency).then(A=>{if(!(f||!l.current))return h=A.Buttons({style:{layout:"vertical",color:"gold",shape:"rect",label:"paypal"},createOrder:async()=>(await T.createPaypalOrder({idempotencyKey:n})).paypalOrderId,onApprove:async k=>{try{if((await T.capturePaypalOrder({idempotencyKey:n,paypalOrderId:k.orderID})).status==="paid"){b.current();return}v("PayPal did not complete the payment. Please try again.")}catch(C){v(C instanceof je?C.message:"PayPal payment failed. Please try again.")}},onError:()=>{v("PayPal could not process the payment. Please try again.")}}),h.render(l.current).then(()=>{f||p(!0)})}).catch(()=>{f||v("PayPal could not be loaded. You can pay later \u2014 your order stands either way.")}),()=>{f=!0,h?.close?.()}},[e,t.currency,n]),r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:c("div",{className:"w-full max-w-xl border border-line bg-bg",children:[c("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[r("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:t.orderNumber}),r("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"PayPal"})]}),c("div",{className:"flex flex-col gap-4 px-6 py-6",children:[c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",r("span",{className:"text-fg",children:s(Number(t.grandTotal),t.currency)})," ","with PayPal to confirm it now."]}),!d&&!u&&r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading PayPal\u2026"}),r("div",{ref:l}),u&&r("p",{className:"border border-red-300 bg-red-50 px-3 py-2 text-[13px] text-red-700",children:u}),r("button",{type:"button",onClick:o,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later \u2014 our team will be in touch"})]})]})})}var Un="square-web-sdk",ct=null;function Jr(t){let e=t==="sandbox"?"sandbox":"production";if(ct?.key===e)return ct.promise;let n=new Promise((a,o)=>{document.getElementById(Un)?.remove();let s=document.createElement("script");s.id=Un,s.src=e==="sandbox"?"https://sandbox.web.squarecdn.com/v1/square.js":"https://web.squarecdn.com/v1/square.js",s.onload=()=>{let l=window.Square;l?a(l):o(new Error("Square SDK loaded without its namespace"))},s.onerror=()=>o(new Error("Square SDK failed to load")),document.head.appendChild(s)});return ct={key:e,promise:n},n}function Xr({confirmation:t,applicationId:e,locationId:n,environment:a,idemKey:o,onPaid:s,onSkip:l}){let{formatMoney:d}=oe(),p=se(null),u=se(null),v=se(null),[b,f]=g(!1),[h,A]=g(!1),[k,C]=g(null);z(()=>{let F=!1,O=null;return Jr(a).then(async J=>{if(F||!p.current)return;let G=J.payments(e,n);v.current=G,O=await G.card(),await O.attach(p.current),u.current=O,F||f(!0)}).catch(()=>{F||C("Square could not be loaded. You can pay later \u2014 your order stands either way.")}),()=>{F=!0,O?.destroy?.()}},[e,n,a]);async function S(){let F=u.current;if(!(!F||h)){A(!0),C(null);try{let O=await F.tokenize();if(O.status!=="OK"||!O.token){C(O.errors?.[0]?.message??"Please check the card details and try again."),A(!1);return}let J;try{J=(await v.current?.verifyBuyer?.(O.token,{amount:String(t.grandTotal),currencyCode:t.currency,intent:"CHARGE"}))?.token}catch{}if((await T.chargeSquare({idempotencyKey:o,sourceId:O.token,...J?{verificationToken:J}:{}})).status==="paid"){s();return}C("Square did not complete the payment. Please try again.")}catch(O){C(O instanceof je?O.message:"Square payment failed. Please try again.")}A(!1)}}return r("div",{className:"flex min-h-screen flex-col items-center justify-center gap-6 bg-bg px-6 py-16 text-fg",children:c("div",{className:"w-full max-w-xl border border-line bg-bg",children:[c("header",{className:"flex items-center justify-between gap-4 border-b border-line bg-surface px-6 py-4",children:[r("span",{className:"inline-flex items-center justify-center bg-accent px-3 py-1 font-mono text-[11px] font-bold uppercase tracking-[0.24em] text-bg",children:t.orderNumber}),r("h1",{className:"font-display text-[26px] font-medium uppercase leading-none tracking-[-0.02em] text-fg",children:"Card"})]}),c("div",{className:"flex flex-col gap-4 px-6 py-6",children:[c("p",{className:"font-mono text-[12px] uppercase tracking-[0.2em] text-fg-dim",children:["Your order is placed. Pay"," ",r("span",{className:"text-fg",children:d(Number(t.grandTotal),t.currency)})," ","by card to confirm it now."]}),!b&&!k&&r("p",{className:"font-mono text-[11px] uppercase tracking-[0.2em] text-fg-dim",children:"Loading card form\u2026"}),r("div",{ref:p}),k&&r("p",{className:"border border-red-300 bg-red-50 px-3 py-2 text-[13px] text-red-700",children:k}),r("button",{type:"button",onClick:S,disabled:!b||h,className:["group flex items-center justify-between border px-5 py-5 font-mono text-[14px] font-medium uppercase tracking-[0.3em] transition-all",!b||h?"cursor-not-allowed border-line bg-surface text-fg-dim":"border-btn bg-btn text-btn-ink hover:border-fg hover:bg-fg"].join(" "),children:h?c(q,{children:["Processing\u2026 ",r("span",{children:"\xB7"})]}):c(q,{children:["Pay ",d(Number(t.grandTotal),t.currency),r("span",{className:"transition-transform group-hover:translate-x-1",children:"\u2192"})]})}),r("button",{type:"button",onClick:l,disabled:h,className:"self-center font-mono text-[11px] uppercase tracking-[0.24em] text-fg-dim underline-offset-4 transition-colors hover:text-accent hover:underline",children:"Pay later \u2014 our team will be in touch"})]})]})})}function Zr({checked:t,onChange:e,label:n,sub:a}){return c("div",{className:"flex items-start gap-3 border-t border-line py-4 first:border-t-0 first:pt-0",children:[r("button",{type:"button",onClick:()=>e(!t),"aria-pressed":t,"aria-label":n,className:["mt-px flex h-5 w-5 flex-shrink-0 items-center justify-center border transition-colors",t?"border-accent":"border-line"].join(" "),style:t?{background:"color-mix(in oklab, var(--accent) 18%, transparent)"}:void 0,children:t&&r("span",{className:"text-[13px] text-accent",children:"\u2713"})}),c("span",{className:"flex-1 font-display text-[16px] leading-[1.5] text-fg",children:[n,a&&r("small",{className:"mt-1 block font-mono text-[12px] uppercase tracking-[0.18em] text-fg-dim",children:a})]})]})}function Qr({slug:t,name:e,qty:n,config:a,configSummary:o,price:s,currency:l}){let{catalog:d}=Xe(),{formatMoney:p}=oe(),u=d.find(k=>k.slug===t),v=u?.spokes??5,b=u?.mesh??!1,f=a.find(k=>k.gold)?.label,h=u?.finishes.find(k=>k.name===f&&k.src)??u?.finishes.find(k=>k.src),A=u?.finishes[0]?.color??zt;return c("div",{className:"grid grid-cols-[60px_1fr_auto] items-center gap-4 border-b border-line py-4 last:border-b-0",children:[c("div",{className:"relative flex aspect-square items-center justify-center overflow-hidden border border-line bg-surface",children:[r("span",{className:"absolute -right-1.5 -top-1.5 z-[2] flex h-[18px] w-[18px] items-center justify-center rounded-full bg-accent font-mono text-[11px] font-bold text-bg",children:n}),h?.src?r(Rt,{src:h.src,alt:`${e.lead}${e.accent} \u2014 ${h.name}`,width:120,height:120,sizes:"60px",className:"relative block h-full w-full object-contain p-2"}):r("div",{className:"block w-[78%]",style:{color:A},children:r(Yt,{spokes:v,mesh:b,className:"block w-full"})})]}),c("div",{className:"flex min-w-0 flex-col gap-0.5",children:[c("span",{className:"font-display text-[17px] font-bold uppercase leading-none tracking-[-0.005em] text-fg",children:[e.lead,r("em",{className:"font-serif font-normal italic text-accent tracking-[-0.005em] normal-case",children:e.accent})]}),r("span",{className:"font-mono text-[12px] uppercase leading-[1.5] tracking-[0.18em] text-fg-dim",children:o})]}),r("span",{className:"text-right font-display text-[17px] font-bold tracking-[-0.005em] text-fg",children:p(s,l)})]})}function ie({label:t,value:e}){return c("div",{className:"flex items-center justify-between font-mono text-[13px] font-medium uppercase tracking-[0.18em] text-fg",children:[r("span",{children:t}),r("strong",{className:"font-display text-[16px] font-medium tracking-[-0.005em] normal-case text-fg",children:e})]})}function ea(t){return t.map(e=>e.label).join(" \xB7 ")}import{jsx as ze}from"react/jsx-runtime";function ta(){let{settings:t,websiteName:e}=It(),n=e?{...Ze,name:e}:Ze,a=t?{url:t.logoUrl,reversed:t.logoReversed??null,inkIsDark:t.logoInkIsDark??null,reverse:t.reverseLogo,size:t.logoSize,sizePx:t.logoSizePx}:null;return ze("div",{style:{position:"fixed",inset:0,zIndex:2147482e3,overflowY:"auto",background:"var(--bg)",color:"var(--fg)"},children:ze(Mt,{children:ze(Wt,{preview:!0,children:ze(lt,{site:n,logo:a,preview:!0})})})})}export{ta as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{hi as t}from"./chunk-HHZH76OU.js";import"./chunk-BAR34RXF.js";import"./chunk-BG52UY3U.js";import"./chunk-Y6SLVHK3.js";import{jsx as e}from"react/jsx-runtime";import{default as r}from"efficient-easel/screen/components/ScreenStoreProvider";function p(o){return e(r,{...o,parts:t})}export{p as default};
|