@loczer/storefront-sdk 0.215.0 → 0.217.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 (45) hide show
  1. package/dist/components/BookingBikeQuickAddCard/index.js +1 -1
  2. package/dist/components/BookingBikeVariantDialog/index.js +1 -1
  3. package/dist/components/BookingPeriodSelector/components/BookingEndDateField.d.ts.map +1 -1
  4. package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +82 -83
  5. package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.d.ts +5 -1
  6. package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.d.ts.map +1 -1
  7. package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.js +135 -149
  8. package/dist/components/BookingPeriodSelector/components/BookingStartDateField.d.ts.map +1 -1
  9. package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +34 -35
  10. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
  11. package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +233 -228
  12. package/dist/components/ContactSection/index.js +1 -1
  13. package/dist/components/Footer/BusinessHours.d.ts +2 -9
  14. package/dist/components/Footer/BusinessHours.d.ts.map +1 -1
  15. package/dist/components/Footer/BusinessHours.js +48 -91
  16. package/dist/components/Footer/BusinessHoursOverviewDialog.d.ts +11 -0
  17. package/dist/components/Footer/BusinessHoursOverviewDialog.d.ts.map +1 -0
  18. package/dist/components/Footer/BusinessHoursOverviewDialog.js +161 -0
  19. package/dist/components/Footer/businessHoursUtils.d.ts +37 -1
  20. package/dist/components/Footer/businessHoursUtils.d.ts.map +1 -1
  21. package/dist/components/Footer/businessHoursUtils.js +112 -15
  22. package/dist/components/Footer/index.d.ts.map +1 -1
  23. package/dist/components/Footer/index.js +78 -94
  24. package/dist/components/payment/StripeCardFieldsForm.d.ts.map +1 -1
  25. package/dist/components/payment/StripeCardFieldsForm.js +43 -33
  26. package/dist/i18n/en.d.ts +5 -0
  27. package/dist/i18n/en.d.ts.map +1 -1
  28. package/dist/i18n/en.js +5 -0
  29. package/dist/i18n/fr.d.ts +5 -0
  30. package/dist/i18n/fr.d.ts.map +1 -1
  31. package/dist/i18n/fr.js +5 -0
  32. package/dist/index.d.ts +15 -1
  33. package/dist/pages/BookingPage.d.ts.map +1 -1
  34. package/dist/pages/BookingPage.js +244 -216
  35. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  36. package/dist/pages/CheckoutPage.js +219 -219
  37. package/dist/pages/HomePage.d.ts.map +1 -1
  38. package/dist/pages/HomePage.js +377 -328
  39. package/dist/pages/ProductPage.d.ts.map +1 -1
  40. package/dist/pages/ProductPage.js +182 -182
  41. package/dist/storefront.css +1 -1
  42. package/dist/ui/drawer.d.ts +1 -0
  43. package/dist/ui/drawer.d.ts.map +1 -1
  44. package/dist/ui/drawer.js +13 -13
  45. package/package.json +1 -1
@@ -1,51 +1,54 @@
1
1
  import { BOOKING_SEARCH_KEYS as e, applyBookingParamsToSearch as t, createBookingPeriodConfigFromStorefrontConfiguration as n, getBookingParamsFromSearch as r, getDefaultBookingParamsForStorefrontConfiguration as i, resolveBookingSearchParamsFromSessionStorage as a, writeBookingSearchParamsToSessionStorage as o } from "../lib/booking.js";
2
2
  import { getLocalizedValue as s } from "../localization.js";
3
3
  import { getAvailabilityVariant as ee } from "../lib/utils.js";
4
- import { buildStorefrontImageUrl as c } from "../lib/storefrontImage.js";
4
+ import { resolveStorefrontMapsHref as c } from "../lib/storefrontContact.js";
5
+ import { buildStorefrontImageUrl as l } from "../lib/storefrontImage.js";
5
6
  import "../lib/storefrontMissingValues.js";
6
- import { Badge as l } from "../ui/badge.js";
7
- import { Button as u } from "../ui/button.js";
8
- import { useStorefront as te, useStorefrontProducts as ne } from "../StorefrontContext.js";
9
- import { usePlaygroundDevSettings as re } from "../lib/playgroundDevSettings.js";
10
- import { BookingPeriodProvider as ie, useBookingPeriod as d } from "../components/BookingPeriodSelector/BookingPeriodContext.js";
11
- import { BookingStartDateField as ae } from "../components/BookingPeriodSelector/components/BookingStartDateField.js";
12
- import { BookingStartTimeField as oe } from "../components/BookingPeriodSelector/components/BookingStartTimeField.js";
13
- import { BookingEndDateField as se } from "../components/BookingPeriodSelector/components/BookingEndDateField.js";
14
- import { BookingEndTimeField as ce } from "../components/BookingPeriodSelector/components/BookingEndTimeField.js";
15
- import { BookingTimeSlotsStatus as le } from "../components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js";
16
- import { BookingMobileDateDrawer as ue } from "../components/BookingPeriodSelector/components/BookingMobileDateDrawer.js";
7
+ import { buildBusinessHoursSeasonSummary as te, normalizeStorefrontOpeningHours as ne, normalizeStorefrontOpeningHoursOverrides as re } from "../components/Footer/businessHoursUtils.js";
8
+ import { Badge as u } from "../ui/badge.js";
9
+ import { Button as ie } from "../ui/button.js";
10
+ import { useStorefront as ae, useStorefrontProducts as oe } from "../StorefrontContext.js";
11
+ import { usePlaygroundDevSettings as se } from "../lib/playgroundDevSettings.js";
12
+ import { BookingPeriodProvider as ce, useBookingPeriod as d } from "../components/BookingPeriodSelector/BookingPeriodContext.js";
13
+ import { BookingStartDateField as le } from "../components/BookingPeriodSelector/components/BookingStartDateField.js";
14
+ import { BookingStartTimeField as ue } from "../components/BookingPeriodSelector/components/BookingStartTimeField.js";
15
+ import { BookingEndDateField as de } from "../components/BookingPeriodSelector/components/BookingEndDateField.js";
16
+ import { BookingEndTimeField as fe } from "../components/BookingPeriodSelector/components/BookingEndTimeField.js";
17
+ import { BookingTimeSlotsStatus as pe } from "../components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js";
18
+ import { BookingMobileDateDrawer as me } from "../components/BookingPeriodSelector/components/BookingMobileDateDrawer.js";
17
19
  import "../components/BookingPeriodSelector/index.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";
