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