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