@alfadocs/ui-kit 0.33.11 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,44 +1,46 @@
1
- import { jsxs as b, jsx as s, Fragment as W } from "react/jsx-runtime";
2
- import { forwardRef as Qe, useId as et, useState as j, useCallback as q, useRef as ae, useEffect as G, useMemo as C, useImperativeHandle as xt } from "react";
3
- import { c as Me } from "./index-D2ZczOXr.js";
4
- import { useTranslation as B, Trans as St } from "react-i18next";
5
- import { u as Nt } from "./registry-nPAVE19X.js";
6
- import { A as K } from "./alert-ywPR59NE.js";
7
- import { B as se } from "./button-DD_0Xdmr.js";
8
- import { C as Ve } from "./checkbox-DRcOdmXv.js";
9
- import { C as It } from "./checkbox-group-CpUwlHug.js";
10
- import { D as wt } from "./date-picker-B94HAV4A.js";
11
- import { E as Ct } from "./email-input-lQivsFrw.js";
1
+ import { jsxs as f, jsx as s, Fragment as W } from "react/jsx-runtime";
2
+ import { forwardRef as ot, useId as rt, useState as K, useCallback as j, useRef as se, useEffect as H, useMemo as w, useImperativeHandle as Tt } from "react";
3
+ import { c as Pe } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as O, Trans as Pt } from "react-i18next";
5
+ import { u as Ot } from "./registry-nPAVE19X.js";
6
+ import { A as z } from "./alert-ywPR59NE.js";
7
+ import { B as ie } from "./button-DD_0Xdmr.js";
8
+ import { C as Ke } from "./checkbox-DRcOdmXv.js";
9
+ import { C as Bt } from "./checkbox-group-CpUwlHug.js";
10
+ import { D as Et } from "./date-picker-B94HAV4A.js";
11
+ import { E as Vt } from "./email-input-lQivsFrw.js";
12
12
  import { F as Z } from "./form-field-BOm9hK35.js";
13
- import { P as Mt } from "./phone-input-DfZbPPvh.js";
14
- import { T as Dt } from "./text-area-BIx0tZ05.js";
15
- import { T as xe } from "./text-input-BaClJL8Y.js";
16
- import { S as At } from "./spinner-CCByyvcb.js";
17
- import { I as Ye } from "./icon-button-CKEOrN37.js";
18
- import { S as De } from "./select-hsCaJSX3.js";
19
- import { S as Ce } from "./skeleton-CZbwyJAA.js";
20
- import { E as tt } from "./empty-state-BLy7tigq.js";
21
- import { S as _t } from "./stepper-accordion-BfS6lUB9.js";
22
- import { S as Tt } from "./stepper-progress-DDjq5nei.js";
23
- import { p as $, S as Bt } from "./slot-grid-BlHHP9Qy.js";
24
- import { s as ne, i as Je } from "./isSameDay-DUEiAT0G.js";
25
- import { w as at, n as oe, a as Le, m as Ot, f as he, d as Pt, h as we, x as Se } from "./react-day-picker-DsjfS7uI.js";
26
- import { s as Et } from "./subDays-CANHP9hz.js";
27
- import { C as Rt } from "./chevron-left-CX1jqD2M.js";
28
- import { C as Vt } from "./chevron-right-BrpYejk0.js";
13
+ import { P as Lt } from "./phone-input-DfZbPPvh.js";
14
+ import { T as Rt } from "./text-area-BIx0tZ05.js";
15
+ import { T as Ce } from "./text-input-BaClJL8Y.js";
16
+ import { S as Ft } from "./spinner-CCByyvcb.js";
17
+ import { I as tt } from "./icon-button-CKEOrN37.js";
18
+ import { S as Oe } from "./select-hsCaJSX3.js";
19
+ import { C as Ge } from "./combobox-BC-DFx8G.js";
20
+ import { M as Ue } from "./multi-select-DOLO3K_z.js";
21
+ import { S as Te } from "./skeleton-CZbwyJAA.js";
22
+ import { E as dt } from "./empty-state-BLy7tigq.js";
23
+ import { S as $t } from "./stepper-accordion-BfS6lUB9.js";
24
+ import { S as zt } from "./stepper-progress-DDjq5nei.js";
25
+ import { p as F, S as Kt } from "./slot-grid-BlHHP9Qy.js";
26
+ import { s as le, i as at } from "./isSameDay-DUEiAT0G.js";
27
+ import { w as lt, n as ce, a as je, m as jt, f as ye, d as qt, h as _e, x as Me } from "./react-day-picker-DsjfS7uI.js";
28
+ import { s as Ht } from "./subDays-CANHP9hz.js";
29
+ import { C as Gt } from "./chevron-left-CX1jqD2M.js";
30
+ import { C as Ut } from "./chevron-right-BrpYejk0.js";
29
31
  import { c as V } from "./createLucideIcon-CrFbzy84.js";
30
- import { M as Lt, S as Ft } from "./sun-BuXE0xUS.js";
31
- import { S as $t } from "./stethoscope-DT5qCW8Y.js";
32
- import { H as zt } from "./heart-pulse-CvuyFKHB.js";
33
- import { E as Kt } from "./eye-LHlSU38h.js";
34
- import { S as jt } from "./sparkles-CuYXqQLg.js";
32
+ import { M as Yt, S as Jt } from "./sun-BuXE0xUS.js";
33
+ import { S as Zt } from "./stethoscope-DT5qCW8Y.js";
34
+ import { H as Wt } from "./heart-pulse-CvuyFKHB.js";
35
+ import { E as Xt } from "./eye-LHlSU38h.js";
36
+ import { S as Qt } from "./sparkles-CuYXqQLg.js";
35
37
  /**
36
38
  * @license lucide-react v1.8.0 - ISC
37
39
  *
38
40
  * This source code is licensed under the ISC license.
39
41
  * See the LICENSE file in the root directory of this source tree.
40
42
  */
