@alfadocs/ui-kit-debug 1.54.0 → 1.54.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/_chunks/{booking-CPUjwxj0.js → booking-BN7TXe27.js} +1542 -1532
  2. package/dist/_chunks/booking-BN7TXe27.js.map +1 -0
  3. package/dist/_chunks/{contact-profile-card-h0QX4_5B.js → contact-profile-card-B-HzocbB.js} +45 -47
  4. package/dist/_chunks/contact-profile-card-B-HzocbB.js.map +1 -0
  5. package/dist/_chunks/error-page-C15GfNEj.js +312 -0
  6. package/dist/_chunks/error-page-C15GfNEj.js.map +1 -0
  7. package/dist/_chunks/{error-page-illustration-QGJAvuFB.js → error-page-illustration-bFti0VEc.js} +73 -56
  8. package/dist/_chunks/error-page-illustration-bFti0VEc.js.map +1 -0
  9. package/dist/_chunks/{login-dev-card-C7wo-Hv1.js → login-dev-card-q7iTojvV.js} +2 -2
  10. package/dist/_chunks/{login-dev-card-C7wo-Hv1.js.map → login-dev-card-q7iTojvV.js.map} +1 -1
  11. package/dist/agent-catalog.json +5 -1
  12. package/dist/components/booking/booking-types.d.ts +14 -2
  13. package/dist/components/booking/booking-types.d.ts.map +1 -1
  14. package/dist/components/booking/booking.d.ts.map +1 -1
  15. package/dist/components/booking/index.js +1 -1
  16. package/dist/components/contact-profile-card/contact-profile-card.d.ts.map +1 -1
  17. package/dist/components/contact-profile-card/index.js +1 -1
  18. package/dist/index.js +136 -134
  19. package/dist/index.js.map +1 -1
  20. package/dist/patterns/error-page/error-page-illustration.d.ts +3 -1
  21. package/dist/patterns/error-page/error-page-illustration.d.ts.map +1 -1
  22. package/dist/patterns/error-page/error-page.d.ts +34 -2
  23. package/dist/patterns/error-page/error-page.d.ts.map +1 -1
  24. package/dist/patterns/error-page/index.d.ts +2 -1
  25. package/dist/patterns/error-page/index.d.ts.map +1 -1
  26. package/dist/patterns/error-page/index.js +7 -5
  27. package/dist/patterns/error-page/index.js.map +1 -1
  28. package/dist/patterns/login-form/index.js +1 -1
  29. package/dist/tokens.css +1 -1
  30. package/package.json +1 -1
  31. package/dist/_chunks/booking-CPUjwxj0.js.map +0 -1
  32. package/dist/_chunks/contact-profile-card-h0QX4_5B.js.map +0 -1
  33. package/dist/_chunks/error-page-CKFJlekz.js +0 -275
  34. package/dist/_chunks/error-page-CKFJlekz.js.map +0 -1
  35. package/dist/_chunks/error-page-illustration-QGJAvuFB.js.map +0 -1
@@ -1,55 +1,55 @@
1
- import { jsx as s, jsxs as v, Fragment as se } from "react/jsx-runtime";
2
- import { forwardRef as ls, useId as Rt, useRef as _, useCallback as fe, useState as X, useEffect as V, useMemo as L, Fragment as Rs, useImperativeHandle as Ps } from "react";
3
- import { c as kt } from "./index-D2ZczOXr.js";
4
- import { useTranslation as U, Trans as Vs } from "react-i18next";
5
- import { u as $s } from "./registry-DvAUVLHh.js";
6
- import { A as Q } from "./alert-BhCstf2h.js";
7
- import { B as Je } from "./button-CYPx2xFq.js";
1
+ import { jsx as s, jsxs as v, Fragment as ne } from "react/jsx-runtime";
2
+ import { forwardRef as us, useId as Pt, useRef as E, useCallback as ue, useState as Q, useEffect as q, useMemo as R, Fragment as Ps, useImperativeHandle as Vs } from "react";
3
+ import { c as bt } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as G, Trans as $s } from "react-i18next";
5
+ import { u as qs } from "./registry-DvAUVLHh.js";
6
+ import { A as ee } from "./alert-BhCstf2h.js";
7
+ import { B as Xe } from "./button-CYPx2xFq.js";
8
8
  import { C as rt } from "./checkbox--ndmyokr.js";
9
- import { C as qs } from "./checkbox-group-B0oZHNT3.js";
10
- import { D as Ks } from "./date-picker-BnhBmcH6.js";
11
- import { E as zs } from "./email-input-Cmeo4zdT.js";
12
- import { F as Ve } from "./form-field-D9WfDpYB.js";
13
- import { P as js } from "./phone-input-BzeUr49H.js";
14
- import { T as Us } from "./text-area-CDuItrvL.js";
15
- import { T as Tt } from "./text-input-lZ2-t-p2.js";
16
- import { A as Gs } from "./address-fields-1pD-8hML.js";
17
- import { S as us } from "./spinner-a0FTYX9Q.js";
18
- import { a as St } from "./format-price-DAbh61Lz.js";
19
- import { C as Hs } from "./credit-card-D9XZsHGA.js";
20
- import { B as ps } from "./badge-hnBt8o7n.js";
21
- import { I as ss } from "./icon-button-mKIvw90h.js";
22
- import { S as Pt } from "./select-DHPmASkG.js";
23
- import { C as Wt } from "./combobox-DppVSuUm.js";
24
- import { M as Yt } from "./multi-select-CVb6PJOK.js";
25
- import { S as Bt } from "./skeleton-B1KTdJ4N.js";
26
- import { E as ms } from "./empty-state-CgvmPPvW.js";
27
- import { S as Js } from "./stepper-accordion-BPNS6J6B.js";
28
- import { S as Ws } from "./stepper-progress-D6H8wQiV.js";
29
- import { S as Ys } from "./slot-grid-kCDoV3k4.js";
30
- import { p as me } from "./parseISO-y3LncvfO.js";
31
- import { C as Zs } from "./chevron-down-DWE7GSq9.js";
32
- import { r as at, f as Lt, b as ns } from "./format-D-1gTdHF.js";
33
- import { x as fs, d as ot, a as jt, i as Xs, s as bt, m as Qs, y as Dt } from "./date-picker-variants-B3AFKDSu.js";
34
- import { s as en } from "./subDays-XBMBTVOO.js";
35
- import { C as tn } from "./chevron-left-B8cOyH-V.js";
36
- import { C as sn } from "./chevron-right-I9AeSxH2.js";
37
- import { c as Ie } from "./createLucideIcon-DhHxpK9K.js";
38
- import { M as nn, S as rn } from "./sun-Bj9Mr553.js";
39
- import { S as an } from "./stethoscope-sZXGC43m.js";
40
- import { H as on } from "./heart-pulse-BCppJyN2.js";
41
- import { E as cn } from "./eye-BjhN2nYf.js";
42
- import { B as dn } from "./baby-Dku-Xvg9.js";
43
- import { S as ln } from "./scan-line-CNseIHQ0.js";
44
- import { A as un } from "./astroid-BN4f5VXU.js";
45
- import { C as pn } from "./clipboard-check-BeAGxDVT.js";
9
+ import { C as Ks } from "./checkbox-group-B0oZHNT3.js";
10
+ import { D as zs } from "./date-picker-BnhBmcH6.js";
11
+ import { E as js } from "./email-input-Cmeo4zdT.js";
12
+ import { F as Ue } from "./form-field-D9WfDpYB.js";
13
+ import { P as Us } from "./phone-input-BzeUr49H.js";
14
+ import { T as Gs } from "./text-area-CDuItrvL.js";
15
+ import { T as Dt } from "./text-input-lZ2-t-p2.js";
16
+ import { A as Hs } from "./address-fields-1pD-8hML.js";
17
+ import { S as ps } from "./spinner-a0FTYX9Q.js";
18
+ import { a as yt } from "./format-price-DAbh61Lz.js";
19
+ import { C as Js } from "./credit-card-D9XZsHGA.js";
20
+ import { B as ms } from "./badge-hnBt8o7n.js";
21
+ import { I as ns } from "./icon-button-mKIvw90h.js";
22
+ import { S as Vt } from "./select-DHPmASkG.js";
23
+ import { C as Yt } from "./combobox-DppVSuUm.js";
24
+ import { M as Zt } from "./multi-select-CVb6PJOK.js";
25
+ import { S as Et } from "./skeleton-B1KTdJ4N.js";
26
+ import { E as fs } from "./empty-state-CgvmPPvW.js";
27
+ import { S as Ws } from "./stepper-accordion-BPNS6J6B.js";
28
+ import { S as Ys } from "./stepper-progress-D6H8wQiV.js";
29
+ import { S as Zs } from "./slot-grid-kCDoV3k4.js";
30
+ import { p as le } from "./parseISO-y3LncvfO.js";
31
+ import { C as Xs } from "./chevron-down-DWE7GSq9.js";
32
+ import { r as at, f as Bt, b as is } from "./format-D-1gTdHF.js";
33
+ import { x as gs, d as ot, a as Ut, i as Qs, s as ht, m as en, y as Ot } from "./date-picker-variants-B3AFKDSu.js";
34
+ import { s as tn } from "./subDays-XBMBTVOO.js";
35
+ import { C as sn } from "./chevron-left-B8cOyH-V.js";
36
+ import { C as nn } from "./chevron-right-I9AeSxH2.js";
37
+ import { c as ke } from "./createLucideIcon-DhHxpK9K.js";
38
+ import { M as rn, S as an } from "./sun-Bj9Mr553.js";
39
+ import { S as on } from "./stethoscope-sZXGC43m.js";
40
+ import { H as cn } from "./heart-pulse-BCppJyN2.js";
41
+ import { E as dn } from "./eye-BjhN2nYf.js";
42
+ import { B as ln } from "./baby-Dku-Xvg9.js";
43
+ import { S as un } from "./scan-line-CNseIHQ0.js";
44
+ import { A as pn } from "./astroid-BN4f5VXU.js";
45
+ import { C as mn } from "./clipboard-check-BeAGxDVT.js";
46
46
  /**
47
47
  * @license lucide-react v1.22.0 - ISC
48
48
  *
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
51
  */
