@loczer/storefront-sdk 0.208.0 → 0.210.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 (88) hide show
  1. package/dist/StorefrontContext.d.ts +89 -0
  2. package/dist/StorefrontContext.d.ts.map +1 -1
  3. package/dist/StorefrontContext.js +8 -1
  4. package/dist/StorefrontProvider.d.ts +84 -0
  5. package/dist/StorefrontProvider.d.ts.map +1 -1
  6. package/dist/StorefrontProvider.js +55 -41
  7. package/dist/chunks/pkg/booking-engine/dist/node_modules/@date-fns/tz/date/index-DAbcklF5.js +1 -0
  8. package/dist/chunks/pkg/booking-engine/dist/node_modules/@date-fns/tz/date/mini-CSEBo1ZP.js +60 -0
  9. package/dist/chunks/pkg/booking-engine/dist/node_modules/@date-fns/tz/index--u3Qf-qy.js +4 -0
  10. package/dist/chunks/pkg/booking-engine/dist/node_modules/@date-fns/tz/tz/index-CEcibV-H.js +1 -0
  11. package/dist/chunks/pkg/booking-engine/dist/node_modules/@date-fns/tz/tzOffset/index-COlDDdap.js +22 -0
  12. package/dist/chunks/pkg/booking-engine/dist/pricing-BJaynUu_.js +3 -0
  13. package/dist/chunks/pkg/booking-engine/dist/utils/schedule-ssRov9xe.js +39 -0
  14. package/dist/chunks/pkg/booking-engine/dist/utils/timezone-B6XIbBPz.js +79 -0
  15. package/dist/chunks/pkg/ui/dist/Map/{MapContent-CDeWtwKa.js → MapContent-TzYCv8ji.js} +109 -108
  16. package/dist/chunks/pkg/ui/dist/Map/constants-dF2KdJZy.js +8 -0
  17. package/dist/chunks/pkg/ui/dist/{Map-Cs7wgtH9.js → Map-ZM-ZOU9P.js} +1 -1
  18. package/dist/components/BookingBikeVariantDialog/index.js +15 -15
  19. package/dist/components/ContactSection/index.js +9 -9
  20. package/dist/components/Header/index.d.ts.map +1 -1
  21. package/dist/components/Header/index.js +72 -66
  22. package/dist/components/Itineraries/ItinerariesSection.d.ts +2 -0
  23. package/dist/components/Itineraries/ItinerariesSection.d.ts.map +1 -0
  24. package/dist/components/Itineraries/ItinerariesSection.js +81 -0
  25. package/dist/components/Itineraries/ItineraryListItem.d.ts +9 -0
  26. package/dist/components/Itineraries/ItineraryListItem.d.ts.map +1 -0
  27. package/dist/components/Itineraries/ItineraryListItem.js +100 -0
  28. package/dist/components/Itineraries/ItineraryRouteMap.d.ts +10 -0
  29. package/dist/components/Itineraries/ItineraryRouteMap.d.ts.map +1 -0
  30. package/dist/components/Itineraries/ItineraryRouteMap.js +67 -0
  31. package/dist/components/Itineraries/index.d.ts +4 -0
  32. package/dist/components/Itineraries/index.d.ts.map +1 -0
  33. package/dist/components/Itineraries/index.js +4 -0
  34. package/dist/components/Map/index.d.ts +12 -0
  35. package/dist/components/Map/index.d.ts.map +1 -1
  36. package/dist/components/Map/index.js +1 -1
  37. package/dist/components/ProductPriceBadge/index.d.ts.map +1 -1
  38. package/dist/components/ProductPriceBadge/index.js +86 -80
  39. package/dist/components/StorefrontCartPanel/index.d.ts +4 -4
  40. package/dist/components/StorefrontCartPanel/index.d.ts.map +1 -1
  41. package/dist/components/StorefrontCartPanel/index.js +10 -9
  42. package/dist/i18n/en.d.ts +42 -6
  43. package/dist/i18n/en.d.ts.map +1 -1
  44. package/dist/i18n/en.js +44 -8
  45. package/dist/i18n/fr.d.ts +42 -6
  46. package/dist/i18n/fr.d.ts.map +1 -1
  47. package/dist/i18n/fr.js +44 -8
  48. package/dist/index.d.ts +817 -36
  49. package/dist/index.js +67 -60
  50. package/dist/lib/booking.d.ts +0 -6
  51. package/dist/lib/booking.d.ts.map +1 -1
  52. package/dist/lib/booking.js +51 -65
  53. package/dist/lib/cartSummary.d.ts +5 -3
  54. package/dist/lib/cartSummary.d.ts.map +1 -1
  55. package/dist/lib/cartSummary.js +7 -7
  56. package/dist/lib/itineraryPresentation.d.ts +14 -0
  57. package/dist/lib/itineraryPresentation.d.ts.map +1 -0
  58. package/dist/lib/itineraryPresentation.js +26 -0
  59. package/dist/lib/pricing.d.ts +18 -6
  60. package/dist/lib/pricing.d.ts.map +1 -1
  61. package/dist/lib/pricing.js +45 -29
  62. package/dist/lib/storefrontItineraries.d.ts +418 -0
  63. package/dist/lib/storefrontItineraries.d.ts.map +1 -0
  64. package/dist/lib/storefrontItineraries.js +81 -0
  65. package/dist/pages/BookingPage.d.ts.map +1 -1
  66. package/dist/pages/BookingPage.js +205 -201
  67. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  68. package/dist/pages/CheckoutPage.js +276 -273
  69. package/dist/pages/HomePage.d.ts.map +1 -1
  70. package/dist/pages/HomePage.js +111 -108
  71. package/dist/pages/ItinerariesPage.d.ts +2 -0
  72. package/dist/pages/ItinerariesPage.d.ts.map +1 -0
  73. package/dist/pages/ItinerariesPage.js +76 -0
  74. package/dist/pages/ItineraryDetailsPage.d.ts +66 -0
  75. package/dist/pages/ItineraryDetailsPage.d.ts.map +1 -0
  76. package/dist/pages/ItineraryDetailsPage.js +223 -0
  77. package/dist/pages/ProductPage.js +6 -6
  78. package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts +2 -2
  79. package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts.map +1 -1
  80. package/dist/pages/checkout/components/CheckoutSummaryColumn.js +4 -4
  81. package/dist/pages/itineraries/ElevationProfile.d.ts +5 -0
  82. package/dist/pages/itineraries/ElevationProfile.d.ts.map +1 -0
  83. package/dist/pages/itineraries/ElevationProfile.js +59 -0
  84. package/dist/routes.d.ts.map +1 -1
  85. package/dist/routes.js +18 -10
  86. package/dist/storefront.css +1 -1
  87. package/package.json +1 -1
  88. package/dist/chunks/pkg/ui/dist/Map/constants-BNmiJXfg.js +0 -4
