@alfadocs/ui-kit 0.30.0 → 0.30.1

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 (49) hide show
  1. package/dist/_chunks/{booking-BYuc_8HV.js → booking-Bw9eOU4k.js} +767 -725
  2. package/dist/_chunks/{patient-search-BhlxYAI3.js → patient-search-DuSoGG2t.js} +338 -327
  3. package/dist/_chunks/{public-footer.agent-CA29gxHJ.js → public-footer.agent-DivkKdG4.js} +188 -167
  4. package/dist/agent-catalog.json +1 -1
  5. package/dist/components/booking/booking-types.d.ts +22 -0
  6. package/dist/components/booking/details-form.d.ts +7 -0
  7. package/dist/components/booking/index.js +1 -1
  8. package/dist/components/patient-search/index.js +1 -1
  9. package/dist/components/patient-search/patient-search.d.ts +9 -0
  10. package/dist/components/public-footer/index.js +1 -1
  11. package/dist/components/public-footer/public-footer.d.ts +7 -0
  12. package/dist/i18n/config.js +146 -20
  13. package/dist/i18n/locales/ar.d.ts +7 -0
  14. package/dist/i18n/locales/de.d.ts +7 -0
  15. package/dist/i18n/locales/el.d.ts +7 -0
  16. package/dist/i18n/locales/es.d.ts +7 -0
  17. package/dist/i18n/locales/fr.d.ts +7 -0
  18. package/dist/i18n/locales/hi.d.ts +7 -0
  19. package/dist/i18n/locales/ja.d.ts +7 -0
  20. package/dist/i18n/locales/nl.d.ts +7 -0
  21. package/dist/i18n/locales/pl.d.ts +7 -0
  22. package/dist/i18n/locales/pt.d.ts +7 -0
  23. package/dist/i18n/locales/ro.d.ts +7 -0
  24. package/dist/i18n/locales/ru.d.ts +7 -0
  25. package/dist/i18n/locales/sq.d.ts +7 -0
  26. package/dist/i18n/locales/sv.d.ts +7 -0
  27. package/dist/i18n/locales/tr.d.ts +7 -0
  28. package/dist/i18n/locales/zh.d.ts +7 -0
  29. package/dist/i18n/resources.d.ts +14 -0
  30. package/dist/index.js +3 -3
  31. package/dist/locales/ar.json +8 -1
  32. package/dist/locales/de.json +8 -1
  33. package/dist/locales/el.json +8 -1
  34. package/dist/locales/en.json +8 -1
  35. package/dist/locales/es.json +8 -1
  36. package/dist/locales/fr.json +8 -1
  37. package/dist/locales/hi.json +8 -1
  38. package/dist/locales/it.json +8 -1
  39. package/dist/locales/ja.json +8 -1
  40. package/dist/locales/nl.json +8 -1
  41. package/dist/locales/pl.json +8 -1
  42. package/dist/locales/pt.json +8 -1
  43. package/dist/locales/ro.json +8 -1
  44. package/dist/locales/ru.json +8 -1
  45. package/dist/locales/sq.json +8 -1
  46. package/dist/locales/sv.json +8 -1
  47. package/dist/locales/tr.json +8 -1
  48. package/dist/locales/zh.json +8 -1
  49. package/package.json +5 -1
@@ -1,43 +1,43 @@
1
- import { jsxs as g, jsx as a, Fragment as ie } from "react/jsx-runtime";
2
- import { forwardRef as Ve, useId as Fe, useState as z, useCallback as ee, useRef as ne, useEffect as se, useMemo as I, useImperativeHandle as ot } from "react";
1
+ import { jsxs as f, jsx as a, Fragment as Z } from "react/jsx-runtime";
2
+ import { forwardRef as ze, useId as $e, useState as q, useCallback as te, useRef as de, useEffect as re, useMemo as w, useImperativeHandle as lt } from "react";
3
3
  import { c as xe } from "./index-D2ZczOXr.js";
4
- import { useTranslation as M, Trans as rt } from "react-i18next";
5
- import { u as dt } from "./registry-C9nwlNyL.js";
6
- import { B as oe } from "./button-DD_0Xdmr.js";
7
- import { C as we } from "./checkbox-mwbrPZDY.js";
8
- import { C as lt } from "./checkbox-group-Bwmt1ovQ.js";
9
- import { D as ct } from "./date-picker-D0Ry1dMz.js";
10
- import { E as mt } from "./email-input-DvJ_kPKL.js";
11
- import { F as U } from "./form-field-BOm9hK35.js";
12
- import { P as ut } from "./phone-input-DKSHX7NQ.js";
13
- import { T as pt } from "./text-area-D5GAe8pV.js";
4
+ import { useTranslation as T, Trans as ct } from "react-i18next";
5
+ import { u as mt } from "./registry-C9nwlNyL.js";
6
+ import { A as F } from "./alert-ywPR59NE.js";
7
+ import { B as ae } from "./button-DD_0Xdmr.js";
8
+ import { C as Me } from "./checkbox-mwbrPZDY.js";
9
+ import { C as ut } from "./checkbox-group-Bwmt1ovQ.js";
10
+ import { D as pt } from "./date-picker-D0Ry1dMz.js";
11
+ import { E as gt } from "./email-input-DvJ_kPKL.js";
12
+ import { F as Y } from "./form-field-BOm9hK35.js";
13
+ import { P as ft } from "./phone-input-DKSHX7NQ.js";
14
+ import { T as ht } from "./text-area-D5GAe8pV.js";
14
15
  import { T as fe } from "./text-input-CakysYnD.js";
15
- import { S as gt } from "./spinner-CCByyvcb.js";
16
- import { A as $ } from "./alert-ywPR59NE.js";
17
- import { I as Be } from "./icon-button-BRHSSFmZ.js";
16
+ import { S as vt } from "./spinner-CCByyvcb.js";
17
+ import { I as Pe } from "./icon-button-BRHSSFmZ.js";
18
18
  import { S as Se } from "./select-C92AT_OZ.js";
19
19
  import { S as ye } from "./skeleton-CZbwyJAA.js";
20
- import { E as Re } from "./empty-state-BLy7tigq.js";
21
- import { S as ft } from "./stepper-accordion-BfS6lUB9.js";
22
- import { S as ht } from "./stepper-progress-jFY8BSf7.js";
23
- import { p as Q } from "./parseISO-Dk4xa7q6.js";
24
- import { o as ze, f as me, d as vt, h as be, q as he } from "./react-day-picker-D3yzgvDB.js";
25
- import { C as bt } from "./chevron-left-CX1jqD2M.js";
26
- import { C as yt } from "./chevron-right-BrpYejk0.js";
27
- import { i as Oe } from "./isSameDay-DHG8Xade.js";
28
- import { c as O } from "./createLucideIcon-CrFbzy84.js";
29
- import { M as kt, S as xt } from "./sun-BuXE0xUS.js";
30
- import { S as St } from "./stethoscope-DT5qCW8Y.js";
31
- import { H as Nt } from "./heart-pulse-CvuyFKHB.js";
32
- import { E as It } from "./eye-LHlSU38h.js";
33
- import { S as wt } from "./sparkles-CuYXqQLg.js";
20
+ import { E as Ke } from "./empty-state-BLy7tigq.js";
21
+ import { S as bt } from "./stepper-accordion-BfS6lUB9.js";
22
+ import { S as yt } from "./stepper-progress-jFY8BSf7.js";
23
+ import { p as ee } from "./parseISO-Dk4xa7q6.js";
24
+ import { o as je, f as ue, d as kt, h as be, q as he } from "./react-day-picker-D3yzgvDB.js";
25
+ import { C as xt } from "./chevron-left-CX1jqD2M.js";
26
+ import { C as St } from "./chevron-right-BrpYejk0.js";
27
+ import { i as Le } from "./isSameDay-DHG8Xade.js";
28
+ import { c as B } from "./createLucideIcon-CrFbzy84.js";
29
+ import { M as Nt, S as It } from "./sun-BuXE0xUS.js";
30
+ import { S as wt } from "./stethoscope-DT5qCW8Y.js";
31
+ import { H as Ct } from "./heart-pulse-CvuyFKHB.js";
32
+ import { E as Mt } from "./eye-LHlSU38h.js";
33
+ import { S as Dt } from "./sparkles-CuYXqQLg.js";
34
34
  /**
35
35
  * @license lucide-react v1.8.0 - ISC
36
36
  *
37
37
  * This source code is licensed under the ISC license.
38
38
  * See the LICENSE file in the root directory of this source tree.
39
39
  */
