@alfadocs/ui-kit 1.53.0 → 1.54.1

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