@@ -1,133 +1,133 @@
1
1
  import { __toESM as e } from "../../../../_virtual/_rolldown/runtime-CkxIErRK.js";
2
2
  import { cn as t } from "../lib/utils-DXB19bzk.js";
3
- import { DEFAULT_MAP_SKELETON_COLOR as n } from "./constants-BNmiJXfg.js";
4
- import { DEFAULT_MAP_CENTER as r } from "../static/strings-1T2w7LqX.js";
5
- import { classifyMapboxError as i, toSanitizedMapboxError as a } from "./mapboxError-oRn0l3EE.js";
6
- import { Component as o, useEffect as s, useRef as c, useState as l } from "react";
7
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
3
+ import { DEFAULT_MAP_ROUTE_COLOR as n, DEFAULT_MAP_SKELETON_COLOR as r, createMapRoutePaint as i } from "./constants-dF2KdJZy.js";
4
+ import { DEFAULT_MAP_CENTER as a } from "../static/strings-1T2w7LqX.js";
5
+ import { classifyMapboxError as o, toSanitizedMapboxError as s } from "./mapboxError-oRn0l3EE.js";
6
+ import { Component as c, useEffect as l, useRef as u, useState as d } from "react";
7
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
8
8
  //#region ../ui/dist/Map/MapContent.js
