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