52
- const mn = [
52
+ const fn = [
53
53
  [
54
54
  "path",
55
55
  {
@@ -57,14 +57,14 @@ const mn = [
57
57
  key: "169zse"
58
58
  }
59
59
  ]
60
- ], fn = Ie("activity", mn);
60
+ ], gn = ke("activity", fn);
61
61
  /**
62
62
  * @license lucide-react v1.22.0 - ISC
63
63
  *
64
64
  * This source code is licensed under the ISC license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
66
  */
67
- const gn = [
67
+ const hn = [
68
68
  [
69
69
  "path",
70
70
  {
@@ -72,14 +72,14 @@ const gn = [
72
72
  key: "w610uw"
73
73
  }
74
74
  ]
75
- ], hn = Ie("bone", gn);
75
+ ], vn = ke("bone", hn);
76
76
  /**
77
77
  * @license lucide-react v1.22.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
81
  */
82
- const vn = [
82
+ const bn = [
83
83
  ["path", { d: "M12 18V5", key: "adv99a" }],
84
84
  ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
85
85
  ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
@@ -88,14 +88,14 @@ const vn = [
88
88
  ["path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517", key: "1gq6am" }],
89
89
  ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
90
90
  ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
91
- ], bn = Ie("brain", vn);
91
+ ], yn = ke("brain", bn);
92
92
  /**
93
93
  * @license lucide-react v1.22.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
97
  */
98
- const yn = [
98
+ const kn = [
99
99
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
100
100
  ["path", { d: "M16 2v4", key: "4m81vk" }],
101
101
  ["path", { d: "M3 10h18", key: "8toen8" }],
@@ -104,76 +104,76 @@ const yn = [
104
104
  ["path", { d: "M13 18H7", key: "bb0bb7" }],
105
105
  ["path", { d: "M7 14h.01", key: "1qa3f1" }],
106
106
  ["path", { d: "M17 18h.01", key: "1bdyru" }]
107
- ], kn = Ie("calendar-range", yn);
107
+ ], Sn = ke("calendar-range", kn);
108
108
  /**
109
109
  * @license lucide-react v1.22.0 - ISC
110
110
  *
111
111
  * This source code is licensed under the ISC license.
112
112
  * See the LICENSE file in the root directory of this source tree.
113
113
  */
114
- const Sn = [
114
+ const xn = [
115
115
  ["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" }],
116
116
  ["path", { d: "M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4", key: "1qnva7" }]
117
- ], xn = Ie("ear", Sn);
117
+ ], In = ke("ear", xn);
118
118
  /**
119
119
  * @license lucide-react v1.22.0 - ISC
120
120
  *
121
121
  * This source code is licensed under the ISC license.
122
122
  * See the LICENSE file in the root directory of this source tree.
123
123
  */
124
- const In = [
124
+ const Nn = [
125
125
  ["path", { d: "M6 18h8", key: "1borvv" }],
126
126
  ["path", { d: "M3 22h18", key: "8prr45" }],
127
127
  ["path", { d: "M14 22a7 7 0 1 0 0-14h-1", key: "1jwaiy" }],
128
128
  ["path", { d: "M9 14h2", key: "197e7h" }],
129
129
  ["path", { d: "M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z", key: "1bmzmy" }],
130
130
  ["path", { d: "M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3", key: "1drr47" }]
131
- ], Nn = Ie("microscope", In);
131
+ ], wn = ke("microscope", Nn);
132
132
  /**
133
133
  * @license lucide-react v1.22.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
137
  */
138
- const wn = [
138
+ const Cn = [
139
139
  [
140
140
  "path",
141
141
  { 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" }
142
142
  ],
143
143
  ["path", { d: "m8.5 8.5 7 7", key: "rvfmvr" }]
144
- ], Cn = Ie("pill", wn);
144
+ ], An = ke("pill", Cn);
145
145
  /**
146
146
  * @license lucide-react v1.22.0 - ISC
147
147
  *
148
148
  * This source code is licensed under the ISC license.
149
149
  * See the LICENSE file in the root directory of this source tree.
150
150
  */
151
- const An = [
151
+ const Tn = [
152
152
  ["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
153
153
  ["path", { d: "M8.12 8.12 12 12", key: "1alkpv" }],
154
154
  ["path", { d: "M20 4 8.12 15.88", key: "xgtan2" }],
155
155
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
156
156
  ["path", { d: "M14.8 14.8 20 20", key: "ptml3r" }]
157
- ], Tn = Ie("scissors", An);
157
+ ], Dn = ke("scissors", Tn);
158
158
  /**
159
159
  * @license lucide-react v1.22.0 - ISC
160
160
  *
161
161
  * This source code is licensed under the ISC license.
162
162
  * See the LICENSE file in the root directory of this source tree.
163
163
  */
164
- const Dn = [
164
+ const On = [
165
165
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
166
166
  ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
167
167
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
168
168
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
169
- ], On = Ie("smile", Dn);
169
+ ], Mn = ke("smile", On);
170
170
  /**
171
171
  * @license lucide-react v1.22.0 - ISC
172
172
  *
173
173
  * This source code is licensed under the ISC license.
174
174
  * See the LICENSE file in the root directory of this source tree.
175
175
  */
176
- const Mn = [
176
+ const Fn = [
177
177
  ["path", { d: "M12 10V2", key: "16sf7g" }],
178
178
  ["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }],
179
179
  ["path", { d: "M2 18h2", key: "j10viu" }],
@@ -182,25 +182,25 @@ const Mn = [
182
182
  ["path", { d: "M22 22H2", key: "19qnx5" }],
183
183
  ["path", { d: "m16 6-4 4-4-4", key: "6wukr" }],
184
184
  ["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]
185
- ], Fn = Ie("sunset", Mn);
185
+ ], _n = ke("sunset", Fn);
186
186
  /**
187
187
  * @license lucide-react v1.22.0 - ISC
188
188
  *
189
189
  * This source code is licensed under the ISC license.
190
190
  * See the LICENSE file in the root directory of this source tree.
191
191
  */
192
- const _n = [
192
+ const Ln = [
193
193
  ["path", { d: "m18 2 4 4", key: "22kx64" }],
194
194
  ["path", { d: "m17 7 3-3", key: "1w1zoj" }],
195
195
  ["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" }],
196
196
  ["path", { d: "m9 11 4 4", key: "rovt3i" }],
197
197
  ["path", { d: "m5 19-3 3", key: "59f2uf" }],
198
198
  ["path", { d: "m14 4 6 6", key: "yqp9t2" }]
199
- ], is = Ie("syringe", _n);
200
- function Ln(e, t, n) {
201
- return fs(e, -1, n);
199
+ ], rs = ke("syringe", Ln);
200
+ function Bn(e, t, n) {
201
+ return gs(e, -1, n);
202
202
  }
203
- const Bn = {
203
+ const En = {
204
204
  id: "booking",
205
205
  // `view_change` removed (0.69): the layout `variant` is a fixed prop — the
206
206
  // handle exposes only `getVariant` (state), no action mutates it. The flow's
@@ -275,12 +275,12 @@ const Bn = {
275
275
  description: "Sourced from the id prop."
276
276
  }
277
277
  }
278
- }, Ht = [
278
+ }, Jt = [
279
279
  "email",
280
280
  "whatsapp",
281
281
  "sms"
282
- ], we = "all", En = "de";
283
- function Rn(e) {
282
+ ], Ce = "all", Rn = "de";
283
+ function Pn(e) {
284
284
  const t = e.lockedOperatorId;
285
285
  return [...t ? e.operatorsByService ? e.specialties.filter(
286
286
  (r) => e.services.some(
@@ -293,11 +293,11 @@ function Rn(e) {
293
293
  var i;
294
294
  return (i = r.operatorIds) == null ? void 0 : i.includes(t);
295
295
  }) : e.specialties].sort((r, i) => {
296
- const a = r.sequenceNumber ?? Number.POSITIVE_INFINITY, d = i.sequenceNumber ?? Number.POSITIVE_INFINITY;
297
- return a - d;
296
+ const a = r.sequenceNumber ?? Number.POSITIVE_INFINITY, c = i.sequenceNumber ?? Number.POSITIVE_INFINITY;
297
+ return a - c;
298
298
  });
299
299
  }
300
- function Pn(e) {
300
+ function Vn(e) {
301
301
  let t = e.services;
302
302
  if (e.lockedOperatorId && (t = t.filter(
303
303
  (r) => {
@@ -305,15 +305,15 @@ function Pn(e) {
305
305
  return (i = r.operatorIds) == null ? void 0 : i.includes(e.lockedOperatorId);
306
306
  }
307
307
  )), e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) {
308
- const r = $e(e.value);
308
+ const r = Ge(e.value);
309
309
  r.length > 0 && (t = t.filter(
310
310
  (i) => i.specialtyId !== void 0 && r.includes(i.specialtyId)
311
311
  ));
312
312
  }
313
313
  return t;
314
314
  }
315
- function Vn(e) {
316
- const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties, n = Te(e.value);
315
+ function $n(e) {
316
+ const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties, n = _e(e.value);
317
317
  if ((!t || e.operatorsByService) && n.length > 0)
318
318
  return e.operators.filter(
319
319
  (r) => {
@@ -322,48 +322,48 @@ function Vn(e) {
322
322
  }
323
323
  );
324
324
  if (t) {
325
- const r = $e(e.value);
325
+ const r = Ge(e.value);
326
326
  if (r.length > 0)
327
327
  return e.operators.filter(
328
328
  (i) => {
329
329
  var a;
330
- return (a = i.specialtyIds) == null ? void 0 : a.some((d) => r.includes(d));
330
+ return (a = i.specialtyIds) == null ? void 0 : a.some((c) => r.includes(c));
331
331
  }
332
332
  );
333
333
  }
334
334
  return [];
335
335
  }
336
- function $n(e, t) {
337
- const n = e.country === En, r = !n || e.value.insuranceType !== void 0, a = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && r, d = $e(e.value).length > 0, g = !a || d, p = Te(e.value).length > 0, h = !g || p, o = t.operators, c = !!e.allowOperatorSelection && h && p && !e.lockedOperatorId && o.length > 1, f = h && p, I = (!f || e.value.date !== void 0) && e.value.date !== void 0, E = (!I || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, w = p && o.length === 0;
336
+ function qn(e, t) {
337
+ const n = e.country === Rn, r = !n || e.value.insuranceType !== void 0, a = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && r, c = Ge(e.value).length > 0, p = !a || c, m = _e(e.value).length > 0, g = !p || m, l = t.operators, o = !!e.allowOperatorSelection && g && m && !e.lockedOperatorId && l.length > 1, u = g && m, I = (!u || e.value.date !== void 0) && e.value.date !== void 0, M = (!I || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, w = m && l.length === 0;
338
338
  return {
339
339
  insurance: n,
340
340
  specialty: a,
341
- service: g,
342
- operator: c,
343
- date: f,
341
+ service: p,
342
+ operator: o,
343
+ date: u,
344
344
  slot: I,
345
- details: E,
345
+ details: M,
346
346
  onboardingIncomplete: w
347
347
  };
348
348
  }
349
- function qn(e, t) {
349
+ function Kn(e, t) {
350
350
  const n = [];
351
351
  return t.insurance && n.push(1), t.specialty && n.push(2), n.push(3), t.operator && n.push(4), n.push(5), n.push(6), n.push(7), {
352
352
  currentStep: n.find(
353
- (i) => !Ae(i, e.value)
353
+ (i) => !Fe(i, e.value)
354
354
  ) ?? 7,
355
355
  visibleSteps: n
356
356
  };
357
357
  }
358
- function Ae(e, t) {
358
+ function Fe(e, t) {
359
359
  switch (e) {
360
360
  case 1:
361
361
  return t.insuranceType !== void 0;
362
362
  // 0.34.0: array-or-single — satisfied when EITHER form is present.
363
363
  case 2:
364
- return $e(t).length > 0;
364
+ return Ge(t).length > 0;
365
365
  case 3:
366
- return Te(t).length > 0;
366
+ return _e(t).length > 0;
367
367
  // Always satisfied, like its gate: "no preference" is a valid answer,
368
368
  // whether it is the `'all'` sentinel or an empty multi-select.
369
369
  case 4:
@@ -377,30 +377,30 @@ function Ae(e, t) {
377
377
  return !1;
378
378
  }
379
379
  }
380
- function Kn(e) {
380
+ function zn(e) {
381
381
  const t = {
382
- specialties: Rn(e),
383
- services: Pn(e),
384
- operators: Vn(e)
385
- }, n = $n(e, t), { currentStep: r, visibleSteps: i } = qn(e, n);
382
+ specialties: Pn(e),
383
+ services: Vn(e),
384
+ operators: $n(e)
385
+ }, n = qn(e, t), { currentStep: r, visibleSteps: i } = Kn(e, n);
386
386
  let a;
387
387
  if (e.value.date && e.value.slotKey) {
388
- const h = e.availableSlots[e.value.date];
389
- h && (a = h.find((o) => o.key === e.value.slotKey));
388
+ const g = e.availableSlots[e.value.date];
389
+ g && (a = g.find((l) => l.key === e.value.slotKey));
390
390
  }
391
- const d = Te(e.value), u = d.length > 0 ? e.services.find((h) => h.id === d[0]) : void 0, g = $e(e.value).length > 0, p = d.length > 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!n.insurance || e.value.insuranceType !== void 0) && (!n.specialty || g);
391
+ const c = _e(e.value), f = c.length > 0 ? e.services.find((g) => g.id === c[0]) : void 0, p = Ge(e.value).length > 0, m = c.length > 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!n.insurance || e.value.insuranceType !== void 0) && (!n.specialty || p);
392
392
  return {
393
393
  gates: n,
394
394
  filtered: t,
395
395
  currentStep: r,
396
396
  totalSteps: i.length,
397
397
  visibleSteps: i,
398
- isReadyToSubmit: p,
399
- durationMin: u == null ? void 0 : u.durationMin,
398
+ isReadyToSubmit: m,
399
+ durationMin: f == null ? void 0 : f.durationMin,
400
400
  selectedSlot: a
401
401
  };
402
402
  }
403
- function gs(e, t) {
403
+ function hs(e, t) {
404
404
  return {
405
405
  ...e,
406
406
  insuranceType: t,
@@ -412,7 +412,7 @@ function gs(e, t) {
412
412
  details: void 0
413
413
  };
414
414
  }
415
- function hs(e, t) {
415
+ function vs(e, t) {
416
416
  return {
417
417
  ...e,
418
418
  specialtyId: t,
@@ -426,7 +426,7 @@ function hs(e, t) {
426
426
  details: void 0
427
427
  };
428
428
  }
429
- function vs(e, t) {
429
+ function bs(e, t) {
430
430
  return {
431
431
  ...e,
432
432
  specialtyId: void 0,
@@ -440,7 +440,7 @@ function vs(e, t) {
440
440
  details: void 0
441
441
  };
442
442
  }
443
- function bs(e, t) {
443
+ function ys(e, t) {
444
444
  return {
445
445
  ...e,
446
446
  serviceId: t,
@@ -448,27 +448,27 @@ function bs(e, t) {
448
448
  // Default the operator to the "All operators" sentinel so a patient
449
449
  // who doesn't care about picking lands on a satisfied step 4 without
450
450
  // any further input.
451
- operatorId: t ? we : void 0,
451
+ operatorId: t ? Ce : void 0,
452
452
  operatorIds: void 0,
453
453
  date: void 0,
454
454
  slotKey: void 0,
455
455
  details: void 0
456
456
  };
457
457
  }
458
- function ys(e, t) {
458
+ function ks(e, t) {
459
459
  const n = !!t && t.length > 0;
460
460
  return {
461
461
  ...e,
462
462
  serviceId: void 0,
463
463
  serviceIds: t,
464
- operatorId: n ? we : void 0,
464
+ operatorId: n ? Ce : void 0,
465
465
  operatorIds: void 0,
466
466
  date: void 0,
467
467
  slotKey: void 0,
468
468
  details: void 0
469
469
  };
470
470
  }
471
- function ks(e, t) {
471
+ function Ss(e, t) {
472
472
  return {
473
473
  ...e,
474
474
  operatorId: t,
@@ -478,7 +478,7 @@ function ks(e, t) {
478
478
  details: void 0
479
479
  };
480
480
  }
481
- function Ss(e, t) {
481
+ function xs(e, t) {
482
482
  return {
483
483
  ...e,
484
484
  operatorId: void 0,
@@ -488,16 +488,16 @@ function Ss(e, t) {
488
488
  details: void 0
489
489
  };
490
490
  }
491
- function $e(e) {
491
+ function Ge(e) {
492
492
  return e.specialtyIds && e.specialtyIds.length > 0 ? e.specialtyIds : e.specialtyId ? [e.specialtyId] : [];
493
493
  }
494
- function Te(e) {
494
+ function _e(e) {
495
495
  return e.serviceIds && e.serviceIds.length > 0 ? e.serviceIds : e.serviceId ? [e.serviceId] : [];
496
496
  }
497
- function Jt(e) {
497
+ function Wt(e) {
498
498
  return e.operatorIds && e.operatorIds.length > 0 ? e.operatorIds : e.operatorId ? [e.operatorId] : [];
499
499
  }
500
- function Vt(e, t) {
500
+ function $t(e, t) {
501
501
  return {
502
502
  ...e,
503
503
  date: t,
@@ -506,49 +506,49 @@ function Vt(e, t) {
506
506
  // since the user has already filled some fields.
507
507
  };
508
508
  }
509
- function xs(e, t) {
509
+ function Is(e, t) {
510
510
  return {
511
511
  ...e,
512
512
  slotKey: t
513
513
  };
514
514
  }
515
- function zn(e, t) {
515
+ function jn(e, t) {
516
516
  let n = e;
517
517
  if (t.lockedOperatorId && n.operatorId !== t.lockedOperatorId && (n = { ...n, operatorId: t.lockedOperatorId }), (t.useSpecialties === void 0 ? t.specialties.length > 0 : t.useSpecialties) && t.specialties.length === 1 && n.specialtyId === void 0 && n.specialtyIds === void 0 && (n = { ...n, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
518
- const i = $e(n), a = i.length > 0 ? t.services.filter(
519
- (d) => d.specialtyId && i.includes(d.specialtyId)
518
+ const i = Ge(n), a = i.length > 0 ? t.services.filter(
519
+ (c) => c.specialtyId && i.includes(c.specialtyId)
520
520
  ) : t.services;
521
- a.length === 1 && n.serviceId === void 0 && n.serviceIds === void 0 && (n = { ...n, serviceId: a[0].id }, n.operatorId === void 0 && n.operatorIds === void 0 && (n = { ...n, operatorId: we }));
521
+ a.length === 1 && n.serviceId === void 0 && n.serviceIds === void 0 && (n = { ...n, serviceId: a[0].id }, n.operatorId === void 0 && n.operatorIds === void 0 && (n = { ...n, operatorId: Ce }));
522
522
  }
523
523
  return n;
524
524
  }
525
- function Is(e) {
526
- if (e.operatorId && e.operatorId !== we)
525
+ function Ns(e) {
526
+ if (e.operatorId && e.operatorId !== Ce)
527
527
  return e.operatorId;
528
528
  }
529
- function jn(e) {
529
+ function Un(e) {
530
530
  if (!e) return !1;
531
531
  const t = e.trim();
532
532
  return /^\+?\d[\d\s\-()]{6,}$/.test(t);
533
533
  }
534
- function Ns(e) {
534
+ function ws(e) {
535
535
  const t = e && e.length > 0 ? e : ["email"], n = new Set(t);
536
- return Ht.filter((r) => n.has(r));
536
+ return Jt.filter((r) => n.has(r));
537
537
  }
538
- function Un(e, t, n) {
539
- const r = Ns(e), i = new Set(r);
538
+ function Gn(e, t, n) {
539
+ const r = ws(e), i = new Set(r);
540
540
  if (n)
541
- return Ht.filter(
542
- (p) => n.includes(p) && i.has(p)
541
+ return Jt.filter(
542
+ (m) => n.includes(m) && i.has(m)
543
543
  );
544
544
  const a = [];
545
545
  i.has("email") && a.push("email");
546
- const d = jn(t), u = i.has("whatsapp");
547
- u && d && a.push("whatsapp"), !u && i.has("sms") && a.push("sms");
548
- const g = new Set(a);
549
- return Ht.filter((p) => g.has(p));
546
+ const c = Un(t), f = i.has("whatsapp");
547
+ f && c && a.push("whatsapp"), !f && i.has("sms") && a.push("sms");
548
+ const p = new Set(a);
549
+ return Jt.filter((m) => p.has(m));
550
550
  }
551
- const Gn = /https?:\/\/(?:(?![.,;:!?'»›]https?:\/\/)[^\s<>"\u060C\u061B\u061F\u06D4\u2000-\u206F\u3000-\u303F\uFF00-\uFFEF])+/gi, Hn = /* @__PURE__ */ new Set([
551
+ const Hn = /https?:\/\/(?:(?![.,;:!?'»›]https?:\/\/)[^\s<>"\u060C\u061B\u061F\u06D4\u2000-\u206F\u3000-\u303F\uFF00-\uFFEF])+/gi, Jn = /* @__PURE__ */ new Set([
552
552
  ".",
553
553
  ",",
554
554
  ";",
@@ -558,15 +558,15 @@ const Gn = /https?:\/\/(?:(?![.,;:!?'»›]https?:\/\/)[^\s<>"\u060C\u061B\u061F
558
558
  "'",
559
559
  "»",
560
560
  "›"
561
- ]), Jn = { ")": "(", "]": "[", "}": "{" }, rs = (e, t) => e.split(t).length - 1;
562
- function Wn(e) {
561
+ ]), Wn = { ")": "(", "]": "[", "}": "{" }, as = (e, t) => e.split(t).length - 1;
562
+ function Yn(e) {
563
563
  const t = {};
564
- for (const [r, i] of Object.entries(Jn))
565
- t[r] = rs(e, r) - rs(e, i);
564
+ for (const [r, i] of Object.entries(Wn))
565
+ t[r] = as(e, r) - as(e, i);
566
566
  let n = e.length;
567
567
  for (; n > 0; ) {
568
568
  const r = e[n - 1];
569
- if (Hn.has(r))
569
+ if (Jn.has(r))
570
570
  n -= 1;
571
571
  else if (r in t && t[r] > 0)
572
572
  t[r] -= 1, n -= 1;
@@ -575,12 +575,12 @@ function Wn(e) {
575
575
  }
576
576
  return e.slice(0, n);
577
577
  }
578
- const Yn = /[\u0600-\u06FF\u3040-\u30FF\u3400-\u9FFF\uAC00-\uD7AF]/, Zn = /[A-Za-z0-9]/;
579
- function Xn(e) {
580
- const t = e.search(Yn);
581
- return t > 0 && Zn.test(e[t - 1]) ? e.slice(0, t) : e;
582
- }
578
+ const Zn = /[\u0600-\u06FF\u3040-\u30FF\u3400-\u9FFF\uAC00-\uD7AF]/, Xn = /[A-Za-z0-9]/;
583
579
  function Qn(e) {
580
+ const t = e.search(Zn);
581
+ return t > 0 && Xn.test(e[t - 1]) ? e.slice(0, t) : e;
582
+ }
583
+ function ei(e) {
584
584
  try {
585
585
  const { protocol: t, hostname: n } = new URL(e);
586
586
  return (t === "http:" || t === "https:") && n !== "";
@@ -588,7 +588,7 @@ function Qn(e) {
588
588
  return !1;
589
589
  }
590
590
  }
591
- function ei(e) {
591
+ function ti(e) {
592
592
  const t = [];
593
593
  let n = 0;
594
594
  const r = (i) => {
@@ -596,13 +596,13 @@ function ei(e) {
596
596
  const a = t[t.length - 1];
597
597
  (a == null ? void 0 : a.kind) === "text" ? a.text += i : t.push({ kind: "text", text: i });
598
598
  };
599
- for (const i of e.matchAll(Gn)) {
600
- const a = i.index ?? 0, d = Wn(Xn(i[0]));
601
- Qn(d) && (r(e.slice(n, a)), t.push({ kind: "link", text: d, href: d }), n = a + d.length);
599
+ for (const i of e.matchAll(Hn)) {
600
+ const a = i.index ?? 0, c = Yn(Qn(i[0]));
601
+ ei(c) && (r(e.slice(n, a)), t.push({ kind: "link", text: c, href: c }), n = a + c.length);
602
602
  }
603
603
  return r(e.slice(n)), t;
604
604
  }
605
- const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 300, Ut = "ds:rounded-[var(--radius-sm)] ds:underline ds:text-[var(--foreground)] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]", Ot = (e) => e && /^https?:\/\//i.test(e) ? e : void 0, ni = (e, t) => ({
605
+ const os = 500, si = /^[A-Z0-9]{16}$/, ni = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, cs = 300, Gt = "ds:rounded-[var(--radius-sm)] ds:underline ds:text-[var(--foreground)] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]", Mt = (e) => e && /^https?:\/\//i.test(e) ? e : void 0, ii = (e, t) => ({
606
606
  street: (e == null ? void 0 : e.address.line1) ?? "",
607
607
  city: (e == null ? void 0 : e.address.city) ?? "",
608
608
  postcode: (e == null ? void 0 : e.address.postalCode) ?? "",
@@ -610,7 +610,7 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
610
610
  // The practice's country only until the patient has an address at all.
611
611
  country: (e ? e.address.country : t).toLowerCase(),
612
612
  formatted: ""
613
- }), ii = (e, t, n = null) => ({
613
+ }), ri = (e, t, n = null) => ({
614
614
  name: t,
615
615
  address: {
616
616
  line1: e.street,
@@ -620,7 +620,7 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
620
620
  postalCode: e.postcode,
621
621
  country: e.country.toUpperCase()
622
622
  }
623
- }), ri = kt("ds:flex ds:flex-col ds:border", {
623
+ }), ai = bt("ds:flex ds:flex-col ds:border", {
624
624
  variants: {
625
625
  noticeStyle: {
626
626
  plain: "ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-md)] ds:border-[var(--border)] ds:bg-[var(--muted)] ds:p-[var(--spacing-sm)]",
@@ -628,17 +628,17 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
628
628
  }
629
629
  },
630
630
  defaultVariants: { noticeStyle: "plain" }
631
- }), ai = ["it", "ch", "de", "at", "fr", "sm"], yt = {
631
+ }), oi = ["it", "ch", "de", "at", "fr", "sm"], vt = {
632
632
  country: "billing.country",
633
633
  street: "billing.street",
634
634
  city: "billing.city",
635
635
  postcode: "billing.postcode",
636
636
  province: "billing.province"
637
- }, ws = /^\d{5}$/, oi = (e) => {
637
+ }, Cs = /^\d{5}$/, ci = (e) => {
638
638
  if (!e) return !1;
639
639
  const { line1: t, city: n, postalCode: r, country: i, state: a } = e.address;
640
- return !t.trim() || !n.trim() || !r.trim() || !i.trim() ? !1 : i.toUpperCase() !== "IT" ? !0 : !!a.trim() && ws.test(r.trim());
641
- }, ci = (e, t) => {
640
+ return !t.trim() || !n.trim() || !r.trim() || !i.trim() ? !1 : i.toUpperCase() !== "IT" ? !0 : !!a.trim() && Cs.test(r.trim());
641
+ }, di = (e, t) => {
642
642
  var n;
643
643
  return {
644
644
  name: t,
@@ -651,7 +651,7 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
651
651
  country: e.address.country.trim().toUpperCase()
652
652
  }
653
653
  };
654
- }, Mt = { state: "idle" }, Zt = ls(
654
+ }, Ft = { state: "idle" }, Xt = us(
655
655
  ({
656
656
  value: e,
657
657
  onChange: t,
@@ -659,146 +659,146 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
659
659
  requireCodiceFiscale: r = !1,
660
660
  requireDateOfBirth: i = !1,
661
661
  requireInsuranceNumber: a = !1,
662
- insuranceType: d,
663
- showNote: u = !1,
664
- showReturningPatientFlag: g = !1,
665
- privacyPolicyUrl: p,
666
- termsUrl: h,
667
- practiceConsent: o,
668
- payment: c,
669
- paymentTermsUrl: f,
670
- paymentBlocked: x = !1,
662
+ insuranceType: c,
663
+ showNote: f = !1,
664
+ showReturningPatientFlag: p = !1,
665
+ privacyPolicyUrl: m,
666
+ termsUrl: g,
667
+ practiceConsent: l,
668
+ payment: o,
669
+ paymentTermsUrl: u,
670
+ paymentBlocked: k = !1,
671
671
  billingInDetails: I = !1,
672
- paymentNoticeStyle: A = "plain",
673
- criticalInformationToAccept: E,
672
+ paymentNoticeStyle: N = "plain",
673
+ criticalInformationToAccept: M,
674
674
  validateCodiceFiscale: w,
675
- validateInsuranceNumber: S,
676
- submitting: N = !1,
677
- summarySlot: T,
675
+ validateInsuranceNumber: x,
676
+ submitting: S = !1,
677
+ summarySlot: A,
678
678
  defaultPhoneCountry: D,
679
- confirmationChannels: y,
680
- defaultConfirmationChannels: k,
681
- submitError: B
679
+ confirmationChannels: T,
680
+ defaultConfirmationChannels: h,
681
+ submitError: C
682
682
  }, $) => {
683
- var wt, gt, Ct, ht, vt;
684
- const { t: b, i18n: ge } = U("ui"), O = Rt(), K = _(null), M = fe(
685
- (l) => {
686
- K.current = l, typeof $ == "function" ? $(l) : $ && ($.current = l);
683
+ var je, Ct, ft, At, gt;
684
+ const { t: b, i18n: pe } = G("ui"), F = Pt(), z = E(null), _ = ue(
685
+ (d) => {
686
+ z.current = d, typeof $ == "function" ? $(d) : $ && ($.current = d);
687
687
  },
688
688
  [$]
689
- ), [he, dt] = X(0);
690
- V(() => {
691
- var m;
692
- if (he === 0) return;
693
- const l = (m = K.current) == null ? void 0 : m.querySelectorAll(
689
+ ), [me, dt] = Q(0);
690
+ q(() => {
691
+ var O;
692
+ if (me === 0) return;
693
+ const d = (O = z.current) == null ? void 0 : O.querySelectorAll(
694
694
  '[aria-invalid="true"], [role="checkbox"][aria-required="true"][aria-checked="false"], [data-unanswered] [role="checkbox"]'
695
695
  );
696
- for (const C of l ?? [])
697
- if (C.focus(), document.activeElement === C) return;
698
- }, [he]);
699
- const ve = _(!1), [qe, De] = X(!1), [G, Oe] = X(!1), be = N || qe, [H, ae] = X(Mt), [ye, ke] = X(Mt), [W, Me] = X({}), ne = fe(
700
- (l) => Me((m) => ({ ...m, [l]: !0 })),
696
+ for (const y of d ?? [])
697
+ if (y.focus(), document.activeElement === y) return;
698
+ }, [me]);
699
+ const fe = E(!1), [He, Le] = Q(!1), [H, Be] = Q(!1), ge = S || He, [J, ae] = Q(Ft), [he, Se] = Q(Ft), [W, Ae] = Q({}), ie = ue(
700
+ (d) => Ae((O) => ({ ...O, [d]: !0 })),
701
701
  []
702
- ), oe = _(null), Y = _(
702
+ ), oe = E(null), te = E(
703
703
  null
704
704
  );
705
- V(
705
+ q(
706
706
  () => () => {
707
- oe.current && clearTimeout(oe.current), Y.current && clearTimeout(Y.current);
707
+ oe.current && clearTimeout(oe.current), te.current && clearTimeout(te.current);
708
708
  },
709
709
  []
710
710
  );
711
- const F = fe(
712
- (l) => {
713
- Oe(!1), t({ ...e, ...l });
711
+ const L = ue(
712
+ (d) => {
713
+ Be(!1), t({ ...e, ...d });
714
714
  },
715
715
  [e, t]
716
- ), Ce = c ? JSON.stringify([
717
- c.serviceId,
718
- c.kind,
719
- c.amountCents,
720
- c.currencyCode,
721
- f
722
- ]) : void 0, [Ke, xt] = X(
723
- () => e.paymentAccepted ? Ce : void 0
724
- ), We = _(Ce), Ye = !!(c && e.paymentAccepted && Ke === Ce);
725
- V(() => {
726
- We.current !== Ce && (We.current = Ce, xt(void 0), e.paymentAccepted !== void 0 && F({ paymentAccepted: c ? !1 : void 0 }));
727
- }, [Ce, c, F, e.paymentAccepted]);
728
- const Ze = typeof (o == null ? void 0 : o.label) == "string" && o.label.trim() !== "", Ne = o && Ze ? JSON.stringify([
729
- o.label,
730
- o.url ?? null,
731
- o.required
732
- ]) : void 0, [ee, It] = X(
733
- () => e.practiceConsentAccepted ? Ne : void 0
734
- ), ie = _(Ne), Fe = !!(Ne !== void 0 && e.practiceConsentAccepted && ee === Ne);
735
- V(() => {
736
- ie.current !== Ne && (ie.current = Ne, It(void 0), e.practiceConsentAccepted !== void 0 && F({ practiceConsentAccepted: void 0 }));
737
- }, [Ne, F, e.practiceConsentAccepted]);
738
- const ce = c ? St(c.amountCents, c.currencyCode, ge.language) : "", _e = Ot(f), R = I && !!c && !x, de = r, Xe = (D || "it").toLowerCase(), lt = !R || oi(e.billing), Z = ni(e.billing, Xe), le = Z.country === "it", ut = _(null), Le = _(
716
+ ), xe = o ? JSON.stringify([
717
+ o.serviceId,
718
+ o.kind,
719
+ o.amountCents,
720
+ o.currencyCode,
721
+ u
722
+ ]) : void 0, [Kt, Ee] = Q(
723
+ () => e.paymentAccepted ? xe : void 0
724
+ ), kt = E(xe), Qe = !!(o && e.paymentAccepted && Kt === xe);
725
+ q(() => {
726
+ kt.current !== xe && (kt.current = xe, Ee(void 0), e.paymentAccepted !== void 0 && L({ paymentAccepted: o ? !1 : void 0 }));
727
+ }, [xe, o, L, e.paymentAccepted]);
728
+ const Re = typeof (l == null ? void 0 : l.label) == "string" && l.label.trim() !== "", Ie = l && Re ? JSON.stringify([
729
+ l.label,
730
+ l.url ?? null,
731
+ l.required
732
+ ]) : void 0, [zt, Z] = Q(
733
+ () => e.practiceConsentAccepted ? Ie : void 0
734
+ ), St = E(Ie), se = !!(Ie !== void 0 && e.practiceConsentAccepted && zt === Ie);
735
+ q(() => {
736
+ St.current !== Ie && (St.current = Ie, Z(void 0), e.practiceConsentAccepted !== void 0 && L({ practiceConsentAccepted: void 0 }));
737
+ }, [Ie, L, e.practiceConsentAccepted]);
738
+ const Te = o ? yt(o.amountCents, o.currencyCode, pe.language) : "", Ne = Mt(u), ve = I && !!o && !k, B = r, et = (D || "it").toLowerCase(), Je = !ve || ci(e.billing), We = ii(e.billing, et), X = We.country === "it", we = E(null), Pe = E(
739
739
  null
740
- ), te = (wt = e.billing) == null ? void 0 : wt.address.line1.trim(), ze = ((Ct = (gt = e.billing) == null ? void 0 : gt.address.line2) == null ? void 0 : Ct.trim()) || null;
741
- V(() => {
742
- var l;
743
- te !== void 0 && ze ? Le.current = { street: te, line2: ze } : (te === void 0 || te === ((l = Le.current) == null ? void 0 : l.street)) && (Le.current = null);
744
- }, [te, ze]);
745
- const Be = (l) => W[yt[l]] ? Z[l].trim() ? (
740
+ ), Ve = (je = e.billing) == null ? void 0 : je.address.line1.trim(), ce = ((ft = (Ct = e.billing) == null ? void 0 : Ct.address.line2) == null ? void 0 : ft.trim()) || null;
741
+ q(() => {
742
+ var d;
743
+ Ve !== void 0 && ce ? Pe.current = { street: Ve, line2: ce } : (Ve === void 0 || Ve === ((d = Pe.current) == null ? void 0 : d.street)) && (Pe.current = null);
744
+ }, [Ve, ce]);
745
+ const De = (d) => W[vt[d]] ? We[d].trim() ? (
746
746
  // The one format the block itself checks: an Italian CAP.
747
- l === "postcode" && le && !ws.test(Z.postcode.trim()) ? b("inputs.postalCode.invalid") : void 0
748
- ) : b("booking.details.fieldRequired") : void 0, qt = fe(
749
- () => Me(
750
- (l) => l[yt.province] ? l : {
751
- ...l,
747
+ d === "postcode" && X && !Cs.test(We.postcode.trim()) ? b("inputs.postalCode.invalid") : void 0
748
+ ) : b("booking.details.fieldRequired") : void 0, xt = ue(
749
+ () => Ae(
750
+ (d) => d[vt.province] ? d : {
751
+ ...d,
752
752
  codiceFiscale: !0,
753
753
  ...Object.fromEntries(
754
- Object.values(yt).map((m) => [m, !0])
754
+ Object.values(vt).map((O) => [O, !0])
755
755
  )
756
756
  }
757
757
  ),
758
758
  []
759
- ), Qe = L(
760
- () => Ns(y),
761
- [y]
762
- ), ue = !c && !x && Qe.length >= 2, je = _(!1);
763
- V(() => {
764
- if (c || x) return;
765
- if (!ue) {
766
- e.confirmationChannels !== void 0 && F({ confirmationChannels: void 0 });
759
+ ), tt = R(
760
+ () => ws(T),
761
+ [T]
762
+ ), $e = !o && !k && tt.length >= 2, qe = E(!1);
763
+ q(() => {
764
+ if (o || k) return;
765
+ if (!$e) {
766
+ e.confirmationChannels !== void 0 && L({ confirmationChannels: void 0 });
767
767
  return;
768
768
  }
769
769
  if (e.confirmationChannels !== void 0) {
770
- je.current = !0;
770
+ qe.current = !0;
771
771
  return;
772
772
  }
773
- const l = Un(
774
- Qe,
773
+ const d = Gn(
774
+ tt,
775
775
  e.mobilePhone,
776
- k
776
+ h
777
777
  );
778
- je.current = !0, F({ confirmationChannels: l });
778
+ qe.current = !0, L({ confirmationChannels: d });
779
779
  }, [
780
- ue,
781
- c,
782
- x,
783
- Qe,
780
+ $e,
781
+ o,
782
+ k,
783
+ tt,
784
784
  e.mobilePhone,
785
- k
785
+ h
786
786
  ]);
787
- const q = L(
787
+ const Oe = R(
788
788
  () => e.confirmationChannels ?? [],
789
789
  [e.confirmationChannels]
790
- ), z = ue && q.length === 0, pt = _(w), et = _(S);
791
- V(() => {
792
- pt.current = w, et.current = S;
793
- }, [w, S]);
794
- const mt = !!w, ft = !!S;
795
- V(() => {
796
- const l = e.codiceFiscale;
797
- if (!de || !mt || !l) {
798
- ae(Mt);
790
+ ), K = $e && Oe.length === 0, j = E(w), lt = E(x);
791
+ q(() => {
792
+ j.current = w, lt.current = x;
793
+ }, [w, x]);
794
+ const st = !!w, ut = !!x;
795
+ q(() => {
796
+ const d = e.codiceFiscale;
797
+ if (!B || !st || !d) {
798
+ ae(Ft);
799
799
  return;
800
800
  }
801
- if (!ti.test(l)) {
801
+ if (!si.test(d)) {
802
802
  ae({
803
803
  state: "invalid",
804
804
  hint: b("booking.details.codiceFiscale.invalidFormat")
@@ -806,74 +806,74 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
806
806
  return;
807
807
  }
808
808
  ae({ state: "pending" });
809
- let m = !0;
809
+ let O = !0;
810
810
  return oe.current && clearTimeout(oe.current), oe.current = setTimeout(async () => {
811
811
  try {
812
- const C = pt.current;
813
- if (!C) return;
814
- const P = await C(l);
815
- m && ae({
812
+ const y = j.current;
813
+ if (!y) return;
814
+ const P = await y(d);
815
+ O && ae({
816
816
  state: P.valid ? "valid" : "invalid",
817
817
  hint: P.hint,
818
- value: l
818
+ value: d
819
819
  });
820
820
  } catch {
821
- m && ae({
821
+ O && ae({
822
822
  state: "invalid",
823
823
  hint: b("booking.details.codiceFiscale.unavailable"),
824
- value: l
824
+ value: d
825
825
  });
826
826
  }
827
- }, os), () => {
828
- m = !1, oe.current && clearTimeout(oe.current);
827
+ }, cs), () => {
828
+ O = !1, oe.current && clearTimeout(oe.current);
829
829
  };
830
- }, [de, mt, e.codiceFiscale, b]);
831
- const Ee = a && d === "public";
832
- V(() => {
833
- const l = e.insuranceNumber;
834
- if (!Ee || !ft || !l) {
835
- ke(Mt);
830
+ }, [B, st, e.codiceFiscale, b]);
831
+ const Ke = a && c === "public";
832
+ q(() => {
833
+ const d = e.insuranceNumber;
834
+ if (!Ke || !ut || !d) {
835
+ Se(Ft);
836
836
  return;
837
837
  }
838
- ke({ state: "pending" }), Y.current && clearTimeout(Y.current), Y.current = setTimeout(() => {
839
- const m = et.current;
840
- m && m(l).then(
841
- (C) => ke(
842
- C.valid ? { state: "valid" } : { state: "invalid", hint: C.hint }
838
+ Se({ state: "pending" }), te.current && clearTimeout(te.current), te.current = setTimeout(() => {
839
+ const O = lt.current;
840
+ O && O(d).then(
841
+ (y) => Se(
842
+ y.valid ? { state: "valid" } : { state: "invalid", hint: y.hint }
843
843
  )
844
844
  ).catch(
845
- () => ke({
845
+ () => Se({
846
846
  state: "invalid",
847
847
  hint: b("booking.details.insuranceNumber.unavailable")
848
848
  })
849
849
  );
850
- }, os);
851
- }, [Ee, ft, e.insuranceNumber, b]);
852
- const tt = L(
853
- () => !!(e.email && si.test(e.email)),
850
+ }, cs);
851
+ }, [Ke, ut, e.insuranceNumber, b]);
852
+ const nt = R(
853
+ () => !!(e.email && ni.test(e.email)),
854
854
  [e.email]
855
- ), st = L(
855
+ ), it = R(
856
856
  () => !!(e.mobilePhone && e.mobilePhone.length >= 6),
857
857
  [e.mobilePhone]
858
- ), Ue = L(() => {
859
- var l, m;
860
- return !(!((l = e.firstName) != null && l.trim()) || !((m = e.lastName) != null && m.trim()) || !tt || !st || de && (H.state !== "valid" || H.value !== e.codiceFiscale) || !lt || i && !e.dateOfBirth || Ee && ye.state !== "valid");
858
+ ), It = R(() => {
859
+ var d, O;
860
+ return !(!((d = e.firstName) != null && d.trim()) || !((O = e.lastName) != null && O.trim()) || !nt || !it || B && (J.state !== "valid" || J.value !== e.codiceFiscale) || !Je || i && !e.dateOfBirth || Ke && he.state !== "valid");
861
861
  }, [
862
862
  e.firstName,
863
863
  e.lastName,
864
- tt,
865
- st,
866
- de,
867
- lt,
868
- H.state,
869
- H.value,
864
+ nt,
865
+ it,
866
+ B,
867
+ Je,
868
+ J.state,
869
+ J.value,
870
870
  e.codiceFiscale,
871
871
  i,
872
872
  e.dateOfBirth,
873
- Ee,
874
- ye.state
875
- ]), nt = E != null && E.trim() ? E : void 0, Re = nt !== void 0, Nt = !Re || !!e.criticalInformationAccepted, Kt = !Ze || !(o != null && o.required) || Fe, Se = !!(e.privacyConsent && e.termsConsent && Nt && Kt), zt = !ue || q.length > 0, it = Ue && Se && zt && (!c || Ye) && !x && !be, Ge = async (l) => {
876
- if (l.preventDefault(), Me({
873
+ Ke,
874
+ he.state
875
+ ]), Me = M != null && M.trim() ? M : void 0, pt = Me !== void 0, Ye = !pt || !!e.criticalInformationAccepted, Nt = !Re || !(l != null && l.required) || se, jt = !!(e.privacyConsent && e.termsConsent && Ye && Nt), be = !$e || Oe.length > 0, wt = It && jt && be && (!o || Qe) && !k && !ge, mt = async (d) => {
876
+ if (d.preventDefault(), Ae({
877
877
  firstName: !0,
878
878
  lastName: !0,
879
879
  email: !0,
@@ -882,14 +882,14 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
882
882
  dateOfBirth: !0,
883
883
  insuranceNumber: !0,
884
884
  ...Object.fromEntries(
885
- Object.values(yt).map((C) => [C, !0])
885
+ Object.values(vt).map((y) => [y, !0])
886
886
  )
887
- }), be || ve.current) return;
888
- if (!it) {
889
- dt((C) => C + 1);
887
+ }), ge || fe.current) return;
888
+ if (!wt) {
889
+ dt((y) => y + 1);
890
890
  return;
891
891
  }
892
- const m = {
892
+ const O = {
893
893
  firstName: e.firstName.trim(),
894
894
  lastName: e.lastName.trim(),
895
895
  email: e.email.trim(),
@@ -898,11 +898,11 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
898
898
  termsConsent: !0,
899
899
  // Only present when the service carried text to accept — a
900
900
  // reason without it leaves the key out of the payload entirely.
901
- ...Re ? { criticalInformationAccepted: !0 } : {},
901
+ ...pt ? { criticalInformationAccepted: !0 } : {},
902
902
  // Sent whenever the practice's box is shown, ticked or not, so the
903
903
  // server can record the answer; left out when there is no box.
904
- ...Ze ? { practiceConsentAccepted: Fe } : {},
905
- ...c ? { paymentAccepted: !0 } : {},
904
+ ...Re ? { practiceConsentAccepted: se } : {},
905
+ ...o ? { paymentAccepted: !0 } : {},
906
906
  codiceFiscale: e.codiceFiscale,
907
907
  dateOfBirth: e.dateOfBirth,
908
908
  insuranceNumber: e.insuranceNumber,
@@ -911,48 +911,48 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
911
911
  // Only include when the picker was visible; otherwise the single
912
912
  // implicit channel is inferred backend-side from the practice
913
913
  // config.
914
- confirmationChannels: ue ? q : void 0,
915
- ...R && e.billing ? {
916
- billing: ci(
914
+ confirmationChannels: $e ? Oe : void 0,
915
+ ...ve && e.billing ? {
916
+ billing: di(
917
917
  e.billing,
918
918
  `${e.firstName.trim()} ${e.lastName.trim()}`
919
919
  )
920
920
  } : {}
921
921
  };
922
- ve.current = !0, De(!0), Oe(!1);
922
+ fe.current = !0, Le(!0), Be(!1);
923
923
  try {
924
- await n(m);
924
+ await n(O);
925
925
  } catch {
926
- Oe(!0);
926
+ Be(!0);
927
927
  } finally {
928
- ve.current = !1, De(!1);
928
+ fe.current = !1, Le(!1);
929
929
  }
930
- }, re = /* @__PURE__ */ s(
931
- Ve,
930
+ }, ze = /* @__PURE__ */ s(
931
+ Ue,
932
932
  {
933
933
  label: b("booking.details.codiceFiscale.label"),
934
934
  required: !0,
935
- description: H.state === "pending" ? b("booking.details.codiceFiscale.checking") : b("booking.details.codiceFiscale.helper"),
936
- error: W.codiceFiscale && H.state === "invalid" ? H.hint ?? b("booking.details.codiceFiscale.invalid") : W.codiceFiscale && !e.codiceFiscale ? b("booking.details.fieldRequired") : void 0,
935
+ description: J.state === "pending" ? b("booking.details.codiceFiscale.checking") : b("booking.details.codiceFiscale.helper"),
936
+ error: W.codiceFiscale && J.state === "invalid" ? J.hint ?? b("booking.details.codiceFiscale.invalid") : W.codiceFiscale && !e.codiceFiscale ? b("booking.details.fieldRequired") : void 0,
937
937
  children: /* @__PURE__ */ s(
938
- Tt,
938
+ Dt,
939
939
  {
940
940
  value: e.codiceFiscale ?? "",
941
941
  maxLength: 16,
942
- onChange: (l) => F({
943
- codiceFiscale: l.target.value.slice(0, 16).toUpperCase()
942
+ onChange: (d) => L({
943
+ codiceFiscale: d.target.value.slice(0, 16).toUpperCase()
944
944
  }),
945
- onBlur: () => ne("codiceFiscale")
945
+ onBlur: () => ie("codiceFiscale")
946
946
  }
947
947
  )
948
948
  }
949
- ), Pe = (l, m) => {
950
- const C = Ot(m);
951
- return C ? /* @__PURE__ */ s(
952
- Vs,
949
+ ), re = (d, O) => {
950
+ const y = Mt(O);
951
+ return y ? /* @__PURE__ */ s(
952
+ $s,
953
953
  {
954
954
  ns: "ui",
955
- i18nKey: l,
955
+ i18nKey: d,
956
956
  components: {
957
957
  // The `<Trans>` runtime injects link text from the i18n
958
958
  // string. The anchor renders empty at static-analysis time,
@@ -964,63 +964,63 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
964
964
  /* @__PURE__ */ s(
965
965
  "a",
966
966
  {
967
- href: C,
967
+ href: y,
968
968
  target: "_blank",
969
969
  rel: "noopener noreferrer",
970
- className: Ut
970
+ className: Gt
971
971
  }
972
972
  )
973
973
  )
974
974
  }
975
975
  }
976
- ) : b(l);
976
+ ) : b(d);
977
977
  };
978
978
  return /* @__PURE__ */ v(
979
979
  "form",
980
980
  {
981
- ref: M,
982
- id: O,
981
+ ref: _,
982
+ id: F,
983
983
  noValidate: !0,
984
- onSubmit: Ge,
985
- onFocus: (l) => {
986
- const m = ut.current;
987
- !m || !l.currentTarget.contains(l.target) || !m.contains(l.target) && m.compareDocumentPosition(l.target) & Node.DOCUMENT_POSITION_FOLLOWING && qt();
984
+ onSubmit: mt,
985
+ onFocus: (d) => {
986
+ const O = we.current;
987
+ !O || !d.currentTarget.contains(d.target) || !O.contains(d.target) && O.compareDocumentPosition(d.target) & Node.DOCUMENT_POSITION_FOLLOWING && xt();
988
988
  },
989
- "aria-busy": be || void 0,
989
+ "aria-busy": ge || void 0,
990
990
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
991
991
  children: [
992
- T,
992
+ A,
993
993
  /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
994
994
  /* @__PURE__ */ s(
995
- Ve,
995
+ Ue,
996
996
  {
997
997
  label: b("booking.details.firstName.label"),
998
998
  required: !0,
999
- error: W.firstName && !((ht = e.firstName) != null && ht.trim()) ? b("booking.details.firstName.required") : void 0,
999
+ error: W.firstName && !((At = e.firstName) != null && At.trim()) ? b("booking.details.firstName.required") : void 0,
1000
1000
  children: /* @__PURE__ */ s(
1001
- Tt,
1001
+ Dt,
1002
1002
  {
1003
1003
  autoComplete: "given-name",
1004
1004
  value: e.firstName ?? "",
1005
- onChange: (l) => F({ firstName: l.target.value }),
1006
- onBlur: () => ne("firstName")
1005
+ onChange: (d) => L({ firstName: d.target.value }),
1006
+ onBlur: () => ie("firstName")
1007
1007
  }
1008
1008
  )
1009
1009
  }
1010
1010
  ),
1011
1011
  /* @__PURE__ */ s(
1012
- Ve,
1012
+ Ue,
1013
1013
  {
1014
1014
  label: b("booking.details.lastName.label"),
1015
1015
  required: !0,
1016
- error: W.lastName && !((vt = e.lastName) != null && vt.trim()) ? b("booking.details.lastName.required") : void 0,
1016
+ error: W.lastName && !((gt = e.lastName) != null && gt.trim()) ? b("booking.details.lastName.required") : void 0,
1017
1017
  children: /* @__PURE__ */ s(
1018
- Tt,
1018
+ Dt,
1019
1019
  {
1020
1020
  autoComplete: "family-name",
1021
1021
  value: e.lastName ?? "",
1022
- onChange: (l) => F({ lastName: l.target.value }),
1023
- onBlur: () => ne("lastName")
1022
+ onChange: (d) => L({ lastName: d.target.value }),
1023
+ onBlur: () => ie("lastName")
1024
1024
  }
1025
1025
  )
1026
1026
  }
@@ -1028,99 +1028,99 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
1028
1028
  ] }),
1029
1029
  /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
1030
1030
  /* @__PURE__ */ s(
1031
- Ve,
1031
+ Ue,
1032
1032
  {
1033
1033
  label: b("booking.details.email.label"),
1034
1034
  required: !0,
1035
- error: W.email && !tt ? b("booking.details.email.invalid") : void 0,
1035
+ error: W.email && !nt ? b("booking.details.email.invalid") : void 0,
1036
1036
  children: /* @__PURE__ */ s(
1037
- zs,
1037
+ js,
1038
1038
  {
1039
1039
  value: e.email ?? "",
1040
- onChange: (l) => F({ email: l.target.value }),
1041
- onBlur: () => ne("email")
1040
+ onChange: (d) => L({ email: d.target.value }),
1041
+ onBlur: () => ie("email")
1042
1042
  }
1043
1043
  )
1044
1044
  }
1045
1045
  ),
1046
1046
  /* @__PURE__ */ s(
1047
- Ve,
1047
+ Ue,
1048
1048
  {
1049
1049
  label: b("booking.details.mobilePhone.label"),
1050
1050
  required: !0,
1051
- error: W.mobilePhone && !st ? b("booking.details.mobilePhone.invalid") : void 0,
1051
+ error: W.mobilePhone && !it ? b("booking.details.mobilePhone.invalid") : void 0,
1052
1052
  children: /* @__PURE__ */ s(
1053
- js,
1053
+ Us,
1054
1054
  {
1055
1055
  value: e.mobilePhone ?? "",
1056
1056
  defaultCountry: D == null ? void 0 : D.toUpperCase(),
1057
- onChange: (l) => {
1058
- F({ mobilePhone: l }), ne("mobilePhone");
1057
+ onChange: (d) => {
1058
+ L({ mobilePhone: d }), ie("mobilePhone");
1059
1059
  }
1060
1060
  }
1061
1061
  )
1062
1062
  }
1063
1063
  )
1064
1064
  ] }),
1065
- de && !R || i ? /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
1066
- de && !R ? re : null,
1065
+ B && !ve || i ? /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
1066
+ B && !ve ? ze : null,
1067
1067
  i ? /* @__PURE__ */ s(
1068
- Ve,
1068
+ Ue,
1069
1069
  {
1070
1070
  label: b("booking.details.dateOfBirth.label"),
1071
1071
  required: !0,
1072
1072
  error: W.dateOfBirth && !e.dateOfBirth ? b("booking.details.dateOfBirth.required") : void 0,
1073
1073
  children: /* @__PURE__ */ s(
1074
- Ks,
1074
+ zs,
1075
1075
  {
1076
1076
  value: e.dateOfBirth ? new Date(e.dateOfBirth) : void 0,
1077
- onChange: (l) => {
1078
- F({
1079
- dateOfBirth: l ? l.toISOString().slice(0, 10) : void 0
1080
- }), ne("dateOfBirth");
1077
+ onChange: (d) => {
1078
+ L({
1079
+ dateOfBirth: d ? d.toISOString().slice(0, 10) : void 0
1080
+ }), ie("dateOfBirth");
1081
1081
  }
1082
1082
  }
1083
1083
  )
1084
1084
  }
1085
1085
  ) : null
1086
1086
  ] }) : null,
1087
- Ee ? /* @__PURE__ */ s(
1088
- Ve,
1087
+ Ke ? /* @__PURE__ */ s(
1088
+ Ue,
1089
1089
  {
1090
1090
  label: b("booking.details.insuranceNumber.label"),
1091
1091
  required: !0,
1092
- description: ye.state === "pending" ? b("booking.details.insuranceNumber.checking") : void 0,
1093
- error: W.insuranceNumber && ye.state === "invalid" ? ye.hint ?? b("booking.details.insuranceNumber.invalid") : void 0,
1092
+ description: he.state === "pending" ? b("booking.details.insuranceNumber.checking") : void 0,
1093
+ error: W.insuranceNumber && he.state === "invalid" ? he.hint ?? b("booking.details.insuranceNumber.invalid") : void 0,
1094
1094
  children: /* @__PURE__ */ s(
1095
- Tt,
1095
+ Dt,
1096
1096
  {
1097
1097
  value: e.insuranceNumber ?? "",
1098
- onChange: (l) => F({ insuranceNumber: l.target.value }),
1099
- onBlur: () => ne("insuranceNumber")
1098
+ onChange: (d) => L({ insuranceNumber: d.target.value }),
1099
+ onBlur: () => ie("insuranceNumber")
1100
1100
  }
1101
1101
  )
1102
1102
  }
1103
1103
  ) : null,
1104
- R ? /* @__PURE__ */ v(
1104
+ ve ? /* @__PURE__ */ v(
1105
1105
  "div",
1106
1106
  {
1107
- ref: ut,
1107
+ ref: we,
1108
1108
  "data-component": "booking-billing",
1109
1109
  role: "group",
1110
- "aria-labelledby": `${O}-billing-heading`,
1111
- "aria-describedby": `${O}-billing-intro`,
1110
+ "aria-labelledby": `${F}-billing-heading`,
1111
+ "aria-describedby": `${F}-billing-intro`,
1112
1112
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)] ds:p-[var(--spacing-sm)]",
1113
- onBlur: (l) => {
1114
- var C;
1115
- const m = (C = l.target.closest("[data-address-field]")) == null ? void 0 : C.getAttribute("data-address-field");
1116
- (m === "street" || m === "city" || m === "postcode") && ne(yt[m]);
1113
+ onBlur: (d) => {
1114
+ var y;
1115
+ const O = (y = d.target.closest("[data-address-field]")) == null ? void 0 : y.getAttribute("data-address-field");
1116
+ (O === "street" || O === "city" || O === "postcode") && ie(vt[O]);
1117
1117
  },
1118
1118
  children: [
1119
1119
  /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1120
1120
  /* @__PURE__ */ s(
1121
1121
  "h3",
1122
1122
  {
1123
- id: `${O}-billing-heading`,
1123
+ id: `${F}-billing-heading`,
1124
1124
  className: "type-label ds:m-0 ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]",
1125
1125
  children: b("booking.details.billing.heading")
1126
1126
  }
@@ -1128,110 +1128,110 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
1128
1128
  /* @__PURE__ */ s(
1129
1129
  "p",
1130
1130
  {
1131
- id: `${O}-billing-intro`,
1131
+ id: `${F}-billing-intro`,
1132
1132
  className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]",
1133
1133
  children: b("booking.details.billing.intro")
1134
1134
  }
1135
1135
  )
1136
1136
  ] }),
1137
- de ? re : null,
1137
+ B ? ze : null,
1138
1138
  /* @__PURE__ */ s(
1139
- Gs,
1139
+ Hs,
1140
1140
  {
1141
- value: Z,
1142
- onChange: (l) => {
1143
- var m;
1141
+ value: We,
1142
+ onChange: (d) => {
1143
+ var O;
1144
1144
  return (
1145
1145
  // The name is set from the patient's own on submit.
1146
- F({
1147
- billing: ii(
1148
- l,
1146
+ L({
1147
+ billing: ri(
1148
+ d,
1149
1149
  "",
1150
1150
  // A second line belongs to its street: it goes when the
1151
1151
  // patient writes another, and returns with the first.
1152
- l.street.trim() === ((m = Le.current) == null ? void 0 : m.street) ? Le.current.line2 : null
1152
+ d.street.trim() === ((O = Pe.current) == null ? void 0 : O.street) ? Pe.current.line2 : null
1153
1153
  )
1154
1154
  })
1155
1155
  );
1156
1156
  },
1157
- popularCountries: ai,
1157
+ popularCountries: oi,
1158
1158
  layout: "grid",
1159
- fields: le ? void 0 : ["street", "city", "postcode"],
1160
- required: le ? ["country", "street", "city", "postcode", "province"] : ["country", "street", "city", "postcode"],
1159
+ fields: X ? void 0 : ["street", "city", "postcode"],
1160
+ required: X ? ["country", "street", "city", "postcode", "province"] : ["country", "street", "city", "postcode"],
1161
1161
  errors: {
1162
- country: Be("country"),
1163
- street: Be("street"),
1164
- city: Be("city"),
1165
- postcode: Be("postcode"),
1166
- province: le ? Be("province") : void 0
1162
+ country: De("country"),
1163
+ street: De("street"),
1164
+ city: De("city"),
1165
+ postcode: De("postcode"),
1166
+ province: X ? De("province") : void 0
1167
1167
  }
1168
1168
  }
1169
1169
  )
1170
1170
  ]
1171
1171
  }
1172
1172
  ) : null,
1173
- u ? /* @__PURE__ */ s(
1174
- Ve,
1173
+ f ? /* @__PURE__ */ s(
1174
+ Ue,
1175
1175
  {
1176
1176
  label: b("booking.details.note.label"),
1177
1177
  description: b("booking.details.note.helper", {
1178
- max: as
1178
+ max: os
1179
1179
  }),
1180
1180
  children: /* @__PURE__ */ s(
1181
- Us,
1181
+ Gs,
1182
1182
  {
1183
1183
  value: e.note ?? "",
1184
- maxLength: as,
1184
+ maxLength: os,
1185
1185
  rows: 3,
1186
- onChange: (l) => F({ note: l.target.value })
1186
+ onChange: (d) => L({ note: d.target.value })
1187
1187
  }
1188
1188
  )
1189
1189
  }
1190
1190
  ) : null,
1191
- g ? /* @__PURE__ */ s(
1191
+ p ? /* @__PURE__ */ s(
1192
1192
  rt,
1193
1193
  {
1194
1194
  checked: !!e.returningPatient,
1195
- onCheckedChange: (l) => F({ returningPatient: l === !0 }),
1195
+ onCheckedChange: (d) => L({ returningPatient: d === !0 }),
1196
1196
  label: b("booking.details.returningPatient.label")
1197
1197
  }
1198
1198
  ) : null,
1199
- nt !== void 0 ? /* @__PURE__ */ v(
1199
+ Me !== void 0 ? /* @__PURE__ */ v(
1200
1200
  "div",
1201
1201
  {
1202
1202
  "data-component": "booking-critical-information",
1203
1203
  role: "group",
1204
- "aria-labelledby": `${O}-critical-information-heading`,
1204
+ "aria-labelledby": `${F}-critical-information-heading`,
1205
1205
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)] ds:bg-[var(--muted)] ds:p-[var(--spacing-sm)]",
1206
1206
  children: [
1207
1207
  /* @__PURE__ */ s(
1208
1208
  "h3",
1209
1209
  {
1210
- id: `${O}-critical-information-heading`,
1210
+ id: `${F}-critical-information-heading`,
1211
1211
  className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0",
1212
1212
  children: b("booking.details.criticalInformation.heading")
1213
1213
  }
1214
1214
  ),
1215
- /* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0 ds:whitespace-pre-wrap ds:break-words ds:text-[var(--foreground)]", children: ei(nt).map(
1216
- (l, m) => l.kind === "link" ? /* @__PURE__ */ s(
1215
+ /* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0 ds:whitespace-pre-wrap ds:break-words ds:text-[var(--foreground)]", children: ti(Me).map(
1216
+ (d, O) => d.kind === "link" ? /* @__PURE__ */ s(
1217
1217
  "a",
1218
1218
  {
1219
- href: l.href,
1219
+ href: d.href,
1220
1220
  target: "_blank",
1221
1221
  rel: "noopener noreferrer",
1222
- className: Ut,
1223
- children: l.text
1222
+ className: Gt,
1223
+ children: d.text
1224
1224
  },
1225
- m
1226
- ) : /* @__PURE__ */ s(Rs, { children: l.text }, m)
1225
+ O
1226
+ ) : /* @__PURE__ */ s(Ps, { children: d.text }, O)
1227
1227
  ) }),
1228
1228
  /* @__PURE__ */ s(
1229
1229
  rt,
1230
1230
  {
1231
1231
  checked: !!e.criticalInformationAccepted,
1232
- onCheckedChange: (l) => F({ criticalInformationAccepted: l === !0 }),
1232
+ onCheckedChange: (d) => L({ criticalInformationAccepted: d === !0 }),
1233
1233
  "aria-required": !0,
1234
- label: /* @__PURE__ */ v(se, { children: [
1234
+ label: /* @__PURE__ */ v(ne, { children: [
1235
1235
  b("booking.details.criticalInformation.accept"),
1236
1236
  /* @__PURE__ */ s(
1237
1237
  "span",
@@ -1247,23 +1247,23 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
1247
1247
  ]
1248
1248
  }
1249
1249
  ) : null,
1250
- c ? /* @__PURE__ */ v(
1250
+ o ? /* @__PURE__ */ v(
1251
1251
  "div",
1252
1252
  {
1253
1253
  "data-component": "booking-payment-notice",
1254
1254
  role: "group",
1255
- "aria-labelledby": `${O}-payment-heading`,
1256
- "data-notice-style": A,
1257
- className: ri({
1258
- noticeStyle: A
1255
+ "aria-labelledby": `${F}-payment-heading`,
1256
+ "data-notice-style": N,
1257
+ className: ai({
1258
+ noticeStyle: N
1259
1259
  }),
1260
1260
  children: [
1261
- A === "highlighted" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1262
- /* @__PURE__ */ s("span", { className: "ds:flex ds:size-9 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-full ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]", children: /* @__PURE__ */ s(Hs, { "aria-hidden": "true", className: "ds:size-5" }) }),
1261
+ N === "highlighted" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1262
+ /* @__PURE__ */ s("span", { className: "ds:flex ds:size-9 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-full ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]", children: /* @__PURE__ */ s(Js, { "aria-hidden": "true", className: "ds:size-5" }) }),
1263
1263
  /* @__PURE__ */ s(
1264
1264
  "h3",
1265
1265
  {
1266
- id: `${O}-payment-heading`,
1266
+ id: `${F}-payment-heading`,
1267
1267
  className: "type-title-item ds:m-0 ds:flex-1",
1268
1268
  children: b("booking.payment.noticeTitle")
1269
1269
  }
@@ -1273,22 +1273,22 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
1273
1273
  {
1274
1274
  "aria-hidden": "true",
1275
1275
  className: "type-title-card ds:shrink-0 ds:text-[var(--foreground)]",
1276
- children: ce
1276
+ children: Te
1277
1277
  }
1278
1278
  )
1279
1279
  ] }) : /* @__PURE__ */ s(
1280
1280
  "h3",
1281
1281
  {
1282
- id: `${O}-payment-heading`,
1282
+ id: `${F}-payment-heading`,
1283
1283
  className: "type-label ds:m-0",
1284
1284
  children: b("booking.payment.noticeTitle")
1285
1285
  }
1286
1286
  ),
1287
- /* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0", children: b("booking.payment.noticeBody", { amount: ce }) }),
1288
- _e ? /* @__PURE__ */ s(
1287
+ /* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0", children: b("booking.payment.noticeBody", { amount: Te }) }),
1288
+ Ne ? /* @__PURE__ */ s(
1289
1289
  "a",
1290
1290
  {
1291
- href: _e,
1291
+ href: Ne,
1292
1292
  target: "_blank",
1293
1293
  rel: "noopener noreferrer",
1294
1294
  className: "type-body-sm ds:inline-flex ds:items-center ds:self-start ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:underline ds:text-[var(--foreground)] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
@@ -1298,15 +1298,15 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
1298
1298
  /* @__PURE__ */ s(
1299
1299
  rt,
1300
1300
  {
1301
- checked: Ye,
1302
- onCheckedChange: (l) => {
1303
- xt(
1304
- l === !0 ? Ce : void 0
1305
- ), F({ paymentAccepted: l === !0 });
1301
+ checked: Qe,
1302
+ onCheckedChange: (d) => {
1303
+ Ee(
1304
+ d === !0 ? xe : void 0
1305
+ ), L({ paymentAccepted: d === !0 });
1306
1306
  },
1307
1307
  "aria-required": !0,
1308
- label: /* @__PURE__ */ v(se, { children: [
1309
- b("booking.payment.accept", { amount: ce }),
1308
+ label: /* @__PURE__ */ v(ne, { children: [
1309
+ b("booking.payment.accept", { amount: Te }),
1310
1310
  /* @__PURE__ */ s(
1311
1311
  "span",
1312
1312
  {
@@ -1326,12 +1326,12 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
1326
1326
  rt,
1327
1327
  {
1328
1328
  checked: !!e.privacyConsent,
1329
- onCheckedChange: (l) => F({ privacyConsent: l === !0 }),
1329
+ onCheckedChange: (d) => L({ privacyConsent: d === !0 }),
1330
1330
  "aria-required": !0,
1331
- label: /* @__PURE__ */ v(se, { children: [
1332
- Pe(
1331
+ label: /* @__PURE__ */ v(ne, { children: [
1332
+ re(
1333
1333
  "booking.details.consent.privacy.label",
1334
- p
1334
+ m
1335
1335
  ),
1336
1336
  /* @__PURE__ */ s(
1337
1337
  "span",
@@ -1348,12 +1348,12 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
1348
1348
  rt,
1349
1349
  {
1350
1350
  checked: !!e.termsConsent,
1351
- onCheckedChange: (l) => F({ termsConsent: l === !0 }),
1351
+ onCheckedChange: (d) => L({ termsConsent: d === !0 }),
1352
1352
  "aria-required": !0,
1353
- label: /* @__PURE__ */ v(se, { children: [
1354
- Pe(
1353
+ label: /* @__PURE__ */ v(ne, { children: [
1354
+ re(
1355
1355
  "booking.details.consent.terms.label",
1356
- h
1356
+ g
1357
1357
  ),
1358
1358
  /* @__PURE__ */ s(
1359
1359
  "span",
@@ -1366,28 +1366,28 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
1366
1366
  ] })
1367
1367
  }
1368
1368
  ),
1369
- o && Ze ? /* @__PURE__ */ s(
1369
+ l && Re ? /* @__PURE__ */ s(
1370
1370
  rt,
1371
1371
  {
1372
- checked: Fe,
1373
- onCheckedChange: (l) => {
1374
- It(
1375
- l === !0 ? Ne : void 0
1376
- ), F({ practiceConsentAccepted: l === !0 });
1372
+ checked: se,
1373
+ onCheckedChange: (d) => {
1374
+ Z(
1375
+ d === !0 ? Ie : void 0
1376
+ ), L({ practiceConsentAccepted: d === !0 });
1377
1377
  },
1378
- "aria-required": o.required || void 0,
1379
- label: /* @__PURE__ */ v(se, { children: [
1380
- Ot(o.url) ? /* @__PURE__ */ s(
1378
+ "aria-required": l.required || void 0,
1379
+ label: /* @__PURE__ */ v(ne, { children: [
1380
+ Mt(l.url) ? /* @__PURE__ */ s(
1381
1381
  "a",
1382
1382
  {
1383
- href: Ot(o.url),
1383
+ href: Mt(l.url),
1384
1384
  target: "_blank",
1385
1385
  rel: "noopener noreferrer",
1386
- className: Ut,
1387
- children: o.label
1386
+ className: Gt,
1387
+ children: l.label
1388
1388
  }
1389
- ) : o.label,
1390
- o.required ? /* @__PURE__ */ s(
1389
+ ) : l.label,
1390
+ l.required ? /* @__PURE__ */ s(
1391
1391
  "span",
1392
1392
  {
1393
1393
  "aria-hidden": "true",
@@ -1399,44 +1399,44 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
1399
1399
  }
1400
1400
  ) : null
1401
1401
  ] }),
1402
- ue ? /* @__PURE__ */ s(
1402
+ $e ? /* @__PURE__ */ s(
1403
1403
  "div",
1404
1404
  {
1405
1405
  "data-component": "booking-confirmation-channels",
1406
- "data-unanswered": z || void 0,
1406
+ "data-unanswered": K || void 0,
1407
1407
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
1408
1408
  children: /* @__PURE__ */ s(
1409
- qs,
1409
+ Ks,
1410
1410
  {
1411
1411
  label: b("booking.confirmation.heading"),
1412
1412
  helperText: b("booking.confirmation.helper"),
1413
- value: q,
1414
- onChange: (l) => F({
1415
- confirmationChannels: l
1413
+ value: Oe,
1414
+ onChange: (d) => L({
1415
+ confirmationChannels: d
1416
1416
  }),
1417
1417
  orientation: "vertical",
1418
- options: Qe.map((l) => ({
1419
- value: l,
1420
- label: b(`booking.confirmation.channel.${l}`)
1418
+ options: tt.map((d) => ({
1419
+ value: d,
1420
+ label: b(`booking.confirmation.channel.${d}`)
1421
1421
  })),
1422
- error: z ? b("booking.confirmation.atLeastOne") : void 0
1422
+ error: K ? b("booking.confirmation.atLeastOne") : void 0
1423
1423
  }
1424
1424
  )
1425
1425
  }
1426
1426
  ) : null,
1427
- B || G || x ? /* @__PURE__ */ s(Q, { variant: "error", children: /* @__PURE__ */ s(Q.Description, { children: B ?? b(
1428
- x ? "booking.payment.unavailable" : "booking.payment.submitFailed"
1427
+ C || H || k ? /* @__PURE__ */ s(ee, { variant: "error", children: /* @__PURE__ */ s(ee.Description, { children: C ?? b(
1428
+ k ? "booking.payment.unavailable" : "booking.payment.submitFailed"
1429
1429
  ) }) }) : null,
1430
1430
  /* @__PURE__ */ s(
1431
- Je,
1431
+ Xe,
1432
1432
  {
1433
1433
  intent: "primary",
1434
1434
  size: "md",
1435
1435
  type: "submit",
1436
- disabled: be || x,
1437
- "aria-disabled": !it || void 0,
1438
- startIcon: be ? /* @__PURE__ */ s(us, { variant: "pulse", size: "sm" }) : void 0,
1439
- children: c ? b("booking.payment.submit", { amount: ce }) : b("booking.details.submit")
1436
+ disabled: ge || k,
1437
+ "aria-disabled": !wt || void 0,
1438
+ startIcon: ge ? /* @__PURE__ */ s(ps, { variant: "pulse", size: "sm" }) : void 0,
1439
+ children: o ? b("booking.payment.submit", { amount: Te }) : b("booking.details.submit")
1440
1440
  }
1441
1441
  )
1442
1442
  ]
@@ -1444,8 +1444,8 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
1444
1444
  );
1445
1445
  }
1446
1446
  );
1447
- Zt.displayName = "BookingDetailsForm";
1448
- function Xt(e) {
1447
+ Xt.displayName = "BookingDetailsForm";
1448
+ function Qt(e) {
1449
1449
  const t = e.payment;
1450
1450
  if (!t) return;
1451
1451
  const n = (t.currencyCode ?? "EUR").toUpperCase();
@@ -1457,19 +1457,19 @@ function Xt(e) {
1457
1457
  currencyCode: n
1458
1458
  };
1459
1459
  }
1460
- function di(e, t, n) {
1460
+ function li(e, t, n) {
1461
1461
  const r = e.filter(
1462
1462
  (a) => t.includes(a.id)
1463
1463
  ), i = (n == null ? void 0 : n.serviceId) ?? (t.length === 1 ? t[0] : void 0);
1464
1464
  if (i) {
1465
- const a = r.find((u) => u.id === i);
1465
+ const a = r.find((f) => f.id === i);
1466
1466
  if (!a) return { blocked: !0 };
1467
- const d = Xt(a);
1468
- return { payment: d, blocked: !!(a.payment && !d) };
1467
+ const c = Qt(a);
1468
+ return { payment: c, blocked: !!(a.payment && !c) };
1469
1469
  }
1470
1470
  return { blocked: r.some((a) => !!a.payment) };
1471
1471
  }
1472
- function Ft(e) {
1472
+ function _t(e) {
1473
1473
  return e ? JSON.stringify([
1474
1474
  e.serviceId,
1475
1475
  e.kind,
@@ -1477,135 +1477,135 @@ function Ft(e) {
1477
1477
  e.currencyCode
1478
1478
  ]) : "";
1479
1479
  }
1480
- function li({
1480
+ function ui({
1481
1481
  services: e,
1482
1482
  value: t,
1483
1483
  availableSlots: n,
1484
1484
  onSubmit: r,
1485
1485
  onChange: i,
1486
1486
  paymentState: a,
1487
- submitting: d,
1488
- paymentTermsUrl: u,
1489
- renderPayment: g
1487
+ submitting: c,
1488
+ paymentTermsUrl: f,
1489
+ renderPayment: p
1490
1490
  }) {
1491
- var ve, qe, De;
1492
- const p = JSON.stringify([
1491
+ var fe, He, Le;
1492
+ const m = JSON.stringify([
1493
1493
  t.insuranceType,
1494
1494
  t.specialtyId,
1495
1495
  t.specialtyIds,
1496
- Te(t),
1496
+ _e(t),
1497
1497
  t.operatorId,
1498
1498
  t.operatorIds,
1499
1499
  t.date,
1500
1500
  t.slotKey
1501
- ]), h = _(
1501
+ ]), g = E(
1502
1502
  void 0
1503
- ), c = (t.date ? (ve = n[t.date]) == null ? void 0 : ve.find((G) => G.key === t.slotKey) : void 0) ?? (((qe = h.current) == null ? void 0 : qe.selection) === p ? h.current.slot : void 0), f = di(
1503
+ ), o = (t.date ? (fe = n[t.date]) == null ? void 0 : fe.find((H) => H.key === t.slotKey) : void 0) ?? (((He = g.current) == null ? void 0 : He.selection) === m ? g.current.slot : void 0), u = li(
1504
1504
  e,
1505
- Te(t),
1506
- c
1507
- ), x = f.blocked || !!(f.payment && !g), I = JSON.stringify([
1508
- p,
1509
- c == null ? void 0 : c.serviceId,
1510
- Ft(f.payment),
1511
- u,
1512
- x
1513
- ]), A = f.payment ? JSON.stringify([Ft(f.payment), u]) : "", E = _(void 0), w = !!((De = t.details) != null && De.paymentAccepted);
1514
- V(() => {
1515
- if (!w) E.current = void 0;
1516
- else if (A) E.current === void 0 ? E.current = A : E.current !== A && (E.current = void 0, i({
1505
+ _e(t),
1506
+ o
1507
+ ), k = u.blocked || !!(u.payment && !p), I = JSON.stringify([
1508
+ m,
1509
+ o == null ? void 0 : o.serviceId,
1510
+ _t(u.payment),
1511
+ f,
1512
+ k
1513
+ ]), N = u.payment ? JSON.stringify([_t(u.payment), f]) : "", M = E(void 0), w = !!((Le = t.details) != null && Le.paymentAccepted);
1514
+ q(() => {
1515
+ if (!w) M.current = void 0;
1516
+ else if (N) M.current === void 0 ? M.current = N : M.current !== N && (M.current = void 0, i({
1517
1517
  ...t,
1518
1518
  details: { ...t.details, paymentAccepted: !1 }
1519
1519
  }));
1520
1520
  else return;
1521
- }, [w, A, i, t]);
1522
- const S = _(I);
1523
- S.current = I;
1524
- const [N, T] = X({ status: "idle" }), D = _(0), y = _(!1), k = _(!0), B = _(!1), $ = _(void 0), b = _(I);
1525
- V(() => (k.current = !0, () => {
1526
- k.current = !1, D.current += 1;
1521
+ }, [w, N, i, t]);
1522
+ const x = E(I);
1523
+ x.current = I;
1524
+ const [S, A] = Q({ status: "idle" }), D = E(0), T = E(!1), h = E(!0), C = E(!1), $ = E(void 0), b = E(I);
1525
+ q(() => (h.current = !0, () => {
1526
+ h.current = !1, D.current += 1;
1527
1527
  }), []);
1528
- const ge = N.status === "payment" || N.status === "success";
1529
- V(() => {
1530
- b.current === I || B.current || ge || (b.current = I, D.current += 1, y.current = !1, T({ status: "idle" }));
1531
- }, [I, ge]);
1532
- const O = ge || b.current === I ? N.session : void 0, K = L(
1533
- () => O && (a == null ? void 0 : a.sessionId) === O.id ? a : O ? { sessionId: O.id, status: "ready" } : void 0,
1534
- [O, a]
1528
+ const pe = S.status === "payment" || S.status === "success";
1529
+ q(() => {
1530
+ b.current === I || C.current || pe || (b.current = I, D.current += 1, T.current = !1, A({ status: "idle" }));
1531
+ }, [I, pe]);
1532
+ const F = pe || b.current === I ? S.session : void 0, z = R(
1533
+ () => F && (a == null ? void 0 : a.sessionId) === F.id ? a : F ? { sessionId: F.id, status: "ready" } : void 0,
1534
+ [F, a]
1535
1535
  );
1536
- O && K && "phase" in K && K.phase === "completion" && ($.current = O.id);
1537
- const M = L(
1538
- () => O && $.current === O.id && K && K.status !== "paid" && (!("phase" in K) || K.phase !== "completion") ? {
1539
- sessionId: O.id,
1536
+ F && z && "phase" in z && z.phase === "completion" && ($.current = F.id);
1537
+ const _ = R(
1538
+ () => F && $.current === F.id && z && z.status !== "paid" && (!("phase" in z) || z.phase !== "completion") ? {
1539
+ sessionId: F.id,
1540
1540
  status: "processing",
1541
1541
  phase: "completion"
1542
- } : K,
1543
- [O, K]
1542
+ } : z,
1543
+ [F, z]
1544
1544
  );
1545
- V(() => {
1546
- !O || !M || B.current || (M.status === "paid" ? (B.current = !0, T((G) => ({ ...G, status: "success" }))) : M.status === "cancelled" && (D.current += 1, y.current = !1, h.current = void 0, i({
1545
+ q(() => {
1546
+ !F || !_ || C.current || (_.status === "paid" ? (C.current = !0, A((H) => ({ ...H, status: "success" }))) : _.status === "cancelled" && (D.current += 1, T.current = !1, g.current = void 0, i({
1547
1547
  ...t,
1548
1548
  details: { ...t.details, paymentAccepted: !1 }
1549
- }), T({ status: "idle", cancelled: !0 })));
1550
- }, [O, M, i, t]);
1551
- const he = () => {
1552
- D.current += 1, y.current = !1, B.current = !1, $.current = void 0, h.current = void 0, b.current = S.current, T({ status: "idle" });
1553
- }, dt = async (G) => {
1554
- var ke, W, Me, ne, oe;
1555
- if (!(c != null && c.available) || x || d || y.current || N.status === "payment" || B.current || f.payment && !G.paymentAccepted) return;
1556
- y.current = !0, h.current = { selection: p, slot: { ...c } };
1557
- const Oe = ++D.current, be = I;
1558
- b.current = be;
1559
- const H = {
1560
- slot: { ...c, meta: c.meta ? { ...c.meta } : void 0 },
1549
+ }), A({ status: "idle", cancelled: !0 })));
1550
+ }, [F, _, i, t]);
1551
+ const me = () => {
1552
+ D.current += 1, T.current = !1, C.current = !1, $.current = void 0, g.current = void 0, b.current = x.current, A({ status: "idle" });
1553
+ }, dt = async (H) => {
1554
+ var Se, W, Ae, ie, oe;
1555
+ if (!(o != null && o.available) || k || c || T.current || S.status === "payment" || C.current || u.payment && !H.paymentAccepted) return;
1556
+ T.current = !0, g.current = { selection: m, slot: { ...o } };
1557
+ const Be = ++D.current, ge = I;
1558
+ b.current = ge;
1559
+ const J = {
1560
+ slot: { ...o, meta: o.meta ? { ...o.meta } : void 0 },
1561
1561
  value: {
1562
1562
  ...t,
1563
- serviceIds: (ke = t.serviceIds) == null ? void 0 : ke.slice(),
1563
+ serviceIds: (Se = t.serviceIds) == null ? void 0 : Se.slice(),
1564
1564
  specialtyIds: (W = t.specialtyIds) == null ? void 0 : W.slice(),
1565
- operatorIds: (Me = t.operatorIds) == null ? void 0 : Me.slice(),
1566
- operatorId: Is(t) ?? t.operatorId,
1567
- details: { ...G }
1565
+ operatorIds: (Ae = t.operatorIds) == null ? void 0 : Ae.slice(),
1566
+ operatorId: Ns(t) ?? t.operatorId,
1567
+ details: { ...H }
1568
1568
  },
1569
1569
  details: {
1570
- ...G,
1571
- confirmationChannels: (ne = G.confirmationChannels) == null ? void 0 : ne.slice()
1570
+ ...H,
1571
+ confirmationChannels: (ie = H.confirmationChannels) == null ? void 0 : ie.slice()
1572
1572
  },
1573
- ...f.payment ? { payment: { ...f.payment } } : {}
1574
- }, ae = () => k.current && D.current === Oe && S.current === be;
1575
- T({ status: "submitting" });
1576
- let ye = !1;
1573
+ ...u.payment ? { payment: { ...u.payment } } : {}
1574
+ }, ae = () => h.current && D.current === Be && x.current === ge;
1575
+ A({ status: "submitting" });
1576
+ let he = !1;
1577
1577
  try {
1578
- const Y = await r(H);
1578
+ const te = await r(J);
1579
1579
  if (!ae()) return;
1580
- if (H.payment) {
1581
- const F = Y == null ? void 0 : Y.paymentSession;
1582
- if (!((oe = F == null ? void 0 : F.id) != null && oe.trim()) || Ft(F.payment) !== Ft(H.payment)) {
1583
- T({ status: "error" });
1580
+ if (J.payment) {
1581
+ const L = te == null ? void 0 : te.paymentSession;
1582
+ if (!((oe = L == null ? void 0 : L.id) != null && oe.trim()) || _t(L.payment) !== _t(J.payment)) {
1583
+ A({ status: "error" });
1584
1584
  return;
1585
1585
  }
1586
- ye = !0, T({
1586
+ he = !0, A({
1587
1587
  status: "payment",
1588
- snapshot: H,
1589
- session: { id: F.id, payment: { ...F.payment } }
1588
+ snapshot: J,
1589
+ session: { id: L.id, payment: { ...L.payment } }
1590
1590
  });
1591
- } else Y != null && Y.paymentSession ? T({ status: "error" }) : (B.current = !0, T({ status: "success", snapshot: H }));
1591
+ } else te != null && te.paymentSession ? A({ status: "error" }) : (C.current = !0, A({ status: "success", snapshot: J }));
1592
1592
  } catch {
1593
- ae() && T({ status: "error" });
1593
+ ae() && A({ status: "error" });
1594
1594
  } finally {
1595
- ae() && !ye && (y.current = !1);
1595
+ ae() && !he && (T.current = !1);
1596
1596
  }
1597
1597
  };
1598
1598
  return {
1599
- ...N,
1600
- payment: f.payment,
1601
- blocked: x,
1602
- state: M,
1603
- activeSession: O,
1599
+ ...S,
1600
+ payment: u.payment,
1601
+ blocked: k,
1602
+ state: _,
1603
+ activeSession: F,
1604
1604
  submit: dt,
1605
- reset: he
1605
+ reset: me
1606
1606
  };
1607
1607
  }
1608
- const ui = kt(
1608
+ const pi = bt(
1609
1609
  "ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)]",
1610
1610
  {
1611
1611
  variants: {
@@ -1633,44 +1633,44 @@ const ui = kt(
1633
1633
  },
1634
1634
  defaultVariants: { variant: "inline-list", surface: "flat" }
1635
1635
  }
1636
- ), pi = [
1636
+ ), mi = [
1637
1637
  [
1638
1638
  /\b(estetic|aesthetic|botox|filler|mesoterap|chirurgia\s*plastic)/i,
1639
- is
1639
+ rs
1640
1640
  ],
1641
- [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, on],
1642
- [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, On],
1643
- [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, cn],
1644
- [/\b(otorin|udito|orecchi|hearing|ear)/i, xn],
1645
- [/\b(neuro|brain|cervello)/i, bn],
1646
- [/\b(pediatr|child|bambin)/i, dn],
1647
- [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, hn],
1648
- [/\b(lab|analis|test|sang|esami)/i, Nn],
1649
- [/\b(farmaco|pharm|pillol|refill)/i, Cn],
1650
- [/\b(chirurg|surg|intervent|operat)/i, Tn],
1651
- [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, ln],
1652
- [/\b(vacc|inject|inie|punto)/i, is],
1653
- [/\b(derma|skin|pelle)/i, un],
1654
- [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, pn],
1655
- [/\b(general|medicin|family|control|check[-\s]?up)/i, fn]
1641
+ [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, cn],
1642
+ [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, Mn],
1643
+ [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, dn],
1644
+ [/\b(otorin|udito|orecchi|hearing|ear)/i, In],
1645
+ [/\b(neuro|brain|cervello)/i, yn],
1646
+ [/\b(pediatr|child|bambin)/i, ln],
1647
+ [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, vn],
1648
+ [/\b(lab|analis|test|sang|esami)/i, wn],
1649
+ [/\b(farmaco|pharm|pillol|refill)/i, An],
1650
+ [/\b(chirurg|surg|intervent|operat)/i, Dn],
1651
+ [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, un],
1652
+ [/\b(vacc|inject|inie|punto)/i, rs],
1653
+ [/\b(derma|skin|pelle)/i, pn],
1654
+ [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, mn],
1655
+ [/\b(general|medicin|family|control|check[-\s]?up)/i, gn]
1656
1656
  ];
1657
- function mi(e) {
1658
- for (const [t, n] of pi)
1657
+ function fi(e) {
1658
+ for (const [t, n] of mi)
1659
1659
  if (t.test(e)) return n;
1660
1660
  return null;
1661
1661
  }
1662
- function fi(e) {
1663
- const t = mi(e.label) ?? an;
1662
+ function gi(e) {
1663
+ const t = fi(e.label) ?? on;
1664
1664
  return /* @__PURE__ */ s(t, { "aria-hidden": "true", className: "ds:size-5" });
1665
1665
  }
1666
- function Cs(e) {
1666
+ function As(e) {
1667
1667
  var t;
1668
1668
  return (t = e.priceLabel) != null && t.trim() ? e.priceLabel : void 0;
1669
1669
  }
1670
- function He(e) {
1671
- return Lt(e, "yyyy-MM-dd");
1670
+ function Ze(e) {
1671
+ return Bt(e, "yyyy-MM-dd");
1672
1672
  }
1673
- const gi = [
1673
+ const hi = [
1674
1674
  "ds:relative ds:flex ds:items-center ds:justify-center",
1675
1675
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
1676
1676
  "ds:rounded-[var(--radius-sm)]",
@@ -1680,7 +1680,7 @@ const gi = [
1680
1680
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1681
1681
  "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1682
1682
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
1683
- ].join(" "), hi = kt(gi, {
1683
+ ].join(" "), vi = bt(hi, {
1684
1684
  variants: {
1685
1685
  state: {
1686
1686
  available: "ds:cursor-pointer ds:text-[var(--foreground)] ds:hover:bg-[var(--muted)]/30",
@@ -1691,91 +1691,91 @@ const gi = [
1691
1691
  },
1692
1692
  defaultVariants: { state: "unavailable" }
1693
1693
  });
1694
- function vi({
1694
+ function bi({
1695
1695
  availableDates: e,
1696
1696
  selectedDate: t,
1697
1697
  onSelectDate: n,
1698
1698
  locale: r,
1699
1699
  loading: i
1700
1700
  }) {
1701
- const { t: a } = U("ui"), d = L(() => t ? bt(me(t)) : e.length > 0 ? bt(me(e[0])) : bt(/* @__PURE__ */ new Date()), [t, e]), [u, g] = X(d), [p, h] = X(null), o = L(() => {
1702
- const w = bt(u), S = Qs(u), N = w.getDay(), T = S.getDate(), D = [];
1703
- for (let y = N; y > 0; y -= 1) {
1704
- const k = new Date(w);
1705
- k.setDate(w.getDate() - y), D.push(k);
1701
+ const { t: a } = G("ui"), c = R(() => t ? ht(le(t)) : e.length > 0 ? ht(le(e[0])) : ht(/* @__PURE__ */ new Date()), [t, e]), [f, p] = Q(c), [m, g] = Q(null), l = R(() => {
1702
+ const w = ht(f), x = en(f), S = w.getDay(), A = x.getDate(), D = [];
1703
+ for (let T = S; T > 0; T -= 1) {
1704
+ const h = new Date(w);
1705
+ h.setDate(w.getDate() - T), D.push(h);
1706
1706
  }
1707
- for (let y = 0; y < T; y += 1) {
1708
- const k = new Date(w);
1709
- k.setDate(w.getDate() + y), D.push(k);
1707
+ for (let T = 0; T < A; T += 1) {
1708
+ const h = new Date(w);
1709
+ h.setDate(w.getDate() + T), D.push(h);
1710
1710
  }
1711
1711
  for (; D.length < 42; ) {
1712
- const y = D[D.length - 1], k = new Date(y);
1713
- k.setDate(y.getDate() + 1), D.push(k);
1712
+ const T = D[D.length - 1], h = new Date(T);
1713
+ h.setDate(T.getDate() + 1), D.push(h);
1714
1714
  }
1715
1715
  return D;
1716
- }, [u]), c = L(() => {
1716
+ }, [f]), o = R(() => {
1717
1717
  try {
1718
1718
  return new Intl.DateTimeFormat(r, {
1719
1719
  month: "long",
1720
1720
  year: "numeric"
1721
- }).format(u);
1721
+ }).format(f);
1722
1722
  } catch {
1723
- return Lt(u, "MMMM yyyy");
1723
+ return Bt(f, "MMMM yyyy");
1724
1724
  }
1725
- }, [u, r]), f = L(() => {
1725
+ }, [f, r]), u = R(() => {
1726
1726
  const w = new Date(2024, 0, 7);
1727
- return Array.from({ length: 7 }, (S, N) => {
1728
- const T = new Date(w);
1729
- T.setDate(w.getDate() + N);
1727
+ return Array.from({ length: 7 }, (x, S) => {
1728
+ const A = new Date(w);
1729
+ A.setDate(w.getDate() + S);
1730
1730
  try {
1731
- return new Intl.DateTimeFormat(r, { weekday: "short" }).format(T);
1731
+ return new Intl.DateTimeFormat(r, { weekday: "short" }).format(A);
1732
1732
  } catch {
1733
- return Lt(T, "EEE");
1733
+ return Bt(A, "EEE");
1734
1734
  }
1735
1735
  });
1736
- }, [r]), x = L(() => new Set(e), [e]), I = fe(
1737
- (w) => x.has(He(w)),
1738
- [x]
1739
- ), A = L(() => {
1740
- if (p) return p;
1741
- if (t) return me(t);
1742
- const w = o.find(
1743
- (S) => Dt(S, u) && I(S)
1736
+ }, [r]), k = R(() => new Set(e), [e]), I = ue(
1737
+ (w) => k.has(Ze(w)),
1738
+ [k]
1739
+ ), N = R(() => {
1740
+ if (m) return m;
1741
+ if (t) return le(t);
1742
+ const w = l.find(
1743
+ (x) => Ot(x, f) && I(x)
1744
1744
  );
1745
- return w || (o.find((S) => Dt(S, u)) ?? null);
1746
- }, [p, t, o, u, I]), E = fe(
1747
- (w, S) => {
1748
- let N = null;
1745
+ return w || (l.find((x) => Ot(x, f)) ?? null);
1746
+ }, [m, t, l, f, I]), M = ue(
1747
+ (w, x) => {
1748
+ let S = null;
1749
1749
  switch (w.key) {
1750
1750
  case "ArrowLeft":
1751
- N = new Date(S), N.setDate(S.getDate() - 1);
1751
+ S = new Date(x), S.setDate(x.getDate() - 1);
1752
1752
  break;
1753
1753
  case "ArrowRight":
1754
- N = new Date(S), N.setDate(S.getDate() + 1);
1754
+ S = new Date(x), S.setDate(x.getDate() + 1);
1755
1755
  break;
1756
1756
  case "ArrowUp":
1757
- N = new Date(S), N.setDate(S.getDate() - 7);
1757
+ S = new Date(x), S.setDate(x.getDate() - 7);
1758
1758
  break;
1759
1759
  case "ArrowDown":
1760
- N = new Date(S), N.setDate(S.getDate() + 7);
1760
+ S = new Date(x), S.setDate(x.getDate() + 7);
1761
1761
  break;
1762
1762
  case "Home":
1763
- N = new Date(S), N.setDate(S.getDate() - S.getDay());
1763
+ S = new Date(x), S.setDate(x.getDate() - x.getDay());
1764
1764
  break;
1765
1765
  case "End":
1766
- N = new Date(S), N.setDate(S.getDate() + (6 - S.getDay()));
1766
+ S = new Date(x), S.setDate(x.getDate() + (6 - x.getDay()));
1767
1767
  break;
1768
1768
  case "Enter":
1769
1769
  case " ": {
1770
- w.preventDefault(), I(S) && n(He(S));
1770
+ w.preventDefault(), I(x) && n(Ze(x));
1771
1771
  return;
1772
1772
  }
1773
1773
  default:
1774
1774
  return;
1775
1775
  }
1776
- N && (w.preventDefault(), Dt(N, u) || g(bt(N)), h(N));
1776
+ S && (w.preventDefault(), Ot(S, f) || p(ht(S)), g(S));
1777
1777
  },
1778
- [I, n, u]
1778
+ [I, n, f]
1779
1779
  );
1780
1780
  return i ? /* @__PURE__ */ v(
1781
1781
  "div",
@@ -1785,22 +1785,22 @@ function vi({
1785
1785
  "aria-label": a("common.loading"),
1786
1786
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1787
1787
  children: [
1788
- /* @__PURE__ */ s(Bt, { variant: "text", width: "40%" }),
1789
- /* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (w, S) => /* @__PURE__ */ s(Bt, { variant: "rounded", height: "2.5rem" }, `mg-skel-${S}`)) })
1788
+ /* @__PURE__ */ s(Et, { variant: "text", width: "40%" }),
1789
+ /* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (w, x) => /* @__PURE__ */ s(Et, { variant: "rounded", height: "2.5rem" }, `mg-skel-${x}`)) })
1790
1790
  ]
1791
1791
  }
1792
1792
  ) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1793
1793
  /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1794
1794
  /* @__PURE__ */ s(
1795
- ss,
1795
+ ns,
1796
1796
  {
1797
- icon: /* @__PURE__ */ s(tn, {}),
1797
+ icon: /* @__PURE__ */ s(sn, {}),
1798
1798
  "aria-label": a("booking.previousMonth"),
1799
1799
  size: "sm",
1800
1800
  intent: "ghost",
1801
1801
  flipIconInRtl: !0,
1802
1802
  onClick: () => {
1803
- g((w) => Ln(w)), h(null);
1803
+ p((w) => Bn(w)), g(null);
1804
1804
  }
1805
1805
  }
1806
1806
  ),
@@ -1809,19 +1809,19 @@ function vi({
1809
1809
  {
1810
1810
  className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]",
1811
1811
  "aria-live": "polite",
1812
- children: c
1812
+ children: o
1813
1813
  }
1814
1814
  ),
1815
1815
  /* @__PURE__ */ s(
1816
- ss,
1816
+ ns,
1817
1817
  {
1818
- icon: /* @__PURE__ */ s(sn, {}),
1818
+ icon: /* @__PURE__ */ s(nn, {}),
1819
1819
  "aria-label": a("booking.nextMonth"),
1820
1820
  size: "sm",
1821
1821
  intent: "ghost",
1822
1822
  flipIconInRtl: !0,
1823
1823
  onClick: () => {
1824
- g((w) => fs(w, 1)), h(null);
1824
+ p((w) => gs(w, 1)), g(null);
1825
1825
  }
1826
1826
  }
1827
1827
  )
@@ -1838,30 +1838,30 @@ function vi({
1838
1838
  {
1839
1839
  role: "row",
1840
1840
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1841
- children: f.map((w, S) => /* @__PURE__ */ s(
1841
+ children: u.map((w, x) => /* @__PURE__ */ s(
1842
1842
  "div",
1843
1843
  {
1844
1844
  role: "columnheader",
1845
1845
  className: "type-meta ds:text-center ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-medium)]",
1846
1846
  children: w
1847
1847
  },
1848
- `wd-${S}`
1848
+ `wd-${x}`
1849
1849
  ))
1850
1850
  }
1851
1851
  ),
1852
- Array.from({ length: 6 }, (w, S) => /* @__PURE__ */ s(
1852
+ Array.from({ length: 6 }, (w, x) => /* @__PURE__ */ s(
1853
1853
  "div",
1854
1854
  {
1855
1855
  role: "row",
1856
1856
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1857
- children: o.slice(S * 7, S * 7 + 7).map((N, T) => {
1858
- const D = S * 7 + T, y = Dt(N, u), k = y && I(N), B = t ? ns(N, me(t)) : !1, $ = y ? B ? "selected" : k ? "available" : "unavailable" : "outside", b = A ? ns(A, N) : !1, ge = (() => {
1857
+ children: l.slice(x * 7, x * 7 + 7).map((S, A) => {
1858
+ const D = x * 7 + A, T = Ot(S, f), h = T && I(S), C = t ? is(S, le(t)) : !1, $ = T ? C ? "selected" : h ? "available" : "unavailable" : "outside", b = N ? is(N, S) : !1, pe = (() => {
1859
1859
  try {
1860
1860
  return new Intl.DateTimeFormat(r, {
1861
1861
  dateStyle: "full"
1862
- }).format(N);
1862
+ }).format(S);
1863
1863
  } catch {
1864
- return Lt(N, "PPP");
1864
+ return Bt(S, "PPP");
1865
1865
  }
1866
1866
  })();
1867
1867
  return /* @__PURE__ */ s(
@@ -1869,30 +1869,30 @@ function vi({
1869
1869
  {
1870
1870
  type: "button",
1871
1871
  role: "gridcell",
1872
- "aria-label": ge,
1873
- "aria-selected": B || void 0,
1874
- "aria-disabled": !k || void 0,
1872
+ "aria-label": pe,
1873
+ "aria-selected": C || void 0,
1874
+ "aria-disabled": !h || void 0,
1875
1875
  tabIndex: b ? 0 : -1,
1876
- disabled: !k,
1876
+ disabled: !h,
1877
1877
  onClick: () => {
1878
- k && n(He(N));
1878
+ h && n(Ze(S));
1879
1879
  },
1880
- onKeyDown: (O) => E(O, N),
1881
- className: hi({ state: $ }),
1882
- children: /* @__PURE__ */ s("span", { "aria-hidden": "true", children: N.getDate() })
1880
+ onKeyDown: (F) => M(F, S),
1881
+ className: vi({ state: $ }),
1882
+ children: /* @__PURE__ */ s("span", { "aria-hidden": "true", children: S.getDate() })
1883
1883
  },
1884
1884
  `mg-cell-${D}`
1885
1885
  );
1886
1886
  })
1887
1887
  },
1888
- `mg-row-${S}`
1888
+ `mg-row-${x}`
1889
1889
  ))
1890
1890
  ]
1891
1891
  }
1892
1892
  )
1893
1893
  ] });
1894
1894
  }
1895
- const bi = kt(
1895
+ const yi = bt(
1896
1896
  [
1897
1897
  "ds:relative ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-md)]",
1898
1898
  "ds:min-h-[var(--min-target-size)]",
@@ -1918,95 +1918,96 @@ const bi = kt(
1918
1918
  defaultVariants: { state: "idle" }
1919
1919
  }
1920
1920
  );
1921
- function yi({
1921
+ function ki({
1922
1922
  services: e,
1923
1923
  selectedServiceId: t,
1924
- onSelect: n
1924
+ onSelect: n,
1925
+ showDuration: r
1925
1926
  }) {
1926
- const { t: r, i18n: i } = U("ui"), a = Rt(), [d, u] = X(() => {
1927
+ const { t: i, i18n: a } = G("ui"), c = Pt(), [f, p] = Q(() => {
1927
1928
  if (t) {
1928
- const o = e.findIndex((c) => c.id === t);
1929
+ const o = e.findIndex((u) => u.id === t);
1929
1930
  if (o >= 0) return o;
1930
1931
  }
1931
1932
  return 0;
1932
- }), g = _(/* @__PURE__ */ new Map()), p = fe((o) => {
1933
- var c;
1934
- (c = g.current.get(o)) == null || c.focus();
1935
- }, []), h = fe(
1936
- (o, c, f) => {
1937
- const x = e.length;
1938
- if (x !== 0)
1933
+ }), m = E(/* @__PURE__ */ new Map()), g = ue((o) => {
1934
+ var u;
1935
+ (u = m.current.get(o)) == null || u.focus();
1936
+ }, []), l = ue(
1937
+ (o, u, k) => {
1938
+ const I = e.length;
1939
+ if (I !== 0)
1939
1940
  switch (o.key) {
1940
1941
  case "ArrowDown":
1941
1942
  case "ArrowRight": {
1942
1943
  o.preventDefault();
1943
- const I = (c + 1) % x;
1944
- u(I), p(I);
1944
+ const N = (u + 1) % I;
1945
+ p(N), g(N);
1945
1946
  break;
1946
1947
  }
1947
1948
  case "ArrowUp":
1948
1949
  case "ArrowLeft": {
1949
1950
  o.preventDefault();
1950
- const I = (c - 1 + x) % x;
1951
- u(I), p(I);
1951
+ const N = (u - 1 + I) % I;
1952
+ p(N), g(N);
1952
1953
  break;
1953
1954
  }
1954
1955
  case "Home": {
1955
- o.preventDefault(), u(0), p(0);
1956
+ o.preventDefault(), p(0), g(0);
1956
1957
  break;
1957
1958
  }
1958
1959
  case "End": {
1959
1960
  o.preventDefault();
1960
- const I = x - 1;
1961
- u(I), p(I);
1961
+ const N = I - 1;
1962
+ p(N), g(N);
1962
1963
  break;
1963
1964
  }
1964
1965
  case "Enter":
1965
1966
  case " ": {
1966
- o.preventDefault(), n(f);
1967
+ o.preventDefault(), n(k);
1967
1968
  break;
1968
1969
  }
1969
1970
  }
1970
1971
  },
1971
- [e.length, p, n]
1972
+ [e.length, g, n]
1972
1973
  );
1973
1974
  return e.length === 0 ? null : /* @__PURE__ */ s(
1974
1975
  "div",
1975
1976
  {
1976
1977
  role: "radiogroup",
1977
- "aria-label": r("booking.serviceListLabel"),
1978
- id: a,
1978
+ "aria-label": i("booking.serviceListLabel"),
1979
+ id: c,
1979
1980
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1980
- children: e.map((o, c) => {
1981
- const f = t === o.id, x = d === c, I = Xt(o), A = o.payment ? I ? r(`booking.payment.${I.kind}`, {
1982
- amount: St(
1983
- I.amountCents,
1984
- I.currencyCode,
1985
- i.language
1981
+ children: e.map((o, u) => {
1982
+ const k = t === o.id, I = f === u, N = Qt(o), M = o.payment ? N ? i(`booking.payment.${N.kind}`, {
1983
+ amount: yt(
1984
+ N.amountCents,
1985
+ N.currencyCode,
1986
+ a.language
1986
1987
  )
1987
- }) : r("booking.payment.unavailable") : Cs(o), E = A ? r("booking.serviceCardLabelPrice", {
1988
+ }) : i("booking.payment.unavailable") : As(o), w = M ? i("booking.serviceCardLabelPrice", {
1988
1989
  label: o.label,
1989
- price: A
1990
- }) : r("booking.serviceCardLabel", {
1990
+ price: M
1991
+ }) : r ? i("booking.serviceCardLabel", {
1991
1992
  label: o.label,
1992
1993
  duration: o.durationMin
1993
- }), w = fi(o);
1994
+ }) : o.label, x = gi(o);
1994
1995
  return /* @__PURE__ */ v(
1995
1996
  "button",
1996
1997
  {
1997
1998
  ref: (S) => {
1998
- S ? g.current.set(c, S) : g.current.delete(c);
1999
+ S ? m.current.set(u, S) : m.current.delete(u);
1999
2000
  },
2000
2001
  type: "button",
2001
2002
  role: "radio",
2002
- "aria-checked": f,
2003
- "aria-label": E,
2004
- tabIndex: x ? 0 : -1,
2003
+ "aria-checked": k,
2004
+ "aria-label": w,
2005
+ tabIndex: I ? 0 : -1,
2005
2006
  onClick: () => n(o.id),
2006
- onFocus: () => u(c),
2007
- onKeyDown: (S) => h(S, c, o.id),
2008
- className: bi({
2009
- state: f ? "selected" : "idle"
2007
+ onFocus: () => p(u),
2008
+ onKeyDown: (S) => l(S, u, o.id),
2009
+ className: yi({
2010
+ state: k ? "selected" : "idle"
2010
2011
  }),
2011
2012
  children: [
2012
2013
  /* @__PURE__ */ s(
@@ -2014,21 +2015,21 @@ function yi({
2014
2015
  {
2015
2016
  "aria-hidden": "true",
2016
2017
  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)]",
2017
- children: w
2018
+ children: x
2018
2019
  }
2019
2020
  ),
2020
2021
  /* @__PURE__ */ v("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
2021
2022
  /* @__PURE__ */ s("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: o.label }),
2022
- A ? null : /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: r("booking.serviceSummary", {
2023
+ M || !r ? null : /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: i("booking.serviceSummary", {
2023
2024
  minutes: o.durationMin
2024
2025
  }) })
2025
2026
  ] }),
2026
- A ? /* @__PURE__ */ s(
2027
+ M ? /* @__PURE__ */ s(
2027
2028
  "span",
2028
2029
  {
2029
2030
  "aria-hidden": "true",
2030
2031
  className: "ds:inline-flex ds:shrink-0 ds:items-center ds:ms-auto",
2031
- children: /* @__PURE__ */ s(ps, { variant: "accentSoft", size: "lg", children: A })
2032
+ children: /* @__PURE__ */ s(ms, { variant: "accentSoft", size: "lg", children: M })
2032
2033
  }
2033
2034
  ) : null
2034
2035
  ]
@@ -2039,7 +2040,7 @@ function yi({
2039
2040
  }
2040
2041
  );
2041
2042
  }
2042
- const ki = kt(
2043
+ const Si = bt(
2043
2044
  [
2044
2045
  "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)]",
2045
2046
  "ds:min-h-[var(--min-target-size)]",
@@ -2065,16 +2066,16 @@ const ki = kt(
2065
2066
  defaultVariants: { state: "idle" }
2066
2067
  }
2067
2068
  );
2068
- function Si(e) {
2069
+ function xi(e) {
2069
2070
  const [t] = e.split(":").map((r) => parseInt(r, 10)), n = Number.isFinite(t) ? t : 0;
2070
2071
  return n < 12 ? "morning" : n < 17 ? "afternoon" : "evening";
2071
2072
  }
2072
- const xi = {
2073
- morning: rn,
2074
- afternoon: Fn,
2075
- evening: nn
2073
+ const Ii = {
2074
+ morning: an,
2075
+ afternoon: _n,
2076
+ evening: rn
2076
2077
  };
2077
- function Ii({
2078
+ function Ni({
2078
2079
  date: e,
2079
2080
  slots: t,
2080
2081
  selectedSlotKey: n,
@@ -2082,202 +2083,202 @@ function Ii({
2082
2083
  loading: i,
2083
2084
  locale: a
2084
2085
  }) {
2085
- const { t: d } = U("ui"), u = L(() => {
2086
+ const { t: c } = G("ui"), f = R(() => {
2086
2087
  try {
2087
2088
  return new Intl.DateTimeFormat(a, {
2088
2089
  weekday: "long",
2089
2090
  day: "numeric",
2090
2091
  month: "long"
2091
- }).format(me(e));
2092
+ }).format(le(e));
2092
2093
  } catch {
2093
2094
  return e;
2094
2095
  }
2095
- }, [e, a]), g = L(() => {
2096
- const o = {
2096
+ }, [e, a]), p = R(() => {
2097
+ const l = {
2097
2098
  morning: [],
2098
2099
  afternoon: [],
2099
2100
  evening: []
2100
2101
  };
2101
- for (const c of t)
2102
- o[Si(c.time)].push(c);
2103
- return o;
2104
- }, [t]), p = t.filter((o) => o.available).length, h = ["morning", "afternoon", "evening"];
2102
+ for (const o of t)
2103
+ l[xi(o.time)].push(o);
2104
+ return l;
2105
+ }, [t]), m = t.filter((l) => l.available).length, g = ["morning", "afternoon", "evening"];
2105
2106
  return i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2106
- /* @__PURE__ */ s(Bt, { variant: "text", width: "60%" }),
2107
- [0, 1].map((o) => /* @__PURE__ */ s(
2107
+ /* @__PURE__ */ s(Et, { variant: "text", width: "60%" }),
2108
+ [0, 1].map((l) => /* @__PURE__ */ s(
2108
2109
  "div",
2109
2110
  {
2110
2111
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)]",
2111
- children: [0, 1, 2].map((c) => /* @__PURE__ */ s(Bt, { variant: "rounded", height: "44px" }, c))
2112
+ children: [0, 1, 2].map((o) => /* @__PURE__ */ s(Et, { variant: "rounded", height: "44px" }, o))
2112
2113
  },
2113
- o
2114
+ l
2114
2115
  ))
2115
- ] }) : p === 0 ? /* @__PURE__ */ s(ms, { variant: "no-results", title: d("booking.noSlotsForDate") }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2116
+ ] }) : m === 0 ? /* @__PURE__ */ s(fs, { variant: "no-results", title: c("booking.noSlotsForDate") }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2116
2117
  /* @__PURE__ */ v("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
2117
2118
  /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
2118
2119
  /* @__PURE__ */ s(
2119
- kn,
2120
+ Sn,
2120
2121
  {
2121
2122
  "aria-hidden": "true",
2122
2123
  className: "ds:size-4 ds:text-[color:var(--accent)]"
2123
2124
  }
2124
2125
  ),
2125
- /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: u })
2126
+ /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: f })
2126
2127
  ] }),
2127
- /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: d("booking.slotsAvailable", { count: p }) })
2128
+ /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: c("booking.slotsAvailable", { count: m }) })
2128
2129
  ] }),
2129
- h.map((o) => {
2130
- const c = g[o];
2131
- if (c.length === 0) return null;
2132
- const f = xi[o];
2130
+ g.map((l) => {
2131
+ const o = p[l];
2132
+ if (o.length === 0) return null;
2133
+ const u = Ii[l];
2133
2134
  return /* @__PURE__ */ v(
2134
2135
  "div",
2135
2136
  {
2136
2137
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
2137
2138
  children: [
2138
2139
  /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
2139
- /* @__PURE__ */ s(f, { "aria-hidden": "true", className: "ds:size-3.5" }),
2140
- /* @__PURE__ */ s("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: d(`booking.timeOfDay.${o}`) })
2140
+ /* @__PURE__ */ s(u, { "aria-hidden": "true", className: "ds:size-3.5" }),
2141
+ /* @__PURE__ */ s("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: c(`booking.timeOfDay.${l}`) })
2141
2142
  ] }),
2142
2143
  /* @__PURE__ */ s(
2143
2144
  "div",
2144
2145
  {
2145
2146
  role: "group",
2146
- "aria-label": d(`booking.timeOfDay.${o}`),
2147
+ "aria-label": c(`booking.timeOfDay.${l}`),
2147
2148
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-4",
2148
- children: c.map((x) => {
2149
- const I = x.key === n, A = x.available ? I ? "selected" : "idle" : "unavailable";
2149
+ children: o.map((k) => {
2150
+ const I = k.key === n, N = k.available ? I ? "selected" : "idle" : "unavailable";
2150
2151
  return /* @__PURE__ */ s(
2151
2152
  "button",
2152
2153
  {
2153
2154
  type: "button",
2154
- "data-slot-id": x.key,
2155
- disabled: !x.available,
2155
+ "data-slot-id": k.key,
2156
+ disabled: !k.available,
2156
2157
  "aria-pressed": I,
2157
- "aria-label": d("booking.slotAvailableLabel", {
2158
- time: x.time
2158
+ "aria-label": c("booking.slotAvailableLabel", {
2159
+ time: k.time
2159
2160
  }),
2160
- onClick: () => x.available && r(x),
2161
- className: ki({ state: A }),
2162
- children: x.time
2161
+ onClick: () => k.available && r(k),
2162
+ className: Si({ state: N }),
2163
+ children: k.time
2163
2164
  },
2164
- x.key
2165
+ k.key
2165
2166
  );
2166
2167
  })
2167
2168
  }
2168
2169
  )
2169
2170
  ]
2170
2171
  },
2171
- o
2172
+ l
2172
2173
  );
2173
2174
  })
2174
2175
  ] });
2175
2176
  }
2176
- const _t = 4;
2177
- function Ni({
2177
+ const Lt = 4;
2178
+ function wi({
2178
2179
  availableDates: e,
2179
2180
  availableSlots: t,
2180
2181
  value: n,
2181
2182
  onChange: r,
2182
2183
  onDateSelect: i,
2183
2184
  onWindowChange: a,
2184
- loadingDates: d,
2185
- loadingSlots: u,
2186
- locale: g,
2187
- agentIdBase: p
2185
+ loadingDates: c,
2186
+ loadingSlots: f,
2187
+ locale: p,
2188
+ agentIdBase: m
2188
2189
  }) {
2189
- const h = L(() => at(/* @__PURE__ */ new Date()), []), [o, c] = X(() => {
2190
+ const g = R(() => at(/* @__PURE__ */ new Date()), []), [l, o] = Q(() => {
2190
2191
  if (n.date) {
2191
- const k = at(me(n.date));
2192
- if (!ot(h, k)) return k;
2192
+ const h = at(le(n.date));
2193
+ if (!ot(g, h)) return h;
2193
2194
  }
2194
2195
  if (e.length > 0) {
2195
- const k = at(me(e[0]));
2196
- if (ot(k, h)) return k;
2196
+ const h = at(le(e[0]));
2197
+ if (ot(h, g)) return h;
2197
2198
  }
2198
- return h;
2199
- }), f = L(
2200
- () => jt(o, _t - 1),
2201
- [o]
2202
- ), x = L(() => Array.from({ length: _t }, (k, B) => {
2203
- const $ = jt(o, B), b = He($), O = (t[b] ?? []).map((K) => ({
2204
- id: K.key,
2199
+ return g;
2200
+ }), u = R(
2201
+ () => Ut(l, Lt - 1),
2202
+ [l]
2203
+ ), k = R(() => Array.from({ length: Lt }, (h, C) => {
2204
+ const $ = Ut(l, C), b = Ze($), F = (t[b] ?? []).map((z) => ({
2205
+ id: z.key,
2205
2206
  // SlotGrid formats `start` as a time via Intl.DateTimeFormat —
2206
2207
  // compose a full ISO from the column's date + the slot's HH:mm
2207
2208
  // so the locale-formatter has a real timestamp to work with.
2208
- start: `${b}T${K.time}:00`,
2209
- available: K.available
2209
+ start: `${b}T${z.time}:00`,
2210
+ available: z.available
2210
2211
  }));
2211
- return { date: b, slots: O };
2212
- }), [o, t]), I = ot(o, h), A = !0, E = fe(() => {
2213
- c((k) => {
2214
- const B = en(k, _t);
2215
- return ot(h, B) ? h : B;
2212
+ return { date: b, slots: F };
2213
+ }), [l, t]), I = ot(l, g), N = !0, M = ue(() => {
2214
+ o((h) => {
2215
+ const C = tn(h, Lt);
2216
+ return ot(g, C) ? g : C;
2216
2217
  });
2217
- }, [h]), w = fe(() => {
2218
- c((k) => jt(k, _t));
2218
+ }, [g]), w = ue(() => {
2219
+ o((h) => Ut(h, Lt));
2219
2220
  }, []);
2220
- V(() => {
2221
+ q(() => {
2221
2222
  if (e.length === 0) return;
2222
- const k = at(me(e[0]));
2223
- !ot(k, h) || e.some(($) => {
2224
- const b = at(me($));
2225
- return !ot(b, f) && !Xs(b, o);
2226
- }) || c(k);
2227
- }, [e]), V(() => {
2228
- a == null || a(He(o), He(f));
2229
- }, [o, f, a]);
2230
- const S = fe(
2231
- (k, B) => {
2232
- const $ = typeof B.date == "string" ? B.date : He(B.date);
2223
+ const h = at(le(e[0]));
2224
+ !ot(h, g) || e.some(($) => {
2225
+ const b = at(le($));
2226
+ return !ot(b, u) && !Qs(b, l);
2227
+ }) || o(h);
2228
+ }, [e]), q(() => {
2229
+ a == null || a(Ze(l), Ze(u));
2230
+ }, [l, u, a]);
2231
+ const x = ue(
2232
+ (h, C) => {
2233
+ const $ = typeof C.date == "string" ? C.date : Ze(C.date);
2233
2234
  r({
2234
- ...xs(Vt(n, $), k.id)
2235
+ ...Is($t(n, $), h.id)
2235
2236
  }), i == null || i($);
2236
2237
  },
2237
2238
  [r, i, n]
2238
- ), N = d || u ? "loading" : "default", T = x.some((k) => k.slots.length > 0), D = e[0];
2239
+ ), S = c || f ? "loading" : "default", A = k.some((h) => h.slots.length > 0), D = e[0];
2239
2240
  return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2240
- !T && !!D ? /* @__PURE__ */ s(
2241
- Qt,
2241
+ !A && !!D ? /* @__PURE__ */ s(
2242
+ es,
2242
2243
  {
2243
2244
  nextAvailableDate: D,
2244
- onJump: () => c(at(me(D))),
2245
- locale: g
2245
+ onJump: () => o(at(le(D))),
2246
+ locale: p
2246
2247
  }
2247
2248
  ) : null,
2248
2249
  /* @__PURE__ */ s(
2249
- Ys,
2250
+ Zs,
2250
2251
  {
2251
- id: p ? `${p}-slots` : void 0,
2252
- days: x,
2253
- state: N,
2252
+ id: m ? `${m}-slots` : void 0,
2253
+ days: k,
2254
+ state: S,
2254
2255
  selectedSlotId: n.slotKey,
2255
2256
  maxInitialSlotsPerDay: 6,
2256
- locale: g,
2257
+ locale: p,
2257
2258
  hasPrevious: I,
2258
- hasNext: A,
2259
- onSlotSelect: S,
2260
- onPreviousDays: E,
2259
+ hasNext: N,
2260
+ onSlotSelect: x,
2261
+ onPreviousDays: M,
2261
2262
  onNextDays: w
2262
2263
  }
2263
2264
  )
2264
2265
  ] });
2265
2266
  }
2266
- function As(e) {
2267
+ function Ts(e) {
2267
2268
  const {
2268
2269
  inputs: t,
2269
2270
  value: n,
2270
2271
  onChange: r,
2271
2272
  onDateSelect: i,
2272
2273
  onWindowChange: a,
2273
- loadingDates: d,
2274
- loadingSlots: u,
2275
- locale: g,
2276
- datePickerStyle: p,
2277
- agentIdBase: h
2274
+ loadingDates: c,
2275
+ loadingSlots: f,
2276
+ locale: p,
2277
+ datePickerStyle: m,
2278
+ agentIdBase: g
2278
2279
  } = e;
2279
- return p === "four-day-grid" ? /* @__PURE__ */ s(
2280
- Ni,
2280
+ return m === "four-day-grid" ? /* @__PURE__ */ s(
2281
+ wi,
2281
2282
  {
2282
2283
  availableDates: t.availableDates,
2283
2284
  availableSlots: t.availableSlots,
@@ -2285,47 +2286,47 @@ function As(e) {
2285
2286
  onChange: r,
2286
2287
  onDateSelect: i,
2287
2288
  onWindowChange: a,
2288
- loadingDates: d,
2289
- loadingSlots: u,
2290
- locale: g,
2291
- agentIdBase: h
2289
+ loadingDates: c,
2290
+ loadingSlots: f,
2291
+ locale: p,
2292
+ agentIdBase: g
2292
2293
  }
2293
2294
  ) : /* @__PURE__ */ s(
2294
- vi,
2295
+ bi,
2295
2296
  {
2296
2297
  availableDates: t.availableDates,
2297
2298
  selectedDate: n.date,
2298
- onSelectDate: (o) => {
2299
- r(Vt(n, o)), i == null || i(o);
2299
+ onSelectDate: (l) => {
2300
+ r($t(n, l)), i == null || i(l);
2300
2301
  },
2301
- locale: g,
2302
- loading: d ?? u
2302
+ locale: p,
2303
+ loading: c ?? f
2303
2304
  }
2304
2305
  );
2305
2306
  }
2306
- function Ts(e) {
2307
- const { inputs: t, value: n, onChange: r, loadingSlots: i, locale: a, datePickerStyle: d } = e;
2308
- return d === "four-day-grid" || !n.date ? null : /* @__PURE__ */ s(
2309
- Ii,
2307
+ function Ds(e) {
2308
+ const { inputs: t, value: n, onChange: r, loadingSlots: i, locale: a, datePickerStyle: c } = e;
2309
+ return c === "four-day-grid" || !n.date ? null : /* @__PURE__ */ s(
2310
+ Ni,
2310
2311
  {
2311
2312
  date: n.date,
2312
2313
  slots: t.availableSlots[n.date] ?? [],
2313
2314
  selectedSlotKey: n.slotKey,
2314
- onSelect: (u) => r(xs(n, u.key)),
2315
+ onSelect: (f) => r(Is(n, f.key)),
2315
2316
  loading: i,
2316
2317
  locale: a
2317
2318
  }
2318
2319
  );
2319
2320
  }
2320
- function Ds({ value: e, onChange: t }) {
2321
- const { t: n } = U("ui"), r = [
2321
+ function Os({ value: e, onChange: t }) {
2322
+ const { t: n } = G("ui"), r = [
2322
2323
  { value: "private", label: n("booking.insurance.private") },
2323
2324
  { value: "public", label: n("booking.insurance.public") }
2324
2325
  ];
2325
2326
  return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2326
2327
  /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.insurance.heading") }),
2327
2328
  /* @__PURE__ */ s(
2328
- Pt,
2329
+ Vt,
2329
2330
  {
2330
2331
  options: r,
2331
2332
  value: e ?? "",
@@ -2338,7 +2339,7 @@ function Ds({ value: e, onChange: t }) {
2338
2339
  )
2339
2340
  ] });
2340
2341
  }
2341
- function Os({
2342
+ function Ms({
2342
2343
  specialties: e,
2343
2344
  value: t,
2344
2345
  valueIds: n,
@@ -2346,129 +2347,131 @@ function Os({
2346
2347
  onChangeIds: i,
2347
2348
  pickerStyle: a = "select"
2348
2349
  }) {
2349
- const { t: d } = U("ui"), u = e.map((p) => ({
2350
- value: p.id,
2351
- label: p.label
2352
- })), g = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: d("booking.specialty.heading") });
2350
+ const { t: c } = G("ui"), f = e.map((m) => ({
2351
+ value: m.id,
2352
+ label: m.label
2353
+ })), p = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c("booking.specialty.heading") });
2353
2354
  return a === "multi-select" && i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2354
- g,
2355
+ p,
2355
2356
  /* @__PURE__ */ s(
2356
- Yt,
2357
+ Zt,
2357
2358
  {
2358
- options: u,
2359
+ options: f,
2359
2360
  value: n ?? [],
2360
2361
  onChange: i,
2361
- placeholder: d("booking.specialty.placeholder"),
2362
- "aria-label": d("booking.specialty.heading"),
2362
+ placeholder: c("booking.specialty.placeholder"),
2363
+ "aria-label": c("booking.specialty.heading"),
2363
2364
  allowClear: !0
2364
2365
  }
2365
2366
  )
2366
2367
  ] }) : a === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2367
- g,
2368
+ p,
2368
2369
  /* @__PURE__ */ s(
2369
- Wt,
2370
+ Yt,
2370
2371
  {
2371
- options: u,
2372
+ options: f,
2372
2373
  value: t ?? "",
2373
- onValueChange: (p) => r(p === "" ? "" : p),
2374
- placeholder: d("booking.specialty.placeholder"),
2375
- "aria-label": d("booking.specialty.heading"),
2374
+ onValueChange: (m) => r(m === "" ? "" : m),
2375
+ placeholder: c("booking.specialty.placeholder"),
2376
+ "aria-label": c("booking.specialty.heading"),
2376
2377
  clearable: !0
2377
2378
  }
2378
2379
  )
2379
2380
  ] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2380
- g,
2381
+ p,
2381
2382
  /* @__PURE__ */ s(
2382
- Pt,
2383
+ Vt,
2383
2384
  {
2384
- options: u,
2385
+ options: f,
2385
2386
  value: t ?? "",
2386
- onValueChange: (p) => r(p),
2387
- placeholder: d("booking.specialty.placeholder"),
2388
- "aria-label": d("booking.specialty.heading")
2387
+ onValueChange: (m) => r(m),
2388
+ placeholder: c("booking.specialty.placeholder"),
2389
+ "aria-label": c("booking.specialty.heading")
2389
2390
  }
2390
2391
  )
2391
2392
  ] });
2392
2393
  }
2393
- function Ms({
2394
+ function Fs({
2394
2395
  services: e,
2395
2396
  value: t,
2396
2397
  valueIds: n,
2397
2398
  onChange: r,
2398
2399
  onChangeIds: i,
2399
2400
  pickerStyle: a,
2400
- compact: d
2401
+ compact: c,
2402
+ showDuration: f
2401
2403
  }) {
2402
- const { t: u, i18n: g } = U("ui"), p = a ?? (d ? "select" : "cards"), h = e.map((c) => {
2403
- const f = Xt(c), x = c.payment ? f ? u(`booking.payment.${f.kind}`, {
2404
- amount: St(
2405
- f.amountCents,
2406
- f.currencyCode,
2407
- g.language
2404
+ const { t: p, i18n: m } = G("ui"), g = a ?? (c ? "select" : "cards"), l = e.map((u) => {
2405
+ const k = Qt(u), I = u.payment ? k ? p(`booking.payment.${k.kind}`, {
2406
+ amount: yt(
2407
+ k.amountCents,
2408
+ k.currencyCode,
2409
+ m.language
2408
2410
  )
2409
- }) : u("booking.payment.unavailable") : Cs(c);
2410
- return x ? {
2411
- value: c.id,
2412
- label: c.label,
2413
- endContent: /* @__PURE__ */ s(ps, { variant: "accentSoft", size: "lg", children: x })
2411
+ }) : p("booking.payment.unavailable") : As(u);
2412
+ return I ? {
2413
+ value: u.id,
2414
+ label: u.label,
2415
+ endContent: /* @__PURE__ */ s(ms, { variant: "accentSoft", size: "lg", children: I })
2414
2416
  } : {
2415
- value: c.id,
2416
- label: `${c.label} · ${u("booking.serviceSummary", {
2417
- minutes: c.durationMin
2418
- })}`
2417
+ value: u.id,
2418
+ label: f ? `${u.label} · ${p("booking.serviceSummary", {
2419
+ minutes: u.durationMin
2420
+ })}` : u.label
2419
2421
  };
2420
- }), o = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: u("booking.service.heading") });
2421
- return p === "multi-select" && i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2422
+ }), o = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: p("booking.service.heading") });
2423
+ return g === "multi-select" && i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2422
2424
  o,
2423
2425
  /* @__PURE__ */ s(
2424
- Yt,
2426
+ Zt,
2425
2427
  {
2426
- options: h,
2428
+ options: l,
2427
2429
  value: n ?? [],
2428
2430
  onChange: i,
2429
- placeholder: u("booking.service.placeholder"),
2430
- "aria-label": u("booking.service.heading"),
2431
+ placeholder: p("booking.service.placeholder"),
2432
+ "aria-label": p("booking.service.heading"),
2431
2433
  allowClear: !0
2432
2434
  }
2433
2435
  )
2434
- ] }) : p === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2436
+ ] }) : g === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2435
2437
  o,
2436
2438
  /* @__PURE__ */ s(
2437
- Wt,
2439
+ Yt,
2438
2440
  {
2439
- options: h,
2441
+ options: l,
2440
2442
  value: t ?? "",
2441
- onValueChange: (c) => r(c === "" ? "" : c),
2442
- placeholder: u("booking.service.placeholder"),
2443
- "aria-label": u("booking.service.heading"),
2443
+ onValueChange: (u) => r(u === "" ? "" : u),
2444
+ placeholder: p("booking.service.placeholder"),
2445
+ "aria-label": p("booking.service.heading"),
2444
2446
  clearable: !0
2445
2447
  }
2446
2448
  )
2447
- ] }) : p === "select" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2449
+ ] }) : g === "select" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2448
2450
  o,
2449
2451
  /* @__PURE__ */ s(
2450
- Pt,
2452
+ Vt,
2451
2453
  {
2452
- options: h,
2454
+ options: l,
2453
2455
  value: t ?? "",
2454
- onValueChange: (c) => r(c),
2455
- placeholder: u("booking.service.placeholder"),
2456
- "aria-label": u("booking.service.heading")
2456
+ onValueChange: (u) => r(u),
2457
+ placeholder: p("booking.service.placeholder"),
2458
+ "aria-label": p("booking.service.heading")
2457
2459
  }
2458
2460
  )
2459
2461
  ] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2460
2462
  o,
2461
2463
  /* @__PURE__ */ s(
2462
- yi,
2464
+ ki,
2463
2465
  {
2464
2466
  services: e,
2465
2467
  selectedServiceId: t,
2466
- onSelect: r
2468
+ onSelect: r,
2469
+ showDuration: f
2467
2470
  }
2468
2471
  )
2469
2472
  ] });
2470
2473
  }
2471
- function Fs({
2474
+ function _s({
2472
2475
  operators: e,
2473
2476
  value: t,
2474
2477
  valueIds: n,
@@ -2476,127 +2479,127 @@ function Fs({
2476
2479
  onChangeIds: i,
2477
2480
  pickerStyle: a = "select"
2478
2481
  }) {
2479
- const { t: d } = U("ui"), u = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: d("booking.operator.heading") });
2482
+ const { t: c } = G("ui"), f = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c("booking.operator.heading") });
2480
2483
  if (a === "multi-select" && i) {
2481
- const p = e.map((h) => ({
2482
- value: h.id,
2483
- label: h.name
2484
+ const m = e.map((g) => ({
2485
+ value: g.id,
2486
+ label: g.name
2484
2487
  }));
2485
2488
  return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2486
- u,
2489
+ f,
2487
2490
  /* @__PURE__ */ s(
2488
- Yt,
2491
+ Zt,
2489
2492
  {
2490
- options: p,
2493
+ options: m,
2491
2494
  value: n ?? [],
2492
2495
  onChange: i,
2493
- placeholder: d("booking.operator.placeholder"),
2494
- "aria-label": d("booking.operator.heading"),
2496
+ placeholder: c("booking.operator.placeholder"),
2497
+ "aria-label": c("booking.operator.heading"),
2495
2498
  allowClear: !0
2496
2499
  }
2497
2500
  )
2498
2501
  ] });
2499
2502
  }
2500
- const g = [
2501
- { value: we, label: d("booking.operator.all") },
2502
- ...e.map((p) => ({ value: p.id, label: p.name }))
2503
+ const p = [
2504
+ { value: Ce, label: c("booking.operator.all") },
2505
+ ...e.map((m) => ({ value: m.id, label: m.name }))
2503
2506
  ];
2504
2507
  return a === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2505
- u,
2508
+ f,
2506
2509
  /* @__PURE__ */ s(
2507
- Wt,
2510
+ Yt,
2508
2511
  {
2509
- options: g,
2510
- value: t ?? we,
2511
- onValueChange: (p) => r(p === "" ? we : p),
2512
- placeholder: d("booking.operator.placeholder"),
2513
- "aria-label": d("booking.operator.heading"),
2512
+ options: p,
2513
+ value: t ?? Ce,
2514
+ onValueChange: (m) => r(m === "" ? Ce : m),
2515
+ placeholder: c("booking.operator.placeholder"),
2516
+ "aria-label": c("booking.operator.heading"),
2514
2517
  clearable: !0
2515
2518
  }
2516
2519
  )
2517
2520
  ] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2518
- u,
2521
+ f,
2519
2522
  /* @__PURE__ */ s(
2520
- Pt,
2523
+ Vt,
2521
2524
  {
2522
- options: g,
2523
- value: t ?? we,
2524
- onValueChange: (p) => r(p),
2525
- placeholder: d("booking.operator.placeholder"),
2526
- "aria-label": d("booking.operator.heading")
2525
+ options: p,
2526
+ value: t ?? Ce,
2527
+ onValueChange: (m) => r(m),
2528
+ placeholder: c("booking.operator.placeholder"),
2529
+ "aria-label": c("booking.operator.heading")
2527
2530
  }
2528
2531
  )
2529
2532
  ] });
2530
2533
  }
2531
- function _s({
2534
+ function Ls({
2532
2535
  customSlot: e
2533
2536
  }) {
2534
- const { t } = U("ui");
2535
- return e ? /* @__PURE__ */ s(se, { children: e }) : /* @__PURE__ */ v(Q, { variant: "warning", children: [
2536
- /* @__PURE__ */ s(Q.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
2537
- /* @__PURE__ */ s(Q.Description, { children: t("booking.onboardingIncomplete.description") })
2537
+ const { t } = G("ui");
2538
+ return e ? /* @__PURE__ */ s(ne, { children: e }) : /* @__PURE__ */ v(ee, { variant: "warning", children: [
2539
+ /* @__PURE__ */ s(ee.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
2540
+ /* @__PURE__ */ s(ee.Description, { children: t("booking.onboardingIncomplete.description") })
2538
2541
  ] });
2539
2542
  }
2540
- function Qt({
2543
+ function es({
2541
2544
  nextAvailableDate: e,
2542
2545
  onJump: t,
2543
2546
  locale: n
2544
2547
  }) {
2545
- const { t: r } = U("ui"), i = L(() => {
2548
+ const { t: r } = G("ui"), i = R(() => {
2546
2549
  try {
2547
2550
  return new Intl.DateTimeFormat(n, { dateStyle: "long" }).format(
2548
- me(e)
2551
+ le(e)
2549
2552
  );
2550
2553
  } catch {
2551
2554
  return e;
2552
2555
  }
2553
2556
  }, [e, n]);
2554
- return /* @__PURE__ */ v(Q, { variant: "info", children: [
2555
- /* @__PURE__ */ s(Q.Description, { children: r("booking.nextAvailable.description", { date: i }) }),
2556
- /* @__PURE__ */ s(Q.Action, { children: /* @__PURE__ */ s(Je, { intent: "secondary", size: "sm", onClick: t, children: r("booking.nextAvailable.cta") }) })
2557
+ return /* @__PURE__ */ v(ee, { variant: "info", children: [
2558
+ /* @__PURE__ */ s(ee.Description, { children: r("booking.nextAvailable.description", { date: i }) }),
2559
+ /* @__PURE__ */ s(ee.Action, { children: /* @__PURE__ */ s(Xe, { intent: "secondary", size: "sm", onClick: t, children: r("booking.nextAvailable.cta") }) })
2557
2560
  ] });
2558
2561
  }
2559
- function wi({
2562
+ function Ci({
2560
2563
  payment: e,
2561
2564
  snapshot: t,
2562
2565
  operators: n,
2563
2566
  specialties: r,
2564
2567
  services: i,
2565
2568
  locale: a,
2566
- mode: d,
2567
- showModify: u,
2568
- onReset: g,
2569
- onModify: p,
2570
- focusWasLost: h
2569
+ mode: c,
2570
+ showModify: f,
2571
+ onReset: p,
2572
+ onModify: m,
2573
+ focusWasLost: g
2571
2574
  }) {
2572
- const { t: o } = U("ui"), c = _(null);
2573
- V(() => {
2574
- const T = c.current, D = document.activeElement, y = T == null ? void 0 : T.closest('[data-component="booking"]');
2575
- !e || !T || (D && (y != null && y.contains(D)) || h()) && T.focus();
2575
+ const { t: l } = G("ui"), o = E(null);
2576
+ q(() => {
2577
+ const A = o.current, D = document.activeElement, T = A == null ? void 0 : A.closest('[data-component="booking"]');
2578
+ !e || !A || (D && (T != null && T.contains(D)) || g()) && A.focus();
2576
2579
  }, []);
2577
- const x = (t.details.confirmationChannels ?? ["email"]).map(
2578
- (T) => o(`booking.confirmation.channel.${T}`)
2579
- ), I = e ? St(e.amountCents, e.currencyCode, a) : "", A = e ? o(
2580
- d === "demo" ? "booking.payment.paidDemo" : "booking.payment.paidBody",
2580
+ const k = (t.details.confirmationChannels ?? ["email"]).map(
2581
+ (A) => l(`booking.confirmation.channel.${A}`)
2582
+ ), I = e ? yt(e.amountCents, e.currencyCode, a) : "", N = e ? l(
2583
+ c === "demo" ? "booking.payment.paidDemo" : "booking.payment.paidBody",
2581
2584
  { amount: I }
2582
- ) : d === "demo" ? o("booking.success.descriptionDemo") : x.length > 1 ? o("booking.success.descriptionMultiple", {
2583
- channels: x.join(" · ")
2584
- }) : o("booking.success.descriptionSingle", { channel: x[0] }), E = L(() => {
2585
+ ) : c === "demo" ? l("booking.success.descriptionDemo") : k.length > 1 ? l("booking.success.descriptionMultiple", {
2586
+ channels: k.join(" · ")
2587
+ }) : l("booking.success.descriptionSingle", { channel: k[0] }), M = R(() => {
2585
2588
  if (t.date)
2586
2589
  try {
2587
2590
  return new Intl.DateTimeFormat(a, {
2588
2591
  weekday: "long",
2589
2592
  day: "numeric",
2590
2593
  month: "long"
2591
- }).format(me(t.date));
2594
+ }).format(le(t.date));
2592
2595
  } catch {
2593
2596
  return t.date;
2594
2597
  }
2595
- }, [t.date, a]), w = L(() => {
2596
- const D = (t.operatorIds && t.operatorIds.length > 0 ? t.operatorIds : t.operatorId ? [t.operatorId] : []).filter((y) => y !== we).map((y) => {
2597
- var k;
2598
- return (k = n.find((B) => B.id === y)) == null ? void 0 : k.name;
2599
- }).filter((y) => y !== void 0);
2598
+ }, [t.date, a]), w = R(() => {
2599
+ const D = (t.operatorIds && t.operatorIds.length > 0 ? t.operatorIds : t.operatorId ? [t.operatorId] : []).filter((T) => T !== Ce).map((T) => {
2600
+ var h;
2601
+ return (h = n.find((C) => C.id === T)) == null ? void 0 : h.name;
2602
+ }).filter((T) => T !== void 0);
2600
2603
  if (D.length === 0) return "";
2601
2604
  try {
2602
2605
  return new Intl.ListFormat(a === "en" ? "en-GB" : a, {
@@ -2606,64 +2609,64 @@ function wi({
2606
2609
  } catch {
2607
2610
  return D.join(", ");
2608
2611
  }
2609
- }, [t.operatorIds, t.operatorId, n, a]), S = t.specialtyId ? r.find((T) => T.id === t.specialtyId) : void 0, N = t.serviceId ? i.find((T) => T.id === t.serviceId) : void 0;
2612
+ }, [t.operatorIds, t.operatorId, n, a]), x = t.specialtyId ? r.find((A) => A.id === t.specialtyId) : void 0, S = t.serviceId ? i.find((A) => A.id === t.serviceId) : void 0;
2610
2613
  return /* @__PURE__ */ v(
2611
2614
  "div",
2612
2615
  {
2613
2616
  "data-component": "booking-success",
2614
2617
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
2615
2618
  children: [
2616
- /* @__PURE__ */ v(Q, { variant: "success", children: [
2619
+ /* @__PURE__ */ v(ee, { variant: "success", children: [
2617
2620
  /* @__PURE__ */ s(
2618
- Q.Title,
2621
+ ee.Title,
2619
2622
  {
2620
2623
  as: "h3",
2621
- ref: c,
2624
+ ref: o,
2622
2625
  tabIndex: e ? -1 : void 0,
2623
- className: e ? Et : void 0,
2624
- children: o(
2625
- e ? d === "demo" ? "booking.payment.paidDemoTitle" : "booking.payment.paidTitle" : "booking.success.heading"
2626
+ className: e ? Rt : void 0,
2627
+ children: l(
2628
+ e ? c === "demo" ? "booking.payment.paidDemoTitle" : "booking.payment.paidTitle" : "booking.success.heading"
2626
2629
  )
2627
2630
  }
2628
2631
  ),
2629
- /* @__PURE__ */ s(Q.Description, { children: A })
2632
+ /* @__PURE__ */ s(ee.Description, { children: N })
2630
2633
  ] }),
2631
2634
  /* @__PURE__ */ s("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ v("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: [
2632
- e && d !== "demo" ? /* @__PURE__ */ v(se, { children: [
2633
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.payment.summaryPaid") }),
2635
+ e && c !== "demo" ? /* @__PURE__ */ v(ne, { children: [
2636
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.payment.summaryPaid") }),
2634
2637
  /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: I })
2635
2638
  ] }) : null,
2636
- S ? /* @__PURE__ */ v(se, { children: [
2637
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summarySpecialty") }),
2638
- /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: S.label })
2639
+ x ? /* @__PURE__ */ v(ne, { children: [
2640
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summarySpecialty") }),
2641
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: x.label })
2639
2642
  ] }) : null,
2640
- N ? /* @__PURE__ */ v(se, { children: [
2641
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryService") }),
2642
- /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: N.label })
2643
+ S ? /* @__PURE__ */ v(ne, { children: [
2644
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryService") }),
2645
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: S.label })
2643
2646
  ] }) : null,
2644
- E ? /* @__PURE__ */ v(se, { children: [
2645
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryDate") }),
2646
- /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: E })
2647
+ M ? /* @__PURE__ */ v(ne, { children: [
2648
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryDate") }),
2649
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: M })
2647
2650
  ] }) : null,
2648
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryTime") }),
2651
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryTime") }),
2649
2652
  /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: t.slot.time }),
2650
- w ? /* @__PURE__ */ v(se, { children: [
2651
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryProvider") }),
2653
+ w ? /* @__PURE__ */ v(ne, { children: [
2654
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryProvider") }),
2652
2655
  /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: w })
2653
2656
  ] }) : null
2654
2657
  ] }) }),
2655
2658
  /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
2656
- /* @__PURE__ */ s(Je, { intent: "secondary", size: "md", onClick: g, children: o("booking.success.bookAnother") }),
2657
- u ? /* @__PURE__ */ s(Je, { intent: "ghost", size: "md", onClick: p, children: o("booking.success.modifyBooking") }) : null
2659
+ /* @__PURE__ */ s(Xe, { intent: "secondary", size: "md", onClick: p, children: l("booking.success.bookAnother") }),
2660
+ f ? /* @__PURE__ */ s(Xe, { intent: "ghost", size: "md", onClick: m, children: l("booking.success.modifyBooking") }) : null
2658
2661
  ] })
2659
2662
  ]
2660
2663
  }
2661
2664
  );
2662
2665
  }
2663
- function Ls({ customSlot: e }) {
2664
- const { t } = U("ui");
2665
- return e ? /* @__PURE__ */ s(se, { children: e }) : /* @__PURE__ */ s(
2666
- ms,
2666
+ function Bs({ customSlot: e }) {
2667
+ const { t } = G("ui");
2668
+ return e ? /* @__PURE__ */ s(ne, { children: e }) : /* @__PURE__ */ s(
2669
+ fs,
2667
2670
  {
2668
2671
  variant: "no-results",
2669
2672
  title: t("booking.emptyServices.title"),
@@ -2671,14 +2674,14 @@ function Ls({ customSlot: e }) {
2671
2674
  }
2672
2675
  );
2673
2676
  }
2674
- const Bs = "data-booking-step-active", Ci = `[${Bs}]`, Et = [
2677
+ const Es = "data-booking-step-active", Ai = `[${Es}]`, Rt = [
2675
2678
  "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
2676
2679
  "ds:focus-visible:outline-solid",
2677
2680
  "ds:focus-visible:outline-[var(--ring)]",
2678
2681
  "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
2679
2682
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
2680
2683
  ].join(" ");
2681
- function j({
2684
+ function U({
2682
2685
  step: e,
2683
2686
  active: t,
2684
2687
  className: n,
@@ -2690,251 +2693,255 @@ function j({
2690
2693
  {
2691
2694
  id: r,
2692
2695
  "data-booking-step": String(e),
2693
- ...t ? { [Bs]: "" } : null,
2696
+ ...t ? { [Es]: "" } : null,
2694
2697
  tabIndex: -1,
2695
- className: n ? `${n} ${Et}` : Et,
2698
+ className: n ? `${n} ${Rt}` : Rt,
2696
2699
  children: i
2697
2700
  }
2698
2701
  );
2699
2702
  }
2700
- function es(e, t) {
2703
+ function ts(e, t) {
2701
2704
  return t === "four-day-grid" ? e.filter((n) => n !== 6) : e;
2702
2705
  }
2703
- function Ai(e) {
2706
+ function Ti(e) {
2704
2707
  const {
2705
2708
  cascade: t,
2706
2709
  inputs: n,
2707
2710
  value: r,
2708
2711
  onChange: i,
2709
2712
  onSubmit: a,
2710
- emptyServicesSlot: d,
2711
- onboardingIncompleteSlot: u,
2712
- loadingDates: g,
2713
- loadingSlots: p,
2714
- onDateSelect: h,
2715
- onWindowChange: o,
2716
- datePickerStyle: c,
2717
- specialtyPickerStyle: f,
2718
- servicePickerStyle: x,
2719
- operatorPickerStyle: I,
2720
- submitting: A,
2721
- locale: E,
2722
- detailsProps: w,
2713
+ emptyServicesSlot: c,
2714
+ onboardingIncompleteSlot: f,
2715
+ loadingDates: p,
2716
+ loadingSlots: m,
2717
+ onDateSelect: g,
2718
+ onWindowChange: l,
2719
+ datePickerStyle: o,
2720
+ specialtyPickerStyle: u,
2721
+ servicePickerStyle: k,
2722
+ showServiceDuration: I,
2723
+ operatorPickerStyle: N,
2724
+ submitting: M,
2725
+ locale: w,
2726
+ detailsProps: x,
2723
2727
  agentIdBase: S,
2724
- activeStep: N
2725
- } = e, { t: T } = U("ui"), D = ct(N, c), y = (k, B) => ({
2726
- step: k,
2727
- active: k === D,
2728
- className: B
2728
+ activeStep: A
2729
+ } = e, { t: D } = G("ui"), T = ct(A, o), h = (C, $) => ({
2730
+ step: C,
2731
+ active: C === T,
2732
+ className: $
2729
2733
  });
2730
2734
  return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2731
- t.gates.insurance ? /* @__PURE__ */ s(j, { ...y(1), children: /* @__PURE__ */ s(
2732
- Ds,
2735
+ t.gates.insurance ? /* @__PURE__ */ s(U, { ...h(1), children: /* @__PURE__ */ s(
2736
+ Os,
2733
2737
  {
2734
2738
  value: r.insuranceType,
2735
- onChange: (k) => i(gs(r, k))
2739
+ onChange: (C) => i(hs(r, C))
2736
2740
  }
2737
2741
  ) }) : null,
2738
- t.gates.specialty ? /* @__PURE__ */ s(j, { ...y(2), children: /* @__PURE__ */ s(
2739
- Os,
2742
+ t.gates.specialty ? /* @__PURE__ */ s(U, { ...h(2), children: /* @__PURE__ */ s(
2743
+ Ms,
2740
2744
  {
2741
2745
  specialties: t.filtered.specialties,
2742
2746
  value: r.specialtyId,
2743
2747
  valueIds: r.specialtyIds,
2744
- onChange: (k) => i(hs(r, k)),
2745
- onChangeIds: (k) => i(vs(r, k)),
2746
- pickerStyle: f
2748
+ onChange: (C) => i(vs(r, C)),
2749
+ onChangeIds: (C) => i(bs(r, C)),
2750
+ pickerStyle: u
2747
2751
  }
2748
2752
  ) }) : null,
2749
- t.gates.service ? /* @__PURE__ */ s(j, { ...y(3), children: t.filtered.services.length === 0 ? /* @__PURE__ */ s(Ls, { customSlot: d }) : /* @__PURE__ */ s(
2750
- Ms,
2753
+ t.gates.service ? /* @__PURE__ */ s(U, { ...h(3), children: t.filtered.services.length === 0 ? /* @__PURE__ */ s(Bs, { customSlot: c }) : /* @__PURE__ */ s(
2754
+ Fs,
2751
2755
  {
2752
2756
  services: t.filtered.services,
2753
2757
  value: r.serviceId,
2754
2758
  valueIds: r.serviceIds,
2755
- onChange: (k) => i(bs(r, k)),
2756
- onChangeIds: (k) => i(ys(r, k)),
2757
- pickerStyle: x
2759
+ onChange: (C) => i(ys(r, C)),
2760
+ onChangeIds: (C) => i(ks(r, C)),
2761
+ pickerStyle: k,
2762
+ showDuration: I
2758
2763
  }
2759
2764
  ) }) : null,
2760
- t.gates.onboardingIncomplete ? /* @__PURE__ */ s(_s, { customSlot: u }) : null,
2761
- t.gates.operator ? /* @__PURE__ */ s(j, { ...y(4), children: /* @__PURE__ */ s(
2762
- Fs,
2765
+ t.gates.onboardingIncomplete ? /* @__PURE__ */ s(Ls, { customSlot: f }) : null,
2766
+ t.gates.operator ? /* @__PURE__ */ s(U, { ...h(4), children: /* @__PURE__ */ s(
2767
+ _s,
2763
2768
  {
2764
2769
  operators: t.filtered.operators,
2765
2770
  value: r.operatorId,
2766
2771
  valueIds: r.operatorIds,
2767
- onChange: (k) => i(ks(r, k)),
2768
- onChangeIds: (k) => i(Ss(r, k)),
2769
- pickerStyle: I
2772
+ onChange: (C) => i(Ss(r, C)),
2773
+ onChangeIds: (C) => i(xs(r, C)),
2774
+ pickerStyle: N
2770
2775
  }
2771
2776
  ) }) : null,
2772
2777
  t.gates.date ? /* @__PURE__ */ v(
2773
- j,
2778
+ U,
2774
2779
  {
2775
- ...y(5, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
2780
+ ...h(5, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
2776
2781
  children: [
2777
- /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: T("booking.date.heading") }),
2782
+ /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: D("booking.date.heading") }),
2778
2783
  n.availableDates.length === 0 && n.nextAvailableDate ? /* @__PURE__ */ s(
2779
- Qt,
2784
+ es,
2780
2785
  {
2781
2786
  nextAvailableDate: n.nextAvailableDate,
2782
- onJump: () => i(Vt(r, n.nextAvailableDate)),
2783
- locale: E
2787
+ onJump: () => i($t(r, n.nextAvailableDate)),
2788
+ locale: w
2784
2789
  }
2785
- ) : As({
2790
+ ) : Ts({
2786
2791
  inputs: n,
2787
2792
  value: r,
2788
2793
  onChange: i,
2789
- onDateSelect: h,
2790
- onWindowChange: o,
2791
- loadingDates: g,
2792
- loadingSlots: p,
2793
- locale: E,
2794
- datePickerStyle: c,
2794
+ onDateSelect: g,
2795
+ onWindowChange: l,
2796
+ loadingDates: p,
2797
+ loadingSlots: m,
2798
+ locale: w,
2799
+ datePickerStyle: o,
2795
2800
  agentIdBase: S
2796
2801
  })
2797
2802
  ]
2798
2803
  }
2799
2804
  ) : null,
2800
- t.gates.slot && r.date && c === "month-calendar" ? /* @__PURE__ */ v(
2801
- j,
2805
+ t.gates.slot && r.date && o === "month-calendar" ? /* @__PURE__ */ v(
2806
+ U,
2802
2807
  {
2803
- ...y(6, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
2808
+ ...h(6, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
2804
2809
  children: [
2805
- /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: T("booking.slot.heading") }),
2806
- Ts({
2810
+ /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: D("booking.slot.heading") }),
2811
+ Ds({
2807
2812
  inputs: n,
2808
2813
  value: r,
2809
2814
  onChange: i,
2810
- loadingSlots: p,
2811
- locale: E,
2812
- datePickerStyle: c
2815
+ loadingSlots: m,
2816
+ locale: w,
2817
+ datePickerStyle: o
2813
2818
  })
2814
2819
  ]
2815
2820
  }
2816
2821
  ) : null,
2817
- t.gates.details && t.selectedSlot ? /* @__PURE__ */ s(j, { ...y(7), children: /* @__PURE__ */ s(
2818
- Zt,
2822
+ t.gates.details && t.selectedSlot ? /* @__PURE__ */ s(U, { ...h(7), children: /* @__PURE__ */ s(
2823
+ Xt,
2819
2824
  {
2820
- ...w,
2825
+ ...x,
2821
2826
  value: r.details ?? {},
2822
- onChange: (k) => i({ ...r, details: k }),
2827
+ onChange: (C) => i({ ...r, details: C }),
2823
2828
  onSubmit: a,
2824
- submitting: A,
2829
+ submitting: M,
2825
2830
  defaultPhoneCountry: e.policy.country
2826
2831
  }
2827
2832
  ) }) : null
2828
2833
  ] });
2829
2834
  }
2830
- function xe(e, t, n = {}) {
2835
+ function ye(e, t, n = {}) {
2831
2836
  const {
2832
2837
  cascade: r,
2833
2838
  inputs: i,
2834
2839
  value: a,
2835
- onChange: d,
2836
- onSubmit: u,
2837
- emptyServicesSlot: g,
2838
- onboardingIncompleteSlot: p,
2839
- loadingDates: h,
2840
- loadingSlots: o,
2841
- onDateSelect: c,
2842
- onWindowChange: f,
2843
- datePickerStyle: x,
2840
+ onChange: c,
2841
+ onSubmit: f,
2842
+ emptyServicesSlot: p,
2843
+ onboardingIncompleteSlot: m,
2844
+ loadingDates: g,
2845
+ loadingSlots: l,
2846
+ onDateSelect: o,
2847
+ onWindowChange: u,
2848
+ datePickerStyle: k,
2844
2849
  specialtyPickerStyle: I,
2845
- servicePickerStyle: A,
2846
- operatorPickerStyle: E,
2847
- submitting: w,
2850
+ servicePickerStyle: N,
2851
+ showServiceDuration: M,
2852
+ operatorPickerStyle: w,
2853
+ submitting: x,
2848
2854
  locale: S,
2849
- detailsProps: N,
2850
- policy: T,
2851
- agentIdBase: D
2855
+ detailsProps: A,
2856
+ policy: D,
2857
+ agentIdBase: T
2852
2858
  } = t;
2853
2859
  switch (e) {
2854
2860
  case 1:
2855
2861
  return /* @__PURE__ */ s(
2856
- Ds,
2862
+ Os,
2857
2863
  {
2858
2864
  value: a.insuranceType,
2859
- onChange: (y) => d(gs(a, y))
2865
+ onChange: (h) => c(hs(a, h))
2860
2866
  }
2861
2867
  );
2862
2868
  case 2:
2863
2869
  return /* @__PURE__ */ s(
2864
- Os,
2870
+ Ms,
2865
2871
  {
2866
2872
  specialties: r.filtered.specialties,
2867
2873
  value: a.specialtyId,
2868
2874
  valueIds: a.specialtyIds,
2869
- onChange: (y) => d(hs(a, y)),
2870
- onChangeIds: (y) => d(vs(a, y)),
2875
+ onChange: (h) => c(vs(a, h)),
2876
+ onChangeIds: (h) => c(bs(a, h)),
2871
2877
  pickerStyle: I
2872
2878
  }
2873
2879
  );
2874
2880
  case 3:
2875
- return r.filtered.services.length === 0 ? /* @__PURE__ */ s(Ls, { customSlot: g }) : r.gates.onboardingIncomplete ? /* @__PURE__ */ s(_s, { customSlot: p }) : /* @__PURE__ */ s(
2876
- Ms,
2881
+ return r.filtered.services.length === 0 ? /* @__PURE__ */ s(Bs, { customSlot: p }) : r.gates.onboardingIncomplete ? /* @__PURE__ */ s(Ls, { customSlot: m }) : /* @__PURE__ */ s(
2882
+ Fs,
2877
2883
  {
2878
2884
  services: r.filtered.services,
2879
2885
  value: a.serviceId,
2880
2886
  valueIds: a.serviceIds,
2881
- onChange: (y) => d(bs(a, y)),
2882
- onChangeIds: (y) => d(ys(a, y)),
2883
- pickerStyle: A,
2884
- compact: n.compactService
2887
+ onChange: (h) => c(ys(a, h)),
2888
+ onChangeIds: (h) => c(ks(a, h)),
2889
+ pickerStyle: N,
2890
+ compact: n.compactService,
2891
+ showDuration: M
2885
2892
  }
2886
2893
  );
2887
2894
  case 4:
2888
2895
  return /* @__PURE__ */ s(
2889
- Fs,
2896
+ _s,
2890
2897
  {
2891
2898
  operators: r.filtered.operators,
2892
2899
  value: a.operatorId,
2893
2900
  valueIds: a.operatorIds,
2894
- onChange: (y) => d(ks(a, y)),
2895
- onChangeIds: (y) => d(Ss(a, y)),
2896
- pickerStyle: E
2901
+ onChange: (h) => c(Ss(a, h)),
2902
+ onChangeIds: (h) => c(xs(a, h)),
2903
+ pickerStyle: w
2897
2904
  }
2898
2905
  );
2899
2906
  case 5:
2900
2907
  return i.availableDates.length === 0 && i.nextAvailableDate ? /* @__PURE__ */ s(
2901
- Qt,
2908
+ es,
2902
2909
  {
2903
2910
  nextAvailableDate: i.nextAvailableDate,
2904
- onJump: () => d(Vt(a, i.nextAvailableDate)),
2911
+ onJump: () => c($t(a, i.nextAvailableDate)),
2905
2912
  locale: S
2906
2913
  }
2907
- ) : As({
2914
+ ) : Ts({
2908
2915
  inputs: i,
2909
2916
  value: a,
2910
- onChange: d,
2911
- onDateSelect: c,
2912
- onWindowChange: f,
2913
- loadingDates: h,
2914
- loadingSlots: o,
2917
+ onChange: c,
2918
+ onDateSelect: o,
2919
+ onWindowChange: u,
2920
+ loadingDates: g,
2921
+ loadingSlots: l,
2915
2922
  locale: S,
2916
- datePickerStyle: x,
2917
- agentIdBase: D
2923
+ datePickerStyle: k,
2924
+ agentIdBase: T
2918
2925
  });
2919
2926
  case 6:
2920
- return Ts({
2927
+ return Ds({
2921
2928
  inputs: i,
2922
2929
  value: a,
2923
- onChange: d,
2924
- loadingSlots: o,
2930
+ onChange: c,
2931
+ loadingSlots: l,
2925
2932
  locale: S,
2926
- datePickerStyle: x
2933
+ datePickerStyle: k
2927
2934
  });
2928
2935
  case 7:
2929
2936
  return r.selectedSlot ? /* @__PURE__ */ s(
2930
- Zt,
2937
+ Xt,
2931
2938
  {
2932
- ...N,
2939
+ ...A,
2933
2940
  value: a.details ?? {},
2934
- onChange: (y) => d({ ...a, details: y }),
2935
- onSubmit: u,
2936
- submitting: w,
2937
- defaultPhoneCountry: T.country
2941
+ onChange: (h) => c({ ...a, details: h }),
2942
+ onSubmit: f,
2943
+ submitting: x,
2944
+ defaultPhoneCountry: D.country
2938
2945
  }
2939
2946
  ) : null;
2940
2947
  /* c8 ignore next 2 */
@@ -2942,9 +2949,9 @@ function xe(e, t, n = {}) {
2942
2949
  return null;
2943
2950
  }
2944
2951
  }
2945
- function $t() {
2946
- const { t: e } = U("ui");
2947
- return L(
2952
+ function qt() {
2953
+ const { t: e } = G("ui");
2954
+ return R(
2948
2955
  () => ({
2949
2956
  1: e("booking.insurance.heading"),
2950
2957
  2: e("booking.specialty.heading"),
@@ -2960,74 +2967,74 @@ function $t() {
2960
2967
  function ct(e, t) {
2961
2968
  return t === "four-day-grid" && e === 6 ? 5 : e;
2962
2969
  }
2963
- function Ti(e) {
2964
- const { cascade: t, value: n, activeStep: r, setActiveStep: i, datePickerStyle: a } = e, d = $t(), { t: u } = U("ui"), g = u("booking.operator.all"), p = L(
2965
- () => es(t.visibleSteps, a),
2970
+ function Di(e) {
2971
+ const { cascade: t, value: n, activeStep: r, setActiveStep: i, datePickerStyle: a } = e, c = qt(), { t: f } = G("ui"), p = f("booking.operator.all"), m = R(
2972
+ () => ts(t.visibleSteps, a),
2966
2973
  [t.visibleSteps, a]
2967
- ), h = ct(r, a), o = Math.max(0, p.indexOf(h)), c = L(
2968
- () => p.map((f) => ({
2969
- label: d[f],
2970
- summary: Es(f, n, t, g),
2971
- status: Di(f, n, t),
2972
- content: /* @__PURE__ */ s(j, { step: f, active: f === h, children: xe(f, e, { compactService: !0 }) })
2974
+ ), g = ct(r, a), l = Math.max(0, m.indexOf(g)), o = R(
2975
+ () => m.map((u) => ({
2976
+ label: c[u],
2977
+ summary: Rs(u, n, t, p),
2978
+ status: Oi(u, n, t),
2979
+ content: /* @__PURE__ */ s(U, { step: u, active: u === g, children: ye(u, e, { compactService: !0 }) })
2973
2980
  })),
2974
2981
  [
2975
- p,
2982
+ m,
2976
2983
  n,
2977
- d,
2984
+ c,
2978
2985
  t,
2979
2986
  e,
2980
- h,
2981
- g
2987
+ g,
2988
+ p
2982
2989
  ]
2983
2990
  );
2984
2991
  return /* @__PURE__ */ s(
2985
- Js,
2992
+ Ws,
2986
2993
  {
2987
- activeStep: o,
2988
- steps: c,
2989
- onStepChange: (f) => {
2990
- const x = p[f];
2991
- x && i(x);
2994
+ activeStep: l,
2995
+ steps: o,
2996
+ onStepChange: (u) => {
2997
+ const k = m[u];
2998
+ k && i(k);
2992
2999
  }
2993
3000
  }
2994
3001
  );
2995
3002
  }
2996
- function Di(e, t, n) {
2997
- return Ae(e, t) && e < n.currentStep ? "completed" : e <= n.currentStep ? "unlocked" : void 0;
3003
+ function Oi(e, t, n) {
3004
+ return Fe(e, t) && e < n.currentStep ? "completed" : e <= n.currentStep ? "unlocked" : void 0;
2998
3005
  }
2999
- function cs(e, t) {
3000
- return e !== 4 ? Ae(e, t) : t.operatorIds && t.operatorIds.length > 0 ? !0 : Is(t) !== void 0;
3006
+ function ds(e, t) {
3007
+ return e !== 4 ? Fe(e, t) : t.operatorIds && t.operatorIds.length > 0 ? !0 : Ns(t) !== void 0;
3001
3008
  }
3002
- function Gt(e, t) {
3009
+ function Ht(e, t) {
3003
3010
  const n = e.map((r) => {
3004
3011
  var i;
3005
3012
  return (i = t.find((a) => a.id === r)) == null ? void 0 : i.label;
3006
3013
  }).filter((r) => r !== void 0);
3007
3014
  return n.length > 0 ? n.join(", ") : void 0;
3008
3015
  }
3009
- function Es(e, t, n, r) {
3016
+ function Rs(e, t, n, r) {
3010
3017
  var i;
3011
- if (Ae(e, t))
3018
+ if (Fe(e, t))
3012
3019
  switch (e) {
3013
3020
  case 1:
3014
3021
  return t.insuranceType;
3015
3022
  case 2:
3016
- return Gt(
3017
- $e(t),
3023
+ return Ht(
3024
+ Ge(t),
3018
3025
  n.filtered.specialties
3019
3026
  );
3020
3027
  case 3:
3021
- return Gt(Te(t), n.filtered.services);
3028
+ return Ht(_e(t), n.filtered.services);
3022
3029
  case 4: {
3023
- const d = Jt(t).filter((g) => g !== we), u = Gt(
3024
- d,
3025
- n.filtered.operators.map((g) => ({
3026
- id: g.id,
3027
- label: g.name
3030
+ const c = Wt(t).filter((p) => p !== Ce), f = Ht(
3031
+ c,
3032
+ n.filtered.operators.map((p) => ({
3033
+ id: p.id,
3034
+ label: p.name
3028
3035
  }))
3029
3036
  );
3030
- return u !== void 0 ? u : d.length === 0 ? r : void 0;
3037
+ return f !== void 0 ? f : c.length === 0 ? r : void 0;
3031
3038
  }
3032
3039
  case 5:
3033
3040
  return t.date;
@@ -3037,98 +3044,98 @@ function Es(e, t, n, r) {
3037
3044
  return;
3038
3045
  }
3039
3046
  }
3040
- function Oi(e) {
3041
- const { cascade: t, value: n, activeStep: r, setActiveStep: i } = e, { t: a } = U("ui"), d = $t(), u = a("booking.operator.all"), g = `${Rt()}-filter`, p = ct(r, e.datePickerStyle), h = t.visibleSteps.filter(
3042
- (f) => f === 1 || f === 2 || f === 3 || f === 4
3043
- ), o = h.some(
3044
- (f) => !Ae(f, n)
3045
- ), c = h.some(
3046
- (f) => f === r
3047
- ) ? r : h.find((f) => !Ae(f, n));
3047
+ function Mi(e) {
3048
+ const { cascade: t, value: n, activeStep: r, setActiveStep: i } = e, { t: a } = G("ui"), c = qt(), f = a("booking.operator.all"), p = `${Pt()}-filter`, m = ct(r, e.datePickerStyle), g = t.visibleSteps.filter(
3049
+ (u) => u === 1 || u === 2 || u === 3 || u === 4
3050
+ ), l = g.some(
3051
+ (u) => !Fe(u, n)
3052
+ ), o = g.some(
3053
+ (u) => u === r
3054
+ ) ? r : g.find((u) => !Fe(u, n));
3048
3055
  return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
3049
- h.length > 0 ? /* @__PURE__ */ s(
3056
+ g.length > 0 ? /* @__PURE__ */ s(
3050
3057
  "div",
3051
3058
  {
3052
3059
  role: "group",
3053
3060
  "aria-label": a("booking.filtersLabel"),
3054
3061
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
3055
- children: h.map((f) => {
3056
- const x = Es(
3057
- f,
3062
+ children: g.map((u) => {
3063
+ const k = Rs(
3064
+ u,
3058
3065
  n,
3059
3066
  t,
3060
- u
3061
- ), I = f === c, A = Ae(f, n);
3067
+ f
3068
+ ), I = u === o, N = Fe(u, n);
3062
3069
  return /* @__PURE__ */ s(
3063
- Je,
3070
+ Xe,
3064
3071
  {
3065
3072
  intent: I ? "primary" : "outline",
3066
3073
  size: "sm",
3067
3074
  endIcon: /* @__PURE__ */ s(
3068
- Zs,
3075
+ Xs,
3069
3076
  {
3070
3077
  "aria-hidden": "true",
3071
3078
  className: I ? "ds:rotate-180" : void 0
3072
3079
  }
3073
3080
  ),
3074
- "aria-expanded": A ? I : void 0,
3075
- "aria-controls": A && I ? g : void 0,
3076
- "aria-current": !A && I ? "step" : void 0,
3081
+ "aria-expanded": N ? I : void 0,
3082
+ "aria-controls": N && I ? p : void 0,
3083
+ "aria-current": !N && I ? "step" : void 0,
3077
3084
  onClick: () => i(
3078
- A && I ? t.currentStep : f
3085
+ N && I ? t.currentStep : u
3079
3086
  ),
3080
- children: x ? /* @__PURE__ */ v(se, { children: [
3081
- d[f],
3087
+ children: k ? /* @__PURE__ */ v(ne, { children: [
3088
+ c[u],
3082
3089
  ": ",
3083
- x
3084
- ] }) : d[f]
3090
+ k
3091
+ ] }) : c[u]
3085
3092
  },
3086
- `csc-${f}`
3093
+ `csc-${u}`
3087
3094
  );
3088
3095
  })
3089
3096
  }
3090
3097
  ) : null,
3091
- c !== void 0 ? /* @__PURE__ */ s(
3092
- j,
3098
+ o !== void 0 ? /* @__PURE__ */ s(
3099
+ U,
3093
3100
  {
3094
- step: c,
3095
- active: c === p,
3096
- id: g,
3097
- children: xe(c, e, { compactService: !0 })
3101
+ step: o,
3102
+ active: o === m,
3103
+ id: p,
3104
+ children: ye(o, e, { compactService: !0 })
3098
3105
  }
3099
3106
  ) : null,
3100
- !o && t.gates.date ? (
3107
+ !l && t.gates.date ? (
3101
3108
  // four-day-grid embeds slots inline with the day strip — the
3102
3109
  // historic 2-col date|slot split collapses to a single column
3103
3110
  // so the picker spans the full width instead of orphaning an
3104
3111
  // empty right cell.
3105
- e.datePickerStyle === "four-day-grid" ? /* @__PURE__ */ s(j, { step: 5, active: p === 5, children: xe(5, e) }) : /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
3112
+ e.datePickerStyle === "four-day-grid" ? /* @__PURE__ */ s(U, { step: 5, active: m === 5, children: ye(5, e) }) : /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
3106
3113
  /* @__PURE__ */ s(
3107
- j,
3114
+ U,
3108
3115
  {
3109
3116
  step: 5,
3110
- active: p === 5,
3117
+ active: m === 5,
3111
3118
  className: "ds:min-w-0",
3112
- children: xe(5, e)
3119
+ children: ye(5, e)
3113
3120
  }
3114
3121
  ),
3115
3122
  n.date ? /* @__PURE__ */ s(
3116
- j,
3123
+ U,
3117
3124
  {
3118
3125
  step: 6,
3119
- active: p === 6,
3126
+ active: m === 6,
3120
3127
  className: "ds:min-w-0",
3121
- children: xe(6, e)
3128
+ children: ye(6, e)
3122
3129
  }
3123
3130
  ) : /* @__PURE__ */ s("div", { className: "ds:min-w-0" })
3124
3131
  ] })
3125
3132
  ) : null,
3126
- t.gates.details ? /* @__PURE__ */ s(j, { step: 7, active: p === 7, children: xe(7, e) }) : null
3133
+ t.gates.details ? /* @__PURE__ */ s(U, { step: 7, active: m === 7, children: ye(7, e) }) : null
3127
3134
  ] });
3128
3135
  }
3129
- function Mi(e) {
3136
+ function Fi(e) {
3130
3137
  const { cascade: t, datePickerStyle: n, activeStep: r } = e, i = ct(r, n), a = t.visibleSteps.filter(
3131
- (u) => u === 1 || u === 2 || u === 3 || u === 4
3138
+ (f) => f === 1 || f === 2 || f === 3 || f === 4
3132
3139
  );
3133
3140
  return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
3134
3141
  /* @__PURE__ */ v(
@@ -3136,63 +3143,63 @@ function Mi(e) {
3136
3143
  {
3137
3144
  className: n === "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",
3138
3145
  children: [
3139
- /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: a.map((u) => /* @__PURE__ */ s(j, { step: u, active: u === i, children: xe(u, e, { compactService: !0 }) }, `fbf-${u}`)) }),
3146
+ /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: a.map((f) => /* @__PURE__ */ s(U, { step: f, active: f === i, children: ye(f, e, { compactService: !0 }) }, `fbf-${f}`)) }),
3140
3147
  /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
3141
- t.gates.date ? /* @__PURE__ */ s(j, { step: 5, active: i === 5, children: xe(5, e) }) : null,
3142
- t.gates.slot && e.value.date && n === "month-calendar" ? /* @__PURE__ */ s(j, { step: 6, active: i === 6, children: xe(6, e) }) : null
3148
+ t.gates.date ? /* @__PURE__ */ s(U, { step: 5, active: i === 5, children: ye(5, e) }) : null,
3149
+ t.gates.slot && e.value.date && n === "month-calendar" ? /* @__PURE__ */ s(U, { step: 6, active: i === 6, children: ye(6, e) }) : null
3143
3150
  ] })
3144
3151
  ]
3145
3152
  }
3146
3153
  ),
3147
- t.gates.details ? /* @__PURE__ */ s(j, { step: 7, active: i === 7, children: xe(7, e) }) : null
3154
+ t.gates.details ? /* @__PURE__ */ s(U, { step: 7, active: i === 7, children: ye(7, e) }) : null
3148
3155
  ] });
3149
3156
  }
3150
- function Fi(e) {
3151
- const { cascade: t, value: n, activeStep: r, setActiveStep: i, datePickerStyle: a } = e, { t: d } = U("ui"), u = $t(), g = L(
3152
- () => es(t.visibleSteps, a),
3157
+ function _i(e) {
3158
+ const { cascade: t, value: n, activeStep: r, setActiveStep: i, datePickerStyle: a } = e, { t: c } = G("ui"), f = qt(), p = R(
3159
+ () => ts(t.visibleSteps, a),
3153
3160
  [t.visibleSteps, a]
3154
- ), p = ct(r, a), h = Math.max(0, g.indexOf(p)), o = g.length, c = L(
3155
- () => g.map((A) => ({ label: u[A] })),
3156
- [g, u]
3157
- ), f = h > 0, x = p === 5 && a === "four-day-grid", I = h < o - 1 && Ae(p, n) && (!x || Ae(6, n));
3161
+ ), m = ct(r, a), g = Math.max(0, p.indexOf(m)), l = p.length, o = R(
3162
+ () => p.map((N) => ({ label: f[N] })),
3163
+ [p, f]
3164
+ ), u = g > 0, k = m === 5 && a === "four-day-grid", I = g < l - 1 && Fe(m, n) && (!k || Fe(6, n));
3158
3165
  return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
3159
- /* @__PURE__ */ s(Ws, { activeStep: h, steps: c }),
3160
- /* @__PURE__ */ s(j, { step: p, active: !0, children: xe(p, e, { compactService: !0 }) }),
3166
+ /* @__PURE__ */ s(Ys, { activeStep: g, steps: o }),
3167
+ /* @__PURE__ */ s(U, { step: m, active: !0, children: ye(m, e, { compactService: !0 }) }),
3161
3168
  /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
3162
3169
  /* @__PURE__ */ s(
3163
- Je,
3170
+ Xe,
3164
3171
  {
3165
3172
  intent: "ghost",
3166
3173
  size: "md",
3167
- disabled: !f,
3174
+ disabled: !u,
3168
3175
  onClick: () => {
3169
- const A = g[h - 1];
3170
- A && i(A);
3176
+ const N = p[g - 1];
3177
+ N && i(N);
3171
3178
  },
3172
- children: d("booking.actions.back")
3179
+ children: c("booking.actions.back")
3173
3180
  }
3174
3181
  ),
3175
- p < 7 ? /* @__PURE__ */ s(
3176
- Je,
3182
+ m < 7 ? /* @__PURE__ */ s(
3183
+ Xe,
3177
3184
  {
3178
3185
  intent: "primary",
3179
3186
  size: "md",
3180
3187
  disabled: !I,
3181
3188
  onClick: () => {
3182
- const A = g[h + 1];
3183
- A && i(A);
3189
+ const N = p[g + 1];
3190
+ N && i(N);
3184
3191
  },
3185
- children: d("booking.actions.next")
3192
+ children: c("booking.actions.next")
3186
3193
  }
3187
3194
  ) : null
3188
3195
  ] })
3189
3196
  ] });
3190
3197
  }
3191
- const _i = [], Li = [];
3192
- function ds() {
3198
+ const Li = [], Bi = [];
3199
+ function ls() {
3193
3200
  return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
3194
3201
  }
3195
- const Bi = ls(
3202
+ const Ei = us(
3196
3203
  ({
3197
3204
  variant: e = "inline-list",
3198
3205
  country: t,
@@ -3203,87 +3210,88 @@ const Bi = ls(
3203
3210
  allowOperatorSelection: r = !1,
3204
3211
  lockedOperatorId: i,
3205
3212
  operatorsByService: a = !1,
3206
- autoSelectSingleService: d = !1,
3207
- specialties: u,
3208
- services: g,
3209
- operators: p,
3210
- availableDates: h,
3211
- availableSlots: o,
3212
- nextAvailableDate: c,
3213
- requireCodiceFiscale: f,
3214
- requireDateOfBirth: x,
3213
+ autoSelectSingleService: c = !1,
3214
+ specialties: f,
3215
+ services: p,
3216
+ operators: m,
3217
+ availableDates: g,
3218
+ availableSlots: l,
3219
+ nextAvailableDate: o,
3220
+ requireCodiceFiscale: u,
3221
+ requireDateOfBirth: k,
3215
3222
  requireInsuranceNumber: I,
3216
- billingInDetails: A = !1,
3217
- paymentNoticeStyle: E = "plain",
3223
+ billingInDetails: N = !1,
3224
+ paymentNoticeStyle: M = "plain",
3218
3225
  showNote: w,
3219
- showReturningPatientFlag: S,
3220
- privacyPolicyUrl: N,
3221
- termsUrl: T,
3226
+ showReturningPatientFlag: x,
3227
+ privacyPolicyUrl: S,
3228
+ termsUrl: A,
3222
3229
  practiceConsent: D,
3223
- paymentTermsUrl: y,
3224
- paymentState: k,
3225
- renderPayment: B,
3230
+ paymentTermsUrl: T,
3231
+ paymentState: h,
3232
+ renderPayment: C,
3226
3233
  renderPaymentCompletion: $,
3227
3234
  validateCodiceFiscale: b,
3228
- validateInsuranceNumber: ge,
3229
- confirmationChannels: O,
3230
- defaultConfirmationChannels: K,
3231
- value: M,
3232
- onChange: he,
3235
+ validateInsuranceNumber: pe,
3236
+ confirmationChannels: F,
3237
+ defaultConfirmationChannels: z,
3238
+ value: _,
3239
+ onChange: me,
3233
3240
  onSubmit: dt,
3234
- onStepChange: ve,
3235
- onDateSelect: qe,
3236
- onWindowChange: De,
3237
- datePickerStyle: G = "month-calendar",
3238
- specialtyPickerStyle: Oe,
3239
- servicePickerStyle: be,
3240
- operatorPickerStyle: H,
3241
- loadingDates: ae,
3242
- loadingSlots: ye,
3243
- submitting: ke,
3244
- submitError: W,
3245
- mode: Me = "live",
3246
- showModifyOnSuccess: ne = !0,
3247
- surface: oe = "flat",
3248
- emptyServicesSlot: Y,
3249
- onboardingIncompleteSlot: F,
3250
- "aria-label": Ce,
3251
- id: Ke,
3252
- className: xt,
3253
- onFocus: We,
3254
- onBlur: Ye,
3255
- ...Ze
3256
- }, Ne) => {
3257
- var ht, vt, l;
3258
- const { t: ee, i18n: It } = U("ui"), ie = e ?? "inline-list", Fe = It.language ?? "en", ce = u ?? _i, _e = p ?? Li;
3259
- V(() => {
3260
- const m = zn(M, {
3241
+ onStepChange: fe,
3242
+ onDateSelect: He,
3243
+ onWindowChange: Le,
3244
+ datePickerStyle: H = "month-calendar",
3245
+ specialtyPickerStyle: Be,
3246
+ servicePickerStyle: ge,
3247
+ showServiceDuration: J = !0,
3248
+ operatorPickerStyle: ae,
3249
+ loadingDates: he,
3250
+ loadingSlots: Se,
3251
+ submitting: W,
3252
+ submitError: Ae,
3253
+ mode: ie = "live",
3254
+ showModifyOnSuccess: oe = !0,
3255
+ surface: te = "flat",
3256
+ emptyServicesSlot: L,
3257
+ onboardingIncompleteSlot: xe,
3258
+ "aria-label": Kt,
3259
+ id: Ee,
3260
+ className: kt,
3261
+ onFocus: Qe,
3262
+ onBlur: Re,
3263
+ ...Ie
3264
+ }, zt) => {
3265
+ var gt, d, O;
3266
+ const { t: Z, i18n: St } = G("ui"), se = e ?? "inline-list", Te = St.language ?? "en", Ne = f ?? Li, ve = m ?? Bi;
3267
+ q(() => {
3268
+ const y = jn(_, {
3261
3269
  useSpecialties: n,
3262
3270
  lockedOperatorId: i,
3263
- autoSelectSingleService: d,
3264
- specialties: ce,
3265
- services: g
3271
+ autoSelectSingleService: c,
3272
+ specialties: Ne,
3273
+ services: p
3266
3274
  });
3267
- (m.specialtyId !== M.specialtyId || m.operatorId !== M.operatorId || m.serviceId !== M.serviceId) && he(m);
3275
+ (y.specialtyId !== _.specialtyId || y.operatorId !== _.operatorId || y.serviceId !== _.serviceId) && me(y);
3268
3276
  }, [
3269
3277
  i,
3270
3278
  n,
3271
- d,
3272
- ce,
3273
- g
3279
+ c,
3280
+ Ne,
3281
+ p
3274
3282
  ]);
3275
- const R = L(
3276
- () => Kn({
3283
+ const B = R(
3284
+ () => zn({
3277
3285
  country: t,
3278
3286
  useSpecialties: n,
3279
3287
  allowOperatorSelection: r,
3280
3288
  lockedOperatorId: i,
3281
3289
  operatorsByService: a,
3282
- specialties: ce,
3283
- services: g,
3284
- operators: _e,
3285
- availableSlots: o,
3286
- value: M
3290
+ specialties: Ne,
3291
+ services: p,
3292
+ operators: ve,
3293
+ availableSlots: l,
3294
+ value: _
3287
3295
  }),
3288
3296
  [
3289
3297
  t,
@@ -3291,193 +3299,193 @@ const Bi = ls(
3291
3299
  r,
3292
3300
  i,
3293
3301
  a,
3294
- d,
3295
- ce,
3302
+ c,
3303
+ Ne,
3304
+ p,
3305
+ ve,
3296
3306
  g,
3297
- _e,
3298
- h,
3299
- o,
3300
- M
3307
+ l,
3308
+ _
3301
3309
  ]
3302
- ), de = L(
3310
+ ), et = R(
3303
3311
  () => [
3304
- JSON.stringify(M.insuranceType),
3305
- JSON.stringify($e(M)),
3306
- JSON.stringify(Te(M)),
3307
- JSON.stringify(Jt(M)),
3308
- JSON.stringify(M.date),
3309
- JSON.stringify(M.slotKey)
3312
+ JSON.stringify(_.insuranceType),
3313
+ JSON.stringify(Ge(_)),
3314
+ JSON.stringify(_e(_)),
3315
+ JSON.stringify(Wt(_)),
3316
+ JSON.stringify(_.date),
3317
+ JSON.stringify(_.slotKey)
3310
3318
  ],
3311
- [M]
3312
- ), Xe = ie === "progress", lt = fe(
3313
- (m) => {
3314
- if (m === 4 && R.visibleSteps.includes(4) && Jt(M).length === 0)
3315
- return Math.min(4, R.currentStep);
3316
- if (!Xe) return R.currentStep;
3317
- const C = R.visibleSteps.find(
3318
- (P) => P > m && !cs(P, M)
3319
+ [_]
3320
+ ), Je = se === "progress", We = ue(
3321
+ (y) => {
3322
+ if (y === 4 && B.visibleSteps.includes(4) && Wt(_).length === 0)
3323
+ return Math.min(4, B.currentStep);
3324
+ if (!Je) return B.currentStep;
3325
+ const P = B.visibleSteps.find(
3326
+ (V) => V > y && !ds(V, _)
3319
3327
  );
3320
- return C === void 0 ? R.currentStep : Math.min(C, R.currentStep);
3328
+ return P === void 0 ? B.currentStep : Math.min(P, B.currentStep);
3321
3329
  },
3322
- [Xe, R.visibleSteps, R.currentStep, M]
3323
- ), [Z, le] = X(
3324
- R.currentStep
3325
- ), ut = _(de), Le = _(R.visibleSteps);
3326
- V(() => {
3327
- const m = ut.current, C = Le.current;
3328
- ut.current = de, Le.current = R.visibleSteps;
3329
- const P = de.findIndex(
3330
- (pe, ts) => pe !== m[ts]
3330
+ [Je, B.visibleSteps, B.currentStep, _]
3331
+ ), [X, we] = Q(
3332
+ B.currentStep
3333
+ ), Pe = E(et), Ve = E(B.visibleSteps);
3334
+ q(() => {
3335
+ const y = Pe.current, P = Ve.current;
3336
+ Pe.current = et, Ve.current = B.visibleSteps;
3337
+ const V = et.findIndex(
3338
+ (de, ss) => de !== y[ss]
3331
3339
  );
3332
- if (P !== -1) {
3333
- le(lt(P + 1));
3340
+ if (V !== -1) {
3341
+ we(We(V + 1));
3334
3342
  return;
3335
3343
  }
3336
- const J = Xe ? R.visibleSteps.find(
3337
- (pe) => pe < Z && !C.includes(pe) && !cs(pe, M)
3344
+ const Y = Je ? B.visibleSteps.find(
3345
+ (de) => de < X && !P.includes(de) && !ds(de, _)
3338
3346
  ) : void 0;
3339
- if (J !== void 0) {
3340
- le(J);
3347
+ if (Y !== void 0) {
3348
+ we(Y);
3341
3349
  return;
3342
3350
  }
3343
- R.visibleSteps.includes(Z) || le(R.currentStep);
3351
+ B.visibleSteps.includes(X) || we(B.currentStep);
3344
3352
  }, [
3345
- de,
3346
- lt,
3347
- Xe,
3348
- R.currentStep,
3349
- R.visibleSteps,
3350
- Z,
3351
- M
3353
+ et,
3354
+ We,
3355
+ Je,
3356
+ B.currentStep,
3357
+ B.visibleSteps,
3358
+ X,
3359
+ _
3352
3360
  ]);
3353
- const te = _(null), ze = L(
3354
- () => es(R.visibleSteps, G),
3355
- [R.visibleSteps, G]
3356
- ), Be = $t(), [qt, Qe] = X(""), ue = _(null), je = _(null);
3357
- V(() => {
3358
- const m = ct(Z, G);
3359
- if (je.current === null) {
3360
- je.current = m;
3361
+ const ce = E(null), De = R(
3362
+ () => ts(B.visibleSteps, H),
3363
+ [B.visibleSteps, H]
3364
+ ), xt = qt(), [tt, $e] = Q(""), qe = E(null), Oe = E(null);
3365
+ q(() => {
3366
+ const y = ct(X, H);
3367
+ if (Oe.current === null) {
3368
+ Oe.current = y;
3361
3369
  return;
3362
3370
  }
3363
- if (je.current === m) return;
3364
- je.current = m;
3365
- const C = ze.indexOf(m);
3366
- Qe(
3367
- C === -1 ? "" : ee("booking.stepAnnouncement", {
3368
- current: C + 1,
3369
- total: ze.length,
3370
- label: Be[m]
3371
+ if (Oe.current === y) return;
3372
+ Oe.current = y;
3373
+ const P = De.indexOf(y);
3374
+ $e(
3375
+ P === -1 ? "" : Z("booking.stepAnnouncement", {
3376
+ current: P + 1,
3377
+ total: De.length,
3378
+ label: xt[y]
3371
3379
  })
3372
3380
  );
3373
- const P = ue.current;
3374
- if (!P || P.isConnected) return;
3375
- const J = te.current;
3376
- if (!J) return;
3377
- const pe = document.activeElement;
3378
- if (!(pe === null || pe === document.body || !J.contains(pe))) return;
3379
- const At = J.querySelector(Ci) ?? J;
3380
- if (At.focus({ preventScroll: !0 }), typeof At.scrollIntoView == "function")
3381
+ const V = qe.current;
3382
+ if (!V || V.isConnected) return;
3383
+ const Y = ce.current;
3384
+ if (!Y) return;
3385
+ const de = document.activeElement;
3386
+ if (!(de === null || de === document.body || !Y.contains(de))) return;
3387
+ const Tt = Y.querySelector(Ai) ?? Y;
3388
+ if (Tt.focus({ preventScroll: !0 }), typeof Tt.scrollIntoView == "function")
3381
3389
  try {
3382
- At.scrollIntoView({
3383
- behavior: ds() ? "auto" : "smooth",
3390
+ Tt.scrollIntoView({
3391
+ behavior: ls() ? "auto" : "smooth",
3384
3392
  block: "nearest"
3385
3393
  });
3386
3394
  } catch {
3387
- At.scrollIntoView();
3395
+ Tt.scrollIntoView();
3388
3396
  }
3389
- }, [Z, G, ze, Be, ee]);
3390
- const q = li({
3391
- services: g,
3392
- value: M,
3393
- availableSlots: o,
3397
+ }, [X, H, De, xt, Z]);
3398
+ const K = ui({
3399
+ services: p,
3400
+ value: _,
3401
+ availableSlots: l,
3394
3402
  onSubmit: dt,
3395
- onChange: he,
3396
- paymentState: k,
3397
- submitting: ke,
3398
- paymentTermsUrl: y,
3399
- renderPayment: B
3400
- }), z = q.status, pt = q.submit, et = _(q.reset);
3401
- et.current = q.reset;
3402
- const mt = Rt(), ft = _(null), Ee = _(null), tt = ((ht = q.state) == null ? void 0 : ht.status) === "failed", st = q.state && "phase" in q.state && q.state.phase === "completion";
3403
- V(() => {
3404
- var m, C;
3405
- if (z === "payment") {
3406
- const P = document.activeElement;
3407
- (!st || !P || P === document.body || !((m = te.current) != null && m.contains(P))) && ((C = ft.current) == null || C.focus());
3403
+ onChange: me,
3404
+ paymentState: h,
3405
+ submitting: W,
3406
+ paymentTermsUrl: T,
3407
+ renderPayment: C
3408
+ }), j = K.status, lt = K.submit, st = E(K.reset);
3409
+ st.current = K.reset;
3410
+ const ut = Pt(), Ke = E(null), nt = E(null), it = ((gt = K.state) == null ? void 0 : gt.status) === "failed", It = K.state && "phase" in K.state && K.state.phase === "completion";
3411
+ q(() => {
3412
+ var y, P;
3413
+ if (j === "payment") {
3414
+ const V = document.activeElement;
3415
+ (!It || !V || V === document.body || !((y = ce.current) != null && y.contains(V))) && ((P = Ke.current) == null || P.focus());
3408
3416
  }
3409
- }, [z, st]), V(() => {
3410
- var m;
3411
- z === "payment" && tt && ((m = Ee.current) == null || m.focus());
3412
- }, [z, tt]), Ps(Ne, () => te.current, []);
3413
- const Ue = z === "success" ? 8 : z === "payment" ? 7 : R.currentStep, nt = _(null);
3414
- V(() => {
3415
- if (Ue !== nt.current && (nt.current = Ue, ve == null || ve(Ue), Ue === 8 && te.current))
3417
+ }, [j, It]), q(() => {
3418
+ var y;
3419
+ j === "payment" && it && ((y = nt.current) == null || y.focus());
3420
+ }, [j, it]), Vs(zt, () => ce.current, []);
3421
+ const Me = j === "success" ? 8 : j === "payment" ? 7 : B.currentStep, pt = E(null);
3422
+ q(() => {
3423
+ if (Me !== pt.current && (pt.current = Me, fe == null || fe(Me), Me === 8 && ce.current))
3416
3424
  try {
3417
- te.current.scrollIntoView({
3418
- behavior: ds() ? "auto" : "smooth",
3425
+ ce.current.scrollIntoView({
3426
+ behavior: ls() ? "auto" : "smooth",
3419
3427
  block: "start"
3420
3428
  });
3421
3429
  } catch {
3422
- te.current.scrollIntoView();
3430
+ ce.current.scrollIntoView();
3423
3431
  }
3424
- }, [Ue, ve]);
3425
- const Re = _({ activeStep: Z, cascade: R, submitState: z });
3426
- V(() => {
3427
- Re.current = { activeStep: Z, cascade: R, submitState: z };
3428
- }, [Z, R, z]);
3429
- const Nt = L(
3432
+ }, [Me, fe]);
3433
+ const Ye = E({ activeStep: X, cascade: B, submitState: j });
3434
+ q(() => {
3435
+ Ye.current = { activeStep: X, cascade: B, submitState: j };
3436
+ }, [X, B, j]);
3437
+ const Nt = R(
3430
3438
  () => ({
3431
- getVariant: () => ie,
3439
+ getVariant: () => se,
3432
3440
  getCurrentStep: () => {
3433
- const m = Re.current;
3434
- return m.submitState === "success" ? 8 : m.submitState === "payment" ? 7 : m.activeStep;
3441
+ const y = Ye.current;
3442
+ return y.submitState === "success" ? 8 : y.submitState === "payment" ? 7 : y.activeStep;
3435
3443
  },
3436
3444
  reset: () => {
3437
- Re.current.submitState !== "payment" && (he({}), et.current(), le(1));
3445
+ Ye.current.submitState !== "payment" && (me({}), st.current(), we(1));
3438
3446
  },
3439
- goToStep: (m) => {
3440
- const C = Re.current, P = C.cascade.visibleSteps.includes(m), J = C.cascade.currentStep, pe = C.submitState === "payment" ? 7 : !P || m > J ? J : m;
3441
- Re.current = { ...C, activeStep: pe }, le(pe);
3447
+ goToStep: (y) => {
3448
+ const P = Ye.current, V = P.cascade.visibleSteps.includes(y), Y = P.cascade.currentStep, de = P.submitState === "payment" ? 7 : !V || y > Y ? Y : y;
3449
+ Ye.current = { ...P, activeStep: de }, we(de);
3442
3450
  }
3443
3451
  }),
3444
- [ie, he]
3452
+ [se, me]
3445
3453
  );
3446
- $s(Bn, Nt, Ke);
3447
- const Kt = Ce ?? ee("booking.regionLabel"), Se = q.snapshot, zt = z === "success" && Se ? /* @__PURE__ */ s(
3448
- wi,
3454
+ qs(En, Nt, Ee);
3455
+ const jt = Kt ?? Z("booking.regionLabel"), be = K.snapshot, wt = j === "success" && be ? /* @__PURE__ */ s(
3456
+ Ci,
3449
3457
  {
3450
- payment: Se.payment,
3458
+ payment: be.payment,
3451
3459
  snapshot: {
3452
- ...Se.value,
3453
- slot: Se.slot,
3454
- details: Se.details,
3455
- serviceId: ((vt = Se.payment) == null ? void 0 : vt.serviceId) ?? Se.slot.serviceId ?? Se.value.serviceId
3460
+ ...be.value,
3461
+ slot: be.slot,
3462
+ details: be.details,
3463
+ serviceId: ((d = be.payment) == null ? void 0 : d.serviceId) ?? be.slot.serviceId ?? be.value.serviceId
3456
3464
  },
3457
- operators: _e,
3458
- specialties: ce,
3459
- services: g,
3460
- locale: Fe,
3461
- mode: Me,
3462
- showModify: ne && !Se.payment,
3465
+ operators: ve,
3466
+ specialties: Ne,
3467
+ services: p,
3468
+ locale: Te,
3469
+ mode: ie,
3470
+ showModify: oe && !be.payment,
3463
3471
  onReset: () => Nt.reset(),
3464
3472
  focusWasLost: () => {
3465
- const m = ue.current, C = document.activeElement;
3466
- return !!(m && !m.isConnected) && (!C || C === document.body);
3473
+ const y = qe.current, P = document.activeElement;
3474
+ return !!(y && !y.isConnected) && (!P || P === document.body);
3467
3475
  },
3468
3476
  onModify: () => {
3469
- et.current(), le(7);
3477
+ st.current(), we(7);
3470
3478
  }
3471
3479
  }
3472
- ) : null, it = q.activeSession, Ge = q.state, re = it && Ge ? {
3473
- session: it,
3474
- payment: it.payment,
3475
- state: Ge,
3476
- billing: (l = q.snapshot) == null ? void 0 : l.details.billing
3477
- } : void 0, Pe = Ge && "phase" in Ge && Ge.phase === "completion", wt = z === "payment" && re ? /* @__PURE__ */ v(
3480
+ ) : null, mt = K.activeSession, ze = K.state, re = mt && ze ? {
3481
+ session: mt,
3482
+ payment: mt.payment,
3483
+ state: ze,
3484
+ billing: (O = K.snapshot) == null ? void 0 : O.details.billing
3485
+ } : void 0, je = ze && "phase" in ze && ze.phase === "completion", Ct = j === "payment" && re ? /* @__PURE__ */ v(
3478
3486
  "section",
3479
3487
  {
3480
- "aria-labelledby": mt,
3488
+ "aria-labelledby": ut,
3481
3489
  "data-component": "booking-payment",
3482
3490
  "data-payment-status": re.state.status,
3483
3491
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
@@ -3485,20 +3493,20 @@ const Bi = ls(
3485
3493
  /* @__PURE__ */ s(
3486
3494
  "h3",
3487
3495
  {
3488
- ref: ft,
3489
- id: mt,
3496
+ ref: Ke,
3497
+ id: ut,
3490
3498
  tabIndex: -1,
3491
3499
  className: "type-title-card ds:m-0",
3492
- children: ee(
3493
- Pe ? "booking.payment.confirming" : "booking.payment.heading"
3500
+ children: Z(
3501
+ je ? "booking.payment.confirming" : "booking.payment.heading"
3494
3502
  )
3495
3503
  }
3496
3504
  ),
3497
- Pe ? null : /* @__PURE__ */ s("p", { className: "type-body ds:m-0", children: ee("booking.payment.noticeBody", {
3498
- amount: St(
3505
+ je ? null : /* @__PURE__ */ s("p", { className: "type-body ds:m-0", children: Z("booking.payment.noticeBody", {
3506
+ amount: yt(
3499
3507
  re.payment.amountCents,
3500
3508
  re.payment.currencyCode,
3501
- Fe
3509
+ Te
3502
3510
  )
3503
3511
  }) }),
3504
3512
  /* @__PURE__ */ s(
@@ -3506,176 +3514,178 @@ const Bi = ls(
3506
3514
  {
3507
3515
  role: "status",
3508
3516
  className: re.state.status === "processing" ? "type-body ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-sm)]" : "ds:sr-only",
3509
- children: re.state.status === "processing" ? /* @__PURE__ */ v(se, { children: [
3510
- /* @__PURE__ */ s(us, { variant: "pulse", size: "lg", "aria-hidden": "true" }),
3511
- /* @__PURE__ */ s("span", { children: ee(
3512
- Pe ? "booking.payment.confirming" : "booking.payment.processing"
3517
+ children: re.state.status === "processing" ? /* @__PURE__ */ v(ne, { children: [
3518
+ /* @__PURE__ */ s(ps, { variant: "pulse", size: "lg", "aria-hidden": "true" }),
3519
+ /* @__PURE__ */ s("span", { children: Z(
3520
+ je ? "booking.payment.confirming" : "booking.payment.processing"
3513
3521
  ) })
3514
3522
  ] }) : null
3515
3523
  }
3516
3524
  ),
3517
3525
  re.state.status === "failed" ? /* @__PURE__ */ s(
3518
- Q,
3526
+ ee,
3519
3527
  {
3520
- ref: Ee,
3528
+ ref: nt,
3521
3529
  variant: "error",
3522
3530
  tabIndex: -1,
3523
- className: Et,
3524
- children: /* @__PURE__ */ s(Q.Description, { children: re.state.error ?? ee(
3525
- Pe ? "booking.payment.completionFailed" : "booking.payment.failed"
3531
+ className: Rt,
3532
+ children: /* @__PURE__ */ s(ee.Description, { children: re.state.error ?? Z(
3533
+ je ? "booking.payment.completionFailed" : "booking.payment.failed"
3526
3534
  ) })
3527
3535
  }
3528
3536
  ) : null,
3529
- Pe ? $ == null ? void 0 : $(re) : B == null ? void 0 : B(re)
3537
+ je ? $ == null ? void 0 : $(re) : C == null ? void 0 : C(re)
3530
3538
  ]
3531
3539
  }
3532
- ) : null, gt = L(() => {
3533
- const m = new Set(Te(M)), C = g.filter((P) => m.has(P.id)).map((P) => {
3534
- var J;
3540
+ ) : null, ft = R(() => {
3541
+ const y = new Set(_e(_)), P = p.filter((V) => y.has(V.id)).map((V) => {
3542
+ var Y;
3535
3543
  return {
3536
- label: P.label,
3537
- text: ((J = P.criticalInformationToAccept) == null ? void 0 : J.trim()) ?? ""
3544
+ label: V.label,
3545
+ text: ((Y = V.criticalInformationToAccept) == null ? void 0 : Y.trim()) ?? ""
3538
3546
  };
3539
- }).filter((P) => P.text.length > 0);
3540
- if (C.length !== 0)
3541
- return C.length === 1 ? C[0].text : C.map((P) => `${P.label}: ${P.text}`).join(`
3547
+ }).filter((V) => V.text.length > 0);
3548
+ if (P.length !== 0)
3549
+ return P.length === 1 ? P[0].text : P.map((V) => `${V.label}: ${V.text}`).join(`
3542
3550
 
3543
3551
  `);
3544
- }, [g, M]), Ct = L(() => {
3545
- if (z === "success" || z === "payment") return null;
3546
- const m = ie === "accordion" ? Ti : ie === "calendar" ? Oi : ie === "flexible" ? Mi : ie === "progress" ? Fi : Ai, C = {
3547
- cascade: R,
3552
+ }, [p, _]), At = R(() => {
3553
+ if (j === "success" || j === "payment") return null;
3554
+ const y = se === "accordion" ? Di : se === "calendar" ? Mi : se === "flexible" ? Fi : se === "progress" ? _i : Ti, P = {
3555
+ cascade: B,
3548
3556
  inputs: {
3549
- specialties: ce,
3550
- services: g,
3551
- operators: _e,
3552
- availableDates: h,
3553
- availableSlots: o,
3554
- nextAvailableDate: c
3557
+ specialties: Ne,
3558
+ services: p,
3559
+ operators: ve,
3560
+ availableDates: g,
3561
+ availableSlots: l,
3562
+ nextAvailableDate: o
3555
3563
  },
3556
- value: M,
3557
- onChange: he,
3558
- onSubmit: pt,
3564
+ value: _,
3565
+ onChange: me,
3566
+ onSubmit: lt,
3559
3567
  policy: { country: t, lockedOperatorId: i },
3560
3568
  detailsProps: {
3561
- requireCodiceFiscale: f,
3562
- requireDateOfBirth: x,
3569
+ requireCodiceFiscale: u,
3570
+ requireDateOfBirth: k,
3563
3571
  requireInsuranceNumber: I,
3564
- insuranceType: M.insuranceType,
3572
+ insuranceType: _.insuranceType,
3565
3573
  showNote: w,
3566
- showReturningPatientFlag: S,
3567
- privacyPolicyUrl: N,
3568
- termsUrl: T,
3574
+ showReturningPatientFlag: x,
3575
+ privacyPolicyUrl: S,
3576
+ termsUrl: A,
3569
3577
  practiceConsent: D,
3570
- criticalInformationToAccept: gt,
3571
- payment: q.payment,
3572
- paymentTermsUrl: y,
3573
- paymentBlocked: q.blocked,
3574
- billingInDetails: A,
3575
- paymentNoticeStyle: E,
3578
+ criticalInformationToAccept: ft,
3579
+ payment: K.payment,
3580
+ paymentTermsUrl: T,
3581
+ paymentBlocked: K.blocked,
3582
+ billingInDetails: N,
3583
+ paymentNoticeStyle: M,
3576
3584
  validateCodiceFiscale: b,
3577
- validateInsuranceNumber: ge,
3578
- confirmationChannels: O,
3579
- defaultConfirmationChannels: K,
3580
- submitError: W ?? (z === "error" ? ee("booking.payment.submitFailed") : void 0)
3585
+ validateInsuranceNumber: pe,
3586
+ confirmationChannels: F,
3587
+ defaultConfirmationChannels: z,
3588
+ submitError: Ae ?? (j === "error" ? Z("booking.payment.submitFailed") : void 0)
3581
3589
  },
3582
- emptyServicesSlot: Y,
3583
- onboardingIncompleteSlot: F,
3584
- loadingDates: ae,
3585
- loadingSlots: ye,
3586
- onDateSelect: qe,
3587
- onWindowChange: De,
3588
- datePickerStyle: G,
3589
- specialtyPickerStyle: Oe,
3590
- servicePickerStyle: be,
3591
- operatorPickerStyle: H,
3592
- submitting: ke || z === "submitting",
3593
- locale: Fe,
3594
- activeStep: Z,
3595
- setActiveStep: le,
3596
- agentIdBase: Ke
3590
+ emptyServicesSlot: L,
3591
+ onboardingIncompleteSlot: xe,
3592
+ loadingDates: he,
3593
+ loadingSlots: Se,
3594
+ onDateSelect: He,
3595
+ onWindowChange: Le,
3596
+ datePickerStyle: H,
3597
+ specialtyPickerStyle: Be,
3598
+ servicePickerStyle: ge,
3599
+ showServiceDuration: J,
3600
+ operatorPickerStyle: ae,
3601
+ submitting: W || j === "submitting",
3602
+ locale: Te,
3603
+ activeStep: X,
3604
+ setActiveStep: we,
3605
+ agentIdBase: Ee
3597
3606
  };
3598
- return /* @__PURE__ */ s(m, { ...C });
3607
+ return /* @__PURE__ */ s(y, { ...P });
3599
3608
  }, [
3600
- z,
3601
- q.payment,
3602
- q.blocked,
3603
- y,
3604
- ee,
3605
- ie,
3606
- R,
3607
- ce,
3609
+ j,
3610
+ K.payment,
3611
+ K.blocked,
3612
+ T,
3613
+ Z,
3614
+ se,
3615
+ B,
3616
+ Ne,
3617
+ p,
3618
+ ve,
3608
3619
  g,
3609
- _e,
3610
- h,
3620
+ l,
3611
3621
  o,
3612
- c,
3613
- M,
3614
- he,
3615
- pt,
3622
+ _,
3623
+ me,
3624
+ lt,
3616
3625
  t,
3617
3626
  i,
3618
- f,
3619
- x,
3627
+ u,
3628
+ k,
3620
3629
  I,
3621
- A,
3622
- E,
3623
- W,
3630
+ N,
3631
+ M,
3632
+ Ae,
3624
3633
  w,
3634
+ x,
3625
3635
  S,
3626
- N,
3627
- T,
3636
+ A,
3628
3637
  D,
3629
- gt,
3638
+ ft,
3630
3639
  b,
3631
- ge,
3632
- O,
3633
- K,
3634
- Y,
3640
+ pe,
3635
3641
  F,
3636
- ae,
3637
- ye,
3638
- qe,
3639
- De,
3640
- G,
3641
- Oe,
3642
- be,
3642
+ z,
3643
+ L,
3644
+ xe,
3645
+ he,
3646
+ Se,
3647
+ He,
3648
+ Le,
3643
3649
  H,
3644
- ke,
3645
- Fe,
3646
- Z,
3647
- Ke
3650
+ Be,
3651
+ ge,
3652
+ J,
3653
+ ae,
3654
+ W,
3655
+ Te,
3656
+ X,
3657
+ Ee
3648
3658
  ]);
3649
3659
  return /* @__PURE__ */ v(
3650
3660
  "div",
3651
3661
  {
3652
- ref: te,
3662
+ ref: ce,
3653
3663
  role: "region",
3654
- "aria-label": Kt,
3655
- id: Ke,
3664
+ "aria-label": jt,
3665
+ id: Ee,
3656
3666
  "data-component": "booking",
3657
- "data-component-id": Ke,
3658
- "data-variant": ie,
3659
- className: ui({
3660
- variant: ie,
3661
- surface: oe,
3662
- className: xt
3667
+ "data-component-id": Ee,
3668
+ "data-variant": se,
3669
+ className: pi({
3670
+ variant: se,
3671
+ surface: te,
3672
+ className: kt
3663
3673
  }),
3664
3674
  tabIndex: -1,
3665
- onFocus: (m) => {
3666
- ue.current = m.target, We == null || We(m);
3675
+ onFocus: (y) => {
3676
+ qe.current = y.target, Qe == null || Qe(y);
3667
3677
  },
3668
- onBlur: (m) => {
3669
- const C = m.target;
3678
+ onBlur: (y) => {
3679
+ const P = y.target;
3670
3680
  window.setTimeout(() => {
3671
- var J;
3672
- const P = document.activeElement;
3673
- ue.current === C && C.isConnected && !(P && ((J = te.current) != null && J.contains(P))) && (ue.current = null);
3674
- }), Ye == null || Ye(m);
3681
+ var Y;
3682
+ const V = document.activeElement;
3683
+ qe.current === P && P.isConnected && !(V && ((Y = ce.current) != null && Y.contains(V))) && (qe.current = null);
3684
+ }), Re == null || Re(y);
3675
3685
  },
3676
- ...Ze,
3686
+ ...Ie,
3677
3687
  children: [
3678
- /* @__PURE__ */ s("div", { role: "status", className: "ds:sr-only", children: qt }),
3688
+ /* @__PURE__ */ s("div", { role: "status", className: "ds:sr-only", children: tt }),
3679
3689
  /* @__PURE__ */ v(
3680
3690
  "div",
3681
3691
  {
@@ -3688,23 +3698,23 @@ const Bi = ls(
3688
3698
  "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]"
3689
3699
  ].join(" "),
3690
3700
  children: [
3691
- /* @__PURE__ */ s("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: ee("booking.regionLabel") }),
3692
- /* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--foreground)] ds:m-0", children: ee("booking.headingSubtitle") })
3701
+ /* @__PURE__ */ s("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: Z("booking.regionLabel") }),
3702
+ /* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--foreground)] ds:m-0", children: Z("booking.headingSubtitle") })
3693
3703
  ]
3694
3704
  }
3695
3705
  ),
3696
- q.cancelled ? /* @__PURE__ */ s(Q, { variant: "info", children: /* @__PURE__ */ s(Q.Description, { children: ee("booking.payment.cancelled") }) }) : null,
3697
- zt ?? wt ?? Ct
3706
+ K.cancelled ? /* @__PURE__ */ s(ee, { variant: "info", children: /* @__PURE__ */ s(ee.Description, { children: Z("booking.payment.cancelled") }) }) : null,
3707
+ wt ?? Ct ?? At
3698
3708
  ]
3699
3709
  }
3700
3710
  );
3701
3711
  }
3702
3712
  );
3703
- Bi.displayName = "Booking";
3713
+ Ei.displayName = "Booking";
3704
3714
  export {
3705
- Bi as B,
3706
- Ht as C,
3707
- we as O,
3708
- Bn as b
3715
+ Ei as B,
3716
+ Jt as C,
3717
+ Ce as O,
3718
+ En as b
3709
3719
  };
3710
- //# sourceMappingURL=booking-CPUjwxj0.js.map
3720
+ //# sourceMappingURL=booking-BN7TXe27.js.map