@loczer/storefront-sdk 0.211.0 → 0.213.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.
Files changed (39) hide show
  1. package/dist/components/BikeProductCard/index.d.ts.map +1 -1
  2. package/dist/components/BikeProductCard/index.js +5 -5
  3. package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
  4. package/dist/components/BookingBikeVariantDialog/index.js +5 -4
  5. package/dist/components/BookingFlowSteps/index.d.ts.map +1 -1
  6. package/dist/components/BookingFlowSteps/index.js +73 -32
  7. package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
  8. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +1 -1
  9. package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.js +16 -16
  10. package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -1
  11. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +1 -1
  12. package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.js +2 -2
  13. package/dist/components/BookingPeriodSelector/index.js +3 -3
  14. package/dist/components/FulfillmentSection/index.js +10 -4
  15. package/dist/components/Header/index.d.ts.map +1 -1
  16. package/dist/components/Header/index.js +205 -100
  17. package/dist/components/Layout/index.js +2 -2
  18. package/dist/components/ProductPriceBadge/index.js +16 -10
  19. package/dist/i18n/en.d.ts +7 -1
  20. package/dist/i18n/en.d.ts.map +1 -1
  21. package/dist/i18n/en.js +7 -1
  22. package/dist/i18n/fr.d.ts +7 -1
  23. package/dist/i18n/fr.d.ts.map +1 -1
  24. package/dist/i18n/fr.js +7 -1
  25. package/dist/index.d.ts +24 -4
  26. package/dist/lib/cart.d.ts +6 -2
  27. package/dist/lib/cart.d.ts.map +1 -1
  28. package/dist/lib/cart.js +45 -23
  29. package/dist/lib/checkoutSubmit.d.ts +3 -0
  30. package/dist/lib/checkoutSubmit.d.ts.map +1 -1
  31. package/dist/lib/checkoutSubmit.js +14 -2
  32. package/dist/pages/BookingPage.d.ts.map +1 -1
  33. package/dist/pages/BookingPage.js +7 -2
  34. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  35. package/dist/pages/CheckoutPage.js +235 -245
  36. package/dist/pages/HomePage.d.ts.map +1 -1
  37. package/dist/pages/HomePage.js +252 -235
  38. package/dist/storefront.css +1 -1
  39. package/package.json +1 -1
@@ -13,31 +13,32 @@ import { BookingStartTimeField as oe } from "../components/BookingPeriodSelector
13
13
  import { BookingEndDateField as se } from "../components/BookingPeriodSelector/components/BookingEndDateField.js";
14
14
  import { BookingEndTimeField as ce } from "../components/BookingPeriodSelector/components/BookingEndTimeField.js";
15
15
  import { BookingTimeSlotsStatus as le } from "../components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js";
16
+ import { BookingMobileDateDrawer as ue } from "../components/BookingPeriodSelector/components/BookingMobileDateDrawer.js";
16
17
  import "../components/BookingPeriodSelector/index.js";
17
- import { DeliveryAddressSelector as ue } from "../components/DeliveryAddressSelector/index.js";
18
- import { ContactSection as de } from "../components/ContactSection/index.js";
19
- import { TestimonialsSection as fe } from "../components/TestimonialsSection/index.js";
20
- import { AboutSection as pe } from "../components/AboutSection/index.js";
21
- import { ItinerariesSection as me } from "../components/Itineraries/ItinerariesSection.js";
18
+ import { DeliveryAddressSelector as de } from "../components/DeliveryAddressSelector/index.js";
19
+ import { ContactSection as fe } from "../components/ContactSection/index.js";
20
+ import { TestimonialsSection as pe } from "../components/TestimonialsSection/index.js";
21
+ import { AboutSection as me } from "../components/AboutSection/index.js";
22
+ import { ItinerariesSection as he } from "../components/Itineraries/ItinerariesSection.js";
22
23
  import "../components/Itineraries/index.js";
23
- import { Card as he } from "../ui/card.js";
24
- import { ProductWarningNotice as ge } from "../components/ProductWarningNotice/index.js";
25
- import { ProductPriceBadge as _e } from "../components/ProductPriceBadge/index.js";
26
- import ve from "../chunks/assets/playground-hero-preview-kf4c9tSc.js";
27
- import { resolveProductImageContainerStyle as ye } from "../lib/productImageStyles.js";
28
- import { BikeProductCard as be } from "../components/BikeProductCard/index.js";
29
- import { StorefrontCancellationPolicyNotice as xe } from "../components/StorefrontCancellationPolicyNotice/index.js";
30
- import { StorefrontInsuranceNotice as Se } from "../components/StorefrontInsuranceNotice/index.js";
31
- import { createStorefrontTimeSlotsFetcher as Ce } from "../lib/fetchStorefrontTimeSlots.js";
32
- import { FulfillmentSection as we } from "../components/FulfillmentSection/index.js";
33
- import { useEffect as f, useMemo as p, useRef as Te, useState as m } from "react";
24
+ import { Card as ge } from "../ui/card.js";
25
+ import { ProductWarningNotice as _e } from "../components/ProductWarningNotice/index.js";
26
+ import { ProductPriceBadge as ve } from "../components/ProductPriceBadge/index.js";
27
+ import ye from "../chunks/assets/playground-hero-preview-kf4c9tSc.js";
28
+ import { resolveProductImageContainerStyle as be } from "../lib/productImageStyles.js";
29
+ import { BikeProductCard as xe } from "../components/BikeProductCard/index.js";
30
+ import { StorefrontCancellationPolicyNotice as Se } from "../components/StorefrontCancellationPolicyNotice/index.js";
31
+ import { StorefrontInsuranceNotice as Ce } from "../components/StorefrontInsuranceNotice/index.js";
32
+ import { createStorefrontTimeSlotsFetcher as we } from "../lib/fetchStorefrontTimeSlots.js";
33
+ import { FulfillmentSection as Te } from "../components/FulfillmentSection/index.js";
34
+ import { useEffect as f, useMemo as p, useRef as Ee, useState as m } from "react";
34
35
  import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