20
+ import { DeliveryAddressSelector as he } from "../components/DeliveryAddressSelector/index.js";
21
+ import { ContactSection as ge } from "../components/ContactSection/index.js";
22
+ import { TestimonialsSection as _e } from "../components/TestimonialsSection/index.js";
23
+ import { AboutSection as ve } from "../components/AboutSection/index.js";
24
+ import { ItinerariesSection as ye } from "../components/Itineraries/ItinerariesSection.js";
23
25
  import "../components/Itineraries/index.js";
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";
35
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
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";
38
- import { cn as y } from "@rpcbase/ui";
39
- import { ArrowRight as b, Bike as Me, Clock as Ne, MapPin as Pe, ShieldCheck as Fe, Truck as Ie } from "lucide-react";
26
+ import { Card as be } from "../ui/card.js";
27
+ import { ProductWarningNotice as xe } from "../components/ProductWarningNotice/index.js";
28
+ import { ProductPriceBadge as Se } from "../components/ProductPriceBadge/index.js";
29
+ import Ce from "../chunks/assets/playground-hero-preview-kf4c9tSc.js";
30
+ import { resolveProductImageContainerStyle as we } from "../lib/productImageStyles.js";
31
+ import { BikeProductCard as Te } from "../components/BikeProductCard/index.js";
32
+ import { BusinessHoursOverviewDialog as Ee } from "../components/Footer/BusinessHoursOverviewDialog.js";
33
+ import { StorefrontCancellationPolicyNotice as De } from "../components/StorefrontCancellationPolicyNotice/index.js";
34
+ import { StorefrontInsuranceNotice as Oe } from "../components/StorefrontInsuranceNotice/index.js";
35
+ import { createStorefrontTimeSlotsFetcher as ke } from "../lib/fetchStorefrontTimeSlots.js";
36
+ import { FulfillmentSection as Ae } from "../components/FulfillmentSection/index.js";
37
+ import { useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
38
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
39
+ import { Link as y, useLocation as je, useNavigate as Me, useParams as Ne, useSearchParams as Pe } from "@rpcbase/router";
40
+ import { useTranslation as Fe } from "react-i18next";
41
+ import { cn as b } from "@rpcbase/ui";
42
+ import { ArrowRight as x, Bike as Ie, Clock as Le, MapPin as Re, ShieldCheck as ze, Truck as Be } from "lucide-react";
40
43
  //#region src/pages/HomePage.tsx
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 = [
44
+ var S = (e) => String(e).padStart(2, "0"), Ve = "text-2xs font-semibold uppercase tracking-wide text-slate-600", He = "h-10", C = "show_business_hours_modal", w = 6, T = 5, Ue = [
42
45
  15,
43
46
  25,
44
47
  42,
45
48
  66,
46
49
  33,
47
50
  54
48
- ], w = [
51
+ ], E = [
49
52
  "4 / 5",
50
53
  "1 / 1",
51
54
  "3 / 4",
@@ -54,44 +57,63 @@ var x = (e) => String(e).padStart(2, "0"), Le = "text-2xs font-semibold uppercas
54
57
  "4 / 3",
55
58
  "9 / 16",
56
59
  "6 / 7"
57
- ], Be = ({ buttonRef: e, className: t, label: n, onSubmit: r }) => {
60
+ ], We = ({ buttonRef: e, className: t, label: n, onSubmit: r }) => {
58
61
  let { hasConfirmedTimeSlots: i, startTime: a, endTime: o } = d();
59
- return /* @__PURE__ */ _(u, {
62
+ return /* @__PURE__ */ v(ie, {
60
63
  ref: e,
61
- className: y("gap-2", t),
64
+ className: b("gap-2", t),
62
65
  disabled: !i || !a || !o,
63
66
  onClick: r,
64
- children: [/* @__PURE__ */ g("span", { children: n }), /* @__PURE__ */ g(b, {
67
+ children: [/* @__PURE__ */ _("span", { children: n }), /* @__PURE__ */ _(x, {
65
68
  className: "h-4 w-4",
66
69
  "aria-hidden": "true"
67
70
  })]
68
71
  });
69
- }, T = (e) => `${e.getFullYear()}-${x(e.getMonth() + 1)}-${x(e.getDate())}`, E = (e) => {
72
+ }, D = (e) => `${e.getFullYear()}-${S(e.getMonth() + 1)}-${S(e.getDate())}`, O = (e) => {
70
73
  if (!e) return;
71
74
  let t = e.match(/^(\d{4})-(\d{2})-(\d{2})$/);
72
75
  if (!t) return;
73
76
  let n = Number(t[1]), r = Number(t[2]), i = Number(t[3]), a = new Date(n, r - 1, i);
74
77
  if (!(Number.isNaN(a.getTime()) || a.getFullYear() !== n || a.getMonth() !== r - 1 || a.getDate() !== i)) return a;
75
- }, Ve = (e) => {
76
- let t = e.length > 0 ? e : [ye];
77
- return Array.from({ length: S }, (e, n) => Array.from({ length: C }, (e, r) => {
78
- let i = n * C + r;
78
+ }, Ge = (e) => {
79
+ let t = e.length > 0 ? e : [Ce];
80
+ return Array.from({ length: w }, (e, n) => Array.from({ length: T }, (e, r) => {
81
+ let i = n * T + r;
79
82
  return {
80
- aspectRatio: w[(i + n) % w.length] ?? w[0],
83
+ aspectRatio: E[(i + n) % E.length] ?? E[0],
81
84
  src: t[i % t.length] ?? "data:image/svg+xml,%3csvg%20width='1600'%20height='1066'%20viewBox='0%200%201600%201066'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='1600'%20y2='1066'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230F172A'/%3e%3cstop%20offset='1'%20stop-color='%23164E63'/%3e%3c/linearGradient%3e%3clinearGradient%20id='road'%20x1='0'%20y1='740'%20x2='1600'%20y2='1066'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23334155'/%3e%3cstop%20offset='1'%20stop-color='%230F172A'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20width='1600'%20height='1066'%20fill='url(%23bg)'/%3e%3cpath%20d='M0%20675C233%20555%20420%20530%20590%20551C752%20571%20930%20635%201088%20632C1252%20629%201423%20559%201600%20498V1066H0V675Z'%20fill='%231E293B'%20opacity='0.7'/%3e%3cpath%20d='M0%20792C213%20710%20393%20686%20573%20697C760%20708%20945%20760%201123%20761C1286%20762%201437%20722%201600%20666V1066H0V792Z'%20fill='url(%23road)'/%3e%3ccircle%20cx='440'%20cy='620'%20r='92'%20stroke='%23F8FAFC'%20stroke-width='18'%20opacity='0.8'/%3e%3ccircle%20cx='740'%20cy='620'%20r='92'%20stroke='%23F8FAFC'%20stroke-width='18'%20opacity='0.8'/%3e%3cpath%20d='M440%20620L560%20520L650%20620H740M560%20520L610%20445M595%20470H665'%20stroke='%23F8FAFC'%20stroke-width='18'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3ccircle%20cx='980'%20cy='700'%20r='80'%20stroke='%23E2E8F0'%20stroke-width='14'%20opacity='0.7'/%3e%3ccircle%20cx='1240'%20cy='700'%20r='80'%20stroke='%23E2E8F0'%20stroke-width='14'%20opacity='0.7'/%3e%3cpath%20d='M980%20700L1078%20616L1156%20700H1240M1078%20616L1122%20556M1112%20574H1172'%20stroke='%23E2E8F0'%20stroke-width='14'%20stroke-linecap='round'%20stroke-linejoin='round'%20opacity='0.7'/%3e%3c/svg%3e"
82
85
  };
83
86
  }));
84
87
  };
85
- function D() {
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(() => {
87
- let e = E(j.get("start_date")) ?? N;
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(() => ({
88
+ function k() {
89
+ let { t: d, i18n: S } = Fe(), { storeSlug: w } = Ne(), T = je(), { storefrontConfiguration: E } = ae(), k = E.shop.address?.trim() ?? "", A = E.workspace?.workspaceLanguage, { seasons: Ke, exceptions: qe } = te({
90
+ openingHours: ne(E.bookingEngine.shop.openingHours),
91
+ openingHoursOverrides: re(E.bookingEngine.shop.openingHoursOverrides),
92
+ language: S.language || A || "en",
93
+ closedLabel: d("footer_business_hours_closed"),
94
+ formatWeekdayRange: (e, t) => d("footer_business_hours_weekday_range", {
95
+ start: e,
96
+ end: t
97
+ }),
98
+ formatSeasonRange: (e, t) => d("footer_business_hours_season_range", {
99
+ start: e,
100
+ end: t
101
+ }),
102
+ includeReferenceDateOverrideInSeason: !1
103
+ }), Je = Ke.length > 0 || qe.length > 0, Ye = c(E.shop), { bikes: j, accessories: Xe } = oe(), [M, N] = Pe(), Ze = M.get(C) === "true", Qe = Me(), P = p(() => a(M, w), [M, w]), $e = p(() => n(E), [E]), F = p(() => i(E), [E]), I = p(() => O(F.start_date), [F.start_date]), et = p(() => O(F.end_date) ?? I, [F.end_date, I]), L = E.settings.fulfillmentModes.includes("delivery"), tt = E.settings.deliveryDisabledReason.trim(), R = p(() => r(P, F), [F, P]), [z, nt] = h(() => R.fulfillment === "delivery" && L ? "delivery" : "pickup"), [B, rt] = h(() => O(P.get("start_date")) ?? I), [V, it] = h(() => P.get("start_time") ?? F.start_time), [H, at] = h(() => {
104
+ let e = O(P.get("start_date")) ?? I;
105
+ return O(P.get("end_date")) ?? e ?? et;
106
+ }), [U, ot] = h(() => P.get("end_time") ?? F.end_time), [st, ct] = h(void 0), lt = m(void 0), [ut, dt] = h(!1), [W, G] = h(() => R.start_address), [K, q] = h(() => R.end_address), ft = m(null), pt = (e) => {
107
+ let t = new URLSearchParams(M);
108
+ e ? t.set(C, "true") : t.delete(C), N(t, { replace: !0 });
109
+ }, mt = [
110
+ B ? D(B) : "",
111
+ V,
112
+ H ? D(H) : "",
113
+ U
114
+ ].join(":"), ht = m(mt);
115
+ ht.current = mt;
116
+ let J = st === mt, gt = p(() => j.slice(0, 4), [j]), { heroMode: _t } = se(), vt = _t ?? E.content?.heroMode ?? "current_booking_hero", Y = vt === "vertical_marquee_hero", X = vt === "booking_bar_overlay_hero" || Y, yt = ke(w), bt = p(() => ({
95
117
  startDate: d("booking_start_date"),
96
118
  pickStartDate: d("booking_start_date"),
97
119
  startTime: d("booking_start_time"),
@@ -106,268 +128,288 @@ function D() {
106
128
  timeSlotsUnavailable: d("booking_time_slots_unavailable"),
107
129
  timeSlotsLoadError: d("booking_time_slots_load_error"),
108
130
  retryTimeSlots: d("booking_time_slots_retry")
109
- }), [x.language, d]), X = p(() => {
110
- let e = R ?? N ?? /* @__PURE__ */ new Date(), n = B ?? e;
131
+ }), [S.language, d]), Z = p(() => {
132
+ let e = B ?? I ?? /* @__PURE__ */ new Date(), n = H ?? e;
111
133
  return t(new URLSearchParams(), {
112
- fulfillment: L === "delivery" && P ? "delivery" : "pickup",
113
- start_date: T(e),
114
- start_time: q ? z : "",
115
- end_date: T(n),
116
- end_time: q ? V : "",
117
- start_address: H,
118
- end_address: W
134
+ fulfillment: z === "delivery" && L ? "delivery" : "pickup",
135
+ start_date: D(e),
136
+ start_time: J ? V : "",
137
+ end_date: D(n),
138
+ end_time: J ? U : "",
139
+ start_address: W,
140
+ end_address: K
119
141
  });
120
142
  }, [
121
- N,
122
- P,
123
- W,
124
- B,
125
- V,
143
+ I,
126
144
  L,
127
- q,
145
+ K,
128
146
  H,
129
- R,
130
- z
131
- ]), ct = X.toString(), lt = ct ? `?${ct}` : "";
147
+ U,
148
+ z,
149
+ J,
150
+ W,
151
+ B,
152
+ V
153
+ ]), xt = Z.toString(), St = xt ? `?${xt}` : "";
132
154
  f(() => {
133
- o(S, X);
134
- }, [X, S]), f(() => {
135
- let t = new URLSearchParams(A);
155
+ o(w, Z);
156
+ }, [Z, w]), f(() => {
157
+ let t = new URLSearchParams(M);
136
158
  for (let n of e) t.delete(n);
137
- for (let [e, n] of X.entries()) t.set(e, n);
138
- t.toString() !== A.toString() && Ue(t, { replace: !0 });
159
+ for (let [e, n] of Z.entries()) t.set(e, n);
160
+ t.toString() !== M.toString() && N(t, { replace: !0 });
139
161
  }, [
140
- X,
141
- A,
142
- Ue
162
+ Z,
163
+ M,
164
+ N
143
165
  ]), f(() => {
144
- !et || !q || (tt(!1), K.current?.focus({ preventScroll: !0 }));
145
- }, [q, et]);
146
- let ut = q && !!(z && V), dt = {
147
- startDate: R,
148
- onStartDateChange: Je,
149
- startTime: z,
150
- onStartTimeChange: Ye,
151
- endDate: B,
152
- onEndDateChange: Xe,
153
- endTime: V,
154
- onEndTimeChange: Ze,
155
- onEndTimeCommit: () => tt(!0),
156
- bookingPeriodConfig: Ge,
166
+ !ut || !J || (dt(!1), ft.current?.focus({ preventScroll: !0 }));
167
+ }, [J, ut]);
168
+ let Ct = J && !!(V && U), wt = {
169
+ startDate: B,
170
+ onStartDateChange: rt,
171
+ startTime: V,
172
+ onStartTimeChange: it,
173
+ endDate: H,
174
+ onEndDateChange: at,
175
+ endTime: U,
176
+ onEndTimeChange: ot,
177
+ onEndTimeCommit: () => dt(!0),
178
+ bookingPeriodConfig: $e,
157
179
  withMobileDateDrawer: !0,
158
- fetchTimeSlots: ot,
180
+ fetchTimeSlots: yt,
159
181
  onTimeSlotsConfirmationChange: (e) => {
160
- $e(e ? nt : void 0);
182
+ let t = e ? ht.current : void 0;
183
+ lt.current !== t && (lt.current = t, ct(t));
161
184
  },
162
- labels: st,
163
- localeCode: x.language
164
- }, Z = () => {
165
- if (!ut) return;
166
- let e = new URLSearchParams(A);
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", {
185
+ labels: bt,
186
+ localeCode: S.language
187
+ }, Tt = () => {
188
+ let e = new URLSearchParams(M);
189
+ for (let [t, n] of Z.entries()) e.set(t, n);
190
+ Qe(`/${w ?? ""}/booking?${e.toString()}#booking-products`);
191
+ }, Et = () => {
192
+ Ct && Tt();
193
+ }, Dt = (e) => `/${w ?? ""}/products/${e}`, Q = { backTo: `${T.pathname}${T.search}${T.hash}` }, Ot = /* @__PURE__ */ v("div", {
170
194
  className: "min-w-0",
171
195
  children: [
172
- /* @__PURE__ */ _("div", {
196
+ /* @__PURE__ */ v("div", {
173
197
  className: "flex min-w-0 flex-wrap items-center gap-2",
174
- children: [/* @__PURE__ */ _(l, {
198
+ children: [Je ? /* @__PURE__ */ _(u, {
199
+ asChild: !0,
175
200
  variant: "secondary",
176
- children: [/* @__PURE__ */ g(Ne, {
201
+ className: "group cursor-pointer",
202
+ children: /* @__PURE__ */ v("button", {
203
+ type: "button",
204
+ "data-testid": "storefront-business-hours-trigger",
205
+ "aria-haspopup": "dialog",
206
+ "aria-expanded": Ze,
207
+ onClick: () => pt(!0),
208
+ children: [/* @__PURE__ */ _(Le, {
209
+ className: "h-3 w-3",
210
+ "aria-hidden": "true"
211
+ }), /* @__PURE__ */ _("span", {
212
+ className: "decoration-current underline-offset-2 group-hover:underline group-focus-visible:underline",
213
+ children: d("status_open")
214
+ })]
215
+ })
216
+ }) : /* @__PURE__ */ v(u, {
217
+ variant: "secondary",
218
+ children: [/* @__PURE__ */ _(Le, {
177
219
  className: "h-3 w-3",
178
220
  "aria-hidden": "true"
179
- }), /* @__PURE__ */ g("span", { children: d("status_open") })]
180
- }), /* @__PURE__ */ _(l, {
221
+ }), /* @__PURE__ */ _("span", { children: d("status_open") })]
222
+ }), /* @__PURE__ */ v(u, {
181
223
  variant: "outline",
182
- className: y("min-w-0 max-w-full", !D && "border-destructive/40 text-destructive"),
183
- children: [/* @__PURE__ */ g(Pe, {
224
+ className: b("min-w-0 max-w-full", !k && "border-destructive/40 text-destructive"),
225
+ children: [/* @__PURE__ */ _(Re, {
184
226
  className: "h-3 w-3",
185
227
  "aria-hidden": "true"
186
- }), /* @__PURE__ */ g("span", {
228
+ }), /* @__PURE__ */ _("span", {
187
229
  className: "truncate",
188
- children: D || "[Missing shop address]"
230
+ children: k || "[Missing shop address]"
189
231
  })]
190
232
  })]
191
233
  }),
192
- /* @__PURE__ */ g("h1", {
234
+ /* @__PURE__ */ _("h1", {
193
235
  className: "mt-4 text-[1.75rem] font-semibold leading-tight tracking-tight sm:text-4xl",
194
- children: /* @__PURE__ */ g("span", { children: d("hero_title") })
236
+ children: /* @__PURE__ */ _("span", { children: d("hero_title") })
195
237
  }),
196
- /* @__PURE__ */ g("p", {
238
+ /* @__PURE__ */ _("p", {
197
239
  className: "mt-3 text-sm text-slate-700 sm:text-base",
198
- children: /* @__PURE__ */ g("span", { children: d("hero_description") })
240
+ children: /* @__PURE__ */ _("span", { children: d("hero_description") })
199
241
  }),
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"),
242
+ /* @__PURE__ */ _("div", {
243
+ className: b("mt-6", !X && "rounded-xl border bg-white/70 p-3"),
244
+ children: /* @__PURE__ */ v("ul", {
245
+ className: b("space-y-3", X && "space-y-2"),
204
246
  "data-testid": "storefront-home-trust-features",
205
247
  children: [
206
- /* @__PURE__ */ _("li", {
248
+ /* @__PURE__ */ v("li", {
207
249
  className: "flex items-start gap-3",
208
250
  "data-testid": "storefront-secure-payment-notice",
209
- children: [/* @__PURE__ */ g(Fe, {
251
+ children: [/* @__PURE__ */ _(ze, {
210
252
  className: "mt-0.5 h-5 w-5 text-success",
211
253
  "aria-hidden": "true"
212
- }), /* @__PURE__ */ _("div", {
254
+ }), /* @__PURE__ */ v("div", {
213
255
  className: "flex min-w-0 flex-col gap-0.5",
214
- children: [/* @__PURE__ */ g("p", {
256
+ children: [/* @__PURE__ */ _("p", {
215
257
  className: "text-sm font-medium text-slate-950",
216
- children: /* @__PURE__ */ g("span", { children: d("feature_secure_payment_title") })
217
- }), /* @__PURE__ */ g("p", {
258
+ children: /* @__PURE__ */ _("span", { children: d("feature_secure_payment_title") })
259
+ }), /* @__PURE__ */ _("p", {
218
260
  className: "text-xs text-slate-600",
219
- children: /* @__PURE__ */ g("span", { children: d("feature_secure_payment_description") })
261
+ children: /* @__PURE__ */ _("span", { children: d("feature_secure_payment_description") })
220
262
  })]
221
263
  })]
222
264
  }),
223
- /* @__PURE__ */ g(Se, {
224
- policy: w.bookingEngine.cancellationPolicy,
225
- className: y(!Y && "border-t border-slate-200/70 pt-3")
265
+ /* @__PURE__ */ _(De, {
266
+ policy: E.bookingEngine.cancellationPolicy,
267
+ className: b(!X && "border-t border-slate-200/70 pt-3")
226
268
  }),
227
- P ? /* @__PURE__ */ _("li", {
228
- className: y("flex items-start gap-3", !Y && "border-t border-slate-200/70 pt-3"),
269
+ L ? /* @__PURE__ */ v("li", {
270
+ className: b("flex items-start gap-3", !X && "border-t border-slate-200/70 pt-3"),
229
271
  "data-testid": "storefront-delivery-notice",
230
- children: [/* @__PURE__ */ g(Ie, {
272
+ children: [/* @__PURE__ */ _(Be, {
231
273
  className: "mt-0.5 h-5 w-5 text-slate-900",
232
274
  "aria-hidden": "true"
233
- }), /* @__PURE__ */ _("div", {
275
+ }), /* @__PURE__ */ v("div", {
234
276
  className: "flex flex-col gap-0.5",
235
- children: [/* @__PURE__ */ g("p", {
277
+ children: [/* @__PURE__ */ _("p", {
236
278
  className: "text-sm font-medium text-slate-950",
237
- children: /* @__PURE__ */ g("span", { children: d("feature_delivery_title") })
238
- }), /* @__PURE__ */ g("p", {
279
+ children: /* @__PURE__ */ _("span", { children: d("feature_delivery_title") })
280
+ }), /* @__PURE__ */ _("p", {
239
281
  className: "text-xs text-slate-600",
240
- children: /* @__PURE__ */ g("span", { children: d("feature_delivery_description") })
282
+ children: /* @__PURE__ */ _("span", { children: d("feature_delivery_description") })
241
283
  })]
242
284
  })]
243
285
  }) : 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")
286
+ /* @__PURE__ */ _(Oe, {
287
+ bikes: j,
288
+ currency: E.bookingEngine.currency,
289
+ className: b(!X && "border-t border-slate-200/70 pt-3")
248
290
  })
249
291
  ]
250
292
  })
251
293
  })
252
294
  ]
253
- }), mt = ({ className: e, showSubmitButton: t = !1, submitButtonClassName: n }) => /* @__PURE__ */ g(ie, {
254
- ...dt,
295
+ }), kt = ({ className: e, showSubmitButton: t = !1, submitButtonClassName: n }) => /* @__PURE__ */ _(ce, {
296
+ ...wt,
255
297
  selectionFlow: "dates-first",
256
- labelClassName: Le,
257
- inputClassName: Re,
258
- children: /* @__PURE__ */ _(h, { children: [
259
- /* @__PURE__ */ _("div", {
298
+ labelClassName: Ve,
299
+ inputClassName: He,
300
+ children: /* @__PURE__ */ v(g, { children: [
301
+ /* @__PURE__ */ v("div", {
260
302
  className: e,
261
303
  children: [
262
- /* @__PURE__ */ g("div", {
304
+ /* @__PURE__ */ _("div", {
263
305
  className: "min-w-0",
264
- children: /* @__PURE__ */ g(ae, {})
306
+ children: /* @__PURE__ */ _(le, {})
265
307
  }),
266
- /* @__PURE__ */ g("div", {
308
+ /* @__PURE__ */ _("div", {
267
309
  className: "min-w-0",
268
- children: /* @__PURE__ */ g(oe, {})
310
+ children: /* @__PURE__ */ _(ue, {})
269
311
  }),
270
- /* @__PURE__ */ g("div", {
312
+ /* @__PURE__ */ _("div", {
271
313
  className: "min-w-0",
272
- children: /* @__PURE__ */ g(se, {})
314
+ children: /* @__PURE__ */ _(de, {})
273
315
  }),
274
- /* @__PURE__ */ g("div", {
316
+ /* @__PURE__ */ _("div", {
275
317
  className: "min-w-0",
276
- children: /* @__PURE__ */ g(ce, {})
318
+ children: /* @__PURE__ */ _(fe, {})
277
319
  }),
278
- t ? /* @__PURE__ */ g(Be, {
279
- buttonRef: K,
320
+ t ? /* @__PURE__ */ _(We, {
321
+ buttonRef: ft,
280
322
  className: n,
281
323
  label: d("booking_submit"),
282
- onSubmit: Z
324
+ onSubmit: Et
283
325
  }) : null
284
326
  ]
285
327
  }),
286
- /* @__PURE__ */ g(ue, {}),
287
- /* @__PURE__ */ g(le, {
328
+ /* @__PURE__ */ _(me, { onContinue: Tt }),
329
+ /* @__PURE__ */ _(pe, {
288
330
  className: "mt-2",
289
331
  testId: "booking-home-time-slots-status"
290
332
  })
291
333
  ] })
292
- }), ht = (e) => P ? /* @__PURE__ */ g(de, {
293
- open: L === "delivery",
334
+ }), At = (e) => L ? /* @__PURE__ */ _(he, {
335
+ open: z === "delivery",
294
336
  className: "sm:min-h-[6.75rem]",
295
- inputClassName: `${Re} bg-white`,
296
- labelClassName: Le,
297
- startAddress: H,
298
- onStartAddressChange: U,
299
- returnAddress: W,
300
- onReturnAddressChange: G,
337
+ inputClassName: `${He} bg-white`,
338
+ labelClassName: Ve,
339
+ startAddress: W,
340
+ onStartAddressChange: G,
341
+ returnAddress: K,
342
+ onReturnAddressChange: q,
301
343
  testIdPrefix: e
302
- }) : null, gt = ht("storefront-home-fulfillment-delivery-address"), _t = ht("storefront-home-compact-fulfillment-delivery-address"), vt = /* @__PURE__ */ _(ge, {
344
+ }) : null, jt = At("storefront-home-fulfillment-delivery-address"), Mt = At("storefront-home-compact-fulfillment-delivery-address"), Nt = /* @__PURE__ */ v(be, {
303
345
  className: "border-slate-200 bg-white/80 shadow-none",
304
- children: [/* @__PURE__ */ _("div", {
346
+ children: [/* @__PURE__ */ v("div", {
305
347
  className: "border-b border-slate-200 px-4 py-4",
306
- children: [/* @__PURE__ */ g("p", {
348
+ children: [/* @__PURE__ */ _("p", {
307
349
  className: "text-sm font-semibold text-slate-950",
308
- children: /* @__PURE__ */ g("span", { children: d("booking_title") })
309
- }), /* @__PURE__ */ g("p", {
350
+ children: /* @__PURE__ */ _("span", { children: d("booking_title") })
351
+ }), /* @__PURE__ */ _("p", {
310
352
  className: "mt-1 text-xs text-slate-600",
311
- children: /* @__PURE__ */ g("span", { children: d("booking_subtitle") })
353
+ children: /* @__PURE__ */ _("span", { children: d("booking_subtitle") })
312
354
  })]
313
- }), /* @__PURE__ */ _("div", {
355
+ }), /* @__PURE__ */ v("div", {
314
356
  className: "grid gap-4 px-4 py-4",
315
357
  children: [
316
- /* @__PURE__ */ g(Te, {
317
- value: L,
318
- onValueChange: qe,
319
- pickupAddress: D,
320
- deliveryEnabled: P,
321
- deliveryDisabledReason: F,
322
- startAddress: H,
323
- onStartAddressChange: U,
324
- endAddress: W,
325
- onEndAddressChange: G,
358
+ /* @__PURE__ */ _(Ae, {
359
+ value: z,
360
+ onValueChange: nt,
361
+ pickupAddress: k,
362
+ deliveryEnabled: L,
363
+ deliveryDisabledReason: tt,
364
+ startAddress: W,
365
+ onStartAddressChange: G,
366
+ endAddress: K,
367
+ onEndAddressChange: q,
326
368
  showDeliveryAddressSelector: !1,
327
369
  testIdPrefix: "storefront-home-fulfillment"
328
370
  }),
329
- 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" }),
330
- gt,
331
- /* @__PURE__ */ _(u, {
332
- ref: K,
371
+ kt({ 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" }),
372
+ jt,
373
+ /* @__PURE__ */ v(ie, {
374
+ ref: ft,
333
375
  className: "h-11 w-full justify-self-start gap-2 rounded-xl text-sm font-semibold sm:w-fit",
334
- disabled: !ut,
335
- onClick: Z,
336
- children: [/* @__PURE__ */ g("span", { children: d("booking_submit") }), /* @__PURE__ */ g(b, {
376
+ disabled: !Ct,
377
+ onClick: Et,
378
+ children: [/* @__PURE__ */ _("span", { children: d("booking_submit") }), /* @__PURE__ */ _(x, {
337
379
  className: "h-4 w-4",
338
380
  "aria-hidden": "true"
339
381
  })]
340
382
  })
341
383
  ]
342
384
  })]
343
- }), yt = /* @__PURE__ */ g(ge, {
385
+ }), Pt = /* @__PURE__ */ _(be, {
344
386
  className: "border-slate-200 bg-white/95 shadow-xl",
345
- children: /* @__PURE__ */ _("div", {
387
+ children: /* @__PURE__ */ v("div", {
346
388
  className: "grid gap-3 p-4",
347
389
  children: [
348
- /* @__PURE__ */ g("div", { children: /* @__PURE__ */ g(Te, {
349
- value: L,
350
- onValueChange: qe,
351
- pickupAddress: D,
352
- deliveryEnabled: P,
353
- deliveryDisabledReason: F,
354
- startAddress: H,
355
- onStartAddressChange: U,
356
- endAddress: W,
357
- onEndAddressChange: G,
390
+ /* @__PURE__ */ _("div", { children: /* @__PURE__ */ _(Ae, {
391
+ value: z,
392
+ onValueChange: nt,
393
+ pickupAddress: k,
394
+ deliveryEnabled: L,
395
+ deliveryDisabledReason: tt,
396
+ startAddress: W,
397
+ onStartAddressChange: G,
398
+ endAddress: K,
399
+ onEndAddressChange: q,
358
400
  showDeliveryAddressSelector: !1,
359
401
  testIdPrefix: "storefront-home-compact-fulfillment"
360
402
  }) }),
361
- mt({
403
+ kt({
362
404
  className: "grid gap-3 md:grid-cols-2 xl:grid-cols-[minmax(0,1fr)_150px_minmax(0,1fr)_150px_auto] xl:items-end",
363
405
  showSubmitButton: !0,
364
406
  submitButtonClassName: "h-10 w-full rounded-xl text-sm font-semibold md:w-fit xl:self-end"
365
407
  }),
366
- _t
408
+ Mt
367
409
  ]
368
410
  })
369
- }), $ = (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", {
370
- className: y("relative h-full min-h-[340px] overflow-hidden", e),
411
+ }), $ = (E.content?.galleryImageIds ?? []).map((e) => e.trim()).filter((e) => e.length > 0), Ft = $.map((e) => l(e, w ?? E.storeSlug, 320)).filter((e) => e.length > 0), It = [...j, ...Xe].flatMap((e) => Array.isArray(e.images) ? e.images : []).filter((e) => typeof e == "string" && e.trim().length > 0).map((e) => e.trim()).slice(0, 12), Lt = Ge(Ft.length > 0 ? Ft : It), Rt = $[0] ? l($[0], w ?? E.storeSlug, 1600) : Ce, zt = Y ? /* @__PURE__ */ _("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, Bt = (e) => /* @__PURE__ */ _("div", {
412
+ className: b("relative h-full min-h-[340px] overflow-hidden", e),
371
413
  style: {
372
414
  WebkitMaskImage: "linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%)",
373
415
  maskImage: "linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%)",
@@ -377,196 +419,203 @@ function D() {
377
419
  maskSize: "100% 100%"
378
420
  },
379
421
  "aria-hidden": "true",
380
- children: /* @__PURE__ */ g("div", {
422
+ children: /* @__PURE__ */ _("div", {
381
423
  className: "absolute inset-0 grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-6",
382
- children: St.map((e, t) => {
383
- let n = ze[t % ze.length] ?? 32, r = [...e, ...e];
384
- return /* @__PURE__ */ g("div", {
385
- className: y("relative min-h-0 overflow-hidden", t === 2 && "hidden md:block", t >= 3 && "hidden lg:block"),
386
- children: /* @__PURE__ */ g("div", {
387
- className: y("storefront-hero-marquee-track flex flex-col gap-[var(--storefront-hero-marquee-gap)]", t % 2 == 1 && "storefront-hero-marquee-track-reverse"),
424
+ children: Lt.map((e, t) => {
425
+ let n = Ue[t % Ue.length] ?? 32, r = [...e, ...e];
426
+ return /* @__PURE__ */ _("div", {
427
+ className: b("relative min-h-0 overflow-hidden", t === 2 && "hidden md:block", t >= 3 && "hidden lg:block"),
428
+ children: /* @__PURE__ */ _("div", {
429
+ className: b("storefront-hero-marquee-track flex flex-col gap-[var(--storefront-hero-marquee-gap)]", t % 2 == 1 && "storefront-hero-marquee-track-reverse"),
388
430
  style: {
389
431
  "--storefront-hero-marquee-duration": `${n}s`,
390
432
  "--storefront-hero-marquee-gap": "0.75rem"
391
433
  },
392
- children: r.map((n, r) => /* @__PURE__ */ _("div", {
434
+ children: r.map((n, r) => /* @__PURE__ */ v("div", {
393
435
  className: "group relative overflow-hidden rounded-[1.35rem] border border-white/40 bg-transparent",
394
436
  style: { aspectRatio: n.aspectRatio },
395
437
  children: [
396
- /* @__PURE__ */ g("div", { className: "absolute inset-0 bg-linear-to-b from-white/22 via-transparent to-transparent" }),
397
- /* @__PURE__ */ g("img", {
438
+ /* @__PURE__ */ _("div", { className: "absolute inset-0 bg-linear-to-b from-white/22 via-transparent to-transparent" }),
439
+ /* @__PURE__ */ _("img", {
398
440
  src: n.src,
399
441
  alt: "",
400
442
  className: "absolute inset-0 h-full w-full object-cover opacity-90 saturate-[1.05] transition-transform duration-700 group-hover:scale-[1.04]",
401
443
  loading: r < e.length ? "eager" : "lazy"
402
444
  }),
403
- /* @__PURE__ */ g("div", { className: "absolute inset-0 bg-linear-to-t from-slate-950/40 via-slate-950/10 to-white/10" })
445
+ /* @__PURE__ */ _("div", { className: "absolute inset-0 bg-linear-to-t from-slate-950/40 via-slate-950/10 to-white/10" })
404
446
  ]
405
447
  }, `hero-marquee-tile-${t}-${r}`))
406
448
  })
407
449
  }, `hero-marquee-column-${t}`);
408
450
  })
409
451
  })
410
- }), Et = J ? /* @__PURE__ */ g("div", {
452
+ }), Vt = Y ? /* @__PURE__ */ _("div", {
411
453
  className: "pointer-events-none absolute inset-0 hidden lg:block",
412
454
  "aria-hidden": "true",
413
- children: /* @__PURE__ */ _("div", {
455
+ children: /* @__PURE__ */ v("div", {
414
456
  className: "mx-auto grid h-full max-w-7xl grid-cols-12 gap-8 px-4 sm:px-6",
415
- children: [/* @__PURE__ */ g("div", { className: "lg:col-span-5" }), /* @__PURE__ */ g("div", {
457
+ children: [/* @__PURE__ */ _("div", { className: "lg:col-span-5" }), /* @__PURE__ */ _("div", {
416
458
  className: "lg:col-span-7",
417
- children: Tt()
459
+ children: Bt()
418
460
  })]
419
461
  })
420
- }) : null, Dt = J ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
462
+ }) : null, Ht = Y ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", {
421
463
  className: "lg:hidden",
422
- children: Tt()
423
- }), /* @__PURE__ */ g("div", {
464
+ children: Bt()
465
+ }), /* @__PURE__ */ _("div", {
424
466
  className: "hidden min-h-[510px] lg:block",
425
467
  "aria-hidden": "true"
426
- })] }) : /* @__PURE__ */ _("div", {
468
+ })] }) : /* @__PURE__ */ v("div", {
427
469
  className: "relative min-h-[340px] overflow-hidden rounded-3xl border border-slate-200 bg-slate-900 shadow-sm lg:min-h-[510px]",
428
- children: [/* @__PURE__ */ g("img", {
429
- src: Ct,
470
+ children: [/* @__PURE__ */ _("img", {
471
+ src: Rt,
430
472
  alt: "",
431
473
  className: "absolute inset-0 h-full w-full object-cover",
432
474
  "aria-hidden": "true"
433
- }), /* @__PURE__ */ g("div", {
475
+ }), /* @__PURE__ */ _("div", {
434
476
  className: "absolute inset-0 bg-linear-to-t from-slate-900/45 via-slate-900/15 to-transparent",
435
477
  "aria-hidden": "true"
436
478
  })]
437
479
  });
438
- return /* @__PURE__ */ _(h, { children: [
439
- /* @__PURE__ */ _("section", {
480
+ return /* @__PURE__ */ v(g, { children: [
481
+ /* @__PURE__ */ _(Ee, {
482
+ open: Ze,
483
+ seasons: Ke,
484
+ exceptions: qe,
485
+ mapsHref: Ye,
486
+ onOpenChange: pt
487
+ }),
488
+ /* @__PURE__ */ v("section", {
440
489
  className: "relative overflow-hidden border-b border-slate-200",
441
490
  children: [
442
- /* @__PURE__ */ g("div", {
491
+ /* @__PURE__ */ _("div", {
443
492
  className: "absolute inset-0 bg-linear-to-b from-slate-50 to-white",
444
493
  "aria-hidden": "true"
445
494
  }),
446
- /* @__PURE__ */ g("div", {
495
+ /* @__PURE__ */ _("div", {
447
496
  className: "absolute inset-0 opacity-[0.07]",
448
497
  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%)" },
449
498
  "aria-hidden": "true"
450
499
  }),
451
- wt,
452
- Et,
453
- Y ? /* @__PURE__ */ _("div", {
500
+ zt,
501
+ Vt,
502
+ X ? /* @__PURE__ */ v("div", {
454
503
  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",
455
504
  children: [
456
- /* @__PURE__ */ g("div", {
505
+ /* @__PURE__ */ _("div", {
457
506
  className: "min-w-0 lg:col-span-5 lg:col-start-1 lg:row-start-1",
458
- children: pt
507
+ children: Ot
459
508
  }),
460
- /* @__PURE__ */ g("div", {
461
- 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"),
462
- children: Dt
509
+ /* @__PURE__ */ _("div", {
510
+ className: b("mt-8 min-w-0 lg:col-span-7 lg:col-start-6 lg:row-span-2 lg:row-start-1 lg:mt-0", !Y && "lg:pt-4"),
511
+ children: Ht
463
512
  }),
464
- /* @__PURE__ */ g("div", {
513
+ /* @__PURE__ */ _("div", {
465
514
  className: "relative z-20 mt-4 lg:col-span-5 lg:col-start-1 lg:row-start-2 lg:mt-7",
466
515
  "data-testid": "storefront-home-booking-bar",
467
- children: /* @__PURE__ */ g("div", {
516
+ children: /* @__PURE__ */ _("div", {
468
517
  className: "lg:w-[calc(100%+24rem)] lg:max-w-none",
469
- children: yt
518
+ children: Pt
470
519
  })
471
520
  })
472
521
  ]
473
- }) : /* @__PURE__ */ _("div", {
522
+ }) : /* @__PURE__ */ v("div", {
474
523
  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",
475
- children: [/* @__PURE__ */ g("div", {
524
+ children: [/* @__PURE__ */ _("div", {
476
525
  className: "min-w-0 lg:col-span-5",
477
- children: pt
478
- }), /* @__PURE__ */ g("div", {
526
+ children: Ot
527
+ }), /* @__PURE__ */ _("div", {
479
528
  className: "min-w-0 lg:col-span-7",
480
- children: vt
529
+ children: Nt
481
530
  })]
482
531
  })
483
532
  ]
484
533
  }),
485
- /* @__PURE__ */ _("section", {
534
+ /* @__PURE__ */ v("section", {
486
535
  id: "featured",
487
536
  className: "mx-auto max-w-7xl scroll-mt-16 px-4 py-10 sm:scroll-mt-20 sm:px-6",
488
- children: [/* @__PURE__ */ _("div", {
537
+ children: [/* @__PURE__ */ v("div", {
489
538
  className: "flex items-center justify-between gap-3",
490
- children: [/* @__PURE__ */ _("div", {
539
+ children: [/* @__PURE__ */ v("div", {
491
540
  className: "space-y-1",
492
- children: [/* @__PURE__ */ g("h2", {
541
+ children: [/* @__PURE__ */ _("h2", {
493
542
  className: "text-xl font-semibold tracking-tight",
494
- children: /* @__PURE__ */ g("span", { children: d("featured_title") })
495
- }), /* @__PURE__ */ g("p", {
543
+ children: /* @__PURE__ */ _("span", { children: d("featured_title") })
544
+ }), /* @__PURE__ */ _("p", {
496
545
  className: "text-sm text-slate-600",
497
- children: /* @__PURE__ */ g("span", { children: d("featured_description") })
546
+ children: /* @__PURE__ */ _("span", { children: d("featured_description") })
498
547
  })]
499
- }), /* @__PURE__ */ _(v, {
548
+ }), /* @__PURE__ */ v(y, {
500
549
  className: "hidden items-center gap-2 text-sm font-medium text-slate-700 hover:text-slate-950 sm:inline-flex",
501
- to: `/${S ?? ""}/booking${lt}`,
502
- children: [/* @__PURE__ */ g("span", { children: d("featured_view_all") }), /* @__PURE__ */ g(b, {
550
+ to: `/${w ?? ""}/booking${St}`,
551
+ children: [/* @__PURE__ */ _("span", { children: d("featured_view_all") }), /* @__PURE__ */ _(x, {
503
552
  className: "h-4 w-4",
504
553
  "aria-hidden": "true"
505
554
  })]
506
555
  })]
507
- }), /* @__PURE__ */ g("div", {
556
+ }), /* @__PURE__ */ _("div", {
508
557
  className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
509
- children: rt.map((e) => {
510
- 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);
511
- return /* @__PURE__ */ _("div", {
558
+ children: gt.map((e) => {
559
+ let t = e.id, n = e.slug, r = s(e.name, S.language, A), i = s(e.description, S.language, A), a = typeof e.images?.[0] == "string" ? e.images[0].trim() : "", o = we(e.primaryImageStyle), c = ee(e.availabilityStatus), l = Dt(n);
560
+ return /* @__PURE__ */ v("div", {
512
561
  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",
513
562
  children: [
514
- /* @__PURE__ */ g(v, {
515
- to: u,
563
+ /* @__PURE__ */ _(y, {
564
+ to: l,
516
565
  state: Q,
517
566
  className: "block",
518
- children: /* @__PURE__ */ g("span", {
519
- className: y("relative block aspect-[1618/1000] overflow-hidden rounded-xl", o.className),
567
+ children: /* @__PURE__ */ _("span", {
568
+ className: b("relative block aspect-[1618/1000] overflow-hidden rounded-xl", o.className),
520
569
  style: o.style,
521
- children: a ? /* @__PURE__ */ g("img", {
570
+ children: a ? /* @__PURE__ */ _("img", {
522
571
  src: a,
523
572
  alt: r,
524
573
  className: "absolute inset-0 h-full w-full object-contain p-1",
525
574
  loading: "lazy"
526
- }) : /* @__PURE__ */ g("span", {
575
+ }) : /* @__PURE__ */ _("span", {
527
576
  className: "absolute inset-0 flex items-center justify-center text-slate-400",
528
- children: /* @__PURE__ */ g(Me, {
577
+ children: /* @__PURE__ */ _(Ie, {
529
578
  className: "h-8 w-8",
530
579
  "aria-hidden": "true"
531
580
  })
532
581
  })
533
582
  })
534
583
  }),
535
- /* @__PURE__ */ _("span", {
584
+ /* @__PURE__ */ v("span", {
536
585
  className: "flex flex-1 flex-col gap-1",
537
586
  children: [
538
- /* @__PURE__ */ g(v, {
539
- to: u,
587
+ /* @__PURE__ */ _(y, {
588
+ to: l,
540
589
  state: Q,
541
590
  className: "text-sm font-semibold text-slate-950 hover:text-slate-700",
542
- children: /* @__PURE__ */ g("span", { children: r })
591
+ children: /* @__PURE__ */ _("span", { children: r })
543
592
  }),
544
- /* @__PURE__ */ g(ve, {
593
+ /* @__PURE__ */ _(Se, {
545
594
  prices: e.prices,
546
595
  className: "self-start"
547
596
  }),
548
- /* @__PURE__ */ g("span", {
597
+ /* @__PURE__ */ _("span", {
549
598
  className: "line-clamp-2 text-xs text-slate-600",
550
599
  children: i
551
600
  })
552
601
  ]
553
602
  }),
554
- /* @__PURE__ */ _("span", {
603
+ /* @__PURE__ */ v("span", {
555
604
  className: "flex flex-wrap items-center gap-x-2 gap-y-1",
556
605
  children: [
557
- /* @__PURE__ */ g(l, {
606
+ /* @__PURE__ */ _(u, {
558
607
  variant: c.variant,
559
- children: /* @__PURE__ */ g("span", { children: d(c.labelKey) })
608
+ children: /* @__PURE__ */ _("span", { children: d(c.labelKey) })
560
609
  }),
561
- /* @__PURE__ */ g("span", {
610
+ /* @__PURE__ */ _("span", {
562
611
  className: "text-slate-400",
563
612
  children: "·"
564
613
  }),
565
- /* @__PURE__ */ g(v, {
566
- to: u,
614
+ /* @__PURE__ */ _(y, {
615
+ to: l,
567
616
  state: Q,
568
617
  className: "text-xs font-medium text-slate-700 hover:text-slate-950",
569
- children: /* @__PURE__ */ g("span", { children: d("product_details_link") })
618
+ children: /* @__PURE__ */ _("span", { children: d("product_details_link") })
570
619
  })
571
620
  ]
572
621
  })
@@ -575,92 +624,92 @@ function D() {
575
624
  })
576
625
  })]
577
626
  }),
578
- /* @__PURE__ */ g("section", {
627
+ /* @__PURE__ */ _("section", {
579
628
  id: "products",
580
629
  className: "border-t bg-slate-50/60 scroll-mt-16 sm:scroll-mt-20",
581
- children: /* @__PURE__ */ _("div", {
630
+ children: /* @__PURE__ */ v("div", {
582
631
  className: "mx-auto max-w-7xl px-4 py-10 sm:px-6",
583
- children: [/* @__PURE__ */ g("div", {
632
+ children: [/* @__PURE__ */ _("div", {
584
633
  className: "flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",
585
- children: /* @__PURE__ */ _("div", {
634
+ children: /* @__PURE__ */ v("div", {
586
635
  className: "space-y-1",
587
- children: [/* @__PURE__ */ g("h2", {
636
+ children: [/* @__PURE__ */ _("h2", {
588
637
  className: "text-xl font-semibold tracking-tight",
589
- children: /* @__PURE__ */ g("span", { children: d("products_title") })
590
- }), /* @__PURE__ */ g("p", {
638
+ children: /* @__PURE__ */ _("span", { children: d("products_title") })
639
+ }), /* @__PURE__ */ _("p", {
591
640
  className: "text-sm text-slate-600",
592
- children: /* @__PURE__ */ g("span", { children: d("products_description") })
641
+ children: /* @__PURE__ */ _("span", { children: d("products_description") })
593
642
  })]
594
643
  })
595
- }), /* @__PURE__ */ g("div", {
644
+ }), /* @__PURE__ */ _("div", {
596
645
  className: "mt-6 grid gap-4 md:grid-cols-2",
597
- children: k.map((e) => /* @__PURE__ */ g(xe, {
646
+ children: j.map((e) => /* @__PURE__ */ _(Te, {
598
647
  bike: e,
599
- detailsPath: ft(e.slug),
648
+ detailsPath: Dt(e.slug),
600
649
  productDetailsLinkState: Q,
601
- fallbackLanguage: O,
602
- onAction: Z
650
+ fallbackLanguage: A,
651
+ onAction: Et
603
652
  }, e.id))
604
653
  })]
605
654
  })
606
655
  }),
607
- /* @__PURE__ */ _("section", {
656
+ /* @__PURE__ */ v("section", {
608
657
  className: "mx-auto max-w-7xl px-4 py-10 sm:px-6",
609
- children: [/* @__PURE__ */ g("div", {
658
+ children: [/* @__PURE__ */ _("div", {
610
659
  className: "flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between",
611
- children: /* @__PURE__ */ _("div", {
660
+ children: /* @__PURE__ */ v("div", {
612
661
  className: "space-y-1",
613
- children: [/* @__PURE__ */ g("h2", {
662
+ children: [/* @__PURE__ */ _("h2", {
614
663
  className: "text-xl font-semibold tracking-tight",
615
- children: /* @__PURE__ */ g("span", { children: d("accessories_title") })
616
- }), /* @__PURE__ */ g("p", {
664
+ children: /* @__PURE__ */ _("span", { children: d("accessories_title") })
665
+ }), /* @__PURE__ */ _("p", {
617
666
  className: "text-sm text-slate-600",
618
- children: /* @__PURE__ */ g("span", { children: d("accessories_description") })
667
+ children: /* @__PURE__ */ _("span", { children: d("accessories_description") })
619
668
  })]
620
669
  })
621
- }), /* @__PURE__ */ g("div", {
670
+ }), /* @__PURE__ */ _("div", {
622
671
  className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
623
- children: He.slice(0, 4).map((e) => {
624
- 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);
625
- return /* @__PURE__ */ _("div", {
672
+ children: Xe.slice(0, 4).map((e) => {
673
+ let t = s(e.name, S.language, A), n = s(e.description, S.language, A), r = s(e.warning, S.language, A), i = typeof e.images?.[0] == "string" ? e.images[0].trim() : "", a = we(e.primaryImageStyle);
674
+ return /* @__PURE__ */ v("div", {
626
675
  className: "flex h-full min-w-0 flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 shadow-sm",
627
676
  children: [
628
- /* @__PURE__ */ g("div", {
629
- className: y("relative aspect-[1618/1000] overflow-hidden rounded-xl", a.className),
677
+ /* @__PURE__ */ _("div", {
678
+ className: b("relative aspect-[1618/1000] overflow-hidden rounded-xl", a.className),
630
679
  style: a.style,
631
- children: i ? /* @__PURE__ */ g("img", {
680
+ children: i ? /* @__PURE__ */ _("img", {
632
681
  src: i,
633
682
  alt: t,
634
683
  className: "absolute inset-0 h-full w-full object-contain p-1",
635
684
  loading: "lazy"
636
- }) : /* @__PURE__ */ g("div", {
685
+ }) : /* @__PURE__ */ _("div", {
637
686
  className: "absolute inset-0 flex items-center justify-center text-slate-400",
638
- children: /* @__PURE__ */ g(Me, {
687
+ children: /* @__PURE__ */ _(Ie, {
639
688
  className: "h-8 w-8",
640
689
  "aria-hidden": "true"
641
690
  })
642
691
  })
643
692
  }),
644
- /* @__PURE__ */ _("div", {
693
+ /* @__PURE__ */ v("div", {
645
694
  className: "flex flex-1 flex-col gap-1",
646
695
  children: [
647
- /* @__PURE__ */ g("p", {
696
+ /* @__PURE__ */ _("p", {
648
697
  className: "text-sm font-semibold text-slate-950",
649
- children: /* @__PURE__ */ g("span", { children: t })
698
+ children: /* @__PURE__ */ _("span", { children: t })
650
699
  }),
651
- /* @__PURE__ */ g("p", {
700
+ /* @__PURE__ */ _("p", {
652
701
  className: "line-clamp-2 text-xs text-slate-600",
653
- children: /* @__PURE__ */ g("span", { children: n })
702
+ children: /* @__PURE__ */ _("span", { children: n })
654
703
  }),
655
- /* @__PURE__ */ g(_e, {
704
+ /* @__PURE__ */ _(xe, {
656
705
  warning: r,
657
706
  className: "mt-1"
658
707
  })
659
708
  ]
660
709
  }),
661
- /* @__PURE__ */ g("div", {
710
+ /* @__PURE__ */ _("div", {
662
711
  className: "flex items-center justify-between gap-2",
663
- children: /* @__PURE__ */ g(ve, {
712
+ children: /* @__PURE__ */ _(Se, {
664
713
  prices: e.prices,
665
714
  openOnHover: !1
666
715
  })
@@ -670,11 +719,11 @@ function D() {
670
719
  })
671
720
  })]
672
721
  }),
673
- /* @__PURE__ */ g(me, {}),
674
- /* @__PURE__ */ g(he, {}),
675
- /* @__PURE__ */ g(pe, {}),
676
- /* @__PURE__ */ g(fe, { storeSlug: S ?? "" })
722
+ /* @__PURE__ */ _(ve, {}),
723
+ /* @__PURE__ */ _(ye, {}),
724
+ /* @__PURE__ */ _(_e, {}),
725
+ /* @__PURE__ */ _(ge, { storeSlug: w ?? "" })
677
726
  ] });
678
727
  }
679
728
  //#endregion
680
- export { D as default };
729
+ export { k as default };