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