35
- import { Link as v, useLocation as Ee, useNavigate as De, useParams as Oe, useSearchParams as ke } from "@rpcbase/router";
36
- import { useTranslation as Ae } from "react-i18next";
36
+ import { Link as v, useLocation as De, useNavigate as Oe, useParams as ke, useSearchParams as Ae } from "@rpcbase/router";
37
+ import { useTranslation as je } from "react-i18next";
37
38
  import { cn as y } from "@rpcbase/ui";
38
- import { ArrowRight as b, Bike as je, Clock as Me, MapPin as Ne, ShieldCheck as Pe, Truck as Fe } from "lucide-react";
39
+ import { ArrowRight as b, Bike as Me, Clock as Ne, MapPin as Pe, ShieldCheck as Fe, Truck as Ie } from "lucide-react";
39
40
  //#region src/pages/HomePage.tsx
40
- var x = (e) => String(e).padStart(2, "0"), Ie = "text-2xs font-semibold uppercase tracking-wide text-slate-600", Le = "h-10", S = 6, C = 5, Re = [
41
+ var x = (e) => String(e).padStart(2, "0"), Le = "text-2xs font-semibold uppercase tracking-wide text-slate-600", Re = "h-10", S = 6, C = 5, ze = [
41
42
  15,
42
43
  25,
43
44
  42,
@@ -53,7 +54,7 @@ var x = (e) => String(e).padStart(2, "0"), Ie = "text-2xs font-semibold uppercas
53
54
  "4 / 3",
54
55
  "9 / 16",
55
56
  "6 / 7"
56
- ], ze = ({ buttonRef: e, className: t, label: n, onSubmit: r }) => {
57
+ ], Be = ({ buttonRef: e, className: t, label: n, onSubmit: r }) => {
57
58
  let { hasConfirmedTimeSlots: i, startTime: a, endTime: o } = d();
58
59
  return /* @__PURE__ */ _(u, {
59
60
  ref: e,
@@ -71,8 +72,8 @@ var x = (e) => String(e).padStart(2, "0"), Ie = "text-2xs font-semibold uppercas
71
72
  if (!t) return;
72
73
  let n = Number(t[1]), r = Number(t[2]), i = Number(t[3]), a = new Date(n, r - 1, i);
73
74
  if (!(Number.isNaN(a.getTime()) || a.getFullYear() !== n || a.getMonth() !== r - 1 || a.getDate() !== i)) return a;
74
- }, Be = (e) => {
75
- let t = e.length > 0 ? e : [ve];
75
+ }, Ve = (e) => {
76
+ let t = e.length > 0 ? e : [ye];
76
77
  return Array.from({ length: S }, (e, n) => Array.from({ length: C }, (e, r) => {
77
78
  let i = n * C + r;
78
79
  return {
@@ -82,15 +83,15 @@ var x = (e) => String(e).padStart(2, "0"), Ie = "text-2xs font-semibold uppercas
82
83
  }));
83
84
  };
84
85
  function D() {
85
- let { t: d, i18n: x } = Ae(), { storeSlug: S } = Oe(), C = Ee(), { storefrontConfiguration: w } = te(), D = w.shop.address?.trim() ?? "", O = w.workspace?.workspaceLanguage, { bikes: k, accessories: Ve } = ne(), [A, He] = ke(), Ue = De(), j = p(() => a(A, S), [A, S]), We = p(() => n(w), [w]), M = p(() => i(w), [w]), N = p(() => E(M.start_date), [M.start_date]), Ge = p(() => E(M.end_date) ?? N, [M.end_date, N]), P = w.settings.fulfillmentModes.includes("delivery"), Ke = w.settings.deliveryDisabledReason.trim(), F = p(() => r(j, M), [M, j]), [I, qe] = m(() => F.fulfillment === "delivery" && P ? "delivery" : "pickup"), [L, Je] = m(() => E(j.get("start_date")) ?? N), [R, Ye] = m(() => j.get("start_time") ?? M.start_time), [z, Xe] = m(() => {
86
+ let { t: d, i18n: x } = je(), { storeSlug: S } = ke(), C = De(), { storefrontConfiguration: w } = te(), D = w.shop.address?.trim() ?? "", O = w.workspace?.workspaceLanguage, { bikes: k, accessories: He } = ne(), [A, Ue] = Ae(), We = Oe(), j = p(() => a(A, S), [A, S]), Ge = p(() => n(w), [w]), M = p(() => i(w), [w]), N = p(() => E(M.start_date), [M.start_date]), Ke = p(() => E(M.end_date) ?? N, [M.end_date, N]), P = w.settings.fulfillmentModes.includes("delivery"), F = w.settings.deliveryDisabledReason.trim(), I = p(() => r(j, M), [M, j]), [L, qe] = m(() => I.fulfillment === "delivery" && P ? "delivery" : "pickup"), [R, Je] = m(() => E(j.get("start_date")) ?? N), [z, Ye] = m(() => j.get("start_time") ?? M.start_time), [B, Xe] = m(() => {
86
87
  let e = E(j.get("start_date")) ?? N;
87
- return E(j.get("end_date")) ?? e ?? Ge;
88
- }), [B, Ze] = m(() => j.get("end_time") ?? M.end_time), [Qe, $e] = m(void 0), [et, tt] = m(!1), [V, H] = m(() => F.start_address), [U, W] = m(() => F.end_address), G = Te(null), nt = [
89
- L ? T(L) : "",
90
- R,
91
- z ? T(z) : "",
92
- B
93
- ].join(":"), K = Qe === nt, rt = p(() => k.slice(0, 4), [k]), { heroMode: it } = re(), at = it ?? w.content?.heroMode ?? "current_booking_hero", q = at === "vertical_marquee_hero", J = at === "booking_bar_overlay_hero" || q, ot = Ce(S), st = p(() => ({
88
+ return E(j.get("end_date")) ?? e ?? Ke;
89
+ }), [V, Ze] = m(() => j.get("end_time") ?? M.end_time), [Qe, $e] = m(void 0), [et, tt] = m(!1), [H, U] = m(() => I.start_address), [W, G] = m(() => I.end_address), K = Ee(null), nt = [
90
+ R ? T(R) : "",
91
+ z,
92
+ B ? T(B) : "",
93
+ V
94
+ ].join(":"), q = Qe === nt, rt = p(() => k.slice(0, 4), [k]), { heroMode: it } = re(), at = it ?? w.content?.heroMode ?? "current_booking_hero", J = at === "vertical_marquee_hero", Y = at === "booking_bar_overlay_hero" || J, ot = we(S), st = p(() => ({
94
95
  startDate: d("booking_start_date"),
95
96
  pickStartDate: d("booking_start_date"),
96
97
  startTime: d("booking_start_time"),
@@ -98,186 +99,206 @@ function D() {
98
99
  pickEndDate: d("booking_end_date"),
99
100
  endTime: d("booking_end_time"),
100
101
  selectedDaysTooltip: ({ count: e }) => d("booking_selected_days_tooltip", { count: e }),
102
+ rentalPeriod: d("booking_rental_period"),
103
+ dateDrawerNext: d("booking_date_drawer_continue"),
104
+ closeDrawer: d("booking_date_drawer_close"),
101
105
  timeSlotsLoading: d("booking_time_slots_loading"),
102
106
  timeSlotsUnavailable: d("booking_time_slots_unavailable"),
103
107
  timeSlotsLoadError: d("booking_time_slots_load_error"),
104
108
  retryTimeSlots: d("booking_time_slots_retry")
105
- }), [x.language, d]), Y = p(() => {
106
- let e = L ?? N ?? /* @__PURE__ */ new Date(), n = z ?? e;
109
+ }), [x.language, d]), X = p(() => {
110
+ let e = R ?? N ?? /* @__PURE__ */ new Date(), n = B ?? e;
107
111
  return t(new URLSearchParams(), {
108
- fulfillment: I === "delivery" && P ? "delivery" : "pickup",
112
+ fulfillment: L === "delivery" && P ? "delivery" : "pickup",
109
113
  start_date: T(e),
110
- start_time: K ? R : "",
114
+ start_time: q ? z : "",
111
115
  end_date: T(n),
112
- end_time: K ? B : "",
113
- start_address: V,
114
- end_address: U
116
+ end_time: q ? V : "",
117
+ start_address: H,
118
+ end_address: W
115
119
  });
116
120
  }, [
117
121
  N,
118
122
  P,
119
- U,
120
- z,
123
+ W,
121
124
  B,
122
- I,
123
- K,
124
125
  V,
125
126
  L,
126
- R
127
- ]), ct = Y.toString(), lt = ct ? `?${ct}` : "";
127
+ q,
128
+ H,
129
+ R,
130
+ z
131
+ ]), ct = X.toString(), lt = ct ? `?${ct}` : "";
128
132
  f(() => {
129
- o(S, Y);
130
- }, [Y, S]), f(() => {
133
+ o(S, X);
134
+ }, [X, S]), f(() => {
131
135
  let t = new URLSearchParams(A);
132
136
  for (let n of e) t.delete(n);
133
- for (let [e, n] of Y.entries()) t.set(e, n);
134
- t.toString() !== A.toString() && He(t, { replace: !0 });
137
+ for (let [e, n] of X.entries()) t.set(e, n);
138
+ t.toString() !== A.toString() && Ue(t, { replace: !0 });
135
139
  }, [
136
- Y,
140
+ X,
137
141
  A,
138
- He
142
+ Ue
139
143
  ]), f(() => {
140
- !et || !K || (tt(!1), G.current?.focus({ preventScroll: !0 }));
141
- }, [K, et]);
142
- let ut = K && !!(R && B), dt = {
143
- startDate: L,
144
+ !et || !q || (tt(!1), K.current?.focus({ preventScroll: !0 }));
145
+ }, [q, et]);
146
+ let ut = q && !!(z && V), dt = {
147
+ startDate: R,
144
148
  onStartDateChange: Je,
145
- startTime: R,
149
+ startTime: z,
146
150
  onStartTimeChange: Ye,
147
- endDate: z,
151
+ endDate: B,
148
152
  onEndDateChange: Xe,
149
- endTime: B,
153
+ endTime: V,
150
154
  onEndTimeChange: Ze,
151
155
  onEndTimeCommit: () => tt(!0),
152
- bookingPeriodConfig: We,
156
+ bookingPeriodConfig: Ge,
157
+ withMobileDateDrawer: !0,
153
158
  fetchTimeSlots: ot,
154
159
  onTimeSlotsConfirmationChange: (e) => {
155
160
  $e(e ? nt : void 0);
156
161
  },
157
162
  labels: st,
158
163
  localeCode: x.language
159
- }, X = () => {
164
+ }, Z = () => {
160
165
  if (!ut) return;
161
166
  let e = new URLSearchParams(A);
162
- for (let [t, n] of Y.entries()) e.set(t, n);
163
- Ue(`/${S ?? ""}/booking?${e.toString()}#booking-products`);
164
- }, ft = (e) => `/${S ?? ""}/products/${e}`, Z = { backTo: `${C.pathname}${C.search}${C.hash}` }, pt = /* @__PURE__ */ _("div", { children: [
165
- /* @__PURE__ */ _("div", {
166
- className: "flex items-center gap-2",
167
- children: [/* @__PURE__ */ _(l, {
168
- variant: "secondary",
169
- children: [/* @__PURE__ */ g(Me, {
170
- className: "h-3 w-3",
171
- "aria-hidden": "true"
172
- }), /* @__PURE__ */ g("span", { children: d("status_open") })]
173
- }), /* @__PURE__ */ _(l, {
174
- variant: "outline",
175
- className: y(!D && "border-destructive/40 text-destructive"),
176
- children: [/* @__PURE__ */ g(Ne, {
177
- className: "h-3 w-3",
178
- "aria-hidden": "true"
179
- }), /* @__PURE__ */ g("span", { children: D || "[Missing shop address]" })]
180
- })]
181
- }),
182
- /* @__PURE__ */ g("h1", {
183
- className: "mt-4 text-3xl font-semibold tracking-tight sm:text-4xl",
184
- children: /* @__PURE__ */ g("span", { children: d("hero_title") })
185
- }),
186
- /* @__PURE__ */ g("p", {
187
- className: "mt-3 text-sm text-slate-700 sm:text-base",
188
- children: /* @__PURE__ */ g("span", { children: d("hero_description") })
189
- }),
190
- /* @__PURE__ */ g("div", {
191
- className: y("mt-6", !J && "rounded-xl border bg-white/70 p-3"),
192
- children: /* @__PURE__ */ _("ul", {
193
- className: y("space-y-3", J && "space-y-2"),
194
- "data-testid": "storefront-home-trust-features",
195
- children: [
196
- /* @__PURE__ */ _("li", {
197
- className: "flex items-start gap-3",
198
- "data-testid": "storefront-secure-payment-notice",
199
- children: [/* @__PURE__ */ g(Pe, {
200
- className: "mt-0.5 h-5 w-5 text-success",
201
- "aria-hidden": "true"
202
- }), /* @__PURE__ */ _("div", {
203
- className: "flex flex-col gap-0.5",
204
- children: [/* @__PURE__ */ g("p", {
205
- className: "text-sm font-medium text-slate-950",
206
- children: /* @__PURE__ */ g("span", { children: d("feature_secure_payment_title") })
207
- }), /* @__PURE__ */ g("p", {
208
- className: "text-xs text-slate-600",
209
- children: /* @__PURE__ */ g("span", { children: d("feature_secure_payment_description") })
167
+ for (let [t, n] of X.entries()) e.set(t, n);
168
+ We(`/${S ?? ""}/booking?${e.toString()}#booking-products`);
169
+ }, ft = (e) => `/${S ?? ""}/products/${e}`, Q = { backTo: `${C.pathname}${C.search}${C.hash}` }, pt = /* @__PURE__ */ _("div", {
170
+ className: "min-w-0",
171
+ children: [
172
+ /* @__PURE__ */ _("div", {
173
+ className: "flex min-w-0 flex-wrap items-center gap-2",
174
+ children: [/* @__PURE__ */ _(l, {
175
+ variant: "secondary",
176
+ children: [/* @__PURE__ */ g(Ne, {
177
+ className: "h-3 w-3",
178
+ "aria-hidden": "true"
179
+ }), /* @__PURE__ */ g("span", { children: d("status_open") })]
180
+ }), /* @__PURE__ */ _(l, {
181
+ variant: "outline",
182
+ className: y("min-w-0 max-w-full", !D && "border-destructive/40 text-destructive"),
183
+ children: [/* @__PURE__ */ g(Pe, {
184
+ className: "h-3 w-3",
185
+ "aria-hidden": "true"
186
+ }), /* @__PURE__ */ g("span", {
187
+ className: "truncate",
188
+ children: D || "[Missing shop address]"
189
+ })]
190
+ })]
191
+ }),
192
+ /* @__PURE__ */ g("h1", {
193
+ className: "mt-4 text-[1.75rem] font-semibold leading-tight tracking-tight sm:text-4xl",
194
+ children: /* @__PURE__ */ g("span", { children: d("hero_title") })
195
+ }),
196
+ /* @__PURE__ */ g("p", {
197
+ className: "mt-3 text-sm text-slate-700 sm:text-base",
198
+ children: /* @__PURE__ */ g("span", { children: d("hero_description") })
199
+ }),
200
+ /* @__PURE__ */ g("div", {
201
+ className: y("mt-6", !Y && "rounded-xl border bg-white/70 p-3"),
202
+ children: /* @__PURE__ */ _("ul", {
203
+ className: y("space-y-3", Y && "space-y-2"),
204
+ "data-testid": "storefront-home-trust-features",
205
+ children: [
206
+ /* @__PURE__ */ _("li", {
207
+ className: "flex items-start gap-3",
208
+ "data-testid": "storefront-secure-payment-notice",
209
+ children: [/* @__PURE__ */ g(Fe, {
210
+ className: "mt-0.5 h-5 w-5 text-success",
211
+ "aria-hidden": "true"
212
+ }), /* @__PURE__ */ _("div", {
213
+ className: "flex min-w-0 flex-col gap-0.5",
214
+ children: [/* @__PURE__ */ g("p", {
215
+ className: "text-sm font-medium text-slate-950",
216
+ children: /* @__PURE__ */ g("span", { children: d("feature_secure_payment_title") })
217
+ }), /* @__PURE__ */ g("p", {
218
+ className: "text-xs text-slate-600",
219
+ children: /* @__PURE__ */ g("span", { children: d("feature_secure_payment_description") })
220
+ })]
210
221
  })]
211
- })]
222
+ }),
223
+ /* @__PURE__ */ g(Se, {
224
+ policy: w.bookingEngine.cancellationPolicy,
225
+ className: y(!Y && "border-t border-slate-200/70 pt-3")
226
+ }),
227
+ P ? /* @__PURE__ */ _("li", {
228
+ className: y("flex items-start gap-3", !Y && "border-t border-slate-200/70 pt-3"),
229
+ "data-testid": "storefront-delivery-notice",
230
+ children: [/* @__PURE__ */ g(Ie, {
231
+ className: "mt-0.5 h-5 w-5 text-slate-900",
232
+ "aria-hidden": "true"
233
+ }), /* @__PURE__ */ _("div", {
234
+ className: "flex flex-col gap-0.5",
235
+ children: [/* @__PURE__ */ g("p", {
236
+ className: "text-sm font-medium text-slate-950",
237
+ children: /* @__PURE__ */ g("span", { children: d("feature_delivery_title") })
238
+ }), /* @__PURE__ */ g("p", {
239
+ className: "text-xs text-slate-600",
240
+ children: /* @__PURE__ */ g("span", { children: d("feature_delivery_description") })
241
+ })]
242
+ })]
243
+ }) : null,
244
+ /* @__PURE__ */ g(Ce, {
245
+ bikes: k,
246
+ currency: w.bookingEngine.currency,
247
+ className: y(!Y && "border-t border-slate-200/70 pt-3")
248
+ })
249
+ ]
250
+ })
251
+ })
252
+ ]
253
+ }), mt = ({ className: e, showSubmitButton: t = !1, submitButtonClassName: n }) => /* @__PURE__ */ g(ie, {
254
+ ...dt,
255
+ labelClassName: Le,
256
+ inputClassName: Re,
257
+ children: /* @__PURE__ */ _(h, { children: [
258
+ /* @__PURE__ */ _("div", {
259
+ className: e,
260
+ children: [
261
+ /* @__PURE__ */ g("div", {
262
+ className: "min-w-0",
263
+ children: /* @__PURE__ */ g(ae, {})
212
264
  }),
213
- /* @__PURE__ */ g(xe, {
214
- policy: w.bookingEngine.cancellationPolicy,
215
- className: y(!J && "border-t border-slate-200/70 pt-3")
265
+ /* @__PURE__ */ g("div", {
266
+ className: "min-w-0",
267
+ children: /* @__PURE__ */ g(oe, {})
216
268
  }),
217
- P ? /* @__PURE__ */ _("li", {
218
- className: y("flex items-start gap-3", !J && "border-t border-slate-200/70 pt-3"),
219
- "data-testid": "storefront-delivery-notice",
220
- children: [/* @__PURE__ */ g(Fe, {
221
- className: "mt-0.5 h-5 w-5 text-slate-900",
222
- "aria-hidden": "true"
223
- }), /* @__PURE__ */ _("div", {
224
- className: "flex flex-col gap-0.5",
225
- children: [/* @__PURE__ */ g("p", {
226
- className: "text-sm font-medium text-slate-950",
227
- children: /* @__PURE__ */ g("span", { children: d("feature_delivery_title") })
228
- }), /* @__PURE__ */ g("p", {
229
- className: "text-xs text-slate-600",
230
- children: /* @__PURE__ */ g("span", { children: d("feature_delivery_description") })
231
- })]
232
- })]
233
- }) : null,
234
- /* @__PURE__ */ g(Se, {
235
- bikes: k,
236
- currency: w.bookingEngine.currency,
237
- className: y(!J && "border-t border-slate-200/70 pt-3")
238
- })
269
+ /* @__PURE__ */ g("div", {
270
+ className: "min-w-0",
271
+ children: /* @__PURE__ */ g(se, {})
272
+ }),
273
+ /* @__PURE__ */ g("div", {
274
+ className: "min-w-0",
275
+ children: /* @__PURE__ */ g(ce, {})
276
+ }),
277
+ t ? /* @__PURE__ */ g(Be, {
278
+ buttonRef: K,
279
+ className: n,
280
+ label: d("booking_submit"),
281
+ onSubmit: Z
282
+ }) : null
239
283
  ]
284
+ }),
285
+ /* @__PURE__ */ g(ue, {}),
286
+ /* @__PURE__ */ g(le, {
287
+ className: "mt-2",
288
+ testId: "booking-home-time-slots-status"
240
289
  })
241
- })
242
- ] }), Q = ({ className: e, showSubmitButton: t = !1, submitButtonClassName: n }) => /* @__PURE__ */ g(ie, {
243
- ...dt,
244
- labelClassName: Ie,
245
- inputClassName: Le,
246
- children: /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("div", {
247
- className: e,
248
- children: [
249
- /* @__PURE__ */ g("div", {
250
- className: "min-w-0",
251
- children: /* @__PURE__ */ g(ae, {})
252
- }),
253
- /* @__PURE__ */ g(oe, {}),
254
- /* @__PURE__ */ g("div", {
255
- className: "min-w-0",
256
- children: /* @__PURE__ */ g(se, {})
257
- }),
258
- /* @__PURE__ */ g(ce, {}),
259
- t ? /* @__PURE__ */ g(ze, {
260
- buttonRef: G,
261
- className: n,
262
- label: d("booking_submit"),
263
- onSubmit: X
264
- }) : null
265
- ]
266
- }), /* @__PURE__ */ g(le, {
267
- className: "mt-2",
268
- testId: "booking-home-time-slots-status"
269
- })] })
270
- }), mt = (e) => P ? /* @__PURE__ */ g(ue, {
271
- open: I === "delivery",
290
+ ] })
291
+ }), ht = (e) => P ? /* @__PURE__ */ g(de, {
292
+ open: L === "delivery",
272
293
  className: "sm:min-h-[6.75rem]",
273
- inputClassName: `${Le} bg-white`,
274
- labelClassName: Ie,
275
- startAddress: V,
276
- onStartAddressChange: H,
277
- returnAddress: U,
278
- onReturnAddressChange: W,
294
+ inputClassName: `${Re} bg-white`,
295
+ labelClassName: Le,
296
+ startAddress: H,
297
+ onStartAddressChange: U,
298
+ returnAddress: W,
299
+ onReturnAddressChange: G,
279
300
  testIdPrefix: e
280
- }) : null, ht = mt("storefront-home-fulfillment-delivery-address"), gt = mt("storefront-home-compact-fulfillment-delivery-address"), _t = /* @__PURE__ */ _(he, {
301
+ }) : null, gt = ht("storefront-home-fulfillment-delivery-address"), _t = ht("storefront-home-compact-fulfillment-delivery-address"), vt = /* @__PURE__ */ _(ge, {
281
302
  className: "border-slate-200 bg-white/80 shadow-none",
282
303
  children: [/* @__PURE__ */ _("div", {
283
304
  className: "border-b border-slate-200 px-4 py-4",
@@ -291,30 +312,26 @@ function D() {
291
312
  }), /* @__PURE__ */ _("div", {
292
313
  className: "grid gap-4 px-4 py-4",
293
314
  children: [
294
- /* @__PURE__ */ g(we, {
295
- value: I,
315
+ /* @__PURE__ */ g(Te, {
316
+ value: L,
296
317
  onValueChange: qe,
297
318
  pickupAddress: D,
298
319
  deliveryEnabled: P,
299
- deliveryDisabledReason: Ke,
300
- startAddress: V,
301
- onStartAddressChange: H,
302
- endAddress: U,
303
- onEndAddressChange: W,
320
+ deliveryDisabledReason: F,
321
+ startAddress: H,
322
+ onStartAddressChange: U,
323
+ endAddress: W,
324
+ onEndAddressChange: G,
304
325
  showDeliveryAddressSelector: !1,
305
326
  testIdPrefix: "storefront-home-fulfillment"
306
327
  }),
307
- Q({ className: "grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-[minmax(0,1fr)_150px_minmax(0,1fr)_150px] xl:items-start" }),
308
- ht,
309
- /* @__PURE__ */ g("p", {
310
- className: "text-xs text-slate-600",
311
- children: /* @__PURE__ */ g("span", { children: d("booking_minimum_duration", { hours: 4 }) })
312
- }),
328
+ mt({ className: "grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-[minmax(0,1fr)_150px_minmax(0,1fr)_150px] xl:items-start" }),
329
+ gt,
313
330
  /* @__PURE__ */ _(u, {
314
- ref: G,
315
- className: "h-11 w-fit justify-self-start rounded-xl text-sm font-semibold gap-2",
331
+ ref: K,
332
+ className: "h-11 w-full justify-self-start gap-2 rounded-xl text-sm font-semibold sm:w-fit",
316
333
  disabled: !ut,
317
- onClick: X,
334
+ onClick: Z,
318
335
  children: [/* @__PURE__ */ g("span", { children: d("booking_submit") }), /* @__PURE__ */ g(b, {
319
336
  className: "h-4 w-4",
320
337
  "aria-hidden": "true"
@@ -322,33 +339,33 @@ function D() {
322
339
  })
323
340
  ]
324
341
  })]
325
- }), vt = /* @__PURE__ */ g(he, {
342
+ }), yt = /* @__PURE__ */ g(ge, {
326
343
  className: "border-slate-200 bg-white/95 shadow-xl",
327
344
  children: /* @__PURE__ */ _("div", {
328
345
  className: "grid gap-3 p-4",
329
346
  children: [
330
- /* @__PURE__ */ g("div", { children: /* @__PURE__ */ g(we, {
331
- value: I,
347
+ /* @__PURE__ */ g("div", { children: /* @__PURE__ */ g(Te, {
348
+ value: L,
332
349
  onValueChange: qe,
333
350
  pickupAddress: D,
334
351
  deliveryEnabled: P,
335
- deliveryDisabledReason: Ke,
336
- startAddress: V,
337
- onStartAddressChange: H,
338
- endAddress: U,
339
- onEndAddressChange: W,
352
+ deliveryDisabledReason: F,
353
+ startAddress: H,
354
+ onStartAddressChange: U,
355
+ endAddress: W,
356
+ onEndAddressChange: G,
340
357
  showDeliveryAddressSelector: !1,
341
358
  testIdPrefix: "storefront-home-compact-fulfillment"
342
359
  }) }),
343
- Q({
360
+ mt({
344
361
  className: "grid gap-3 md:grid-cols-2 xl:grid-cols-[minmax(0,1fr)_150px_minmax(0,1fr)_150px_auto] xl:items-end",
345
362
  showSubmitButton: !0,
346
- submitButtonClassName: "h-10 rounded-xl text-sm font-semibold xl:self-end"
363
+ submitButtonClassName: "h-10 w-full rounded-xl text-sm font-semibold md:w-fit xl:self-end"
347
364
  }),
348
- gt
365
+ _t
349
366
  ]
350
367
  })
351
- }), $ = (w.content?.galleryImageIds ?? []).map((e) => e.trim()).filter((e) => e.length > 0), yt = $.map((e) => c(e, S ?? w.storeSlug, 320)).filter((e) => e.length > 0), bt = [...k, ...Ve].flatMap((e) => Array.isArray(e.images) ? e.images : []).filter((e) => typeof e == "string" && e.trim().length > 0).map((e) => e.trim()).slice(0, 12), xt = Be(yt.length > 0 ? yt : bt), St = $[0] ? c($[0], S ?? w.storeSlug, 1600) : ve, Ct = q ? /* @__PURE__ */ g("style", { children: "\n @keyframes storefront-hero-marquee-up {\n 0% { transform: translateY(0); }\n 100% { transform: translateY(calc(-50% - (var(--storefront-hero-marquee-gap) / 2))); }\n }\n @keyframes storefront-hero-marquee-down {\n 0% { transform: translateY(calc(-50% - (var(--storefront-hero-marquee-gap) / 2))); }\n 100% { transform: translateY(0); }\n }\n .storefront-hero-marquee-track {\n animation: storefront-hero-marquee-up var(--storefront-hero-marquee-duration, 32s) linear infinite;\n will-change: transform;\n }\n .storefront-hero-marquee-track-reverse {\n animation-name: storefront-hero-marquee-down;\n }\n @media (prefers-reduced-motion: reduce) {\n .storefront-hero-marquee-track,\n .storefront-hero-marquee-track-reverse {\n animation: none !important;\n transform: none !important;\n }\n }\n " }) : null, wt = (e) => /* @__PURE__ */ g("div", {
368
+ }), $ = (w.content?.galleryImageIds ?? []).map((e) => e.trim()).filter((e) => e.length > 0), bt = $.map((e) => c(e, S ?? w.storeSlug, 320)).filter((e) => e.length > 0), xt = [...k, ...He].flatMap((e) => Array.isArray(e.images) ? e.images : []).filter((e) => typeof e == "string" && e.trim().length > 0).map((e) => e.trim()).slice(0, 12), St = Ve(bt.length > 0 ? bt : xt), Ct = $[0] ? c($[0], S ?? w.storeSlug, 1600) : ye, wt = J ? /* @__PURE__ */ g("style", { children: "\n @keyframes storefront-hero-marquee-up {\n 0% { transform: translateY(0); }\n 100% { transform: translateY(calc(-50% - (var(--storefront-hero-marquee-gap) / 2))); }\n }\n @keyframes storefront-hero-marquee-down {\n 0% { transform: translateY(calc(-50% - (var(--storefront-hero-marquee-gap) / 2))); }\n 100% { transform: translateY(0); }\n }\n .storefront-hero-marquee-track {\n animation: storefront-hero-marquee-up var(--storefront-hero-marquee-duration, 32s) linear infinite;\n will-change: transform;\n }\n .storefront-hero-marquee-track-reverse {\n animation-name: storefront-hero-marquee-down;\n }\n @media (prefers-reduced-motion: reduce) {\n .storefront-hero-marquee-track,\n .storefront-hero-marquee-track-reverse {\n animation: none !important;\n transform: none !important;\n }\n }\n " }) : null, Tt = (e) => /* @__PURE__ */ g("div", {
352
369
  className: y("relative h-full min-h-[340px] overflow-hidden", e),
353
370
  style: {
354
371
  WebkitMaskImage: "linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%)",
@@ -361,8 +378,8 @@ function D() {
361
378
  "aria-hidden": "true",
362
379
  children: /* @__PURE__ */ g("div", {
363
380
  className: "absolute inset-0 grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-6",
364
- children: xt.map((e, t) => {
365
- let n = Re[t % Re.length] ?? 32, r = [...e, ...e];
381
+ children: St.map((e, t) => {
382
+ let n = ze[t % ze.length] ?? 32, r = [...e, ...e];
366
383
  return /* @__PURE__ */ g("div", {
367
384
  className: y("relative min-h-0 overflow-hidden", t === 2 && "hidden md:block", t >= 3 && "hidden lg:block"),
368
385
  children: /* @__PURE__ */ g("div", {
@@ -389,26 +406,26 @@ function D() {
389
406
  }, `hero-marquee-column-${t}`);
390
407
  })
391
408
  })
392
- }), Tt = q ? /* @__PURE__ */ g("div", {
409
+ }), Et = J ? /* @__PURE__ */ g("div", {
393
410
  className: "pointer-events-none absolute inset-0 hidden lg:block",
394
411
  "aria-hidden": "true",
395
412
  children: /* @__PURE__ */ _("div", {
396
413
  className: "mx-auto grid h-full max-w-7xl grid-cols-12 gap-8 px-4 sm:px-6",
397
414
  children: [/* @__PURE__ */ g("div", { className: "lg:col-span-5" }), /* @__PURE__ */ g("div", {
398
415
  className: "lg:col-span-7",
399
- children: wt()
416
+ children: Tt()
400
417
  })]
401
418
  })
402
- }) : null, Et = q ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
419
+ }) : null, Dt = J ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
403
420
  className: "lg:hidden",
404
- children: wt()
421
+ children: Tt()
405
422
  }), /* @__PURE__ */ g("div", {
406
423
  className: "hidden min-h-[510px] lg:block",
407
424
  "aria-hidden": "true"
408
425
  })] }) : /* @__PURE__ */ _("div", {
409
426
  className: "relative min-h-[340px] overflow-hidden rounded-3xl border border-slate-200 bg-slate-900 shadow-sm lg:min-h-[510px]",
410
427
  children: [/* @__PURE__ */ g("img", {
411
- src: St,
428
+ src: Ct,
412
429
  alt: "",
413
430
  className: "absolute inset-0 h-full w-full object-cover",
414
431
  "aria-hidden": "true"
@@ -430,36 +447,36 @@ function D() {
430
447
  style: { backgroundImage: "radial-gradient(circle at 20% 20%, rgba(15, 23, 42, 0.9) 0px, transparent 55%), radial-gradient(circle at 80% 35%, rgba(14, 116, 144, 0.9) 0px, transparent 55%), radial-gradient(circle at 55% 85%, rgba(99, 102, 241, 0.9) 0px, transparent 55%)" },
431
448
  "aria-hidden": "true"
432
449
  }),
433
- Ct,
434
- Tt,
435
- J ? /* @__PURE__ */ _("div", {
450
+ wt,
451
+ Et,
452
+ Y ? /* @__PURE__ */ _("div", {
436
453
  className: "relative mx-auto grid max-w-7xl gap-x-8 px-4 py-10 sm:px-6 lg:grid-cols-12 lg:py-14",
437
454
  children: [
438
455
  /* @__PURE__ */ g("div", {
439
- className: "lg:col-span-5 lg:col-start-1 lg:row-start-1",
456
+ className: "min-w-0 lg:col-span-5 lg:col-start-1 lg:row-start-1",
440
457
  children: pt
441
458
  }),
442
459
  /* @__PURE__ */ g("div", {
443
- className: y("mt-8 lg:col-span-7 lg:col-start-6 lg:row-span-2 lg:row-start-1 lg:mt-0", !q && "lg:pt-4"),
444
- children: Et
460
+ className: y("mt-8 min-w-0 lg:col-span-7 lg:col-start-6 lg:row-span-2 lg:row-start-1 lg:mt-0", !J && "lg:pt-4"),
461
+ children: Dt
445
462
  }),
446
463
  /* @__PURE__ */ g("div", {
447
464
  className: "relative z-20 mt-4 lg:col-span-5 lg:col-start-1 lg:row-start-2 lg:mt-7",
448
465
  "data-testid": "storefront-home-booking-bar",
449
466
  children: /* @__PURE__ */ g("div", {
450
467
  className: "lg:w-[calc(100%+24rem)] lg:max-w-none",
451
- children: vt
468
+ children: yt
452
469
  })
453
470
  })
454
471
  ]
455
472
  }) : /* @__PURE__ */ _("div", {
456
473
  className: "relative mx-auto grid max-w-7xl gap-8 px-4 py-10 sm:px-6 lg:grid-cols-12 lg:items-center lg:py-14",
457
474
  children: [/* @__PURE__ */ g("div", {
458
- className: "lg:col-span-5",
475
+ className: "min-w-0 lg:col-span-5",
459
476
  children: pt
460
477
  }), /* @__PURE__ */ g("div", {
461
- className: "lg:col-span-7",
462
- children: _t
478
+ className: "min-w-0 lg:col-span-7",
479
+ children: vt
463
480
  })]
464
481
  })
465
482
  ]
@@ -489,13 +506,13 @@ function D() {
489
506
  }), /* @__PURE__ */ g("div", {
490
507
  className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
491
508
  children: rt.map((e) => {
492
- let t = e.id, n = e.slug, r = s(e.name, x.language, O), i = s(e.description, x.language, O), a = typeof e.images?.[0] == "string" ? e.images[0].trim() : "", o = ye(e.primaryImageStyle), c = ee(e.availabilityStatus), u = ft(n);
509
+ let t = e.id, n = e.slug, r = s(e.name, x.language, O), i = s(e.description, x.language, O), a = typeof e.images?.[0] == "string" ? e.images[0].trim() : "", o = be(e.primaryImageStyle), c = ee(e.availabilityStatus), u = ft(n);
493
510
  return /* @__PURE__ */ _("div", {
494
- className: "group flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 text-left shadow-sm transition hover:border-slate-400",
511
+ className: "group flex h-full min-w-0 flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 text-left shadow-sm transition hover:border-slate-400",
495
512
  children: [
496
513
  /* @__PURE__ */ g(v, {
497
514
  to: u,
498
- state: Z,
515
+ state: Q,
499
516
  className: "block",
500
517
  children: /* @__PURE__ */ g("span", {
501
518
  className: y("relative block aspect-[1618/1000] overflow-hidden rounded-xl", o.className),
@@ -507,7 +524,7 @@ function D() {
507
524
  loading: "lazy"
508
525
  }) : /* @__PURE__ */ g("span", {
509
526
  className: "absolute inset-0 flex items-center justify-center text-slate-400",
510
- children: /* @__PURE__ */ g(je, {
527
+ children: /* @__PURE__ */ g(Me, {
511
528
  className: "h-8 w-8",
512
529
  "aria-hidden": "true"
513
530
  })
@@ -519,11 +536,11 @@ function D() {
519
536
  children: [
520
537
  /* @__PURE__ */ g(v, {
521
538
  to: u,
522
- state: Z,
539
+ state: Q,
523
540
  className: "text-sm font-semibold text-slate-950 hover:text-slate-700",
524
541
  children: /* @__PURE__ */ g("span", { children: r })
525
542
  }),
526
- /* @__PURE__ */ g(_e, {
543
+ /* @__PURE__ */ g(ve, {
527
544
  prices: e.prices,
528
545
  className: "self-start"
529
546
  }),
@@ -546,7 +563,7 @@ function D() {
546
563
  }),
547
564
  /* @__PURE__ */ g(v, {
548
565
  to: u,
549
- state: Z,
566
+ state: Q,
550
567
  className: "text-xs font-medium text-slate-700 hover:text-slate-950",
551
568
  children: /* @__PURE__ */ g("span", { children: d("product_details_link") })
552
569
  })
@@ -576,12 +593,12 @@ function D() {
576
593
  })
577
594
  }), /* @__PURE__ */ g("div", {
578
595
  className: "mt-6 grid gap-4 md:grid-cols-2",
579
- children: k.map((e) => /* @__PURE__ */ g(be, {
596
+ children: k.map((e) => /* @__PURE__ */ g(xe, {
580
597
  bike: e,
581
598
  detailsPath: ft(e.slug),
582
- productDetailsLinkState: Z,
599
+ productDetailsLinkState: Q,
583
600
  fallbackLanguage: O,
584
- onAction: X
601
+ onAction: Z
585
602
  }, e.id))
586
603
  })]
587
604
  })
@@ -602,10 +619,10 @@ function D() {
602
619
  })
603
620
  }), /* @__PURE__ */ g("div", {
604
621
  className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
605
- children: Ve.slice(0, 4).map((e) => {
606
- let t = s(e.name, x.language, O), n = s(e.description, x.language, O), r = s(e.warning, x.language, O), i = typeof e.images?.[0] == "string" ? e.images[0].trim() : "", a = ye(e.primaryImageStyle);
622
+ children: He.slice(0, 4).map((e) => {
623
+ let t = s(e.name, x.language, O), n = s(e.description, x.language, O), r = s(e.warning, x.language, O), i = typeof e.images?.[0] == "string" ? e.images[0].trim() : "", a = be(e.primaryImageStyle);
607
624
  return /* @__PURE__ */ _("div", {
608
- className: "flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 shadow-sm",
625
+ className: "flex h-full min-w-0 flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 shadow-sm",
609
626
  children: [
610
627
  /* @__PURE__ */ g("div", {
611
628
  className: y("relative aspect-[1618/1000] overflow-hidden rounded-xl", a.className),
@@ -617,7 +634,7 @@ function D() {
617
634
  loading: "lazy"
618
635
  }) : /* @__PURE__ */ g("div", {
619
636
  className: "absolute inset-0 flex items-center justify-center text-slate-400",
620
- children: /* @__PURE__ */ g(je, {
637
+ children: /* @__PURE__ */ g(Me, {
621
638
  className: "h-8 w-8",
622
639
  "aria-hidden": "true"
623
640
  })
@@ -634,7 +651,7 @@ function D() {
634
651
  className: "line-clamp-2 text-xs text-slate-600",
635
652
  children: /* @__PURE__ */ g("span", { children: n })
636
653
  }),
637
- /* @__PURE__ */ g(ge, {
654
+ /* @__PURE__ */ g(_e, {
638
655
  warning: r,
639
656
  className: "mt-1"
640
657
  })
@@ -642,7 +659,7 @@ function D() {
642
659
  }),
643
660
  /* @__PURE__ */ g("div", {
644
661
  className: "flex items-center justify-between gap-2",
645
- children: /* @__PURE__ */ g(_e, {
662
+ children: /* @__PURE__ */ g(ve, {
646
663
  prices: e.prices,
647
664
  openOnHover: !1
648
665
  })
@@ -652,10 +669,10 @@ function D() {
652
669
  })
653
670
  })]
654
671
  }),
655
- /* @__PURE__ */ g(pe, {}),
656
672
  /* @__PURE__ */ g(me, {}),
657
- /* @__PURE__ */ g(fe, {}),
658
- /* @__PURE__ */ g(de, { storeSlug: S ?? "" })
673
+ /* @__PURE__ */ g(he, {}),
674
+ /* @__PURE__ */ g(pe, {}),
675
+ /* @__PURE__ */ g(fe, { storeSlug: S ?? "" })
659
676
  ] });
660
677
  }
661
678
  //#endregion