41
- const qt = [
43
+ const ea = [
42
44
  [
43
45
  "path",
44
46
  {
@@ -46,14 +48,14 @@ const qt = [
46
48
  key: "169zse"
47
49
  }
48
50
  ]
49
- ], Ht = V("activity", qt);
51
+ ], ta = V("activity", ea);
50
52
  /**
51
53
  * @license lucide-react v1.8.0 - ISC
52
54
  *
53
55
  * This source code is licensed under the ISC license.
54
56
  * See the LICENSE file in the root directory of this source tree.
55
57
  */
56
- const Gt = [
58
+ const aa = [
57
59
  ["path", { d: "M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5", key: "1u7htd" }],
58
60
  ["path", { d: "M15 12h.01", key: "1k8ypt" }],
59
61
  [
@@ -64,14 +66,14 @@ const Gt = [
64
66
  }
65
67
  ],
66
68
  ["path", { d: "M9 12h.01", key: "157uk2" }]
67
- ], Ut = V("baby", Gt);
69
+ ], sa = V("baby", aa);
68
70
  /**
69
71
  * @license lucide-react v1.8.0 - ISC
70
72
  *
71
73
  * This source code is licensed under the ISC license.
72
74
  * See the LICENSE file in the root directory of this source tree.
73
75
  */
74
- const Yt = [
76
+ const ia = [
75
77
  [
76
78
  "path",
77
79
  {
@@ -79,14 +81,14 @@ const Yt = [
79
81
  key: "w610uw"
80
82
  }
81
83
  ]
82
- ], Jt = V("bone", Yt);
84
+ ], na = V("bone", ia);
83
85
  /**
84
86
  * @license lucide-react v1.8.0 - ISC
85
87
  *
86
88
  * This source code is licensed under the ISC license.
87
89
  * See the LICENSE file in the root directory of this source tree.
88
90
  */
89
- const Zt = [
91
+ const oa = [
90
92
  ["path", { d: "M12 18V5", key: "adv99a" }],
91
93
  ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
92
94
  ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
@@ -95,14 +97,14 @@ const Zt = [
95
97
  ["path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517", key: "1gq6am" }],
96
98
  ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
97
99
  ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
98
- ], Wt = V("brain", Zt);
100
+ ], ra = V("brain", oa);
99
101
  /**
100
102
  * @license lucide-react v1.8.0 - ISC
101
103
  *
102
104
  * This source code is licensed under the ISC license.
103
105
  * See the LICENSE file in the root directory of this source tree.
104
106
  */
105
- const Xt = [
107
+ const da = [
106
108
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
107
109
  ["path", { d: "M16 2v4", key: "4m81vk" }],
108
110
  ["path", { d: "M3 10h18", key: "8toen8" }],
@@ -111,14 +113,14 @@ const Xt = [
111
113
  ["path", { d: "M13 18H7", key: "bb0bb7" }],
112
114
  ["path", { d: "M7 14h.01", key: "1qa3f1" }],
113
115
  ["path", { d: "M17 18h.01", key: "1bdyru" }]
114
- ], Qt = V("calendar-range", Xt);
116
+ ], la = V("calendar-range", da);
115
117
  /**
116
118
  * @license lucide-react v1.8.0 - ISC
117
119
  *
118
120
  * This source code is licensed under the ISC license.
119
121
  * See the LICENSE file in the root directory of this source tree.
120
122
  */
121
- const ea = [
123
+ const ca = [
122
124
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
123
125
  [
124
126
  "path",
@@ -128,89 +130,89 @@ const ea = [
128
130
  }
129
131
  ],
130
132
  ["path", { d: "m9 14 2 2 4-4", key: "df797q" }]
131
- ], ta = V("clipboard-check", ea);
133
+ ], ua = V("clipboard-check", ca);
132
134
  /**
133
135
  * @license lucide-react v1.8.0 - ISC
134
136
  *
135
137
  * This source code is licensed under the ISC license.
136
138
  * See the LICENSE file in the root directory of this source tree.
137
139
  */
138
- const aa = [
140
+ const pa = [
139
141
  ["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" }],
140
142
  ["path", { d: "M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4", key: "1qnva7" }]
141
- ], sa = V("ear", aa);
143
+ ], ma = V("ear", pa);
142
144
  /**
143
145
  * @license lucide-react v1.8.0 - ISC
144
146
  *
145
147
  * This source code is licensed under the ISC license.
146
148
  * See the LICENSE file in the root directory of this source tree.
147
149
  */
148
- const ia = [
150
+ const ga = [
149
151
  ["path", { d: "M6 18h8", key: "1borvv" }],
150
152
  ["path", { d: "M3 22h18", key: "8prr45" }],
151
153
  ["path", { d: "M14 22a7 7 0 1 0 0-14h-1", key: "1jwaiy" }],
152
154
  ["path", { d: "M9 14h2", key: "197e7h" }],
153
155
  ["path", { d: "M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z", key: "1bmzmy" }],
154
156
  ["path", { d: "M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3", key: "1drr47" }]
155
- ], na = V("microscope", ia);
157
+ ], fa = V("microscope", ga);
156
158
  /**
157
159
  * @license lucide-react v1.8.0 - ISC
158
160
  *
159
161
  * This source code is licensed under the ISC license.
160
162
  * See the LICENSE file in the root directory of this source tree.
161
163
  */
162
- const oa = [
164
+ const ha = [
163
165
  [
164
166
  "path",
165
167
  { 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" }
166
168
  ],
167
169
  ["path", { d: "m8.5 8.5 7 7", key: "rvfmvr" }]
168
- ], ra = V("pill", oa);
170
+ ], va = V("pill", ha);
169
171
  /**
170
172
  * @license lucide-react v1.8.0 - ISC
171
173
  *
172
174
  * This source code is licensed under the ISC license.
173
175
  * See the LICENSE file in the root directory of this source tree.
174
176
  */
175
- const da = [
177
+ const ba = [
176
178
  ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
177
179
  ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
178
180
  ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
179
181
  ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
180
182
  ["path", { d: "M7 12h10", key: "b7w52i" }]
181
- ], la = V("scan-line", da);
183
+ ], ya = V("scan-line", ba);
182
184
  /**
183
185
  * @license lucide-react v1.8.0 - ISC
184
186
  *
185
187
  * This source code is licensed under the ISC license.
186
188
  * See the LICENSE file in the root directory of this source tree.
187
189
  */
188
- const ca = [
190
+ const ka = [
189
191
  ["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
190
192
  ["path", { d: "M8.12 8.12 12 12", key: "1alkpv" }],
191
193
  ["path", { d: "M20 4 8.12 15.88", key: "xgtan2" }],
192
194
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
193
195
  ["path", { d: "M14.8 14.8 20 20", key: "ptml3r" }]
194
- ], ua = V("scissors", ca);
196
+ ], xa = V("scissors", ka);
195
197
  /**
196
198
  * @license lucide-react v1.8.0 - ISC
197
199
  *
198
200
  * This source code is licensed under the ISC license.
199
201
  * See the LICENSE file in the root directory of this source tree.
200
202
  */
201
- const ma = [
203
+ const Sa = [
202
204
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
203
205
  ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
204
206
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
205
207
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
206
- ], pa = V("smile", ma);
208
+ ], Ia = V("smile", Sa);
207
209
  /**
208
210
  * @license lucide-react v1.8.0 - ISC
209
211
  *
210
212
  * This source code is licensed under the ISC license.
211
213
  * See the LICENSE file in the root directory of this source tree.
212
214
  */
213
- const ga = [
215
+ const Na = [
214
216
  ["path", { d: "M12 10V2", key: "16sf7g" }],
215
217
  ["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }],
216
218
  ["path", { d: "M2 18h2", key: "j10viu" }],
@@ -219,25 +221,25 @@ const ga = [
219
221
  ["path", { d: "M22 22H2", key: "19qnx5" }],
220
222
  ["path", { d: "m16 6-4 4-4-4", key: "6wukr" }],
221
223
  ["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]
222
- ], fa = V("sunset", ga);
224
+ ], wa = V("sunset", Na);
223
225
  /**
224
226
  * @license lucide-react v1.8.0 - ISC
225
227
  *
226
228
  * This source code is licensed under the ISC license.
227
229
  * See the LICENSE file in the root directory of this source tree.
228
230
  */
229
- const ha = [
231
+ const Ca = [
230
232
  ["path", { d: "m18 2 4 4", key: "22kx64" }],
231
233
  ["path", { d: "m17 7 3-3", key: "1w1zoj" }],
232
234
  ["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" }],
233
235
  ["path", { d: "m9 11 4 4", key: "rovt3i" }],
234
236
  ["path", { d: "m5 19-3 3", key: "59f2uf" }],
235
237
  ["path", { d: "m14 4 6 6", key: "yqp9t2" }]
236
- ], Ze = V("syringe", ha);
237
- function va(e, t, a) {
238
- return at(e, -1, a);
238
+ ], st = V("syringe", Ca);
239
+ function Ma(e, t, a) {
240
+ return lt(e, -1, a);
239
241
  }
240
- const ba = {
242
+ const Da = {
241
243
  id: "booking",
242
244
  capabilities: ["navigate", "view_change"],
243
245
  state: {
@@ -279,12 +281,12 @@ const ba = {
279
281
  description: "Sourced from the id prop."
280
282
  }
281
283
  }
282
- }, Fe = [
284
+ }, qe = [
283
285
  "email",
284
286
  "whatsapp",
285
287
  "sms"
286
- ], ve = "all", ya = "de";
287
- function ka(e) {
288
+ ], X = "all", Aa = "de";
289
+ function _a(e) {
288
290
  return [...e.lockedOperatorId ? e.specialties.filter(
289
291
  (a) => {
290
292
  var i;
@@ -295,58 +297,67 @@ function ka(e) {
295
297
  return n - o;
296
298
  });
297
299
  }
298
- function xa(e) {
300
+ function Ta(e) {
299
301
  let t = e.services;
300
- return e.lockedOperatorId && (t = t.filter(
302
+ if (e.lockedOperatorId && (t = t.filter(
301
303
  (i) => {
302
304
  var n;
303
305
  return (n = i.operatorIds) == null ? void 0 : n.includes(e.lockedOperatorId);
304
306
  }
305
- )), (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && e.value.specialtyId && (t = t.filter((i) => i.specialtyId === e.value.specialtyId)), t;
307
+ )), e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) {
308
+ const i = ue(e.value);
309
+ i.length > 0 && (t = t.filter(
310
+ (n) => n.specialtyId !== void 0 && i.includes(n.specialtyId)
311
+ ));
312
+ }
313
+ return t;
306
314
  }
307
- function Sa(e) {
315
+ function Pa(e) {
308
316
  const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties;
309
- if (t && e.value.specialtyId) {
310
- const a = e.value.specialtyId;
311
- return e.operators.filter(
312
- (i) => {
313
- var n;
314
- return (n = i.specialtyIds) == null ? void 0 : n.includes(a);
315
- }
316
- );
317
+ if (t) {
318
+ const a = ue(e.value);
319
+ if (a.length > 0)
320
+ return e.operators.filter(
321
+ (i) => {
322
+ var n;
323
+ return (n = i.specialtyIds) == null ? void 0 : n.some((o) => a.includes(o));
324
+ }
325
+ );
317
326
  }
318
- if (!t && e.value.serviceId) {
319
- const a = e.value.serviceId;
320
- return e.operators.filter(
321
- (i) => {
322
- var n;
323
- return (n = i.appointmentBookingReasonIds) == null ? void 0 : n.includes(a);
324
- }
325
- );
327
+ if (!t) {
328
+ const a = Be(e.value);
329
+ if (a.length > 0)
330
+ return e.operators.filter(
331
+ (i) => {
332
+ var n;
333
+ return (n = i.appointmentBookingReasonIds) == null ? void 0 : n.some((o) => a.includes(o));
334
+ }
335
+ );
326
336
  }
327
337
  return [];
328
338
  }
329
- function Na(e, t) {
330
- const a = e.country === ya, i = !a || e.value.insuranceType !== void 0, o = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && i, p = !o || e.value.specialtyId !== void 0, c = !p || e.value.serviceId !== void 0, l = t.operators, d = !!e.allowOperatorSelection && c && e.value.serviceId !== void 0 && !e.lockedOperatorId && l.length > 1, m = c && e.value.serviceId !== void 0, S = (!m || e.value.date !== void 0) && e.value.date !== void 0, w = (!S || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, N = !!e.value.serviceId && l.length === 0;
339
+ function Oa(e, t) {
340
+ const a = e.country === Aa, i = !a || e.value.insuranceType !== void 0, o = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && i, l = ue(e.value).length > 0, p = !o || l, r = Be(e.value).length > 0, c = !p || r, m = t.operators, k = !!e.allowOperatorSelection && c && r && !e.lockedOperatorId && m.length > 1, I = c && r, N = (!I || e.value.date !== void 0) && e.value.date !== void 0, D = (!N || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, y = r && m.length === 0;
331
341
  return {
332
342
  insurance: a,
333
343
  specialty: o,
334
344
  service: p,
335
- operator: d,
336
- date: m,
337
- slot: S,
338
- details: w,
339
- onboardingIncomplete: N
345
+ operator: k,
346
+ date: I,
347
+ slot: N,
348
+ details: D,
349
+ onboardingIncomplete: y
340
350
  };
341
351
  }
342
- function Ia(e, t) {
352
+ function Ba(e, t) {
343
353
  const a = [];
344
354
  t.insurance && a.push(1), t.specialty && a.push(2), a.push(3), t.operator && a.push(4), a.push(5), a.push(6), a.push(7);
345
355
  const i = {
346
356
  1: e.value.insuranceType !== void 0,
347
- 2: e.value.specialtyId !== void 0,
348
- 3: e.value.serviceId !== void 0,
349
- 4: e.value.operatorId !== void 0,
357
+ // 0.34.0: array-or-single satisfied when EITHER form is present.
358
+ 2: ue(e.value).length > 0,
359
+ 3: Be(e.value).length > 0,
360
+ 4: e.value.operatorId !== void 0 || e.value.operatorIds !== void 0 && e.value.operatorIds.length > 0,
350
361
  5: e.value.date !== void 0,
351
362
  6: e.value.slotKey !== void 0,
352
363
  7: !1
@@ -357,30 +368,30 @@ function Ia(e, t) {
357
368
  visibleSteps: a
358
369
  };
359
370
  }
360
- function wa(e) {
371
+ function Ea(e) {
361
372
  const t = {
362
- specialties: ka(e),
363
- services: xa(e),
364
- operators: Sa(e)
365
- }, a = Na(e, t), { currentStep: i, visibleSteps: n } = Ia(e, a);
373
+ specialties: _a(e),
374
+ services: Ta(e),
375
+ operators: Pa(e)
376
+ }, a = Oa(e, t), { currentStep: i, visibleSteps: n } = Ba(e, a);
366
377
  let o;
367
378
  if (e.value.date && e.value.slotKey) {
368
379
  const c = e.availableSlots[e.value.date];
369
- c && (o = c.find((l) => l.key === e.value.slotKey));
380
+ c && (o = c.find((m) => m.key === e.value.slotKey));
370
381
  }
371
- const u = e.value.serviceId ? e.services.find((c) => c.id === e.value.serviceId) : void 0, p = e.value.serviceId !== void 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!a.insurance || e.value.insuranceType !== void 0) && (!a.specialty || e.value.specialtyId !== void 0);
382
+ const l = Be(e.value), u = l.length > 0 ? e.services.find((c) => c.id === l[0]) : void 0, p = ue(e.value).length > 0, r = l.length > 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!a.insurance || e.value.insuranceType !== void 0) && (!a.specialty || p);
372
383
  return {
373
384
  gates: a,
374
385
  filtered: t,
375
386
  currentStep: i,
376
387
  totalSteps: n.length,
377
388
  visibleSteps: n,
378
- isReadyToSubmit: p,
389
+ isReadyToSubmit: r,
379
390
  durationMin: u == null ? void 0 : u.durationMin,
380
391
  selectedSlot: o
381
392
  };
382
393
  }
383
- function st(e, t) {
394
+ function ct(e, t) {
384
395
  return {
385
396
  ...e,
386
397
  insuranceType: t,
@@ -392,40 +403,89 @@ function st(e, t) {
392
403
  details: void 0
393
404
  };
394
405
  }
395
- function it(e, t) {
406
+ function ut(e, t) {
396
407
  return {
397
408
  ...e,
398
409
  specialtyId: t,
410
+ specialtyIds: void 0,
411
+ serviceId: void 0,
412
+ serviceIds: void 0,
413
+ operatorId: void 0,
414
+ operatorIds: void 0,
415
+ date: void 0,
416
+ slotKey: void 0,
417
+ details: void 0
418
+ };
419
+ }
420
+ function pt(e, t) {
421
+ return {
422
+ ...e,
423
+ specialtyId: void 0,
424
+ specialtyIds: t,
399
425
  serviceId: void 0,
426
+ serviceIds: void 0,
400
427
  operatorId: void 0,
428
+ operatorIds: void 0,
401
429
  date: void 0,
402
430
  slotKey: void 0,
403
431
  details: void 0
404
432
  };
405
433
  }
406
- function nt(e, t) {
434
+ function mt(e, t) {
407
435
  return {
408
436
  ...e,
409
437
  serviceId: t,
438
+ serviceIds: void 0,
410
439
  // Default the operator to the "All operators" sentinel so a patient
411
440
  // who doesn't care about picking lands on a satisfied step 4 without
412
441
  // any further input.
413
- operatorId: t ? ve : void 0,
442
+ operatorId: t ? X : void 0,
443
+ operatorIds: void 0,
444
+ date: void 0,
445
+ slotKey: void 0,
446
+ details: void 0
447
+ };
448
+ }
449
+ function gt(e, t) {
450
+ const a = !!t && t.length > 0;
451
+ return {
452
+ ...e,
453
+ serviceId: void 0,
454
+ serviceIds: t,
455
+ operatorId: a ? X : void 0,
456
+ operatorIds: void 0,
414
457
  date: void 0,
415
458
  slotKey: void 0,
416
459
  details: void 0
417
460
  };
418
461
  }
419
- function ot(e, t) {
462
+ function ft(e, t) {
420
463
  return {
421
464
  ...e,
422
465
  operatorId: t,
466
+ operatorIds: void 0,
423
467
  date: void 0,
424
468
  slotKey: void 0,
425
469
  details: void 0
426
470
  };
427
471
  }
428
- function Ae(e, t) {
472
+ function ht(e, t) {
473
+ return {
474
+ ...e,
475
+ operatorId: void 0,
476
+ operatorIds: t,
477
+ date: void 0,
478
+ slotKey: void 0,
479
+ details: void 0
480
+ };
481
+ }
482
+ function ue(e) {
483
+ return e.specialtyIds && e.specialtyIds.length > 0 ? e.specialtyIds : e.specialtyId ? [e.specialtyId] : [];
484
+ }
485
+ function Be(e) {
486
+ return e.serviceIds && e.serviceIds.length > 0 ? e.serviceIds : e.serviceId ? [e.serviceId] : [];
487
+ }
488
+ function Ee(e, t) {
429
489
  return {
430
490
  ...e,
431
491
  date: t,
@@ -434,47 +494,49 @@ function Ae(e, t) {
434
494
  // since the user has already filled some fields.
435
495
  };
436
496
  }
437
- function rt(e, t) {
497
+ function vt(e, t) {
438
498
  return {
439
499
  ...e,
440
500
  slotKey: t
441
501
  };
442
502
  }
443
- function Ca(e, t) {
503
+ function Va(e, t) {
444
504
  let a = e;
445
- if (t.lockedOperatorId && a.operatorId !== t.lockedOperatorId && (a = { ...a, operatorId: t.lockedOperatorId }), (t.useSpecialties === void 0 ? t.specialties.length > 0 : t.useSpecialties) && t.specialties.length === 1 && a.specialtyId === void 0 && (a = { ...a, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
446
- const n = a.specialtyId ? t.services.filter((o) => o.specialtyId === a.specialtyId) : t.services;
447
- n.length === 1 && a.serviceId === void 0 && (a = { ...a, serviceId: n[0].id }, a.operatorId === void 0 && (a = { ...a, operatorId: ve }));
505
+ if (t.lockedOperatorId && a.operatorId !== t.lockedOperatorId && (a = { ...a, operatorId: t.lockedOperatorId }), (t.useSpecialties === void 0 ? t.specialties.length > 0 : t.useSpecialties) && t.specialties.length === 1 && a.specialtyId === void 0 && a.specialtyIds === void 0 && (a = { ...a, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
506
+ const n = ue(a), o = n.length > 0 ? t.services.filter(
507
+ (l) => l.specialtyId && n.includes(l.specialtyId)
508
+ ) : t.services;
509
+ o.length === 1 && a.serviceId === void 0 && a.serviceIds === void 0 && (a = { ...a, serviceId: o[0].id }, a.operatorId === void 0 && a.operatorIds === void 0 && (a = { ...a, operatorId: X }));
448
510
  }
449
511
  return a;
450
512
  }
451
- function $e(e) {
452
- if (e.operatorId && e.operatorId !== ve)
513
+ function He(e) {
514
+ if (e.operatorId && e.operatorId !== X)
453
515
  return e.operatorId;
454
516
  }
455
- function Ma(e) {
517
+ function La(e) {
456
518
  if (!e) return !1;
457
519
  const t = e.trim();
458
520
  return /^\+?\d[\d\s\-()]{6,}$/.test(t);
459
521
  }
460
- function dt(e) {
522
+ function bt(e) {
461
523
  const t = e && e.length > 0 ? e : ["email"], a = new Set(t);
462
- return Fe.filter((i) => a.has(i));
524
+ return qe.filter((i) => a.has(i));
463
525
  }
464
- function Da(e, t, a) {
465
- const i = dt(e), n = new Set(i);
526
+ function Ra(e, t, a) {
527
+ const i = bt(e), n = new Set(i);
466
528
  if (a)
467
- return Fe.filter(
468
- (l) => a.includes(l) && n.has(l)
529
+ return qe.filter(
530
+ (r) => a.includes(r) && n.has(r)
469
531
  );
470
532
  const o = [];
471
533
  n.has("email") && o.push("email");
472
- const u = Ma(t), p = n.has("whatsapp");
473
- p && u && o.push("whatsapp"), !p && n.has("sms") && o.push("sms");
474
- const c = new Set(o);
475
- return Fe.filter((l) => c.has(l));
534
+ const l = La(t), u = n.has("whatsapp");
535
+ u && l && o.push("whatsapp"), !u && n.has("sms") && o.push("sms");
536
+ const p = new Set(o);
537
+ return qe.filter((r) => p.has(r));
476
538
  }
477
- const We = 500, Aa = /^[A-Z0-9]{16}$/, _a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xe = 300, Ne = { state: "idle" }, ze = Qe(
539
+ const it = 500, Fa = /^[A-Z0-9]{16}$/, $a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, nt = 300, De = { state: "idle" }, Ye = ot(
478
540
  ({
479
541
  value: e,
480
542
  onChange: t,
@@ -482,133 +544,133 @@ const We = 500, Aa = /^[A-Z0-9]{16}$/, _a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xe = 3
482
544
  requireCodiceFiscale: i = !1,
483
545
  requireDateOfBirth: n = !1,
484
546
  requireInsuranceNumber: o = !1,
485
- insuranceType: u,
486
- showNote: p = !1,
487
- showReturningPatientFlag: c = !1,
488
- privacyPolicyUrl: l,
489
- termsUrl: d,
547
+ insuranceType: l,
548
+ showNote: u = !1,
549
+ showReturningPatientFlag: p = !1,
550
+ privacyPolicyUrl: r,
551
+ termsUrl: c,
490
552
  validateCodiceFiscale: m,
491
- validateInsuranceNumber: y,
492
- submitting: S = !1,
493
- summarySlot: h,
494
- defaultPhoneCountry: w,
495
- confirmationChannels: N,
496
- defaultConfirmationChannels: I,
497
- submitError: k
498
- }, v) => {
499
- var L, ee;
500
- const { t: r } = B(), O = et(), [A, f] = j(Ne), [x, _] = j(Ne), [D, U] = j({}), E = q(
501
- (g) => U((M) => ({ ...M, [g]: !0 })),
553
+ validateInsuranceNumber: k,
554
+ submitting: I = !1,
555
+ summarySlot: v,
556
+ defaultPhoneCountry: N,
557
+ confirmationChannels: M,
558
+ defaultConfirmationChannels: D,
559
+ submitError: y
560
+ }, b) => {
561
+ var we, re;
562
+ const { t: d } = O(), _ = rt(), [x, g] = K(De), [S, T] = K(De), [A, G] = K({}), B = j(
563
+ (h) => G((C) => ({ ...C, [h]: !0 })),
502
564
  []
503
- ), R = ae(null), Y = ae(
565
+ ), E = se(null), U = se(
504
566
  null
505
567
  );
506
- G(
568
+ H(
507
569
  () => () => {
508
- R.current && clearTimeout(R.current), Y.current && clearTimeout(Y.current);
570
+ E.current && clearTimeout(E.current), U.current && clearTimeout(U.current);
509
571
  },
510
572
  []
511
573
  );
512
- const T = q(
513
- (g) => t({ ...e, ...g }),
574
+ const P = j(
575
+ (h) => t({ ...e, ...h }),
514
576
  [e, t]
515
- ), X = C(
516
- () => dt(N),
517
- [N]
518
- ), H = X.length >= 2, re = ae(!1);
519
- G(() => {
520
- if (!H) {
521
- e.confirmationChannels !== void 0 && T({ confirmationChannels: void 0 });
577
+ ), Q = w(
578
+ () => bt(M),
579
+ [M]
580
+ ), q = Q.length >= 2, pe = se(!1);
581
+ H(() => {
582
+ if (!q) {
583
+ e.confirmationChannels !== void 0 && P({ confirmationChannels: void 0 });
522
584
  return;
523
585
  }
524
586
  if (e.confirmationChannels !== void 0) {
525
- re.current = !0;
587
+ pe.current = !0;
526
588
  return;
527
589
  }
528
- const g = Da(
529
- X,
590
+ const h = Ra(
591
+ Q,
530
592
  e.mobilePhone,
531
- I
593
+ D
532
594
  );
533
- re.current = !0, T({ confirmationChannels: g });
595
+ pe.current = !0, P({ confirmationChannels: h });
534
596
  }, [
535
- H,
536
- X,
597
+ q,
598
+ Q,
537
599
  e.mobilePhone,
538
- I
600
+ D
539
601
  ]);
540
- const Q = C(
602
+ const ee = w(
541
603
  () => e.confirmationChannels ?? [],
542
604
  [e.confirmationChannels]
543
- ), _e = H && Q.length === 0;
544
- G(() => {
545
- const g = e.codiceFiscale;
546
- if (!i || !m || !g) {
547
- f(Ne);
605
+ ), xe = q && ee.length === 0;
606
+ H(() => {
607
+ const h = e.codiceFiscale;
608
+ if (!i || !m || !h) {
609
+ g(De);
548
610
  return;
549
611
  }
550
- if (!Aa.test(g)) {
551
- f({
612
+ if (!Fa.test(h)) {
613
+ g({
552
614
  state: "invalid",
553
- hint: r("booking.details.codiceFiscale.invalidFormat")
615
+ hint: d("booking.details.codiceFiscale.invalidFormat")
554
616
  });
555
617
  return;
556
618
  }
557
- f({ state: "pending" }), R.current && clearTimeout(R.current), R.current = setTimeout(() => {
558
- m(g).then(
559
- (M) => f(
560
- M.valid ? { state: "valid" } : { state: "invalid", hint: M.hint }
619
+ g({ state: "pending" }), E.current && clearTimeout(E.current), E.current = setTimeout(() => {
620
+ m(h).then(
621
+ (C) => g(
622
+ C.valid ? { state: "valid" } : { state: "invalid", hint: C.hint }
561
623
  )
562
624
  ).catch(
563
- () => f({
625
+ () => g({
564
626
  state: "invalid",
565
- hint: r("booking.details.codiceFiscale.unavailable")
627
+ hint: d("booking.details.codiceFiscale.unavailable")
566
628
  })
567
629
  );
568
- }, Xe);
569
- }, [i, m, e.codiceFiscale, r]);
570
- const J = o && u === "public";
571
- G(() => {
572
- const g = e.insuranceNumber;
573
- if (!J || !y || !g) {
574
- _(Ne);
630
+ }, nt);
631
+ }, [i, m, e.codiceFiscale, d]);
632
+ const Y = o && l === "public";
633
+ H(() => {
634
+ const h = e.insuranceNumber;
635
+ if (!Y || !k || !h) {
636
+ T(De);
575
637
  return;
576
638
  }
577
- _({ state: "pending" }), Y.current && clearTimeout(Y.current), Y.current = setTimeout(() => {
578
- y(g).then(
579
- (M) => _(
580
- M.valid ? { state: "valid" } : { state: "invalid", hint: M.hint }
639
+ T({ state: "pending" }), U.current && clearTimeout(U.current), U.current = setTimeout(() => {
640
+ k(h).then(
641
+ (C) => T(
642
+ C.valid ? { state: "valid" } : { state: "invalid", hint: C.hint }
581
643
  )
582
644
  ).catch(
583
- () => _({
645
+ () => T({
584
646
  state: "invalid",
585
- hint: r("booking.details.insuranceNumber.unavailable")
647
+ hint: d("booking.details.insuranceNumber.unavailable")
586
648
  })
587
649
  );
588
- }, Xe);
589
- }, [J, y, e.insuranceNumber, r]);
590
- const ie = C(
591
- () => !!(e.email && _a.test(e.email)),
650
+ }, nt);
651
+ }, [Y, k, e.insuranceNumber, d]);
652
+ const ne = w(
653
+ () => !!(e.email && $a.test(e.email)),
592
654
  [e.email]
593
- ), de = C(
655
+ ), me = w(
594
656
  () => !!(e.mobilePhone && e.mobilePhone.length >= 6),
595
657
  [e.mobilePhone]
596
- ), le = C(() => {
597
- var g, M;
598
- return !(!((g = e.firstName) != null && g.trim()) || !((M = e.lastName) != null && M.trim()) || !ie || !de || i && A.state !== "valid" || n && !e.dateOfBirth || J && x.state !== "valid");
658
+ ), Se = w(() => {
659
+ var h, C;
660
+ return !(!((h = e.firstName) != null && h.trim()) || !((C = e.lastName) != null && C.trim()) || !ne || !me || i && x.state !== "valid" || n && !e.dateOfBirth || Y && S.state !== "valid");
599
661
  }, [
600
662
  e.firstName,
601
663
  e.lastName,
602
- ie,
603
- de,
664
+ ne,
665
+ me,
604
666
  i,
605
- A.state,
667
+ x.state,
606
668
  n,
607
669
  e.dateOfBirth,
608
- J,
609
- x.state
610
- ]), Te = !!(e.privacyConsent && e.termsConsent), Be = !H || Q.length > 0, ye = le && Te && Be && !S, ce = (g) => {
611
- if (g.preventDefault(), U({
670
+ Y,
671
+ S.state
672
+ ]), Ie = !!(e.privacyConsent && e.termsConsent), Ve = !q || ee.length > 0, oe = Se && Ie && Ve && !I, Le = (h) => {
673
+ if (h.preventDefault(), G({
612
674
  firstName: !0,
613
675
  lastName: !0,
614
676
  email: !0,
@@ -616,8 +678,8 @@ const We = 500, Aa = /^[A-Z0-9]{16}$/, _a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xe = 3
616
678
  codiceFiscale: !0,
617
679
  dateOfBirth: !0,
618
680
  insuranceNumber: !0
619
- }), !ye) return;
620
- const M = {
681
+ }), !oe) return;
682
+ const C = {
621
683
  firstName: e.firstName.trim(),
622
684
  lastName: e.lastName.trim(),
623
685
  email: e.email.trim(),
@@ -632,15 +694,15 @@ const We = 500, Aa = /^[A-Z0-9]{16}$/, _a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xe = 3
632
694
  // Only include when the picker was visible; otherwise the single
633
695
  // implicit channel is inferred backend-side from the practice
634
696
  // config.
635
- confirmationChannels: H ? Q : void 0
697
+ confirmationChannels: q ? ee : void 0
636
698
  };
637
- a(M);
638
- }, ke = (g, M) => {
639
- const P = M && /^https?:\/\//i.test(M) ? M : void 0;
640
- return P ? /* @__PURE__ */ s(
641
- St,
699
+ a(C);
700
+ }, Ne = (h, C) => {
701
+ const te = C && /^https?:\/\//i.test(C) ? C : void 0;
702
+ return te ? /* @__PURE__ */ s(
703
+ Pt,
642
704
  {
643
- i18nKey: g,
705
+ i18nKey: h,
644
706
  components: {
645
707
  // The `<Trans>` runtime injects link text from the i18n
646
708
  // string. The anchor renders empty at static-analysis time,
@@ -652,7 +714,7 @@ const We = 500, Aa = /^[A-Z0-9]{16}$/, _a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xe = 3
652
714
  /* @__PURE__ */ s(
653
715
  "a",
654
716
  {
655
- href: P,
717
+ href: te,
656
718
  target: "_blank",
657
719
  rel: "noopener noreferrer",
658
720
  className: "ds:underline ds:text-[var(--primary)]"
@@ -661,32 +723,32 @@ const We = 500, Aa = /^[A-Z0-9]{16}$/, _a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xe = 3
661
723
  )
662
724
  }
663
725
  }
664
- ) : r(g);
726
+ ) : d(h);
665
727
  };
666
- return /* @__PURE__ */ b(
728
+ return /* @__PURE__ */ f(
667
729
  "form",
668
730
  {
669
- ref: v,
670
- id: O,
731
+ ref: b,
732
+ id: _,
671
733
  noValidate: !0,
672
- onSubmit: ce,
734
+ onSubmit: Le,
673
735
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
674
736
  children: [
675
- h,
676
- /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
737
+ v,
738
+ /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
677
739
  /* @__PURE__ */ s(
678
740
  Z,
679
741
  {
680
- label: r("booking.details.firstName.label"),
742
+ label: d("booking.details.firstName.label"),
681
743
  required: !0,
682
- error: D.firstName && !((L = e.firstName) != null && L.trim()) ? r("booking.details.firstName.required") : void 0,
744
+ error: A.firstName && !((we = e.firstName) != null && we.trim()) ? d("booking.details.firstName.required") : void 0,
683
745
  children: /* @__PURE__ */ s(
684
- xe,
746
+ Ce,
685
747
  {
686
748
  autoComplete: "given-name",
687
749
  value: e.firstName ?? "",
688
- onChange: (g) => T({ firstName: g.target.value }),
689
- onBlur: () => E("firstName")
750
+ onChange: (h) => P({ firstName: h.target.value }),
751
+ onBlur: () => B("firstName")
690
752
  }
691
753
  )
692
754
  }
@@ -694,34 +756,34 @@ const We = 500, Aa = /^[A-Z0-9]{16}$/, _a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xe = 3
694
756
  /* @__PURE__ */ s(
695
757
  Z,
696
758
  {
697
- label: r("booking.details.lastName.label"),
759
+ label: d("booking.details.lastName.label"),
698
760
  required: !0,
699
- error: D.lastName && !((ee = e.lastName) != null && ee.trim()) ? r("booking.details.lastName.required") : void 0,
761
+ error: A.lastName && !((re = e.lastName) != null && re.trim()) ? d("booking.details.lastName.required") : void 0,
700
762
  children: /* @__PURE__ */ s(
701
- xe,
763
+ Ce,
702
764
  {
703
765
  autoComplete: "family-name",
704
766
  value: e.lastName ?? "",
705
- onChange: (g) => T({ lastName: g.target.value }),
706
- onBlur: () => E("lastName")
767
+ onChange: (h) => P({ lastName: h.target.value }),
768
+ onBlur: () => B("lastName")
707
769
  }
708
770
  )
709
771
  }
710
772
  )
711
773
  ] }),
712
- /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
774
+ /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
713
775
  /* @__PURE__ */ s(
714
776
  Z,
715
777
  {
716
- label: r("booking.details.email.label"),
778
+ label: d("booking.details.email.label"),
717
779
  required: !0,
718
- error: D.email && !ie ? r("booking.details.email.invalid") : void 0,
780
+ error: A.email && !ne ? d("booking.details.email.invalid") : void 0,
719
781
  children: /* @__PURE__ */ s(
720
- Ct,
782
+ Vt,
721
783
  {
722
784
  value: e.email ?? "",
723
- onChange: (g) => T({ email: g.target.value }),
724
- onBlur: () => E("email")
785
+ onChange: (h) => P({ email: h.target.value }),
786
+ onBlur: () => B("email")
725
787
  }
726
788
  )
727
789
  }
@@ -729,39 +791,39 @@ const We = 500, Aa = /^[A-Z0-9]{16}$/, _a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xe = 3
729
791
  /* @__PURE__ */ s(
730
792
  Z,
731
793
  {
732
- label: r("booking.details.mobilePhone.label"),
794
+ label: d("booking.details.mobilePhone.label"),
733
795
  required: !0,
734
- error: D.mobilePhone && !de ? r("booking.details.mobilePhone.invalid") : void 0,
796
+ error: A.mobilePhone && !me ? d("booking.details.mobilePhone.invalid") : void 0,
735
797
  children: /* @__PURE__ */ s(
736
- Mt,
798
+ Lt,
737
799
  {
738
800
  value: e.mobilePhone ?? "",
739
- defaultCountry: w == null ? void 0 : w.toUpperCase(),
740
- onChange: (g) => {
741
- T({ mobilePhone: g }), E("mobilePhone");
801
+ defaultCountry: N == null ? void 0 : N.toUpperCase(),
802
+ onChange: (h) => {
803
+ P({ mobilePhone: h }), B("mobilePhone");
742
804
  }
743
805
  }
744
806
  )
745
807
  }
746
808
  )
747
809
  ] }),
748
- i || n ? /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
810
+ i || n ? /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
749
811
  i ? /* @__PURE__ */ s(
750
812
  Z,
751
813
  {
752
- label: r("booking.details.codiceFiscale.label"),
814
+ label: d("booking.details.codiceFiscale.label"),
753
815
  required: !0,
754
- description: A.state === "pending" ? r("booking.details.codiceFiscale.checking") : r("booking.details.codiceFiscale.helper"),
755
- error: D.codiceFiscale && A.state === "invalid" ? A.hint ?? r("booking.details.codiceFiscale.invalid") : void 0,
816
+ description: x.state === "pending" ? d("booking.details.codiceFiscale.checking") : d("booking.details.codiceFiscale.helper"),
817
+ error: A.codiceFiscale && x.state === "invalid" ? x.hint ?? d("booking.details.codiceFiscale.invalid") : void 0,
756
818
  children: /* @__PURE__ */ s(
757
- xe,
819
+ Ce,
758
820
  {
759
821
  value: e.codiceFiscale ?? "",
760
822
  maxLength: 16,
761
- onChange: (g) => T({
762
- codiceFiscale: g.target.value.slice(0, 16).toUpperCase()
823
+ onChange: (h) => P({
824
+ codiceFiscale: h.target.value.slice(0, 16).toUpperCase()
763
825
  }),
764
- onBlur: () => E("codiceFiscale")
826
+ onBlur: () => B("codiceFiscale")
765
827
  }
766
828
  )
767
829
  }
@@ -769,76 +831,76 @@ const We = 500, Aa = /^[A-Z0-9]{16}$/, _a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xe = 3
769
831
  n ? /* @__PURE__ */ s(
770
832
  Z,
771
833
  {
772
- label: r("booking.details.dateOfBirth.label"),
834
+ label: d("booking.details.dateOfBirth.label"),
773
835
  required: !0,
774
- error: D.dateOfBirth && !e.dateOfBirth ? r("booking.details.dateOfBirth.required") : void 0,
836
+ error: A.dateOfBirth && !e.dateOfBirth ? d("booking.details.dateOfBirth.required") : void 0,
775
837
  children: /* @__PURE__ */ s(
776
- wt,
838
+ Et,
777
839
  {
778
840
  value: e.dateOfBirth ? new Date(e.dateOfBirth) : void 0,
779
- onChange: (g) => {
780
- T({
781
- dateOfBirth: g ? g.toISOString().slice(0, 10) : void 0
782
- }), E("dateOfBirth");
841
+ onChange: (h) => {
842
+ P({
843
+ dateOfBirth: h ? h.toISOString().slice(0, 10) : void 0
844
+ }), B("dateOfBirth");
783
845
  }
784
846
  }
785
847
  )
786
848
  }
787
849
  ) : null
788
850
  ] }) : null,
789
- J ? /* @__PURE__ */ s(
851
+ Y ? /* @__PURE__ */ s(
790
852
  Z,
791
853
  {
792
- label: r("booking.details.insuranceNumber.label"),
854
+ label: d("booking.details.insuranceNumber.label"),
793
855
  required: !0,
794
- description: x.state === "pending" ? r("booking.details.insuranceNumber.checking") : void 0,
795
- error: D.insuranceNumber && x.state === "invalid" ? x.hint ?? r("booking.details.insuranceNumber.invalid") : void 0,
856
+ description: S.state === "pending" ? d("booking.details.insuranceNumber.checking") : void 0,
857
+ error: A.insuranceNumber && S.state === "invalid" ? S.hint ?? d("booking.details.insuranceNumber.invalid") : void 0,
796
858
  children: /* @__PURE__ */ s(
797
- xe,
859
+ Ce,
798
860
  {
799
861
  value: e.insuranceNumber ?? "",
800
- onChange: (g) => T({ insuranceNumber: g.target.value }),
801
- onBlur: () => E("insuranceNumber")
862
+ onChange: (h) => P({ insuranceNumber: h.target.value }),
863
+ onBlur: () => B("insuranceNumber")
802
864
  }
803
865
  )
804
866
  }
805
867
  ) : null,
806
- p ? /* @__PURE__ */ s(
868
+ u ? /* @__PURE__ */ s(
807
869
  Z,
808
870
  {
809
- label: r("booking.details.note.label"),
810
- description: r("booking.details.note.helper", {
811
- max: We
871
+ label: d("booking.details.note.label"),
872
+ description: d("booking.details.note.helper", {
873
+ max: it
812
874
  }),
813
875
  children: /* @__PURE__ */ s(
814
- Dt,
876
+ Rt,
815
877
  {
816
878
  value: e.note ?? "",
817
- maxLength: We,
879
+ maxLength: it,
818
880
  rows: 3,
819
- onChange: (g) => T({ note: g.target.value })
881
+ onChange: (h) => P({ note: h.target.value })
820
882
  }
821
883
  )
822
884
  }
823
885
  ) : null,
824
- c ? /* @__PURE__ */ s(
825
- Ve,
886
+ p ? /* @__PURE__ */ s(
887
+ Ke,
826
888
  {
827
889
  checked: !!e.returningPatient,
828
- onCheckedChange: (g) => T({ returningPatient: g === !0 }),
829
- label: r("booking.details.returningPatient.label")
890
+ onCheckedChange: (h) => P({ returningPatient: h === !0 }),
891
+ label: d("booking.details.returningPatient.label")
830
892
  }
831
893
  ) : null,
832
- /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
894
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
833
895
  /* @__PURE__ */ s(
834
- Ve,
896
+ Ke,
835
897
  {
836
898
  checked: !!e.privacyConsent,
837
- onCheckedChange: (g) => T({ privacyConsent: g === !0 }),
838
- label: /* @__PURE__ */ b(W, { children: [
839
- ke(
899
+ onCheckedChange: (h) => P({ privacyConsent: h === !0 }),
900
+ label: /* @__PURE__ */ f(W, { children: [
901
+ Ne(
840
902
  "booking.details.consent.privacy.label",
841
- l
903
+ r
842
904
  ),
843
905
  /* @__PURE__ */ s(
844
906
  "span",
@@ -852,14 +914,14 @@ const We = 500, Aa = /^[A-Z0-9]{16}$/, _a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xe = 3
852
914
  }
853
915
  ),
854
916
  /* @__PURE__ */ s(
855
- Ve,
917
+ Ke,
856
918
  {
857
919
  checked: !!e.termsConsent,
858
- onCheckedChange: (g) => T({ termsConsent: g === !0 }),
859
- label: /* @__PURE__ */ b(W, { children: [
860
- ke(
920
+ onCheckedChange: (h) => P({ termsConsent: h === !0 }),
921
+ label: /* @__PURE__ */ f(W, { children: [
922
+ Ne(
861
923
  "booking.details.consent.terms.label",
862
- d
924
+ c
863
925
  ),
864
926
  /* @__PURE__ */ s(
865
927
  "span",
@@ -873,40 +935,40 @@ const We = 500, Aa = /^[A-Z0-9]{16}$/, _a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xe = 3
873
935
  }
874
936
  )
875
937
  ] }),
876
- H ? /* @__PURE__ */ s(
938
+ q ? /* @__PURE__ */ s(
877
939
  "div",
878
940
  {
879
941
  "data-component": "booking-confirmation-channels",
880
942
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
881
943
  children: /* @__PURE__ */ s(
882
- It,
944
+ Bt,
883
945
  {
884
- label: r("booking.confirmation.heading"),
885
- helperText: r("booking.confirmation.helper"),
886
- value: Q,
887
- onChange: (g) => T({
888
- confirmationChannels: g
946
+ label: d("booking.confirmation.heading"),
947
+ helperText: d("booking.confirmation.helper"),
948
+ value: ee,
949
+ onChange: (h) => P({
950
+ confirmationChannels: h
889
951
  }),
890
952
  orientation: "vertical",
891
- options: X.map((g) => ({
892
- value: g,
893
- label: r(`booking.confirmation.channel.${g}`)
953
+ options: Q.map((h) => ({
954
+ value: h,
955
+ label: d(`booking.confirmation.channel.${h}`)
894
956
  })),
895
- error: _e ? r("booking.confirmation.atLeastOne") : void 0
957
+ error: xe ? d("booking.confirmation.atLeastOne") : void 0
896
958
  }
897
959
  )
898
960
  }
899
961
  ) : null,
900
- k ? /* @__PURE__ */ s(K, { variant: "error", children: /* @__PURE__ */ s(K.Description, { children: k }) }) : null,
962
+ y ? /* @__PURE__ */ s(z, { variant: "error", children: /* @__PURE__ */ s(z.Description, { children: y }) }) : null,
901
963
  /* @__PURE__ */ s(
902
- se,
964
+ ie,
903
965
  {
904
966
  intent: "primary",
905
967
  size: "md",
906
968
  type: "submit",
907
- disabled: !ye,
908
- startIcon: S ? /* @__PURE__ */ s(At, { size: "sm" }) : void 0,
909
- children: r("booking.details.submit")
969
+ disabled: !oe,
970
+ startIcon: I ? /* @__PURE__ */ s(Ft, { size: "sm" }) : void 0,
971
+ children: d("booking.details.submit")
910
972
  }
911
973
  )
912
974
  ]
@@ -914,8 +976,8 @@ const We = 500, Aa = /^[A-Z0-9]{16}$/, _a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xe = 3
914
976
  );
915
977
  }
916
978
  );
917
- ze.displayName = "BookingDetailsForm";
918
- const Ta = Me(
979
+ Ye.displayName = "BookingDetailsForm";
980
+ const za = Pe(
919
981
  "ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)]",
920
982
  {
921
983
  variants: {
@@ -943,40 +1005,40 @@ const Ta = Me(
943
1005
  },
944
1006
  defaultVariants: { variant: "inline-list", surface: "flat" }
945
1007
  }
946
- ), Ba = [
1008
+ ), Ka = [
947
1009
  [
948
1010
  /\b(estetic|aesthetic|botox|filler|mesoterap|chirurgia\s*plastic)/i,
949
- Ze
1011
+ st
950
1012
  ],
951
- [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, zt],
952
- [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, pa],
953
- [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, Kt],
954
- [/\b(otorin|udito|orecchi|hearing|ear)/i, sa],
955
- [/\b(neuro|brain|cervello)/i, Wt],
956
- [/\b(pediatr|child|bambin)/i, Ut],
957
- [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, Jt],
958
- [/\b(lab|analis|test|sang|esami)/i, na],
959
- [/\b(farmaco|pharm|pillol|refill)/i, ra],
960
- [/\b(chirurg|surg|intervent|operat)/i, ua],
961
- [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, la],
962
- [/\b(vacc|inject|inie|punto)/i, Ze],
963
- [/\b(derma|skin|pelle)/i, jt],
964
- [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, ta],
965
- [/\b(general|medicin|family|control|check[-\s]?up)/i, Ht]
1013
+ [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, Wt],
1014
+ [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, Ia],
1015
+ [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, Xt],
1016
+ [/\b(otorin|udito|orecchi|hearing|ear)/i, ma],
1017
+ [/\b(neuro|brain|cervello)/i, ra],
1018
+ [/\b(pediatr|child|bambin)/i, sa],
1019
+ [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, na],
1020
+ [/\b(lab|analis|test|sang|esami)/i, fa],
1021
+ [/\b(farmaco|pharm|pillol|refill)/i, va],
1022
+ [/\b(chirurg|surg|intervent|operat)/i, xa],
1023
+ [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, ya],
1024
+ [/\b(vacc|inject|inie|punto)/i, st],
1025
+ [/\b(derma|skin|pelle)/i, Qt],
1026
+ [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, ua],
1027
+ [/\b(general|medicin|family|control|check[-\s]?up)/i, ta]
966
1028
  ];
967
- function Oa(e) {
968
- for (const [t, a] of Ba)
1029
+ function ja(e) {
1030
+ for (const [t, a] of Ka)
969
1031
  if (t.test(e)) return a;
970
1032
  return null;
971
1033
  }
972
- function Pa(e) {
973
- const t = Oa(e.label) ?? $t;
1034
+ function qa(e) {
1035
+ const t = ja(e.label) ?? Zt;
974
1036
  return /* @__PURE__ */ s(t, { "aria-hidden": "true", className: "ds:size-5" });
975
1037
  }
976
- function te(e) {
977
- return we(e, "yyyy-MM-dd");
1038
+ function ae(e) {
1039
+ return _e(e, "yyyy-MM-dd");
978
1040
  }
979
- const Ea = [
1041
+ const Ha = [
980
1042
  "ds:relative ds:flex ds:items-center ds:justify-center",
981
1043
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
982
1044
  "ds:rounded-[var(--radius-sm)]",
@@ -986,7 +1048,7 @@ const Ea = [
986
1048
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
987
1049
  "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
988
1050
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
989
- ].join(" "), Ra = Me(Ea, {
1051
+ ].join(" "), Ga = Pe(Ha, {
990
1052
  variants: {
991
1053
  state: {
992
1054
  available: "ds:cursor-pointer ds:text-[var(--foreground)] ds:hover:bg-[var(--muted)]/30",
@@ -997,93 +1059,93 @@ const Ea = [
997
1059
  },
998
1060
  defaultVariants: { state: "unavailable" }
999
1061
  });
1000
- function Va({
1062
+ function Ua({
1001
1063
  availableDates: e,
1002
1064
  selectedDate: t,
1003
1065
  onSelectDate: a,
1004
1066
  locale: i,
1005
1067
  loading: n
1006
1068
  }) {
1007
- const { t: o } = B(), u = C(() => t ? he($(t)) : e.length > 0 ? he($(e[0])) : he(/* @__PURE__ */ new Date()), [t, e]), [p, c] = j(u), [l, d] = j(null), m = C(() => {
1008
- const k = he(p), v = Pt(p), r = k.getDay(), O = v.getDate(), A = [];
1009
- for (let f = r; f > 0; f -= 1) {
1010
- const x = new Date(k);
1011
- x.setDate(k.getDate() - f), A.push(x);
1069
+ const { t: o } = O(), l = w(() => t ? ye(F(t)) : e.length > 0 ? ye(F(e[0])) : ye(/* @__PURE__ */ new Date()), [t, e]), [u, p] = K(l), [r, c] = K(null), m = w(() => {
1070
+ const y = ye(u), b = qt(u), d = y.getDay(), _ = b.getDate(), x = [];
1071
+ for (let g = d; g > 0; g -= 1) {
1072
+ const S = new Date(y);
1073
+ S.setDate(y.getDate() - g), x.push(S);
1012
1074
  }
1013
- for (let f = 0; f < O; f += 1) {
1014
- const x = new Date(k);
1015
- x.setDate(k.getDate() + f), A.push(x);
1075
+ for (let g = 0; g < _; g += 1) {
1076
+ const S = new Date(y);
1077
+ S.setDate(y.getDate() + g), x.push(S);
1016
1078
  }
1017
- for (; A.length < 42; ) {
1018
- const f = A[A.length - 1], x = new Date(f);
1019
- x.setDate(f.getDate() + 1), A.push(x);
1079
+ for (; x.length < 42; ) {
1080
+ const g = x[x.length - 1], S = new Date(g);
1081
+ S.setDate(g.getDate() + 1), x.push(S);
1020
1082
  }
1021
- return A;
1022
- }, [p]), y = C(() => {
1083
+ return x;
1084
+ }, [u]), k = w(() => {
1023
1085
  try {
1024
1086
  return new Intl.DateTimeFormat(i, {
1025
1087
  month: "long",
1026
1088
  year: "numeric"
1027
- }).format(p);
1089
+ }).format(u);
1028
1090
  } catch {
1029
- return we(p, "MMMM yyyy");
1091
+ return _e(u, "MMMM yyyy");
1030
1092
  }
1031
- }, [p, i]), S = C(() => {
1032
- const k = new Date(2024, 0, 7);
1033
- return Array.from({ length: 7 }, (v, r) => {
1034
- const O = new Date(k);
1035
- O.setDate(k.getDate() + r);
1093
+ }, [u, i]), I = w(() => {
1094
+ const y = new Date(2024, 0, 7);
1095
+ return Array.from({ length: 7 }, (b, d) => {
1096
+ const _ = new Date(y);
1097
+ _.setDate(y.getDate() + d);
1036
1098
  try {
1037
- return new Intl.DateTimeFormat(i, { weekday: "short" }).format(O);
1099
+ return new Intl.DateTimeFormat(i, { weekday: "short" }).format(_);
1038
1100
  } catch {
1039
- return we(O, "EEE");
1101
+ return _e(_, "EEE");
1040
1102
  }
1041
1103
  });
1042
- }, [i]), h = C(() => new Set(e), [e]), w = q(
1043
- (k) => h.has(te(k)),
1044
- [h]
1045
- ), N = C(() => {
1046
- if (l) return l;
1047
- if (t) return $(t);
1048
- const k = m.find(
1049
- (v) => Se(v, p) && w(v)
1104
+ }, [i]), v = w(() => new Set(e), [e]), N = j(
1105
+ (y) => v.has(ae(y)),
1106
+ [v]
1107
+ ), M = w(() => {
1108
+ if (r) return r;
1109
+ if (t) return F(t);
1110
+ const y = m.find(
1111
+ (b) => Me(b, u) && N(b)
1050
1112
  );
1051
- return k || (m.find((v) => Se(v, p)) ?? null);
1052
- }, [l, t, m, p, w]), I = q(
1053
- (k, v) => {
1054
- let r = null;
1055
- switch (k.key) {
1113
+ return y || (m.find((b) => Me(b, u)) ?? null);
1114
+ }, [r, t, m, u, N]), D = j(
1115
+ (y, b) => {
1116
+ let d = null;
1117
+ switch (y.key) {
1056
1118
  case "ArrowLeft":
1057
- r = new Date(v), r.setDate(v.getDate() - 1);
1119
+ d = new Date(b), d.setDate(b.getDate() - 1);
1058
1120
  break;
1059
1121
  case "ArrowRight":
1060
- r = new Date(v), r.setDate(v.getDate() + 1);
1122
+ d = new Date(b), d.setDate(b.getDate() + 1);
1061
1123
  break;
1062
1124
  case "ArrowUp":
1063
- r = new Date(v), r.setDate(v.getDate() - 7);
1125
+ d = new Date(b), d.setDate(b.getDate() - 7);
1064
1126
  break;
1065
1127
  case "ArrowDown":
1066
- r = new Date(v), r.setDate(v.getDate() + 7);
1128
+ d = new Date(b), d.setDate(b.getDate() + 7);
1067
1129
  break;
1068
1130
  case "Home":
1069
- r = new Date(v), r.setDate(v.getDate() - v.getDay());
1131
+ d = new Date(b), d.setDate(b.getDate() - b.getDay());
1070
1132
  break;
1071
1133
  case "End":
1072
- r = new Date(v), r.setDate(v.getDate() + (6 - v.getDay()));
1134
+ d = new Date(b), d.setDate(b.getDate() + (6 - b.getDay()));
1073
1135
  break;
1074
1136
  case "Enter":
1075
1137
  case " ": {
1076
- k.preventDefault(), w(v) && a(te(v));
1138
+ y.preventDefault(), N(b) && a(ae(b));
1077
1139
  return;
1078
1140
  }
1079
1141
  default:
1080
1142
  return;
1081
1143
  }
1082
- r && (k.preventDefault(), Se(r, p) || c(he(r)), d(r));
1144
+ d && (y.preventDefault(), Me(d, u) || p(ye(d)), c(d));
1083
1145
  },
1084
- [w, a, p]
1146
+ [N, a, u]
1085
1147
  );
1086
- return n ? /* @__PURE__ */ b(
1148
+ return n ? /* @__PURE__ */ f(
1087
1149
  "div",
1088
1150
  {
1089
1151
  role: "status",
@@ -1091,22 +1153,22 @@ function Va({
1091
1153
  "aria-label": o("common.loading"),
1092
1154
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1093
1155
  children: [
1094
- /* @__PURE__ */ s(Ce, { variant: "text", width: "40%" }),
1095
- /* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (k, v) => /* @__PURE__ */ s(Ce, { variant: "rounded", height: "2.5rem" }, `mg-skel-${v}`)) })
1156
+ /* @__PURE__ */ s(Te, { variant: "text", width: "40%" }),
1157
+ /* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (y, b) => /* @__PURE__ */ s(Te, { variant: "rounded", height: "2.5rem" }, `mg-skel-${b}`)) })
1096
1158
  ]
1097
1159
  }
1098
- ) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1099
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1160
+ ) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1161
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1100
1162
  /* @__PURE__ */ s(
1101
- Ye,
1163
+ tt,
1102
1164
  {
1103
- icon: /* @__PURE__ */ s(Rt, {}),
1165
+ icon: /* @__PURE__ */ s(Gt, {}),
1104
1166
  "aria-label": o("booking.previousMonth"),
1105
1167
  size: "sm",
1106
1168
  intent: "ghost",
1107
1169
  flipIconInRtl: !0,
1108
1170
  onClick: () => {
1109
- c((k) => va(k)), d(null);
1171
+ p((y) => Ma(y)), c(null);
1110
1172
  }
1111
1173
  }
1112
1174
  ),
@@ -1115,24 +1177,24 @@ function Va({
1115
1177
  {
1116
1178
  className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]",
1117
1179
  "aria-live": "polite",
1118
- children: y
1180
+ children: k
1119
1181
  }
1120
1182
  ),
1121
1183
  /* @__PURE__ */ s(
1122
- Ye,
1184
+ tt,
1123
1185
  {
1124
- icon: /* @__PURE__ */ s(Vt, {}),
1186
+ icon: /* @__PURE__ */ s(Ut, {}),
1125
1187
  "aria-label": o("booking.nextMonth"),
1126
1188
  size: "sm",
1127
1189
  intent: "ghost",
1128
1190
  flipIconInRtl: !0,
1129
1191
  onClick: () => {
1130
- c((k) => at(k, 1)), d(null);
1192
+ p((y) => lt(y, 1)), c(null);
1131
1193
  }
1132
1194
  }
1133
1195
  )
1134
1196
  ] }),
1135
- /* @__PURE__ */ b(
1197
+ /* @__PURE__ */ f(
1136
1198
  "div",
1137
1199
  {
1138
1200
  role: "grid",
@@ -1144,30 +1206,30 @@ function Va({
1144
1206
  {
1145
1207
  role: "row",
1146
1208
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1147
- children: S.map((k, v) => /* @__PURE__ */ s(
1209
+ children: I.map((y, b) => /* @__PURE__ */ s(
1148
1210
  "div",
1149
1211
  {
1150
1212
  role: "columnheader",
1151
1213
  className: "type-meta ds:text-center ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-medium)]",
1152
- children: k
1214
+ children: y
1153
1215
  },
1154
- `wd-${v}`
1216
+ `wd-${b}`
1155
1217
  ))
1156
1218
  }
1157
1219
  ),
1158
- Array.from({ length: 6 }, (k, v) => /* @__PURE__ */ s(
1220
+ Array.from({ length: 6 }, (y, b) => /* @__PURE__ */ s(
1159
1221
  "div",
1160
1222
  {
1161
1223
  role: "row",
1162
1224
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1163
- children: m.slice(v * 7, v * 7 + 7).map((r, O) => {
1164
- const A = v * 7 + O, f = Se(r, p), x = f && w(r), _ = t ? Je(r, $(t)) : !1, D = f ? _ ? "selected" : x ? "available" : "unavailable" : "outside", U = N ? Je(N, r) : !1, E = (() => {
1225
+ children: m.slice(b * 7, b * 7 + 7).map((d, _) => {
1226
+ const x = b * 7 + _, g = Me(d, u), S = g && N(d), T = t ? at(d, F(t)) : !1, A = g ? T ? "selected" : S ? "available" : "unavailable" : "outside", G = M ? at(M, d) : !1, B = (() => {
1165
1227
  try {
1166
1228
  return new Intl.DateTimeFormat(i, {
1167
1229
  dateStyle: "full"
1168
- }).format(r);
1230
+ }).format(d);
1169
1231
  } catch {
1170
- return we(r, "PPP");
1232
+ return _e(d, "PPP");
1171
1233
  }
1172
1234
  })();
1173
1235
  return /* @__PURE__ */ s(
@@ -1175,30 +1237,30 @@ function Va({
1175
1237
  {
1176
1238
  type: "button",
1177
1239
  role: "gridcell",
1178
- "aria-label": E,
1179
- "aria-selected": _ || void 0,
1180
- "aria-disabled": !x || void 0,
1181
- tabIndex: U ? 0 : -1,
1182
- disabled: !x,
1240
+ "aria-label": B,
1241
+ "aria-selected": T || void 0,
1242
+ "aria-disabled": !S || void 0,
1243
+ tabIndex: G ? 0 : -1,
1244
+ disabled: !S,
1183
1245
  onClick: () => {
1184
- x && a(te(r));
1246
+ S && a(ae(d));
1185
1247
  },
1186
- onKeyDown: (R) => I(R, r),
1187
- className: Ra({ state: D }),
1188
- children: /* @__PURE__ */ s("span", { "aria-hidden": "true", children: r.getDate() })
1248
+ onKeyDown: (E) => D(E, d),
1249
+ className: Ga({ state: A }),
1250
+ children: /* @__PURE__ */ s("span", { "aria-hidden": "true", children: d.getDate() })
1189
1251
  },
1190
- `mg-cell-${A}`
1252
+ `mg-cell-${x}`
1191
1253
  );
1192
1254
  })
1193
1255
  },
1194
- `mg-row-${v}`
1256
+ `mg-row-${b}`
1195
1257
  ))
1196
1258
  ]
1197
1259
  }
1198
1260
  )
1199
1261
  ] });
1200
1262
  }
1201
- const La = Me(
1263
+ const Ya = Pe(
1202
1264
  [
1203
1265
  "ds:relative ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-md)]",
1204
1266
  "ds:min-h-[var(--min-target-size)]",
@@ -1224,57 +1286,57 @@ const La = Me(
1224
1286
  defaultVariants: { state: "idle" }
1225
1287
  }
1226
1288
  );
1227
- function Fa({
1289
+ function Ja({
1228
1290
  services: e,
1229
1291
  selectedServiceId: t,
1230
1292
  onSelect: a
1231
1293
  }) {
1232
- const { t: i } = B(), n = et(), [o, u] = j(() => {
1294
+ const { t: i } = O(), n = rt(), [o, l] = K(() => {
1233
1295
  if (t) {
1234
- const d = e.findIndex((m) => m.id === t);
1235
- if (d >= 0) return d;
1296
+ const c = e.findIndex((m) => m.id === t);
1297
+ if (c >= 0) return c;
1236
1298
  }
1237
1299
  return 0;
1238
- }), p = ae(/* @__PURE__ */ new Map()), c = q((d) => {
1300
+ }), u = se(/* @__PURE__ */ new Map()), p = j((c) => {
1239
1301
  var m;
1240
- (m = p.current.get(d)) == null || m.focus();
1241
- }, []), l = q(
1242
- (d, m, y) => {
1243
- const S = e.length;
1244
- if (S !== 0)
1245
- switch (d.key) {
1302
+ (m = u.current.get(c)) == null || m.focus();
1303
+ }, []), r = j(
1304
+ (c, m, k) => {
1305
+ const I = e.length;
1306
+ if (I !== 0)
1307
+ switch (c.key) {
1246
1308
  case "ArrowDown":
1247
1309
  case "ArrowRight": {
1248
- d.preventDefault();
1249
- const h = (m + 1) % S;
1250
- u(h), c(h);
1310
+ c.preventDefault();
1311
+ const v = (m + 1) % I;
1312
+ l(v), p(v);
1251
1313
  break;
1252
1314
  }
1253
1315
  case "ArrowUp":
1254
1316
  case "ArrowLeft": {
1255
- d.preventDefault();
1256
- const h = (m - 1 + S) % S;
1257
- u(h), c(h);
1317
+ c.preventDefault();
1318
+ const v = (m - 1 + I) % I;
1319
+ l(v), p(v);
1258
1320
  break;
1259
1321
  }
1260
1322
  case "Home": {
1261
- d.preventDefault(), u(0), c(0);
1323
+ c.preventDefault(), l(0), p(0);
1262
1324
  break;
1263
1325
  }
1264
1326
  case "End": {
1265
- d.preventDefault();
1266
- const h = S - 1;
1267
- u(h), c(h);
1327
+ c.preventDefault();
1328
+ const v = I - 1;
1329
+ l(v), p(v);
1268
1330
  break;
1269
1331
  }
1270
1332
  case "Enter":
1271
1333
  case " ": {
1272
- d.preventDefault(), a(y);
1334
+ c.preventDefault(), a(k);
1273
1335
  break;
1274
1336
  }
1275
1337
  }
1276
1338
  },
1277
- [e.length, c, a]
1339
+ [e.length, p, a]
1278
1340
  );
1279
1341
  return e.length === 0 ? null : /* @__PURE__ */ s(
1280
1342
  "div",
@@ -1283,27 +1345,27 @@ function Fa({
1283
1345
  "aria-label": i("booking.serviceListLabel"),
1284
1346
  id: n,
1285
1347
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1286
- children: e.map((d, m) => {
1287
- const y = t === d.id, S = o === m, h = i("booking.serviceCardLabel", {
1288
- label: d.label,
1289
- duration: d.durationMin
1290
- }), w = Pa(d);
1291
- return /* @__PURE__ */ b(
1348
+ children: e.map((c, m) => {
1349
+ const k = t === c.id, I = o === m, v = i("booking.serviceCardLabel", {
1350
+ label: c.label,
1351
+ duration: c.durationMin
1352
+ }), N = qa(c);
1353
+ return /* @__PURE__ */ f(
1292
1354
  "button",
1293
1355
  {
1294
- ref: (N) => {
1295
- N ? p.current.set(m, N) : p.current.delete(m);
1356
+ ref: (M) => {
1357
+ M ? u.current.set(m, M) : u.current.delete(m);
1296
1358
  },
1297
1359
  type: "button",
1298
1360
  role: "radio",
1299
- "aria-checked": y,
1300
- "aria-label": h,
1301
- tabIndex: S ? 0 : -1,
1302
- onClick: () => a(d.id),
1303
- onFocus: () => u(m),
1304
- onKeyDown: (N) => l(N, m, d.id),
1305
- className: La({
1306
- state: y ? "selected" : "idle"
1361
+ "aria-checked": k,
1362
+ "aria-label": v,
1363
+ tabIndex: I ? 0 : -1,
1364
+ onClick: () => a(c.id),
1365
+ onFocus: () => l(m),
1366
+ onKeyDown: (M) => r(M, m, c.id),
1367
+ className: Ya({
1368
+ state: k ? "selected" : "idle"
1307
1369
  }),
1308
1370
  children: [
1309
1371
  /* @__PURE__ */ s(
@@ -1311,22 +1373,22 @@ function Fa({
1311
1373
  {
1312
1374
  "aria-hidden": "true",
1313
1375
  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)]",
1314
- children: w
1376
+ children: N
1315
1377
  }
1316
1378
  ),
1317
- /* @__PURE__ */ b("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1318
- /* @__PURE__ */ s("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: d.label }),
1319
- /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: i("booking.serviceSummary", { minutes: d.durationMin }) })
1379
+ /* @__PURE__ */ f("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1380
+ /* @__PURE__ */ s("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: c.label }),
1381
+ /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: i("booking.serviceSummary", { minutes: c.durationMin }) })
1320
1382
  ] })
1321
1383
  ]
1322
1384
  },
1323
- d.id
1385
+ c.id
1324
1386
  );
1325
1387
  })
1326
1388
  }
1327
1389
  );
1328
1390
  }
1329
- const $a = Me(
1391
+ const Za = Pe(
1330
1392
  [
1331
1393
  "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)]",
1332
1394
  "ds:min-h-[var(--min-target-size)]",
@@ -1352,16 +1414,16 @@ const $a = Me(
1352
1414
  defaultVariants: { state: "idle" }
1353
1415
  }
1354
1416
  );
1355
- function za(e) {
1417
+ function Wa(e) {
1356
1418
  const [t] = e.split(":").map((i) => parseInt(i, 10)), a = Number.isFinite(t) ? t : 0;
1357
1419
  return a < 12 ? "morning" : a < 17 ? "afternoon" : "evening";
1358
1420
  }
1359
- const Ka = {
1360
- morning: Ft,
1361
- afternoon: fa,
1362
- evening: Lt
1421
+ const Xa = {
1422
+ morning: Jt,
1423
+ afternoon: wa,
1424
+ evening: Yt
1363
1425
  };
1364
- function ja({
1426
+ function Qa({
1365
1427
  date: e,
1366
1428
  slots: t,
1367
1429
  selectedSlotKey: a,
@@ -1369,86 +1431,86 @@ function ja({
1369
1431
  loading: n,
1370
1432
  locale: o
1371
1433
  }) {
1372
- const { t: u } = B(), p = C(() => {
1434
+ const { t: l } = O(), u = w(() => {
1373
1435
  try {
1374
1436
  return new Intl.DateTimeFormat(o, {
1375
1437
  weekday: "long",
1376
1438
  day: "numeric",
1377
1439
  month: "long"
1378
- }).format($(e));
1440
+ }).format(F(e));
1379
1441
  } catch {
1380
1442
  return e;
1381
1443
  }
1382
- }, [e, o]), c = C(() => {
1444
+ }, [e, o]), p = w(() => {
1383
1445
  const m = {
1384
1446
  morning: [],
1385
1447
  afternoon: [],
1386
1448
  evening: []
1387
1449
  };
1388
- for (const y of t)
1389
- m[za(y.time)].push(y);
1450
+ for (const k of t)
1451
+ m[Wa(k.time)].push(k);
1390
1452
  return m;
1391
- }, [t]), l = t.filter((m) => m.available).length, d = ["morning", "afternoon", "evening"];
1392
- return n ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1393
- /* @__PURE__ */ s(Ce, { variant: "text", width: "60%" }),
1453
+ }, [t]), r = t.filter((m) => m.available).length, c = ["morning", "afternoon", "evening"];
1454
+ return n ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1455
+ /* @__PURE__ */ s(Te, { variant: "text", width: "60%" }),
1394
1456
  [0, 1].map((m) => /* @__PURE__ */ s(
1395
1457
  "div",
1396
1458
  {
1397
1459
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)]",
1398
- children: [0, 1, 2].map((y) => /* @__PURE__ */ s(Ce, { variant: "rounded", height: "44px" }, y))
1460
+ children: [0, 1, 2].map((k) => /* @__PURE__ */ s(Te, { variant: "rounded", height: "44px" }, k))
1399
1461
  },
1400
1462
  m
1401
1463
  ))
1402
- ] }) : l === 0 ? /* @__PURE__ */ s(tt, { variant: "no-results", title: u("booking.noSlotsForDate") }) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1403
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1404
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1464
+ ] }) : r === 0 ? /* @__PURE__ */ s(dt, { variant: "no-results", title: l("booking.noSlotsForDate") }) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1465
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1466
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1405
1467
  /* @__PURE__ */ s(
1406
- Qt,
1468
+ la,
1407
1469
  {
1408
1470
  "aria-hidden": "true",
1409
1471
  className: "ds:size-4 ds:text-[color:var(--accent)]"
1410
1472
  }
1411
1473
  ),
1412
- /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: p })
1474
+ /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: u })
1413
1475
  ] }),
1414
- /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: u("booking.slotsAvailable", { count: l }) })
1476
+ /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: l("booking.slotsAvailable", { count: r }) })
1415
1477
  ] }),
1416
- d.map((m) => {
1417
- const y = c[m];
1418
- if (y.length === 0) return null;
1419
- const S = Ka[m];
1420
- return /* @__PURE__ */ b(
1478
+ c.map((m) => {
1479
+ const k = p[m];
1480
+ if (k.length === 0) return null;
1481
+ const I = Xa[m];
1482
+ return /* @__PURE__ */ f(
1421
1483
  "div",
1422
1484
  {
1423
1485
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
1424
1486
  children: [
1425
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
1426
- /* @__PURE__ */ s(S, { "aria-hidden": "true", className: "ds:size-3.5" }),
1427
- /* @__PURE__ */ s("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: u(`booking.timeOfDay.${m}`) })
1487
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
1488
+ /* @__PURE__ */ s(I, { "aria-hidden": "true", className: "ds:size-3.5" }),
1489
+ /* @__PURE__ */ s("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: l(`booking.timeOfDay.${m}`) })
1428
1490
  ] }),
1429
1491
  /* @__PURE__ */ s(
1430
1492
  "div",
1431
1493
  {
1432
1494
  role: "group",
1433
- "aria-label": u(`booking.timeOfDay.${m}`),
1495
+ "aria-label": l(`booking.timeOfDay.${m}`),
1434
1496
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-4",
1435
- children: y.map((h) => {
1436
- const w = h.key === a, N = h.available ? w ? "selected" : "idle" : "unavailable";
1497
+ children: k.map((v) => {
1498
+ const N = v.key === a, M = v.available ? N ? "selected" : "idle" : "unavailable";
1437
1499
  return /* @__PURE__ */ s(
1438
1500
  "button",
1439
1501
  {
1440
1502
  type: "button",
1441
- "data-slot-id": h.key,
1442
- disabled: !h.available,
1443
- "aria-pressed": w,
1444
- "aria-label": u("booking.slotAvailableLabel", {
1445
- time: h.time
1503
+ "data-slot-id": v.key,
1504
+ disabled: !v.available,
1505
+ "aria-pressed": N,
1506
+ "aria-label": l("booking.slotAvailableLabel", {
1507
+ time: v.time
1446
1508
  }),
1447
- onClick: () => h.available && i(h),
1448
- className: $a({ state: N }),
1449
- children: h.time
1509
+ onClick: () => v.available && i(v),
1510
+ className: Za({ state: M }),
1511
+ children: v.time
1450
1512
  },
1451
- h.key
1513
+ v.key
1452
1514
  );
1453
1515
  })
1454
1516
  }
@@ -1460,108 +1522,108 @@ function ja({
1460
1522
  })
1461
1523
  ] });
1462
1524
  }
1463
- const Ie = 4;
1464
- function qa({
1525
+ const Ae = 4;
1526
+ function es({
1465
1527
  availableDates: e,
1466
1528
  availableSlots: t,
1467
1529
  value: a,
1468
1530
  onChange: i,
1469
1531
  onDateSelect: n,
1470
1532
  onWindowChange: o,
1471
- loadingDates: u,
1472
- loadingSlots: p,
1473
- locale: c
1533
+ loadingDates: l,
1534
+ loadingSlots: u,
1535
+ locale: p
1474
1536
  }) {
1475
- const l = C(() => ne(/* @__PURE__ */ new Date()), []), [d, m] = j(() => {
1537
+ const r = w(() => le(/* @__PURE__ */ new Date()), []), [c, m] = K(() => {
1476
1538
  if (a.date) {
1477
- const f = ne($(a.date));
1478
- if (!oe(l, f)) return f;
1539
+ const g = le(F(a.date));
1540
+ if (!ce(r, g)) return g;
1479
1541
  }
1480
1542
  if (e.length > 0) {
1481
- const f = ne($(e[0]));
1482
- if (oe(f, l)) return f;
1543
+ const g = le(F(e[0]));
1544
+ if (ce(g, r)) return g;
1483
1545
  }
1484
- return l;
1485
- }), y = C(
1486
- () => Le(d, Ie - 1),
1487
- [d]
1488
- ), S = C(() => Array.from({ length: Ie }, (f, x) => {
1489
- const _ = Le(d, x), D = te(_), E = (t[D] ?? []).map((R) => ({
1490
- id: R.key,
1546
+ return r;
1547
+ }), k = w(
1548
+ () => je(c, Ae - 1),
1549
+ [c]
1550
+ ), I = w(() => Array.from({ length: Ae }, (g, S) => {
1551
+ const T = je(c, S), A = ae(T), B = (t[A] ?? []).map((E) => ({
1552
+ id: E.key,
1491
1553
  // SlotGrid formats `start` as a time via Intl.DateTimeFormat —
1492
1554
  // compose a full ISO from the column's date + the slot's HH:mm
1493
1555
  // so the locale-formatter has a real timestamp to work with.
1494
- start: `${D}T${R.time}:00`,
1495
- available: R.available
1556
+ start: `${A}T${E.time}:00`,
1557
+ available: E.available
1496
1558
  }));
1497
- return { date: D, slots: E };
1498
- }), [d, t]), h = oe(d, l), w = !0, N = q(() => {
1499
- m((f) => {
1500
- const x = Et(f, Ie);
1501
- return oe(l, x) ? l : x;
1559
+ return { date: A, slots: B };
1560
+ }), [c, t]), v = ce(c, r), N = !0, M = j(() => {
1561
+ m((g) => {
1562
+ const S = Ht(g, Ae);
1563
+ return ce(r, S) ? r : S;
1502
1564
  });
1503
- }, [l]), I = q(() => {
1504
- m((f) => Le(f, Ie));
1565
+ }, [r]), D = j(() => {
1566
+ m((g) => je(g, Ae));
1505
1567
  }, []);
1506
- G(() => {
1568
+ H(() => {
1507
1569
  if (e.length === 0) return;
1508
- const f = ne($(e[0]));
1509
- !oe(f, l) || e.some((_) => {
1510
- const D = ne($(_));
1511
- return !oe(D, y) && !Ot(D, d);
1512
- }) || m(f);
1513
- }, [e]), G(() => {
1514
- o == null || o(te(d), te(y));
1515
- }, [d, y, o]);
1516
- const k = q(
1517
- (f, x) => {
1518
- const _ = typeof x.date == "string" ? x.date : te(x.date);
1570
+ const g = le(F(e[0]));
1571
+ !ce(g, r) || e.some((T) => {
1572
+ const A = le(F(T));
1573
+ return !ce(A, k) && !jt(A, c);
1574
+ }) || m(g);
1575
+ }, [e]), H(() => {
1576
+ o == null || o(ae(c), ae(k));
1577
+ }, [c, k, o]);
1578
+ const y = j(
1579
+ (g, S) => {
1580
+ const T = typeof S.date == "string" ? S.date : ae(S.date);
1519
1581
  i({
1520
- ...rt(Ae(a, _), f.id)
1521
- }), n == null || n(_);
1582
+ ...vt(Ee(a, T), g.id)
1583
+ }), n == null || n(T);
1522
1584
  },
1523
1585
  [i, n, a]
1524
- ), v = u || p ? "loading" : "default", r = S.some((f) => f.slots.length > 0), O = e[0];
1525
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1526
- !r && !!O ? /* @__PURE__ */ s(
1527
- Ke,
1586
+ ), b = l || u ? "loading" : "default", d = I.some((g) => g.slots.length > 0), _ = e[0];
1587
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1588
+ !d && !!_ ? /* @__PURE__ */ s(
1589
+ Je,
1528
1590
  {
1529
- nextAvailableDate: O,
1530
- onJump: () => m(ne($(O))),
1531
- locale: c
1591
+ nextAvailableDate: _,
1592
+ onJump: () => m(le(F(_))),
1593
+ locale: p
1532
1594
  }
1533
1595
  ) : null,
1534
1596
  /* @__PURE__ */ s(
1535
- Bt,
1597
+ Kt,
1536
1598
  {
1537
- days: S,
1538
- state: v,
1599
+ days: I,
1600
+ state: b,
1539
1601
  selectedSlotId: a.slotKey,
1540
1602
  maxInitialSlotsPerDay: 6,
1541
- locale: c,
1542
- hasPrevious: h,
1543
- hasNext: w,
1544
- onSlotSelect: k,
1545
- onPreviousDays: N,
1546
- onNextDays: I
1603
+ locale: p,
1604
+ hasPrevious: v,
1605
+ hasNext: N,
1606
+ onSlotSelect: y,
1607
+ onPreviousDays: M,
1608
+ onNextDays: D
1547
1609
  }
1548
1610
  )
1549
1611
  ] });
1550
1612
  }
1551
- function lt(e) {
1613
+ function yt(e) {
1552
1614
  const {
1553
1615
  inputs: t,
1554
1616
  value: a,
1555
1617
  onChange: i,
1556
1618
  onDateSelect: n,
1557
1619
  onWindowChange: o,
1558
- loadingDates: u,
1559
- loadingSlots: p,
1560
- locale: c,
1561
- datePickerStyle: l
1620
+ loadingDates: l,
1621
+ loadingSlots: u,
1622
+ locale: p,
1623
+ datePickerStyle: r
1562
1624
  } = e;
1563
- return l === "four-day-grid" ? /* @__PURE__ */ s(
1564
- qa,
1625
+ return r === "four-day-grid" ? /* @__PURE__ */ s(
1626
+ es,
1565
1627
  {
1566
1628
  availableDates: t.availableDates,
1567
1629
  availableSlots: t.availableSlots,
@@ -1569,46 +1631,46 @@ function lt(e) {
1569
1631
  onChange: i,
1570
1632
  onDateSelect: n,
1571
1633
  onWindowChange: o,
1572
- loadingDates: u,
1573
- loadingSlots: p,
1574
- locale: c
1634
+ loadingDates: l,
1635
+ loadingSlots: u,
1636
+ locale: p
1575
1637
  }
1576
1638
  ) : /* @__PURE__ */ s(
1577
- Va,
1639
+ Ua,
1578
1640
  {
1579
1641
  availableDates: t.availableDates,
1580
1642
  selectedDate: a.date,
1581
- onSelectDate: (d) => {
1582
- i(Ae(a, d)), n == null || n(d);
1643
+ onSelectDate: (c) => {
1644
+ i(Ee(a, c)), n == null || n(c);
1583
1645
  },
1584
- locale: c,
1585
- loading: u ?? p
1646
+ locale: p,
1647
+ loading: l ?? u
1586
1648
  }
1587
1649
  );
1588
1650
  }
1589
- function ct(e) {
1590
- const { inputs: t, value: a, onChange: i, loadingSlots: n, locale: o, datePickerStyle: u } = e;
1591
- return u === "four-day-grid" || !a.date ? null : /* @__PURE__ */ s(
1592
- ja,
1651
+ function kt(e) {
1652
+ const { inputs: t, value: a, onChange: i, loadingSlots: n, locale: o, datePickerStyle: l } = e;
1653
+ return l === "four-day-grid" || !a.date ? null : /* @__PURE__ */ s(
1654
+ Qa,
1593
1655
  {
1594
1656
  date: a.date,
1595
1657
  slots: t.availableSlots[a.date] ?? [],
1596
1658
  selectedSlotKey: a.slotKey,
1597
- onSelect: (p) => i(rt(a, p.key)),
1659
+ onSelect: (u) => i(vt(a, u.key)),
1598
1660
  loading: n,
1599
1661
  locale: o
1600
1662
  }
1601
1663
  );
1602
1664
  }
1603
- function ut({ value: e, onChange: t }) {
1604
- const { t: a } = B(), i = [
1665
+ function xt({ value: e, onChange: t }) {
1666
+ const { t: a } = O(), i = [
1605
1667
  { value: "private", label: a("booking.insurance.private") },
1606
1668
  { value: "public", label: a("booking.insurance.public") }
1607
1669
  ];
1608
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1670
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1609
1671
  /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: a("booking.insurance.heading") }),
1610
1672
  /* @__PURE__ */ s(
1611
- De,
1673
+ Oe,
1612
1674
  {
1613
1675
  options: i,
1614
1676
  value: e ?? "",
@@ -1621,176 +1683,280 @@ function ut({ value: e, onChange: t }) {
1621
1683
  )
1622
1684
  ] });
1623
1685
  }
1624
- function mt({ specialties: e, value: t, onChange: a }) {
1625
- const { t: i } = B(), n = e.map((o) => ({
1626
- value: o.id,
1627
- label: o.label
1628
- }));
1629
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1630
- /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: i("booking.specialty.heading") }),
1686
+ function St({
1687
+ specialties: e,
1688
+ value: t,
1689
+ valueIds: a,
1690
+ onChange: i,
1691
+ onChangeIds: n,
1692
+ pickerStyle: o = "select"
1693
+ }) {
1694
+ const { t: l } = O(), u = e.map((r) => ({
1695
+ value: r.id,
1696
+ label: r.label
1697
+ })), p = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: l("booking.specialty.heading") });
1698
+ return o === "multi-select" && n ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1699
+ p,
1700
+ /* @__PURE__ */ s(
1701
+ Ue,
1702
+ {
1703
+ options: u,
1704
+ value: a ?? [],
1705
+ onChange: n,
1706
+ placeholder: l("booking.specialty.placeholder"),
1707
+ "aria-label": l("booking.specialty.heading"),
1708
+ allowClear: !0
1709
+ }
1710
+ )
1711
+ ] }) : o === "combobox" ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1712
+ p,
1713
+ /* @__PURE__ */ s(
1714
+ Ge,
1715
+ {
1716
+ options: u,
1717
+ value: t ?? "",
1718
+ onValueChange: (r) => i(r === "" ? "" : r),
1719
+ placeholder: l("booking.specialty.placeholder"),
1720
+ "aria-label": l("booking.specialty.heading"),
1721
+ clearable: !0
1722
+ }
1723
+ )
1724
+ ] }) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1725
+ p,
1726
+ /* @__PURE__ */ s(
1727
+ Oe,
1728
+ {
1729
+ options: u,
1730
+ value: t ?? "",
1731
+ onValueChange: (r) => i(r),
1732
+ placeholder: l("booking.specialty.placeholder"),
1733
+ "aria-label": l("booking.specialty.heading")
1734
+ }
1735
+ )
1736
+ ] });
1737
+ }
1738
+ function It({
1739
+ services: e,
1740
+ value: t,
1741
+ valueIds: a,
1742
+ onChange: i,
1743
+ onChangeIds: n,
1744
+ pickerStyle: o,
1745
+ compact: l
1746
+ }) {
1747
+ const { t: u } = O(), p = o ?? (l ? "select" : "cards"), r = e.map((m) => ({
1748
+ value: m.id,
1749
+ label: `${m.label} · ${u("booking.serviceSummary", {
1750
+ minutes: m.durationMin
1751
+ })}`
1752
+ })), c = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: u("booking.service.heading") });
1753
+ return p === "multi-select" && n ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1754
+ c,
1755
+ /* @__PURE__ */ s(
1756
+ Ue,
1757
+ {
1758
+ options: r,
1759
+ value: a ?? [],
1760
+ onChange: n,
1761
+ placeholder: u("booking.service.placeholder"),
1762
+ "aria-label": u("booking.service.heading"),
1763
+ allowClear: !0
1764
+ }
1765
+ )
1766
+ ] }) : p === "combobox" ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1767
+ c,
1768
+ /* @__PURE__ */ s(
1769
+ Ge,
1770
+ {
1771
+ options: r,
1772
+ value: t ?? "",
1773
+ onValueChange: (m) => i(m === "" ? "" : m),
1774
+ placeholder: u("booking.service.placeholder"),
1775
+ "aria-label": u("booking.service.heading"),
1776
+ clearable: !0
1777
+ }
1778
+ )
1779
+ ] }) : p === "select" ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1780
+ c,
1631
1781
  /* @__PURE__ */ s(
1632
- De,
1782
+ Oe,
1633
1783
  {
1634
- options: n,
1784
+ options: r,
1635
1785
  value: t ?? "",
1636
- onValueChange: (o) => a(o),
1637
- placeholder: i("booking.specialty.placeholder"),
1638
- "aria-label": i("booking.specialty.heading")
1786
+ onValueChange: (m) => i(m),
1787
+ placeholder: u("booking.service.placeholder"),
1788
+ "aria-label": u("booking.service.heading")
1789
+ }
1790
+ )
1791
+ ] }) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1792
+ c,
1793
+ /* @__PURE__ */ s(
1794
+ Ja,
1795
+ {
1796
+ services: e,
1797
+ selectedServiceId: t,
1798
+ onSelect: i
1639
1799
  }
1640
1800
  )
1641
1801
  ] });
1642
1802
  }
1643
- function pt({ services: e, value: t, onChange: a, compact: i }) {
1644
- const { t: n } = B();
1645
- if (i) {
1646
- const o = e.map((u) => ({
1647
- value: u.id,
1648
- label: `${u.label} · ${n("booking.serviceSummary", {
1649
- minutes: u.durationMin
1650
- })}`
1803
+ function Nt({
1804
+ operators: e,
1805
+ value: t,
1806
+ valueIds: a,
1807
+ onChange: i,
1808
+ onChangeIds: n,
1809
+ pickerStyle: o = "select"
1810
+ }) {
1811
+ const { t: l } = O(), u = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: l("booking.operator.heading") });
1812
+ if (o === "multi-select" && n) {
1813
+ const r = e.map((c) => ({
1814
+ value: c.id,
1815
+ label: c.name
1651
1816
  }));
1652
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1653
- /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.service.heading") }),
1817
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1818
+ u,
1654
1819
  /* @__PURE__ */ s(
1655
- De,
1820
+ Ue,
1656
1821
  {
1657
- options: o,
1658
- value: t ?? "",
1659
- onValueChange: (u) => a(u),
1660
- placeholder: n("booking.service.placeholder"),
1661
- "aria-label": n("booking.service.heading")
1822
+ options: r,
1823
+ value: a ?? [],
1824
+ onChange: n,
1825
+ placeholder: l("booking.operator.placeholder"),
1826
+ "aria-label": l("booking.operator.heading"),
1827
+ allowClear: !0
1662
1828
  }
1663
1829
  )
1664
1830
  ] });
1665
1831
  }
1666
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1667
- /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.service.heading") }),
1832
+ const p = [
1833
+ { value: X, label: l("booking.operator.all") },
1834
+ ...e.map((r) => ({ value: r.id, label: r.name }))
1835
+ ];
1836
+ return o === "combobox" ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1837
+ u,
1668
1838
  /* @__PURE__ */ s(
1669
- Fa,
1839
+ Ge,
1670
1840
  {
1671
- services: e,
1672
- selectedServiceId: t,
1673
- onSelect: a
1841
+ options: p,
1842
+ value: t ?? X,
1843
+ onValueChange: (r) => i(r === "" ? X : r),
1844
+ placeholder: l("booking.operator.placeholder"),
1845
+ "aria-label": l("booking.operator.heading"),
1846
+ clearable: !0
1674
1847
  }
1675
1848
  )
1676
- ] });
1677
- }
1678
- function gt({ operators: e, value: t, onChange: a }) {
1679
- const { t: i } = B(), n = [
1680
- { value: ve, label: i("booking.operator.all") },
1681
- ...e.map((o) => ({ value: o.id, label: o.name }))
1682
- ];
1683
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1684
- /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: i("booking.operator.heading") }),
1849
+ ] }) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1850
+ u,
1685
1851
  /* @__PURE__ */ s(
1686
- De,
1852
+ Oe,
1687
1853
  {
1688
- options: n,
1689
- value: t ?? ve,
1690
- onValueChange: (o) => a(o),
1691
- placeholder: i("booking.operator.placeholder"),
1692
- "aria-label": i("booking.operator.heading")
1854
+ options: p,
1855
+ value: t ?? X,
1856
+ onValueChange: (r) => i(r),
1857
+ placeholder: l("booking.operator.placeholder"),
1858
+ "aria-label": l("booking.operator.heading")
1693
1859
  }
1694
1860
  )
1695
1861
  ] });
1696
1862
  }
1697
- function ft({
1863
+ function wt({
1698
1864
  customSlot: e
1699
1865
  }) {
1700
- const { t } = B();
1701
- return e ? /* @__PURE__ */ s(W, { children: e }) : /* @__PURE__ */ b(K, { variant: "warning", children: [
1702
- /* @__PURE__ */ s(K.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
1703
- /* @__PURE__ */ s(K.Description, { children: t("booking.onboardingIncomplete.description") })
1866
+ const { t } = O();
1867
+ return e ? /* @__PURE__ */ s(W, { children: e }) : /* @__PURE__ */ f(z, { variant: "warning", children: [
1868
+ /* @__PURE__ */ s(z.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
1869
+ /* @__PURE__ */ s(z.Description, { children: t("booking.onboardingIncomplete.description") })
1704
1870
  ] });
1705
1871
  }
1706
- function Ke({
1872
+ function Je({
1707
1873
  nextAvailableDate: e,
1708
1874
  onJump: t,
1709
1875
  locale: a
1710
1876
  }) {
1711
- const { t: i } = B(), n = C(() => {
1877
+ const { t: i } = O(), n = w(() => {
1712
1878
  try {
1713
1879
  return new Intl.DateTimeFormat(a, { dateStyle: "long" }).format(
1714
- $(e)
1880
+ F(e)
1715
1881
  );
1716
1882
  } catch {
1717
1883
  return e;
1718
1884
  }
1719
1885
  }, [e, a]);
1720
- return /* @__PURE__ */ b(K, { variant: "info", children: [
1721
- /* @__PURE__ */ s(K.Description, { children: i("booking.nextAvailable.description", { date: n }) }),
1722
- /* @__PURE__ */ s(K.Action, { children: /* @__PURE__ */ s(se, { intent: "secondary", size: "sm", onClick: t, children: i("booking.nextAvailable.cta") }) })
1886
+ return /* @__PURE__ */ f(z, { variant: "info", children: [
1887
+ /* @__PURE__ */ s(z.Description, { children: i("booking.nextAvailable.description", { date: n }) }),
1888
+ /* @__PURE__ */ s(z.Action, { children: /* @__PURE__ */ s(ie, { intent: "secondary", size: "sm", onClick: t, children: i("booking.nextAvailable.cta") }) })
1723
1889
  ] });
1724
1890
  }
1725
- function Ha({
1891
+ function ts({
1726
1892
  snapshot: e,
1727
1893
  operators: t,
1728
1894
  specialties: a,
1729
1895
  services: i,
1730
1896
  locale: n,
1731
1897
  mode: o,
1732
- showModify: u,
1733
- onReset: p,
1734
- onModify: c
1898
+ showModify: l,
1899
+ onReset: u,
1900
+ onModify: p
1735
1901
  }) {
1736
- const { t: l } = B(), m = (e.details.confirmationChannels ?? ["email"]).map(
1737
- (I) => l(`booking.confirmation.channel.${I}`)
1738
- ), y = o === "demo" ? l("booking.success.descriptionDemo") : m.length > 1 ? l("booking.success.descriptionMultiple", {
1902
+ const { t: r } = O(), m = (e.details.confirmationChannels ?? ["email"]).map(
1903
+ (D) => r(`booking.confirmation.channel.${D}`)
1904
+ ), k = o === "demo" ? r("booking.success.descriptionDemo") : m.length > 1 ? r("booking.success.descriptionMultiple", {
1739
1905
  channels: m.join(" · ")
1740
- }) : l("booking.success.descriptionSingle", { channel: m[0] }), S = C(() => {
1906
+ }) : r("booking.success.descriptionSingle", { channel: m[0] }), I = w(() => {
1741
1907
  if (e.date)
1742
1908
  try {
1743
1909
  return new Intl.DateTimeFormat(n, {
1744
1910
  weekday: "long",
1745
1911
  day: "numeric",
1746
1912
  month: "long"
1747
- }).format($(e.date));
1913
+ }).format(F(e.date));
1748
1914
  } catch {
1749
1915
  return e.date;
1750
1916
  }
1751
- }, [e.date, n]), h = e.operatorId ? t.find((I) => I.id === e.operatorId) : void 0, w = e.specialtyId ? a.find((I) => I.id === e.specialtyId) : void 0, N = e.serviceId ? i.find((I) => I.id === e.serviceId) : void 0;
1752
- return /* @__PURE__ */ b(
1917
+ }, [e.date, n]), v = e.operatorId ? t.find((D) => D.id === e.operatorId) : void 0, N = e.specialtyId ? a.find((D) => D.id === e.specialtyId) : void 0, M = e.serviceId ? i.find((D) => D.id === e.serviceId) : void 0;
1918
+ return /* @__PURE__ */ f(
1753
1919
  "div",
1754
1920
  {
1755
1921
  "data-component": "booking-success",
1756
1922
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
1757
1923
  children: [
1758
- /* @__PURE__ */ b(K, { variant: "success", children: [
1759
- /* @__PURE__ */ s(K.Title, { as: "h3", children: l("booking.success.heading") }),
1760
- /* @__PURE__ */ s(K.Description, { children: y })
1924
+ /* @__PURE__ */ f(z, { variant: "success", children: [
1925
+ /* @__PURE__ */ s(z.Title, { as: "h3", children: r("booking.success.heading") }),
1926
+ /* @__PURE__ */ s(z.Description, { children: k })
1761
1927
  ] }),
1762
- /* @__PURE__ */ s("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ b("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: [
1763
- w ? /* @__PURE__ */ b(W, { children: [
1764
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summarySpecialty") }),
1765
- /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: w.label })
1766
- ] }) : null,
1767
- N ? /* @__PURE__ */ b(W, { children: [
1768
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryService") }),
1928
+ /* @__PURE__ */ s("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: [
1929
+ N ? /* @__PURE__ */ f(W, { children: [
1930
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: r("booking.success.summarySpecialty") }),
1769
1931
  /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: N.label })
1770
1932
  ] }) : null,
1771
- S ? /* @__PURE__ */ b(W, { children: [
1772
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryDate") }),
1773
- /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: S })
1933
+ M ? /* @__PURE__ */ f(W, { children: [
1934
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: r("booking.success.summaryService") }),
1935
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: M.label })
1936
+ ] }) : null,
1937
+ I ? /* @__PURE__ */ f(W, { children: [
1938
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: r("booking.success.summaryDate") }),
1939
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: I })
1774
1940
  ] }) : null,
1775
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryTime") }),
1941
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: r("booking.success.summaryTime") }),
1776
1942
  /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: e.slot.time }),
1777
- h ? /* @__PURE__ */ b(W, { children: [
1778
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryProvider") }),
1779
- /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: h.name })
1943
+ v ? /* @__PURE__ */ f(W, { children: [
1944
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: r("booking.success.summaryProvider") }),
1945
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: v.name })
1780
1946
  ] }) : null
1781
1947
  ] }) }),
1782
- /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1783
- /* @__PURE__ */ s(se, { intent: "secondary", size: "md", onClick: p, children: l("booking.success.bookAnother") }),
1784
- u ? /* @__PURE__ */ s(se, { intent: "ghost", size: "md", onClick: c, children: l("booking.success.modifyBooking") }) : null
1948
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1949
+ /* @__PURE__ */ s(ie, { intent: "secondary", size: "md", onClick: u, children: r("booking.success.bookAnother") }),
1950
+ l ? /* @__PURE__ */ s(ie, { intent: "ghost", size: "md", onClick: p, children: r("booking.success.modifyBooking") }) : null
1785
1951
  ] })
1786
1952
  ]
1787
1953
  }
1788
1954
  );
1789
1955
  }
1790
- function ht({ customSlot: e }) {
1791
- const { t } = B();
1956
+ function Ct({ customSlot: e }) {
1957
+ const { t } = O();
1792
1958
  return e ? /* @__PURE__ */ s(W, { children: e }) : /* @__PURE__ */ s(
1793
- tt,
1959
+ dt,
1794
1960
  {
1795
1961
  variant: "no-results",
1796
1962
  title: t("booking.emptyServices.title"),
@@ -1798,196 +1964,220 @@ function ht({ customSlot: e }) {
1798
1964
  }
1799
1965
  );
1800
1966
  }
1801
- function Ga(e) {
1967
+ function as(e) {
1802
1968
  const {
1803
1969
  cascade: t,
1804
1970
  inputs: a,
1805
1971
  value: i,
1806
1972
  onChange: n,
1807
1973
  onSubmit: o,
1808
- emptyServicesSlot: u,
1809
- onboardingIncompleteSlot: p,
1810
- loadingDates: c,
1811
- loadingSlots: l,
1812
- onDateSelect: d,
1974
+ emptyServicesSlot: l,
1975
+ onboardingIncompleteSlot: u,
1976
+ loadingDates: p,
1977
+ loadingSlots: r,
1978
+ onDateSelect: c,
1813
1979
  onWindowChange: m,
1814
- datePickerStyle: y,
1815
- submitting: S,
1816
- locale: h,
1817
- detailsProps: w
1818
- } = e, { t: N } = B();
1819
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1980
+ datePickerStyle: k,
1981
+ specialtyPickerStyle: I,
1982
+ servicePickerStyle: v,
1983
+ operatorPickerStyle: N,
1984
+ submitting: M,
1985
+ locale: D,
1986
+ detailsProps: y
1987
+ } = e, { t: b } = O();
1988
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1820
1989
  t.gates.insurance ? /* @__PURE__ */ s(
1821
- ut,
1990
+ xt,
1822
1991
  {
1823
1992
  value: i.insuranceType,
1824
- onChange: (I) => n(st(i, I))
1993
+ onChange: (d) => n(ct(i, d))
1825
1994
  }
1826
1995
  ) : null,
1827
1996
  t.gates.specialty ? /* @__PURE__ */ s(
1828
- mt,
1997
+ St,
1829
1998
  {
1830
1999
  specialties: t.filtered.specialties,
1831
2000
  value: i.specialtyId,
1832
- onChange: (I) => n(it(i, I))
2001
+ valueIds: i.specialtyIds,
2002
+ onChange: (d) => n(ut(i, d)),
2003
+ onChangeIds: (d) => n(pt(i, d)),
2004
+ pickerStyle: I
1833
2005
  }
1834
2006
  ) : null,
1835
- t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ s(ht, { customSlot: u }) : /* @__PURE__ */ s(
1836
- pt,
2007
+ t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ s(Ct, { customSlot: l }) : /* @__PURE__ */ s(
2008
+ It,
1837
2009
  {
1838
2010
  services: t.filtered.services,
1839
2011
  value: i.serviceId,
1840
- onChange: (I) => n(nt(i, I))
2012
+ valueIds: i.serviceIds,
2013
+ onChange: (d) => n(mt(i, d)),
2014
+ onChangeIds: (d) => n(gt(i, d)),
2015
+ pickerStyle: v
1841
2016
  }
1842
2017
  ) : null,
1843
- t.gates.onboardingIncomplete ? /* @__PURE__ */ s(ft, { customSlot: p }) : null,
2018
+ t.gates.onboardingIncomplete ? /* @__PURE__ */ s(wt, { customSlot: u }) : null,
1844
2019
  t.gates.operator ? /* @__PURE__ */ s(
1845
- gt,
2020
+ Nt,
1846
2021
  {
1847
2022
  operators: t.filtered.operators,
1848
2023
  value: i.operatorId,
1849
- onChange: (I) => n(ot(i, I))
2024
+ valueIds: i.operatorIds,
2025
+ onChange: (d) => n(ft(i, d)),
2026
+ onChangeIds: (d) => n(ht(i, d)),
2027
+ pickerStyle: N
1850
2028
  }
1851
2029
  ) : null,
1852
- t.gates.date ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1853
- /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: N("booking.date.heading") }),
2030
+ t.gates.date ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2031
+ /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: b("booking.date.heading") }),
1854
2032
  a.availableDates.length === 0 && a.nextAvailableDate ? /* @__PURE__ */ s(
1855
- Ke,
2033
+ Je,
1856
2034
  {
1857
2035
  nextAvailableDate: a.nextAvailableDate,
1858
- onJump: () => n(Ae(i, a.nextAvailableDate)),
1859
- locale: h
2036
+ onJump: () => n(Ee(i, a.nextAvailableDate)),
2037
+ locale: D
1860
2038
  }
1861
- ) : lt({
2039
+ ) : yt({
1862
2040
  inputs: a,
1863
2041
  value: i,
1864
2042
  onChange: n,
1865
- onDateSelect: d,
2043
+ onDateSelect: c,
1866
2044
  onWindowChange: m,
1867
- loadingDates: c,
1868
- loadingSlots: l,
1869
- locale: h,
1870
- datePickerStyle: y
2045
+ loadingDates: p,
2046
+ loadingSlots: r,
2047
+ locale: D,
2048
+ datePickerStyle: k
1871
2049
  })
1872
2050
  ] }) : null,
1873
- t.gates.slot && i.date && y === "month-calendar" ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1874
- /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: N("booking.slot.heading") }),
1875
- ct({
2051
+ t.gates.slot && i.date && k === "month-calendar" ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2052
+ /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: b("booking.slot.heading") }),
2053
+ kt({
1876
2054
  inputs: a,
1877
2055
  value: i,
1878
2056
  onChange: n,
1879
- loadingSlots: l,
1880
- locale: h,
1881
- datePickerStyle: y
2057
+ loadingSlots: r,
2058
+ locale: D,
2059
+ datePickerStyle: k
1882
2060
  })
1883
2061
  ] }) : null,
1884
2062
  t.gates.details && t.selectedSlot ? /* @__PURE__ */ s(
1885
- ze,
2063
+ Ye,
1886
2064
  {
1887
- ...w,
2065
+ ...y,
1888
2066
  value: i.details ?? {},
1889
- onChange: (I) => n({ ...i, details: I }),
2067
+ onChange: (d) => n({ ...i, details: d }),
1890
2068
  onSubmit: o,
1891
- submitting: S,
2069
+ submitting: M,
1892
2070
  defaultPhoneCountry: e.policy.country
1893
2071
  }
1894
2072
  ) : null
1895
2073
  ] });
1896
2074
  }
1897
- function z(e, t, a = {}) {
2075
+ function $(e, t, a = {}) {
1898
2076
  const {
1899
2077
  cascade: i,
1900
2078
  inputs: n,
1901
2079
  value: o,
1902
- onChange: u,
1903
- onSubmit: p,
1904
- emptyServicesSlot: c,
1905
- onboardingIncompleteSlot: l,
1906
- loadingDates: d,
2080
+ onChange: l,
2081
+ onSubmit: u,
2082
+ emptyServicesSlot: p,
2083
+ onboardingIncompleteSlot: r,
2084
+ loadingDates: c,
1907
2085
  loadingSlots: m,
1908
- onDateSelect: y,
1909
- onWindowChange: S,
1910
- datePickerStyle: h,
1911
- submitting: w,
1912
- locale: N,
1913
- detailsProps: I,
1914
- policy: k
2086
+ onDateSelect: k,
2087
+ onWindowChange: I,
2088
+ datePickerStyle: v,
2089
+ specialtyPickerStyle: N,
2090
+ servicePickerStyle: M,
2091
+ operatorPickerStyle: D,
2092
+ submitting: y,
2093
+ locale: b,
2094
+ detailsProps: d,
2095
+ policy: _
1915
2096
  } = t;
1916
2097
  switch (e) {
1917
2098
  case 1:
1918
2099
  return /* @__PURE__ */ s(
1919
- ut,
2100
+ xt,
1920
2101
  {
1921
2102
  value: o.insuranceType,
1922
- onChange: (v) => u(st(o, v))
2103
+ onChange: (x) => l(ct(o, x))
1923
2104
  }
1924
2105
  );
1925
2106
  case 2:
1926
2107
  return /* @__PURE__ */ s(
1927
- mt,
2108
+ St,
1928
2109
  {
1929
2110
  specialties: i.filtered.specialties,
1930
2111
  value: o.specialtyId,
1931
- onChange: (v) => u(it(o, v))
2112
+ valueIds: o.specialtyIds,
2113
+ onChange: (x) => l(ut(o, x)),
2114
+ onChangeIds: (x) => l(pt(o, x)),
2115
+ pickerStyle: N
1932
2116
  }
1933
2117
  );
1934
2118
  case 3:
1935
- return i.filtered.services.length === 0 ? /* @__PURE__ */ s(ht, { customSlot: c }) : i.gates.onboardingIncomplete ? /* @__PURE__ */ s(ft, { customSlot: l }) : /* @__PURE__ */ s(
1936
- pt,
2119
+ return i.filtered.services.length === 0 ? /* @__PURE__ */ s(Ct, { customSlot: p }) : i.gates.onboardingIncomplete ? /* @__PURE__ */ s(wt, { customSlot: r }) : /* @__PURE__ */ s(
2120
+ It,
1937
2121
  {
1938
2122
  services: i.filtered.services,
1939
2123
  value: o.serviceId,
1940
- onChange: (v) => u(nt(o, v)),
2124
+ valueIds: o.serviceIds,
2125
+ onChange: (x) => l(mt(o, x)),
2126
+ onChangeIds: (x) => l(gt(o, x)),
2127
+ pickerStyle: M,
1941
2128
  compact: a.compactService
1942
2129
  }
1943
2130
  );
1944
2131
  case 4:
1945
2132
  return /* @__PURE__ */ s(
1946
- gt,
2133
+ Nt,
1947
2134
  {
1948
2135
  operators: i.filtered.operators,
1949
2136
  value: o.operatorId,
1950
- onChange: (v) => u(ot(o, v))
2137
+ valueIds: o.operatorIds,
2138
+ onChange: (x) => l(ft(o, x)),
2139
+ onChangeIds: (x) => l(ht(o, x)),
2140
+ pickerStyle: D
1951
2141
  }
1952
2142
  );
1953
2143
  case 5:
1954
2144
  return n.availableDates.length === 0 && n.nextAvailableDate ? /* @__PURE__ */ s(
1955
- Ke,
2145
+ Je,
1956
2146
  {
1957
2147
  nextAvailableDate: n.nextAvailableDate,
1958
- onJump: () => u(Ae(o, n.nextAvailableDate)),
1959
- locale: N
2148
+ onJump: () => l(Ee(o, n.nextAvailableDate)),
2149
+ locale: b
1960
2150
  }
1961
- ) : lt({
2151
+ ) : yt({
1962
2152
  inputs: n,
1963
2153
  value: o,
1964
- onChange: u,
1965
- onDateSelect: y,
1966
- onWindowChange: S,
1967
- loadingDates: d,
2154
+ onChange: l,
2155
+ onDateSelect: k,
2156
+ onWindowChange: I,
2157
+ loadingDates: c,
1968
2158
  loadingSlots: m,
1969
- locale: N,
1970
- datePickerStyle: h
2159
+ locale: b,
2160
+ datePickerStyle: v
1971
2161
  });
1972
2162
  case 6:
1973
- return ct({
2163
+ return kt({
1974
2164
  inputs: n,
1975
2165
  value: o,
1976
- onChange: u,
2166
+ onChange: l,
1977
2167
  loadingSlots: m,
1978
- locale: N,
1979
- datePickerStyle: h
2168
+ locale: b,
2169
+ datePickerStyle: v
1980
2170
  });
1981
2171
  case 7:
1982
2172
  return i.selectedSlot ? /* @__PURE__ */ s(
1983
- ze,
2173
+ Ye,
1984
2174
  {
1985
- ...I,
2175
+ ...d,
1986
2176
  value: o.details ?? {},
1987
- onChange: (v) => u({ ...o, details: v }),
1988
- onSubmit: p,
1989
- submitting: w,
1990
- defaultPhoneCountry: k.country
2177
+ onChange: (x) => l({ ...o, details: x }),
2178
+ onSubmit: u,
2179
+ submitting: y,
2180
+ defaultPhoneCountry: _.country
1991
2181
  }
1992
2182
  ) : null;
1993
2183
  /* c8 ignore next 2 */
@@ -1995,9 +2185,9 @@ function z(e, t, a = {}) {
1995
2185
  return null;
1996
2186
  }
1997
2187
  }
1998
- function je() {
1999
- const { t: e } = B();
2000
- return C(
2188
+ function Ze() {
2189
+ const { t: e } = O();
2190
+ return w(
2001
2191
  () => ({
2002
2192
  1: e("booking.insurance.heading"),
2003
2193
  2: e("booking.specialty.heading"),
@@ -2010,32 +2200,32 @@ function je() {
2010
2200
  [e]
2011
2201
  );
2012
2202
  }
2013
- function Ua(e) {
2014
- const { cascade: t, value: a, activeStep: i, setActiveStep: n, datePickerStyle: o } = e, u = je(), p = C(
2015
- () => o === "four-day-grid" ? t.visibleSteps.filter((d) => d !== 6) : t.visibleSteps,
2203
+ function ss(e) {
2204
+ const { cascade: t, value: a, activeStep: i, setActiveStep: n, datePickerStyle: o } = e, l = Ze(), u = w(
2205
+ () => o === "four-day-grid" ? t.visibleSteps.filter((c) => c !== 6) : t.visibleSteps,
2016
2206
  [t.visibleSteps, o]
2017
- ), c = C(
2018
- () => p.map((d) => ({
2019
- label: u[d],
2020
- summary: vt(d, a, t),
2021
- status: be(d, a) && d < t.currentStep ? "completed" : void 0,
2022
- content: z(d, e, { compactService: !0 })
2207
+ ), p = w(
2208
+ () => u.map((c) => ({
2209
+ label: l[c],
2210
+ summary: Mt(c, a, t),
2211
+ status: ke(c, a) && c < t.currentStep ? "completed" : void 0,
2212
+ content: $(c, e, { compactService: !0 })
2023
2213
  })),
2024
- [p, a, u, t, e]
2025
- ), l = Math.max(0, t.visibleSteps.indexOf(i));
2214
+ [u, a, l, t, e]
2215
+ ), r = Math.max(0, t.visibleSteps.indexOf(i));
2026
2216
  return /* @__PURE__ */ s(
2027
- _t,
2217
+ $t,
2028
2218
  {
2029
- activeStep: l,
2030
- steps: c,
2031
- onStepChange: (d) => {
2032
- const m = t.visibleSteps[d];
2219
+ activeStep: r,
2220
+ steps: p,
2221
+ onStepChange: (c) => {
2222
+ const m = t.visibleSteps[c];
2033
2223
  m && n(m);
2034
2224
  }
2035
2225
  }
2036
2226
  );
2037
2227
  }
2038
- function be(e, t) {
2228
+ function ke(e, t) {
2039
2229
  switch (e) {
2040
2230
  case 1:
2041
2231
  return t.insuranceType !== void 0;
@@ -2053,9 +2243,9 @@ function be(e, t) {
2053
2243
  return !1;
2054
2244
  }
2055
2245
  }
2056
- function vt(e, t, a) {
2246
+ function Mt(e, t, a) {
2057
2247
  var i;
2058
- if (be(e, t))
2248
+ if (ke(e, t))
2059
2249
  switch (e) {
2060
2250
  case 1:
2061
2251
  return t.insuranceType;
@@ -2072,9 +2262,9 @@ function vt(e, t, a) {
2072
2262
  return n == null ? void 0 : n.label;
2073
2263
  }
2074
2264
  case 4: {
2075
- const n = $e(t);
2265
+ const n = He(t);
2076
2266
  if (!n) return;
2077
- const o = a.filtered.operators.find((u) => u.id === n);
2267
+ const o = a.filtered.operators.find((l) => l.id === n);
2078
2268
  return o == null ? void 0 : o.name;
2079
2269
  }
2080
2270
  case 5:
@@ -2085,108 +2275,114 @@ function vt(e, t, a) {
2085
2275
  return;
2086
2276
  }
2087
2277
  }
2088
- function Ya(e) {
2089
- const { cascade: t, value: a, setActiveStep: i } = e, { t: n } = B(), o = je(), u = t.visibleSteps.filter(
2090
- (c) => c === 1 || c === 2 || c === 3 || c === 4
2091
- ), p = u.some(
2092
- (c) => !be(c, a)
2278
+ function is(e) {
2279
+ const { cascade: t, value: a, setActiveStep: i } = e, { t: n } = O(), o = Ze(), l = t.visibleSteps.filter(
2280
+ (p) => p === 1 || p === 2 || p === 3 || p === 4
2281
+ ), u = l.some(
2282
+ (p) => !ke(p, a)
2093
2283
  );
2094
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2095
- p ? u.filter((c) => !be(c, a)).slice(0, 1).map((c) => /* @__PURE__ */ s("div", { children: z(c, e, { compactService: !0 }) }, `csf-${c}`)) : /* @__PURE__ */ s(
2284
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2285
+ u ? l.filter((p) => !ke(p, a)).slice(0, 1).map((p) => /* @__PURE__ */ s("div", { children: $(p, e, { compactService: !0 }) }, `csf-${p}`)) : /* @__PURE__ */ s(
2096
2286
  "div",
2097
2287
  {
2098
2288
  role: "group",
2099
2289
  "aria-label": n("booking.regionLabel"),
2100
2290
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
2101
- children: u.map((c) => {
2102
- const l = vt(c, a, t);
2103
- return l ? /* @__PURE__ */ b(
2104
- se,
2291
+ children: l.map((p) => {
2292
+ const r = Mt(p, a, t);
2293
+ return r ? /* @__PURE__ */ f(
2294
+ ie,
2105
2295
  {
2106
2296
  intent: "tonal",
2107
2297
  size: "sm",
2108
- onClick: () => i(c),
2298
+ onClick: () => i(p),
2109
2299
  children: [
2110
- o[c],
2300
+ o[p],
2111
2301
  ": ",
2112
- l
2302
+ r
2113
2303
  ]
2114
2304
  },
2115
- `csc-${c}`
2305
+ `csc-${p}`
2116
2306
  ) : null;
2117
2307
  })
2118
2308
  }
2119
2309
  ),
2120
- !p && t.gates.date ? (
2310
+ !u && t.gates.date ? (
2121
2311
  // four-day-grid embeds slots inline with the day strip — the
2122
2312
  // historic 2-col date|slot split collapses to a single column
2123
2313
  // so the picker spans the full width instead of orphaning an
2124
2314
  // empty right cell.
2125
- e.datePickerStyle === "four-day-grid" ? /* @__PURE__ */ s("div", { children: z(5, e) }) : /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
2126
- /* @__PURE__ */ s("div", { className: "ds:min-w-0", children: z(5, e) }),
2127
- /* @__PURE__ */ s("div", { className: "ds:min-w-0", children: a.date ? z(6, e) : null })
2315
+ e.datePickerStyle === "four-day-grid" ? /* @__PURE__ */ s("div", { children: $(5, e) }) : /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
2316
+ /* @__PURE__ */ s("div", { className: "ds:min-w-0", children: $(5, e) }),
2317
+ /* @__PURE__ */ s("div", { className: "ds:min-w-0", children: a.date ? $(6, e) : null })
2128
2318
  ] })
2129
2319
  ) : null,
2130
- t.gates.details ? /* @__PURE__ */ s("div", { children: z(7, e) }) : null
2320
+ t.gates.details ? /* @__PURE__ */ s("div", { children: $(7, e) }) : null
2131
2321
  ] });
2132
2322
  }
2133
- function Ja(e) {
2134
- const { cascade: t } = e, a = t.visibleSteps.filter(
2135
- (i) => i === 1 || i === 2 || i === 3 || i === 4
2323
+ function ns(e) {
2324
+ const { cascade: t, datePickerStyle: a } = e, i = t.visibleSteps.filter(
2325
+ (o) => o === 1 || o === 2 || o === 3 || o === 4
2136
2326
  );
2137
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2138
- /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
2139
- /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: a.map((i) => /* @__PURE__ */ s("div", { children: z(i, e, { compactService: !0 }) }, `fbf-${i}`)) }),
2140
- /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2141
- t.gates.date ? z(5, e) : null,
2142
- t.gates.slot && e.value.date ? z(6, e) : null
2143
- ] })
2144
- ] }),
2145
- t.gates.details ? z(7, e) : null
2327
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2328
+ /* @__PURE__ */ f(
2329
+ "div",
2330
+ {
2331
+ className: a === "four-day-grid" ? "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]" : "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2",
2332
+ children: [
2333
+ /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: i.map((o) => /* @__PURE__ */ s("div", { children: $(o, e, { compactService: !0 }) }, `fbf-${o}`)) }),
2334
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2335
+ t.gates.date ? $(5, e) : null,
2336
+ t.gates.slot && e.value.date ? $(6, e) : null
2337
+ ] })
2338
+ ]
2339
+ }
2340
+ ),
2341
+ t.gates.details ? $(7, e) : null
2146
2342
  ] });
2147
2343
  }
2148
- function Za(e) {
2149
- const { cascade: t, value: a, activeStep: i, setActiveStep: n, datePickerStyle: o } = e, { t: u } = B(), p = je(), c = C(
2150
- () => o === "four-day-grid" ? t.visibleSteps.filter((h) => h !== 6) : t.visibleSteps,
2344
+ function os(e) {
2345
+ const { cascade: t, value: a, activeStep: i, setActiveStep: n, datePickerStyle: o } = e, { t: l } = O(), u = Ze(), p = w(
2346
+ () => o === "four-day-grid" ? t.visibleSteps.filter((v) => v !== 6) : t.visibleSteps,
2151
2347
  [t.visibleSteps, o]
2152
- ), l = Math.max(0, c.indexOf(i)), d = c.length, m = C(
2153
- () => c.map((h) => ({ label: p[h] })),
2154
- [c, p]
2155
- ), y = l > 0, S = l < d - 1 && be(i, a);
2156
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2157
- /* @__PURE__ */ s(Tt, { activeStep: l, steps: m }),
2158
- /* @__PURE__ */ s("div", { children: z(i, e, { compactService: !0 }) }),
2159
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
2348
+ ), r = Math.max(0, p.indexOf(i)), c = p.length, m = w(
2349
+ () => p.map((v) => ({ label: u[v] })),
2350
+ [p, u]
2351
+ ), k = r > 0, I = r < c - 1 && ke(i, a);
2352
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2353
+ /* @__PURE__ */ s(zt, { activeStep: r, steps: m }),
2354
+ /* @__PURE__ */ s("div", { children: $(i, e, { compactService: !0 }) }),
2355
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
2160
2356
  /* @__PURE__ */ s(
2161
- se,
2357
+ ie,
2162
2358
  {
2163
2359
  intent: "ghost",
2164
2360
  size: "md",
2165
- disabled: !y,
2361
+ disabled: !k,
2166
2362
  onClick: () => {
2167
- const h = c[l - 1];
2168
- h && n(h);
2363
+ const v = p[r - 1];
2364
+ v && n(v);
2169
2365
  },
2170
- children: u("booking.actions.back")
2366
+ children: l("booking.actions.back")
2171
2367
  }
2172
2368
  ),
2173
2369
  i < 7 ? /* @__PURE__ */ s(
2174
- se,
2370
+ ie,
2175
2371
  {
2176
2372
  intent: "primary",
2177
2373
  size: "md",
2178
- disabled: !S,
2374
+ disabled: !I,
2179
2375
  onClick: () => {
2180
- const h = c[l + 1];
2181
- h && n(h);
2376
+ const v = p[r + 1];
2377
+ v && n(v);
2182
2378
  },
2183
- children: u("booking.actions.next")
2379
+ children: l("booking.actions.next")
2184
2380
  }
2185
2381
  ) : null
2186
2382
  ] })
2187
2383
  ] });
2188
2384
  }
2189
- const Wa = [], Xa = [], Qa = Qe(
2385
+ const rs = [], ds = [], ls = ot(
2190
2386
  ({
2191
2387
  variant: e = "inline-list",
2192
2388
  country: t,
@@ -2197,72 +2393,75 @@ const Wa = [], Xa = [], Qa = Qe(
2197
2393
  allowOperatorSelection: i = !1,
2198
2394
  lockedOperatorId: n,
2199
2395
  autoSelectSingleService: o = !1,
2200
- specialties: u,
2201
- services: p,
2202
- operators: c,
2203
- availableDates: l,
2204
- availableSlots: d,
2396
+ specialties: l,
2397
+ services: u,
2398
+ operators: p,
2399
+ availableDates: r,
2400
+ availableSlots: c,
2205
2401
  nextAvailableDate: m,
2206
- requireCodiceFiscale: y,
2207
- requireDateOfBirth: S,
2208
- requireInsuranceNumber: h,
2209
- showNote: w,
2210
- showReturningPatientFlag: N,
2211
- privacyPolicyUrl: I,
2212
- termsUrl: k,
2213
- validateCodiceFiscale: v,
2214
- validateInsuranceNumber: r,
2215
- confirmationChannels: O,
2216
- defaultConfirmationChannels: A,
2217
- value: f,
2218
- onChange: x,
2219
- onSubmit: _,
2220
- onStepChange: D,
2221
- onDateSelect: U,
2222
- onWindowChange: E,
2223
- datePickerStyle: R = "month-calendar",
2224
- loadingDates: Y,
2225
- loadingSlots: T,
2226
- submitting: X,
2227
- submitError: H,
2228
- mode: re = "live",
2229
- showModifyOnSuccess: Q = !0,
2230
- surface: _e = "flat",
2231
- emptyServicesSlot: J,
2232
- onboardingIncompleteSlot: ie,
2233
- "aria-label": de,
2234
- id: le,
2235
- className: Te,
2236
- ...Be
2237
- }, ye) => {
2238
- const { t: ce, i18n: ke } = B(), L = e ?? "inline-list", ee = ke.language ?? "en", g = u ?? Wa, M = c ?? Xa;
2239
- G(() => {
2240
- const F = Ca(f, {
2402
+ requireCodiceFiscale: k,
2403
+ requireDateOfBirth: I,
2404
+ requireInsuranceNumber: v,
2405
+ showNote: N,
2406
+ showReturningPatientFlag: M,
2407
+ privacyPolicyUrl: D,
2408
+ termsUrl: y,
2409
+ validateCodiceFiscale: b,
2410
+ validateInsuranceNumber: d,
2411
+ confirmationChannels: _,
2412
+ defaultConfirmationChannels: x,
2413
+ value: g,
2414
+ onChange: S,
2415
+ onSubmit: T,
2416
+ onStepChange: A,
2417
+ onDateSelect: G,
2418
+ onWindowChange: B,
2419
+ datePickerStyle: E = "month-calendar",
2420
+ specialtyPickerStyle: U,
2421
+ servicePickerStyle: P,
2422
+ operatorPickerStyle: Q,
2423
+ loadingDates: q,
2424
+ loadingSlots: pe,
2425
+ submitting: ee,
2426
+ submitError: xe,
2427
+ mode: Y = "live",
2428
+ showModifyOnSuccess: ne = !0,
2429
+ surface: me = "flat",
2430
+ emptyServicesSlot: Se,
2431
+ onboardingIncompleteSlot: Ie,
2432
+ "aria-label": Ve,
2433
+ id: oe,
2434
+ className: Le,
2435
+ ...Ne
2436
+ }, we) => {
2437
+ const { t: re, i18n: h } = O(), C = e ?? "inline-list", te = h.language ?? "en", J = l ?? rs, de = p ?? ds;
2438
+ H(() => {
2439
+ const R = Va(g, {
2241
2440
  useSpecialties: a,
2242
2441
  lockedOperatorId: n,
2243
2442
  autoSelectSingleService: o,
2244
- specialties: g,
2245
- services: p
2443
+ specialties: J,
2444
+ services: u
2246
2445
  });
2247
- (F.specialtyId !== f.specialtyId || F.operatorId !== f.operatorId || F.serviceId !== f.serviceId) && x(F);
2446
+ (R.specialtyId !== g.specialtyId || R.operatorId !== g.operatorId || R.serviceId !== g.serviceId) && S(R);
2248
2447
  }, [
2249
2448
  n,
2250
2449
  a,
2251
2450
  o,
2252
- g,
2253
- p
2451
+ J,
2452
+ u
2254
2453
  ]);
2255
- const P = C(
2256
- () => wa({
2454
+ const L = w(
2455
+ () => Ea({
2257
2456
  country: t,
2258
2457
  useSpecialties: a,
2259
2458
  allowOperatorSelection: i,
2260
2459
  lockedOperatorId: n,
2261
- specialties: g,
2262
- services: p,
2263
- operators: M,
2264
- availableSlots: d,
2265
- value: f
2460
+ specialties: J,
2461
+ services: u,
2462
+ operators: de,
2463
+ availableSlots: c,
2464
+ value: g
2266
2465
  }),
2267
2466
  [
2268
2467
  t,
@@ -2270,199 +2469,205 @@ const Wa = [], Xa = [], Qa = Qe(
2270
2469
  i,
2271
2470
  n,
2272
2471
  o,
2273
- g,
2274
- p,
2275
- M,
2276
- l,
2277
- d,
2278
- f
2472
+ J,
2473
+ u,
2474
+ de,
2475
+ r,
2476
+ c,
2477
+ g
2279
2478
  ]
2280
- ), [qe, ue] = j(
2281
- P.currentStep
2282
- ), He = ae(P.currentStep);
2283
- G(() => {
2284
- P.currentStep > He.current && ue(P.currentStep), He.current = P.currentStep;
2285
- }, [P.currentStep]);
2286
- const [me, pe] = j("idle"), [Oe, Pe] = j(null), Ge = q(
2287
- async (F) => {
2288
- if (!P.selectedSlot) return;
2289
- const Re = {
2290
- slot: P.selectedSlot,
2479
+ ), [We, ge] = K(
2480
+ L.currentStep
2481
+ ), Xe = se(L.currentStep);
2482
+ H(() => {
2483
+ L.currentStep > Xe.current && ge(L.currentStep), Xe.current = L.currentStep;
2484
+ }, [L.currentStep]);
2485
+ const [fe, he] = K("idle"), [Re, Fe] = K(null), Qe = j(
2486
+ async (R) => {
2487
+ if (!L.selectedSlot) return;
2488
+ const ze = {
2489
+ slot: L.selectedSlot,
2291
2490
  value: {
2292
- ...f,
2293
- details: F,
2294
- operatorId: $e(f) ?? f.operatorId
2491
+ ...g,
2492
+ details: R,
2493
+ operatorId: He(g) ?? g.operatorId
2295
2494
  },
2296
- details: F
2495
+ details: R
2297
2496
  };
2298
- pe("submitting");
2497
+ he("submitting");
2299
2498
  try {
2300
- await _(Re), Pe({
2301
- slot: P.selectedSlot,
2302
- details: F,
2303
- specialtyId: f.specialtyId,
2304
- serviceId: f.serviceId,
2305
- insuranceType: f.insuranceType,
2306
- operatorId: $e(f),
2307
- date: f.date
2308
- }), pe("success");
2499
+ await T(ze), Fe({
2500
+ slot: L.selectedSlot,
2501
+ details: R,
2502
+ specialtyId: g.specialtyId,
2503
+ serviceId: g.serviceId,
2504
+ insuranceType: g.insuranceType,
2505
+ operatorId: He(g),
2506
+ date: g.date
2507
+ }), he("success");
2309
2508
  } catch {
2310
- throw pe("error"), new Error("Booking submission failed");
2509
+ throw he("error"), new Error("Booking submission failed");
2311
2510
  }
2312
2511
  },
2313
- [P.selectedSlot, _, f]
2314
- ), ge = ae(null);
2315
- xt(ye, () => ge.current, []);
2316
- const fe = me === "success" ? 8 : P.currentStep, Ue = ae(null);
2317
- G(() => {
2318
- if (fe !== Ue.current && (Ue.current = fe, D == null || D(fe), fe === 8 && ge.current))
2512
+ [L.selectedSlot, T, g]
2513
+ ), ve = se(null);
2514
+ Tt(we, () => ve.current, []);
2515
+ const be = fe === "success" ? 8 : L.currentStep, et = se(null);
2516
+ H(() => {
2517
+ if (be !== et.current && (et.current = be, A == null || A(be), be === 8 && ve.current))
2319
2518
  try {
2320
- ge.current.scrollIntoView({
2519
+ ve.current.scrollIntoView({
2321
2520
  behavior: "smooth",
2322
2521
  block: "start"
2323
2522
  });
2324
2523
  } catch {
2325
- ge.current.scrollIntoView();
2524
+ ve.current.scrollIntoView();
2326
2525
  }
2327
- }, [fe, D]);
2328
- const Ee = C(
2526
+ }, [be, A]);
2527
+ const $e = w(
2329
2528
  () => ({
2330
- getVariant: () => L,
2529
+ getVariant: () => C,
2331
2530
  reset: () => {
2332
- x({}), Pe(null), pe("idle"), ue(1);
2531
+ S({}), Fe(null), he("idle"), ge(1);
2333
2532
  },
2334
- goToStep: (F) => {
2335
- ue(F);
2533
+ goToStep: (R) => {
2534
+ ge(R);
2336
2535
  }
2337
2536
  }),
2338
- [L, x]
2537
+ [C, S]
2339
2538
  );
2340
- Nt(ba, Ee, le);
2341
- const bt = de ?? ce("booking.regionLabel"), yt = C(() => me !== "success" || !Oe ? null : /* @__PURE__ */ s(
2342
- Ha,
2539
+ Ot(Da, $e, oe);
2540
+ const Dt = Ve ?? re("booking.regionLabel"), At = w(() => fe !== "success" || !Re ? null : /* @__PURE__ */ s(
2541
+ ts,
2343
2542
  {
2344
- snapshot: Oe,
2345
- operators: M,
2346
- specialties: g,
2347
- services: p,
2348
- locale: ee,
2349
- mode: re,
2350
- showModify: Q,
2351
- onReset: () => Ee.reset(),
2543
+ snapshot: Re,
2544
+ operators: de,
2545
+ specialties: J,
2546
+ services: u,
2547
+ locale: te,
2548
+ mode: Y,
2549
+ showModify: ne,
2550
+ onReset: () => $e.reset(),
2352
2551
  onModify: () => {
2353
- Pe(null), pe("idle"), ue(7);
2552
+ Fe(null), he("idle"), ge(7);
2354
2553
  }
2355
2554
  }
2356
2555
  ), [
2357
- me,
2358
- Oe,
2359
- M,
2360
- g,
2361
- p,
2362
- ee,
2363
- re,
2364
- Q,
2365
- Ee
2366
- ]), kt = C(() => {
2367
- if (me === "success") return null;
2368
- const F = L === "accordion" ? Ua : L === "calendar" ? Ya : L === "flexible" ? Ja : L === "progress" ? Za : Ga, Re = {
2369
- cascade: P,
2556
+ fe,
2557
+ Re,
2558
+ de,
2559
+ J,
2560
+ u,
2561
+ te,
2562
+ Y,
2563
+ ne,
2564
+ $e
2565
+ ]), _t = w(() => {
2566
+ if (fe === "success") return null;
2567
+ const R = C === "accordion" ? ss : C === "calendar" ? is : C === "flexible" ? ns : C === "progress" ? os : as, ze = {
2568
+ cascade: L,
2370
2569
  inputs: {
2371
- specialties: g,
2372
- services: p,
2373
- operators: M,
2374
- availableDates: l,
2375
- availableSlots: d,
2570
+ specialties: J,
2571
+ services: u,
2572
+ operators: de,
2573
+ availableDates: r,
2574
+ availableSlots: c,
2376
2575
  nextAvailableDate: m
2377
2576
  },
2378
- value: f,
2379
- onChange: x,
2380
- onSubmit: Ge,
2577
+ value: g,
2578
+ onChange: S,
2579
+ onSubmit: Qe,
2381
2580
  policy: { country: t, lockedOperatorId: n },
2382
2581
  detailsProps: {
2383
- requireCodiceFiscale: y,
2384
- requireDateOfBirth: S,
2385
- requireInsuranceNumber: h,
2386
- insuranceType: f.insuranceType,
2387
- showNote: w,
2388
- showReturningPatientFlag: N,
2389
- privacyPolicyUrl: I,
2390
- termsUrl: k,
2391
- validateCodiceFiscale: v,
2392
- validateInsuranceNumber: r,
2393
- confirmationChannels: O,
2394
- defaultConfirmationChannels: A,
2395
- submitError: H
2582
+ requireCodiceFiscale: k,
2583
+ requireDateOfBirth: I,
2584
+ requireInsuranceNumber: v,
2585
+ insuranceType: g.insuranceType,
2586
+ showNote: N,
2587
+ showReturningPatientFlag: M,
2588
+ privacyPolicyUrl: D,
2589
+ termsUrl: y,
2590
+ validateCodiceFiscale: b,
2591
+ validateInsuranceNumber: d,
2592
+ confirmationChannels: _,
2593
+ defaultConfirmationChannels: x,
2594
+ submitError: xe
2396
2595
  },
2397
- emptyServicesSlot: J,
2398
- onboardingIncompleteSlot: ie,
2399
- loadingDates: Y,
2400
- loadingSlots: T,
2401
- onDateSelect: U,
2402
- onWindowChange: E,
2403
- datePickerStyle: R,
2404
- submitting: X,
2405
- locale: ee,
2406
- activeStep: qe,
2407
- setActiveStep: ue
2596
+ emptyServicesSlot: Se,
2597
+ onboardingIncompleteSlot: Ie,
2598
+ loadingDates: q,
2599
+ loadingSlots: pe,
2600
+ onDateSelect: G,
2601
+ onWindowChange: B,
2602
+ datePickerStyle: E,
2603
+ specialtyPickerStyle: U,
2604
+ servicePickerStyle: P,
2605
+ operatorPickerStyle: Q,
2606
+ submitting: ee,
2607
+ locale: te,
2608
+ activeStep: We,
2609
+ setActiveStep: ge
2408
2610
  };
2409
- return /* @__PURE__ */ s(F, { ...Re });
2611
+ return /* @__PURE__ */ s(R, { ...ze });
2410
2612
  }, [
2411
- me,
2613
+ fe,
2614
+ C,
2412
2615
  L,
2413
- P,
2414
- g,
2415
- p,
2416
- M,
2417
- l,
2418
- d,
2616
+ J,
2617
+ u,
2618
+ de,
2619
+ r,
2620
+ c,
2419
2621
  m,
2420
- f,
2421
- x,
2422
- Ge,
2622
+ g,
2623
+ S,
2624
+ Qe,
2423
2625
  t,
2424
2626
  n,
2425
- y,
2426
- S,
2427
- h,
2428
- H,
2429
- w,
2430
- N,
2431
- I,
2432
2627
  k,
2628
+ I,
2433
2629
  v,
2434
- r,
2435
- O,
2436
- A,
2437
- J,
2438
- ie,
2439
- Y,
2440
- T,
2441
- U,
2630
+ xe,
2631
+ N,
2632
+ M,
2633
+ D,
2634
+ y,
2635
+ b,
2636
+ d,
2637
+ _,
2638
+ x,
2639
+ Se,
2640
+ Ie,
2641
+ q,
2642
+ pe,
2643
+ G,
2644
+ B,
2442
2645
  E,
2443
- R,
2444
- X,
2646
+ U,
2647
+ P,
2648
+ Q,
2445
2649
  ee,
2446
- qe
2650
+ te,
2651
+ We
2447
2652
  ]);
2448
- return /* @__PURE__ */ b(
2653
+ return /* @__PURE__ */ f(
2449
2654
  "div",
2450
2655
  {
2451
- ref: ge,
2656
+ ref: ve,
2452
2657
  role: "region",
2453
- "aria-label": bt,
2454
- id: le,
2658
+ "aria-label": Dt,
2659
+ id: oe,
2455
2660
  "data-component": "booking",
2456
- "data-component-id": le,
2457
- "data-variant": L,
2458
- className: Ta({
2459
- variant: L,
2460
- surface: _e,
2461
- className: Te
2661
+ "data-component-id": oe,
2662
+ "data-variant": C,
2663
+ className: za({
2664
+ variant: C,
2665
+ surface: me,
2666
+ className: Le
2462
2667
  }),
2463
- ...Be,
2668
+ ...Ne,
2464
2669
  children: [
2465
- /* @__PURE__ */ b(
2670
+ /* @__PURE__ */ f(
2466
2671
  "div",
2467
2672
  {
2468
2673
  className: [
@@ -2474,22 +2679,22 @@ const Wa = [], Xa = [], Qa = Qe(
2474
2679
  "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]"
2475
2680
  ].join(" "),
2476
2681
  children: [
2477
- /* @__PURE__ */ s("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: ce("booking.regionLabel") }),
2478
- /* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: ce("booking.headingSubtitle") })
2682
+ /* @__PURE__ */ s("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: re("booking.regionLabel") }),
2683
+ /* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: re("booking.headingSubtitle") })
2479
2684
  ]
2480
2685
  }
2481
2686
  ),
2482
- yt ?? kt
2687
+ At ?? _t
2483
2688
  ]
2484
2689
  }
2485
2690
  );
2486
2691
  }
2487
2692
  );
2488
- Qa.displayName = "Booking";
2693
+ ls.displayName = "Booking";
2489
2694
  export {
2490
- Qa as B,
2491
- Fe as C,
2492
- ve as O,
2493
- ba as b
2695
+ ls as B,
2696
+ qe as C,
2697
+ X as O,
2698
+ Da as b
2494
2699
  };
2495
- //# sourceMappingURL=booking-Db4BQ9eH.js.map
2700
+ //# sourceMappingURL=booking-eM0y0NIR.js.map