40
- const Ct = [
40
+ const Tt = [
41
41
  [
42
42
  "path",
43
43
  {
@@ -45,14 +45,14 @@ const Ct = [
45
45
  key: "169zse"
46
46
  }
47
47
  ]
48
- ], Mt = O("activity", Ct);
48
+ ], _t = B("activity", Tt);
49
49
  /**
50
50
  * @license lucide-react v1.8.0 - ISC
51
51
  *
52
52
  * This source code is licensed under the ISC license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
54
  */
55
- const Dt = [
55
+ const At = [
56
56
  ["path", { d: "M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5", key: "1u7htd" }],
57
57
  ["path", { d: "M15 12h.01", key: "1k8ypt" }],
58
58
  [
@@ -63,14 +63,14 @@ const Dt = [
63
63
  }
64
64
  ],
65
65
  ["path", { d: "M9 12h.01", key: "157uk2" }]
66
- ], Tt = O("baby", Dt);
66
+ ], Bt = B("baby", At);
67
67
  /**
68
68
  * @license lucide-react v1.8.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
72
  */
73
- const _t = [
73
+ const Ot = [
74
74
  [
75
75
  "path",
76
76
  {
@@ -78,14 +78,14 @@ const _t = [
78
78
  key: "w610uw"
79
79
  }
80
80
  ]
81
- ], At = O("bone", _t);
81
+ ], Et = B("bone", Ot);
82
82
  /**
83
83
  * @license lucide-react v1.8.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
87
  */
88
- const Bt = [
88
+ const Pt = [
89
89
  ["path", { d: "M12 18V5", key: "adv99a" }],
90
90
  ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
91
91
  ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
@@ -94,14 +94,14 @@ const Bt = [
94
94
  ["path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517", key: "1gq6am" }],
95
95
  ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
96
96
  ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
97
- ], Ot = O("brain", Bt);
97
+ ], Lt = B("brain", Pt);
98
98
  /**
99
99
  * @license lucide-react v1.8.0 - ISC
100
100
  *
101
101
  * This source code is licensed under the ISC license.
102
102
  * See the LICENSE file in the root directory of this source tree.
103
103
  */
104
- const Et = [
104
+ const Vt = [
105
105
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
106
106
  ["path", { d: "M16 2v4", key: "4m81vk" }],
107
107
  ["path", { d: "M3 10h18", key: "8toen8" }],
@@ -110,14 +110,14 @@ const Et = [
110
110
  ["path", { d: "M13 18H7", key: "bb0bb7" }],
111
111
  ["path", { d: "M7 14h.01", key: "1qa3f1" }],
112
112
  ["path", { d: "M17 18h.01", key: "1bdyru" }]
113
- ], Pt = O("calendar-range", Et);
113
+ ], Ft = B("calendar-range", Vt);
114
114
  /**
115
115
  * @license lucide-react v1.8.0 - ISC
116
116
  *
117
117
  * This source code is licensed under the ISC license.
118
118
  * See the LICENSE file in the root directory of this source tree.
119
119
  */
120
- const Lt = [
120
+ const Rt = [
121
121
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
122
122
  [
123
123
  "path",
@@ -127,89 +127,89 @@ const Lt = [
127
127
  }
128
128
  ],
129
129
  ["path", { d: "m9 14 2 2 4-4", key: "df797q" }]
130
- ], Vt = O("clipboard-check", Lt);
130
+ ], zt = B("clipboard-check", Rt);
131
131
  /**
132
132
  * @license lucide-react v1.8.0 - ISC
133
133
  *
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
136
  */
137
- const Ft = [
137
+ const $t = [
138
138
  ["path", { d: "M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0", key: "1dfaln" }],
139
139
  ["path", { d: "M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4", key: "1qnva7" }]
140
- ], Rt = O("ear", Ft);
140
+ ], Kt = B("ear", $t);
141
141
  /**
142
142
  * @license lucide-react v1.8.0 - ISC
143
143
  *
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
146
  */
147
- const zt = [
147
+ const jt = [
148
148
  ["path", { d: "M6 18h8", key: "1borvv" }],
149
149
  ["path", { d: "M3 22h18", key: "8prr45" }],
150
150
  ["path", { d: "M14 22a7 7 0 1 0 0-14h-1", key: "1jwaiy" }],
151
151
  ["path", { d: "M9 14h2", key: "197e7h" }],
152
152
  ["path", { d: "M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z", key: "1bmzmy" }],
153
153
  ["path", { d: "M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3", key: "1drr47" }]
154
- ], $t = O("microscope", zt);
154
+ ], qt = B("microscope", jt);
155
155
  /**
156
156
  * @license lucide-react v1.8.0 - ISC
157
157
  *
158
158
  * This source code is licensed under the ISC license.
159
159
  * See the LICENSE file in the root directory of this source tree.
160
160
  */
161
- const Kt = [
161
+ const Ht = [
162
162
  [
163
163
  "path",
164
164
  { d: "m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z", key: "wa1lgi" }
165
165
  ],
166
166
  ["path", { d: "m8.5 8.5 7 7", key: "rvfmvr" }]
167
- ], jt = O("pill", Kt);
167
+ ], Gt = B("pill", Ht);
168
168
  /**
169
169
  * @license lucide-react v1.8.0 - ISC
170
170
  *
171
171
  * This source code is licensed under the ISC license.
172
172
  * See the LICENSE file in the root directory of this source tree.
173
173
  */
174
- const qt = [
174
+ const Ut = [
175
175
  ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
176
176
  ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
177
177
  ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
178
178
  ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
179
179
  ["path", { d: "M7 12h10", key: "b7w52i" }]
180
- ], Ht = O("scan-line", qt);
180
+ ], Yt = B("scan-line", Ut);
181
181
  /**
182
182
  * @license lucide-react v1.8.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
185
185
  * See the LICENSE file in the root directory of this source tree.
186
186
  */
187
- const Gt = [
187
+ const Zt = [
188
188
  ["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
189
189
  ["path", { d: "M8.12 8.12 12 12", key: "1alkpv" }],
190
190
  ["path", { d: "M20 4 8.12 15.88", key: "xgtan2" }],
191
191
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
192
192
  ["path", { d: "M14.8 14.8 20 20", key: "ptml3r" }]
193
- ], Ut = O("scissors", Gt);
193
+ ], Jt = B("scissors", Zt);
194
194
  /**
195
195
  * @license lucide-react v1.8.0 - ISC
196
196
  *
197
197
  * This source code is licensed under the ISC license.
198
198
  * See the LICENSE file in the root directory of this source tree.
199
199
  */
200
- const Yt = [
200
+ const Xt = [
201
201
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
202
202
  ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
203
203
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
204
204
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
205
- ], Zt = O("smile", Yt);
205
+ ], Wt = B("smile", Xt);
206
206
  /**
207
207
  * @license lucide-react v1.8.0 - ISC
208
208
  *
209
209
  * This source code is licensed under the ISC license.
210
210
  * See the LICENSE file in the root directory of this source tree.
211
211
  */
212
- const Jt = [
212
+ const Qt = [
213
213
  ["path", { d: "M12 10V2", key: "16sf7g" }],
214
214
  ["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }],
215
215
  ["path", { d: "M2 18h2", key: "j10viu" }],
@@ -218,25 +218,25 @@ const Jt = [
218
218
  ["path", { d: "M22 22H2", key: "19qnx5" }],
219
219
  ["path", { d: "m16 6-4 4-4-4", key: "6wukr" }],
220
220
  ["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]
221
- ], Xt = O("sunset", Jt);
221
+ ], ea = B("sunset", Qt);
222
222
  /**
223
223
  * @license lucide-react v1.8.0 - ISC
224
224
  *
225
225
  * This source code is licensed under the ISC license.
226
226
  * See the LICENSE file in the root directory of this source tree.
227
227
  */
228
- const Wt = [
228
+ const ta = [
229
229
  ["path", { d: "m18 2 4 4", key: "22kx64" }],
230
230
  ["path", { d: "m17 7 3-3", key: "1w1zoj" }],
231
231
  ["path", { d: "M19 9 8.7 19.3c-1 1-2.5 1-3.4 0l-.6-.6c-1-1-1-2.5 0-3.4L15 5", key: "1exhtz" }],
232
232
  ["path", { d: "m9 11 4 4", key: "rovt3i" }],
233
233
  ["path", { d: "m5 19-3 3", key: "59f2uf" }],
234
234
  ["path", { d: "m14 4 6 6", key: "yqp9t2" }]
235
- ], Ee = O("syringe", Wt);
236
- function Qt(e, t, s) {
237
- return ze(e, -1, s);
235
+ ], Ve = B("syringe", ta);
236
+ function aa(e, t, s) {
237
+ return je(e, -1, s);
238
238
  }
239
- const ea = {
239
+ const sa = {
240
240
  id: "booking",
241
241
  capabilities: ["navigate", "view_change"],
242
242
  state: {
@@ -278,12 +278,12 @@ const ea = {
278
278
  description: "Sourced from the id prop."
279
279
  }
280
280
  }
281
- }, Me = [
281
+ }, Te = [
282
282
  "email",
283
283
  "whatsapp",
284
284
  "sms"
285
- ], ue = "all", ta = "de";
286
- function aa(e) {
285
+ ], pe = "all", na = "de";
286
+ function ia(e) {
287
287
  return [...e.lockedOperatorId ? e.specialties.filter(
288
288
  (s) => {
289
289
  var n;
@@ -294,7 +294,7 @@ function aa(e) {
294
294
  return i - o;
295
295
  });
296
296
  }
297
- function sa(e) {
297
+ function oa(e) {
298
298
  let t = e.services;
299
299
  return e.lockedOperatorId && (t = t.filter(
300
300
  (s) => {
@@ -303,7 +303,7 @@ function sa(e) {
303
303
  }
304
304
  )), e.useSpecialties && e.value.specialtyId && (t = t.filter((s) => s.specialtyId === e.value.specialtyId)), t;
305
305
  }
306
- function na(e) {
306
+ function ra(e) {
307
307
  if (e.useSpecialties && e.value.specialtyId) {
308
308
  const t = e.value.specialtyId;
309
309
  return e.operators.filter(
@@ -324,20 +324,20 @@ function na(e) {
324
324
  }
325
325
  return [];
326
326
  }
327
- function ia(e, t) {
328
- const s = e.country === ta, n = !s || e.value.insuranceType !== void 0, i = !!e.useSpecialties && n, l = !i || e.value.specialtyId !== void 0, c = !l || e.value.serviceId !== void 0, d = t.operators, h = !!e.allowOperatorSelection && c && e.value.serviceId !== void 0 && !e.lockedOperatorId && d.length > 1, u = c && e.value.serviceId !== void 0, y = (!u || e.value.date !== void 0) && e.value.date !== void 0, x = (!y || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, k = !!e.value.serviceId && d.length === 0;
327
+ function da(e, t) {
328
+ const s = e.country === na, n = !s || e.value.insuranceType !== void 0, i = !!e.useSpecialties && n, l = !i || e.value.specialtyId !== void 0, c = !l || e.value.serviceId !== void 0, d = t.operators, p = !!e.allowOperatorSelection && c && e.value.serviceId !== void 0 && !e.lockedOperatorId && d.length > 1, g = c && e.value.serviceId !== void 0, k = (!g || e.value.date !== void 0) && e.value.date !== void 0, x = (!k || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, y = !!e.value.serviceId && d.length === 0;
329
329
  return {
330
330
  insurance: s,
331
331
  specialty: i,
332
332
  service: l,
333
- operator: h,
334
- date: u,
335
- slot: y,
333
+ operator: p,
334
+ date: g,
335
+ slot: k,
336
336
  details: x,
337
- onboardingIncomplete: k
337
+ onboardingIncomplete: y
338
338
  };
339
339
  }
340
- function oa(e, t) {
340
+ function la(e, t) {
341
341
  const s = [];
342
342
  t.insurance && s.push(1), t.specialty && s.push(2), s.push(3), t.operator && s.push(4), s.push(5), s.push(6), s.push(7);
343
343
  const n = {
@@ -355,16 +355,16 @@ function oa(e, t) {
355
355
  visibleSteps: s
356
356
  };
357
357
  }
358
- function ra(e) {
358
+ function ca(e) {
359
359
  const t = {
360
- specialties: aa(e),
361
- services: sa(e),
362
- operators: na(e)
363
- }, s = ia(e, t), { currentStep: n, visibleSteps: i } = oa(e, s);
360
+ specialties: ia(e),
361
+ services: oa(e),
362
+ operators: ra(e)
363
+ }, s = da(e, t), { currentStep: n, visibleSteps: i } = la(e, s);
364
364
  let o;
365
365
  if (e.value.date && e.value.slotKey) {
366
366
  const d = e.availableSlots[e.value.date];
367
- d && (o = d.find((h) => h.key === e.value.slotKey));
367
+ d && (o = d.find((p) => p.key === e.value.slotKey));
368
368
  }
369
369
  const l = e.value.serviceId ? e.services.find((d) => d.id === e.value.serviceId) : void 0, c = e.value.serviceId !== void 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!s.insurance || e.value.insuranceType !== void 0) && (!s.specialty || e.value.specialtyId !== void 0);
370
370
  return {
@@ -378,7 +378,7 @@ function ra(e) {
378
378
  selectedSlot: o
379
379
  };
380
380
  }
381
- function $e(e, t) {
381
+ function qe(e, t) {
382
382
  return {
383
383
  ...e,
384
384
  insuranceType: t,
@@ -390,7 +390,7 @@ function $e(e, t) {
390
390
  details: void 0
391
391
  };
392
392
  }
393
- function Ke(e, t) {
393
+ function He(e, t) {
394
394
  return {
395
395
  ...e,
396
396
  specialtyId: t,
@@ -401,20 +401,20 @@ function Ke(e, t) {
401
401
  details: void 0
402
402
  };
403
403
  }
404
- function je(e, t) {
404
+ function Ge(e, t) {
405
405
  return {
406
406
  ...e,
407
407
  serviceId: t,
408
408
  // Default the operator to the "All operators" sentinel so a patient
409
409
  // who doesn't care about picking lands on a satisfied step 4 without
410
410
  // any further input.
411
- operatorId: t ? ue : void 0,
411
+ operatorId: t ? pe : void 0,
412
412
  date: void 0,
413
413
  slotKey: void 0,
414
414
  details: void 0
415
415
  };
416
416
  }
417
- function qe(e, t) {
417
+ function Ue(e, t) {
418
418
  return {
419
419
  ...e,
420
420
  operatorId: t,
@@ -432,47 +432,47 @@ function ke(e, t) {
432
432
  // since the user has already filled some fields.
433
433
  };
434
434
  }
435
- function He(e, t) {
435
+ function Ye(e, t) {
436
436
  return {
437
437
  ...e,
438
438
  slotKey: t
439
439
  };
440
440
  }
441
- function da(e, t) {
441
+ function ma(e, t) {
442
442
  let s = e;
443
443
  if (t.lockedOperatorId && s.operatorId !== t.lockedOperatorId && (s = { ...s, operatorId: t.lockedOperatorId }), t.useSpecialties && t.specialties.length === 1 && s.specialtyId === void 0 && (s = { ...s, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
444
444
  const n = s.specialtyId ? t.services.filter((i) => i.specialtyId === s.specialtyId) : t.services;
445
- n.length === 1 && s.serviceId === void 0 && (s = { ...s, serviceId: n[0].id }, s.operatorId === void 0 && (s = { ...s, operatorId: ue }));
445
+ n.length === 1 && s.serviceId === void 0 && (s = { ...s, serviceId: n[0].id }, s.operatorId === void 0 && (s = { ...s, operatorId: pe }));
446
446
  }
447
447
  return s;
448
448
  }
449
- function De(e) {
450
- if (e.operatorId && e.operatorId !== ue)
449
+ function _e(e) {
450
+ if (e.operatorId && e.operatorId !== pe)
451
451
  return e.operatorId;
452
452
  }
453
- function la(e) {
453
+ function ua(e) {
454
454
  if (!e) return !1;
455
455
  const t = e.trim();
456
456
  return /^\+?\d[\d\s\-()]{6,}$/.test(t);
457
457
  }
458
- function Ge(e) {
458
+ function Ze(e) {
459
459
  const t = e && e.length > 0 ? e : ["email"], s = new Set(t);
460
- return Me.filter((n) => s.has(n));
460
+ return Te.filter((n) => s.has(n));
461
461
  }
462
- function ca(e, t, s) {
463
- const n = Ge(e), i = new Set(n);
462
+ function pa(e, t, s) {
463
+ const n = Ze(e), i = new Set(n);
464
464
  if (s)
465
- return Me.filter(
466
- (h) => s.includes(h) && i.has(h)
465
+ return Te.filter(
466
+ (p) => s.includes(p) && i.has(p)
467
467
  );
468
468
  const o = [];
469
469
  i.has("email") && o.push("email");
470
- const l = la(t), c = i.has("whatsapp");
470
+ const l = ua(t), c = i.has("whatsapp");
471
471
  c && l && o.push("whatsapp"), !c && i.has("sms") && o.push("sms");
472
472
  const d = new Set(o);
473
- return Me.filter((h) => d.has(h));
473
+ return Te.filter((p) => d.has(p));
474
474
  }
475
- const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 300, ve = { state: "idle" }, Te = Ve(
475
+ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 300, ve = { state: "idle" }, Ae = ze(
476
476
  ({
477
477
  value: e,
478
478
  onChange: t,
@@ -483,129 +483,130 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
483
483
  insuranceType: l,
484
484
  showNote: c = !1,
485
485
  showReturningPatientFlag: d = !1,
486
- privacyPolicyUrl: h,
487
- termsUrl: u,
488
- validateCodiceFiscale: p,
489
- validateInsuranceNumber: y,
490
- submitting: f = !1,
486
+ privacyPolicyUrl: p,
487
+ termsUrl: g,
488
+ validateCodiceFiscale: u,
489
+ validateInsuranceNumber: k,
490
+ submitting: h = !1,
491
491
  summarySlot: x,
492
- defaultPhoneCountry: k,
493
- confirmationChannels: _,
494
- defaultConfirmationChannels: Y
495
- }, S) => {
496
- var X, W;
497
- const { t: r } = M(), b = Fe(), [D, C] = z(ve), [v, N] = z(ve), [E, Z] = z({}), P = ee(
498
- (m) => Z((w) => ({ ...w, [m]: !0 })),
492
+ defaultPhoneCountry: y,
493
+ confirmationChannels: C,
494
+ defaultConfirmationChannels: _,
495
+ submitError: S
496
+ }, v) => {
497
+ var U, me;
498
+ const { t: r } = T(), O = $e(), [M, b] = q(ve), [N, R] = q(ve), [E, J] = q({}), P = te(
499
+ (m) => J((I) => ({ ...I, [m]: !0 })),
499
500
  []
500
- ), V = ne(null), F = ne(
501
+ ), z = de(null), H = de(
501
502
  null
502
503
  );
503
- se(
504
+ re(
504
505
  () => () => {
505
- V.current && clearTimeout(V.current), F.current && clearTimeout(F.current);
506
+ z.current && clearTimeout(z.current), H.current && clearTimeout(H.current);
506
507
  },
507
508
  []
508
509
  );
509
- const T = ee(
510
+ const D = te(
510
511
  (m) => t({ ...e, ...m }),
511
512
  [e, t]
512
- ), K = I(
513
- () => Ge(_),
514
- [_]
515
- ), j = K.length >= 2, ge = ne(!1);
516
- se(() => {
517
- if (!j) {
518
- e.confirmationChannels !== void 0 && T({ confirmationChannels: void 0 });
513
+ ), X = w(
514
+ () => Ze(C),
515
+ [C]
516
+ ), G = X.length >= 2, se = de(!1);
517
+ re(() => {
518
+ if (!G) {
519
+ e.confirmationChannels !== void 0 && D({ confirmationChannels: void 0 });
519
520
  return;
520
521
  }
521
522
  if (e.confirmationChannels !== void 0) {
522
- ge.current = !0;
523
+ se.current = !0;
523
524
  return;
524
525
  }
525
- const m = ca(
526
- K,
526
+ const m = pa(
527
+ X,
527
528
  e.mobilePhone,
528
- Y
529
+ _
529
530
  );
530
- ge.current = !0, T({ confirmationChannels: m });
531
+ se.current = !0, D({ confirmationChannels: m });
531
532
  }, [
532
- j,
533
- K,
533
+ G,
534
+ X,
534
535
  e.mobilePhone,
535
- Y
536
+ _
536
537
  ]);
537
- const te = I(
538
+ const ne = w(
538
539
  () => e.confirmationChannels ?? [],
539
540
  [e.confirmationChannels]
540
- ), re = j && te.length === 0;
541
- se(() => {
541
+ ), Ne = G && ne.length === 0;
542
+ re(() => {
542
543
  const m = e.codiceFiscale;
543
- if (!n || !p || !m) {
544
- C(ve);
544
+ if (!n || !u || !m) {
545
+ b(ve);
545
546
  return;
546
547
  }
547
- if (!ma.test(m)) {
548
- C({
548
+ if (!ga.test(m)) {
549
+ b({
549
550
  state: "invalid",
550
551
  hint: r("booking.details.codiceFiscale.invalidFormat")
551
552
  });
552
553
  return;
553
554
  }
554
- C({ state: "pending" }), V.current && clearTimeout(V.current), V.current = setTimeout(() => {
555
- p(m).then(
556
- (w) => C(
557
- w.valid ? { state: "valid" } : { state: "invalid", hint: w.hint }
555
+ b({ state: "pending" }), z.current && clearTimeout(z.current), z.current = setTimeout(() => {
556
+ u(m).then(
557
+ (I) => b(
558
+ I.valid ? { state: "valid" } : { state: "invalid", hint: I.hint }
558
559
  )
559
560
  ).catch(
560
- () => C({
561
+ () => b({
561
562
  state: "invalid",
562
563
  hint: r("booking.details.codiceFiscale.unavailable")
563
564
  })
564
565
  );
565
- }, Le);
566
- }, [n, p, e.codiceFiscale, r]);
567
- const J = o && l === "public";
568
- se(() => {
566
+ }, Re);
567
+ }, [n, u, e.codiceFiscale, r]);
568
+ const W = o && l === "public";
569
+ re(() => {
569
570
  const m = e.insuranceNumber;
570
- if (!J || !y || !m) {
571
- N(ve);
571
+ if (!W || !k || !m) {
572
+ R(ve);
572
573
  return;
573
574
  }
574
- N({ state: "pending" }), F.current && clearTimeout(F.current), F.current = setTimeout(() => {
575
- y(m).then(
576
- (w) => N(
577
- w.valid ? { state: "valid" } : { state: "invalid", hint: w.hint }
575
+ R({ state: "pending" }), H.current && clearTimeout(H.current), H.current = setTimeout(() => {
576
+ k(m).then(
577
+ (I) => R(
578
+ I.valid ? { state: "valid" } : { state: "invalid", hint: I.hint }
578
579
  )
579
580
  ).catch(
580
- () => N({
581
+ () => R({
581
582
  state: "invalid",
582
583
  hint: r("booking.details.insuranceNumber.unavailable")
583
584
  })
584
585
  );
585
- }, Le);
586
- }, [J, y, e.insuranceNumber, r]);
587
- const A = I(
588
- () => !!(e.email && ua.test(e.email)),
586
+ }, Re);
587
+ }, [W, k, e.insuranceNumber, r]);
588
+ const Q = w(
589
+ () => !!(e.email && fa.test(e.email)),
589
590
  [e.email]
590
- ), q = I(
591
+ ), le = w(
591
592
  () => !!(e.mobilePhone && e.mobilePhone.length >= 6),
592
593
  [e.mobilePhone]
593
- ), H = I(() => {
594
- var m, w;
595
- return !(!((m = e.firstName) != null && m.trim()) || !((w = e.lastName) != null && w.trim()) || !A || !q || n && D.state !== "valid" || i && !e.dateOfBirth || J && v.state !== "valid");
594
+ ), L = w(() => {
595
+ var m, I;
596
+ return !(!((m = e.firstName) != null && m.trim()) || !((I = e.lastName) != null && I.trim()) || !Q || !le || n && M.state !== "valid" || i && !e.dateOfBirth || W && N.state !== "valid");
596
597
  }, [
597
598
  e.firstName,
598
599
  e.lastName,
599
- A,
600
- q,
600
+ Q,
601
+ le,
601
602
  n,
602
- D.state,
603
+ M.state,
603
604
  i,
604
605
  e.dateOfBirth,
605
- J,
606
- v.state
607
- ]), G = !!(e.privacyConsent && e.termsConsent), B = !j || te.length > 0, de = H && G && B && !f, ae = (m) => {
608
- if (m.preventDefault(), Z({
606
+ W,
607
+ N.state
608
+ ]), ie = !!(e.privacyConsent && e.termsConsent), $ = !G || ne.length > 0, j = L && ie && $ && !h, A = (m) => {
609
+ if (m.preventDefault(), J({
609
610
  firstName: !0,
610
611
  lastName: !0,
611
612
  email: !0,
@@ -613,8 +614,8 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
613
614
  codiceFiscale: !0,
614
615
  dateOfBirth: !0,
615
616
  insuranceNumber: !0
616
- }), !de) return;
617
- const w = {
617
+ }), !j) return;
618
+ const I = {
618
619
  firstName: e.firstName.trim(),
619
620
  lastName: e.lastName.trim(),
620
621
  email: e.email.trim(),
@@ -629,13 +630,13 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
629
630
  // Only include when the picker was visible; otherwise the single
630
631
  // implicit channel is inferred backend-side from the practice
631
632
  // config.
632
- confirmationChannels: j ? te : void 0
633
+ confirmationChannels: G ? ne : void 0
633
634
  };
634
- s(w);
635
- }, le = (m, w) => {
636
- const ce = w && /^https?:\/\//i.test(w) ? w : void 0;
637
- return ce ? /* @__PURE__ */ a(
638
- rt,
635
+ s(I);
636
+ }, ce = (m, I) => {
637
+ const oe = I && /^https?:\/\//i.test(I) ? I : void 0;
638
+ return oe ? /* @__PURE__ */ a(
639
+ ct,
639
640
  {
640
641
  i18nKey: m,
641
642
  components: {
@@ -649,7 +650,7 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
649
650
  /* @__PURE__ */ a(
650
651
  "a",
651
652
  {
652
- href: ce,
653
+ href: oe,
653
654
  target: "_blank",
654
655
  rel: "noopener noreferrer",
655
656
  className: "ds:underline ds:text-[var(--primary)]"
@@ -660,102 +661,102 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
660
661
  }
661
662
  ) : r(m);
662
663
  };
663
- return /* @__PURE__ */ g(
664
+ return /* @__PURE__ */ f(
664
665
  "form",
665
666
  {
666
- ref: S,
667
- id: b,
667
+ ref: v,
668
+ id: O,
668
669
  noValidate: !0,
669
- onSubmit: ae,
670
+ onSubmit: A,
670
671
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
671
672
  children: [
672
673
  x,
673
- /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
674
+ /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
674
675
  /* @__PURE__ */ a(
675
- U,
676
+ Y,
676
677
  {
677
678
  label: r("booking.details.firstName.label"),
678
679
  required: !0,
679
- error: E.firstName && !((X = e.firstName) != null && X.trim()) ? r("booking.details.firstName.required") : void 0,
680
+ error: E.firstName && !((U = e.firstName) != null && U.trim()) ? r("booking.details.firstName.required") : void 0,
680
681
  children: /* @__PURE__ */ a(
681
682
  fe,
682
683
  {
683
684
  autoComplete: "given-name",
684
685
  value: e.firstName ?? "",
685
- onChange: (m) => T({ firstName: m.target.value }),
686
+ onChange: (m) => D({ firstName: m.target.value }),
686
687
  onBlur: () => P("firstName")
687
688
  }
688
689
  )
689
690
  }
690
691
  ),
691
692
  /* @__PURE__ */ a(
692
- U,
693
+ Y,
693
694
  {
694
695
  label: r("booking.details.lastName.label"),
695
696
  required: !0,
696
- error: E.lastName && !((W = e.lastName) != null && W.trim()) ? r("booking.details.lastName.required") : void 0,
697
+ error: E.lastName && !((me = e.lastName) != null && me.trim()) ? r("booking.details.lastName.required") : void 0,
697
698
  children: /* @__PURE__ */ a(
698
699
  fe,
699
700
  {
700
701
  autoComplete: "family-name",
701
702
  value: e.lastName ?? "",
702
- onChange: (m) => T({ lastName: m.target.value }),
703
+ onChange: (m) => D({ lastName: m.target.value }),
703
704
  onBlur: () => P("lastName")
704
705
  }
705
706
  )
706
707
  }
707
708
  )
708
709
  ] }),
709
- /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
710
+ /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
710
711
  /* @__PURE__ */ a(
711
- U,
712
+ Y,
712
713
  {
713
714
  label: r("booking.details.email.label"),
714
715
  required: !0,
715
- error: E.email && !A ? r("booking.details.email.invalid") : void 0,
716
+ error: E.email && !Q ? r("booking.details.email.invalid") : void 0,
716
717
  children: /* @__PURE__ */ a(
717
- mt,
718
+ gt,
718
719
  {
719
720
  value: e.email ?? "",
720
- onChange: (m) => T({ email: m.target.value }),
721
+ onChange: (m) => D({ email: m.target.value }),
721
722
  onBlur: () => P("email")
722
723
  }
723
724
  )
724
725
  }
725
726
  ),
726
727
  /* @__PURE__ */ a(
727
- U,
728
+ Y,
728
729
  {
729
730
  label: r("booking.details.mobilePhone.label"),
730
731
  required: !0,
731
- error: E.mobilePhone && !q ? r("booking.details.mobilePhone.invalid") : void 0,
732
+ error: E.mobilePhone && !le ? r("booking.details.mobilePhone.invalid") : void 0,
732
733
  children: /* @__PURE__ */ a(
733
- ut,
734
+ ft,
734
735
  {
735
736
  value: e.mobilePhone ?? "",
736
- defaultCountry: k == null ? void 0 : k.toUpperCase(),
737
+ defaultCountry: y == null ? void 0 : y.toUpperCase(),
737
738
  onChange: (m) => {
738
- T({ mobilePhone: m }), P("mobilePhone");
739
+ D({ mobilePhone: m }), P("mobilePhone");
739
740
  }
740
741
  }
741
742
  )
742
743
  }
743
744
  )
744
745
  ] }),
745
- n || i ? /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
746
+ n || i ? /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
746
747
  n ? /* @__PURE__ */ a(
747
- U,
748
+ Y,
748
749
  {
749
750
  label: r("booking.details.codiceFiscale.label"),
750
751
  required: !0,
751
- description: D.state === "pending" ? r("booking.details.codiceFiscale.checking") : r("booking.details.codiceFiscale.helper"),
752
- error: E.codiceFiscale && D.state === "invalid" ? D.hint ?? r("booking.details.codiceFiscale.invalid") : void 0,
752
+ description: M.state === "pending" ? r("booking.details.codiceFiscale.checking") : r("booking.details.codiceFiscale.helper"),
753
+ error: E.codiceFiscale && M.state === "invalid" ? M.hint ?? r("booking.details.codiceFiscale.invalid") : void 0,
753
754
  children: /* @__PURE__ */ a(
754
755
  fe,
755
756
  {
756
757
  value: e.codiceFiscale ?? "",
757
758
  maxLength: 16,
758
- onChange: (m) => T({
759
+ onChange: (m) => D({
759
760
  codiceFiscale: m.target.value.slice(0, 16).toUpperCase()
760
761
  }),
761
762
  onBlur: () => P("codiceFiscale")
@@ -764,17 +765,17 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
764
765
  }
765
766
  ) : null,
766
767
  i ? /* @__PURE__ */ a(
767
- U,
768
+ Y,
768
769
  {
769
770
  label: r("booking.details.dateOfBirth.label"),
770
771
  required: !0,
771
772
  error: E.dateOfBirth && !e.dateOfBirth ? r("booking.details.dateOfBirth.required") : void 0,
772
773
  children: /* @__PURE__ */ a(
773
- ct,
774
+ pt,
774
775
  {
775
776
  value: e.dateOfBirth ? new Date(e.dateOfBirth) : void 0,
776
777
  onChange: (m) => {
777
- T({
778
+ D({
778
779
  dateOfBirth: m ? m.toISOString().slice(0, 10) : void 0
779
780
  }), P("dateOfBirth");
780
781
  }
@@ -783,59 +784,59 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
783
784
  }
784
785
  ) : null
785
786
  ] }) : null,
786
- J ? /* @__PURE__ */ a(
787
- U,
787
+ W ? /* @__PURE__ */ a(
788
+ Y,
788
789
  {
789
790
  label: r("booking.details.insuranceNumber.label"),
790
791
  required: !0,
791
- description: v.state === "pending" ? r("booking.details.insuranceNumber.checking") : void 0,
792
- error: E.insuranceNumber && v.state === "invalid" ? v.hint ?? r("booking.details.insuranceNumber.invalid") : void 0,
792
+ description: N.state === "pending" ? r("booking.details.insuranceNumber.checking") : void 0,
793
+ error: E.insuranceNumber && N.state === "invalid" ? N.hint ?? r("booking.details.insuranceNumber.invalid") : void 0,
793
794
  children: /* @__PURE__ */ a(
794
795
  fe,
795
796
  {
796
797
  value: e.insuranceNumber ?? "",
797
- onChange: (m) => T({ insuranceNumber: m.target.value }),
798
+ onChange: (m) => D({ insuranceNumber: m.target.value }),
798
799
  onBlur: () => P("insuranceNumber")
799
800
  }
800
801
  )
801
802
  }
802
803
  ) : null,
803
804
  c ? /* @__PURE__ */ a(
804
- U,
805
+ Y,
805
806
  {
806
807
  label: r("booking.details.note.label"),
807
808
  description: r("booking.details.note.helper", {
808
- max: Pe
809
+ max: Fe
809
810
  }),
810
811
  children: /* @__PURE__ */ a(
811
- pt,
812
+ ht,
812
813
  {
813
814
  value: e.note ?? "",
814
- maxLength: Pe,
815
+ maxLength: Fe,
815
816
  rows: 3,
816
- onChange: (m) => T({ note: m.target.value })
817
+ onChange: (m) => D({ note: m.target.value })
817
818
  }
818
819
  )
819
820
  }
820
821
  ) : null,
821
822
  d ? /* @__PURE__ */ a(
822
- we,
823
+ Me,
823
824
  {
824
825
  checked: !!e.returningPatient,
825
- onCheckedChange: (m) => T({ returningPatient: m === !0 }),
826
+ onCheckedChange: (m) => D({ returningPatient: m === !0 }),
826
827
  label: r("booking.details.returningPatient.label")
827
828
  }
828
829
  ) : null,
829
- /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
830
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
830
831
  /* @__PURE__ */ a(
831
- we,
832
+ Me,
832
833
  {
833
834
  checked: !!e.privacyConsent,
834
- onCheckedChange: (m) => T({ privacyConsent: m === !0 }),
835
- label: /* @__PURE__ */ g(ie, { children: [
836
- le(
835
+ onCheckedChange: (m) => D({ privacyConsent: m === !0 }),
836
+ label: /* @__PURE__ */ f(Z, { children: [
837
+ ce(
837
838
  "booking.details.consent.privacy.label",
838
- h
839
+ p
839
840
  ),
840
841
  /* @__PURE__ */ a(
841
842
  "span",
@@ -849,14 +850,14 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
849
850
  }
850
851
  ),
851
852
  /* @__PURE__ */ a(
852
- we,
853
+ Me,
853
854
  {
854
855
  checked: !!e.termsConsent,
855
- onCheckedChange: (m) => T({ termsConsent: m === !0 }),
856
- label: /* @__PURE__ */ g(ie, { children: [
857
- le(
856
+ onCheckedChange: (m) => D({ termsConsent: m === !0 }),
857
+ label: /* @__PURE__ */ f(Z, { children: [
858
+ ce(
858
859
  "booking.details.consent.terms.label",
859
- u
860
+ g
860
861
  ),
861
862
  /* @__PURE__ */ a(
862
863
  "span",
@@ -870,38 +871,39 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
870
871
  }
871
872
  )
872
873
  ] }),
873
- j ? /* @__PURE__ */ a(
874
+ G ? /* @__PURE__ */ a(
874
875
  "div",
875
876
  {
876
877
  "data-component": "booking-confirmation-channels",
877
878
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
878
879
  children: /* @__PURE__ */ a(
879
- lt,
880
+ ut,
880
881
  {
881
882
  label: r("booking.confirmation.heading"),
882
883
  helperText: r("booking.confirmation.helper"),
883
- value: te,
884
- onChange: (m) => T({
884
+ value: ne,
885
+ onChange: (m) => D({
885
886
  confirmationChannels: m
886
887
  }),
887
888
  orientation: "vertical",
888
- options: K.map((m) => ({
889
+ options: X.map((m) => ({
889
890
  value: m,
890
891
  label: r(`booking.confirmation.channel.${m}`)
891
892
  })),
892
- error: re ? r("booking.confirmation.atLeastOne") : void 0
893
+ error: Ne ? r("booking.confirmation.atLeastOne") : void 0
893
894
  }
894
895
  )
895
896
  }
896
897
  ) : null,
898
+ S ? /* @__PURE__ */ a(F, { variant: "error", children: /* @__PURE__ */ a(F.Description, { children: S }) }) : null,
897
899
  /* @__PURE__ */ a(
898
- oe,
900
+ ae,
899
901
  {
900
902
  intent: "primary",
901
903
  size: "md",
902
904
  type: "submit",
903
- disabled: !de,
904
- startIcon: f ? /* @__PURE__ */ a(gt, { size: "sm" }) : void 0,
905
+ disabled: !j,
906
+ startIcon: h ? /* @__PURE__ */ a(vt, { size: "sm" }) : void 0,
905
907
  children: r("booking.details.submit")
906
908
  }
907
909
  )
@@ -910,8 +912,8 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
910
912
  );
911
913
  }
912
914
  );
913
- Te.displayName = "BookingDetailsForm";
914
- const pa = xe(
915
+ Ae.displayName = "BookingDetailsForm";
916
+ const ha = xe(
915
917
  "ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)]",
916
918
  {
917
919
  variants: {
@@ -925,40 +927,40 @@ const pa = xe(
925
927
  },
926
928
  defaultVariants: { variant: "inline-list" }
927
929
  }
928
- ), ga = [
930
+ ), va = [
929
931
  [
930
932
  /\b(estetic|aesthetic|botox|filler|mesoterap|chirurgia\s*plastic)/i,
931
- Ee
933
+ Ve
932
934
  ],
933
- [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, Nt],
934
- [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, Zt],
935
- [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, It],
936
- [/\b(otorin|udito|orecchi|hearing|ear)/i, Rt],
937
- [/\b(neuro|brain|cervello)/i, Ot],
938
- [/\b(pediatr|child|bambin)/i, Tt],
939
- [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, At],
940
- [/\b(lab|analis|test|sang|esami)/i, $t],
941
- [/\b(farmaco|pharm|pillol|refill)/i, jt],
942
- [/\b(chirurg|surg|intervent|operat)/i, Ut],
943
- [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, Ht],
944
- [/\b(vacc|inject|inie|punto)/i, Ee],
945
- [/\b(derma|skin|pelle)/i, wt],
946
- [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, Vt],
947
- [/\b(general|medicin|family|control|check[-\s]?up)/i, Mt]
935
+ [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, Ct],
936
+ [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, Wt],
937
+ [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, Mt],
938
+ [/\b(otorin|udito|orecchi|hearing|ear)/i, Kt],
939
+ [/\b(neuro|brain|cervello)/i, Lt],
940
+ [/\b(pediatr|child|bambin)/i, Bt],
941
+ [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, Et],
942
+ [/\b(lab|analis|test|sang|esami)/i, qt],
943
+ [/\b(farmaco|pharm|pillol|refill)/i, Gt],
944
+ [/\b(chirurg|surg|intervent|operat)/i, Jt],
945
+ [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, Yt],
946
+ [/\b(vacc|inject|inie|punto)/i, Ve],
947
+ [/\b(derma|skin|pelle)/i, Dt],
948
+ [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, zt],
949
+ [/\b(general|medicin|family|control|check[-\s]?up)/i, _t]
948
950
  ];
949
- function fa(e) {
950
- for (const [t, s] of ga)
951
+ function ba(e) {
952
+ for (const [t, s] of va)
951
953
  if (t.test(e)) return s;
952
954
  return null;
953
955
  }
954
- function ha(e) {
955
- const t = fa(e.label) ?? St;
956
+ function ya(e) {
957
+ const t = ba(e.label) ?? wt;
956
958
  return /* @__PURE__ */ a(t, { "aria-hidden": "true", className: "ds:size-5" });
957
959
  }
958
- function Ce(e) {
960
+ function De(e) {
959
961
  return be(e, "yyyy-MM-dd");
960
962
  }
961
- const va = [
963
+ const ka = [
962
964
  "ds:relative ds:flex ds:items-center ds:justify-center",
963
965
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
964
966
  "ds:rounded-[var(--radius-sm)]",
@@ -968,7 +970,7 @@ const va = [
968
970
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
969
971
  "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
970
972
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
971
- ].join(" "), ba = xe(va, {
973
+ ].join(" "), xa = xe(ka, {
972
974
  variants: {
973
975
  state: {
974
976
  available: "ds:cursor-pointer ds:text-[var(--foreground)] ds:hover:bg-[var(--muted)]/30",
@@ -979,29 +981,29 @@ const va = [
979
981
  },
980
982
  defaultVariants: { state: "unavailable" }
981
983
  });
982
- function Ue({
984
+ function Je({
983
985
  availableDates: e,
984
986
  selectedDate: t,
985
987
  onSelectDate: s,
986
988
  locale: n,
987
989
  loading: i
988
990
  }) {
989
- const { t: o } = M(), l = I(() => t ? me(Q(t)) : e.length > 0 ? me(Q(e[0])) : me(/* @__PURE__ */ new Date()), [t, e]), [c, d] = z(l), [h, u] = z(null), p = I(() => {
990
- const S = me(c), r = vt(c), b = S.getDay(), D = r.getDate(), C = [];
991
- for (let v = b; v > 0; v -= 1) {
991
+ const { t: o } = T(), l = w(() => t ? ue(ee(t)) : e.length > 0 ? ue(ee(e[0])) : ue(/* @__PURE__ */ new Date()), [t, e]), [c, d] = q(l), [p, g] = q(null), u = w(() => {
992
+ const S = ue(c), v = kt(c), r = S.getDay(), O = v.getDate(), M = [];
993
+ for (let b = r; b > 0; b -= 1) {
992
994
  const N = new Date(S);
993
- N.setDate(S.getDate() - v), C.push(N);
995
+ N.setDate(S.getDate() - b), M.push(N);
994
996
  }
995
- for (let v = 0; v < D; v += 1) {
997
+ for (let b = 0; b < O; b += 1) {
996
998
  const N = new Date(S);
997
- N.setDate(S.getDate() + v), C.push(N);
999
+ N.setDate(S.getDate() + b), M.push(N);
998
1000
  }
999
- for (; C.length < 42; ) {
1000
- const v = C[C.length - 1], N = new Date(v);
1001
- N.setDate(v.getDate() + 1), C.push(N);
1001
+ for (; M.length < 42; ) {
1002
+ const b = M[M.length - 1], N = new Date(b);
1003
+ N.setDate(b.getDate() + 1), M.push(N);
1002
1004
  }
1003
- return C;
1004
- }, [c]), y = I(() => {
1005
+ return M;
1006
+ }, [c]), k = w(() => {
1005
1007
  try {
1006
1008
  return new Intl.DateTimeFormat(n, {
1007
1009
  month: "long",
@@ -1010,62 +1012,62 @@ function Ue({
1010
1012
  } catch {
1011
1013
  return be(c, "MMMM yyyy");
1012
1014
  }
1013
- }, [c, n]), f = I(() => {
1015
+ }, [c, n]), h = w(() => {
1014
1016
  const S = new Date(2024, 0, 7);
1015
- return Array.from({ length: 7 }, (r, b) => {
1016
- const D = new Date(S);
1017
- D.setDate(S.getDate() + b);
1017
+ return Array.from({ length: 7 }, (v, r) => {
1018
+ const O = new Date(S);
1019
+ O.setDate(S.getDate() + r);
1018
1020
  try {
1019
- return new Intl.DateTimeFormat(n, { weekday: "short" }).format(D);
1021
+ return new Intl.DateTimeFormat(n, { weekday: "short" }).format(O);
1020
1022
  } catch {
1021
- return be(D, "EEE");
1023
+ return be(O, "EEE");
1022
1024
  }
1023
1025
  });
1024
- }, [n]), x = I(() => new Set(e), [e]), k = ee(
1025
- (S) => x.has(Ce(S)),
1026
+ }, [n]), x = w(() => new Set(e), [e]), y = te(
1027
+ (S) => x.has(De(S)),
1026
1028
  [x]
1027
- ), _ = I(() => {
1028
- if (h) return h;
1029
- if (t) return Q(t);
1030
- const S = p.find(
1031
- (r) => he(r, c) && k(r)
1029
+ ), C = w(() => {
1030
+ if (p) return p;
1031
+ if (t) return ee(t);
1032
+ const S = u.find(
1033
+ (v) => he(v, c) && y(v)
1032
1034
  );
1033
- return S || (p.find((r) => he(r, c)) ?? null);
1034
- }, [h, t, p, c, k]), Y = ee(
1035
- (S, r) => {
1036
- let b = null;
1035
+ return S || (u.find((v) => he(v, c)) ?? null);
1036
+ }, [p, t, u, c, y]), _ = te(
1037
+ (S, v) => {
1038
+ let r = null;
1037
1039
  switch (S.key) {
1038
1040
  case "ArrowLeft":
1039
- b = new Date(r), b.setDate(r.getDate() - 1);
1041
+ r = new Date(v), r.setDate(v.getDate() - 1);
1040
1042
  break;
1041
1043
  case "ArrowRight":
1042
- b = new Date(r), b.setDate(r.getDate() + 1);
1044
+ r = new Date(v), r.setDate(v.getDate() + 1);
1043
1045
  break;
1044
1046
  case "ArrowUp":
1045
- b = new Date(r), b.setDate(r.getDate() - 7);
1047
+ r = new Date(v), r.setDate(v.getDate() - 7);
1046
1048
  break;
1047
1049
  case "ArrowDown":
1048
- b = new Date(r), b.setDate(r.getDate() + 7);
1050
+ r = new Date(v), r.setDate(v.getDate() + 7);
1049
1051
  break;
1050
1052
  case "Home":
1051
- b = new Date(r), b.setDate(r.getDate() - r.getDay());
1053
+ r = new Date(v), r.setDate(v.getDate() - v.getDay());
1052
1054
  break;
1053
1055
  case "End":
1054
- b = new Date(r), b.setDate(r.getDate() + (6 - r.getDay()));
1056
+ r = new Date(v), r.setDate(v.getDate() + (6 - v.getDay()));
1055
1057
  break;
1056
1058
  case "Enter":
1057
1059
  case " ": {
1058
- S.preventDefault(), k(r) && s(Ce(r));
1060
+ S.preventDefault(), y(v) && s(De(v));
1059
1061
  return;
1060
1062
  }
1061
1063
  default:
1062
1064
  return;
1063
1065
  }
1064
- b && (S.preventDefault(), he(b, c) || d(me(b)), u(b));
1066
+ r && (S.preventDefault(), he(r, c) || d(ue(r)), g(r));
1065
1067
  },
1066
- [k, s, c]
1068
+ [y, s, c]
1067
1069
  );
1068
- return i ? /* @__PURE__ */ g(
1070
+ return i ? /* @__PURE__ */ f(
1069
1071
  "div",
1070
1072
  {
1071
1073
  role: "status",
@@ -1074,21 +1076,21 @@ function Ue({
1074
1076
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1075
1077
  children: [
1076
1078
  /* @__PURE__ */ a(ye, { variant: "text", width: "40%" }),
1077
- /* @__PURE__ */ a("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (S, r) => /* @__PURE__ */ a(ye, { variant: "rounded", height: "2.5rem" }, `mg-skel-${r}`)) })
1079
+ /* @__PURE__ */ a("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (S, v) => /* @__PURE__ */ a(ye, { variant: "rounded", height: "2.5rem" }, `mg-skel-${v}`)) })
1078
1080
  ]
1079
1081
  }
1080
- ) : /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1081
- /* @__PURE__ */ g("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1082
+ ) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1083
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1082
1084
  /* @__PURE__ */ a(
1083
- Be,
1085
+ Pe,
1084
1086
  {
1085
- icon: /* @__PURE__ */ a(bt, {}),
1087
+ icon: /* @__PURE__ */ a(xt, {}),
1086
1088
  "aria-label": o("booking.previousMonth"),
1087
1089
  size: "sm",
1088
1090
  intent: "ghost",
1089
1091
  flipIconInRtl: !0,
1090
1092
  onClick: () => {
1091
- d((S) => Qt(S)), u(null);
1093
+ d((S) => aa(S)), g(null);
1092
1094
  }
1093
1095
  }
1094
1096
  ),
@@ -1097,24 +1099,24 @@ function Ue({
1097
1099
  {
1098
1100
  className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]",
1099
1101
  "aria-live": "polite",
1100
- children: y
1102
+ children: k
1101
1103
  }
1102
1104
  ),
1103
1105
  /* @__PURE__ */ a(
1104
- Be,
1106
+ Pe,
1105
1107
  {
1106
- icon: /* @__PURE__ */ a(yt, {}),
1108
+ icon: /* @__PURE__ */ a(St, {}),
1107
1109
  "aria-label": o("booking.nextMonth"),
1108
1110
  size: "sm",
1109
1111
  intent: "ghost",
1110
1112
  flipIconInRtl: !0,
1111
1113
  onClick: () => {
1112
- d((S) => ze(S, 1)), u(null);
1114
+ d((S) => je(S, 1)), g(null);
1113
1115
  }
1114
1116
  }
1115
1117
  )
1116
1118
  ] }),
1117
- /* @__PURE__ */ g(
1119
+ /* @__PURE__ */ f(
1118
1120
  "div",
1119
1121
  {
1120
1122
  role: "grid",
@@ -1126,30 +1128,30 @@ function Ue({
1126
1128
  {
1127
1129
  role: "row",
1128
1130
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1129
- children: f.map((S, r) => /* @__PURE__ */ a(
1131
+ children: h.map((S, v) => /* @__PURE__ */ a(
1130
1132
  "div",
1131
1133
  {
1132
1134
  role: "columnheader",
1133
1135
  className: "type-meta ds:text-center ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-medium)]",
1134
1136
  children: S
1135
1137
  },
1136
- `wd-${r}`
1138
+ `wd-${v}`
1137
1139
  ))
1138
1140
  }
1139
1141
  ),
1140
- Array.from({ length: 6 }, (S, r) => /* @__PURE__ */ a(
1142
+ Array.from({ length: 6 }, (S, v) => /* @__PURE__ */ a(
1141
1143
  "div",
1142
1144
  {
1143
1145
  role: "row",
1144
1146
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1145
- children: p.slice(r * 7, r * 7 + 7).map((b, D) => {
1146
- const C = r * 7 + D, v = he(b, c), N = v && k(b), E = t ? Oe(b, Q(t)) : !1, Z = v ? E ? "selected" : N ? "available" : "unavailable" : "outside", P = _ ? Oe(_, b) : !1, V = (() => {
1147
+ children: u.slice(v * 7, v * 7 + 7).map((r, O) => {
1148
+ const M = v * 7 + O, b = he(r, c), N = b && y(r), R = t ? Le(r, ee(t)) : !1, E = b ? R ? "selected" : N ? "available" : "unavailable" : "outside", J = C ? Le(C, r) : !1, P = (() => {
1147
1149
  try {
1148
1150
  return new Intl.DateTimeFormat(n, {
1149
1151
  dateStyle: "full"
1150
- }).format(b);
1152
+ }).format(r);
1151
1153
  } catch {
1152
- return be(b, "PPP");
1154
+ return be(r, "PPP");
1153
1155
  }
1154
1156
  })();
1155
1157
  return /* @__PURE__ */ a(
@@ -1157,30 +1159,30 @@ function Ue({
1157
1159
  {
1158
1160
  type: "button",
1159
1161
  role: "gridcell",
1160
- "aria-label": V,
1161
- "aria-selected": E || void 0,
1162
+ "aria-label": P,
1163
+ "aria-selected": R || void 0,
1162
1164
  "aria-disabled": !N || void 0,
1163
- tabIndex: P ? 0 : -1,
1165
+ tabIndex: J ? 0 : -1,
1164
1166
  disabled: !N,
1165
1167
  onClick: () => {
1166
- N && s(Ce(b));
1168
+ N && s(De(r));
1167
1169
  },
1168
- onKeyDown: (F) => Y(F, b),
1169
- className: ba({ state: Z }),
1170
- children: /* @__PURE__ */ a("span", { "aria-hidden": "true", children: b.getDate() })
1170
+ onKeyDown: (z) => _(z, r),
1171
+ className: xa({ state: E }),
1172
+ children: /* @__PURE__ */ a("span", { "aria-hidden": "true", children: r.getDate() })
1171
1173
  },
1172
- `mg-cell-${C}`
1174
+ `mg-cell-${M}`
1173
1175
  );
1174
1176
  })
1175
1177
  },
1176
- `mg-row-${r}`
1178
+ `mg-row-${v}`
1177
1179
  ))
1178
1180
  ]
1179
1181
  }
1180
1182
  )
1181
1183
  ] });
1182
1184
  }
1183
- const ya = xe(
1185
+ const Sa = xe(
1184
1186
  [
1185
1187
  "ds:relative ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-md)]",
1186
1188
  "ds:min-h-[var(--min-target-size)]",
@@ -1206,52 +1208,52 @@ const ya = xe(
1206
1208
  defaultVariants: { state: "idle" }
1207
1209
  }
1208
1210
  );
1209
- function ka({
1211
+ function Na({
1210
1212
  services: e,
1211
1213
  selectedServiceId: t,
1212
1214
  onSelect: s
1213
1215
  }) {
1214
- const { t: n } = M(), i = Fe(), [o, l] = z(() => {
1216
+ const { t: n } = T(), i = $e(), [o, l] = q(() => {
1215
1217
  if (t) {
1216
- const u = e.findIndex((p) => p.id === t);
1217
- if (u >= 0) return u;
1218
+ const g = e.findIndex((u) => u.id === t);
1219
+ if (g >= 0) return g;
1218
1220
  }
1219
1221
  return 0;
1220
- }), c = ne(/* @__PURE__ */ new Map()), d = ee((u) => {
1221
- var p;
1222
- (p = c.current.get(u)) == null || p.focus();
1223
- }, []), h = ee(
1224
- (u, p, y) => {
1225
- const f = e.length;
1226
- if (f !== 0)
1227
- switch (u.key) {
1222
+ }), c = de(/* @__PURE__ */ new Map()), d = te((g) => {
1223
+ var u;
1224
+ (u = c.current.get(g)) == null || u.focus();
1225
+ }, []), p = te(
1226
+ (g, u, k) => {
1227
+ const h = e.length;
1228
+ if (h !== 0)
1229
+ switch (g.key) {
1228
1230
  case "ArrowDown":
1229
1231
  case "ArrowRight": {
1230
- u.preventDefault();
1231
- const x = (p + 1) % f;
1232
+ g.preventDefault();
1233
+ const x = (u + 1) % h;
1232
1234
  l(x), d(x);
1233
1235
  break;
1234
1236
  }
1235
1237
  case "ArrowUp":
1236
1238
  case "ArrowLeft": {
1237
- u.preventDefault();
1238
- const x = (p - 1 + f) % f;
1239
+ g.preventDefault();
1240
+ const x = (u - 1 + h) % h;
1239
1241
  l(x), d(x);
1240
1242
  break;
1241
1243
  }
1242
1244
  case "Home": {
1243
- u.preventDefault(), l(0), d(0);
1245
+ g.preventDefault(), l(0), d(0);
1244
1246
  break;
1245
1247
  }
1246
1248
  case "End": {
1247
- u.preventDefault();
1248
- const x = f - 1;
1249
+ g.preventDefault();
1250
+ const x = h - 1;
1249
1251
  l(x), d(x);
1250
1252
  break;
1251
1253
  }
1252
1254
  case "Enter":
1253
1255
  case " ": {
1254
- u.preventDefault(), s(y);
1256
+ g.preventDefault(), s(k);
1255
1257
  break;
1256
1258
  }
1257
1259
  }
@@ -1265,27 +1267,27 @@ function ka({
1265
1267
  "aria-label": n("booking.serviceListLabel"),
1266
1268
  id: i,
1267
1269
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1268
- children: e.map((u, p) => {
1269
- const y = t === u.id, f = o === p, x = n("booking.serviceCardLabel", {
1270
- label: u.label,
1271
- duration: u.durationMin
1272
- }), k = ha(u);
1273
- return /* @__PURE__ */ g(
1270
+ children: e.map((g, u) => {
1271
+ const k = t === g.id, h = o === u, x = n("booking.serviceCardLabel", {
1272
+ label: g.label,
1273
+ duration: g.durationMin
1274
+ }), y = ya(g);
1275
+ return /* @__PURE__ */ f(
1274
1276
  "button",
1275
1277
  {
1276
- ref: (_) => {
1277
- _ ? c.current.set(p, _) : c.current.delete(p);
1278
+ ref: (C) => {
1279
+ C ? c.current.set(u, C) : c.current.delete(u);
1278
1280
  },
1279
1281
  type: "button",
1280
1282
  role: "radio",
1281
- "aria-checked": y,
1283
+ "aria-checked": k,
1282
1284
  "aria-label": x,
1283
- tabIndex: f ? 0 : -1,
1284
- onClick: () => s(u.id),
1285
- onFocus: () => l(p),
1286
- onKeyDown: (_) => h(_, p, u.id),
1287
- className: ya({
1288
- state: y ? "selected" : "idle"
1285
+ tabIndex: h ? 0 : -1,
1286
+ onClick: () => s(g.id),
1287
+ onFocus: () => l(u),
1288
+ onKeyDown: (C) => p(C, u, g.id),
1289
+ className: Sa({
1290
+ state: k ? "selected" : "idle"
1289
1291
  }),
1290
1292
  children: [
1291
1293
  /* @__PURE__ */ a(
@@ -1293,22 +1295,22 @@ function ka({
1293
1295
  {
1294
1296
  "aria-hidden": "true",
1295
1297
  className: "ds:flex ds:size-10 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)] ds:bg-[var(--primary)]/10 ds:text-[var(--primary)]",
1296
- children: k
1298
+ children: y
1297
1299
  }
1298
1300
  ),
1299
- /* @__PURE__ */ g("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1300
- /* @__PURE__ */ a("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: u.label }),
1301
- /* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: n("booking.serviceSummary", { minutes: u.durationMin }) })
1301
+ /* @__PURE__ */ f("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1302
+ /* @__PURE__ */ a("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: g.label }),
1303
+ /* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: n("booking.serviceSummary", { minutes: g.durationMin }) })
1302
1304
  ] })
1303
1305
  ]
1304
1306
  },
1305
- u.id
1307
+ g.id
1306
1308
  );
1307
1309
  })
1308
1310
  }
1309
1311
  );
1310
1312
  }
1311
- const xa = xe(
1313
+ const Ia = xe(
1312
1314
  [
1313
1315
  "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)]",
1314
1316
  "ds:min-h-[var(--min-target-size)]",
@@ -1334,16 +1336,16 @@ const xa = xe(
1334
1336
  defaultVariants: { state: "idle" }
1335
1337
  }
1336
1338
  );
1337
- function Sa(e) {
1339
+ function wa(e) {
1338
1340
  const [t] = e.split(":").map((n) => parseInt(n, 10)), s = Number.isFinite(t) ? t : 0;
1339
1341
  return s < 12 ? "morning" : s < 17 ? "afternoon" : "evening";
1340
1342
  }
1341
- const Na = {
1342
- morning: xt,
1343
- afternoon: Xt,
1344
- evening: kt
1343
+ const Ca = {
1344
+ morning: It,
1345
+ afternoon: ea,
1346
+ evening: Nt
1345
1347
  };
1346
- function Ye({
1348
+ function Xe({
1347
1349
  date: e,
1348
1350
  slots: t,
1349
1351
  selectedSlotKey: s,
@@ -1351,41 +1353,41 @@ function Ye({
1351
1353
  loading: i,
1352
1354
  locale: o
1353
1355
  }) {
1354
- const { t: l } = M(), c = I(() => {
1356
+ const { t: l } = T(), c = w(() => {
1355
1357
  try {
1356
1358
  return new Intl.DateTimeFormat(o, {
1357
1359
  weekday: "long",
1358
1360
  day: "numeric",
1359
1361
  month: "long"
1360
- }).format(Q(e));
1362
+ }).format(ee(e));
1361
1363
  } catch {
1362
1364
  return e;
1363
1365
  }
1364
- }, [e, o]), d = I(() => {
1365
- const p = {
1366
+ }, [e, o]), d = w(() => {
1367
+ const u = {
1366
1368
  morning: [],
1367
1369
  afternoon: [],
1368
1370
  evening: []
1369
1371
  };
1370
- for (const y of t)
1371
- p[Sa(y.time)].push(y);
1372
- return p;
1373
- }, [t]), h = t.filter((p) => p.available).length, u = ["morning", "afternoon", "evening"];
1374
- return i ? /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1372
+ for (const k of t)
1373
+ u[wa(k.time)].push(k);
1374
+ return u;
1375
+ }, [t]), p = t.filter((u) => u.available).length, g = ["morning", "afternoon", "evening"];
1376
+ return i ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1375
1377
  /* @__PURE__ */ a(ye, { variant: "text", width: "60%" }),
1376
- [0, 1].map((p) => /* @__PURE__ */ a(
1378
+ [0, 1].map((u) => /* @__PURE__ */ a(
1377
1379
  "div",
1378
1380
  {
1379
1381
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)]",
1380
- children: [0, 1, 2].map((y) => /* @__PURE__ */ a(ye, { variant: "rounded", height: "44px" }, y))
1382
+ children: [0, 1, 2].map((k) => /* @__PURE__ */ a(ye, { variant: "rounded", height: "44px" }, k))
1381
1383
  },
1382
- p
1384
+ u
1383
1385
  ))
1384
- ] }) : h === 0 ? /* @__PURE__ */ a(Re, { variant: "no-results", title: l("booking.noSlotsForDate") }) : /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1385
- /* @__PURE__ */ g("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1386
- /* @__PURE__ */ g("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1386
+ ] }) : p === 0 ? /* @__PURE__ */ a(Ke, { variant: "no-results", title: l("booking.noSlotsForDate") }) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1387
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1388
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1387
1389
  /* @__PURE__ */ a(
1388
- Pt,
1390
+ Ft,
1389
1391
  {
1390
1392
  "aria-hidden": "true",
1391
1393
  className: "ds:size-4 ds:text-[color:var(--accent)]"
@@ -1393,41 +1395,41 @@ function Ye({
1393
1395
  ),
1394
1396
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c })
1395
1397
  ] }),
1396
- /* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: l("booking.slotsAvailable", { count: h }) })
1398
+ /* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: l("booking.slotsAvailable", { count: p }) })
1397
1399
  ] }),
1398
- u.map((p) => {
1399
- const y = d[p];
1400
- if (y.length === 0) return null;
1401
- const f = Na[p];
1402
- return /* @__PURE__ */ g(
1400
+ g.map((u) => {
1401
+ const k = d[u];
1402
+ if (k.length === 0) return null;
1403
+ const h = Ca[u];
1404
+ return /* @__PURE__ */ f(
1403
1405
  "div",
1404
1406
  {
1405
1407
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
1406
1408
  children: [
1407
- /* @__PURE__ */ g("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
1408
- /* @__PURE__ */ a(f, { "aria-hidden": "true", className: "ds:size-3.5" }),
1409
- /* @__PURE__ */ a("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: l(`booking.timeOfDay.${p}`) })
1409
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
1410
+ /* @__PURE__ */ a(h, { "aria-hidden": "true", className: "ds:size-3.5" }),
1411
+ /* @__PURE__ */ a("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: l(`booking.timeOfDay.${u}`) })
1410
1412
  ] }),
1411
1413
  /* @__PURE__ */ a(
1412
1414
  "div",
1413
1415
  {
1414
1416
  role: "group",
1415
- "aria-label": l(`booking.timeOfDay.${p}`),
1417
+ "aria-label": l(`booking.timeOfDay.${u}`),
1416
1418
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-4",
1417
- children: y.map((x) => {
1418
- const k = x.key === s, _ = x.available ? k ? "selected" : "idle" : "unavailable";
1419
+ children: k.map((x) => {
1420
+ const y = x.key === s, C = x.available ? y ? "selected" : "idle" : "unavailable";
1419
1421
  return /* @__PURE__ */ a(
1420
1422
  "button",
1421
1423
  {
1422
1424
  type: "button",
1423
1425
  "data-slot-id": x.key,
1424
1426
  disabled: !x.available,
1425
- "aria-pressed": k,
1427
+ "aria-pressed": y,
1426
1428
  "aria-label": l("booking.slotAvailableLabel", {
1427
1429
  time: x.time
1428
1430
  }),
1429
1431
  onClick: () => x.available && n(x),
1430
- className: xa({ state: _ }),
1432
+ className: Ia({ state: C }),
1431
1433
  children: x.time
1432
1434
  },
1433
1435
  x.key
@@ -1437,17 +1439,17 @@ function Ye({
1437
1439
  )
1438
1440
  ]
1439
1441
  },
1440
- p
1442
+ u
1441
1443
  );
1442
1444
  })
1443
1445
  ] });
1444
1446
  }
1445
- function Ze({ value: e, onChange: t }) {
1446
- const { t: s } = M(), n = [
1447
+ function We({ value: e, onChange: t }) {
1448
+ const { t: s } = T(), n = [
1447
1449
  { value: "private", label: s("booking.insurance.private") },
1448
1450
  { value: "public", label: s("booking.insurance.public") }
1449
1451
  ];
1450
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1452
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1451
1453
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: s("booking.insurance.heading") }),
1452
1454
  /* @__PURE__ */ a(
1453
1455
  Se,
@@ -1463,12 +1465,12 @@ function Ze({ value: e, onChange: t }) {
1463
1465
  )
1464
1466
  ] });
1465
1467
  }
1466
- function Je({ specialties: e, value: t, onChange: s }) {
1467
- const { t: n } = M(), i = e.map((o) => ({
1468
+ function Qe({ specialties: e, value: t, onChange: s }) {
1469
+ const { t: n } = T(), i = e.map((o) => ({
1468
1470
  value: o.id,
1469
1471
  label: o.label
1470
1472
  }));
1471
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1473
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1472
1474
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.specialty.heading") }),
1473
1475
  /* @__PURE__ */ a(
1474
1476
  Se,
@@ -1482,8 +1484,8 @@ function Je({ specialties: e, value: t, onChange: s }) {
1482
1484
  )
1483
1485
  ] });
1484
1486
  }
1485
- function Xe({ services: e, value: t, onChange: s, compact: n }) {
1486
- const { t: i } = M();
1487
+ function et({ services: e, value: t, onChange: s, compact: n }) {
1488
+ const { t: i } = T();
1487
1489
  if (n) {
1488
1490
  const o = e.map((l) => ({
1489
1491
  value: l.id,
@@ -1491,7 +1493,7 @@ function Xe({ services: e, value: t, onChange: s, compact: n }) {
1491
1493
  minutes: l.durationMin
1492
1494
  })}`
1493
1495
  }));
1494
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1496
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1495
1497
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: i("booking.service.heading") }),
1496
1498
  /* @__PURE__ */ a(
1497
1499
  Se,
@@ -1505,10 +1507,10 @@ function Xe({ services: e, value: t, onChange: s, compact: n }) {
1505
1507
  )
1506
1508
  ] });
1507
1509
  }
1508
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1510
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1509
1511
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: i("booking.service.heading") }),
1510
1512
  /* @__PURE__ */ a(
1511
- ka,
1513
+ Na,
1512
1514
  {
1513
1515
  services: e,
1514
1516
  selectedServiceId: t,
@@ -1517,18 +1519,18 @@ function Xe({ services: e, value: t, onChange: s, compact: n }) {
1517
1519
  )
1518
1520
  ] });
1519
1521
  }
1520
- function We({ operators: e, value: t, onChange: s }) {
1521
- const { t: n } = M(), i = [
1522
- { value: ue, label: n("booking.operator.all") },
1522
+ function tt({ operators: e, value: t, onChange: s }) {
1523
+ const { t: n } = T(), i = [
1524
+ { value: pe, label: n("booking.operator.all") },
1523
1525
  ...e.map((o) => ({ value: o.id, label: o.name }))
1524
1526
  ];
1525
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1527
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1526
1528
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.operator.heading") }),
1527
1529
  /* @__PURE__ */ a(
1528
1530
  Se,
1529
1531
  {
1530
1532
  options: i,
1531
- value: t ?? ue,
1533
+ value: t ?? pe,
1532
1534
  onValueChange: (o) => s(o),
1533
1535
  placeholder: n("booking.operator.placeholder"),
1534
1536
  "aria-label": n("booking.operator.heading")
@@ -1536,87 +1538,103 @@ function We({ operators: e, value: t, onChange: s }) {
1536
1538
  )
1537
1539
  ] });
1538
1540
  }
1539
- function Qe({
1541
+ function at({
1540
1542
  customSlot: e
1541
1543
  }) {
1542
- const { t } = M();
1543
- return e ? /* @__PURE__ */ a(ie, { children: e }) : /* @__PURE__ */ g($, { variant: "warning", children: [
1544
- /* @__PURE__ */ a($.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
1545
- /* @__PURE__ */ a($.Description, { children: t("booking.onboardingIncomplete.description") })
1544
+ const { t } = T();
1545
+ return e ? /* @__PURE__ */ a(Z, { children: e }) : /* @__PURE__ */ f(F, { variant: "warning", children: [
1546
+ /* @__PURE__ */ a(F.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
1547
+ /* @__PURE__ */ a(F.Description, { children: t("booking.onboardingIncomplete.description") })
1546
1548
  ] });
1547
1549
  }
1548
- function et({
1550
+ function st({
1549
1551
  nextAvailableDate: e,
1550
1552
  onJump: t,
1551
1553
  locale: s
1552
1554
  }) {
1553
- const { t: n } = M(), i = I(() => {
1555
+ const { t: n } = T(), i = w(() => {
1554
1556
  try {
1555
1557
  return new Intl.DateTimeFormat(s, { dateStyle: "long" }).format(
1556
- Q(e)
1558
+ ee(e)
1557
1559
  );
1558
1560
  } catch {
1559
1561
  return e;
1560
1562
  }
1561
1563
  }, [e, s]);
1562
- return /* @__PURE__ */ g($, { variant: "info", children: [
1563
- /* @__PURE__ */ a($.Description, { children: n("booking.nextAvailable.description", { date: i }) }),
1564
- /* @__PURE__ */ a($.Action, { children: /* @__PURE__ */ a(oe, { intent: "secondary", size: "sm", onClick: t, children: n("booking.nextAvailable.cta") }) })
1564
+ return /* @__PURE__ */ f(F, { variant: "info", children: [
1565
+ /* @__PURE__ */ a(F.Description, { children: n("booking.nextAvailable.description", { date: i }) }),
1566
+ /* @__PURE__ */ a(F.Action, { children: /* @__PURE__ */ a(ae, { intent: "secondary", size: "sm", onClick: t, children: n("booking.nextAvailable.cta") }) })
1565
1567
  ] });
1566
1568
  }
1567
- function Ia({
1569
+ function Ma({
1568
1570
  snapshot: e,
1569
1571
  operators: t,
1570
- locale: s,
1571
- onReset: n
1572
+ specialties: s,
1573
+ services: n,
1574
+ locale: i,
1575
+ mode: o,
1576
+ showModify: l,
1577
+ onReset: c,
1578
+ onModify: d
1572
1579
  }) {
1573
- const { t: i } = M(), l = (e.details.confirmationChannels ?? ["email"]).map(
1574
- (u) => i(`booking.confirmation.channel.${u}`)
1575
- ), c = l.length > 1 ? i("booking.success.descriptionMultiple", {
1576
- channels: l.join(" · ")
1577
- }) : i("booking.success.descriptionSingle", { channel: l[0] }), d = I(() => {
1580
+ const { t: p } = T(), u = (e.details.confirmationChannels ?? ["email"]).map(
1581
+ (_) => p(`booking.confirmation.channel.${_}`)
1582
+ ), k = o === "demo" ? p("booking.success.descriptionDemo") : u.length > 1 ? p("booking.success.descriptionMultiple", {
1583
+ channels: u.join(" · ")
1584
+ }) : p("booking.success.descriptionSingle", { channel: u[0] }), h = w(() => {
1578
1585
  if (e.date)
1579
1586
  try {
1580
- return new Intl.DateTimeFormat(s, {
1587
+ return new Intl.DateTimeFormat(i, {
1581
1588
  weekday: "long",
1582
1589
  day: "numeric",
1583
1590
  month: "long"
1584
- }).format(Q(e.date));
1591
+ }).format(ee(e.date));
1585
1592
  } catch {
1586
1593
  return e.date;
1587
1594
  }
1588
- }, [e.date, s]), h = e.operatorId ? t.find((u) => u.id === e.operatorId) : void 0;
1589
- return /* @__PURE__ */ g(
1595
+ }, [e.date, i]), x = e.operatorId ? t.find((_) => _.id === e.operatorId) : void 0, y = e.specialtyId ? s.find((_) => _.id === e.specialtyId) : void 0, C = e.serviceId ? n.find((_) => _.id === e.serviceId) : void 0;
1596
+ return /* @__PURE__ */ f(
1590
1597
  "div",
1591
1598
  {
1592
1599
  "data-component": "booking-success",
1593
1600
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
1594
1601
  children: [
1595
- /* @__PURE__ */ g($, { variant: "success", children: [
1596
- /* @__PURE__ */ a($.Title, { as: "h3", children: i("booking.success.heading") }),
1597
- /* @__PURE__ */ a($.Description, { children: c })
1602
+ /* @__PURE__ */ f(F, { variant: "success", children: [
1603
+ /* @__PURE__ */ a(F.Title, { as: "h3", children: p("booking.success.heading") }),
1604
+ /* @__PURE__ */ a(F.Description, { children: k })
1598
1605
  ] }),
1599
- /* @__PURE__ */ a("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ g("dl", { className: "ds:grid ds:grid-cols-[auto_minmax(0,1fr)] ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] ds:m-0", children: [
1600
- d ? /* @__PURE__ */ g(ie, { children: [
1601
- /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: i("booking.success.summaryDate") }),
1602
- /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: d })
1606
+ /* @__PURE__ */ a("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ f("dl", { className: "ds:grid ds:grid-cols-[auto_minmax(0,1fr)] ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] ds:m-0", children: [
1607
+ y ? /* @__PURE__ */ f(Z, { children: [
1608
+ /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summarySpecialty") }),
1609
+ /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: y.label })
1610
+ ] }) : null,
1611
+ C ? /* @__PURE__ */ f(Z, { children: [
1612
+ /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryService") }),
1613
+ /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: C.label })
1603
1614
  ] }) : null,
1604
- /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: i("booking.success.summaryTime") }),
1615
+ h ? /* @__PURE__ */ f(Z, { children: [
1616
+ /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryDate") }),
1617
+ /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: h })
1618
+ ] }) : null,
1619
+ /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryTime") }),
1605
1620
  /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: e.slot.time }),
1606
- h ? /* @__PURE__ */ g(ie, { children: [
1607
- /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: i("booking.success.summaryProvider") }),
1608
- /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: h.name })
1621
+ x ? /* @__PURE__ */ f(Z, { children: [
1622
+ /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryProvider") }),
1623
+ /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: x.name })
1609
1624
  ] }) : null
1610
1625
  ] }) }),
1611
- /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(oe, { intent: "secondary", size: "md", onClick: n, children: i("booking.success.bookAnother") }) })
1626
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1627
+ /* @__PURE__ */ a(ae, { intent: "secondary", size: "md", onClick: c, children: p("booking.success.bookAnother") }),
1628
+ l ? /* @__PURE__ */ a(ae, { intent: "ghost", size: "md", onClick: d, children: p("booking.success.modifyBooking") }) : null
1629
+ ] })
1612
1630
  ]
1613
1631
  }
1614
1632
  );
1615
1633
  }
1616
- function tt({ customSlot: e }) {
1617
- const { t } = M();
1618
- return e ? /* @__PURE__ */ a(ie, { children: e }) : /* @__PURE__ */ a(
1619
- Re,
1634
+ function nt({ customSlot: e }) {
1635
+ const { t } = T();
1636
+ return e ? /* @__PURE__ */ a(Z, { children: e }) : /* @__PURE__ */ a(
1637
+ Ke,
1620
1638
  {
1621
1639
  variant: "no-results",
1622
1640
  title: t("booking.emptyServices.title"),
@@ -1624,7 +1642,7 @@ function tt({ customSlot: e }) {
1624
1642
  }
1625
1643
  );
1626
1644
  }
1627
- function wa(e) {
1645
+ function Da(e) {
1628
1646
  const {
1629
1647
  cascade: t,
1630
1648
  inputs: s,
@@ -1634,91 +1652,91 @@ function wa(e) {
1634
1652
  emptyServicesSlot: l,
1635
1653
  onboardingIncompleteSlot: c,
1636
1654
  loadingSlots: d,
1637
- submitting: h,
1638
- locale: u,
1639
- detailsProps: p
1640
- } = e, { t: y } = M();
1641
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1655
+ submitting: p,
1656
+ locale: g,
1657
+ detailsProps: u
1658
+ } = e, { t: k } = T();
1659
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1642
1660
  t.gates.insurance ? /* @__PURE__ */ a(
1643
- Ze,
1661
+ We,
1644
1662
  {
1645
1663
  value: n.insuranceType,
1646
- onChange: (f) => i($e(n, f))
1664
+ onChange: (h) => i(qe(n, h))
1647
1665
  }
1648
1666
  ) : null,
1649
1667
  t.gates.specialty ? /* @__PURE__ */ a(
1650
- Je,
1668
+ Qe,
1651
1669
  {
1652
1670
  specialties: t.filtered.specialties,
1653
1671
  value: n.specialtyId,
1654
- onChange: (f) => i(Ke(n, f))
1672
+ onChange: (h) => i(He(n, h))
1655
1673
  }
1656
1674
  ) : null,
1657
- t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ a(tt, { customSlot: l }) : /* @__PURE__ */ a(
1658
- Xe,
1675
+ t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ a(nt, { customSlot: l }) : /* @__PURE__ */ a(
1676
+ et,
1659
1677
  {
1660
1678
  services: t.filtered.services,
1661
1679
  value: n.serviceId,
1662
- onChange: (f) => i(je(n, f))
1680
+ onChange: (h) => i(Ge(n, h))
1663
1681
  }
1664
1682
  ) : null,
1665
- t.gates.onboardingIncomplete ? /* @__PURE__ */ a(Qe, { customSlot: c }) : null,
1683
+ t.gates.onboardingIncomplete ? /* @__PURE__ */ a(at, { customSlot: c }) : null,
1666
1684
  t.gates.operator ? /* @__PURE__ */ a(
1667
- We,
1685
+ tt,
1668
1686
  {
1669
1687
  operators: t.filtered.operators,
1670
1688
  value: n.operatorId,
1671
- onChange: (f) => i(qe(n, f))
1689
+ onChange: (h) => i(Ue(n, h))
1672
1690
  }
1673
1691
  ) : null,
1674
- t.gates.date ? /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1675
- /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: y("booking.date.heading") }),
1692
+ t.gates.date ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1693
+ /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: k("booking.date.heading") }),
1676
1694
  s.availableDates.length === 0 && s.nextAvailableDate ? /* @__PURE__ */ a(
1677
- et,
1695
+ st,
1678
1696
  {
1679
1697
  nextAvailableDate: s.nextAvailableDate,
1680
1698
  onJump: () => i(ke(n, s.nextAvailableDate)),
1681
- locale: u
1699
+ locale: g
1682
1700
  }
1683
1701
  ) : /* @__PURE__ */ a(
1684
- Ue,
1702
+ Je,
1685
1703
  {
1686
1704
  availableDates: s.availableDates,
1687
1705
  selectedDate: n.date,
1688
- onSelectDate: (f) => i(ke(n, f)),
1689
- locale: u,
1706
+ onSelectDate: (h) => i(ke(n, h)),
1707
+ locale: g,
1690
1708
  loading: d
1691
1709
  }
1692
1710
  )
1693
1711
  ] }) : null,
1694
- t.gates.slot && n.date ? /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1695
- /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: y("booking.slot.heading") }),
1712
+ t.gates.slot && n.date ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1713
+ /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: k("booking.slot.heading") }),
1696
1714
  /* @__PURE__ */ a(
1697
- Ye,
1715
+ Xe,
1698
1716
  {
1699
1717
  date: n.date,
1700
1718
  slots: s.availableSlots[n.date] ?? [],
1701
1719
  selectedSlotKey: n.slotKey,
1702
- onSelect: (f) => i(He(n, f.key)),
1720
+ onSelect: (h) => i(Ye(n, h.key)),
1703
1721
  loading: d,
1704
- locale: u
1722
+ locale: g
1705
1723
  }
1706
1724
  )
1707
1725
  ] }) : null,
1708
1726
  t.gates.details && t.selectedSlot ? /* @__PURE__ */ a(
1709
- Te,
1727
+ Ae,
1710
1728
  {
1711
- ...p,
1729
+ ...u,
1712
1730
  value: n.details ?? {},
1713
- onChange: (f) => i({ ...n, details: f }),
1731
+ onChange: (h) => i({ ...n, details: h }),
1714
1732
  onSubmit: o,
1715
- submitting: h,
1733
+ submitting: p,
1716
1734
  defaultPhoneCountry: e.policy.country
1717
1735
  }
1718
1736
  ) : null
1719
1737
  ] });
1720
1738
  }
1721
- function R(e, t, s = {}) {
1739
+ function K(e, t, s = {}) {
1722
1740
  const {
1723
1741
  cascade: n,
1724
1742
  inputs: i,
@@ -1726,89 +1744,89 @@ function R(e, t, s = {}) {
1726
1744
  onChange: l,
1727
1745
  onSubmit: c,
1728
1746
  emptyServicesSlot: d,
1729
- onboardingIncompleteSlot: h,
1730
- loadingSlots: u,
1731
- submitting: p,
1732
- locale: y,
1733
- detailsProps: f,
1747
+ onboardingIncompleteSlot: p,
1748
+ loadingSlots: g,
1749
+ submitting: u,
1750
+ locale: k,
1751
+ detailsProps: h,
1734
1752
  policy: x
1735
1753
  } = t;
1736
1754
  switch (e) {
1737
1755
  case 1:
1738
1756
  return /* @__PURE__ */ a(
1739
- Ze,
1757
+ We,
1740
1758
  {
1741
1759
  value: o.insuranceType,
1742
- onChange: (k) => l($e(o, k))
1760
+ onChange: (y) => l(qe(o, y))
1743
1761
  }
1744
1762
  );
1745
1763
  case 2:
1746
1764
  return /* @__PURE__ */ a(
1747
- Je,
1765
+ Qe,
1748
1766
  {
1749
1767
  specialties: n.filtered.specialties,
1750
1768
  value: o.specialtyId,
1751
- onChange: (k) => l(Ke(o, k))
1769
+ onChange: (y) => l(He(o, y))
1752
1770
  }
1753
1771
  );
1754
1772
  case 3:
1755
- return n.filtered.services.length === 0 ? /* @__PURE__ */ a(tt, { customSlot: d }) : n.gates.onboardingIncomplete ? /* @__PURE__ */ a(Qe, { customSlot: h }) : /* @__PURE__ */ a(
1756
- Xe,
1773
+ return n.filtered.services.length === 0 ? /* @__PURE__ */ a(nt, { customSlot: d }) : n.gates.onboardingIncomplete ? /* @__PURE__ */ a(at, { customSlot: p }) : /* @__PURE__ */ a(
1774
+ et,
1757
1775
  {
1758
1776
  services: n.filtered.services,
1759
1777
  value: o.serviceId,
1760
- onChange: (k) => l(je(o, k)),
1778
+ onChange: (y) => l(Ge(o, y)),
1761
1779
  compact: s.compactService
1762
1780
  }
1763
1781
  );
1764
1782
  case 4:
1765
1783
  return /* @__PURE__ */ a(
1766
- We,
1784
+ tt,
1767
1785
  {
1768
1786
  operators: n.filtered.operators,
1769
1787
  value: o.operatorId,
1770
- onChange: (k) => l(qe(o, k))
1788
+ onChange: (y) => l(Ue(o, y))
1771
1789
  }
1772
1790
  );
1773
1791
  case 5:
1774
1792
  return i.availableDates.length === 0 && i.nextAvailableDate ? /* @__PURE__ */ a(
1775
- et,
1793
+ st,
1776
1794
  {
1777
1795
  nextAvailableDate: i.nextAvailableDate,
1778
1796
  onJump: () => l(ke(o, i.nextAvailableDate)),
1779
- locale: y
1797
+ locale: k
1780
1798
  }
1781
1799
  ) : /* @__PURE__ */ a(
1782
- Ue,
1800
+ Je,
1783
1801
  {
1784
1802
  availableDates: i.availableDates,
1785
1803
  selectedDate: o.date,
1786
- onSelectDate: (k) => l(ke(o, k)),
1787
- locale: y,
1788
- loading: u
1804
+ onSelectDate: (y) => l(ke(o, y)),
1805
+ locale: k,
1806
+ loading: g
1789
1807
  }
1790
1808
  );
1791
1809
  case 6:
1792
1810
  return o.date ? /* @__PURE__ */ a(
1793
- Ye,
1811
+ Xe,
1794
1812
  {
1795
1813
  date: o.date,
1796
1814
  slots: i.availableSlots[o.date] ?? [],
1797
1815
  selectedSlotKey: o.slotKey,
1798
- onSelect: (k) => l(He(o, k.key)),
1799
- loading: u,
1800
- locale: y
1816
+ onSelect: (y) => l(Ye(o, y.key)),
1817
+ loading: g,
1818
+ locale: k
1801
1819
  }
1802
1820
  ) : null;
1803
1821
  case 7:
1804
1822
  return n.selectedSlot ? /* @__PURE__ */ a(
1805
- Te,
1823
+ Ae,
1806
1824
  {
1807
- ...f,
1825
+ ...h,
1808
1826
  value: o.details ?? {},
1809
- onChange: (k) => l({ ...o, details: k }),
1827
+ onChange: (y) => l({ ...o, details: y }),
1810
1828
  onSubmit: c,
1811
- submitting: p,
1829
+ submitting: u,
1812
1830
  defaultPhoneCountry: x.country
1813
1831
  }
1814
1832
  ) : null;
@@ -1817,9 +1835,9 @@ function R(e, t, s = {}) {
1817
1835
  return null;
1818
1836
  }
1819
1837
  }
1820
- function _e() {
1821
- const { t: e } = M();
1822
- return I(
1838
+ function Be() {
1839
+ const { t: e } = T();
1840
+ return w(
1823
1841
  () => ({
1824
1842
  1: e("booking.insurance.heading"),
1825
1843
  2: e("booking.specialty.heading"),
@@ -1832,29 +1850,29 @@ function _e() {
1832
1850
  [e]
1833
1851
  );
1834
1852
  }
1835
- function Ca(e) {
1836
- const { cascade: t, value: s, activeStep: n, setActiveStep: i } = e, o = _e(), l = I(
1853
+ function Ta(e) {
1854
+ const { cascade: t, value: s, activeStep: n, setActiveStep: i } = e, o = Be(), l = w(
1837
1855
  () => t.visibleSteps.map((d) => ({
1838
1856
  label: o[d],
1839
- summary: at(d, s, t),
1840
- status: pe(d, s) && d < t.currentStep ? "completed" : void 0,
1841
- content: R(d, e, { compactService: !0 })
1857
+ summary: it(d, s, t),
1858
+ status: ge(d, s) && d < t.currentStep ? "completed" : void 0,
1859
+ content: K(d, e, { compactService: !0 })
1842
1860
  })),
1843
1861
  [t, s, o, e]
1844
1862
  ), c = Math.max(0, t.visibleSteps.indexOf(n));
1845
1863
  return /* @__PURE__ */ a(
1846
- ft,
1864
+ bt,
1847
1865
  {
1848
1866
  activeStep: c,
1849
1867
  steps: l,
1850
1868
  onStepChange: (d) => {
1851
- const h = t.visibleSteps[d];
1852
- h && i(h);
1869
+ const p = t.visibleSteps[d];
1870
+ p && i(p);
1853
1871
  }
1854
1872
  }
1855
1873
  );
1856
1874
  }
1857
- function pe(e, t) {
1875
+ function ge(e, t) {
1858
1876
  switch (e) {
1859
1877
  case 1:
1860
1878
  return t.insuranceType !== void 0;
@@ -1872,9 +1890,9 @@ function pe(e, t) {
1872
1890
  return !1;
1873
1891
  }
1874
1892
  }
1875
- function at(e, t, s) {
1893
+ function it(e, t, s) {
1876
1894
  var n;
1877
- if (pe(e, t))
1895
+ if (ge(e, t))
1878
1896
  switch (e) {
1879
1897
  case 1:
1880
1898
  return t.insuranceType;
@@ -1891,7 +1909,7 @@ function at(e, t, s) {
1891
1909
  return i == null ? void 0 : i.label;
1892
1910
  }
1893
1911
  case 4: {
1894
- const i = De(t);
1912
+ const i = _e(t);
1895
1913
  if (!i) return;
1896
1914
  const o = s.filtered.operators.find((l) => l.id === i);
1897
1915
  return o == null ? void 0 : o.name;
@@ -1904,23 +1922,23 @@ function at(e, t, s) {
1904
1922
  return;
1905
1923
  }
1906
1924
  }
1907
- function Ma(e) {
1908
- const { cascade: t, value: s, setActiveStep: n } = e, { t: i } = M(), o = _e(), l = t.visibleSteps.filter(
1925
+ function _a(e) {
1926
+ const { cascade: t, value: s, setActiveStep: n } = e, { t: i } = T(), o = Be(), l = t.visibleSteps.filter(
1909
1927
  (d) => d === 1 || d === 2 || d === 3 || d === 4
1910
1928
  ), c = l.some(
1911
- (d) => !pe(d, s)
1929
+ (d) => !ge(d, s)
1912
1930
  );
1913
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1914
- c ? l.filter((d) => !pe(d, s)).slice(0, 1).map((d) => /* @__PURE__ */ a("div", { children: R(d, e, { compactService: !0 }) }, `csf-${d}`)) : /* @__PURE__ */ a(
1931
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1932
+ c ? l.filter((d) => !ge(d, s)).slice(0, 1).map((d) => /* @__PURE__ */ a("div", { children: K(d, e, { compactService: !0 }) }, `csf-${d}`)) : /* @__PURE__ */ a(
1915
1933
  "div",
1916
1934
  {
1917
1935
  role: "group",
1918
1936
  "aria-label": i("booking.regionLabel"),
1919
1937
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
1920
1938
  children: l.map((d) => {
1921
- const h = at(d, s, t);
1922
- return h ? /* @__PURE__ */ g(
1923
- oe,
1939
+ const p = it(d, s, t);
1940
+ return p ? /* @__PURE__ */ f(
1941
+ ae,
1924
1942
  {
1925
1943
  intent: "tonal",
1926
1944
  size: "sm",
@@ -1928,7 +1946,7 @@ function Ma(e) {
1928
1946
  children: [
1929
1947
  o[d],
1930
1948
  ": ",
1931
- h
1949
+ p
1932
1950
  ]
1933
1951
  },
1934
1952
  `csc-${d}`
@@ -1936,59 +1954,59 @@ function Ma(e) {
1936
1954
  })
1937
1955
  }
1938
1956
  ),
1939
- !c && t.gates.date ? /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
1940
- /* @__PURE__ */ a("div", { className: "ds:min-w-0", children: R(5, e) }),
1941
- /* @__PURE__ */ a("div", { className: "ds:min-w-0", children: s.date ? R(6, e) : null })
1957
+ !c && t.gates.date ? /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
1958
+ /* @__PURE__ */ a("div", { className: "ds:min-w-0", children: K(5, e) }),
1959
+ /* @__PURE__ */ a("div", { className: "ds:min-w-0", children: s.date ? K(6, e) : null })
1942
1960
  ] }) : null,
1943
- t.gates.details ? /* @__PURE__ */ a("div", { children: R(7, e) }) : null
1961
+ t.gates.details ? /* @__PURE__ */ a("div", { children: K(7, e) }) : null
1944
1962
  ] });
1945
1963
  }
1946
- function Da(e) {
1964
+ function Aa(e) {
1947
1965
  const { cascade: t } = e, s = t.visibleSteps.filter(
1948
1966
  (n) => n === 1 || n === 2 || n === 3 || n === 4
1949
1967
  );
1950
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1951
- /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
1952
- /* @__PURE__ */ a("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: s.map((n) => /* @__PURE__ */ a("div", { children: R(n, e, { compactService: !0 }) }, `fbf-${n}`)) }),
1953
- /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1954
- t.gates.date ? R(5, e) : null,
1955
- t.gates.slot && e.value.date ? R(6, e) : null
1968
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1969
+ /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
1970
+ /* @__PURE__ */ a("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: s.map((n) => /* @__PURE__ */ a("div", { children: K(n, e, { compactService: !0 }) }, `fbf-${n}`)) }),
1971
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1972
+ t.gates.date ? K(5, e) : null,
1973
+ t.gates.slot && e.value.date ? K(6, e) : null
1956
1974
  ] })
1957
1975
  ] }),
1958
- t.gates.details ? R(7, e) : null
1976
+ t.gates.details ? K(7, e) : null
1959
1977
  ] });
1960
1978
  }
1961
- function Ta(e) {
1962
- const { cascade: t, value: s, activeStep: n, setActiveStep: i } = e, { t: o } = M(), l = _e(), c = t.visibleSteps, d = Math.max(0, c.indexOf(n)), h = c.length, u = I(
1963
- () => c.map((f) => ({ label: l[f] })),
1979
+ function Ba(e) {
1980
+ const { cascade: t, value: s, activeStep: n, setActiveStep: i } = e, { t: o } = T(), l = Be(), c = t.visibleSteps, d = Math.max(0, c.indexOf(n)), p = c.length, g = w(
1981
+ () => c.map((h) => ({ label: l[h] })),
1964
1982
  [c, l]
1965
- ), p = d > 0, y = d < h - 1 && pe(n, s);
1966
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1967
- /* @__PURE__ */ a(ht, { activeStep: d, steps: u }),
1968
- /* @__PURE__ */ a("div", { children: R(n, e, { compactService: !0 }) }),
1969
- /* @__PURE__ */ g("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1983
+ ), u = d > 0, k = d < p - 1 && ge(n, s);
1984
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1985
+ /* @__PURE__ */ a(yt, { activeStep: d, steps: g }),
1986
+ /* @__PURE__ */ a("div", { children: K(n, e, { compactService: !0 }) }),
1987
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1970
1988
  /* @__PURE__ */ a(
1971
- oe,
1989
+ ae,
1972
1990
  {
1973
1991
  intent: "ghost",
1974
1992
  size: "md",
1975
- disabled: !p,
1993
+ disabled: !u,
1976
1994
  onClick: () => {
1977
- const f = c[d - 1];
1978
- f && i(f);
1995
+ const h = c[d - 1];
1996
+ h && i(h);
1979
1997
  },
1980
1998
  children: o("booking.actions.back")
1981
1999
  }
1982
2000
  ),
1983
2001
  n < 7 ? /* @__PURE__ */ a(
1984
- oe,
2002
+ ae,
1985
2003
  {
1986
2004
  intent: "primary",
1987
2005
  size: "md",
1988
- disabled: !y,
2006
+ disabled: !k,
1989
2007
  onClick: () => {
1990
- const f = c[d + 1];
1991
- f && i(f);
2008
+ const h = c[d + 1];
2009
+ h && i(h);
1992
2010
  },
1993
2011
  children: o("booking.actions.next")
1994
2012
  }
@@ -1996,7 +2014,7 @@ function Ta(e) {
1996
2014
  ] })
1997
2015
  ] });
1998
2016
  }
1999
- const _a = [], Aa = [], Ba = Ve(
2017
+ const Oa = [], Ea = [], Pa = ze(
2000
2018
  ({
2001
2019
  variant: e = "inline-list",
2002
2020
  country: t,
@@ -2007,60 +2025,63 @@ const _a = [], Aa = [], Ba = Ve(
2007
2025
  specialties: l,
2008
2026
  services: c,
2009
2027
  operators: d,
2010
- availableDates: h,
2011
- availableSlots: u,
2012
- nextAvailableDate: p,
2013
- requireCodiceFiscale: y,
2014
- requireDateOfBirth: f,
2028
+ availableDates: p,
2029
+ availableSlots: g,
2030
+ nextAvailableDate: u,
2031
+ requireCodiceFiscale: k,
2032
+ requireDateOfBirth: h,
2015
2033
  requireInsuranceNumber: x,
2016
- showNote: k,
2017
- showReturningPatientFlag: _,
2018
- privacyPolicyUrl: Y,
2034
+ showNote: y,
2035
+ showReturningPatientFlag: C,
2036
+ privacyPolicyUrl: _,
2019
2037
  termsUrl: S,
2020
- validateCodiceFiscale: r,
2021
- validateInsuranceNumber: b,
2022
- confirmationChannels: D,
2023
- defaultConfirmationChannels: C,
2024
- value: v,
2038
+ validateCodiceFiscale: v,
2039
+ validateInsuranceNumber: r,
2040
+ confirmationChannels: O,
2041
+ defaultConfirmationChannels: M,
2042
+ value: b,
2025
2043
  onChange: N,
2026
- onSubmit: E,
2027
- loadingSlots: Z,
2028
- submitting: P,
2029
- emptyServicesSlot: V,
2030
- onboardingIncompleteSlot: F,
2031
- "aria-label": T,
2032
- id: K,
2033
- className: j,
2034
- ...ge
2035
- }, te) => {
2036
- const { t: re, i18n: J } = M(), A = e ?? "inline-list", q = J.language ?? "en", H = l ?? _a, G = d ?? Aa;
2037
- se(() => {
2038
- const L = da(v, {
2044
+ onSubmit: R,
2045
+ loadingSlots: E,
2046
+ submitting: J,
2047
+ submitError: P,
2048
+ mode: z = "live",
2049
+ showModifyOnSuccess: H = !0,
2050
+ emptyServicesSlot: D,
2051
+ onboardingIncompleteSlot: X,
2052
+ "aria-label": G,
2053
+ id: se,
2054
+ className: ne,
2055
+ ...Ne
2056
+ }, W) => {
2057
+ const { t: Q, i18n: le } = T(), L = e ?? "inline-list", ie = le.language ?? "en", $ = l ?? Oa, j = d ?? Ea;
2058
+ re(() => {
2059
+ const V = ma(b, {
2039
2060
  useSpecialties: s,
2040
2061
  lockedOperatorId: i,
2041
2062
  autoSelectSingleService: o,
2042
- specialties: H,
2063
+ specialties: $,
2043
2064
  services: c
2044
2065
  });
2045
- (L.specialtyId !== v.specialtyId || L.operatorId !== v.operatorId || L.serviceId !== v.serviceId) && N(L);
2066
+ (V.specialtyId !== b.specialtyId || V.operatorId !== b.operatorId || V.serviceId !== b.serviceId) && N(V);
2046
2067
  }, [
2047
2068
  i,
2048
2069
  s,
2049
2070
  o,
2050
- H,
2071
+ $,
2051
2072
  c
2052
2073
  ]);
2053
- const B = I(
2054
- () => ra({
2074
+ const A = w(
2075
+ () => ca({
2055
2076
  country: t,
2056
2077
  useSpecialties: s,
2057
2078
  allowOperatorSelection: n,
2058
2079
  lockedOperatorId: i,
2059
- specialties: H,
2080
+ specialties: $,
2060
2081
  services: c,
2061
- operators: G,
2062
- availableSlots: u,
2063
- value: v
2082
+ operators: j,
2083
+ availableSlots: g,
2084
+ value: b
2064
2085
  }),
2065
2086
  [
2066
2087
  t,
@@ -2068,159 +2089,180 @@ const _a = [], Aa = [], Ba = Ve(
2068
2089
  n,
2069
2090
  i,
2070
2091
  o,
2071
- H,
2092
+ $,
2072
2093
  c,
2073
- G,
2074
- h,
2075
- u,
2076
- v
2094
+ j,
2095
+ p,
2096
+ g,
2097
+ b
2077
2098
  ]
2078
- ), [de, ae] = z(
2079
- B.currentStep
2080
- ), le = ne(B.currentStep);
2081
- se(() => {
2082
- B.currentStep > le.current && ae(B.currentStep), le.current = B.currentStep;
2083
- }, [B.currentStep]);
2084
- const [X, W] = z("idle"), [m, w] = z(null), ce = ee(
2085
- async (L) => {
2086
- if (!B.selectedSlot) return;
2087
- const Ie = {
2088
- slot: B.selectedSlot,
2099
+ ), [ce, U] = q(
2100
+ A.currentStep
2101
+ ), me = de(A.currentStep);
2102
+ re(() => {
2103
+ A.currentStep > me.current && U(A.currentStep), me.current = A.currentStep;
2104
+ }, [A.currentStep]);
2105
+ const [m, I] = q("idle"), [oe, Ie] = q(null), Oe = te(
2106
+ async (V) => {
2107
+ if (!A.selectedSlot) return;
2108
+ const Ce = {
2109
+ slot: A.selectedSlot,
2089
2110
  value: {
2090
- ...v,
2091
- details: L,
2092
- operatorId: De(v) ?? v.operatorId
2111
+ ...b,
2112
+ details: V,
2113
+ operatorId: _e(b) ?? b.operatorId
2093
2114
  },
2094
- details: L
2115
+ details: V
2095
2116
  };
2096
- W("submitting");
2117
+ I("submitting");
2097
2118
  try {
2098
- await E(Ie), w({
2099
- slot: B.selectedSlot,
2100
- details: L,
2101
- insuranceType: v.insuranceType,
2102
- operatorId: De(v),
2103
- date: v.date
2104
- }), W("success");
2119
+ await R(Ce), Ie({
2120
+ slot: A.selectedSlot,
2121
+ details: V,
2122
+ specialtyId: b.specialtyId,
2123
+ serviceId: b.serviceId,
2124
+ insuranceType: b.insuranceType,
2125
+ operatorId: _e(b),
2126
+ date: b.date
2127
+ }), I("success");
2105
2128
  } catch {
2106
- throw W("error"), new Error("Booking submission failed");
2129
+ throw I("error"), new Error("Booking submission failed");
2107
2130
  }
2108
2131
  },
2109
- [B.selectedSlot, E, v]
2110
- ), Ae = ne(null);
2111
- ot(te, () => Ae.current, []);
2112
- const Ne = I(
2132
+ [A.selectedSlot, R, b]
2133
+ ), Ee = de(null);
2134
+ lt(W, () => Ee.current, []);
2135
+ const we = w(
2113
2136
  () => ({
2114
- getVariant: () => A,
2137
+ getVariant: () => L,
2115
2138
  reset: () => {
2116
- N({}), w(null), W("idle"), ae(1);
2139
+ N({}), Ie(null), I("idle"), U(1);
2117
2140
  },
2118
- goToStep: (L) => {
2119
- ae(L);
2141
+ goToStep: (V) => {
2142
+ U(V);
2120
2143
  }
2121
2144
  }),
2122
- [A, N]
2145
+ [L, N]
2123
2146
  );
2124
- dt(ea, Ne, K);
2125
- const st = T ?? re("booking.regionLabel"), nt = I(() => X !== "success" || !m ? null : /* @__PURE__ */ a(
2126
- Ia,
2147
+ mt(sa, we, se);
2148
+ const ot = G ?? Q("booking.regionLabel"), rt = w(() => m !== "success" || !oe ? null : /* @__PURE__ */ a(
2149
+ Ma,
2127
2150
  {
2128
- snapshot: m,
2129
- operators: G,
2130
- locale: q,
2131
- onReset: () => Ne.reset()
2151
+ snapshot: oe,
2152
+ operators: j,
2153
+ specialties: $,
2154
+ services: c,
2155
+ locale: ie,
2156
+ mode: z,
2157
+ showModify: H,
2158
+ onReset: () => we.reset(),
2159
+ onModify: () => {
2160
+ Ie(null), I("idle"), U(7);
2161
+ }
2132
2162
  }
2133
- ), [X, m, G, q, Ne]), it = I(() => {
2134
- if (X === "success") return null;
2135
- const L = A === "accordion" ? Ca : A === "calendar" ? Ma : A === "flexible" ? Da : A === "progress" ? Ta : wa, Ie = {
2136
- cascade: B,
2163
+ ), [
2164
+ m,
2165
+ oe,
2166
+ j,
2167
+ $,
2168
+ c,
2169
+ ie,
2170
+ z,
2171
+ H,
2172
+ we
2173
+ ]), dt = w(() => {
2174
+ if (m === "success") return null;
2175
+ const V = L === "accordion" ? Ta : L === "calendar" ? _a : L === "flexible" ? Aa : L === "progress" ? Ba : Da, Ce = {
2176
+ cascade: A,
2137
2177
  inputs: {
2138
- specialties: H,
2178
+ specialties: $,
2139
2179
  services: c,
2140
- operators: G,
2141
- availableDates: h,
2142
- availableSlots: u,
2143
- nextAvailableDate: p
2180
+ operators: j,
2181
+ availableDates: p,
2182
+ availableSlots: g,
2183
+ nextAvailableDate: u
2144
2184
  },
2145
- value: v,
2185
+ value: b,
2146
2186
  onChange: N,
2147
- onSubmit: ce,
2187
+ onSubmit: Oe,
2148
2188
  policy: { country: t, lockedOperatorId: i },
2149
2189
  detailsProps: {
2150
- requireCodiceFiscale: y,
2151
- requireDateOfBirth: f,
2190
+ requireCodiceFiscale: k,
2191
+ requireDateOfBirth: h,
2152
2192
  requireInsuranceNumber: x,
2153
- insuranceType: v.insuranceType,
2154
- showNote: k,
2155
- showReturningPatientFlag: _,
2156
- privacyPolicyUrl: Y,
2193
+ insuranceType: b.insuranceType,
2194
+ showNote: y,
2195
+ showReturningPatientFlag: C,
2196
+ privacyPolicyUrl: _,
2157
2197
  termsUrl: S,
2158
- validateCodiceFiscale: r,
2159
- validateInsuranceNumber: b,
2160
- confirmationChannels: D,
2161
- defaultConfirmationChannels: C
2198
+ validateCodiceFiscale: v,
2199
+ validateInsuranceNumber: r,
2200
+ confirmationChannels: O,
2201
+ defaultConfirmationChannels: M,
2202
+ submitError: P
2162
2203
  },
2163
- emptyServicesSlot: V,
2164
- onboardingIncompleteSlot: F,
2165
- loadingSlots: Z,
2166
- submitting: P,
2167
- locale: q,
2168
- activeStep: de,
2169
- setActiveStep: ae
2204
+ emptyServicesSlot: D,
2205
+ onboardingIncompleteSlot: X,
2206
+ loadingSlots: E,
2207
+ submitting: J,
2208
+ locale: ie,
2209
+ activeStep: ce,
2210
+ setActiveStep: U
2170
2211
  };
2171
- return /* @__PURE__ */ a(L, { ...Ie });
2212
+ return /* @__PURE__ */ a(V, { ...Ce });
2172
2213
  }, [
2173
- X,
2214
+ m,
2215
+ L,
2174
2216
  A,
2175
- B,
2176
- H,
2217
+ $,
2177
2218
  c,
2178
- G,
2179
- h,
2180
- u,
2219
+ j,
2181
2220
  p,
2182
- v,
2221
+ g,
2222
+ u,
2223
+ b,
2183
2224
  N,
2184
- ce,
2225
+ Oe,
2185
2226
  t,
2186
2227
  i,
2187
- y,
2188
- f,
2189
- x,
2190
2228
  k,
2229
+ h,
2230
+ x,
2231
+ P,
2232
+ y,
2233
+ C,
2191
2234
  _,
2192
- Y,
2193
2235
  S,
2236
+ v,
2194
2237
  r,
2195
- b,
2238
+ O,
2239
+ M,
2196
2240
  D,
2197
- C,
2198
- V,
2199
- F,
2200
- Z,
2201
- P,
2202
- q,
2203
- de
2241
+ X,
2242
+ E,
2243
+ J,
2244
+ ie,
2245
+ ce
2204
2246
  ]);
2205
- return /* @__PURE__ */ g(
2247
+ return /* @__PURE__ */ f(
2206
2248
  "div",
2207
2249
  {
2208
- ref: Ae,
2250
+ ref: Ee,
2209
2251
  role: "region",
2210
- "aria-label": st,
2211
- id: K,
2252
+ "aria-label": ot,
2253
+ id: se,
2212
2254
  "data-component": "booking",
2213
- "data-component-id": K,
2214
- "data-variant": A,
2215
- className: pa({ variant: A, className: j }),
2216
- ...ge,
2255
+ "data-component-id": se,
2256
+ "data-variant": L,
2257
+ className: ha({ variant: L, className: ne }),
2258
+ ...Ne,
2217
2259
  children: [
2218
- /* @__PURE__ */ g(
2260
+ /* @__PURE__ */ f(
2219
2261
  "div",
2220
2262
  {
2221
2263
  className: [
2222
2264
  "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
2223
- A === "inline-list" ? [
2265
+ L === "inline-list" ? [
2224
2266
  "ds:rounded-[var(--radius-md)]",
2225
2267
  "ds:bg-[color-mix(in_srgb,var(--primary)_35%,var(--background))]",
2226
2268
  "ds:bg-[image:var(--gradient-hero-brand)]",
@@ -2229,22 +2271,22 @@ const _a = [], Aa = [], Ba = Ve(
2229
2271
  ].join(" ") : ""
2230
2272
  ].filter(Boolean).join(" "),
2231
2273
  children: [
2232
- /* @__PURE__ */ a("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: re("booking.regionLabel") }),
2233
- /* @__PURE__ */ a("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: re("booking.headingSubtitle") })
2274
+ /* @__PURE__ */ a("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: Q("booking.regionLabel") }),
2275
+ /* @__PURE__ */ a("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: Q("booking.headingSubtitle") })
2234
2276
  ]
2235
2277
  }
2236
2278
  ),
2237
- nt ?? it
2279
+ rt ?? dt
2238
2280
  ]
2239
2281
  }
2240
2282
  );
2241
2283
  }
2242
2284
  );
2243
- Ba.displayName = "Booking";
2285
+ Pa.displayName = "Booking";
2244
2286
  export {
2245
- Ba as B,
2246
- Me as C,
2247
- ue as O,
2248
- ea as b
2287
+ Pa as B,
2288
+ Te as C,
2289
+ pe as O,
2290
+ sa as b
2249
2291
  };
2250
- //# sourceMappingURL=booking-BYuc_8HV.js.map
2292
+ //# sourceMappingURL=booking-Bw9eOU4k.js.map