@alfadocs/ui-kit 0.30.3 → 0.30.5
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-DiyuLsQV.js → booking-Cw92aqo3.js} +426 -422
- package/dist/_chunks/{public-footer.agent-DivkKdG4.js → public-footer.agent-Bc99tE5Z.js} +251 -204
- package/dist/agent-catalog.json +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/i18n/config.d.ts +14 -1
- package/dist/i18n/config.js +66 -26936
- package/dist/i18n/locales/ar.js +1500 -0
- package/dist/i18n/locales/de.js +1500 -0
- package/dist/i18n/locales/el.js +1500 -0
- package/dist/i18n/locales/en.d.ts +1501 -0
- package/dist/i18n/locales/en.js +1486 -0
- package/dist/i18n/locales/es.js +1498 -0
- package/dist/i18n/locales/fr.js +1498 -0
- package/dist/i18n/locales/hi.js +1498 -0
- package/dist/i18n/locales/it.d.ts +1498 -0
- package/dist/i18n/locales/it.js +1480 -0
- package/dist/i18n/locales/ja.js +1500 -0
- package/dist/i18n/locales/nl.js +1498 -0
- package/dist/i18n/locales/pl.js +1498 -0
- package/dist/i18n/locales/pt.js +1498 -0
- package/dist/i18n/locales/ro.js +1498 -0
- package/dist/i18n/locales/ru.js +1500 -0
- package/dist/i18n/locales/sq.js +1498 -0
- package/dist/i18n/locales/sv.js +1498 -0
- package/dist/i18n/locales/tr.js +1498 -0
- package/dist/i18n/locales/zh.js +1498 -0
- package/dist/i18n/resources.d.ts +2 -2994
- package/dist/index.js +2 -2
- package/dist/tokens.css +1 -1
- package/package.json +5 -1
|
@@ -3,7 +3,7 @@ import { forwardRef as qe, useId as He, useState as H, useCallback as ae, useRef
|
|
|
3
3
|
import { c as Ie } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as T, Trans as gt } from "react-i18next";
|
|
5
5
|
import { u as ft } from "./registry-C9nwlNyL.js";
|
|
6
|
-
import { A as
|
|
6
|
+
import { A as L } from "./alert-ywPR59NE.js";
|
|
7
7
|
import { B as se } from "./button-DD_0Xdmr.js";
|
|
8
8
|
import { C as Ae } from "./checkbox-Dgp_cfUr.js";
|
|
9
9
|
import { C as ht } from "./checkbox-group-eVowqKcT.js";
|
|
@@ -14,7 +14,7 @@ import { P as yt } from "./phone-input-DKSHX7NQ.js";
|
|
|
14
14
|
import { T as kt } from "./text-area-D5GAe8pV.js";
|
|
15
15
|
import { T as be } from "./text-input-CakysYnD.js";
|
|
16
16
|
import { S as xt } from "./spinner-CCByyvcb.js";
|
|
17
|
-
import { I as
|
|
17
|
+
import { I as Fe } from "./icon-button-DPEqBKBQ.js";
|
|
18
18
|
import { S as we } from "./select-C92AT_OZ.js";
|
|
19
19
|
import { S as Se } from "./skeleton-CZbwyJAA.js";
|
|
20
20
|
import { E as Ge } from "./empty-state-BLy7tigq.js";
|
|
@@ -70,7 +70,7 @@ const Pt = [
|
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
72
|
*/
|
|
73
|
-
const
|
|
73
|
+
const Rt = [
|
|
74
74
|
[
|
|
75
75
|
"path",
|
|
76
76
|
{
|
|
@@ -78,14 +78,14 @@ const Lt = [
|
|
|
78
78
|
key: "w610uw"
|
|
79
79
|
}
|
|
80
80
|
]
|
|
81
|
-
],
|
|
81
|
+
], Lt = O("bone", Rt);
|
|
82
82
|
/**
|
|
83
83
|
* @license lucide-react v1.8.0 - ISC
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the ISC license.
|
|
86
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
87
|
*/
|
|
88
|
-
const
|
|
88
|
+
const Ft = [
|
|
89
89
|
["path", { d: "M12 18V5", key: "adv99a" }],
|
|
90
90
|
["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
|
|
91
91
|
["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
|
|
@@ -94,7 +94,7 @@ const Rt = [
|
|
|
94
94
|
["path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517", key: "1gq6am" }],
|
|
95
95
|
["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
|
|
96
96
|
["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
|
|
97
|
-
], zt = O("brain",
|
|
97
|
+
], zt = O("brain", Ft);
|
|
98
98
|
/**
|
|
99
99
|
* @license lucide-react v1.8.0 - ISC
|
|
100
100
|
*
|
|
@@ -218,21 +218,21 @@ const sa = [
|
|
|
218
218
|
["path", { d: "M22 22H2", key: "19qnx5" }],
|
|
219
219
|
["path", { d: "m16 6-4 4-4-4", key: "6wukr" }],
|
|
220
220
|
["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]
|
|
221
|
-
],
|
|
221
|
+
], ia = O("sunset", sa);
|
|
222
222
|
/**
|
|
223
223
|
* @license lucide-react v1.8.0 - ISC
|
|
224
224
|
*
|
|
225
225
|
* This source code is licensed under the ISC license.
|
|
226
226
|
* See the LICENSE file in the root directory of this source tree.
|
|
227
227
|
*/
|
|
228
|
-
const
|
|
228
|
+
const na = [
|
|
229
229
|
["path", { d: "m18 2 4 4", key: "22kx64" }],
|
|
230
230
|
["path", { d: "m17 7 3-3", key: "1w1zoj" }],
|
|
231
231
|
["path", { d: "M19 9 8.7 19.3c-1 1-2.5 1-3.4 0l-.6-.6c-1-1-1-2.5 0-3.4L15 5", key: "1exhtz" }],
|
|
232
232
|
["path", { d: "m9 11 4 4", key: "rovt3i" }],
|
|
233
233
|
["path", { d: "m5 19-3 3", key: "59f2uf" }],
|
|
234
234
|
["path", { d: "m14 4 6 6", key: "yqp9t2" }]
|
|
235
|
-
], $e = O("syringe",
|
|
235
|
+
], $e = O("syringe", na);
|
|
236
236
|
function oa(e, t, s) {
|
|
237
237
|
return Ue(e, -1, s);
|
|
238
238
|
}
|
|
@@ -286,61 +286,62 @@ const ra = {
|
|
|
286
286
|
function la(e) {
|
|
287
287
|
return [...e.lockedOperatorId ? e.specialties.filter(
|
|
288
288
|
(s) => {
|
|
289
|
-
var
|
|
290
|
-
return (
|
|
289
|
+
var i;
|
|
290
|
+
return (i = s.operatorIds) == null ? void 0 : i.includes(e.lockedOperatorId);
|
|
291
291
|
}
|
|
292
|
-
) : e.specialties].sort((s,
|
|
293
|
-
const
|
|
294
|
-
return
|
|
292
|
+
) : e.specialties].sort((s, i) => {
|
|
293
|
+
const n = s.sequenceNumber ?? Number.POSITIVE_INFINITY, o = i.sequenceNumber ?? Number.POSITIVE_INFINITY;
|
|
294
|
+
return n - o;
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
297
|
function ca(e) {
|
|
298
298
|
let t = e.services;
|
|
299
299
|
return e.lockedOperatorId && (t = t.filter(
|
|
300
|
-
(
|
|
300
|
+
(i) => {
|
|
301
301
|
var n;
|
|
302
|
-
return (n =
|
|
302
|
+
return (n = i.operatorIds) == null ? void 0 : n.includes(e.lockedOperatorId);
|
|
303
303
|
}
|
|
304
|
-
)), e.useSpecialties && e.value.specialtyId && (t = t.filter((
|
|
304
|
+
)), (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && e.value.specialtyId && (t = t.filter((i) => i.specialtyId === e.value.specialtyId)), t;
|
|
305
305
|
}
|
|
306
306
|
function ma(e) {
|
|
307
|
-
|
|
308
|
-
|
|
307
|
+
const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties;
|
|
308
|
+
if (t && e.value.specialtyId) {
|
|
309
|
+
const s = e.value.specialtyId;
|
|
309
310
|
return e.operators.filter(
|
|
310
|
-
(
|
|
311
|
+
(i) => {
|
|
311
312
|
var n;
|
|
312
|
-
return (n =
|
|
313
|
+
return (n = i.specialtyIds) == null ? void 0 : n.includes(s);
|
|
313
314
|
}
|
|
314
315
|
);
|
|
315
316
|
}
|
|
316
|
-
if (!
|
|
317
|
-
const
|
|
317
|
+
if (!t && e.value.serviceId) {
|
|
318
|
+
const s = e.value.serviceId;
|
|
318
319
|
return e.operators.filter(
|
|
319
|
-
(
|
|
320
|
+
(i) => {
|
|
320
321
|
var n;
|
|
321
|
-
return (n =
|
|
322
|
+
return (n = i.appointmentBookingReasonIds) == null ? void 0 : n.includes(s);
|
|
322
323
|
}
|
|
323
324
|
);
|
|
324
325
|
}
|
|
325
326
|
return [];
|
|
326
327
|
}
|
|
327
328
|
function ua(e, t) {
|
|
328
|
-
const s = e.country === da,
|
|
329
|
+
const s = e.country === da, i = !s || e.value.insuranceType !== void 0, o = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && i, l = !o || e.value.specialtyId !== void 0, d = !l || e.value.serviceId !== void 0, p = t.operators, h = !!e.allowOperatorSelection && d && e.value.serviceId !== void 0 && !e.lockedOperatorId && p.length > 1, u = d && e.value.serviceId !== void 0, g = (!u || e.value.date !== void 0) && e.value.date !== void 0, y = (!g || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, w = !!e.value.serviceId && p.length === 0;
|
|
329
330
|
return {
|
|
330
331
|
insurance: s,
|
|
331
|
-
specialty:
|
|
332
|
+
specialty: o,
|
|
332
333
|
service: l,
|
|
333
|
-
operator:
|
|
334
|
-
date:
|
|
335
|
-
slot:
|
|
336
|
-
details:
|
|
337
|
-
onboardingIncomplete:
|
|
334
|
+
operator: h,
|
|
335
|
+
date: u,
|
|
336
|
+
slot: g,
|
|
337
|
+
details: y,
|
|
338
|
+
onboardingIncomplete: w
|
|
338
339
|
};
|
|
339
340
|
}
|
|
340
341
|
function pa(e, t) {
|
|
341
342
|
const s = [];
|
|
342
343
|
t.insurance && s.push(1), t.specialty && s.push(2), s.push(3), t.operator && s.push(4), s.push(5), s.push(6), s.push(7);
|
|
343
|
-
const
|
|
344
|
+
const i = {
|
|
344
345
|
1: e.value.insuranceType !== void 0,
|
|
345
346
|
2: e.value.specialtyId !== void 0,
|
|
346
347
|
3: e.value.serviceId !== void 0,
|
|
@@ -351,7 +352,7 @@ function pa(e, t) {
|
|
|
351
352
|
// details fulfilment is owned by the form's own validation
|
|
352
353
|
};
|
|
353
354
|
return {
|
|
354
|
-
currentStep: s.find((o) => !
|
|
355
|
+
currentStep: s.find((o) => !i[o]) ?? 7,
|
|
355
356
|
visibleSteps: s
|
|
356
357
|
};
|
|
357
358
|
}
|
|
@@ -360,21 +361,21 @@ function ga(e) {
|
|
|
360
361
|
specialties: la(e),
|
|
361
362
|
services: ca(e),
|
|
362
363
|
operators: ma(e)
|
|
363
|
-
}, s = ua(e, t), { currentStep:
|
|
364
|
+
}, s = ua(e, t), { currentStep: i, visibleSteps: n } = pa(e, s);
|
|
364
365
|
let o;
|
|
365
366
|
if (e.value.date && e.value.slotKey) {
|
|
366
367
|
const d = e.availableSlots[e.value.date];
|
|
367
368
|
d && (o = d.find((p) => p.key === e.value.slotKey));
|
|
368
369
|
}
|
|
369
|
-
const
|
|
370
|
+
const c = e.value.serviceId ? e.services.find((d) => d.id === e.value.serviceId) : void 0, l = e.value.serviceId !== void 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!s.insurance || e.value.insuranceType !== void 0) && (!s.specialty || e.value.specialtyId !== void 0);
|
|
370
371
|
return {
|
|
371
372
|
gates: s,
|
|
372
373
|
filtered: t,
|
|
373
|
-
currentStep:
|
|
374
|
-
totalSteps:
|
|
375
|
-
visibleSteps:
|
|
376
|
-
isReadyToSubmit:
|
|
377
|
-
durationMin:
|
|
374
|
+
currentStep: i,
|
|
375
|
+
totalSteps: n.length,
|
|
376
|
+
visibleSteps: n,
|
|
377
|
+
isReadyToSubmit: l,
|
|
378
|
+
durationMin: c == null ? void 0 : c.durationMin,
|
|
378
379
|
selectedSlot: o
|
|
379
380
|
};
|
|
380
381
|
}
|
|
@@ -440,8 +441,8 @@ function We(e, t) {
|
|
|
440
441
|
}
|
|
441
442
|
function fa(e, t) {
|
|
442
443
|
let s = e;
|
|
443
|
-
if (t.lockedOperatorId && s.operatorId !== t.lockedOperatorId && (s = { ...s, operatorId: t.lockedOperatorId }), t.useSpecialties && t.specialties.length === 1 && s.specialtyId === void 0 && (s = { ...s, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
|
|
444
|
-
const n = s.specialtyId ? t.services.filter((
|
|
444
|
+
if (t.lockedOperatorId && s.operatorId !== t.lockedOperatorId && (s = { ...s, operatorId: t.lockedOperatorId }), (t.useSpecialties === void 0 ? t.specialties.length > 0 : t.useSpecialties) && t.specialties.length === 1 && s.specialtyId === void 0 && (s = { ...s, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
|
|
445
|
+
const n = s.specialtyId ? t.services.filter((o) => o.specialtyId === s.specialtyId) : t.services;
|
|
445
446
|
n.length === 1 && s.serviceId === void 0 && (s = { ...s, serviceId: n[0].id }, s.operatorId === void 0 && (s = { ...s, operatorId: he }));
|
|
446
447
|
}
|
|
447
448
|
return s;
|
|
@@ -457,18 +458,18 @@ function ha(e) {
|
|
|
457
458
|
}
|
|
458
459
|
function Qe(e) {
|
|
459
460
|
const t = e && e.length > 0 ? e : ["email"], s = new Set(t);
|
|
460
|
-
return Oe.filter((
|
|
461
|
+
return Oe.filter((i) => s.has(i));
|
|
461
462
|
}
|
|
462
463
|
function va(e, t, s) {
|
|
463
|
-
const
|
|
464
|
+
const i = Qe(e), n = new Set(i);
|
|
464
465
|
if (s)
|
|
465
466
|
return Oe.filter(
|
|
466
|
-
(p) => s.includes(p) &&
|
|
467
|
+
(p) => s.includes(p) && n.has(p)
|
|
467
468
|
);
|
|
468
469
|
const o = [];
|
|
469
|
-
|
|
470
|
-
const
|
|
471
|
-
|
|
470
|
+
n.has("email") && o.push("email");
|
|
471
|
+
const c = ha(t), l = n.has("whatsapp");
|
|
472
|
+
l && c && o.push("whatsapp"), !l && n.has("sms") && o.push("sms");
|
|
472
473
|
const d = new Set(o);
|
|
473
474
|
return Oe.filter((p) => d.has(p));
|
|
474
475
|
}
|
|
@@ -477,26 +478,26 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
477
478
|
value: e,
|
|
478
479
|
onChange: t,
|
|
479
480
|
onSubmit: s,
|
|
480
|
-
requireCodiceFiscale:
|
|
481
|
-
requireDateOfBirth:
|
|
481
|
+
requireCodiceFiscale: i = !1,
|
|
482
|
+
requireDateOfBirth: n = !1,
|
|
482
483
|
requireInsuranceNumber: o = !1,
|
|
483
|
-
insuranceType:
|
|
484
|
-
showNote:
|
|
484
|
+
insuranceType: c,
|
|
485
|
+
showNote: l = !1,
|
|
485
486
|
showReturningPatientFlag: d = !1,
|
|
486
487
|
privacyPolicyUrl: p,
|
|
487
|
-
termsUrl:
|
|
488
|
+
termsUrl: h,
|
|
488
489
|
validateCodiceFiscale: u,
|
|
489
|
-
validateInsuranceNumber:
|
|
490
|
-
submitting:
|
|
491
|
-
summarySlot:
|
|
490
|
+
validateInsuranceNumber: x,
|
|
491
|
+
submitting: g = !1,
|
|
492
|
+
summarySlot: k,
|
|
492
493
|
defaultPhoneCountry: y,
|
|
493
|
-
confirmationChannels:
|
|
494
|
+
confirmationChannels: w,
|
|
494
495
|
defaultConfirmationChannels: A,
|
|
495
496
|
submitError: S
|
|
496
497
|
}, v) => {
|
|
497
498
|
var _, me;
|
|
498
|
-
const { t: r } = T(), E = He(), [M, b] = H(ke), [N,
|
|
499
|
-
(m) => J((
|
|
499
|
+
const { t: r } = T(), E = He(), [M, b] = H(ke), [N, F] = H(ke), [B, J] = H({}), P = ae(
|
|
500
|
+
(m) => J((C) => ({ ...C, [m]: !0 })),
|
|
500
501
|
[]
|
|
501
502
|
), z = te(null), G = te(
|
|
502
503
|
null
|
|
@@ -510,10 +511,10 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
510
511
|
const D = ae(
|
|
511
512
|
(m) => t({ ...e, ...m }),
|
|
512
513
|
[e, t]
|
|
513
|
-
),
|
|
514
|
-
() => Qe(
|
|
515
|
-
[
|
|
516
|
-
), j =
|
|
514
|
+
), ie = I(
|
|
515
|
+
() => Qe(w),
|
|
516
|
+
[w]
|
|
517
|
+
), j = ie.length >= 2, oe = te(!1);
|
|
517
518
|
Q(() => {
|
|
518
519
|
if (!j) {
|
|
519
520
|
e.confirmationChannels !== void 0 && D({ confirmationChannels: void 0 });
|
|
@@ -524,24 +525,24 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
524
525
|
return;
|
|
525
526
|
}
|
|
526
527
|
const m = va(
|
|
527
|
-
|
|
528
|
+
ie,
|
|
528
529
|
e.mobilePhone,
|
|
529
530
|
A
|
|
530
531
|
);
|
|
531
532
|
oe.current = !0, D({ confirmationChannels: m });
|
|
532
533
|
}, [
|
|
533
534
|
j,
|
|
534
|
-
|
|
535
|
+
ie,
|
|
535
536
|
e.mobilePhone,
|
|
536
537
|
A
|
|
537
538
|
]);
|
|
538
|
-
const
|
|
539
|
+
const ne = I(
|
|
539
540
|
() => e.confirmationChannels ?? [],
|
|
540
541
|
[e.confirmationChannels]
|
|
541
|
-
), re = j &&
|
|
542
|
+
), re = j && ne.length === 0;
|
|
542
543
|
Q(() => {
|
|
543
544
|
const m = e.codiceFiscale;
|
|
544
|
-
if (!
|
|
545
|
+
if (!i || !u || !m) {
|
|
545
546
|
b(ke);
|
|
546
547
|
return;
|
|
547
548
|
}
|
|
@@ -554,8 +555,8 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
554
555
|
}
|
|
555
556
|
b({ state: "pending" }), z.current && clearTimeout(z.current), z.current = setTimeout(() => {
|
|
556
557
|
u(m).then(
|
|
557
|
-
(
|
|
558
|
-
|
|
558
|
+
(C) => b(
|
|
559
|
+
C.valid ? { state: "valid" } : { state: "invalid", hint: C.hint }
|
|
559
560
|
)
|
|
560
561
|
).catch(
|
|
561
562
|
() => b({
|
|
@@ -564,27 +565,27 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
564
565
|
})
|
|
565
566
|
);
|
|
566
567
|
}, je);
|
|
567
|
-
}, [
|
|
568
|
-
const X = o &&
|
|
568
|
+
}, [i, u, e.codiceFiscale, r]);
|
|
569
|
+
const X = o && c === "public";
|
|
569
570
|
Q(() => {
|
|
570
571
|
const m = e.insuranceNumber;
|
|
571
|
-
if (!X || !
|
|
572
|
-
|
|
572
|
+
if (!X || !x || !m) {
|
|
573
|
+
F(ke);
|
|
573
574
|
return;
|
|
574
575
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
(
|
|
578
|
-
|
|
576
|
+
F({ state: "pending" }), G.current && clearTimeout(G.current), G.current = setTimeout(() => {
|
|
577
|
+
x(m).then(
|
|
578
|
+
(C) => F(
|
|
579
|
+
C.valid ? { state: "valid" } : { state: "invalid", hint: C.hint }
|
|
579
580
|
)
|
|
580
581
|
).catch(
|
|
581
|
-
() =>
|
|
582
|
+
() => F({
|
|
582
583
|
state: "invalid",
|
|
583
584
|
hint: r("booking.details.insuranceNumber.unavailable")
|
|
584
585
|
})
|
|
585
586
|
);
|
|
586
587
|
}, je);
|
|
587
|
-
}, [X,
|
|
588
|
+
}, [X, x, e.insuranceNumber, r]);
|
|
588
589
|
const de = I(
|
|
589
590
|
() => !!(e.email && ya.test(e.email)),
|
|
590
591
|
[e.email]
|
|
@@ -592,20 +593,20 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
592
593
|
() => !!(e.mobilePhone && e.mobilePhone.length >= 6),
|
|
593
594
|
[e.mobilePhone]
|
|
594
595
|
), ce = I(() => {
|
|
595
|
-
var m,
|
|
596
|
-
return !(!((m = e.firstName) != null && m.trim()) || !((
|
|
596
|
+
var m, C;
|
|
597
|
+
return !(!((m = e.firstName) != null && m.trim()) || !((C = e.lastName) != null && C.trim()) || !de || !le || i && M.state !== "valid" || n && !e.dateOfBirth || X && N.state !== "valid");
|
|
597
598
|
}, [
|
|
598
599
|
e.firstName,
|
|
599
600
|
e.lastName,
|
|
600
601
|
de,
|
|
601
602
|
le,
|
|
602
|
-
n,
|
|
603
|
-
M.state,
|
|
604
603
|
i,
|
|
604
|
+
M.state,
|
|
605
|
+
n,
|
|
605
606
|
e.dateOfBirth,
|
|
606
607
|
X,
|
|
607
608
|
N.state
|
|
608
|
-
]), Ce = !!(e.privacyConsent && e.termsConsent), V = !j ||
|
|
609
|
+
]), Ce = !!(e.privacyConsent && e.termsConsent), V = !j || ne.length > 0, W = ce && Ce && V && !g, $ = (m) => {
|
|
609
610
|
if (m.preventDefault(), J({
|
|
610
611
|
firstName: !0,
|
|
611
612
|
lastName: !0,
|
|
@@ -615,7 +616,7 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
615
616
|
dateOfBirth: !0,
|
|
616
617
|
insuranceNumber: !0
|
|
617
618
|
}), !W) return;
|
|
618
|
-
const
|
|
619
|
+
const C = {
|
|
619
620
|
firstName: e.firstName.trim(),
|
|
620
621
|
lastName: e.lastName.trim(),
|
|
621
622
|
email: e.email.trim(),
|
|
@@ -630,11 +631,11 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
630
631
|
// Only include when the picker was visible; otherwise the single
|
|
631
632
|
// implicit channel is inferred backend-side from the practice
|
|
632
633
|
// config.
|
|
633
|
-
confirmationChannels: j ?
|
|
634
|
+
confirmationChannels: j ? ne : void 0
|
|
634
635
|
};
|
|
635
|
-
s(
|
|
636
|
-
}, q = (m,
|
|
637
|
-
const U =
|
|
636
|
+
s(C);
|
|
637
|
+
}, q = (m, C) => {
|
|
638
|
+
const U = C && /^https?:\/\//i.test(C) ? C : void 0;
|
|
638
639
|
return U ? /* @__PURE__ */ a(
|
|
639
640
|
gt,
|
|
640
641
|
{
|
|
@@ -670,7 +671,7 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
670
671
|
onSubmit: $,
|
|
671
672
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
672
673
|
children: [
|
|
673
|
-
|
|
674
|
+
k,
|
|
674
675
|
/* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
|
|
675
676
|
/* @__PURE__ */ a(
|
|
676
677
|
Y,
|
|
@@ -743,8 +744,8 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
743
744
|
}
|
|
744
745
|
)
|
|
745
746
|
] }),
|
|
746
|
-
|
|
747
|
-
|
|
747
|
+
i || n ? /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
|
|
748
|
+
i ? /* @__PURE__ */ a(
|
|
748
749
|
Y,
|
|
749
750
|
{
|
|
750
751
|
label: r("booking.details.codiceFiscale.label"),
|
|
@@ -764,7 +765,7 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
764
765
|
)
|
|
765
766
|
}
|
|
766
767
|
) : null,
|
|
767
|
-
|
|
768
|
+
n ? /* @__PURE__ */ a(
|
|
768
769
|
Y,
|
|
769
770
|
{
|
|
770
771
|
label: r("booking.details.dateOfBirth.label"),
|
|
@@ -801,7 +802,7 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
801
802
|
)
|
|
802
803
|
}
|
|
803
804
|
) : null,
|
|
804
|
-
|
|
805
|
+
l ? /* @__PURE__ */ a(
|
|
805
806
|
Y,
|
|
806
807
|
{
|
|
807
808
|
label: r("booking.details.note.label"),
|
|
@@ -857,7 +858,7 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
857
858
|
label: /* @__PURE__ */ f(Z, { children: [
|
|
858
859
|
q(
|
|
859
860
|
"booking.details.consent.terms.label",
|
|
860
|
-
|
|
861
|
+
h
|
|
861
862
|
),
|
|
862
863
|
/* @__PURE__ */ a(
|
|
863
864
|
"span",
|
|
@@ -881,12 +882,12 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
881
882
|
{
|
|
882
883
|
label: r("booking.confirmation.heading"),
|
|
883
884
|
helperText: r("booking.confirmation.helper"),
|
|
884
|
-
value:
|
|
885
|
+
value: ne,
|
|
885
886
|
onChange: (m) => D({
|
|
886
887
|
confirmationChannels: m
|
|
887
888
|
}),
|
|
888
889
|
orientation: "vertical",
|
|
889
|
-
options:
|
|
890
|
+
options: ie.map((m) => ({
|
|
890
891
|
value: m,
|
|
891
892
|
label: r(`booking.confirmation.channel.${m}`)
|
|
892
893
|
})),
|
|
@@ -895,7 +896,7 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
895
896
|
)
|
|
896
897
|
}
|
|
897
898
|
) : null,
|
|
898
|
-
S ? /* @__PURE__ */ a(
|
|
899
|
+
S ? /* @__PURE__ */ a(L, { variant: "error", children: /* @__PURE__ */ a(L.Description, { children: S }) }) : null,
|
|
899
900
|
/* @__PURE__ */ a(
|
|
900
901
|
se,
|
|
901
902
|
{
|
|
@@ -903,7 +904,7 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
|
|
|
903
904
|
size: "md",
|
|
904
905
|
type: "submit",
|
|
905
906
|
disabled: !W,
|
|
906
|
-
startIcon:
|
|
907
|
+
startIcon: g ? /* @__PURE__ */ a(xt, { size: "sm" }) : void 0,
|
|
907
908
|
children: r("booking.details.submit")
|
|
908
909
|
}
|
|
909
910
|
)
|
|
@@ -952,7 +953,7 @@ const ka = Ie(
|
|
|
952
953
|
[/\b(otorin|udito|orecchi|hearing|ear)/i, Gt],
|
|
953
954
|
[/\b(neuro|brain|cervello)/i, zt],
|
|
954
955
|
[/\b(pediatr|child|bambin)/i, Vt],
|
|
955
|
-
[/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i,
|
|
956
|
+
[/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, Lt],
|
|
956
957
|
[/\b(lab|analis|test|sang|esami)/i, Yt],
|
|
957
958
|
[/\b(farmaco|pharm|pillol|refill)/i, Jt],
|
|
958
959
|
[/\b(chirurg|surg|intervent|operat)/i, ea],
|
|
@@ -999,11 +1000,11 @@ function et({
|
|
|
999
1000
|
availableDates: e,
|
|
1000
1001
|
selectedDate: t,
|
|
1001
1002
|
onSelectDate: s,
|
|
1002
|
-
locale:
|
|
1003
|
-
loading:
|
|
1003
|
+
locale: i,
|
|
1004
|
+
loading: n
|
|
1004
1005
|
}) {
|
|
1005
|
-
const { t: o } = T(),
|
|
1006
|
-
const S = fe(
|
|
1006
|
+
const { t: o } = T(), c = I(() => t ? fe(ee(t)) : e.length > 0 ? fe(ee(e[0])) : fe(/* @__PURE__ */ new Date()), [t, e]), [l, d] = H(c), [p, h] = H(null), u = I(() => {
|
|
1007
|
+
const S = fe(l), v = It(l), r = S.getDay(), E = v.getDate(), M = [];
|
|
1007
1008
|
for (let b = r; b > 0; b -= 1) {
|
|
1008
1009
|
const N = new Date(S);
|
|
1009
1010
|
N.setDate(S.getDate() - b), M.push(N);
|
|
@@ -1017,37 +1018,37 @@ function et({
|
|
|
1017
1018
|
N.setDate(b.getDate() + 1), M.push(N);
|
|
1018
1019
|
}
|
|
1019
1020
|
return M;
|
|
1020
|
-
}, [
|
|
1021
|
+
}, [l]), x = I(() => {
|
|
1021
1022
|
try {
|
|
1022
|
-
return new Intl.DateTimeFormat(
|
|
1023
|
+
return new Intl.DateTimeFormat(i, {
|
|
1023
1024
|
month: "long",
|
|
1024
1025
|
year: "numeric"
|
|
1025
|
-
}).format(
|
|
1026
|
+
}).format(l);
|
|
1026
1027
|
} catch {
|
|
1027
|
-
return xe(
|
|
1028
|
+
return xe(l, "MMMM yyyy");
|
|
1028
1029
|
}
|
|
1029
|
-
}, [
|
|
1030
|
+
}, [l, i]), g = I(() => {
|
|
1030
1031
|
const S = new Date(2024, 0, 7);
|
|
1031
1032
|
return Array.from({ length: 7 }, (v, r) => {
|
|
1032
1033
|
const E = new Date(S);
|
|
1033
1034
|
E.setDate(S.getDate() + r);
|
|
1034
1035
|
try {
|
|
1035
|
-
return new Intl.DateTimeFormat(
|
|
1036
|
+
return new Intl.DateTimeFormat(i, { weekday: "short" }).format(E);
|
|
1036
1037
|
} catch {
|
|
1037
1038
|
return xe(E, "EEE");
|
|
1038
1039
|
}
|
|
1039
1040
|
});
|
|
1040
|
-
}, [
|
|
1041
|
-
(S) =>
|
|
1042
|
-
[
|
|
1043
|
-
),
|
|
1041
|
+
}, [i]), k = I(() => new Set(e), [e]), y = ae(
|
|
1042
|
+
(S) => k.has(Be(S)),
|
|
1043
|
+
[k]
|
|
1044
|
+
), w = I(() => {
|
|
1044
1045
|
if (p) return p;
|
|
1045
1046
|
if (t) return ee(t);
|
|
1046
1047
|
const S = u.find(
|
|
1047
|
-
(v) => ye(v,
|
|
1048
|
+
(v) => ye(v, l) && y(v)
|
|
1048
1049
|
);
|
|
1049
|
-
return S || (u.find((v) => ye(v,
|
|
1050
|
-
}, [p, t, u,
|
|
1050
|
+
return S || (u.find((v) => ye(v, l)) ?? null);
|
|
1051
|
+
}, [p, t, u, l, y]), A = ae(
|
|
1051
1052
|
(S, v) => {
|
|
1052
1053
|
let r = null;
|
|
1053
1054
|
switch (S.key) {
|
|
@@ -1077,11 +1078,11 @@ function et({
|
|
|
1077
1078
|
default:
|
|
1078
1079
|
return;
|
|
1079
1080
|
}
|
|
1080
|
-
r && (S.preventDefault(), ye(r,
|
|
1081
|
+
r && (S.preventDefault(), ye(r, l) || d(fe(r)), h(r));
|
|
1081
1082
|
},
|
|
1082
|
-
[y, s,
|
|
1083
|
+
[y, s, l]
|
|
1083
1084
|
);
|
|
1084
|
-
return
|
|
1085
|
+
return n ? /* @__PURE__ */ f(
|
|
1085
1086
|
"div",
|
|
1086
1087
|
{
|
|
1087
1088
|
role: "status",
|
|
@@ -1096,7 +1097,7 @@ function et({
|
|
|
1096
1097
|
) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1097
1098
|
/* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
1098
1099
|
/* @__PURE__ */ a(
|
|
1099
|
-
|
|
1100
|
+
Fe,
|
|
1100
1101
|
{
|
|
1101
1102
|
icon: /* @__PURE__ */ a(wt, {}),
|
|
1102
1103
|
"aria-label": o("booking.previousMonth"),
|
|
@@ -1104,7 +1105,7 @@ function et({
|
|
|
1104
1105
|
intent: "ghost",
|
|
1105
1106
|
flipIconInRtl: !0,
|
|
1106
1107
|
onClick: () => {
|
|
1107
|
-
d((S) => oa(S)),
|
|
1108
|
+
d((S) => oa(S)), h(null);
|
|
1108
1109
|
}
|
|
1109
1110
|
}
|
|
1110
1111
|
),
|
|
@@ -1113,11 +1114,11 @@ function et({
|
|
|
1113
1114
|
{
|
|
1114
1115
|
className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]",
|
|
1115
1116
|
"aria-live": "polite",
|
|
1116
|
-
children:
|
|
1117
|
+
children: x
|
|
1117
1118
|
}
|
|
1118
1119
|
),
|
|
1119
1120
|
/* @__PURE__ */ a(
|
|
1120
|
-
|
|
1121
|
+
Fe,
|
|
1121
1122
|
{
|
|
1122
1123
|
icon: /* @__PURE__ */ a(Ct, {}),
|
|
1123
1124
|
"aria-label": o("booking.nextMonth"),
|
|
@@ -1125,7 +1126,7 @@ function et({
|
|
|
1125
1126
|
intent: "ghost",
|
|
1126
1127
|
flipIconInRtl: !0,
|
|
1127
1128
|
onClick: () => {
|
|
1128
|
-
d((S) => Ue(S, 1)),
|
|
1129
|
+
d((S) => Ue(S, 1)), h(null);
|
|
1129
1130
|
}
|
|
1130
1131
|
}
|
|
1131
1132
|
)
|
|
@@ -1142,7 +1143,7 @@ function et({
|
|
|
1142
1143
|
{
|
|
1143
1144
|
role: "row",
|
|
1144
1145
|
className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
|
|
1145
|
-
children:
|
|
1146
|
+
children: g.map((S, v) => /* @__PURE__ */ a(
|
|
1146
1147
|
"div",
|
|
1147
1148
|
{
|
|
1148
1149
|
role: "columnheader",
|
|
@@ -1159,9 +1160,9 @@ function et({
|
|
|
1159
1160
|
role: "row",
|
|
1160
1161
|
className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
|
|
1161
1162
|
children: u.slice(v * 7, v * 7 + 7).map((r, E) => {
|
|
1162
|
-
const M = v * 7 + E, b = ye(r,
|
|
1163
|
+
const M = v * 7 + E, b = ye(r, l), N = b && y(r), F = t ? ze(r, ee(t)) : !1, B = b ? F ? "selected" : N ? "available" : "unavailable" : "outside", J = w ? ze(w, r) : !1, P = (() => {
|
|
1163
1164
|
try {
|
|
1164
|
-
return new Intl.DateTimeFormat(
|
|
1165
|
+
return new Intl.DateTimeFormat(i, {
|
|
1165
1166
|
dateStyle: "full"
|
|
1166
1167
|
}).format(r);
|
|
1167
1168
|
} catch {
|
|
@@ -1174,7 +1175,7 @@ function et({
|
|
|
1174
1175
|
type: "button",
|
|
1175
1176
|
role: "gridcell",
|
|
1176
1177
|
"aria-label": P,
|
|
1177
|
-
"aria-selected":
|
|
1178
|
+
"aria-selected": F || void 0,
|
|
1178
1179
|
"aria-disabled": !N || void 0,
|
|
1179
1180
|
tabIndex: J ? 0 : -1,
|
|
1180
1181
|
disabled: !N,
|
|
@@ -1227,47 +1228,47 @@ function Ma({
|
|
|
1227
1228
|
selectedServiceId: t,
|
|
1228
1229
|
onSelect: s
|
|
1229
1230
|
}) {
|
|
1230
|
-
const { t:
|
|
1231
|
+
const { t: i } = T(), n = He(), [o, c] = H(() => {
|
|
1231
1232
|
if (t) {
|
|
1232
|
-
const
|
|
1233
|
-
if (
|
|
1233
|
+
const h = e.findIndex((u) => u.id === t);
|
|
1234
|
+
if (h >= 0) return h;
|
|
1234
1235
|
}
|
|
1235
1236
|
return 0;
|
|
1236
|
-
}),
|
|
1237
|
+
}), l = te(/* @__PURE__ */ new Map()), d = ae((h) => {
|
|
1237
1238
|
var u;
|
|
1238
|
-
(u =
|
|
1239
|
+
(u = l.current.get(h)) == null || u.focus();
|
|
1239
1240
|
}, []), p = ae(
|
|
1240
|
-
(
|
|
1241
|
-
const
|
|
1242
|
-
if (
|
|
1243
|
-
switch (
|
|
1241
|
+
(h, u, x) => {
|
|
1242
|
+
const g = e.length;
|
|
1243
|
+
if (g !== 0)
|
|
1244
|
+
switch (h.key) {
|
|
1244
1245
|
case "ArrowDown":
|
|
1245
1246
|
case "ArrowRight": {
|
|
1246
|
-
|
|
1247
|
-
const
|
|
1248
|
-
|
|
1247
|
+
h.preventDefault();
|
|
1248
|
+
const k = (u + 1) % g;
|
|
1249
|
+
c(k), d(k);
|
|
1249
1250
|
break;
|
|
1250
1251
|
}
|
|
1251
1252
|
case "ArrowUp":
|
|
1252
1253
|
case "ArrowLeft": {
|
|
1253
|
-
|
|
1254
|
-
const
|
|
1255
|
-
|
|
1254
|
+
h.preventDefault();
|
|
1255
|
+
const k = (u - 1 + g) % g;
|
|
1256
|
+
c(k), d(k);
|
|
1256
1257
|
break;
|
|
1257
1258
|
}
|
|
1258
1259
|
case "Home": {
|
|
1259
|
-
|
|
1260
|
+
h.preventDefault(), c(0), d(0);
|
|
1260
1261
|
break;
|
|
1261
1262
|
}
|
|
1262
1263
|
case "End": {
|
|
1263
|
-
|
|
1264
|
-
const
|
|
1265
|
-
|
|
1264
|
+
h.preventDefault();
|
|
1265
|
+
const k = g - 1;
|
|
1266
|
+
c(k), d(k);
|
|
1266
1267
|
break;
|
|
1267
1268
|
}
|
|
1268
1269
|
case "Enter":
|
|
1269
1270
|
case " ": {
|
|
1270
|
-
|
|
1271
|
+
h.preventDefault(), s(x);
|
|
1271
1272
|
break;
|
|
1272
1273
|
}
|
|
1273
1274
|
}
|
|
@@ -1278,30 +1279,30 @@ function Ma({
|
|
|
1278
1279
|
"div",
|
|
1279
1280
|
{
|
|
1280
1281
|
role: "radiogroup",
|
|
1281
|
-
"aria-label":
|
|
1282
|
-
id:
|
|
1282
|
+
"aria-label": i("booking.serviceListLabel"),
|
|
1283
|
+
id: n,
|
|
1283
1284
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1284
|
-
children: e.map((
|
|
1285
|
-
const
|
|
1286
|
-
label:
|
|
1287
|
-
duration:
|
|
1288
|
-
}), y = Na(
|
|
1285
|
+
children: e.map((h, u) => {
|
|
1286
|
+
const x = t === h.id, g = o === u, k = i("booking.serviceCardLabel", {
|
|
1287
|
+
label: h.label,
|
|
1288
|
+
duration: h.durationMin
|
|
1289
|
+
}), y = Na(h);
|
|
1289
1290
|
return /* @__PURE__ */ f(
|
|
1290
1291
|
"button",
|
|
1291
1292
|
{
|
|
1292
|
-
ref: (
|
|
1293
|
-
|
|
1293
|
+
ref: (w) => {
|
|
1294
|
+
w ? l.current.set(u, w) : l.current.delete(u);
|
|
1294
1295
|
},
|
|
1295
1296
|
type: "button",
|
|
1296
1297
|
role: "radio",
|
|
1297
|
-
"aria-checked":
|
|
1298
|
-
"aria-label":
|
|
1299
|
-
tabIndex:
|
|
1300
|
-
onClick: () => s(
|
|
1301
|
-
onFocus: () =>
|
|
1302
|
-
onKeyDown: (
|
|
1298
|
+
"aria-checked": x,
|
|
1299
|
+
"aria-label": k,
|
|
1300
|
+
tabIndex: g ? 0 : -1,
|
|
1301
|
+
onClick: () => s(h.id),
|
|
1302
|
+
onFocus: () => c(u),
|
|
1303
|
+
onKeyDown: (w) => p(w, u, h.id),
|
|
1303
1304
|
className: Ca({
|
|
1304
|
-
state:
|
|
1305
|
+
state: x ? "selected" : "idle"
|
|
1305
1306
|
}),
|
|
1306
1307
|
children: [
|
|
1307
1308
|
/* @__PURE__ */ a(
|
|
@@ -1313,12 +1314,12 @@ function Ma({
|
|
|
1313
1314
|
}
|
|
1314
1315
|
),
|
|
1315
1316
|
/* @__PURE__ */ f("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
1316
|
-
/* @__PURE__ */ a("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children:
|
|
1317
|
-
/* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children:
|
|
1317
|
+
/* @__PURE__ */ a("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: h.label }),
|
|
1318
|
+
/* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: i("booking.serviceSummary", { minutes: h.durationMin }) })
|
|
1318
1319
|
] })
|
|
1319
1320
|
]
|
|
1320
1321
|
},
|
|
1321
|
-
|
|
1322
|
+
h.id
|
|
1322
1323
|
);
|
|
1323
1324
|
})
|
|
1324
1325
|
}
|
|
@@ -1351,23 +1352,23 @@ const Da = Ie(
|
|
|
1351
1352
|
}
|
|
1352
1353
|
);
|
|
1353
1354
|
function Ta(e) {
|
|
1354
|
-
const [t] = e.split(":").map((
|
|
1355
|
+
const [t] = e.split(":").map((i) => parseInt(i, 10)), s = Number.isFinite(t) ? t : 0;
|
|
1355
1356
|
return s < 12 ? "morning" : s < 17 ? "afternoon" : "evening";
|
|
1356
1357
|
}
|
|
1357
1358
|
const _a = {
|
|
1358
1359
|
morning: Dt,
|
|
1359
|
-
afternoon:
|
|
1360
|
+
afternoon: ia,
|
|
1360
1361
|
evening: Mt
|
|
1361
1362
|
};
|
|
1362
1363
|
function tt({
|
|
1363
1364
|
date: e,
|
|
1364
1365
|
slots: t,
|
|
1365
1366
|
selectedSlotKey: s,
|
|
1366
|
-
onSelect:
|
|
1367
|
-
loading:
|
|
1367
|
+
onSelect: i,
|
|
1368
|
+
loading: n,
|
|
1368
1369
|
locale: o
|
|
1369
1370
|
}) {
|
|
1370
|
-
const { t:
|
|
1371
|
+
const { t: c } = T(), l = I(() => {
|
|
1371
1372
|
try {
|
|
1372
1373
|
return new Intl.DateTimeFormat(o, {
|
|
1373
1374
|
weekday: "long",
|
|
@@ -1383,21 +1384,21 @@ function tt({
|
|
|
1383
1384
|
afternoon: [],
|
|
1384
1385
|
evening: []
|
|
1385
1386
|
};
|
|
1386
|
-
for (const
|
|
1387
|
-
u[Ta(
|
|
1387
|
+
for (const x of t)
|
|
1388
|
+
u[Ta(x.time)].push(x);
|
|
1388
1389
|
return u;
|
|
1389
|
-
}, [t]), p = t.filter((u) => u.available).length,
|
|
1390
|
-
return
|
|
1390
|
+
}, [t]), p = t.filter((u) => u.available).length, h = ["morning", "afternoon", "evening"];
|
|
1391
|
+
return n ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1391
1392
|
/* @__PURE__ */ a(Se, { variant: "text", width: "60%" }),
|
|
1392
1393
|
[0, 1].map((u) => /* @__PURE__ */ a(
|
|
1393
1394
|
"div",
|
|
1394
1395
|
{
|
|
1395
1396
|
className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)]",
|
|
1396
|
-
children: [0, 1, 2].map((
|
|
1397
|
+
children: [0, 1, 2].map((x) => /* @__PURE__ */ a(Se, { variant: "rounded", height: "44px" }, x))
|
|
1397
1398
|
},
|
|
1398
1399
|
u
|
|
1399
1400
|
))
|
|
1400
|
-
] }) : p === 0 ? /* @__PURE__ */ a(Ge, { variant: "no-results", title:
|
|
1401
|
+
] }) : p === 0 ? /* @__PURE__ */ a(Ge, { variant: "no-results", title: c("booking.noSlotsForDate") }) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1401
1402
|
/* @__PURE__ */ f("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
1402
1403
|
/* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1403
1404
|
/* @__PURE__ */ a(
|
|
@@ -1407,46 +1408,46 @@ function tt({
|
|
|
1407
1408
|
className: "ds:size-4 ds:text-[color:var(--accent)]"
|
|
1408
1409
|
}
|
|
1409
1410
|
),
|
|
1410
|
-
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
1411
|
+
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: l })
|
|
1411
1412
|
] }),
|
|
1412
|
-
/* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children:
|
|
1413
|
+
/* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: c("booking.slotsAvailable", { count: p }) })
|
|
1413
1414
|
] }),
|
|
1414
|
-
|
|
1415
|
-
const
|
|
1416
|
-
if (
|
|
1417
|
-
const
|
|
1415
|
+
h.map((u) => {
|
|
1416
|
+
const x = d[u];
|
|
1417
|
+
if (x.length === 0) return null;
|
|
1418
|
+
const g = _a[u];
|
|
1418
1419
|
return /* @__PURE__ */ f(
|
|
1419
1420
|
"div",
|
|
1420
1421
|
{
|
|
1421
1422
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
1422
1423
|
children: [
|
|
1423
1424
|
/* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
|
|
1424
|
-
/* @__PURE__ */ a(
|
|
1425
|
-
/* @__PURE__ */ a("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children:
|
|
1425
|
+
/* @__PURE__ */ a(g, { "aria-hidden": "true", className: "ds:size-3.5" }),
|
|
1426
|
+
/* @__PURE__ */ a("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: c(`booking.timeOfDay.${u}`) })
|
|
1426
1427
|
] }),
|
|
1427
1428
|
/* @__PURE__ */ a(
|
|
1428
1429
|
"div",
|
|
1429
1430
|
{
|
|
1430
1431
|
role: "group",
|
|
1431
|
-
"aria-label":
|
|
1432
|
+
"aria-label": c(`booking.timeOfDay.${u}`),
|
|
1432
1433
|
className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-4",
|
|
1433
|
-
children:
|
|
1434
|
-
const y =
|
|
1434
|
+
children: x.map((k) => {
|
|
1435
|
+
const y = k.key === s, w = k.available ? y ? "selected" : "idle" : "unavailable";
|
|
1435
1436
|
return /* @__PURE__ */ a(
|
|
1436
1437
|
"button",
|
|
1437
1438
|
{
|
|
1438
1439
|
type: "button",
|
|
1439
|
-
"data-slot-id":
|
|
1440
|
-
disabled: !
|
|
1440
|
+
"data-slot-id": k.key,
|
|
1441
|
+
disabled: !k.available,
|
|
1441
1442
|
"aria-pressed": y,
|
|
1442
|
-
"aria-label":
|
|
1443
|
-
time:
|
|
1443
|
+
"aria-label": c("booking.slotAvailableLabel", {
|
|
1444
|
+
time: k.time
|
|
1444
1445
|
}),
|
|
1445
|
-
onClick: () =>
|
|
1446
|
-
className: Da({ state:
|
|
1447
|
-
children:
|
|
1446
|
+
onClick: () => k.available && i(k),
|
|
1447
|
+
className: Da({ state: w }),
|
|
1448
|
+
children: k.time
|
|
1448
1449
|
},
|
|
1449
|
-
|
|
1450
|
+
k.key
|
|
1450
1451
|
);
|
|
1451
1452
|
})
|
|
1452
1453
|
}
|
|
@@ -1459,7 +1460,7 @@ function tt({
|
|
|
1459
1460
|
] });
|
|
1460
1461
|
}
|
|
1461
1462
|
function at({ value: e, onChange: t }) {
|
|
1462
|
-
const { t: s } = T(),
|
|
1463
|
+
const { t: s } = T(), i = [
|
|
1463
1464
|
{ value: "private", label: s("booking.insurance.private") },
|
|
1464
1465
|
{ value: "public", label: s("booking.insurance.public") }
|
|
1465
1466
|
];
|
|
@@ -1468,10 +1469,10 @@ function at({ value: e, onChange: t }) {
|
|
|
1468
1469
|
/* @__PURE__ */ a(
|
|
1469
1470
|
we,
|
|
1470
1471
|
{
|
|
1471
|
-
options:
|
|
1472
|
+
options: i,
|
|
1472
1473
|
value: e ?? "",
|
|
1473
|
-
onValueChange: (
|
|
1474
|
-
(
|
|
1474
|
+
onValueChange: (n) => {
|
|
1475
|
+
(n === "private" || n === "public") && t(n);
|
|
1475
1476
|
},
|
|
1476
1477
|
placeholder: s("booking.insurance.placeholder"),
|
|
1477
1478
|
"aria-label": s("booking.insurance.heading")
|
|
@@ -1480,49 +1481,49 @@ function at({ value: e, onChange: t }) {
|
|
|
1480
1481
|
] });
|
|
1481
1482
|
}
|
|
1482
1483
|
function st({ specialties: e, value: t, onChange: s }) {
|
|
1483
|
-
const { t:
|
|
1484
|
+
const { t: i } = T(), n = e.map((o) => ({
|
|
1484
1485
|
value: o.id,
|
|
1485
1486
|
label: o.label
|
|
1486
1487
|
}));
|
|
1487
1488
|
return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1488
|
-
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
1489
|
+
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: i("booking.specialty.heading") }),
|
|
1489
1490
|
/* @__PURE__ */ a(
|
|
1490
1491
|
we,
|
|
1491
1492
|
{
|
|
1492
|
-
options:
|
|
1493
|
+
options: n,
|
|
1493
1494
|
value: t ?? "",
|
|
1494
1495
|
onValueChange: (o) => s(o),
|
|
1495
|
-
placeholder:
|
|
1496
|
-
"aria-label":
|
|
1496
|
+
placeholder: i("booking.specialty.placeholder"),
|
|
1497
|
+
"aria-label": i("booking.specialty.heading")
|
|
1497
1498
|
}
|
|
1498
1499
|
)
|
|
1499
1500
|
] });
|
|
1500
1501
|
}
|
|
1501
|
-
function
|
|
1502
|
-
const { t:
|
|
1503
|
-
if (
|
|
1504
|
-
const o = e.map((
|
|
1505
|
-
value:
|
|
1506
|
-
label: `${
|
|
1507
|
-
minutes:
|
|
1502
|
+
function it({ services: e, value: t, onChange: s, compact: i }) {
|
|
1503
|
+
const { t: n } = T();
|
|
1504
|
+
if (i) {
|
|
1505
|
+
const o = e.map((c) => ({
|
|
1506
|
+
value: c.id,
|
|
1507
|
+
label: `${c.label} · ${n("booking.serviceSummary", {
|
|
1508
|
+
minutes: c.durationMin
|
|
1508
1509
|
})}`
|
|
1509
1510
|
}));
|
|
1510
1511
|
return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1511
|
-
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
1512
|
+
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.service.heading") }),
|
|
1512
1513
|
/* @__PURE__ */ a(
|
|
1513
1514
|
we,
|
|
1514
1515
|
{
|
|
1515
1516
|
options: o,
|
|
1516
1517
|
value: t ?? "",
|
|
1517
|
-
onValueChange: (
|
|
1518
|
-
placeholder:
|
|
1519
|
-
"aria-label":
|
|
1518
|
+
onValueChange: (c) => s(c),
|
|
1519
|
+
placeholder: n("booking.service.placeholder"),
|
|
1520
|
+
"aria-label": n("booking.service.heading")
|
|
1520
1521
|
}
|
|
1521
1522
|
)
|
|
1522
1523
|
] });
|
|
1523
1524
|
}
|
|
1524
1525
|
return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1525
|
-
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
1526
|
+
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.service.heading") }),
|
|
1526
1527
|
/* @__PURE__ */ a(
|
|
1527
1528
|
Ma,
|
|
1528
1529
|
{
|
|
@@ -1533,21 +1534,21 @@ function nt({ services: e, value: t, onChange: s, compact: n }) {
|
|
|
1533
1534
|
)
|
|
1534
1535
|
] });
|
|
1535
1536
|
}
|
|
1536
|
-
function
|
|
1537
|
-
const { t:
|
|
1538
|
-
{ value: he, label:
|
|
1537
|
+
function nt({ operators: e, value: t, onChange: s }) {
|
|
1538
|
+
const { t: i } = T(), n = [
|
|
1539
|
+
{ value: he, label: i("booking.operator.all") },
|
|
1539
1540
|
...e.map((o) => ({ value: o.id, label: o.name }))
|
|
1540
1541
|
];
|
|
1541
1542
|
return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1542
|
-
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
1543
|
+
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: i("booking.operator.heading") }),
|
|
1543
1544
|
/* @__PURE__ */ a(
|
|
1544
1545
|
we,
|
|
1545
1546
|
{
|
|
1546
|
-
options:
|
|
1547
|
+
options: n,
|
|
1547
1548
|
value: t ?? he,
|
|
1548
1549
|
onValueChange: (o) => s(o),
|
|
1549
|
-
placeholder:
|
|
1550
|
-
"aria-label":
|
|
1550
|
+
placeholder: i("booking.operator.placeholder"),
|
|
1551
|
+
"aria-label": i("booking.operator.heading")
|
|
1551
1552
|
}
|
|
1552
1553
|
)
|
|
1553
1554
|
] });
|
|
@@ -1556,9 +1557,9 @@ function ot({
|
|
|
1556
1557
|
customSlot: e
|
|
1557
1558
|
}) {
|
|
1558
1559
|
const { t } = T();
|
|
1559
|
-
return e ? /* @__PURE__ */ a(Z, { children: e }) : /* @__PURE__ */ f(
|
|
1560
|
-
/* @__PURE__ */ a(
|
|
1561
|
-
/* @__PURE__ */ a(
|
|
1560
|
+
return e ? /* @__PURE__ */ a(Z, { children: e }) : /* @__PURE__ */ f(L, { variant: "warning", children: [
|
|
1561
|
+
/* @__PURE__ */ a(L.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
|
|
1562
|
+
/* @__PURE__ */ a(L.Description, { children: t("booking.onboardingIncomplete.description") })
|
|
1562
1563
|
] });
|
|
1563
1564
|
}
|
|
1564
1565
|
function rt({
|
|
@@ -1566,7 +1567,7 @@ function rt({
|
|
|
1566
1567
|
onJump: t,
|
|
1567
1568
|
locale: s
|
|
1568
1569
|
}) {
|
|
1569
|
-
const { t:
|
|
1570
|
+
const { t: i } = T(), n = I(() => {
|
|
1570
1571
|
try {
|
|
1571
1572
|
return new Intl.DateTimeFormat(s, { dateStyle: "long" }).format(
|
|
1572
1573
|
ee(e)
|
|
@@ -1575,30 +1576,30 @@ function rt({
|
|
|
1575
1576
|
return e;
|
|
1576
1577
|
}
|
|
1577
1578
|
}, [e, s]);
|
|
1578
|
-
return /* @__PURE__ */ f(
|
|
1579
|
-
/* @__PURE__ */ a(
|
|
1580
|
-
/* @__PURE__ */ a(
|
|
1579
|
+
return /* @__PURE__ */ f(L, { variant: "info", children: [
|
|
1580
|
+
/* @__PURE__ */ a(L.Description, { children: i("booking.nextAvailable.description", { date: n }) }),
|
|
1581
|
+
/* @__PURE__ */ a(L.Action, { children: /* @__PURE__ */ a(se, { intent: "secondary", size: "sm", onClick: t, children: i("booking.nextAvailable.cta") }) })
|
|
1581
1582
|
] });
|
|
1582
1583
|
}
|
|
1583
1584
|
function Aa({
|
|
1584
1585
|
snapshot: e,
|
|
1585
1586
|
operators: t,
|
|
1586
1587
|
specialties: s,
|
|
1587
|
-
services:
|
|
1588
|
-
locale:
|
|
1588
|
+
services: i,
|
|
1589
|
+
locale: n,
|
|
1589
1590
|
mode: o,
|
|
1590
|
-
showModify:
|
|
1591
|
-
onReset:
|
|
1591
|
+
showModify: c,
|
|
1592
|
+
onReset: l,
|
|
1592
1593
|
onModify: d
|
|
1593
1594
|
}) {
|
|
1594
1595
|
const { t: p } = T(), u = (e.details.confirmationChannels ?? ["email"]).map(
|
|
1595
1596
|
(A) => p(`booking.confirmation.channel.${A}`)
|
|
1596
|
-
),
|
|
1597
|
+
), x = o === "demo" ? p("booking.success.descriptionDemo") : u.length > 1 ? p("booking.success.descriptionMultiple", {
|
|
1597
1598
|
channels: u.join(" · ")
|
|
1598
|
-
}) : p("booking.success.descriptionSingle", { channel: u[0] }),
|
|
1599
|
+
}) : p("booking.success.descriptionSingle", { channel: u[0] }), g = I(() => {
|
|
1599
1600
|
if (e.date)
|
|
1600
1601
|
try {
|
|
1601
|
-
return new Intl.DateTimeFormat(
|
|
1602
|
+
return new Intl.DateTimeFormat(n, {
|
|
1602
1603
|
weekday: "long",
|
|
1603
1604
|
day: "numeric",
|
|
1604
1605
|
month: "long"
|
|
@@ -1606,40 +1607,40 @@ function Aa({
|
|
|
1606
1607
|
} catch {
|
|
1607
1608
|
return e.date;
|
|
1608
1609
|
}
|
|
1609
|
-
}, [e.date,
|
|
1610
|
+
}, [e.date, n]), k = e.operatorId ? t.find((A) => A.id === e.operatorId) : void 0, y = e.specialtyId ? s.find((A) => A.id === e.specialtyId) : void 0, w = e.serviceId ? i.find((A) => A.id === e.serviceId) : void 0;
|
|
1610
1611
|
return /* @__PURE__ */ f(
|
|
1611
1612
|
"div",
|
|
1612
1613
|
{
|
|
1613
1614
|
"data-component": "booking-success",
|
|
1614
1615
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
1615
1616
|
children: [
|
|
1616
|
-
/* @__PURE__ */ f(
|
|
1617
|
-
/* @__PURE__ */ a(
|
|
1618
|
-
/* @__PURE__ */ a(
|
|
1617
|
+
/* @__PURE__ */ f(L, { variant: "success", children: [
|
|
1618
|
+
/* @__PURE__ */ a(L.Title, { as: "h3", children: p("booking.success.heading") }),
|
|
1619
|
+
/* @__PURE__ */ a(L.Description, { children: x })
|
|
1619
1620
|
] }),
|
|
1620
1621
|
/* @__PURE__ */ a("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ f("dl", { className: "ds:grid ds:grid-cols-[auto_minmax(0,1fr)] ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] ds:m-0", children: [
|
|
1621
1622
|
y ? /* @__PURE__ */ f(Z, { children: [
|
|
1622
1623
|
/* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summarySpecialty") }),
|
|
1623
1624
|
/* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: y.label })
|
|
1624
1625
|
] }) : null,
|
|
1625
|
-
|
|
1626
|
+
w ? /* @__PURE__ */ f(Z, { children: [
|
|
1626
1627
|
/* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryService") }),
|
|
1627
|
-
/* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children:
|
|
1628
|
+
/* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: w.label })
|
|
1628
1629
|
] }) : null,
|
|
1629
|
-
|
|
1630
|
+
g ? /* @__PURE__ */ f(Z, { children: [
|
|
1630
1631
|
/* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryDate") }),
|
|
1631
|
-
/* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children:
|
|
1632
|
+
/* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: g })
|
|
1632
1633
|
] }) : null,
|
|
1633
1634
|
/* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryTime") }),
|
|
1634
1635
|
/* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: e.slot.time }),
|
|
1635
|
-
|
|
1636
|
+
k ? /* @__PURE__ */ f(Z, { children: [
|
|
1636
1637
|
/* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryProvider") }),
|
|
1637
|
-
/* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children:
|
|
1638
|
+
/* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: k.name })
|
|
1638
1639
|
] }) : null
|
|
1639
1640
|
] }) }),
|
|
1640
1641
|
/* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
1641
|
-
/* @__PURE__ */ a(se, { intent: "secondary", size: "md", onClick:
|
|
1642
|
-
|
|
1642
|
+
/* @__PURE__ */ a(se, { intent: "secondary", size: "md", onClick: l, children: p("booking.success.bookAnother") }),
|
|
1643
|
+
c ? /* @__PURE__ */ a(se, { intent: "ghost", size: "md", onClick: d, children: p("booking.success.modifyBooking") }) : null
|
|
1643
1644
|
] })
|
|
1644
1645
|
]
|
|
1645
1646
|
}
|
|
@@ -1660,80 +1661,80 @@ function Ba(e) {
|
|
|
1660
1661
|
const {
|
|
1661
1662
|
cascade: t,
|
|
1662
1663
|
inputs: s,
|
|
1663
|
-
value:
|
|
1664
|
-
onChange:
|
|
1664
|
+
value: i,
|
|
1665
|
+
onChange: n,
|
|
1665
1666
|
onSubmit: o,
|
|
1666
|
-
emptyServicesSlot:
|
|
1667
|
-
onboardingIncompleteSlot:
|
|
1667
|
+
emptyServicesSlot: c,
|
|
1668
|
+
onboardingIncompleteSlot: l,
|
|
1668
1669
|
loadingSlots: d,
|
|
1669
1670
|
submitting: p,
|
|
1670
|
-
locale:
|
|
1671
|
+
locale: h,
|
|
1671
1672
|
detailsProps: u
|
|
1672
|
-
} = e, { t:
|
|
1673
|
+
} = e, { t: x } = T();
|
|
1673
1674
|
return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1674
1675
|
t.gates.insurance ? /* @__PURE__ */ a(
|
|
1675
1676
|
at,
|
|
1676
1677
|
{
|
|
1677
|
-
value:
|
|
1678
|
-
onChange: (
|
|
1678
|
+
value: i.insuranceType,
|
|
1679
|
+
onChange: (g) => n(Ye(i, g))
|
|
1679
1680
|
}
|
|
1680
1681
|
) : null,
|
|
1681
1682
|
t.gates.specialty ? /* @__PURE__ */ a(
|
|
1682
1683
|
st,
|
|
1683
1684
|
{
|
|
1684
1685
|
specialties: t.filtered.specialties,
|
|
1685
|
-
value:
|
|
1686
|
-
onChange: (
|
|
1686
|
+
value: i.specialtyId,
|
|
1687
|
+
onChange: (g) => n(Ze(i, g))
|
|
1687
1688
|
}
|
|
1688
1689
|
) : null,
|
|
1689
|
-
t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ a(dt, { customSlot:
|
|
1690
|
-
|
|
1690
|
+
t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ a(dt, { customSlot: c }) : /* @__PURE__ */ a(
|
|
1691
|
+
it,
|
|
1691
1692
|
{
|
|
1692
1693
|
services: t.filtered.services,
|
|
1693
|
-
value:
|
|
1694
|
-
onChange: (
|
|
1694
|
+
value: i.serviceId,
|
|
1695
|
+
onChange: (g) => n(Je(i, g))
|
|
1695
1696
|
}
|
|
1696
1697
|
) : null,
|
|
1697
|
-
t.gates.onboardingIncomplete ? /* @__PURE__ */ a(ot, { customSlot:
|
|
1698
|
+
t.gates.onboardingIncomplete ? /* @__PURE__ */ a(ot, { customSlot: l }) : null,
|
|
1698
1699
|
t.gates.operator ? /* @__PURE__ */ a(
|
|
1699
|
-
|
|
1700
|
+
nt,
|
|
1700
1701
|
{
|
|
1701
1702
|
operators: t.filtered.operators,
|
|
1702
|
-
value:
|
|
1703
|
-
onChange: (
|
|
1703
|
+
value: i.operatorId,
|
|
1704
|
+
onChange: (g) => n(Xe(i, g))
|
|
1704
1705
|
}
|
|
1705
1706
|
) : null,
|
|
1706
1707
|
t.gates.date ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1707
|
-
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
1708
|
+
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: x("booking.date.heading") }),
|
|
1708
1709
|
s.availableDates.length === 0 && s.nextAvailableDate ? /* @__PURE__ */ a(
|
|
1709
1710
|
rt,
|
|
1710
1711
|
{
|
|
1711
1712
|
nextAvailableDate: s.nextAvailableDate,
|
|
1712
|
-
onJump: () =>
|
|
1713
|
-
locale:
|
|
1713
|
+
onJump: () => n(Ne(i, s.nextAvailableDate)),
|
|
1714
|
+
locale: h
|
|
1714
1715
|
}
|
|
1715
1716
|
) : /* @__PURE__ */ a(
|
|
1716
1717
|
et,
|
|
1717
1718
|
{
|
|
1718
1719
|
availableDates: s.availableDates,
|
|
1719
|
-
selectedDate:
|
|
1720
|
-
onSelectDate: (
|
|
1721
|
-
locale:
|
|
1720
|
+
selectedDate: i.date,
|
|
1721
|
+
onSelectDate: (g) => n(Ne(i, g)),
|
|
1722
|
+
locale: h,
|
|
1722
1723
|
loading: d
|
|
1723
1724
|
}
|
|
1724
1725
|
)
|
|
1725
1726
|
] }) : null,
|
|
1726
|
-
t.gates.slot &&
|
|
1727
|
-
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
1727
|
+
t.gates.slot && i.date ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1728
|
+
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: x("booking.slot.heading") }),
|
|
1728
1729
|
/* @__PURE__ */ a(
|
|
1729
1730
|
tt,
|
|
1730
1731
|
{
|
|
1731
|
-
date:
|
|
1732
|
-
slots: s.availableSlots[
|
|
1733
|
-
selectedSlotKey:
|
|
1734
|
-
onSelect: (
|
|
1732
|
+
date: i.date,
|
|
1733
|
+
slots: s.availableSlots[i.date] ?? [],
|
|
1734
|
+
selectedSlotKey: i.slotKey,
|
|
1735
|
+
onSelect: (g) => n(We(i, g.key)),
|
|
1735
1736
|
loading: d,
|
|
1736
|
-
locale:
|
|
1737
|
+
locale: h
|
|
1737
1738
|
}
|
|
1738
1739
|
)
|
|
1739
1740
|
] }) : null,
|
|
@@ -1741,8 +1742,8 @@ function Ba(e) {
|
|
|
1741
1742
|
Pe,
|
|
1742
1743
|
{
|
|
1743
1744
|
...u,
|
|
1744
|
-
value:
|
|
1745
|
-
onChange: (
|
|
1745
|
+
value: i.details ?? {},
|
|
1746
|
+
onChange: (g) => n({ ...i, details: g }),
|
|
1746
1747
|
onSubmit: o,
|
|
1747
1748
|
submitting: p,
|
|
1748
1749
|
defaultPhoneCountry: e.policy.country
|
|
@@ -1752,18 +1753,18 @@ function Ba(e) {
|
|
|
1752
1753
|
}
|
|
1753
1754
|
function K(e, t, s = {}) {
|
|
1754
1755
|
const {
|
|
1755
|
-
cascade:
|
|
1756
|
-
inputs:
|
|
1756
|
+
cascade: i,
|
|
1757
|
+
inputs: n,
|
|
1757
1758
|
value: o,
|
|
1758
|
-
onChange:
|
|
1759
|
-
onSubmit:
|
|
1759
|
+
onChange: c,
|
|
1760
|
+
onSubmit: l,
|
|
1760
1761
|
emptyServicesSlot: d,
|
|
1761
1762
|
onboardingIncompleteSlot: p,
|
|
1762
|
-
loadingSlots:
|
|
1763
|
+
loadingSlots: h,
|
|
1763
1764
|
submitting: u,
|
|
1764
|
-
locale:
|
|
1765
|
-
detailsProps:
|
|
1766
|
-
policy:
|
|
1765
|
+
locale: x,
|
|
1766
|
+
detailsProps: g,
|
|
1767
|
+
policy: k
|
|
1767
1768
|
} = t;
|
|
1768
1769
|
switch (e) {
|
|
1769
1770
|
case 1:
|
|
@@ -1771,53 +1772,53 @@ function K(e, t, s = {}) {
|
|
|
1771
1772
|
at,
|
|
1772
1773
|
{
|
|
1773
1774
|
value: o.insuranceType,
|
|
1774
|
-
onChange: (y) =>
|
|
1775
|
+
onChange: (y) => c(Ye(o, y))
|
|
1775
1776
|
}
|
|
1776
1777
|
);
|
|
1777
1778
|
case 2:
|
|
1778
1779
|
return /* @__PURE__ */ a(
|
|
1779
1780
|
st,
|
|
1780
1781
|
{
|
|
1781
|
-
specialties:
|
|
1782
|
+
specialties: i.filtered.specialties,
|
|
1782
1783
|
value: o.specialtyId,
|
|
1783
|
-
onChange: (y) =>
|
|
1784
|
+
onChange: (y) => c(Ze(o, y))
|
|
1784
1785
|
}
|
|
1785
1786
|
);
|
|
1786
1787
|
case 3:
|
|
1787
|
-
return
|
|
1788
|
-
|
|
1788
|
+
return i.filtered.services.length === 0 ? /* @__PURE__ */ a(dt, { customSlot: d }) : i.gates.onboardingIncomplete ? /* @__PURE__ */ a(ot, { customSlot: p }) : /* @__PURE__ */ a(
|
|
1789
|
+
it,
|
|
1789
1790
|
{
|
|
1790
|
-
services:
|
|
1791
|
+
services: i.filtered.services,
|
|
1791
1792
|
value: o.serviceId,
|
|
1792
|
-
onChange: (y) =>
|
|
1793
|
+
onChange: (y) => c(Je(o, y)),
|
|
1793
1794
|
compact: s.compactService
|
|
1794
1795
|
}
|
|
1795
1796
|
);
|
|
1796
1797
|
case 4:
|
|
1797
1798
|
return /* @__PURE__ */ a(
|
|
1798
|
-
|
|
1799
|
+
nt,
|
|
1799
1800
|
{
|
|
1800
|
-
operators:
|
|
1801
|
+
operators: i.filtered.operators,
|
|
1801
1802
|
value: o.operatorId,
|
|
1802
|
-
onChange: (y) =>
|
|
1803
|
+
onChange: (y) => c(Xe(o, y))
|
|
1803
1804
|
}
|
|
1804
1805
|
);
|
|
1805
1806
|
case 5:
|
|
1806
|
-
return
|
|
1807
|
+
return n.availableDates.length === 0 && n.nextAvailableDate ? /* @__PURE__ */ a(
|
|
1807
1808
|
rt,
|
|
1808
1809
|
{
|
|
1809
|
-
nextAvailableDate:
|
|
1810
|
-
onJump: () =>
|
|
1811
|
-
locale:
|
|
1810
|
+
nextAvailableDate: n.nextAvailableDate,
|
|
1811
|
+
onJump: () => c(Ne(o, n.nextAvailableDate)),
|
|
1812
|
+
locale: x
|
|
1812
1813
|
}
|
|
1813
1814
|
) : /* @__PURE__ */ a(
|
|
1814
1815
|
et,
|
|
1815
1816
|
{
|
|
1816
|
-
availableDates:
|
|
1817
|
+
availableDates: n.availableDates,
|
|
1817
1818
|
selectedDate: o.date,
|
|
1818
|
-
onSelectDate: (y) =>
|
|
1819
|
-
locale:
|
|
1820
|
-
loading:
|
|
1819
|
+
onSelectDate: (y) => c(Ne(o, y)),
|
|
1820
|
+
locale: x,
|
|
1821
|
+
loading: h
|
|
1821
1822
|
}
|
|
1822
1823
|
);
|
|
1823
1824
|
case 6:
|
|
@@ -1825,23 +1826,23 @@ function K(e, t, s = {}) {
|
|
|
1825
1826
|
tt,
|
|
1826
1827
|
{
|
|
1827
1828
|
date: o.date,
|
|
1828
|
-
slots:
|
|
1829
|
+
slots: n.availableSlots[o.date] ?? [],
|
|
1829
1830
|
selectedSlotKey: o.slotKey,
|
|
1830
|
-
onSelect: (y) =>
|
|
1831
|
-
loading:
|
|
1832
|
-
locale:
|
|
1831
|
+
onSelect: (y) => c(We(o, y.key)),
|
|
1832
|
+
loading: h,
|
|
1833
|
+
locale: x
|
|
1833
1834
|
}
|
|
1834
1835
|
) : null;
|
|
1835
1836
|
case 7:
|
|
1836
|
-
return
|
|
1837
|
+
return i.selectedSlot ? /* @__PURE__ */ a(
|
|
1837
1838
|
Pe,
|
|
1838
1839
|
{
|
|
1839
|
-
...
|
|
1840
|
+
...g,
|
|
1840
1841
|
value: o.details ?? {},
|
|
1841
|
-
onChange: (y) =>
|
|
1842
|
-
onSubmit:
|
|
1842
|
+
onChange: (y) => c({ ...o, details: y }),
|
|
1843
|
+
onSubmit: l,
|
|
1843
1844
|
submitting: u,
|
|
1844
|
-
defaultPhoneCountry:
|
|
1845
|
+
defaultPhoneCountry: k.country
|
|
1845
1846
|
}
|
|
1846
1847
|
) : null;
|
|
1847
1848
|
/* c8 ignore next 2 */
|
|
@@ -1865,7 +1866,7 @@ function Ve() {
|
|
|
1865
1866
|
);
|
|
1866
1867
|
}
|
|
1867
1868
|
function Oa(e) {
|
|
1868
|
-
const { cascade: t, value: s, activeStep:
|
|
1869
|
+
const { cascade: t, value: s, activeStep: i, setActiveStep: n } = e, o = Ve(), c = I(
|
|
1869
1870
|
() => t.visibleSteps.map((d) => ({
|
|
1870
1871
|
label: o[d],
|
|
1871
1872
|
summary: lt(d, s, t),
|
|
@@ -1873,15 +1874,15 @@ function Oa(e) {
|
|
|
1873
1874
|
content: K(d, e, { compactService: !0 })
|
|
1874
1875
|
})),
|
|
1875
1876
|
[t, s, o, e]
|
|
1876
|
-
),
|
|
1877
|
+
), l = Math.max(0, t.visibleSteps.indexOf(i));
|
|
1877
1878
|
return /* @__PURE__ */ a(
|
|
1878
1879
|
St,
|
|
1879
1880
|
{
|
|
1880
|
-
activeStep:
|
|
1881
|
-
steps:
|
|
1881
|
+
activeStep: l,
|
|
1882
|
+
steps: c,
|
|
1882
1883
|
onStepChange: (d) => {
|
|
1883
1884
|
const p = t.visibleSteps[d];
|
|
1884
|
-
p &&
|
|
1885
|
+
p && n(p);
|
|
1885
1886
|
}
|
|
1886
1887
|
}
|
|
1887
1888
|
);
|
|
@@ -1905,58 +1906,58 @@ function ve(e, t) {
|
|
|
1905
1906
|
}
|
|
1906
1907
|
}
|
|
1907
1908
|
function lt(e, t, s) {
|
|
1908
|
-
var
|
|
1909
|
+
var i;
|
|
1909
1910
|
if (ve(e, t))
|
|
1910
1911
|
switch (e) {
|
|
1911
1912
|
case 1:
|
|
1912
1913
|
return t.insuranceType;
|
|
1913
1914
|
case 2: {
|
|
1914
|
-
const
|
|
1915
|
+
const n = s.filtered.specialties.find(
|
|
1915
1916
|
(o) => o.id === t.specialtyId
|
|
1916
1917
|
);
|
|
1917
|
-
return
|
|
1918
|
+
return n == null ? void 0 : n.label;
|
|
1918
1919
|
}
|
|
1919
1920
|
case 3: {
|
|
1920
|
-
const
|
|
1921
|
+
const n = s.filtered.services.find(
|
|
1921
1922
|
(o) => o.id === t.serviceId
|
|
1922
1923
|
);
|
|
1923
|
-
return
|
|
1924
|
+
return n == null ? void 0 : n.label;
|
|
1924
1925
|
}
|
|
1925
1926
|
case 4: {
|
|
1926
|
-
const
|
|
1927
|
-
if (!
|
|
1928
|
-
const o = s.filtered.operators.find((
|
|
1927
|
+
const n = Ee(t);
|
|
1928
|
+
if (!n) return;
|
|
1929
|
+
const o = s.filtered.operators.find((c) => c.id === n);
|
|
1929
1930
|
return o == null ? void 0 : o.name;
|
|
1930
1931
|
}
|
|
1931
1932
|
case 5:
|
|
1932
1933
|
return t.date;
|
|
1933
1934
|
case 6:
|
|
1934
|
-
return (
|
|
1935
|
+
return (i = s.selectedSlot) == null ? void 0 : i.time;
|
|
1935
1936
|
case 7:
|
|
1936
1937
|
return;
|
|
1937
1938
|
}
|
|
1938
1939
|
}
|
|
1939
1940
|
function Ea(e) {
|
|
1940
|
-
const { cascade: t, value: s, setActiveStep:
|
|
1941
|
+
const { cascade: t, value: s, setActiveStep: i } = e, { t: n } = T(), o = Ve(), c = t.visibleSteps.filter(
|
|
1941
1942
|
(d) => d === 1 || d === 2 || d === 3 || d === 4
|
|
1942
|
-
),
|
|
1943
|
+
), l = c.some(
|
|
1943
1944
|
(d) => !ve(d, s)
|
|
1944
1945
|
);
|
|
1945
1946
|
return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1946
|
-
|
|
1947
|
+
l ? c.filter((d) => !ve(d, s)).slice(0, 1).map((d) => /* @__PURE__ */ a("div", { children: K(d, e, { compactService: !0 }) }, `csf-${d}`)) : /* @__PURE__ */ a(
|
|
1947
1948
|
"div",
|
|
1948
1949
|
{
|
|
1949
1950
|
role: "group",
|
|
1950
|
-
"aria-label":
|
|
1951
|
+
"aria-label": n("booking.regionLabel"),
|
|
1951
1952
|
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
1952
|
-
children:
|
|
1953
|
+
children: c.map((d) => {
|
|
1953
1954
|
const p = lt(d, s, t);
|
|
1954
1955
|
return p ? /* @__PURE__ */ f(
|
|
1955
1956
|
se,
|
|
1956
1957
|
{
|
|
1957
1958
|
intent: "tonal",
|
|
1958
1959
|
size: "sm",
|
|
1959
|
-
onClick: () =>
|
|
1960
|
+
onClick: () => i(d),
|
|
1960
1961
|
children: [
|
|
1961
1962
|
o[d],
|
|
1962
1963
|
": ",
|
|
@@ -1968,7 +1969,7 @@ function Ea(e) {
|
|
|
1968
1969
|
})
|
|
1969
1970
|
}
|
|
1970
1971
|
),
|
|
1971
|
-
!
|
|
1972
|
+
!l && t.gates.date ? /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
|
|
1972
1973
|
/* @__PURE__ */ a("div", { className: "ds:min-w-0", children: K(5, e) }),
|
|
1973
1974
|
/* @__PURE__ */ a("div", { className: "ds:min-w-0", children: s.date ? K(6, e) : null })
|
|
1974
1975
|
] }) : null,
|
|
@@ -1977,11 +1978,11 @@ function Ea(e) {
|
|
|
1977
1978
|
}
|
|
1978
1979
|
function Pa(e) {
|
|
1979
1980
|
const { cascade: t } = e, s = t.visibleSteps.filter(
|
|
1980
|
-
(
|
|
1981
|
+
(i) => i === 1 || i === 2 || i === 3 || i === 4
|
|
1981
1982
|
);
|
|
1982
1983
|
return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1983
1984
|
/* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
|
|
1984
|
-
/* @__PURE__ */ a("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: s.map((
|
|
1985
|
+
/* @__PURE__ */ a("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: s.map((i) => /* @__PURE__ */ a("div", { children: K(i, e, { compactService: !0 }) }, `fbf-${i}`)) }),
|
|
1985
1986
|
/* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1986
1987
|
t.gates.date ? K(5, e) : null,
|
|
1987
1988
|
t.gates.slot && e.value.date ? K(6, e) : null
|
|
@@ -1991,13 +1992,13 @@ function Pa(e) {
|
|
|
1991
1992
|
] });
|
|
1992
1993
|
}
|
|
1993
1994
|
function Va(e) {
|
|
1994
|
-
const { cascade: t, value: s, activeStep:
|
|
1995
|
-
() =>
|
|
1996
|
-
[
|
|
1997
|
-
), u = d > 0,
|
|
1995
|
+
const { cascade: t, value: s, activeStep: i, setActiveStep: n } = e, { t: o } = T(), c = Ve(), l = t.visibleSteps, d = Math.max(0, l.indexOf(i)), p = l.length, h = I(
|
|
1996
|
+
() => l.map((g) => ({ label: c[g] })),
|
|
1997
|
+
[l, c]
|
|
1998
|
+
), u = d > 0, x = d < p - 1 && ve(i, s);
|
|
1998
1999
|
return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1999
|
-
/* @__PURE__ */ a(Nt, { activeStep: d, steps:
|
|
2000
|
-
/* @__PURE__ */ a("div", { children: K(
|
|
2000
|
+
/* @__PURE__ */ a(Nt, { activeStep: d, steps: h }),
|
|
2001
|
+
/* @__PURE__ */ a("div", { children: K(i, e, { compactService: !0 }) }),
|
|
2001
2002
|
/* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
2002
2003
|
/* @__PURE__ */ a(
|
|
2003
2004
|
se,
|
|
@@ -2006,21 +2007,21 @@ function Va(e) {
|
|
|
2006
2007
|
size: "md",
|
|
2007
2008
|
disabled: !u,
|
|
2008
2009
|
onClick: () => {
|
|
2009
|
-
const
|
|
2010
|
-
|
|
2010
|
+
const g = l[d - 1];
|
|
2011
|
+
g && n(g);
|
|
2011
2012
|
},
|
|
2012
2013
|
children: o("booking.actions.back")
|
|
2013
2014
|
}
|
|
2014
2015
|
),
|
|
2015
|
-
|
|
2016
|
+
i < 7 ? /* @__PURE__ */ a(
|
|
2016
2017
|
se,
|
|
2017
2018
|
{
|
|
2018
2019
|
intent: "primary",
|
|
2019
2020
|
size: "md",
|
|
2020
|
-
disabled: !
|
|
2021
|
+
disabled: !x,
|
|
2021
2022
|
onClick: () => {
|
|
2022
|
-
const
|
|
2023
|
-
|
|
2023
|
+
const g = l[d + 1];
|
|
2024
|
+
g && n(g);
|
|
2024
2025
|
},
|
|
2025
2026
|
children: o("booking.actions.next")
|
|
2026
2027
|
}
|
|
@@ -2028,25 +2029,28 @@ function Va(e) {
|
|
|
2028
2029
|
] })
|
|
2029
2030
|
] });
|
|
2030
2031
|
}
|
|
2031
|
-
const
|
|
2032
|
+
const Ra = [], La = [], Fa = qe(
|
|
2032
2033
|
({
|
|
2033
2034
|
variant: e = "inline-list",
|
|
2034
2035
|
country: t,
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2036
|
+
// No default — the cascade engine treats `undefined` as "auto-on
|
|
2037
|
+
// when `specialties` has items" so consumers who pass specialty
|
|
2038
|
+
// data without the explicit flag still get the step.
|
|
2039
|
+
useSpecialties: s,
|
|
2040
|
+
allowOperatorSelection: i = !1,
|
|
2041
|
+
lockedOperatorId: n,
|
|
2038
2042
|
autoSelectSingleService: o = !1,
|
|
2039
|
-
specialties:
|
|
2040
|
-
services:
|
|
2043
|
+
specialties: c,
|
|
2044
|
+
services: l,
|
|
2041
2045
|
operators: d,
|
|
2042
2046
|
availableDates: p,
|
|
2043
|
-
availableSlots:
|
|
2047
|
+
availableSlots: h,
|
|
2044
2048
|
nextAvailableDate: u,
|
|
2045
|
-
requireCodiceFiscale:
|
|
2046
|
-
requireDateOfBirth:
|
|
2047
|
-
requireInsuranceNumber:
|
|
2049
|
+
requireCodiceFiscale: x,
|
|
2050
|
+
requireDateOfBirth: g,
|
|
2051
|
+
requireInsuranceNumber: k,
|
|
2048
2052
|
showNote: y,
|
|
2049
|
-
showReturningPatientFlag:
|
|
2053
|
+
showReturningPatientFlag: w,
|
|
2050
2054
|
privacyPolicyUrl: A,
|
|
2051
2055
|
termsUrl: S,
|
|
2052
2056
|
validateCodiceFiscale: v,
|
|
@@ -2055,86 +2059,86 @@ const La = [], Fa = [], Ra = qe(
|
|
|
2055
2059
|
defaultConfirmationChannels: M,
|
|
2056
2060
|
value: b,
|
|
2057
2061
|
onChange: N,
|
|
2058
|
-
onSubmit:
|
|
2062
|
+
onSubmit: F,
|
|
2059
2063
|
onStepChange: B,
|
|
2060
2064
|
loadingSlots: J,
|
|
2061
2065
|
submitting: P,
|
|
2062
2066
|
submitError: z,
|
|
2063
2067
|
mode: G = "live",
|
|
2064
2068
|
showModifyOnSuccess: D = !0,
|
|
2065
|
-
surface:
|
|
2069
|
+
surface: ie = "flat",
|
|
2066
2070
|
emptyServicesSlot: j,
|
|
2067
2071
|
onboardingIncompleteSlot: oe,
|
|
2068
|
-
"aria-label":
|
|
2072
|
+
"aria-label": ne,
|
|
2069
2073
|
id: re,
|
|
2070
2074
|
className: X,
|
|
2071
2075
|
...de
|
|
2072
2076
|
}, le) => {
|
|
2073
|
-
const { t: ce, i18n: Ce } = T(), V = e ?? "inline-list", W = Ce.language ?? "en", $ =
|
|
2077
|
+
const { t: ce, i18n: Ce } = T(), V = e ?? "inline-list", W = Ce.language ?? "en", $ = c ?? Ra, q = d ?? La;
|
|
2074
2078
|
Q(() => {
|
|
2075
|
-
const
|
|
2079
|
+
const R = fa(b, {
|
|
2076
2080
|
useSpecialties: s,
|
|
2077
|
-
lockedOperatorId:
|
|
2081
|
+
lockedOperatorId: n,
|
|
2078
2082
|
autoSelectSingleService: o,
|
|
2079
2083
|
specialties: $,
|
|
2080
|
-
services:
|
|
2084
|
+
services: l
|
|
2081
2085
|
});
|
|
2082
|
-
(
|
|
2086
|
+
(R.specialtyId !== b.specialtyId || R.operatorId !== b.operatorId || R.serviceId !== b.serviceId) && N(R);
|
|
2083
2087
|
}, [
|
|
2084
|
-
|
|
2088
|
+
n,
|
|
2085
2089
|
s,
|
|
2086
2090
|
o,
|
|
2087
2091
|
$,
|
|
2088
|
-
|
|
2092
|
+
l
|
|
2089
2093
|
]);
|
|
2090
2094
|
const _ = I(
|
|
2091
2095
|
() => ga({
|
|
2092
2096
|
country: t,
|
|
2093
2097
|
useSpecialties: s,
|
|
2094
|
-
allowOperatorSelection:
|
|
2095
|
-
lockedOperatorId:
|
|
2098
|
+
allowOperatorSelection: i,
|
|
2099
|
+
lockedOperatorId: n,
|
|
2096
2100
|
specialties: $,
|
|
2097
|
-
services:
|
|
2101
|
+
services: l,
|
|
2098
2102
|
operators: q,
|
|
2099
|
-
availableSlots:
|
|
2103
|
+
availableSlots: h,
|
|
2100
2104
|
value: b
|
|
2101
2105
|
}),
|
|
2102
2106
|
[
|
|
2103
2107
|
t,
|
|
2104
2108
|
s,
|
|
2105
|
-
n,
|
|
2106
2109
|
i,
|
|
2110
|
+
n,
|
|
2107
2111
|
o,
|
|
2108
2112
|
$,
|
|
2109
|
-
|
|
2113
|
+
l,
|
|
2110
2114
|
q,
|
|
2111
2115
|
p,
|
|
2112
|
-
|
|
2116
|
+
h,
|
|
2113
2117
|
b
|
|
2114
2118
|
]
|
|
2115
2119
|
), [me, m] = H(
|
|
2116
2120
|
_.currentStep
|
|
2117
|
-
),
|
|
2121
|
+
), C = te(_.currentStep);
|
|
2118
2122
|
Q(() => {
|
|
2119
|
-
_.currentStep >
|
|
2123
|
+
_.currentStep > C.current && m(_.currentStep), C.current = _.currentStep;
|
|
2120
2124
|
}, [_.currentStep]);
|
|
2121
|
-
const [U, ue] = H("idle"), [Me, De] = H(null),
|
|
2122
|
-
async (
|
|
2125
|
+
const [U, ue] = H("idle"), [Me, De] = H(null), Re = ae(
|
|
2126
|
+
async (R) => {
|
|
2123
2127
|
if (!_.selectedSlot) return;
|
|
2124
2128
|
const _e = {
|
|
2125
2129
|
slot: _.selectedSlot,
|
|
2126
2130
|
value: {
|
|
2127
2131
|
...b,
|
|
2128
|
-
details:
|
|
2132
|
+
details: R,
|
|
2129
2133
|
operatorId: Ee(b) ?? b.operatorId
|
|
2130
2134
|
},
|
|
2131
|
-
details:
|
|
2135
|
+
details: R
|
|
2132
2136
|
};
|
|
2133
2137
|
ue("submitting");
|
|
2134
2138
|
try {
|
|
2135
|
-
await
|
|
2139
|
+
await F(_e), De({
|
|
2136
2140
|
slot: _.selectedSlot,
|
|
2137
|
-
details:
|
|
2141
|
+
details: R,
|
|
2138
2142
|
specialtyId: b.specialtyId,
|
|
2139
2143
|
serviceId: b.serviceId,
|
|
2140
2144
|
insuranceType: b.insuranceType,
|
|
@@ -2145,12 +2149,12 @@ const La = [], Fa = [], Ra = qe(
|
|
|
2145
2149
|
throw ue("error"), new Error("Booking submission failed");
|
|
2146
2150
|
}
|
|
2147
2151
|
},
|
|
2148
|
-
[_.selectedSlot,
|
|
2152
|
+
[_.selectedSlot, F, b]
|
|
2149
2153
|
), pe = te(null);
|
|
2150
2154
|
pt(le, () => pe.current, []);
|
|
2151
|
-
const ge = U === "success" ? 8 : _.currentStep,
|
|
2155
|
+
const ge = U === "success" ? 8 : _.currentStep, Le = te(null);
|
|
2152
2156
|
Q(() => {
|
|
2153
|
-
if (ge !==
|
|
2157
|
+
if (ge !== Le.current && (Le.current = ge, B == null || B(ge), ge === 8 && pe.current))
|
|
2154
2158
|
try {
|
|
2155
2159
|
pe.current.scrollIntoView({
|
|
2156
2160
|
behavior: "smooth",
|
|
@@ -2166,20 +2170,20 @@ const La = [], Fa = [], Ra = qe(
|
|
|
2166
2170
|
reset: () => {
|
|
2167
2171
|
N({}), De(null), ue("idle"), m(1);
|
|
2168
2172
|
},
|
|
2169
|
-
goToStep: (
|
|
2170
|
-
m(
|
|
2173
|
+
goToStep: (R) => {
|
|
2174
|
+
m(R);
|
|
2171
2175
|
}
|
|
2172
2176
|
}),
|
|
2173
2177
|
[V, N]
|
|
2174
2178
|
);
|
|
2175
2179
|
ft(ra, Te, re);
|
|
2176
|
-
const ct =
|
|
2180
|
+
const ct = ne ?? ce("booking.regionLabel"), mt = I(() => U !== "success" || !Me ? null : /* @__PURE__ */ a(
|
|
2177
2181
|
Aa,
|
|
2178
2182
|
{
|
|
2179
2183
|
snapshot: Me,
|
|
2180
2184
|
operators: q,
|
|
2181
2185
|
specialties: $,
|
|
2182
|
-
services:
|
|
2186
|
+
services: l,
|
|
2183
2187
|
locale: W,
|
|
2184
2188
|
mode: G,
|
|
2185
2189
|
showModify: D,
|
|
@@ -2193,34 +2197,34 @@ const La = [], Fa = [], Ra = qe(
|
|
|
2193
2197
|
Me,
|
|
2194
2198
|
q,
|
|
2195
2199
|
$,
|
|
2196
|
-
|
|
2200
|
+
l,
|
|
2197
2201
|
W,
|
|
2198
2202
|
G,
|
|
2199
2203
|
D,
|
|
2200
2204
|
Te
|
|
2201
2205
|
]), ut = I(() => {
|
|
2202
2206
|
if (U === "success") return null;
|
|
2203
|
-
const
|
|
2207
|
+
const R = V === "accordion" ? Oa : V === "calendar" ? Ea : V === "flexible" ? Pa : V === "progress" ? Va : Ba, _e = {
|
|
2204
2208
|
cascade: _,
|
|
2205
2209
|
inputs: {
|
|
2206
2210
|
specialties: $,
|
|
2207
|
-
services:
|
|
2211
|
+
services: l,
|
|
2208
2212
|
operators: q,
|
|
2209
2213
|
availableDates: p,
|
|
2210
|
-
availableSlots:
|
|
2214
|
+
availableSlots: h,
|
|
2211
2215
|
nextAvailableDate: u
|
|
2212
2216
|
},
|
|
2213
2217
|
value: b,
|
|
2214
2218
|
onChange: N,
|
|
2215
|
-
onSubmit:
|
|
2216
|
-
policy: { country: t, lockedOperatorId:
|
|
2219
|
+
onSubmit: Re,
|
|
2220
|
+
policy: { country: t, lockedOperatorId: n },
|
|
2217
2221
|
detailsProps: {
|
|
2218
|
-
requireCodiceFiscale:
|
|
2219
|
-
requireDateOfBirth:
|
|
2220
|
-
requireInsuranceNumber:
|
|
2222
|
+
requireCodiceFiscale: x,
|
|
2223
|
+
requireDateOfBirth: g,
|
|
2224
|
+
requireInsuranceNumber: k,
|
|
2221
2225
|
insuranceType: b.insuranceType,
|
|
2222
2226
|
showNote: y,
|
|
2223
|
-
showReturningPatientFlag:
|
|
2227
|
+
showReturningPatientFlag: w,
|
|
2224
2228
|
privacyPolicyUrl: A,
|
|
2225
2229
|
termsUrl: S,
|
|
2226
2230
|
validateCodiceFiscale: v,
|
|
@@ -2237,28 +2241,28 @@ const La = [], Fa = [], Ra = qe(
|
|
|
2237
2241
|
activeStep: me,
|
|
2238
2242
|
setActiveStep: m
|
|
2239
2243
|
};
|
|
2240
|
-
return /* @__PURE__ */ a(
|
|
2244
|
+
return /* @__PURE__ */ a(R, { ..._e });
|
|
2241
2245
|
}, [
|
|
2242
2246
|
U,
|
|
2243
2247
|
V,
|
|
2244
2248
|
_,
|
|
2245
2249
|
$,
|
|
2246
|
-
|
|
2250
|
+
l,
|
|
2247
2251
|
q,
|
|
2248
2252
|
p,
|
|
2249
|
-
|
|
2253
|
+
h,
|
|
2250
2254
|
u,
|
|
2251
2255
|
b,
|
|
2252
2256
|
N,
|
|
2253
|
-
|
|
2257
|
+
Re,
|
|
2254
2258
|
t,
|
|
2255
|
-
|
|
2256
|
-
k,
|
|
2257
|
-
h,
|
|
2259
|
+
n,
|
|
2258
2260
|
x,
|
|
2261
|
+
g,
|
|
2262
|
+
k,
|
|
2259
2263
|
z,
|
|
2260
2264
|
y,
|
|
2261
|
-
|
|
2265
|
+
w,
|
|
2262
2266
|
A,
|
|
2263
2267
|
S,
|
|
2264
2268
|
v,
|
|
@@ -2284,7 +2288,7 @@ const La = [], Fa = [], Ra = qe(
|
|
|
2284
2288
|
"data-variant": V,
|
|
2285
2289
|
className: ka({
|
|
2286
2290
|
variant: V,
|
|
2287
|
-
surface:
|
|
2291
|
+
surface: ie,
|
|
2288
2292
|
className: X
|
|
2289
2293
|
}),
|
|
2290
2294
|
...de,
|
|
@@ -2314,11 +2318,11 @@ const La = [], Fa = [], Ra = qe(
|
|
|
2314
2318
|
);
|
|
2315
2319
|
}
|
|
2316
2320
|
);
|
|
2317
|
-
|
|
2321
|
+
Fa.displayName = "Booking";
|
|
2318
2322
|
export {
|
|
2319
|
-
|
|
2323
|
+
Fa as B,
|
|
2320
2324
|
Oe as C,
|
|
2321
2325
|
he as O,
|
|
2322
2326
|
ra as b
|
|
2323
2327
|
};
|
|
2324
|
-
//# sourceMappingURL=booking-
|
|
2328
|
+
//# sourceMappingURL=booking-Cw92aqo3.js.map
|