@loczer/storefront-sdk 0.160.0 → 0.161.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/fetchStorefrontTimeSlots.d.ts +4 -0
- package/dist/lib/fetchStorefrontTimeSlots.d.ts.map +1 -0
- package/dist/lib/fetchStorefrontTimeSlots.js +22 -0
- package/dist/pages/BookingPage.d.ts.map +1 -1
- package/dist/pages/BookingPage.js +97 -100
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +129 -132
- package/dist/storefront.css +1 -1
- package/package.json +1 -1
package/dist/pages/HomePage.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as r, jsx as e, Fragment as
|
|
2
|
-
import { useMemo as
|
|
1
|
+
import { jsxs as r, jsx as e, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as h, useState as N, useRef as Ie, useEffect as He } from "react";
|
|
3
3
|
import { useMediaQuery as je } from "@rpcbase/client";
|
|
4
|
-
import { useParams as Ue, useLocation as Ve, useSearchParams as ze, useNavigate as Ye, Link as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Clock as Qe, MapPin as We, CheckCircle2 as Ke, ShieldCheck as Ge, Truck as Je, ArrowRight as j, Bike as
|
|
4
|
+
import { useParams as Ue, useLocation as Ve, useSearchParams as ze, useNavigate as Ye, Link as le } from "@rpcbase/router";
|
|
5
|
+
import { cn as m } from "@rpcbase/ui";
|
|
6
|
+
import { Clock as Qe, MapPin as We, CheckCircle2 as Ke, ShieldCheck as Ge, Truck as Je, ArrowRight as j, Bike as oe } from "lucide-react";
|
|
7
7
|
import { useTranslation as Xe } from "react-i18next";
|
|
8
8
|
import z from "../chunks/assets/playground-hero-preview.svg-DNbSwXV5.js";
|
|
9
9
|
import { getAvailabilityVariant as Ze } from "../lib/utils.js";
|
|
@@ -12,7 +12,7 @@ import { getLocalizedValue as A } from "../localization.js";
|
|
|
12
12
|
import { AboutSection as tt } from "../components/AboutSection/index.js";
|
|
13
13
|
import { BikeProductCard as at } from "../components/BikeProductCard/index.js";
|
|
14
14
|
import { ContactSection as rt } from "../components/ContactSection/index.js";
|
|
15
|
-
import { ProductPriceBadge as
|
|
15
|
+
import { ProductPriceBadge as de } from "../components/ProductPriceBadge/index.js";
|
|
16
16
|
import { ProductWarningNotice as st } from "../components/ProductWarningNotice/index.js";
|
|
17
17
|
import { TestimonialsSection as it } from "../components/TestimonialsSection/index.js";
|
|
18
18
|
import { BookingPeriodProvider as nt } from "../components/BookingPeriodSelector/BookingPeriodContext.js";
|
|
@@ -22,60 +22,58 @@ import { BookingEndDateField as dt } from "../components/BookingPeriodSelector/c
|
|
|
22
22
|
import { BookingEndTimeField as ct } from "../components/BookingPeriodSelector/components/BookingEndTimeField.js";
|
|
23
23
|
import "../components/BookingPeriodSelector/components/BookingMobileDateDrawer.js";
|
|
24
24
|
import { Badge as U } from "../ui/badge.js";
|
|
25
|
-
import { Button as
|
|
26
|
-
import { Card as
|
|
27
|
-
import { resolveBookingSearchParamsFromSessionStorage as mt, createBookingPeriodConfigFromStorefrontConfiguration as ht, getDefaultBookingParamsForStorefrontConfiguration as pt, getBookingParamsFromSearch as gt,
|
|
28
|
-
import {
|
|
25
|
+
import { Button as ce } from "../ui/button.js";
|
|
26
|
+
import { Card as me } from "../ui/card.js";
|
|
27
|
+
import { resolveBookingSearchParamsFromSessionStorage as mt, createBookingPeriodConfigFromStorefrontConfiguration as ht, getDefaultBookingParamsForStorefrontConfiguration as pt, getBookingParamsFromSearch as gt, applyBookingParamsToSearch as ut, writeBookingSearchParamsToSessionStorage as ft } from "../lib/booking.js";
|
|
28
|
+
import { createStorefrontTimeSlotsFetcher as xt } from "../lib/fetchStorefrontTimeSlots.js";
|
|
29
|
+
import { resolveProductImageContainerStyle as he } from "../lib/productImageStyles.js";
|
|
29
30
|
import { usePlaygroundDevSettings as vt } from "../lib/playgroundDevSettings.js";
|
|
30
|
-
import { useStorefront as
|
|
31
|
-
import { FulfillmentSection as
|
|
31
|
+
import { useStorefront as Nt, useStorefrontProducts as bt } from "../StorefrontProvider.js";
|
|
32
|
+
import { FulfillmentSection as pe } from "../components/FulfillmentSection/index.js";
|
|
32
33
|
import { DeliveryAddressSelector as _t } from "../components/DeliveryAddressSelector/index.js";
|
|
33
|
-
const
|
|
34
|
+
const ge = (a) => String(a).padStart(2, "0"), ue = "text-[11px] font-semibold uppercase tracking-wide text-slate-600", fe = "h-10", kt = 6, xe = 5, ve = [15, 25, 42, 66, 33, 54], V = ["4 / 5", "1 / 1", "3 / 4", "5 / 4", "7 / 9", "4 / 3", "9 / 16", "6 / 7"], Ne = (a) => `${a.getFullYear()}-${ge(a.getMonth() + 1)}-${ge(a.getDate())}`, E = (a) => {
|
|
34
35
|
if (!a)
|
|
35
36
|
return;
|
|
36
37
|
const i = a.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
37
38
|
if (!i)
|
|
38
39
|
return;
|
|
39
|
-
const
|
|
40
|
-
if (!(Number.isNaN(o.getTime()) || o.getFullYear() !==
|
|
40
|
+
const n = Number(i[1]), p = Number(i[2]), c = Number(i[3]), o = new Date(n, p - 1, c);
|
|
41
|
+
if (!(Number.isNaN(o.getTime()) || o.getFullYear() !== n || o.getMonth() !== p - 1 || o.getDate() !== c))
|
|
41
42
|
return o;
|
|
42
43
|
}, yt = (a) => {
|
|
43
44
|
const i = a.length > 0 ? a : [z];
|
|
44
|
-
return Array.from({ length: kt }, (
|
|
45
|
-
const u = p *
|
|
45
|
+
return Array.from({ length: kt }, (n, p) => Array.from({ length: xe }, (c, o) => {
|
|
46
|
+
const u = p * xe + o;
|
|
46
47
|
return {
|
|
47
48
|
aspectRatio: V[(u + p) % V.length] ?? V[0],
|
|
48
49
|
src: i[u % i.length] ?? z
|
|
49
50
|
};
|
|
50
51
|
}));
|
|
51
52
|
};
|
|
52
|
-
function
|
|
53
|
-
const { t: a, i18n: i } = Xe(), { storeSlug:
|
|
54
|
-
() => mt(M,
|
|
55
|
-
[M,
|
|
56
|
-
), x =
|
|
53
|
+
function sa() {
|
|
54
|
+
const { t: a, i18n: i } = Xe(), { storeSlug: n } = Ue(), p = Ve(), { storefrontConfiguration: c } = Nt(), o = c.workspace?.workspaceLanguage, { bikes: u, accessories: Y } = bt(), [M] = ze(), be = Ye(), f = h(
|
|
55
|
+
() => mt(M, n),
|
|
56
|
+
[M, n]
|
|
57
|
+
), x = h(() => et(n), [n]), _e = h(
|
|
57
58
|
() => ht(c),
|
|
58
59
|
[c]
|
|
59
|
-
), d =
|
|
60
|
+
), d = h(
|
|
60
61
|
() => pt(c),
|
|
61
62
|
[c]
|
|
62
|
-
),
|
|
63
|
-
() => E(d.end_date) ??
|
|
64
|
-
[d.end_date,
|
|
65
|
-
), v = c.settings.fulfillmentModes.includes("delivery"), Q = c.settings.deliveryDisabledReason.trim(),
|
|
63
|
+
), b = h(() => E(d.start_date), [d.start_date]), ke = h(
|
|
64
|
+
() => E(d.end_date) ?? b,
|
|
65
|
+
[d.end_date, b]
|
|
66
|
+
), v = c.settings.fulfillmentModes.includes("delivery"), Q = c.settings.deliveryDisabledReason.trim(), R = h(
|
|
66
67
|
() => gt(f, d),
|
|
67
68
|
[d, f]
|
|
68
|
-
), [w, W] =
|
|
69
|
-
() =>
|
|
70
|
-
), [
|
|
71
|
-
() => E(f.get("start_date")) ??
|
|
72
|
-
), [q,
|
|
73
|
-
const t = E(f.get("start_date")) ??
|
|
74
|
-
return E(f.get("end_date")) ?? t ??
|
|
75
|
-
}), [
|
|
76
|
-
() => ut.map((t) => ({ value: t, label: t })),
|
|
77
|
-
[]
|
|
78
|
-
), Ae = m(
|
|
69
|
+
), [w, W] = N(
|
|
70
|
+
() => R.fulfillment === "delivery" && v ? "delivery" : "pickup"
|
|
71
|
+
), [T, ye] = N(
|
|
72
|
+
() => E(f.get("start_date")) ?? b
|
|
73
|
+
), [q, we] = N(() => f.get("start_time") ?? d.start_time), [L, Se] = N(() => {
|
|
74
|
+
const t = E(f.get("start_date")) ?? b;
|
|
75
|
+
return E(f.get("end_date")) ?? t ?? ke;
|
|
76
|
+
}), [F, Ce] = N(() => f.get("end_time") ?? d.end_time), [S, O] = N(() => R.start_address), [C, $] = N(() => R.end_address), I = Ie(null), Pe = h(() => u.slice(0, 4), [u]), { heroMode: K } = vt(), P = K === "vertical_marquee_hero", _ = K === "booking_bar_overlay_hero" || P, G = je("(min-width: 1024px)"), De = xt(n), Ae = h(
|
|
79
77
|
() => ({
|
|
80
78
|
startDate: a("booking_start_date"),
|
|
81
79
|
pickStartDate: a("booking_start_date"),
|
|
@@ -86,58 +84,57 @@ function ra() {
|
|
|
86
84
|
selectedDaysTooltip: ({ count: t }) => a("booking_selected_days_tooltip", { count: t })
|
|
87
85
|
}),
|
|
88
86
|
[i.language, a]
|
|
89
|
-
), B =
|
|
90
|
-
const
|
|
91
|
-
return
|
|
87
|
+
), B = h(() => {
|
|
88
|
+
const l = T ?? (b ?? /* @__PURE__ */ new Date()), s = L ?? l;
|
|
89
|
+
return ut(new URLSearchParams(), {
|
|
92
90
|
fulfillment: w === "delivery" && v ? "delivery" : "pickup",
|
|
93
|
-
start_date: Ne(
|
|
91
|
+
start_date: Ne(l),
|
|
94
92
|
start_time: q || d.start_time,
|
|
95
93
|
end_date: Ne(s),
|
|
96
|
-
end_time:
|
|
94
|
+
end_time: F || d.end_time,
|
|
97
95
|
start_address: S,
|
|
98
96
|
end_address: C
|
|
99
97
|
});
|
|
100
98
|
}, [
|
|
101
99
|
d.end_time,
|
|
102
100
|
d.start_time,
|
|
103
|
-
|
|
101
|
+
b,
|
|
104
102
|
v,
|
|
105
103
|
C,
|
|
106
|
-
O,
|
|
107
104
|
L,
|
|
105
|
+
F,
|
|
108
106
|
w,
|
|
109
107
|
S,
|
|
110
|
-
|
|
108
|
+
T,
|
|
111
109
|
q
|
|
112
|
-
]),
|
|
110
|
+
]), J = B.toString(), Ee = J ? `?${J}` : "";
|
|
113
111
|
He(() => {
|
|
114
|
-
|
|
115
|
-
}, [B,
|
|
112
|
+
ft(n, B);
|
|
113
|
+
}, [B, n]);
|
|
116
114
|
const Be = {
|
|
117
|
-
startDate:
|
|
118
|
-
onStartDateChange:
|
|
115
|
+
startDate: T,
|
|
116
|
+
onStartDateChange: ye,
|
|
119
117
|
startTime: q,
|
|
120
|
-
onStartTimeChange:
|
|
121
|
-
endDate:
|
|
122
|
-
onEndDateChange:
|
|
123
|
-
endTime:
|
|
124
|
-
onEndTimeChange:
|
|
118
|
+
onStartTimeChange: we,
|
|
119
|
+
endDate: L,
|
|
120
|
+
onEndDateChange: Se,
|
|
121
|
+
endTime: F,
|
|
122
|
+
onEndTimeChange: Ce,
|
|
125
123
|
onEndTimeCommit: () => {
|
|
126
124
|
I.current?.focus({ preventScroll: !0 });
|
|
127
125
|
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
bookingPeriodConfig: ke,
|
|
126
|
+
bookingPeriodConfig: _e,
|
|
127
|
+
fetchTimeSlots: De,
|
|
131
128
|
labels: Ae,
|
|
132
129
|
localeCode: i.language
|
|
133
130
|
}, H = () => {
|
|
134
131
|
const t = new URLSearchParams(M);
|
|
135
|
-
for (const [
|
|
136
|
-
t.set(
|
|
137
|
-
|
|
138
|
-
},
|
|
132
|
+
for (const [l, s] of B.entries())
|
|
133
|
+
t.set(l, s);
|
|
134
|
+
be(`/${n ?? ""}/booking?${t.toString()}#booking-products`);
|
|
135
|
+
}, X = (t) => `/${n ?? ""}/products/${t}`, Z = {
|
|
139
136
|
backTo: `${p.pathname}${p.search}${p.hash}`
|
|
140
|
-
},
|
|
137
|
+
}, ee = /* @__PURE__ */ r("div", { children: [
|
|
141
138
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
142
139
|
/* @__PURE__ */ r(U, { variant: "secondary", children: [
|
|
143
140
|
/* @__PURE__ */ e(Qe, { className: "h-3 w-3", "aria-hidden": "true" }),
|
|
@@ -150,7 +147,7 @@ function ra() {
|
|
|
150
147
|
] }),
|
|
151
148
|
/* @__PURE__ */ e("h1", { className: "mt-4 text-3xl font-semibold tracking-tight sm:text-4xl", children: /* @__PURE__ */ e("span", { children: a("hero_title", { fallback: x.hero_title }) }) }),
|
|
152
149
|
/* @__PURE__ */ e("p", { className: "mt-3 text-sm text-slate-700 sm:text-base", children: /* @__PURE__ */ e("span", { children: a("hero_description", { fallback: x.hero_description }) }) }),
|
|
153
|
-
/* @__PURE__ */ e("div", { className:
|
|
150
|
+
/* @__PURE__ */ e("div", { className: m("mt-6", !_ && "rounded-xl border bg-white/70 p-4"), children: /* @__PURE__ */ r("ul", { className: m("space-y-3", _ && "space-y-2"), children: [
|
|
154
151
|
!_ && /* @__PURE__ */ r("li", { className: "flex items-start gap-3", children: [
|
|
155
152
|
/* @__PURE__ */ e(Ke, { className: "mt-0.5 h-5 w-5 text-slate-900", "aria-hidden": "true" }),
|
|
156
153
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
@@ -158,14 +155,14 @@ function ra() {
|
|
|
158
155
|
/* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: a("feature_ready_in_minutes_description") }) })
|
|
159
156
|
] })
|
|
160
157
|
] }),
|
|
161
|
-
/* @__PURE__ */ r("li", { className:
|
|
158
|
+
/* @__PURE__ */ r("li", { className: m("flex items-start gap-3", !_ && "border-t border-slate-200/70 pt-3"), children: [
|
|
162
159
|
/* @__PURE__ */ e(Ge, { className: "mt-0.5 h-5 w-5 text-slate-900", "aria-hidden": "true" }),
|
|
163
160
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
164
161
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-slate-950", children: /* @__PURE__ */ e("span", { children: a("feature_secure_payment_title") }) }),
|
|
165
162
|
/* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: a("feature_secure_payment_description") }) })
|
|
166
163
|
] })
|
|
167
164
|
] }),
|
|
168
|
-
v ? /* @__PURE__ */ r("li", { className:
|
|
165
|
+
v ? /* @__PURE__ */ r("li", { className: m("flex items-start gap-3", !_ && "border-t border-slate-200/70 pt-3"), children: [
|
|
169
166
|
/* @__PURE__ */ e(Je, { className: "mt-0.5 h-5 w-5 text-slate-900", "aria-hidden": "true" }),
|
|
170
167
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
171
168
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-slate-950", children: /* @__PURE__ */ e("span", { children: a("feature_delivery_title") }) }),
|
|
@@ -173,48 +170,48 @@ function ra() {
|
|
|
173
170
|
] })
|
|
174
171
|
] }) : null
|
|
175
172
|
] }) })
|
|
176
|
-
] }),
|
|
173
|
+
] }), te = ({
|
|
177
174
|
className: t,
|
|
178
|
-
showSubmitButton:
|
|
175
|
+
showSubmitButton: l = !1,
|
|
179
176
|
submitButtonClassName: s
|
|
180
177
|
}) => /* @__PURE__ */ e(
|
|
181
178
|
nt,
|
|
182
179
|
{
|
|
183
180
|
...Be,
|
|
184
|
-
labelClassName:
|
|
185
|
-
inputClassName:
|
|
181
|
+
labelClassName: ue,
|
|
182
|
+
inputClassName: fe,
|
|
186
183
|
children: /* @__PURE__ */ r("div", { className: t, children: [
|
|
187
184
|
/* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e(lt, {}) }),
|
|
188
185
|
/* @__PURE__ */ e(ot, {}),
|
|
189
186
|
/* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e(dt, {}) }),
|
|
190
187
|
/* @__PURE__ */ e(ct, {}),
|
|
191
|
-
|
|
188
|
+
l ? /* @__PURE__ */ r(ce, { ref: I, className: m("gap-2", s), onClick: H, children: [
|
|
192
189
|
/* @__PURE__ */ e("span", { children: a("booking_submit") }),
|
|
193
190
|
/* @__PURE__ */ e(j, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
194
191
|
] }) : null
|
|
195
192
|
] })
|
|
196
193
|
}
|
|
197
|
-
),
|
|
194
|
+
), ae = (t) => v ? /* @__PURE__ */ e(
|
|
198
195
|
_t,
|
|
199
196
|
{
|
|
200
197
|
open: w === "delivery",
|
|
201
198
|
className: "sm:min-h-[6.75rem]",
|
|
202
|
-
inputClassName: `${
|
|
203
|
-
labelClassName:
|
|
199
|
+
inputClassName: `${fe} bg-white`,
|
|
200
|
+
labelClassName: ue,
|
|
204
201
|
startAddress: S,
|
|
205
|
-
onStartAddressChange:
|
|
202
|
+
onStartAddressChange: O,
|
|
206
203
|
returnAddress: C,
|
|
207
|
-
onReturnAddressChange:
|
|
204
|
+
onReturnAddressChange: $,
|
|
208
205
|
testIdPrefix: t
|
|
209
206
|
}
|
|
210
|
-
) : null, Me =
|
|
207
|
+
) : null, Me = ae("storefront-home-fulfillment-delivery-address"), Re = ae("storefront-home-compact-fulfillment-delivery-address"), Te = /* @__PURE__ */ r(me, { className: "border-slate-200 bg-white/80 shadow-sm", children: [
|
|
211
208
|
/* @__PURE__ */ r("div", { className: "border-b border-slate-200 px-5 py-4", children: [
|
|
212
209
|
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: a("booking_title") }) }),
|
|
213
210
|
/* @__PURE__ */ e("p", { className: "mt-1 text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: a("booking_subtitle") }) })
|
|
214
211
|
] }),
|
|
215
212
|
/* @__PURE__ */ r("div", { className: "grid gap-4 px-5 py-5", children: [
|
|
216
213
|
/* @__PURE__ */ e(
|
|
217
|
-
|
|
214
|
+
pe,
|
|
218
215
|
{
|
|
219
216
|
value: w,
|
|
220
217
|
onValueChange: W,
|
|
@@ -222,26 +219,26 @@ function ra() {
|
|
|
222
219
|
deliveryEnabled: v,
|
|
223
220
|
deliveryDisabledReason: Q,
|
|
224
221
|
startAddress: S,
|
|
225
|
-
onStartAddressChange:
|
|
222
|
+
onStartAddressChange: O,
|
|
226
223
|
endAddress: C,
|
|
227
|
-
onEndAddressChange:
|
|
224
|
+
onEndAddressChange: $,
|
|
228
225
|
showDeliveryAddressSelector: !1,
|
|
229
226
|
testIdPrefix: "storefront-home-fulfillment"
|
|
230
227
|
}
|
|
231
228
|
),
|
|
232
|
-
|
|
229
|
+
te({
|
|
233
230
|
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"
|
|
234
231
|
}),
|
|
235
232
|
Me,
|
|
236
233
|
/* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: a("booking_minimum_duration", { hours: 4 }) }) }),
|
|
237
|
-
/* @__PURE__ */ r(
|
|
234
|
+
/* @__PURE__ */ r(ce, { ref: I, className: "h-11 rounded-xl text-sm font-semibold gap-2", onClick: H, children: [
|
|
238
235
|
/* @__PURE__ */ e("span", { children: a("booking_submit") }),
|
|
239
236
|
/* @__PURE__ */ e(j, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
240
237
|
] })
|
|
241
238
|
] })
|
|
242
|
-
] }),
|
|
239
|
+
] }), re = /* @__PURE__ */ e(me, { className: "border-slate-200 bg-white/95 shadow-xl", children: /* @__PURE__ */ r("div", { className: "grid gap-3 px-4 py-4", children: [
|
|
243
240
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
244
|
-
|
|
241
|
+
pe,
|
|
245
242
|
{
|
|
246
243
|
value: w,
|
|
247
244
|
onValueChange: W,
|
|
@@ -249,20 +246,20 @@ function ra() {
|
|
|
249
246
|
deliveryEnabled: v,
|
|
250
247
|
deliveryDisabledReason: Q,
|
|
251
248
|
startAddress: S,
|
|
252
|
-
onStartAddressChange:
|
|
249
|
+
onStartAddressChange: O,
|
|
253
250
|
endAddress: C,
|
|
254
|
-
onEndAddressChange:
|
|
251
|
+
onEndAddressChange: $,
|
|
255
252
|
showDeliveryAddressSelector: !1,
|
|
256
253
|
testIdPrefix: "storefront-home-compact-fulfillment"
|
|
257
254
|
}
|
|
258
255
|
) }),
|
|
259
|
-
|
|
256
|
+
te({
|
|
260
257
|
className: "grid gap-3 md:grid-cols-2 xl:grid-cols-[minmax(0,1fr)_150px_minmax(0,1fr)_150px_auto] xl:items-end",
|
|
261
258
|
showSubmitButton: !0,
|
|
262
259
|
submitButtonClassName: "h-10 rounded-xl text-sm font-semibold xl:self-end"
|
|
263
260
|
}),
|
|
264
|
-
|
|
265
|
-
] }) }), qe = [...u, ...Y].flatMap((t) => Array.isArray(t.images) ? t.images : []).filter((t) => typeof t == "string" && t.trim().length > 0).map((t) => t.trim()).slice(0, 12),
|
|
261
|
+
Re
|
|
262
|
+
] }) }), qe = [...u, ...Y].flatMap((t) => Array.isArray(t.images) ? t.images : []).filter((t) => typeof t == "string" && t.trim().length > 0).map((t) => t.trim()).slice(0, 12), Le = yt(qe), Fe = P ? /* @__PURE__ */ e("style", { children: `
|
|
266
263
|
@keyframes storefront-hero-marquee-up {
|
|
267
264
|
0% { transform: translateY(0); }
|
|
268
265
|
100% { transform: translateY(calc(-50% - (var(--storefront-hero-marquee-gap) / 2))); }
|
|
@@ -285,10 +282,10 @@ function ra() {
|
|
|
285
282
|
transform: none !important;
|
|
286
283
|
}
|
|
287
284
|
}
|
|
288
|
-
` }) : null,
|
|
285
|
+
` }) : null, se = (t) => /* @__PURE__ */ e(
|
|
289
286
|
"div",
|
|
290
287
|
{
|
|
291
|
-
className:
|
|
288
|
+
className: m("relative h-full min-h-[340px] overflow-hidden", t),
|
|
292
289
|
style: {
|
|
293
290
|
WebkitMaskImage: "linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%)",
|
|
294
291
|
maskImage: "linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%)",
|
|
@@ -298,12 +295,12 @@ function ra() {
|
|
|
298
295
|
maskSize: "100% 100%"
|
|
299
296
|
},
|
|
300
297
|
"aria-hidden": "true",
|
|
301
|
-
children: /* @__PURE__ */ e("div", { className: "absolute inset-0 grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-6", children:
|
|
302
|
-
const k =
|
|
298
|
+
children: /* @__PURE__ */ e("div", { className: "absolute inset-0 grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-6", children: Le.map((l, s) => {
|
|
299
|
+
const k = ve[s % ve.length] ?? 32, y = [...l, ...l];
|
|
303
300
|
return /* @__PURE__ */ e(
|
|
304
301
|
"div",
|
|
305
302
|
{
|
|
306
|
-
className:
|
|
303
|
+
className: m(
|
|
307
304
|
"relative min-h-0 overflow-hidden",
|
|
308
305
|
s === 2 && "hidden md:block",
|
|
309
306
|
s >= 3 && "hidden lg:block"
|
|
@@ -311,7 +308,7 @@ function ra() {
|
|
|
311
308
|
children: /* @__PURE__ */ e(
|
|
312
309
|
"div",
|
|
313
310
|
{
|
|
314
|
-
className:
|
|
311
|
+
className: m(
|
|
315
312
|
"storefront-hero-marquee-track flex flex-col gap-[var(--storefront-hero-marquee-gap)]",
|
|
316
313
|
s % 2 === 1 && "storefront-hero-marquee-track-reverse"
|
|
317
314
|
),
|
|
@@ -332,7 +329,7 @@ function ra() {
|
|
|
332
329
|
src: g.src,
|
|
333
330
|
alt: "",
|
|
334
331
|
className: "absolute inset-0 h-full w-full object-cover opacity-90 saturate-[1.05] transition-transform duration-700 group-hover:scale-[1.04]",
|
|
335
|
-
loading: D <
|
|
332
|
+
loading: D < l.length ? "eager" : "lazy"
|
|
336
333
|
}
|
|
337
334
|
),
|
|
338
335
|
/* @__PURE__ */ e("div", { className: "absolute inset-0 bg-linear-to-t from-slate-950/40 via-slate-950/10 to-white/10" })
|
|
@@ -347,11 +344,11 @@ function ra() {
|
|
|
347
344
|
);
|
|
348
345
|
}) })
|
|
349
346
|
}
|
|
350
|
-
),
|
|
347
|
+
), Oe = P ? /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-0 hidden lg:block", "aria-hidden": "true", children: /* @__PURE__ */ r("div", { className: "mx-auto grid h-full max-w-7xl grid-cols-12 gap-8 px-4 sm:px-6", children: [
|
|
351
348
|
/* @__PURE__ */ e("div", { className: "lg:col-span-5" }),
|
|
352
|
-
/* @__PURE__ */ e("div", { className: "lg:col-span-7", children:
|
|
353
|
-
] }) }) : null,
|
|
354
|
-
/* @__PURE__ */ e("div", { className: "lg:hidden", children:
|
|
349
|
+
/* @__PURE__ */ e("div", { className: "lg:col-span-7", children: se() })
|
|
350
|
+
] }) }) : null, $e = P ? /* @__PURE__ */ r(ne, { children: [
|
|
351
|
+
/* @__PURE__ */ e("div", { className: "lg:hidden", children: se() }),
|
|
355
352
|
/* @__PURE__ */ e("div", { className: "hidden min-h-[510px] lg:block", "aria-hidden": "true" })
|
|
356
353
|
] }) : /* @__PURE__ */ r("div", { className: "relative min-h-[340px] overflow-hidden rounded-3xl border border-slate-200 bg-slate-900 shadow-sm lg:min-h-[510px]", children: [
|
|
357
354
|
/* @__PURE__ */ e(
|
|
@@ -364,7 +361,7 @@ function ra() {
|
|
|
364
361
|
),
|
|
365
362
|
/* @__PURE__ */ e("div", { className: "absolute inset-0 bg-linear-to-t from-slate-900/45 via-slate-900/15 to-transparent", "aria-hidden": "true" })
|
|
366
363
|
] });
|
|
367
|
-
return /* @__PURE__ */ r(
|
|
364
|
+
return /* @__PURE__ */ r(ne, { children: [
|
|
368
365
|
/* @__PURE__ */ r("section", { className: "relative overflow-hidden border-b border-slate-200", children: [
|
|
369
366
|
/* @__PURE__ */ e("div", { className: "absolute inset-0 bg-linear-to-b from-slate-50 to-white", "aria-hidden": "true" }),
|
|
370
367
|
/* @__PURE__ */ e(
|
|
@@ -377,20 +374,20 @@ function ra() {
|
|
|
377
374
|
"aria-hidden": "true"
|
|
378
375
|
}
|
|
379
376
|
),
|
|
380
|
-
|
|
381
|
-
|
|
377
|
+
Fe,
|
|
378
|
+
Oe,
|
|
382
379
|
_ ? /* @__PURE__ */ r("div", { className: "relative mx-auto grid max-w-7xl gap-8 px-4 py-10 sm:px-6 lg:grid-cols-12 lg:py-14", children: [
|
|
383
380
|
/* @__PURE__ */ r("div", { className: "lg:col-span-5", children: [
|
|
384
|
-
|
|
385
|
-
G ? /* @__PURE__ */ e("div", { className: "mt-7", children: /* @__PURE__ */ e("div", { className: "relative z-20 w-[calc(100%+24rem)] max-w-none", children:
|
|
381
|
+
ee,
|
|
382
|
+
G ? /* @__PURE__ */ e("div", { className: "mt-7", children: /* @__PURE__ */ e("div", { className: "relative z-20 w-[calc(100%+24rem)] max-w-none", children: re }) }) : null
|
|
386
383
|
] }),
|
|
387
|
-
/* @__PURE__ */ r("div", { className:
|
|
388
|
-
|
|
389
|
-
G ? null : /* @__PURE__ */ e("div", { className: "mt-4", children:
|
|
384
|
+
/* @__PURE__ */ r("div", { className: m("lg:col-span-7", !P && "lg:pt-4"), children: [
|
|
385
|
+
$e,
|
|
386
|
+
G ? null : /* @__PURE__ */ e("div", { className: "mt-4", children: re })
|
|
390
387
|
] })
|
|
391
388
|
] }) : /* @__PURE__ */ r("div", { className: "relative mx-auto grid max-w-7xl gap-8 px-4 py-10 sm:px-6 lg:grid-cols-12 lg:py-14", children: [
|
|
392
|
-
/* @__PURE__ */ e("div", { className: "lg:col-span-5", children:
|
|
393
|
-
/* @__PURE__ */ e("div", { className: "lg:col-span-7", children:
|
|
389
|
+
/* @__PURE__ */ e("div", { className: "lg:col-span-5", children: ee }),
|
|
390
|
+
/* @__PURE__ */ e("div", { className: "lg:col-span-7", children: Te })
|
|
394
391
|
] })
|
|
395
392
|
] }),
|
|
396
393
|
/* @__PURE__ */ r("section", { id: "featured", className: "mx-auto max-w-7xl scroll-mt-16 px-4 py-10 sm:scroll-mt-20 sm:px-6", children: [
|
|
@@ -400,10 +397,10 @@ function ra() {
|
|
|
400
397
|
/* @__PURE__ */ e("p", { className: "text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: a("featured_description") }) })
|
|
401
398
|
] }),
|
|
402
399
|
/* @__PURE__ */ r(
|
|
403
|
-
|
|
400
|
+
le,
|
|
404
401
|
{
|
|
405
402
|
className: "hidden items-center gap-2 text-sm font-medium text-slate-700 hover:text-slate-950 sm:inline-flex",
|
|
406
|
-
to: `/${
|
|
403
|
+
to: `/${n ?? ""}/booking${Ee}`,
|
|
407
404
|
children: [
|
|
408
405
|
/* @__PURE__ */ e("span", { children: a("featured_view_all") }),
|
|
409
406
|
/* @__PURE__ */ e(j, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
@@ -411,26 +408,26 @@ function ra() {
|
|
|
411
408
|
}
|
|
412
409
|
)
|
|
413
410
|
] }),
|
|
414
|
-
/* @__PURE__ */ e("div", { className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4", children:
|
|
415
|
-
const
|
|
411
|
+
/* @__PURE__ */ e("div", { className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4", children: Pe.map((t) => {
|
|
412
|
+
const l = t.id, s = t.slug, k = A(t.name, i.language, o), y = A(t.description, i.language, o), g = typeof t.images?.[0] == "string" ? t.images[0].trim() : "", D = he(t.primaryImageStyle), ie = Ze(t.availabilityStatus);
|
|
416
413
|
return /* @__PURE__ */ r(
|
|
417
414
|
"div",
|
|
418
415
|
{
|
|
419
416
|
className: "group flex h-full flex-col gap-3 rounded-2xl border border-slate-200 bg-white p-4 text-left shadow-sm transition hover:border-slate-400",
|
|
420
417
|
children: [
|
|
421
418
|
/* @__PURE__ */ r(
|
|
422
|
-
|
|
419
|
+
le,
|
|
423
420
|
{
|
|
424
|
-
to:
|
|
425
|
-
state:
|
|
421
|
+
to: X(s),
|
|
422
|
+
state: Z,
|
|
426
423
|
className: "flex flex-1 flex-col gap-3",
|
|
427
424
|
children: [
|
|
428
425
|
/* @__PURE__ */ e(
|
|
429
426
|
"span",
|
|
430
427
|
{
|
|
431
|
-
className:
|
|
428
|
+
className: m("relative aspect-[1618/1000] overflow-hidden rounded-xl", D.className),
|
|
432
429
|
style: D.style,
|
|
433
|
-
children: g ? /* @__PURE__ */ e("img", { src: g, alt: k, className: "absolute inset-0 h-full w-full object-contain p-1", loading: "lazy" }) : /* @__PURE__ */ e("span", { className: "absolute inset-0 flex items-center justify-center text-slate-400", children: /* @__PURE__ */ e(
|
|
430
|
+
children: g ? /* @__PURE__ */ e("img", { src: g, alt: k, className: "absolute inset-0 h-full w-full object-contain p-1", loading: "lazy" }) : /* @__PURE__ */ e("span", { className: "absolute inset-0 flex items-center justify-center text-slate-400", children: /* @__PURE__ */ e(oe, { className: "h-8 w-8", "aria-hidden": "true" }) })
|
|
434
431
|
}
|
|
435
432
|
),
|
|
436
433
|
/* @__PURE__ */ r("span", { className: "flex flex-1 flex-col gap-1", children: [
|
|
@@ -441,12 +438,12 @@ function ra() {
|
|
|
441
438
|
}
|
|
442
439
|
),
|
|
443
440
|
/* @__PURE__ */ r("span", { className: "flex items-center justify-between gap-2", children: [
|
|
444
|
-
/* @__PURE__ */ e(U, { variant:
|
|
445
|
-
/* @__PURE__ */ e(
|
|
441
|
+
/* @__PURE__ */ e(U, { variant: ie.variant, children: /* @__PURE__ */ e("span", { children: a(ie.labelKey) }) }),
|
|
442
|
+
/* @__PURE__ */ e(de, { prices: t.prices })
|
|
446
443
|
] })
|
|
447
444
|
]
|
|
448
445
|
},
|
|
449
|
-
|
|
446
|
+
l
|
|
450
447
|
);
|
|
451
448
|
}) })
|
|
452
449
|
] }),
|
|
@@ -459,8 +456,8 @@ function ra() {
|
|
|
459
456
|
at,
|
|
460
457
|
{
|
|
461
458
|
bike: t,
|
|
462
|
-
detailsPath:
|
|
463
|
-
productDetailsLinkState:
|
|
459
|
+
detailsPath: X(t.slug),
|
|
460
|
+
productDetailsLinkState: Z,
|
|
464
461
|
fallbackLanguage: o,
|
|
465
462
|
onAction: H
|
|
466
463
|
},
|
|
@@ -473,30 +470,30 @@ function ra() {
|
|
|
473
470
|
/* @__PURE__ */ e("p", { className: "text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: a("accessories_description") }) })
|
|
474
471
|
] }) }),
|
|
475
472
|
/* @__PURE__ */ e("div", { className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4", children: Y.slice(0, 4).map((t) => {
|
|
476
|
-
const
|
|
473
|
+
const l = A(t.name, i.language, o), s = A(t.description, i.language, o), k = A(t.warning, i.language, o), y = typeof t.images?.[0] == "string" ? t.images[0].trim() : "", g = he(t.primaryImageStyle);
|
|
477
474
|
return /* @__PURE__ */ r("div", { className: "flex h-full flex-col gap-3 rounded-2xl border border-slate-200 bg-white p-4 shadow-sm", children: [
|
|
478
475
|
/* @__PURE__ */ e(
|
|
479
476
|
"div",
|
|
480
477
|
{
|
|
481
|
-
className:
|
|
478
|
+
className: m("relative aspect-[1618/1000] overflow-hidden rounded-xl", g.className),
|
|
482
479
|
style: g.style,
|
|
483
|
-
children: y ? /* @__PURE__ */ e("img", { src: y, alt:
|
|
480
|
+
children: y ? /* @__PURE__ */ e("img", { src: y, alt: l, className: "absolute inset-0 h-full w-full object-contain p-1", loading: "lazy" }) : /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center text-slate-400", children: /* @__PURE__ */ e(oe, { className: "h-8 w-8", "aria-hidden": "true" }) })
|
|
484
481
|
}
|
|
485
482
|
),
|
|
486
483
|
/* @__PURE__ */ r("div", { className: "flex flex-1 flex-col gap-1", children: [
|
|
487
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children:
|
|
484
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: l }) }),
|
|
488
485
|
/* @__PURE__ */ e("p", { className: "line-clamp-2 text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: s }) }),
|
|
489
486
|
/* @__PURE__ */ e(st, { warning: k, className: "mt-1" })
|
|
490
487
|
] }),
|
|
491
|
-
/* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-2", children: /* @__PURE__ */ e(
|
|
488
|
+
/* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-2", children: /* @__PURE__ */ e(de, { prices: t.prices }) })
|
|
492
489
|
] }, t.id);
|
|
493
490
|
}) })
|
|
494
491
|
] }),
|
|
495
492
|
/* @__PURE__ */ e(tt, { preset: x }),
|
|
496
493
|
/* @__PURE__ */ e(it, {}),
|
|
497
|
-
/* @__PURE__ */ e(rt, { preset: x, storeSlug:
|
|
494
|
+
/* @__PURE__ */ e(rt, { preset: x, storeSlug: n ?? "" })
|
|
498
495
|
] });
|
|
499
496
|
}
|
|
500
497
|
export {
|
|
501
|
-
|
|
498
|
+
sa as default
|
|
502
499
|
};
|