9
- var f = 2, p = 750, m = null, h = async () => (m ||= Promise.all([import("../../../../node_modules/mapbox-gl/dist/mapbox-gl-C3ih7CyM.js").then((t) => /* @__PURE__ */ e(t.default, 1)), Promise.resolve({ })]).then(([e]) => e.default ?? e).catch((e) => {
10
- throw m = null, e;
11
- }), m), g = ({ mapboxToken: e, initialCenter: o = r, initialZoom: m = 11, markers: g = [], routeGeoJson: _, polygonGeoJson: y, routeEndpointsToFetch: b, className: x, style: S, interactive: C = !0, showNavigationControl: w = !0, cooperativeGestures: T = !0, mapStyle: E = "mapbox://styles/pr37capital/cmajla29i003901s9ex09hiw4", onMapLoad: D, onMapMoveOrZoom: O, skeletonColor: k = n }) => {
12
- let A = c(null), j = c(null), [M, N] = l(null), P = c([]), F = c(m), [I, L] = l(null), [R, z] = l(!1), B = c(!1), V = t("relative overflow-clip w-full h-full", x);
13
- return s(() => {
14
- if (!A.current || M) return;
15
- let t = !1, n = null, r = 0, s = null, c = !1;
9
+ var m = 2, h = 750, g = null, _ = async () => (g ||= Promise.all([import("../../../../node_modules/mapbox-gl/dist/mapbox-gl-C3ih7CyM.js").then((t) => /* @__PURE__ */ e(t.default, 1)), Promise.resolve({ })]).then(([e]) => e.default ?? e).catch((e) => {
10
+ throw g = null, e;
11
+ }), g), v = ({ mapboxToken: e, initialCenter: c = a, initialZoom: g = 11, markers: v = [], routeGeoJson: y, routeColor: x = n, routeWidth: S = 5, polygonGeoJson: C, routeEndpointsToFetch: w, className: T, style: E, interactive: D = !0, showNavigationControl: O = !0, cooperativeGestures: k = !0, mapStyle: A = "mapbox://styles/pr37capital/cmajla29i003901s9ex09hiw4", onMapLoad: j, onMapMoveOrZoom: M, skeletonColor: N = r }) => {
12
+ let P = u(null), F = u(null), [I, L] = d(null), R = u([]), z = u(g), [B, V] = d(null), [H, U] = d(!1), W = u(!1), G = t("relative overflow-clip w-full h-full", T);
13
+ return l(() => {
14
+ if (!P.current || I) return;
15
+ let t = !1, n = null, r = 0, i = null, a = !1;
16
16
  return (async () => {
17
17
  if (!e) {
18
- L("Configuration carte manquante (token).");
18
+ V("Configuration carte manquante (token).");
19
19
  return;
20
20
  }
21
21
  try {
22
- let n = await h();
22
+ let n = await _();
23
23
  if (t) return;
24
- if (j.current = n, n.accessToken = e, !(typeof n.supported != "function" || n.supported({ failIfMajorPerformanceCaveat: !0 }))) {
25
- L("La carte n'est pas supportée sur cet appareil.");
24
+ if (F.current = n, n.accessToken = e, !(typeof n.supported != "function" || n.supported({ failIfMajorPerformanceCaveat: !0 }))) {
25
+ V("La carte n'est pas supportée sur cet appareil.");
26
26
  return;
27
27
  }
28
28
  } catch (e) {
29
- t || (console.error("Failed to load Mapbox GL:", e), L("La carte n'est pas supportée sur cet appareil."));
29
+ t || (console.error("Failed to load Mapbox GL:", e), V("La carte n'est pas supportée sur cet appareil."));
30
30
  return;
31
31
  }
32
- if (t || !j.current || !A.current) return;
33
- A.current.hasChildNodes() && A.current.replaceChildren();
32
+ if (t || !F.current || !P.current) return;
33
+ P.current.hasChildNodes() && P.current.replaceChildren();
34
34
  try {
35
- n = new j.current.Map({
36
- container: A.current,
37
- style: E,
38
- center: o,
39
- zoom: m,
35
+ n = new F.current.Map({
36
+ container: P.current,
37
+ style: A,
38
+ center: c,
39
+ zoom: g,
40
40
  attributionControl: !1,
41
- interactive: C,
42
- cooperativeGestures: T,
41
+ interactive: D,
42
+ cooperativeGestures: k,
43
43
  pitchWithRotate: !1,
44
44
  dragRotate: !1,
45
45
  touchPitch: !1,
46
46
  performanceMetricsCollection: !1
47
47
  });
48
48
  } catch (e) {
49
- console.error("Failed to initialize Mapbox map:", e), L("Erreur lors du chargement de la carte.");
49
+ console.error("Failed to initialize Mapbox map:", e), V("Erreur lors du chargement de la carte.");
50
50
  return;
51
51
  }
52
52
  let l = n, u = () => {
53
- s !== null && (window.clearTimeout(s), s = null);
53
+ i !== null && (window.clearTimeout(i), i = null);
54
54
  }, d = (e) => {
55
- if (!(t || c)) {
56
- c = !0, u(), console.error("Fatal Mapbox map error:", e);
55
+ if (!(t || a)) {
56
+ a = !0, u(), console.error("Fatal Mapbox map error:", e);
57
57
  try {
58
58
  l.remove();
59
59
  } catch (e) {
60
60
  console.warn("Failed to remove unusable Mapbox map instance:", e);
61
61
  }
62
- n = null, N(null), L("Erreur lors du chargement de la carte.");
62
+ n = null, L(null), V("Erreur lors du chargement de la carte.");
63
63
  }
64
64
  };
65
65
  if (l.on("error", (e) => {
66
- if (t || c) return;
67
- let n = i(e), o = a(e);
66
+ if (t || a) return;
67
+ let n = o(e), c = s(e);
68
68
  if (n === "recoverable") {
69
- console.warn("Recoverable Mapbox resource error; keeping the map mounted:", o);
69
+ console.warn("Recoverable Mapbox resource error; keeping the map mounted:", c);
70
70
  return;
71
71
  }
72
72
  if (n === "fatal") {
73
- d(o);
73
+ d(c);
74
74
  return;
75
75
  }
76
- if (s !== null) return;
77
- if (r >= f) {
78
- d(/* @__PURE__ */ Error(`Mapbox style failed after ${f} retries: ${o.message}`));
76
+ if (i !== null) return;
77
+ if (r >= m) {
78
+ d(/* @__PURE__ */ Error(`Mapbox style failed after ${m} retries: ${c.message}`));
79
79
  return;
80
80
  }
81
81
  r += 1;
82
- let u = p * 2 ** (r - 1);
83
- console.warn(`Transient Mapbox style error; retrying in ${u}ms:`, o), s = window.setTimeout(() => {
84
- if (s = null, !(t || c)) try {
85
- l.setStyle(E);
82
+ let u = h * 2 ** (r - 1);
83
+ console.warn(`Transient Mapbox style error; retrying in ${u}ms:`, c), i = window.setTimeout(() => {
84
+ if (i = null, !(t || a)) try {
85
+ l.setStyle(A);
86
86
  } catch (e) {
87
- d(a(e));
87
+ d(s(e));
88
88
  }
89
89
  }, u);
90
90
  }), l.on("style.load", () => {
91
91
  r = 0, u();
92
- }), l.touchZoomRotate?.disableRotation?.(), w) {
93
- let e = new v({ showCompass: !1 });
92
+ }), l.touchZoomRotate?.disableRotation?.(), O) {
93
+ let e = new b({ showCompass: !1 });
94
94
  l.addControl(e, "bottom-right");
95
95
  }
96
- let g = () => {
97
- B.current || (B.current = !0, z(!0));
96
+ let f = () => {
97
+ W.current || (W.current = !0, U(!0));
98
98
  };
99
99
  l.on("load", () => {
100
- t || c || (N(l), D && D(l), typeof l.areTilesLoaded == "function" && l.areTilesLoaded() ? g() : l.once("idle", g));
100
+ t || a || (L(l), j && j(l), typeof l.areTilesLoaded == "function" && l.areTilesLoaded() ? f() : l.once("idle", f));
101
101
  });
102
102
  })(), () => {
103
- t = !0, s !== null && window.clearTimeout(s);
103
+ t = !0, i !== null && window.clearTimeout(i);
104
104
  try {
105
105
  n?.remove();
106
106
  } catch (e) {
107
107
  console.error("Error removing map instance on unmount:", e);
108
108
  }
109
109
  };
110
- }, []), s(() => {
111
- M || (z(!1), B.current = !1);
112
- }, [M]), s(() => {
113
- if (!M || !O) return;
114
- let e = () => O(M);
115
- return M.on("moveend", e), M.on("zoomend", e), () => {
116
- M.off("moveend", e), M.off("zoomend", e);
110
+ }, []), l(() => {
111
+ I || (U(!1), W.current = !1);
112
+ }, [I]), l(() => {
113
+ if (!I || !M) return;
114
+ let e = () => M(I);
115
+ return I.on("moveend", e), I.on("zoomend", e), () => {
116
+ I.off("moveend", e), I.off("zoomend", e);
117
117
  };
118
- }, [M, O]), s(() => {
119
- M && m !== F.current && (M.setZoom(m), F.current = m);
120
- }, [m, M]), s(() => {
121
- let e = j.current;
122
- !M || !e || (P.current.forEach((e) => e.remove()), P.current = [], g.forEach((t) => {
118
+ }, [I, M]), l(() => {
119
+ I && g !== z.current && (I.setZoom(g), z.current = g);
120
+ }, [g, I]), l(() => {
121
+ let e = F.current;
122
+ !I || !e || (R.current.forEach((e) => e.remove()), R.current = [], v.forEach((t) => {
123
123
  let n = {};
124
124
  t.element ? n.element = t.element : n.color = t.color || "#3FB1CE", t.offset && (n.offset = t.offset);
125
- let r = new e.Marker(n).setLngLat(t.coords).addTo(M);
125
+ let r = new e.Marker(n).setLngLat(t.coords).addTo(I);
126
126
  if (t.popupHTML) {
127
127
  let n = { offset: 25 };
128
128
  t.popupCloseButton === !1 && (n.closeButton = !1);
129
129
  let i = new e.Popup(n).setHTML(t.popupHTML), a, o = () => {
130
- clearTimeout(a), i.isOpen() || i.setLngLat(t.coords).addTo(M);
130
+ clearTimeout(a), i.isOpen() || i.setLngLat(t.coords).addTo(I);
131
131
  }, s = () => {
132
132
  a = setTimeout(() => {
133
133
  i.remove();
@@ -138,15 +138,15 @@ var f = 2, p = 750, m = null, h = async () => (m ||= Promise.all([import("../../
138
138
  e && (e.addEventListener("mouseenter", o), e.addEventListener("mouseleave", s));
139
139
  });
140
140
  }
141
- P.current.push(r);
141
+ R.current.push(r);
142
142
  }));
143
- }, [M, g]), s(() => {
144
- if (!M || !M.isStyleLoaded()) return;
143
+ }, [I, v]), l(() => {
144
+ if (!I || !I.isStyleLoaded()) return;
145
145
  let e = "route-geojson-direct", t = "route-layer-direct";
146
- M.getLayer(t) && M.removeLayer(t), M.getSource(e) && M.removeSource(e), _ && (M.addSource(e, {
146
+ I.getLayer(t) && I.removeLayer(t), I.getSource(e) && I.removeSource(e), y && (I.addSource(e, {
147
147
  type: "geojson",
148
- data: _
149
- }), M.addLayer({
148
+ data: y
149
+ }), I.addLayer({
150
150
  id: t,
151
151
  type: "line",
152
152
  source: e,
@@ -154,19 +154,20 @@ var f = 2, p = 750, m = null, h = async () => (m ||= Promise.all([import("../../
154
154
  "line-join": "round",
155
155
  "line-cap": "round"
156
156
  },
157
- paint: {
158
- "line-color": "#DB2777",
159
- "line-width": 5,
160
- "line-opacity": .75
161
- }
157
+ paint: i(x, S)
162
158
  }));
163
- }, [M, _]), s(() => {
164
- if (!M || !M.isStyleLoaded()) return;
159
+ }, [
160
+ I,
161
+ x,
162
+ y,
163
+ S
164
+ ]), l(() => {
165
+ if (!I || !I.isStyleLoaded()) return;
165
166
  let e = "polygon-data", t = "polygon-fill-layer", n = "polygon-line-layer";
166
- M.getLayer(t) && M.removeLayer(t), M.getLayer(n) && M.removeLayer(n), M.getSource(e) && M.removeSource(e), y && (M.addSource(e, {
167
+ I.getLayer(t) && I.removeLayer(t), I.getLayer(n) && I.removeLayer(n), I.getSource(e) && I.removeSource(e), C && (I.addSource(e, {
167
168
  type: "geojson",
168
- data: y
169
- }), M.addLayer({
169
+ data: C
170
+ }), I.addLayer({
170
171
  id: t,
171
172
  type: "fill",
172
173
  source: e,
@@ -182,7 +183,7 @@ var f = 2, p = 750, m = null, h = async () => (m ||= Promise.all([import("../../
182
183
  .2
183
184
  ]
184
185
  }
185
- }), M.addLayer({
186
+ }), I.addLayer({
186
187
  id: n,
187
188
  type: "line",
188
189
  source: e,
@@ -199,9 +200,9 @@ var f = 2, p = 750, m = null, h = async () => (m ||= Promise.all([import("../../
199
200
  ]
200
201
  }
201
202
  }));
202
- }, [M, y]), s(() => {
203
- if (!M || !M.isStyleLoaded() || !b || b.coordinates.length < 2) return;
204
- let { profile: t = "cycling", coordinates: n } = b, r = "route-fetched", i = "route-layer-fetched";
203
+ }, [I, C]), l(() => {
204
+ if (!I || !I.isStyleLoaded() || !w || w.coordinates.length < 2) return;
205
+ let { profile: t = "cycling", coordinates: n } = w, r = "route-fetched", i = "route-layer-fetched";
205
206
  return (async () => {
206
207
  if (!e) return;
207
208
  let a = n.map((e) => {
@@ -219,10 +220,10 @@ var f = 2, p = 750, m = null, h = async () => (m ||= Promise.all([import("../../
219
220
  let t = await e.json();
220
221
  if (t.routes && t.routes.length > 0) {
221
222
  let e = t.routes[0].geometry;
222
- M.getLayer(i) && M.removeLayer(i), M.getSource(r) && M.removeSource(r), M.addSource(r, {
223
+ I.getLayer(i) && I.removeLayer(i), I.getSource(r) && I.removeSource(r), I.addSource(r, {
223
224
  type: "geojson",
224
225
  data: e
225
- }), M.addLayer({
226
+ }), I.addLayer({
226
227
  id: i,
227
228
  type: "line",
228
229
  source: r,
@@ -241,31 +242,31 @@ var f = 2, p = 750, m = null, h = async () => (m ||= Promise.all([import("../../
241
242
  console.error("Failed to fetch route from Mapbox:", e);
242
243
  }
243
244
  })(), () => {
244
- M && M.isStyleLoaded() && (M.getLayer(i) && M.removeLayer(i), M.getSource(r) && M.removeSource(r));
245
+ I && I.isStyleLoaded() && (I.getLayer(i) && I.removeLayer(i), I.getSource(r) && I.removeSource(r));
245
246
  };
246
- }, [M, b]), I ? /* @__PURE__ */ u("div", {
247
- className: V,
248
- style: S,
249
- children: /* @__PURE__ */ u("div", {
247
+ }, [I, w]), B ? /* @__PURE__ */ f("div", {
248
+ className: G,
249
+ style: E,
250
+ children: /* @__PURE__ */ f("div", {
250
251
  className: t("flex h-full w-full items-center justify-center text-center text-sm text-gray-500"),
251
- children: I
252
+ children: B
252
253
  })
253
- }) : /* @__PURE__ */ d("div", {
254
- className: V,
255
- style: S,
256
- children: [/* @__PURE__ */ u("div", {
254
+ }) : /* @__PURE__ */ p("div", {
255
+ className: G,
256
+ style: E,
257
+ children: [/* @__PURE__ */ f("div", {
257
258
  "aria-hidden": "true",
258
- className: t("absolute inset-0 transition-opacity duration-500 ease-out", R ? "pointer-events-none opacity-0" : "opacity-100"),
259
- children: /* @__PURE__ */ u("div", {
259
+ className: t("absolute inset-0 transition-opacity duration-500 ease-out", H ? "pointer-events-none opacity-0" : "opacity-100"),
260
+ children: /* @__PURE__ */ f("div", {
260
261
  className: "h-full w-full",
261
- style: { backgroundColor: k }
262
+ style: { backgroundColor: N }
262
263
  })
263
- }), /* @__PURE__ */ u("div", {
264
- ref: A,
265
- className: t("h-full w-full transition-opacity duration-500 ease-out", R ? "opacity-100" : "pointer-events-none opacity-0")
264
+ }), /* @__PURE__ */ f("div", {
265
+ ref: P,
266
+ className: t("h-full w-full transition-opacity duration-500 ease-out", H ? "opacity-100" : "pointer-events-none opacity-0")
266
267
  })]
267
268
  });
268
- }, _ = class extends o {
269
+ }, y = class extends c {
269
270
  constructor(e) {
270
271
  super(e), this.state = { hasError: !1 };
271
272
  }
@@ -277,16 +278,16 @@ var f = 2, p = 750, m = null, h = async () => (m ||= Promise.all([import("../../
277
278
  }
278
279
  render() {
279
280
  let e = t("overflow-clip w-full h-full", this.props.className);
280
- return this.state.hasError ? /* @__PURE__ */ u("div", {
281
+ return this.state.hasError ? /* @__PURE__ */ f("div", {
281
282
  className: e,
282
283
  style: this.props.style,
283
- children: /* @__PURE__ */ u("div", {
284
+ children: /* @__PURE__ */ f("div", {
284
285
  className: t("flex h-full w-full items-center justify-center text-center text-sm text-gray-500"),
285
286
  children: "Erreur lors du chargement de la carte."
286
287
  })
287
288
  }) : this.props.children;
288
289
  }
289
- }, v = class {
290
+ }, b = class {
290
291
  options;
291
292
  container = null;
292
293
  map = null;
@@ -330,10 +331,10 @@ var f = 2, p = 750, m = null, h = async () => (m ||= Promise.all([import("../../
330
331
  let n = Math.abs(e) < .01 && Math.abs(t) < .01;
331
332
  this.compassButton.classList.toggle("opacity-60", n);
332
333
  };
333
- }, y = (e) => /* @__PURE__ */ u(_, {
334
+ }, x = (e) => /* @__PURE__ */ f(y, {
334
335
  className: e.className,
335
336
  style: e.style,
336
- children: /* @__PURE__ */ u(g, { ...e })
337
+ children: /* @__PURE__ */ f(v, { ...e })
337
338
  });
338
339
  //#endregion
339
- export { y as default };
340
+ export { x as default };
@@ -0,0 +1,8 @@
1
+ //#region ../ui/dist/Map/constants.js
2
+ var e = "rgb(201 221 176)", t = "#DB2777", n = (e, t) => ({
3
+ "line-color": e,
4
+ "line-width": t,
5
+ "line-opacity": .75
6
+ });
7
+ //#endregion
8
+ export { t as DEFAULT_MAP_ROUTE_COLOR, e as DEFAULT_MAP_SKELETON_COLOR, n as createMapRoutePaint };
@@ -14,7 +14,7 @@ var l = ({ className: t, style: n, color: r }) => /* @__PURE__ */ c("div", {
14
14
  style: { backgroundColor: r ?? "rgb(201 221 176)" }
15
15
  })
16
16
  }), /* @__PURE__ */ s("div", { className: "h-full w-full transition-opacity duration-500 ease-out pointer-events-none opacity-0" })]
17
- }), u = r(() => import("./Map/MapContent-CDeWtwKa.js")), d = (e) => {
17
+ }), u = r(() => import("./Map/MapContent-TzYCv8ji.js")), d = (e) => {
18
18
  let r = a(null), [c, d] = o(!1);
19
19
  i(() => {
20
20
  if (t()) return;
@@ -3,9 +3,9 @@ import { getLocalizedValue as r } from "../../localization.js";
3
3
  import { getAvailabilityVariant as i } from "../../lib/utils.js";
4
4
  import { Badge as a } from "../../ui/badge.js";
5
5
  import { Button as o } from "../../ui/button.js";
6
- import { RESPONSIVE_DIALOG_MOBILE_MEDIA_QUERY as s, ResponsiveDialog as c, ResponsiveDialogContent as l, ResponsiveDialogDescription as u, ResponsiveDialogFooter as d, ResponsiveDialogHeader as f, ResponsiveDialogTitle as p } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BVwhTZQo.js";
7
- import { Input as m } from "../../ui/input.js";
8
- import { useStorefrontWorkspaceLanguage as h } from "../../StorefrontContext.js";
6
+ import { useStorefrontWorkspaceLanguage as s } from "../../StorefrontContext.js";
7
+ import { RESPONSIVE_DIALOG_MOBILE_MEDIA_QUERY as c, ResponsiveDialog as l, ResponsiveDialogContent as u, ResponsiveDialogDescription as d, ResponsiveDialogFooter as f, ResponsiveDialogHeader as p, ResponsiveDialogTitle as m } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BVwhTZQo.js";
8
+ import { Input as h } from "../../ui/input.js";
9
9
  import { ProductWarningNotice as g } from "../ProductWarningNotice/index.js";
10
10
  import { ProductPriceBadge as _ } from "../ProductPriceBadge/index.js";
11
11
  import { resolveProductImageContainerStyle as v } from "../../lib/productImageStyles.js";
@@ -20,21 +20,21 @@ var A = (e) => {
20
20
  let t = Number.parseInt(e, 10);
21
21
  return !Number.isFinite(t) || t < 1 ? 1 : t;
22
22
  };
23
- function j({ open: m, product: j, onOpenChange: N, getVariantAvailabilityLabel: P, isVariantOutOfCapacity: F, addDisabled: I = !1, onAddVariant: L }) {
24
- let { t: R, i18n: z } = w(), B = C(s), V = h(), [H, U] = b({});
23
+ function j({ open: h, product: j, onOpenChange: N, getVariantAvailabilityLabel: P, isVariantOutOfCapacity: F, addDisabled: I = !1, onAddVariant: L }) {
24
+ let { t: R, i18n: z } = w(), B = C(c), V = s(), [H, U] = b({});
25
25
  if (y(() => {
26
- !j || !m || U((j.productVariants ?? []).reduce((e, t) => (e[t.id] = "1", e), {}));
27
- }, [m, j]), !j) return null;
26
+ !j || !h || U((j.productVariants ?? []).reduce((e, t) => (e[t.id] = "1", e), {}));
27
+ }, [h, j]), !j) return null;
28
28
  let W = (e, t) => {
29
29
  U((n) => ({
30
30
  ...n,
31
31
  [e]: t
32
32
  }));
33
33
  }, G = r(j.name, z.language, V), K = r(j.description, z.language, V), q = r(j.warning, z.language, V), J = typeof j.images?.[0] == "string" ? j.images[0].trim() : "", Y = v(j.primaryImageStyle), X = i(j.availabilityStatus), Z = j.features?.slice(0, 4) ?? [], Q = j.productVariants ?? [], $ = Q.some((t) => !!e(t, "size")) ? R("product_size_label") : R("product_variant_label");
34
- return /* @__PURE__ */ x(c, {
35
- open: m,
34
+ return /* @__PURE__ */ x(l, {
35
+ open: h,
36
36
  onOpenChange: N,
37
- children: /* @__PURE__ */ x(l, {
37
+ children: /* @__PURE__ */ x(u, {
38
38
  "data-testid": "storefront-booking-bike-dialog-content",
39
39
  className: "overflow-hidden border-slate-200 bg-white p-0",
40
40
  desktopClassName: "max-w-4xl gap-0",
@@ -43,12 +43,12 @@ function j({ open: m, product: j, onOpenChange: N, getVariantAvailabilityLabel:
43
43
  "data-testid": "storefront-booking-bike-dialog",
44
44
  className: "flex max-h-[92dvh] flex-col",
45
45
  children: [
46
- /* @__PURE__ */ S(f, {
46
+ /* @__PURE__ */ S(p, {
47
47
  className: "border-b border-slate-200 px-5 py-4 text-left sm:px-6",
48
- children: [/* @__PURE__ */ x(p, {
48
+ children: [/* @__PURE__ */ x(m, {
49
49
  className: "text-left text-lg font-semibold text-slate-950",
50
50
  children: /* @__PURE__ */ x("span", { children: G })
51
- }), /* @__PURE__ */ x(u, {
51
+ }), /* @__PURE__ */ x(d, {
52
52
  className: "line-clamp-2 text-left text-sm text-slate-600",
53
53
  children: /* @__PURE__ */ x("span", { children: K })
54
54
  })]
@@ -208,7 +208,7 @@ function j({ open: m, product: j, onOpenChange: N, getVariantAvailabilityLabel:
208
208
  })]
209
209
  })
210
210
  }),
211
- /* @__PURE__ */ x(d, {
211
+ /* @__PURE__ */ x(f, {
212
212
  className: "border-t border-slate-200 px-5 py-4 sm:px-6",
213
213
  children: /* @__PURE__ */ x(o, {
214
214
  type: "button",
@@ -226,7 +226,7 @@ function j({ open: m, product: j, onOpenChange: N, getVariantAvailabilityLabel:
226
226
  function M({ ariaLabel: e, onQuantityChange: t, quantity: n, testIdPrefix: r }) {
227
227
  return /* @__PURE__ */ x("div", {
228
228
  className: "flex items-center",
229
- children: /* @__PURE__ */ x(m, {
229
+ children: /* @__PURE__ */ x(h, {
230
230
  type: "text",
231
231
  inputMode: "numeric",
232
232
  pattern: "[0-9]*",
@@ -4,9 +4,9 @@ import { resolveStorefrontWhatsAppContact as i } from "../../lib/whatsapp.js";
4
4
  import a from "../../chunks/assets/whatsapp-m5e0vjnZ.js";
5
5
  import { MISSING_SHOP_ADDRESS as o, MISSING_SHOP_EMAIL as s, MISSING_SHOP_PHONE_NUMBER as c, UNCONFIGURED_SHOP_MAP_CENTER as l } from "../../lib/storefrontMissingValues.js";
6
6
  import { Button as u } from "../../ui/button.js";
7
- import { toast as d } from "../../lib/toast.js";
8
- import { Input as f } from "../../ui/input.js";
9
- import { useStorefront as p } from "../../StorefrontContext.js";
7
+ import { useStorefront as d } from "../../StorefrontContext.js";
8
+ import { toast as f } from "../../lib/toast.js";
9
+ import { Input as p } from "../../ui/input.js";
10
10
  import { Form as m, FormControl as h, FormField as g, FormItem as _, FormLabel as v, FormMessage as y } from "../../ui/form.js";
11
11
  import { Textarea as ee } from "../../ui/textarea.js";
12
12
  import { createMarkerElement as b } from "../Map/createMarkerElement.js";
@@ -21,7 +21,7 @@ import { useForm as M, zodResolver as N } from "@rpcbase/form";
21
21
  //#region src/components/ContactSection/index.tsx
22
22
  var P = (e) => e.startsWith("fr") ? "FR" : "US", F = "text-sm font-normal text-current decoration-current underline-offset-4 group-hover:underline", I = "group flex items-start gap-3 text-slate-600 transition-colors hover:text-slate-800";
23
23
  function L({ storeSlug: L }) {
24
- let { t: R, i18n: z } = E(), { storefrontConfiguration: B, mapboxToken: V } = p(), { shop: H } = B, U = r(H), W = H.emailAddress?.trim() ?? "", G = H.address?.trim() ?? "", K = n(H), q = i({
24
+ let { t: R, i18n: z } = E(), { storefrontConfiguration: B, mapboxToken: V } = d(), { shop: H } = B, U = r(H), W = H.emailAddress?.trim() ?? "", G = H.address?.trim() ?? "", K = n(H), q = i({
25
25
  storefrontConfiguration: B,
26
26
  language: z.language
27
27
  }), J = q?.href, Y = M({
@@ -61,13 +61,13 @@ function L({ storeSlug: L }) {
61
61
  })
62
62
  }), i = await r.json().then((e) => t.safeParse(e)).catch(() => ({ success: !1 }));
63
63
  if (r.ok && "success" in i && i.success && i.data.success) {
64
- d.success(R("contact_form_success_toast")), Y.reset();
64
+ f.success(R("contact_form_success_toast")), Y.reset();
65
65
  return;
66
66
  }
67
67
  let a = "success" in i && i.success && i.data.error ? i.data.error : R("contact_form_error_toast");
68
- d.error(a);
68
+ f.error(a);
69
69
  } catch (e) {
70
- console.warn("Storefront contact form request failed", e), d.error(R("contact_form_error_toast"));
70
+ console.warn("Storefront contact form request failed", e), f.error(R("contact_form_error_toast"));
71
71
  }
72
72
  });
73
73
  return /* @__PURE__ */ w("section", {
@@ -277,7 +277,7 @@ function L({ storeSlug: L }) {
277
277
  name: "name",
278
278
  render: ({ field: e }) => /* @__PURE__ */ T(_, { children: [
279
279
  /* @__PURE__ */ w(v, { children: R("contact_form_name_label") }),
280
- /* @__PURE__ */ w(h, { children: /* @__PURE__ */ w(f, {
280
+ /* @__PURE__ */ w(h, { children: /* @__PURE__ */ w(p, {
281
281
  ...e,
282
282
  placeholder: R("contact_form_name_placeholder"),
283
283
  className: "h-11"
@@ -290,7 +290,7 @@ function L({ storeSlug: L }) {
290
290
  name: "emailAddress",
291
291
  render: ({ field: e }) => /* @__PURE__ */ T(_, { children: [
292
292
  /* @__PURE__ */ w(v, { children: R("contact_form_email_label") }),
293
- /* @__PURE__ */ w(h, { children: /* @__PURE__ */ w(f, {
293
+ /* @__PURE__ */ w(h, { children: /* @__PURE__ */ w(p, {
294
294
  ...e,
295
295
  type: "email",
296
296
  placeholder: R("contact_form_email_placeholder"),
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Header/index.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAKtE,KAAK,WAAW,GAAG;IACjB,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;IACjD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B,CAAA;AAQD,wBAAgB,MAAM,CAAC,EAAE,uBAAuB,EAAE,YAAY,EAAE,oBAAoB,EAAE,EAAE,WAAW,2CA6KlG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Header/index.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAMtE,KAAK,WAAW,GAAG;IACjB,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;IACjD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B,CAAA;AAQD,wBAAgB,MAAM,CAAC,EAAE,uBAAuB,EAAE,YAAY,EAAE,oBAAoB,EAAE,EAAE,WAAW,2CAmLlG"}