@alfadocs/ui-kit-debug 0.47.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{address-autocomplete-CSjMrBvu.js → address-autocomplete-CT-9AOli.js} +2 -2
- package/dist/_chunks/{address-autocomplete-CSjMrBvu.js.map → address-autocomplete-CT-9AOli.js.map} +1 -1
- package/dist/_chunks/{agenda-card-CFyWSX7Z.js → agenda-card-BaSfVfrL.js} +25 -29
- package/dist/_chunks/agenda-card-BaSfVfrL.js.map +1 -0
- package/dist/_chunks/{agenda-tray-Dyj9ChHC.js → agenda-tray-DQayYmQ0.js} +50 -67
- package/dist/_chunks/agenda-tray-DQayYmQ0.js.map +1 -0
- package/dist/_chunks/ai-consent-banner-F2md5JD3.js +169 -0
- package/dist/_chunks/ai-consent-banner-F2md5JD3.js.map +1 -0
- package/dist/_chunks/ai-tools-rail-CYLWrRmm.js +280 -0
- package/dist/_chunks/ai-tools-rail-CYLWrRmm.js.map +1 -0
- package/dist/_chunks/{alert-ywPR59NE.js → alert-CUTxnym2.js} +56 -35
- package/dist/_chunks/alert-CUTxnym2.js.map +1 -0
- package/dist/_chunks/{alia-sidebar-CVIPrdc9.js → alia-sidebar-DlvyXgVC.js} +3 -2
- package/dist/_chunks/alia-sidebar-DlvyXgVC.js.map +1 -0
- package/dist/_chunks/anamnesis-card-CmkBVAln.js +156 -0
- package/dist/_chunks/anamnesis-card-CmkBVAln.js.map +1 -0
- package/dist/_chunks/antenatal-schedule-timeline-Dg0m0yFl.js +412 -0
- package/dist/_chunks/antenatal-schedule-timeline-Dg0m0yFl.js.map +1 -0
- package/dist/_chunks/appointment-tray-BwDHhWWC.js +419 -0
- package/dist/_chunks/appointment-tray-BwDHhWWC.js.map +1 -0
- package/dist/_chunks/{ar-DEz65ZJW.js → ar-C68WKG5a.js} +2 -2
- package/dist/_chunks/{ar-DEz65ZJW.js.map → ar-C68WKG5a.js.map} +1 -1
- package/dist/_chunks/{audio-recorder-DC-v9YFW.js → audio-recorder-DVJXV7_k.js} +2 -2
- package/dist/_chunks/{audio-recorder-DC-v9YFW.js.map → audio-recorder-DVJXV7_k.js.map} +1 -1
- package/dist/_chunks/bishop-score-2MzAz8NE.js +185 -0
- package/dist/_chunks/bishop-score-2MzAz8NE.js.map +1 -0
- package/dist/_chunks/{bmi-calculator-CQqXTVNL.js → bmi-calculator-DdylQzT6.js} +2 -2
- package/dist/_chunks/{bmi-calculator-CQqXTVNL.js.map → bmi-calculator-DdylQzT6.js.map} +1 -1
- package/dist/_chunks/{booking-DlDVuWMd.js → booking-DljH0JkS.js} +294 -306
- package/dist/_chunks/booking-DljH0JkS.js.map +1 -0
- package/dist/_chunks/{calculator-dialog-D-nfvteH.js → calculator-dialog-CFk4I91b.js} +2 -2
- package/dist/_chunks/{calculator-dialog-D-nfvteH.js.map → calculator-dialog-CFk4I91b.js.map} +1 -1
- package/dist/_chunks/calendar-days-C4BmpCZg.js +23 -0
- package/dist/_chunks/calendar-days-C4BmpCZg.js.map +1 -0
- package/dist/_chunks/{calendar-YHFknAGv.js → calendar-oYWOCrnf.js} +195 -210
- package/dist/_chunks/calendar-oYWOCrnf.js.map +1 -0
- package/dist/_chunks/care-plan-card-QmNpGggC.js +252 -0
- package/dist/_chunks/care-plan-card-QmNpGggC.js.map +1 -0
- package/dist/_chunks/care-plan-entry-card-Cnra7vUc.js +318 -0
- package/dist/_chunks/care-plan-entry-card-Cnra7vUc.js.map +1 -0
- package/dist/_chunks/{chat-message-B5JpFj0F.js → chat-message-Dm8U2RY1.js} +36 -35
- package/dist/_chunks/chat-message-Dm8U2RY1.js.map +1 -0
- package/dist/_chunks/circle-arrow-up-CC_85SuH.js +16 -0
- package/dist/_chunks/circle-arrow-up-CC_85SuH.js.map +1 -0
- package/dist/_chunks/clinical-note-card-BYo437dU.js +333 -0
- package/dist/_chunks/clinical-note-card-BYo437dU.js.map +1 -0
- package/dist/_chunks/{contact-profile-card-DHyuAPXM.js → contact-profile-card-DvvVfAA2.js} +102 -115
- package/dist/_chunks/contact-profile-card-DvvVfAA2.js.map +1 -0
- package/dist/_chunks/cycle-calculator-oOkj5wlB.js +252 -0
- package/dist/_chunks/cycle-calculator-oOkj5wlB.js.map +1 -0
- package/dist/_chunks/{date-picker-Bq7xhMA-.js → date-picker-BfHblqwA.js} +2 -2
- package/dist/_chunks/{date-picker-Bq7xhMA-.js.map → date-picker-BfHblqwA.js.map} +1 -1
- package/dist/_chunks/{date-picker-variants-DLi1Va_e.js → date-picker-variants-CXEAx3O_.js} +22 -22
- package/dist/_chunks/{date-picker-variants-DLi1Va_e.js.map → date-picker-variants-CXEAx3O_.js.map} +1 -1
- package/dist/_chunks/{date-range-picker-DcXuI9y7.js → date-range-picker-hcAMs1wO.js} +3 -3
- package/dist/_chunks/{date-range-picker-DcXuI9y7.js.map → date-range-picker-hcAMs1wO.js.map} +1 -1
- package/dist/_chunks/{date-time-picker-RimumeLR.js → date-time-picker-H-3Pwqlb.js} +9 -9
- package/dist/_chunks/{date-time-picker-RimumeLR.js.map → date-time-picker-H-3Pwqlb.js.map} +1 -1
- package/dist/_chunks/{de-bTBGdjPS.js → de-DK4A9_a8.js} +2 -2
- package/dist/_chunks/{de-bTBGdjPS.js.map → de-DK4A9_a8.js.map} +1 -1
- package/dist/_chunks/{dialog-BTpZV6It.js → dialog-DMGnSelc.js} +55 -55
- package/dist/_chunks/dialog-DMGnSelc.js.map +1 -0
- package/dist/_chunks/{document-scanner-BqLsGs4Y.js → document-scanner-Cxqvq7GR.js} +2 -2
- package/dist/_chunks/{document-scanner-BqLsGs4Y.js.map → document-scanner-Cxqvq7GR.js.map} +1 -1
- package/dist/_chunks/due-date-calculator-tDqZXPWO.js +256 -0
- package/dist/_chunks/due-date-calculator-tDqZXPWO.js.map +1 -0
- package/dist/_chunks/{editable-currency-cell-renderer-CLil9B29.js → editable-currency-cell-renderer-Bh48OHRv.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-CLil9B29.js.map → editable-currency-cell-renderer-Bh48OHRv.js.map} +1 -1
- package/dist/_chunks/{el-BWG5RXxa.js → el-B29HXhG5.js} +2 -2
- package/dist/_chunks/{el-BWG5RXxa.js.map → el-B29HXhG5.js.map} +1 -1
- package/dist/_chunks/entity-card-COhmqHly.js +69 -0
- package/dist/_chunks/entity-card-COhmqHly.js.map +1 -0
- package/dist/_chunks/{es-DfO_G435.js → es-BOwPVwWn.js} +2 -2
- package/dist/_chunks/{es-DfO_G435.js.map → es-BOwPVwWn.js.map} +1 -1
- package/dist/_chunks/fetal-weight-Da-B4P4k.js +122 -0
- package/dist/_chunks/fetal-weight-Da-B4P4k.js.map +1 -0
- package/dist/_chunks/{fr-BTn24bs8.js → fr-DoDBtn0T.js} +2 -2
- package/dist/_chunks/{fr-BTn24bs8.js.map → fr-DoDBtn0T.js.map} +1 -1
- package/dist/_chunks/{freemium-paywall-DzpD63WY.js → freemium-paywall-BWaLWje-.js} +2 -2
- package/dist/_chunks/{freemium-paywall-DzpD63WY.js.map → freemium-paywall-BWaLWje-.js.map} +1 -1
- package/dist/_chunks/gestational-age-calculator-DbDfTJU2.js +311 -0
- package/dist/_chunks/gestational-age-calculator-DbDfTJU2.js.map +1 -0
- package/dist/_chunks/hcg-doubling-DAnpbale.js +170 -0
- package/dist/_chunks/hcg-doubling-DAnpbale.js.map +1 -0
- package/dist/_chunks/{hi-Dj3oYd84.js → hi-DGByrKby.js} +2 -2
- package/dist/_chunks/{hi-Dj3oYd84.js.map → hi-DGByrKby.js.map} +1 -1
- package/dist/_chunks/{insert-result-C5ABnzDl.js → insert-result-DNdi_JYW.js} +140 -168
- package/dist/_chunks/insert-result-DNdi_JYW.js.map +1 -0
- package/dist/_chunks/is-safe-url-DkETxeHz.js +7 -0
- package/dist/_chunks/is-safe-url-DkETxeHz.js.map +1 -0
- package/dist/_chunks/{isSameWeek-HfxKk6Lz.js → isSameWeek-B1odL2vR.js} +2 -2
- package/dist/_chunks/{isSameWeek-HfxKk6Lz.js.map → isSameWeek-B1odL2vR.js.map} +1 -1
- package/dist/_chunks/{it-Y85ofIQQ.js → it-B16rEecm.js} +3 -3
- package/dist/_chunks/{it-Y85ofIQQ.js.map → it-B16rEecm.js.map} +1 -1
- package/dist/_chunks/{ja-CQ7J6YoA.js → ja-B0viOgft.js} +2 -2
- package/dist/_chunks/{ja-CQ7J6YoA.js.map → ja-B0viOgft.js.map} +1 -1
- package/dist/_chunks/languages-DsVf_WzT.js +19 -0
- package/dist/_chunks/languages-DsVf_WzT.js.map +1 -0
- package/dist/_chunks/layers-pzGcbLPj.js +34 -0
- package/dist/_chunks/layers-pzGcbLPj.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-Gfsf78ge.js → marketplace-app-shell-UKSLx9K_.js} +3 -3
- package/dist/_chunks/{marketplace-app-shell-Gfsf78ge.js.map → marketplace-app-shell-UKSLx9K_.js.map} +1 -1
- package/dist/_chunks/{message-card-DSPw5ghw.js → message-card-Dvl1TgaN.js} +15 -19
- package/dist/_chunks/message-card-Dvl1TgaN.js.map +1 -0
- package/dist/_chunks/{message-tray-hSQff9u4.js → message-tray-Dl6GQaaV.js} +2 -2
- package/dist/_chunks/{message-tray-hSQff9u4.js.map → message-tray-Dl6GQaaV.js.map} +1 -1
- package/dist/_chunks/{nl-D9kHCmp3.js → nl-cBxEX2QU.js} +2 -2
- package/dist/_chunks/{nl-D9kHCmp3.js.map → nl-cBxEX2QU.js.map} +1 -1
- package/dist/_chunks/operator-hero-CM8949Hd.js +198 -0
- package/dist/_chunks/operator-hero-CM8949Hd.js.map +1 -0
- package/dist/_chunks/{patient-search-CocVcGJ3.js → patient-search-BJOmTmDA.js} +2 -2
- package/dist/_chunks/{patient-search-CocVcGJ3.js.map → patient-search-BJOmTmDA.js.map} +1 -1
- package/dist/_chunks/{patient-shell-CnT4L8gn.js → patient-shell-DUmhXnFq.js} +2 -2
- package/dist/_chunks/{patient-shell-CnT4L8gn.js.map → patient-shell-DUmhXnFq.js.map} +1 -1
- package/dist/_chunks/patient-summary-card-BnTqxcTr.js +443 -0
- package/dist/_chunks/patient-summary-card-BnTqxcTr.js.map +1 -0
- package/dist/_chunks/{payment-form-BNTx4876.js → payment-form-xmeCkxas.js} +2 -2
- package/dist/_chunks/{payment-form-BNTx4876.js.map → payment-form-xmeCkxas.js.map} +1 -1
- package/dist/_chunks/payment-request-card-B_lyobd0.js +478 -0
- package/dist/_chunks/payment-request-card-B_lyobd0.js.map +1 -0
- package/dist/_chunks/{pdf-viewer-CWEXTlwq.js → pdf-viewer-q1D3Uion.js} +4 -4
- package/dist/_chunks/pdf-viewer-q1D3Uion.js.map +1 -0
- package/dist/_chunks/periodontal-chart-card-BYs9hax1.js +455 -0
- package/dist/_chunks/periodontal-chart-card-BYs9hax1.js.map +1 -0
- package/dist/_chunks/phone-Bi5yUm4I.js +20 -0
- package/dist/_chunks/phone-Bi5yUm4I.js.map +1 -0
- package/dist/_chunks/{pl-B3Smqpkr.js → pl-DtS08ioY.js} +3 -3
- package/dist/_chunks/{pl-B3Smqpkr.js.map → pl-DtS08ioY.js.map} +1 -1
- package/dist/_chunks/{practice-results-DDi-kvaD.js → practice-results-Cq1y8JFD.js} +4 -3
- package/dist/_chunks/{practice-results-DDi-kvaD.js.map → practice-results-Cq1y8JFD.js.map} +1 -1
- package/dist/_chunks/pregnancy-weight-gain-CCGrvarh.js +322 -0
- package/dist/_chunks/pregnancy-weight-gain-CCGrvarh.js.map +1 -0
- package/dist/_chunks/product-hub-panel-CkfZBA3t.js +620 -0
- package/dist/_chunks/product-hub-panel-CkfZBA3t.js.map +1 -0
- package/dist/_chunks/{pt-D3J-1c_7.js → pt-yFXs1VvH.js} +2 -2
- package/dist/_chunks/{pt-D3J-1c_7.js.map → pt-yFXs1VvH.js.map} +1 -1
- package/dist/_chunks/{ro-BKAbbEA3.js → ro-DsCzSrzR.js} +2 -2
- package/dist/_chunks/{ro-BKAbbEA3.js.map → ro-DsCzSrzR.js.map} +1 -1
- package/dist/_chunks/{ru-BeG8f0Ep.js → ru-DgDxL0pc.js} +3 -3
- package/dist/_chunks/{ru-BeG8f0Ep.js.map → ru-DgDxL0pc.js.map} +1 -1
- package/dist/_chunks/scan-line-lGioFwLC.js +18 -0
- package/dist/_chunks/scan-line-lGioFwLC.js.map +1 -0
- package/dist/_chunks/shield-check-BjCGH_Sr.js +21 -0
- package/dist/_chunks/shield-check-BjCGH_Sr.js.map +1 -0
- package/dist/_chunks/{sidebar-_vJXI9rB.js → sidebar-h78cTNLh.js} +440 -338
- package/dist/_chunks/sidebar-h78cTNLh.js.map +1 -0
- package/dist/_chunks/{sign-document-BCyLpFHJ.js → sign-document-CZkAf28g.js} +2 -2
- package/dist/_chunks/{sign-document-BCyLpFHJ.js.map → sign-document-CZkAf28g.js.map} +1 -1
- package/dist/_chunks/{sq-_hRPaeUy.js → sq-DHlCYN67.js} +2 -2
- package/dist/_chunks/{sq-_hRPaeUy.js.map → sq-DHlCYN67.js.map} +1 -1
- package/dist/_chunks/subDays-Bs00akhK.js +8 -0
- package/dist/_chunks/{subDays-Dv7q9S7u.js.map → subDays-Bs00akhK.js.map} +1 -1
- package/dist/_chunks/{sv-g009fSpe.js → sv-O0QaQs_s.js} +2 -2
- package/dist/_chunks/{sv-g009fSpe.js.map → sv-O0QaQs_s.js.map} +1 -1
- package/dist/_chunks/{tr-OKUOuhMW.js → tr-BmNDRuio.js} +2 -2
- package/dist/_chunks/{tr-OKUOuhMW.js.map → tr-BmNDRuio.js.map} +1 -1
- package/dist/_chunks/{transaction-chip-B8ujzowA.js → transaction-chip-BZCa6XDn.js} +8 -6
- package/dist/_chunks/{transaction-chip-B8ujzowA.js.map → transaction-chip-BZCa6XDn.js.map} +1 -1
- package/dist/_chunks/{unit-converter-u3CwNDpP.js → unit-converter-jWp3Z85y.js} +2 -2
- package/dist/_chunks/{unit-converter-u3CwNDpP.js.map → unit-converter-jWp3Z85y.js.map} +1 -1
- package/dist/_chunks/user-cog-BS_qc8nA.js +24 -0
- package/dist/_chunks/user-cog-BS_qc8nA.js.map +1 -0
- package/dist/_chunks/video-BAeICxCT.js +21 -0
- package/dist/_chunks/video-BAeICxCT.js.map +1 -0
- package/dist/_chunks/warning-stack-CXfoAT-_.js +220 -0
- package/dist/_chunks/warning-stack-CXfoAT-_.js.map +1 -0
- package/dist/_chunks/{workflow-map-Djn1QMJc.js → workflow-map-DzX_LI4y.js} +139 -157
- package/dist/_chunks/workflow-map-DzX_LI4y.js.map +1 -0
- package/dist/_chunks/{zh-CN-De4zwEhx.js → zh-CN-CgVJZEzz.js} +3 -3
- package/dist/_chunks/{zh-CN-De4zwEhx.js.map → zh-CN-CgVJZEzz.js.map} +1 -1
- package/dist/agent-catalog.json +367 -1
- package/dist/components/_shared/antenatal-schedule-timeline.d.ts +18 -0
- package/dist/components/_shared/antenatal-schedule-timeline.d.ts.map +1 -0
- package/dist/components/_shared/antenatal-schedule.d.ts +68 -0
- package/dist/components/_shared/antenatal-schedule.d.ts.map +1 -0
- package/dist/components/_shared/entity-card/entity-card.d.ts +40 -0
- package/dist/components/_shared/entity-card/entity-card.d.ts.map +1 -0
- package/dist/components/_shared/entity-card/index.d.ts +3 -0
- package/dist/components/_shared/entity-card/index.d.ts.map +1 -0
- package/dist/components/_shared/index.d.ts +5 -0
- package/dist/components/_shared/index.d.ts.map +1 -1
- package/dist/components/_shared/is-safe-url.d.ts +13 -0
- package/dist/components/_shared/is-safe-url.d.ts.map +1 -0
- package/dist/components/_shared/obstetrics.d.ts +138 -0
- package/dist/components/_shared/obstetrics.d.ts.map +1 -0
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/agenda-card/agenda-card.d.ts +1 -2
- package/dist/components/agenda-card/agenda-card.d.ts.map +1 -1
- package/dist/components/agenda-card/index.d.ts +2 -1
- package/dist/components/agenda-card/index.d.ts.map +1 -1
- package/dist/components/agenda-card/index.js +6 -5
- package/dist/components/agenda-card/index.js.map +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/ai-consent-banner.agent.d.ts +4 -0
- package/dist/components/ai-consent-banner/ai-consent-banner.agent.d.ts.map +1 -0
- package/dist/components/ai-consent-banner/ai-consent-banner.d.ts +45 -0
- package/dist/components/ai-consent-banner/ai-consent-banner.d.ts.map +1 -0
- package/dist/components/ai-consent-banner/index.d.ts +4 -0
- package/dist/components/ai-consent-banner/index.d.ts.map +1 -0
- package/dist/components/ai-consent-banner/index.js +6 -0
- package/dist/components/ai-consent-banner/index.js.map +1 -0
- package/dist/components/ai-tools-rail/ai-tools-rail.agent.d.ts +4 -0
- package/dist/components/ai-tools-rail/ai-tools-rail.agent.d.ts.map +1 -0
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +60 -0
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts.map +1 -0
- package/dist/components/ai-tools-rail/index.d.ts +4 -0
- package/dist/components/ai-tools-rail/index.d.ts.map +1 -0
- package/dist/components/ai-tools-rail/index.js +6 -0
- package/dist/components/ai-tools-rail/index.js.map +1 -0
- package/dist/components/alert/alert.d.ts +2 -2
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anamnesis-card/anamnesis-card.d.ts +68 -0
- package/dist/components/anamnesis-card/anamnesis-card.d.ts.map +1 -0
- package/dist/components/anamnesis-card/index.d.ts +3 -0
- package/dist/components/anamnesis-card/index.d.ts.map +1 -0
- package/dist/components/anamnesis-card/index.js +5 -0
- package/dist/components/anamnesis-card/index.js.map +1 -0
- package/dist/components/appointment-card/appointment-card.agent.d.ts +3 -0
- package/dist/components/appointment-card/appointment-card.agent.d.ts.map +1 -0
- package/dist/components/appointment-card/appointment-card.d.ts +93 -0
- package/dist/components/appointment-card/appointment-card.d.ts.map +1 -0
- package/dist/components/appointment-card/appointment-tray.agent.d.ts +4 -0
- package/dist/components/appointment-card/appointment-tray.agent.d.ts.map +1 -0
- package/dist/components/appointment-card/appointment-tray.d.ts +48 -0
- package/dist/components/appointment-card/appointment-tray.d.ts.map +1 -0
- package/dist/components/appointment-card/index.d.ts +8 -0
- package/dist/components/appointment-card/index.d.ts.map +1 -0
- package/dist/components/appointment-card/index.js +10 -0
- package/dist/components/appointment-card/index.js.map +1 -0
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/bishop-score/bishop-score.d.ts +27 -0
- package/dist/components/bishop-score/bishop-score.d.ts.map +1 -0
- package/dist/components/bishop-score/bishop.d.ts +30 -0
- package/dist/components/bishop-score/bishop.d.ts.map +1 -0
- package/dist/components/bishop-score/index.d.ts +4 -0
- package/dist/components/bishop-score/index.d.ts.map +1 -0
- package/dist/components/bishop-score/index.js +10 -0
- package/dist/components/bishop-score/index.js.map +1 -0
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/care-plan-card/care-plan-card.agent.d.ts +4 -0
- package/dist/components/care-plan-card/care-plan-card.agent.d.ts.map +1 -0
- package/dist/components/care-plan-card/care-plan-card.d.ts +102 -0
- package/dist/components/care-plan-card/care-plan-card.d.ts.map +1 -0
- package/dist/components/care-plan-card/index.d.ts +4 -0
- package/dist/components/care-plan-card/index.d.ts.map +1 -0
- package/dist/components/care-plan-card/index.js +6 -0
- package/dist/components/care-plan-card/index.js.map +1 -0
- package/dist/components/care-plan-entry-card/care-plan-entry-card.agent.d.ts +4 -0
- package/dist/components/care-plan-entry-card/care-plan-entry-card.agent.d.ts.map +1 -0
- package/dist/components/care-plan-entry-card/care-plan-entry-card.d.ts +110 -0
- package/dist/components/care-plan-entry-card/care-plan-entry-card.d.ts.map +1 -0
- package/dist/components/care-plan-entry-card/index.d.ts +4 -0
- package/dist/components/care-plan-entry-card/index.d.ts.map +1 -0
- package/dist/components/care-plan-entry-card/index.js +6 -0
- package/dist/components/care-plan-entry-card/index.js.map +1 -0
- package/dist/components/chat-message/chat-message.d.ts +7 -0
- package/dist/components/chat-message/chat-message.d.ts.map +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/clinical-note-card/clinical-note-card.agent.d.ts +4 -0
- package/dist/components/clinical-note-card/clinical-note-card.agent.d.ts.map +1 -0
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +98 -0
- package/dist/components/clinical-note-card/clinical-note-card.d.ts.map +1 -0
- package/dist/components/clinical-note-card/index.d.ts +4 -0
- package/dist/components/clinical-note-card/index.d.ts.map +1 -0
- package/dist/components/clinical-note-card/index.js +6 -0
- package/dist/components/clinical-note-card/index.js.map +1 -0
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.d.ts.map +1 -1
- package/dist/components/cycle-calculator/cycle.d.ts +5 -0
- package/dist/components/cycle-calculator/cycle.d.ts.map +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +7 -0
- package/dist/components/dialog/dialog.d.ts.map +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +13 -1
- package/dist/components/due-date-calculator/due-date-calculator.d.ts.map +1 -1
- package/dist/components/due-date-calculator/gestation.d.ts +1 -59
- package/dist/components/due-date-calculator/gestation.d.ts.map +1 -1
- package/dist/components/due-date-calculator/index.d.ts +1 -1
- package/dist/components/due-date-calculator/index.d.ts.map +1 -1
- package/dist/components/due-date-calculator/index.js +16 -10
- package/dist/components/fetal-weight/efw.d.ts +25 -0
- package/dist/components/fetal-weight/efw.d.ts.map +1 -0
- package/dist/components/fetal-weight/fetal-weight.d.ts +27 -0
- package/dist/components/fetal-weight/fetal-weight.d.ts.map +1 -0
- package/dist/components/fetal-weight/index.d.ts +4 -0
- package/dist/components/fetal-weight/index.d.ts.map +1 -0
- package/dist/components/fetal-weight/index.js +6 -0
- package/dist/components/fetal-weight/index.js.map +1 -0
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +25 -1
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts.map +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/hcg-doubling.d.ts +31 -0
- package/dist/components/hcg-doubling/hcg-doubling.d.ts.map +1 -0
- package/dist/components/hcg-doubling/hcg.d.ts +33 -0
- package/dist/components/hcg-doubling/hcg.d.ts.map +1 -0
- package/dist/components/hcg-doubling/index.d.ts +4 -0
- package/dist/components/hcg-doubling/index.d.ts.map +1 -0
- package/dist/components/hcg-doubling/index.js +7 -0
- package/dist/components/hcg-doubling/index.js.map +1 -0
- package/dist/components/index.d.ts +14 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/message-card/index.js +5 -4
- package/dist/components/message-card/index.js.map +1 -1
- package/dist/components/message-card/message-card.d.ts +1 -2
- package/dist/components/message-card/message-card.d.ts.map +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/operator-hero/operator-hero.agent.d.ts.map +1 -1
- package/dist/components/operator-hero/operator-hero.d.ts +9 -0
- package/dist/components/operator-hero/operator-hero.d.ts.map +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.d.ts +4 -0
- package/dist/components/patient-summary-card/index.d.ts.map +1 -0
- package/dist/components/patient-summary-card/index.js +6 -0
- package/dist/components/patient-summary-card/index.js.map +1 -0
- package/dist/components/patient-summary-card/patient-summary-card.agent.d.ts +4 -0
- package/dist/components/patient-summary-card/patient-summary-card.agent.d.ts.map +1 -0
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +120 -0
- package/dist/components/patient-summary-card/patient-summary-card.d.ts.map +1 -0
- package/dist/components/payment-card/index.d.ts +7 -0
- package/dist/components/payment-card/index.d.ts.map +1 -0
- package/dist/components/payment-card/index.js +8 -0
- package/dist/components/payment-card/index.js.map +1 -0
- package/dist/components/payment-card/payment-card.agent.d.ts +4 -0
- package/dist/components/payment-card/payment-card.agent.d.ts.map +1 -0
- package/dist/components/payment-card/payment-card.d.ts +71 -0
- package/dist/components/payment-card/payment-card.d.ts.map +1 -0
- package/dist/components/payment-card/payment-request-card.agent.d.ts +4 -0
- package/dist/components/payment-card/payment-request-card.agent.d.ts.map +1 -0
- package/dist/components/payment-card/payment-request-card.d.ts +43 -0
- package/dist/components/payment-card/payment-request-card.d.ts.map +1 -0
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/pdf-viewer/pdf-viewer.d.ts.map +1 -1
- package/dist/components/periodontal-chart-card/index.d.ts +4 -0
- package/dist/components/periodontal-chart-card/index.d.ts.map +1 -0
- package/dist/components/periodontal-chart-card/index.js +7 -0
- package/dist/components/periodontal-chart-card/index.js.map +1 -0
- package/dist/components/periodontal-chart-card/periodontal-chart-card.agent.d.ts +4 -0
- package/dist/components/periodontal-chart-card/periodontal-chart-card.agent.d.ts.map +1 -0
- package/dist/components/periodontal-chart-card/periodontal-chart-card.d.ts +74 -0
- package/dist/components/periodontal-chart-card/periodontal-chart-card.d.ts.map +1 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +7 -0
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts.map +1 -1
- package/dist/components/pregnancy-weight-gain/weight-gain.d.ts +33 -8
- package/dist/components/pregnancy-weight-gain/weight-gain.d.ts.map +1 -1
- package/dist/components/product-hub-tray/index.d.ts +8 -0
- package/dist/components/product-hub-tray/index.d.ts.map +1 -0
- package/dist/components/product-hub-tray/index.js +10 -0
- package/dist/components/product-hub-tray/index.js.map +1 -0
- package/dist/components/product-hub-tray/product-hub-panel.agent.d.ts +4 -0
- package/dist/components/product-hub-tray/product-hub-panel.agent.d.ts.map +1 -0
- package/dist/components/product-hub-tray/product-hub-panel.d.ts +54 -0
- package/dist/components/product-hub-tray/product-hub-panel.d.ts.map +1 -0
- package/dist/components/product-hub-tray/product-hub-tray.agent.d.ts +4 -0
- package/dist/components/product-hub-tray/product-hub-tray.agent.d.ts.map +1 -0
- package/dist/components/product-hub-tray/product-hub-tray.d.ts +115 -0
- package/dist/components/product-hub-tray/product-hub-tray.d.ts.map +1 -0
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/sidebar/index.d.ts +2 -2
- package/dist/components/sidebar/index.d.ts.map +1 -1
- package/dist/components/sidebar/index.js +12 -11
- package/dist/components/sidebar/sidebar.d.ts +14 -1
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/stat/stat.d.ts +1 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/warning-stack/warning-stack.d.ts.map +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +561 -1
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +560 -2
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +561 -1
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +560 -2
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +561 -1
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +560 -2
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +561 -1
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +560 -2
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +561 -1
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +560 -2
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +561 -1
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +560 -2
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +561 -1
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +560 -2
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +561 -1
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +560 -2
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +561 -1
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +560 -2
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +561 -1
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +560 -2
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +561 -1
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +560 -2
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +561 -1
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +560 -2
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +561 -1
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +560 -2
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +561 -1
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +560 -2
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +561 -1
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +560 -2
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +561 -1
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +560 -2
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +561 -1
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +560 -2
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +561 -1
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +560 -2
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +663 -600
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +562 -2
- package/dist/locales/de.json +562 -2
- package/dist/locales/el.json +562 -2
- package/dist/locales/en.json +562 -2
- package/dist/locales/es.json +562 -2
- package/dist/locales/fr.json +562 -2
- package/dist/locales/hi.json +562 -2
- package/dist/locales/it.json +562 -2
- package/dist/locales/ja.json +562 -2
- package/dist/locales/nl.json +562 -2
- package/dist/locales/pl.json +562 -2
- package/dist/locales/pt.json +562 -2
- package/dist/locales/ro.json +562 -2
- package/dist/locales/ru.json +562 -2
- package/dist/locales/sq.json +562 -2
- package/dist/locales/sv.json +562 -2
- package/dist/locales/tr.json +562 -2
- package/dist/locales/zh.json +562 -2
- package/dist/patterns/alia-assistant/alia-chat-surface.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/alia-types.d.ts +15 -0
- package/dist/patterns/alia-assistant/alia-types.d.ts.map +1 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +58 -1
- package/dist/_chunks/agenda-card-CFyWSX7Z.js.map +0 -1
- package/dist/_chunks/agenda-tray-Dyj9ChHC.js.map +0 -1
- package/dist/_chunks/alert-ywPR59NE.js.map +0 -1
- package/dist/_chunks/alia-sidebar-CVIPrdc9.js.map +0 -1
- package/dist/_chunks/booking-DlDVuWMd.js.map +0 -1
- package/dist/_chunks/calendar-YHFknAGv.js.map +0 -1
- package/dist/_chunks/chat-message-B5JpFj0F.js.map +0 -1
- package/dist/_chunks/contact-profile-card-DHyuAPXM.js.map +0 -1
- package/dist/_chunks/cycle-calculator-KxA8dqDf.js +0 -211
- package/dist/_chunks/cycle-calculator-KxA8dqDf.js.map +0 -1
- package/dist/_chunks/dialog-BTpZV6It.js.map +0 -1
- package/dist/_chunks/due-date-calculator-mFxpHLml.js +0 -216
- package/dist/_chunks/due-date-calculator-mFxpHLml.js.map +0 -1
- package/dist/_chunks/gestation-mWF4AXea.js +0 -50
- package/dist/_chunks/gestation-mWF4AXea.js.map +0 -1
- package/dist/_chunks/gestational-age-calculator-gWI_uRA1.js +0 -203
- package/dist/_chunks/gestational-age-calculator-gWI_uRA1.js.map +0 -1
- package/dist/_chunks/insert-result-C5ABnzDl.js.map +0 -1
- package/dist/_chunks/message-card-DSPw5ghw.js.map +0 -1
- package/dist/_chunks/operator-hero-7LiiP7zi.js +0 -171
- package/dist/_chunks/operator-hero-7LiiP7zi.js.map +0 -1
- package/dist/_chunks/pdf-viewer-CWEXTlwq.js.map +0 -1
- package/dist/_chunks/pregnancy-weight-gain-BtEHaSqy.js +0 -246
- package/dist/_chunks/pregnancy-weight-gain-BtEHaSqy.js.map +0 -1
- package/dist/_chunks/shield-check-C73ma9Cs.js +0 -36
- package/dist/_chunks/shield-check-C73ma9Cs.js.map +0 -1
- package/dist/_chunks/sidebar-_vJXI9rB.js.map +0 -1
- package/dist/_chunks/subDays-Dv7q9S7u.js +0 -8
- package/dist/_chunks/warning-stack-DNR3-IbP.js +0 -180
- package/dist/_chunks/warning-stack-DNR3-IbP.js.map +0 -1
- package/dist/_chunks/workflow-map-Djn1QMJc.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-YHFknAGv.js","sources":["../../node_modules/lucide-react/dist/esm/icons/ban.js","../../node_modules/lucide-react/dist/esm/icons/euro.js","../../node_modules/lucide-react/dist/esm/icons/thumbs-up.js","../../node_modules/lucide-react/dist/esm/icons/video.js","../../node_modules/lucide-react/dist/esm/icons/zap.js","../../src/components/calendar/calendar.agent.ts","../../src/components/calendar/calendar.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M4.929 4.929 19.07 19.071\", key: \"196cmz\" }]\n];\nconst Ban = createLucideIcon(\"ban\", __iconNode);\n\nexport { __iconNode, Ban as default };\n//# sourceMappingURL=ban.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M4 10h12\", key: \"1y6xl8\" }],\n [\"path\", { d: \"M4 14h9\", key: \"1loblj\" }],\n [\n \"path\",\n {\n d: \"M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2\",\n key: \"1j6lzo\"\n }\n ]\n];\nconst Euro = createLucideIcon(\"euro\", __iconNode);\n\nexport { __iconNode, Euro as default };\n//# sourceMappingURL=euro.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z\",\n key: \"emmmcr\"\n }\n ],\n [\"path\", { d: \"M7 10v12\", key: \"1qc93n\" }]\n];\nconst ThumbsUp = createLucideIcon(\"thumbs-up\", __iconNode);\n\nexport { __iconNode, ThumbsUp as default };\n//# sourceMappingURL=thumbs-up.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5\",\n key: \"ftymec\"\n }\n ],\n [\"rect\", { x: \"2\", y: \"6\", width: \"14\", height: \"12\", rx: \"2\", key: \"158x01\" }]\n];\nconst Video = createLucideIcon(\"video\", __iconNode);\n\nexport { __iconNode, Video as default };\n//# sourceMappingURL=video.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z\",\n key: \"1xq2db\"\n }\n ]\n];\nconst Zap = createLucideIcon(\"zap\", __iconNode);\n\nexport { __iconNode, Zap as default };\n//# sourceMappingURL=zap.js.map\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — Calendar. */\n/* */\n/* Calendar's existing `CalendarHandle` is the canonical shape for an */\n/* agent-friendly third-party wrapper — see `26-agent-readiness.mdx` */\n/* §15. The handle methods translate directly into adapter actions. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { CalendarHandle, CalendarView } from './calendar';\n\nexport const calendarAgent: AgentAdapter<CalendarHandle> = {\n id: 'calendar',\n capabilities: ['view_change', 'range_navigate', 'pick'],\n state: {\n currentView: {\n type: 'CalendarView',\n descriptionKey: 'ui.agent.calendar.state.currentView',\n description: 'Active view name (e.g. dayGridMonth, timeGridWeek).',\n read: (handle) => handle.getCurrentView() ?? null,\n },\n currentDate: {\n type: 'iso-date',\n descriptionKey: 'ui.agent.calendar.state.currentDate',\n description: 'ISO date anchor of the visible range.',\n read: (handle) => handle.getCurrentDate()?.toISOString() ?? null,\n },\n currentTitle: {\n type: 'string',\n descriptionKey: 'ui.agent.calendar.state.currentTitle',\n description: 'Human title of the current range (e.g. \"April 2026\").',\n read: (handle) => handle.getTitle(),\n },\n },\n actions: {\n today: {\n safety: 'read',\n descriptionKey: 'ui.agent.calendar.actions.today',\n description: 'Jump to the current day.',\n invoke: (handle) => {\n handle.today();\n },\n },\n prev: {\n safety: 'read',\n descriptionKey: 'ui.agent.calendar.actions.prev',\n description: 'Move to the previous range.',\n invoke: (handle) => {\n handle.prev();\n },\n },\n next: {\n safety: 'read',\n descriptionKey: 'ui.agent.calendar.actions.next',\n description: 'Move to the next range.',\n invoke: (handle) => {\n handle.next();\n },\n },\n goto_date: {\n safety: 'read',\n argsType: '{ date: string | Date }',\n descriptionKey: 'ui.agent.calendar.actions.gotoDate',\n description: 'Navigate to a specific date.',\n invoke: (handle, args: { date: string | Date }) => {\n handle.gotoDate(args.date);\n },\n },\n change_view: {\n safety: 'read',\n argsType: '{ view: CalendarView }',\n descriptionKey: 'ui.agent.calendar.actions.changeView',\n description: 'Switch the calendar to the given view.',\n invoke: (handle, args: { view: CalendarView }) => {\n handle.changeView(args.view);\n },\n },\n focus_event: {\n safety: 'read',\n argsType: '{ eventId: string }',\n descriptionKey: 'ui.agent.calendar.actions.focusEvent',\n description: 'Scroll an event into view and briefly highlight it.',\n invoke: (handle, args: { eventId: string }) => {\n handle.focusEvent(args.eventId);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'calendar',\n description: 'Marks the Calendar wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-event-id',\n description:\n 'Emitted on every rendered FullCalendar event by the kit event renderer. Used by focusEvent.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* Calendar — a thin, typed wrapper over FullCalendar. */\n/* */\n/* - Plugins are registered once internally so consumers never import */\n/* `@fullcalendar/core` / plugins directly (08-third-party §Calendar).*/\n/* - Chrome is styled entirely from `fullcalendar-theme.css` via the */\n/* `.fc-theme-alfadocs` root class — no inline styles anywhere. */\n/* - Locale, week-start, date formats, and direction all flow from the */\n/* active i18next language (06-i18n.mdx). */\n/* */\n/* TODO (deferred, per implementation plan): */\n/* - Virtualised resource timeline with @tanstack/react-virtual for */\n/* > 50 resources (performance user story). */\n/* - Protanopia screenshot stories (colour-blind story acceptance). */\n/* - Playwright performance trace for 1000 events / 50 resources. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type CSSProperties,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport FullCalendar from '@fullcalendar/react';\nimport dayGridPlugin from '@fullcalendar/daygrid';\nimport timeGridPlugin from '@fullcalendar/timegrid';\nimport listPlugin from '@fullcalendar/list';\nimport resourcePlugin from '@fullcalendar/resource';\nimport type { ResourceLabelContentArg } from '@fullcalendar/resource';\nimport resourceTimeGridPlugin from '@fullcalendar/resource-timegrid';\nimport resourceTimelinePlugin from '@fullcalendar/resource-timeline';\nimport timelinePlugin from '@fullcalendar/timeline';\nimport interactionPlugin from '@fullcalendar/interaction';\nimport type { EventResizeDoneArg } from '@fullcalendar/interaction';\nimport type {\n DatesSetArg,\n EventClickArg,\n EventContentArg,\n EventDropArg,\n DateSelectArg,\n EventInput,\n} from '@fullcalendar/core';\nimport {\n ThumbsUp,\n Clock,\n Stethoscope,\n Check,\n Ban,\n Zap,\n Globe,\n AlertTriangle,\n HeartPulse,\n Euro,\n Video,\n ChevronLeft,\n ChevronRight,\n type LucideIcon,\n} from 'lucide-react';\nimport '../../tokens/themes/bridges/fullcalendar-theme.css';\n\nimport { usePrefersReducedMotion } from '../../hooks';\nimport { useAgentRegistration } from '../../agent';\nimport { warnLowContrast } from './contrast-warning';\nimport { calendarAgent } from './calendar.agent';\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type CalendarView =\n // Standard views\n | 'dayGridMonth'\n | 'timeGridWeek'\n | 'timeGridDay'\n | 'listWeek'\n // Chair resource views\n | 'resourceTimeGridDayChair'\n | 'resourceTimeGridThreeDaysChair'\n | 'resourceTimeGridWeekChair'\n // Operator resource views\n | 'resourceTimeGridDayOperator'\n | 'resourceTimeGridThreeDaysOperator'\n | 'resourceTimeGridWeekOperator';\n\n/**\n * View-name mapping table — maps the DS public view name (with the\n * Chair/Operator semantic suffix stripped) onto the internal FullCalendar\n * view name for each `resourceLayout` orientation. The table is exported\n * via `resolveFullCalendarView`; invalid combinations are caught at\n * compile time because the `CalendarView` union is exhaustive.\n */\nconst RESOURCE_VIEW_MAP = {\n vertical: {\n Day: 'resourceTimeGridDay',\n ThreeDays: 'resourceTimeGridThreeDays',\n Week: 'resourceTimeGridWeek',\n },\n horizontal: {\n Day: 'resourceTimelineDay',\n ThreeDays: 'resourceTimelineThreeDays',\n Week: 'resourceTimelineWeek',\n },\n} as const satisfies Record<\n 'vertical' | 'horizontal',\n Record<'Day' | 'ThreeDays' | 'Week', string>\n>;\n\ntype ResourceViewStem = keyof (typeof RESOURCE_VIEW_MAP)['vertical'];\n\nconst STANDARD_VIEWS = new Set<CalendarView>([\n 'dayGridMonth',\n 'timeGridWeek',\n 'timeGridDay',\n 'listWeek',\n]);\n\n/**\n * Maps a public `CalendarView` name to the internal FullCalendar view\n * name. `resourceLayout` selects between `resourceTimeGrid*` (vertical)\n * and `resourceTimeline*` (horizontal) for the 6 resource views; the\n * 4 standard views are returned as-is.\n */\nexport function resolveFullCalendarView(\n view: CalendarView,\n resourceLayout: 'vertical' | 'horizontal' = 'vertical',\n): string {\n if (STANDARD_VIEWS.has(view)) {\n return view;\n }\n // Strip the trailing Chair / Operator suffix — the DS maps both to the\n // same internal FC view name. The suffix is semantic only.\n const withoutPrefix = view.replace(/^resourceTimeGrid/, '');\n const stem = withoutPrefix.replace(\n /(Chair|Operator)$/,\n '',\n ) as ResourceViewStem;\n return RESOURCE_VIEW_MAP[resourceLayout][stem];\n}\n\n/**\n * Registered custom FC view shapes — the two 3-day views are defined as\n * durations over the base `resourceTimeGrid` / `resourceTimeline` types.\n * Kept at module scope because the object is a compile-time constant.\n * Typed loosely to match FC's `ViewConfigInputHash` ( `[viewType: string]:\n * ViewConfigInput` ).\n */\nconst CALENDAR_CUSTOM_VIEWS: Record<\n string,\n { type: string; duration: { days: number } }\n> = {\n resourceTimeGridThreeDays: {\n type: 'resourceTimeGrid',\n duration: { days: 3 },\n },\n resourceTimelineThreeDays: {\n type: 'resourceTimeline',\n duration: { days: 3 },\n },\n};\n\nexport type CalendarEventStatus =\n | 'confirmed'\n | 'waiting'\n | 'in_care'\n | 'done'\n | 'cancelled'\n | 'absent';\n\nexport type CalendarMode = 'default' | 'create' | 'move' | 'copy';\n\nexport interface CalendarEvent {\n id: string;\n title: string;\n start: string | Date;\n end?: string | Date;\n resourceId?: string;\n allDay?: boolean;\n\n /* Appointment-specific (all optional) */\n status?: CalendarEventStatus;\n /** Hex colour from a DoctorColor palette — overrides CVA bg. */\n backgroundColor?: string;\n /** Hex colour from a DoctorColor palette — overrides CVA text. */\n textColor?: string;\n /** Extra description rendered after the title in normal weight. */\n suffix?: string;\n /** Masked title shown when `privacyMode` is true. */\n privacyModeTitle?: string;\n /** Shows a Globe icon + zebra overlay. */\n isBookedOnline?: boolean;\n /** Shows an AlertTriangle icon. */\n hasUnassignedPatient?: boolean;\n /** Shows a HeartPulse icon. */\n hasHighlightedAnamnesis?: boolean;\n /** Shows a Euro icon. */\n hasBillableAmount?: boolean;\n /** Shows a Video icon. */\n isTelehealth?: boolean;\n isRecurrenceParent?: boolean;\n /** Rendered as a background event; not clickable. */\n isInternal?: boolean;\n patientId?: string | number;\n operatorId?: string | number;\n}\n\nexport interface CalendarResource {\n id: string;\n title: string;\n /** Initials for the compact \"avatar\" label (e.g. \"MR\"). */\n shortTitle?: string;\n /** Hex background colour for the dot or initials circle. */\n color?: string;\n /** Hex text colour for the initials circle. */\n shortTitleTextColor?: string;\n /** Numeric ordering — passed to FullCalendar's `resourceOrder`. */\n sequenceNumber?: number;\n}\n\nexport interface CalendarEventDropInfo {\n event: CalendarEvent;\n oldStart: Date;\n newStart: Date;\n}\n\nexport interface CalendarEventResizeInfo {\n event: CalendarEvent;\n oldEnd: Date;\n newEnd: Date;\n}\n\nexport interface CalendarDateSelectInfo {\n start: Date;\n end: Date;\n allDay: boolean;\n resourceId?: string;\n}\n\nexport interface CalendarProps {\n /**\n * Stable identifier for this calendar instance. Used for the agent-readiness\n * `data-component-id` attribute and the agent registry. Required only when\n * the consuming app expects an MCP / agent integration to address this\n * specific calendar.\n */\n id?: string;\n /** Events to render on the calendar. */\n events: CalendarEvent[];\n /** Resources for `resourceTimeline` view. */\n resources?: CalendarResource[];\n /** Active view. */\n view?: CalendarView;\n /** Initial date (string or Date). */\n initialDate?: string | Date;\n /** Locale override — defaults to the active i18next language. */\n locale?: string;\n /** Fires when an event is dragged to a new slot. */\n onEventDrop?: (info: CalendarEventDropInfo) => void;\n /** Fires when an event is resized. */\n onEventResize?: (info: CalendarEventResizeInfo) => void;\n /** Fires when an event resize gesture begins. */\n onEventResizeStart?: () => void;\n /** Fires when an event is clicked. */\n onEventClick?: (event: CalendarEvent) => void;\n /** Fires when the user click-drags a range to create a new event. */\n onDateSelect?: (range: CalendarDateSelectInfo) => void;\n /** Allow drag-drop rescheduling. */\n editable?: boolean;\n /** Allow resize gestures on events. Defaults to `editable`. */\n eventDurationEditable?: boolean;\n /** Allow click-drag to create. */\n selectable?: boolean;\n /** Height of the calendar. */\n height?: number | string;\n /** Extra class names on the wrapper. */\n className?: string;\n /** Mask patient titles — announces state changes via aria-live. */\n privacyMode?: boolean;\n /** Interaction mode — renders a sticky banner when not `'default'`. */\n mode?: CalendarMode;\n /** Override text for the mode banner. */\n modeLabel?: string;\n /** Hex background colour for the mode banner (consuming-app supplied). */\n modeBannerColor?: string;\n /** Hex text colour for the mode banner. */\n modeBannerTextColor?: string;\n /** Cancel handler wired to the mode banner button. */\n onModeCancel?: () => void;\n /** Optional alert banner rendered above the mode banner. */\n alertBanner?: ReactNode;\n /** Lower bound of the time axis (e.g. '07:00'). */\n slotMinTime?: string;\n /** Upper bound of the time axis (e.g. '23:00'). */\n slotMaxTime?: string;\n /** Slot duration (e.g. '00:15'). */\n slotDuration?: string;\n /** When false, hides the inline time pill on events. */\n showTime?: boolean;\n /** Place date headers above the resource axis. */\n datesAboveResources?: boolean;\n /** Allow overlapping events in the same slot. */\n slotEventOverlap?: boolean;\n /** Keep date headers pinned during scroll. */\n stickyHeaderDates?: boolean;\n /** Show a now-indicator line on time-grid views. */\n nowIndicator?: boolean;\n /** Collapse overflow events into \"+N more\" links. */\n dayMaxEvents?: boolean | number;\n /**\n * FullCalendar Scheduler premium license key. Required for the\n * `resourceTimeline` view. Defaults to `VITE_FULLCALENDAR_LICENSE_KEY`\n * from the environment; consumers can override per-instance.\n */\n schedulerLicenseKey?: string;\n /**\n * Show the built-in toolbar. Default true. Pass false to hide it\n * entirely (e.g. when the consuming app renders its own\n * `<Calendar.Toolbar ... />` elsewhere on the page).\n */\n toolbar?: boolean;\n /**\n * Extra controls rendered at the inline-end of the default toolbar —\n * commonly a view switcher, a privacy toggle, or an \"add appointment\"\n * button. Ignored when `toolbar` is false.\n */\n toolbarEnd?: ReactNode;\n /**\n * Orientation for resource views. `vertical` (default) uses\n * `resourceTimeGrid` — resources as columns, time as rows.\n * `horizontal` uses `resourceTimeline` — resources as rows, time as columns.\n * Ignored for non-resource views.\n */\n resourceLayout?: 'vertical' | 'horizontal';\n /**\n * When true, render a round initials avatar (using\n * `resource.shortTitle` + `resource.color` + `resource.shortTitleTextColor`)\n * in the resource label. When false (default), a small coloured dot\n * prefixes the title when `resource.color` is set.\n */\n showResourceInitials?: boolean;\n}\n\nexport interface CalendarHandle {\n /** Returns the internal FullCalendar instance for advanced use. */\n getApi: () => unknown;\n /** Jump to today. */\n today: () => void;\n /** Navigate to the previous period. */\n prev: () => void;\n /** Navigate to the next period. */\n next: () => void;\n /** Navigate to an arbitrary date. */\n gotoDate: (date: Date | string) => void;\n /** Switch the active view. */\n changeView: (view: CalendarView) => void;\n /** Current view title (e.g. \"April 2026\") — reflects the FC API getter. */\n getTitle: () => string;\n /** Currently active view name. */\n getCurrentView: () => CalendarView | undefined;\n /** Currently focused date — the anchor of the visible range. */\n getCurrentDate: () => Date | undefined;\n /** Scroll to an event by id and briefly highlight it. */\n focusEvent: (eventId: string) => void;\n}\n\n/* Narrow structural interface for the subset of the FullCalendar API\n we actually invoke. Keeps the handle methods typed without pulling\n `@fullcalendar/core` types across the public boundary. */\ninterface FcApi {\n today: () => void;\n prev: () => void;\n next: () => void;\n gotoDate: (date: Date | string) => void;\n changeView: (view: string) => void;\n render: () => void;\n getDate: () => Date;\n view: { title: string; type: string };\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA — status → event card classes */\n/* ------------------------------------------------------------------ */\n\nconst eventCardVariants = cva(\n [\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]',\n 'ds:w-full ds:h-full',\n 'ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:text-[length:var(--font-size-sm)]',\n 'ds:font-[var(--font-weight-medium)]',\n 'ds:overflow-hidden',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)]',\n 'ds:focus-visible:outline-[var(--ring)]',\n 'ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n ].join(' '),\n {\n variants: {\n status: {\n // Note: every text-[…] uses the explicit `color:` prefix so\n // Tailwind interprets it as a colour, not a length. Without the\n // prefix, `text-[var(--X)]` resolves to font-size and the text\n // colour falls through to the inherited `--foreground` — which\n // produced 2.07:1 axe failures on saturated backgrounds.\n confirmed:\n 'ds:bg-[color:var(--success)] ds:text-[color:var(--success-solid-foreground)] ds:border ds:border-[color:var(--success)]',\n waiting:\n 'ds:bg-[color:var(--info)] ds:text-[color:var(--info-solid-foreground)] ds:border ds:border-[color:var(--info)]',\n in_care:\n 'ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:border ds:border-[color:var(--primary)]',\n // `done` reads as \"completed, fading out\". Previously\n // `bg-color-mix(--success 70%, transparent) text-success-solid-foreground`,\n // composited to ~#65a586 with white text → 2.88:1 fail.\n // Now uses a low-saturation tint background with dark\n // `--foreground` text + a left accent bar carrying the status\n // hue.\n done: 'ds:bg-[color:color-mix(in_srgb,var(--success)_18%,var(--background))] ds:text-[color:var(--foreground)] ds:border-s-[3px] ds:border-s-[color:var(--success)] ds:border-y ds:border-e ds:border-y-[color:color-mix(in_srgb,var(--success)_25%,var(--border))] ds:border-e-[color:color-mix(in_srgb,var(--success)_25%,var(--border))]',\n cancelled:\n 'ds:bg-[color:var(--destructive)] ds:text-[color:var(--destructive-foreground)] ds:border ds:border-[color:var(--destructive)] ds:line-through',\n absent:\n 'ds:bg-[color:var(--warning)] ds:text-[color:var(--warning-solid-foreground)] ds:border ds:border-[color:var(--warning)]',\n default:\n 'ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:border ds:border-[color:var(--primary)]',\n },\n },\n defaultVariants: { status: 'default' },\n },\n);\n\nconst STATUS_ICON: Record<CalendarEventStatus, LucideIcon> = {\n confirmed: ThumbsUp,\n waiting: Clock,\n in_care: Stethoscope,\n done: Check,\n cancelled: Ban,\n absent: Zap,\n};\n\n/* Mode banner → i18n key lookup. Kept as a literal object (not a\n template) so static-analysis extractors can find every key. */\nconst MODE_BANNER_KEYS: Record<Exclude<CalendarMode, 'default'>, string> = {\n create: 'calendar.modeBanner.create',\n move: 'calendar.modeBanner.move',\n copy: 'calendar.modeBanner.copy',\n};\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\ninterface LocaleWeekInfo {\n firstDay?: number;\n}\n\ninterface LocaleWithWeekInfo {\n getWeekInfo?: () => LocaleWeekInfo;\n weekInfo?: LocaleWeekInfo;\n}\n\n/**\n * Resolve the first day of the week for a locale using the modern\n * `Intl.Locale.getWeekInfo()` API when available, falling back to Monday\n * for EU-leaning locales and Sunday for en-US / he-IL / ar-SA.\n */\nexport function resolveFirstDay(locale: string): number {\n try {\n const intlLocale = new Intl.Locale(locale) as unknown as LocaleWithWeekInfo;\n const info =\n typeof intlLocale.getWeekInfo === 'function'\n ? intlLocale.getWeekInfo()\n : intlLocale.weekInfo;\n if (info && typeof info.firstDay === 'number') {\n return info.firstDay % 7;\n }\n } catch {\n /* no-op — fall through to heuristic */\n }\n if (\n locale.startsWith('en-US') ||\n locale.startsWith('he') ||\n locale.startsWith('ar-SA')\n ) {\n return 0;\n }\n return 1;\n}\n\n/**\n * Small hook that mirrors the parent Calendar's document-dir observer\n * so sub-components can swap physical icons for logical direction\n * without threading a prop through. Returns true when the effective\n * document direction is RTL.\n */\nfunction useIsRtl(): boolean {\n const { i18n } = useTranslation();\n const [isRtl, setIsRtl] = useState<boolean>(() => {\n if (typeof document === 'undefined') return false;\n const docDir = document.documentElement.getAttribute('dir');\n const i18nDir = typeof i18n.dir === 'function' ? i18n.dir() : 'ltr';\n return docDir === 'rtl' || i18nDir === 'rtl';\n });\n\n useEffect(() => {\n if (typeof document === 'undefined') return undefined;\n const observer = new MutationObserver(() => {\n const docDir = document.documentElement.getAttribute('dir');\n const i18nDir = typeof i18n.dir === 'function' ? i18n.dir() : 'ltr';\n setIsRtl(docDir === 'rtl' || i18nDir === 'rtl');\n });\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['dir', 'lang'],\n });\n return () => observer.disconnect();\n }, [i18n]);\n\n return isRtl;\n}\n\n/* ------------------------------------------------------------------ */\n/* Event content render-prop */\n/* */\n/* Renders the event card with: */\n/* - a status icon (aria-hidden) coloured by status token */\n/* - indicator icons (online, unassigned, anamnesis, billable, tele) */\n/* - a time range pill (when !allDay && showTime) */\n/* - the event title (bold, masked in privacy mode) */\n/* - an optional suffix (regular weight) */\n/* - an aria-label built from title + range + resource + status */\n/* ------------------------------------------------------------------ */\n\ninterface RenderEventContentParams {\n arg: EventContentArg;\n locale: string;\n resources: CalendarResource[];\n statusLabels: Record<CalendarEventStatus, string>;\n privacyMode: boolean;\n showTime: boolean;\n}\n\ntype EventExtendedProps = Omit<\n CalendarEvent,\n 'id' | 'title' | 'start' | 'end' | 'allDay'\n>;\n\nfunction renderEventContent({\n arg,\n locale,\n resources,\n statusLabels,\n privacyMode,\n showTime,\n}: RenderEventContentParams): ReactElement {\n const extended = (arg.event.extendedProps ?? {}) as EventExtendedProps;\n const {\n status,\n backgroundColor,\n textColor,\n suffix,\n privacyModeTitle,\n isBookedOnline,\n hasUnassignedPatient,\n hasHighlightedAnamnesis,\n hasBillableAmount,\n isTelehealth,\n resourceId,\n } = extended;\n\n const StatusIcon = status ? STATUS_ICON[status] : null;\n\n const start = arg.event.start;\n const end = arg.event.end ?? arg.event.start;\n const allDay = arg.event.allDay;\n\n let rangeText = '';\n if (start && end) {\n try {\n const fmt = new Intl.DateTimeFormat(locale, {\n hour: '2-digit',\n minute: '2-digit',\n hour12: false,\n });\n rangeText =\n typeof fmt.formatRange === 'function'\n ? fmt.formatRange(start, end)\n : `${fmt.format(start)} – ${fmt.format(end)}`;\n } catch {\n rangeText = '';\n }\n }\n\n const resourceTitle = resourceId\n ? resources.find((r) => r.id === resourceId)?.title\n : undefined;\n const statusLabel = status ? statusLabels[status] : undefined;\n\n const displayTitle = privacyMode\n ? (privacyModeTitle ?? '•••')\n : arg.event.title;\n\n const ariaLabel = [displayTitle, rangeText, resourceTitle, statusLabel]\n .filter(Boolean)\n .join(', ');\n\n /* Per-event colour override: the consuming app passes a runtime hex\n from a DoctorColor (Material-Design style) palette. 23-constraints\n permits inline `style` only as a CSS custom property setter for\n runtime values that can't be enumerated at build time — the\n consuming `background-color` / `color` references live in the\n className as Tailwind arbitrary values. */\n const colourOverrides: CSSProperties | undefined =\n backgroundColor || textColor\n ? {\n ...(backgroundColor\n ? ({ '--calendar-event-bg': backgroundColor } as CSSProperties)\n : {}),\n ...(textColor\n ? ({ '--calendar-event-text': textColor } as CSSProperties)\n : {}),\n }\n : undefined;\n\n /* DEV-only guardrail: warn when caller-supplied bg/fg hex pair falls\n below WCAG AA. No-op when either half is missing (fg missing falls\n back to the DS foreground token, which isn't a hex we can check). */\n if (backgroundColor || textColor) {\n warnLowContrast(backgroundColor, textColor, `event ${arg.event.id}`);\n }\n\n const className = [\n eventCardVariants({ status: status ?? 'default' }),\n isBookedOnline ? 'event-booked-online' : null,\n backgroundColor ? 'ds:[background-color:var(--calendar-event-bg)]' : null,\n textColor ? 'ds:[color:var(--calendar-event-text)]' : null,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div\n className={className}\n // eslint-disable-next-line react/forbid-dom-props -- caller-supplied event bg/text hex injected via CSS variables\n style={colourOverrides}\n aria-label={ariaLabel}\n data-event-id={arg.event.id}\n >\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:self-end\">\n {StatusIcon ? <StatusIcon size={14} aria-hidden=\"true\" /> : null}\n {isBookedOnline ? <Globe size={12} aria-hidden=\"true\" /> : null}\n {hasUnassignedPatient ? (\n <AlertTriangle size={12} aria-hidden=\"true\" />\n ) : null}\n {hasHighlightedAnamnesis ? (\n <HeartPulse size={12} aria-hidden=\"true\" />\n ) : null}\n {hasBillableAmount ? <Euro size={12} aria-hidden=\"true\" /> : null}\n {isTelehealth ? <Video size={12} aria-hidden=\"true\" /> : null}\n </div>\n {showTime && !allDay && rangeText ? (\n // No opacity here — composing 70% over saturated bgs (success /\n // destructive / primary) drops effective contrast below WCAG AA\n // (≤ 3.82:1 measured). The smaller font-size-xs vs the title's\n // font-weight-semibold provides sufficient visual hierarchy.\n <span className=\"ds:text-[length:var(--font-size-xs)]\">\n {rangeText}\n </span>\n ) : null}\n <span className=\"ds:font-[var(--font-weight-semibold)] ds:truncate ds:text-start\">\n {displayTitle}\n </span>\n {suffix ? (\n <span className=\"ds:truncate ds:text-start ds:text-[length:var(--font-size-xs)]\">\n {suffix}\n </span>\n ) : null}\n </div>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* CalendarToolbar — compound sub-component */\n/* */\n/* Renders the DS-styled prev/today/next controls + a centered <h2> */\n/* title (aria-live so navigation updates announce politely) plus an */\n/* optional inline-end slot. Logical properties only; physical icons */\n/* (ChevronLeft / ChevronRight) are swapped in RTL so the pair always */\n/* points in the expected reading direction. */\n/* ------------------------------------------------------------------ */\n\nexport interface CalendarToolbarProps {\n /** Title shown in the toolbar (e.g. \"April 2026\"). Typically\n * produced by `calendarHandle.getTitle()`. */\n title?: string;\n /** Jump to today. */\n onToday: () => void;\n /** Navigate to the previous period. */\n onPrev: () => void;\n /** Navigate to the next period. */\n onNext: () => void;\n /** Extra controls rendered at the inline-end. */\n end?: ReactNode;\n /** Additional className. */\n className?: string;\n}\n\nconst toolbarButtonBaseClass = [\n 'ds:inline-flex ds:items-center ds:justify-center',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n 'ds:border ds:border-[var(--border)]',\n 'ds:rounded-[var(--radius-full)]',\n 'ds:font-[var(--font-weight-medium)] ds:text-[length:var(--font-size-sm)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]',\n 'ds:hover:bg-[var(--muted)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)]',\n 'ds:focus-visible:outline-[var(--ring)]',\n 'ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:motion-reduce:transition-none',\n].join(' ');\n\nconst toolbarTextButtonClass = [\n toolbarButtonBaseClass,\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n].join(' ');\n\nconst toolbarIconButtonClass = [\n toolbarButtonBaseClass,\n 'ds:min-w-[var(--min-target-size)]',\n].join(' ');\n\nexport const CalendarToolbar = forwardRef<HTMLDivElement, CalendarToolbarProps>(\n ({ title, onToday, onPrev, onNext, end, className }, ref) => {\n const { t } = useTranslation();\n const isRtl = useIsRtl();\n const PrevIcon = isRtl ? ChevronRight : ChevronLeft;\n const NextIcon = isRtl ? ChevronLeft : ChevronRight;\n\n const rootClassName = [\n 'ds:calendar-toolbar',\n 'ds:sticky ds:top-0 ds:z-20',\n 'ds:flex ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:py-[var(--spacing-sm)]',\n 'ds:bg-[var(--background)]',\n 'ds:border-b ds:border-[var(--border)]',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <div ref={ref} className={rootClassName}>\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <button\n type=\"button\"\n onClick={onToday}\n className={toolbarTextButtonClass}\n >\n {t('calendar.today')}\n </button>\n <button\n type=\"button\"\n onClick={onPrev}\n aria-label={t('calendar.previousPeriod')}\n className={toolbarIconButtonClass}\n >\n <PrevIcon size={16} aria-hidden=\"true\" />\n </button>\n <button\n type=\"button\"\n onClick={onNext}\n aria-label={t('calendar.nextPeriod')}\n className={toolbarIconButtonClass}\n >\n <NextIcon size={16} aria-hidden=\"true\" />\n </button>\n </div>\n {title ? (\n <h2\n aria-live=\"polite\"\n className=\"ds:flex-1 ds:text-center ds:truncate type-title-card\"\n >\n {title}\n </h2>\n ) : (\n /* Keep the centering slot stable even before the first\n `datesSet` populates the title — an empty <h2> would trip\n axe's `empty-heading` rule, so we substitute a decorative\n spacer that matches the h2's flex sizing. Once `title` is\n non-empty the h2 renders in the same slot. */\n <div aria-hidden=\"true\" className=\"ds:flex-1 ds:text-center\" />\n )}\n {end ? (\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n {end}\n </div>\n ) : null}\n </div>\n );\n },\n);\nCalendarToolbar.displayName = 'Calendar.Toolbar';\n\n/* ------------------------------------------------------------------ */\n/* Calendar component */\n/* ------------------------------------------------------------------ */\n\nconst CalendarInner = forwardRef<CalendarHandle, CalendarProps>(\n (\n {\n id,\n events,\n resources,\n view = 'dayGridMonth',\n initialDate,\n locale: localeProp,\n onEventDrop,\n onEventResize,\n onEventResizeStart,\n onEventClick,\n onDateSelect,\n editable = false,\n eventDurationEditable,\n selectable = false,\n height,\n className,\n privacyMode = false,\n mode = 'default',\n modeLabel,\n modeBannerColor,\n modeBannerTextColor,\n onModeCancel,\n alertBanner,\n slotMinTime,\n slotMaxTime,\n slotDuration,\n showTime = true,\n datesAboveResources = true,\n slotEventOverlap = false,\n stickyHeaderDates = true,\n nowIndicator = true,\n dayMaxEvents = true,\n schedulerLicenseKey = import.meta.env.VITE_FULLCALENDAR_LICENSE_KEY,\n toolbar = true,\n toolbarEnd,\n resourceLayout = 'vertical',\n showResourceInitials = false,\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const fcRef = useRef<FullCalendar | null>(null);\n const rootRef = useRef<HTMLDivElement>(null);\n const liveRegionRef = useRef<HTMLDivElement>(null);\n const focusTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const focusedElRef = useRef<HTMLElement | null>(null);\n\n const locale = localeProp ?? i18n.language ?? 'en';\n\n /* ---- direction reacts to dir attribute changes ----------------- */\n const [direction, setDirection] = useState<'ltr' | 'rtl'>(() => {\n if (typeof document === 'undefined') return 'ltr';\n const docDir = document.documentElement.getAttribute('dir');\n const i18nDir = typeof i18n.dir === 'function' ? i18n.dir() : 'ltr';\n return docDir === 'rtl' || i18nDir === 'rtl' ? 'rtl' : 'ltr';\n });\n\n useEffect(() => {\n if (typeof document === 'undefined') return undefined;\n const observer = new MutationObserver(() => {\n const docDir = document.documentElement.getAttribute('dir');\n const i18nDir = typeof i18n.dir === 'function' ? i18n.dir() : 'ltr';\n setDirection(docDir === 'rtl' || i18nDir === 'rtl' ? 'rtl' : 'ltr');\n });\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['dir', 'lang'],\n });\n return () => observer.disconnect();\n }, [i18n]);\n\n /* ---- theme class-change observer → forces FullCalendar repaint - */\n useEffect(() => {\n if (typeof document === 'undefined') return undefined;\n let timer: ReturnType<typeof setTimeout>;\n const observer = new MutationObserver(() => {\n clearTimeout(timer);\n timer = setTimeout(() => {\n const api = fcRef.current?.getApi() as unknown;\n if (\n api &&\n typeof (api as { render?: () => void }).render === 'function'\n ) {\n (api as { render: () => void }).render();\n }\n }, 50);\n });\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['class'],\n });\n return () => {\n clearTimeout(timer);\n observer.disconnect();\n };\n }, []);\n\n /* ---- FullCalendar markup a11y patches --------------------------- */\n /* */\n /* FullCalendar emits a few markup patterns that axe (correctly) */\n /* flags but we cannot fix without forking FC. Patching at */\n /* render-time via MutationObserver keeps the fix scoped: */\n /* */\n /* 1. `<a aria-expanded aria-controls>` for the daygrid \"+N more\" */\n /* trigger has no `role` — `aria-expanded` is not allowed on a */\n /* bare anchor. Add `role=\"button\"`. */\n /* 2. `.fc-scroller` is a scrollable region with no keyboard */\n /* access — give it `tabindex=\"0\"` and `role=\"region\"` so */\n /* keyboard users can scroll it. */\n /* 3. `.fc-bg-event` (background events used for highlight ranges) */\n /* is rendered with `aria-hidden=\"true\"` ancestor + an inner */\n /* `<a tabindex=\"0\">` — strip the focusability when */\n /* `aria-hidden` is in effect. */\n useEffect(() => {\n if (typeof document === 'undefined') return undefined;\n const root = rootRef.current;\n if (!root) return undefined;\n\n const patchMarkup = () => {\n root\n .querySelectorAll<HTMLAnchorElement>('.fc-daygrid-more-link')\n .forEach((link) => {\n if (!link.getAttribute('role')) {\n link.setAttribute('role', 'button');\n }\n });\n // `.fc-scroller` cannot be patched — adding `tabindex=\"0\"`\n // makes it a focusable direct child of FC's `<table\n // role=\"grid\">`, which axe (correctly) flags as a violation of\n // `aria-required-children` (a grid expects only `role=\"row\"`\n // children). The `scrollable-region-focusable` rule will need\n // an upstream FC fix or per-story override; for now we accept\n // it. (Tracked: deferred.)\n // Inside any aria-hidden subtree, force focusable descendants to\n // tabindex=\"-1\" so they leave the tab sequence (axe\n // aria-hidden-focus). FC marks decorative rows / mirror events\n // aria-hidden but leaves the inner anchors focusable.\n root\n .querySelectorAll<HTMLElement>('[aria-hidden=\"true\"]')\n .forEach((hidden) => {\n hidden\n .querySelectorAll<HTMLElement>(\n 'a[href], button, [tabindex]:not([tabindex=\"-1\"])',\n )\n .forEach((el) => {\n el.setAttribute('tabindex', '-1');\n });\n });\n };\n\n patchMarkup();\n const observer = new MutationObserver(patchMarkup);\n observer.observe(root, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['aria-hidden'],\n });\n return () => observer.disconnect();\n }, [t]);\n\n /* ---- reduced-motion gate --------------------------------------- */\n const reducedMotion = usePrefersReducedMotion();\n\n /* ---- current title (synced from FC via datesSet) --------------- */\n const [currentTitle, setCurrentTitle] = useState('');\n\n /* ---- imperative handle ----------------------------------------- */\n const handle = useMemo<CalendarHandle>(() => {\n const getRawApi = (): FcApi | undefined =>\n fcRef.current?.getApi() as FcApi | undefined;\n\n return {\n getApi: () => fcRef.current?.getApi(),\n today: () => {\n getRawApi()?.today();\n },\n prev: () => {\n getRawApi()?.prev();\n },\n next: () => {\n getRawApi()?.next();\n },\n gotoDate: (date: Date | string) => {\n getRawApi()?.gotoDate(date);\n },\n changeView: (nextView: CalendarView) => {\n getRawApi()?.changeView(\n resolveFullCalendarView(nextView, resourceLayout),\n );\n },\n getTitle: () => getRawApi()?.view.title ?? '',\n getCurrentView: () => {\n const type = getRawApi()?.view.type;\n return type as CalendarView | undefined;\n },\n getCurrentDate: () => getRawApi()?.getDate(),\n focusEvent: (eventId: string) => {\n const root = rootRef.current;\n if (!root) return;\n const selector = `[data-event-id=\"${CSS.escape(eventId)}\"]`;\n const element = root.querySelector<HTMLElement>(selector);\n if (!element) {\n if (import.meta.env.DEV) {\n console.warn(\n `[Calendar] focusEvent: no DOM node matches event id \"${eventId}\".`,\n );\n }\n return;\n }\n /* Clear any previous highlight still in-flight before\n starting a new one — prevents overlapping timers from\n removing the className mid-animation. */\n if (focusTimerRef.current) {\n clearTimeout(focusTimerRef.current);\n focusTimerRef.current = null;\n }\n if (focusedElRef.current && focusedElRef.current !== element) {\n focusedElRef.current.classList.remove('calendar-event-focused');\n }\n\n element.scrollIntoView({\n behavior: reducedMotion ? 'auto' : 'smooth',\n block: 'center',\n });\n element.classList.add('calendar-event-focused');\n focusedElRef.current = element;\n\n /* Announce via aria-live, masking the title under privacy\n mode the same way drop/resize do. */\n if (liveRegionRef.current) {\n const titleAttr = element.getAttribute('aria-label') ?? eventId;\n const announcedTitle = privacyMode ? '•••' : titleAttr;\n liveRegionRef.current.textContent = t('calendar.focusedEvent', {\n title: announcedTitle,\n });\n }\n\n focusTimerRef.current = setTimeout(() => {\n element.classList.remove('calendar-event-focused');\n if (focusedElRef.current === element) {\n focusedElRef.current = null;\n }\n focusTimerRef.current = null;\n }, 3000);\n },\n };\n }, [reducedMotion, privacyMode, t, resourceLayout]);\n\n useImperativeHandle(ref, () => handle, [handle]);\n useAgentRegistration(calendarAgent, handle, id);\n\n /* Clean up any pending focus timer on unmount. */\n useEffect(\n () => () => {\n if (focusTimerRef.current) {\n clearTimeout(focusTimerRef.current);\n focusTimerRef.current = null;\n }\n },\n [],\n );\n\n /* ---- translated toolbar button labels (used by FC internal when\n we opt in to its toolbar — currently always off in the default\n path; retained for noEventsText / allDayText completeness) ---- */\n const statusLabels = useMemo<Record<CalendarEventStatus, string>>(\n () => ({\n confirmed: t('calendar.status.confirmed'),\n waiting: t('calendar.status.waiting'),\n in_care: t('calendar.status.inCare'),\n done: t('calendar.status.done'),\n cancelled: t('calendar.status.cancelled'),\n absent: t('calendar.status.absent'),\n }),\n [t],\n );\n\n /* ---- privacy-mode announcer (skip initial render) --------------- */\n const privacyFirstRun = useRef(true);\n useEffect(() => {\n if (privacyFirstRun.current) {\n privacyFirstRun.current = false;\n return;\n }\n if (liveRegionRef.current) {\n liveRegionRef.current.textContent = privacyMode\n ? t('calendar.privacyModeOn')\n : t('calendar.privacyModeOff');\n }\n }, [privacyMode, t]);\n\n /* ---- adapt events for FullCalendar ----------------------------- */\n const fcEvents = useMemo<EventInput[]>(\n () =>\n events.map((event) => ({\n id: event.id,\n title: event.title,\n start: event.start,\n end: event.end,\n allDay: event.allDay,\n resourceId: event.resourceId,\n display: event.isInternal ? 'background' : undefined,\n extendedProps: {\n status: event.status,\n resourceId: event.resourceId,\n backgroundColor: event.backgroundColor,\n textColor: event.textColor,\n suffix: event.suffix,\n privacyModeTitle: event.privacyModeTitle,\n isBookedOnline: event.isBookedOnline ?? false,\n hasUnassignedPatient: event.hasUnassignedPatient ?? false,\n hasHighlightedAnamnesis: event.hasHighlightedAnamnesis ?? false,\n hasBillableAmount: event.hasBillableAmount ?? false,\n isTelehealth: event.isTelehealth ?? false,\n isRecurrenceParent: event.isRecurrenceParent ?? false,\n isInternal: event.isInternal ?? false,\n patientId: event.patientId,\n operatorId: event.operatorId,\n },\n })),\n [events],\n );\n\n /* ---- formatters (Intl, never literal format strings) ----------- */\n const titleFormat = useMemo(\n () => ({\n year: 'numeric' as const,\n month: 'long' as const,\n }),\n [],\n );\n const dayHeaderFormat = useMemo(\n () => ({\n weekday: 'short' as const,\n }),\n [],\n );\n const eventTimeFormat = useMemo(\n () => ({\n hour: 'numeric' as const,\n minute: '2-digit' as const,\n }),\n [],\n );\n const slotLabelFormat = useMemo(\n () => ({\n hour: 'numeric' as const,\n minute: '2-digit' as const,\n }),\n [],\n );\n\n /* ---- helper: adapt FC event to CalendarEvent -------------------- */\n const adaptEvent = (\n fcEvent: EventDropArg['event'] | EventClickArg['event'],\n ): CalendarEvent => {\n const ext = (fcEvent.extendedProps ?? {}) as EventExtendedProps;\n return {\n id: fcEvent.id,\n title: fcEvent.title,\n start: fcEvent.start ?? new Date(),\n end: fcEvent.end ?? undefined,\n resourceId: ext.resourceId,\n status: ext.status,\n allDay: fcEvent.allDay,\n backgroundColor: ext.backgroundColor,\n textColor: ext.textColor,\n suffix: ext.suffix,\n privacyModeTitle: ext.privacyModeTitle,\n isBookedOnline: ext.isBookedOnline,\n hasUnassignedPatient: ext.hasUnassignedPatient,\n hasHighlightedAnamnesis: ext.hasHighlightedAnamnesis,\n hasBillableAmount: ext.hasBillableAmount,\n isTelehealth: ext.isTelehealth,\n isRecurrenceParent: ext.isRecurrenceParent,\n isInternal: ext.isInternal,\n patientId: ext.patientId,\n operatorId: ext.operatorId,\n };\n };\n\n /* ---- callbacks ------------------------------------------------- */\n const handleEventDrop = useMemo(() => {\n if (!onEventDrop) return undefined;\n return (info: EventDropArg) => {\n if (!info.event.start) return;\n // `info.oldEvent.start` is the only reliable source for the pre-drag\n // time — FullCalendar guarantees it is non-null for a drop on an\n // event that had a start. The `delta` field is unsafe to subtract\n // because it reports calendrical components (years/months/days +\n // sub-day ms), not a single ms offset, and month/year reconstruction\n // is ambiguous across boundaries. If oldStart is somehow missing we\n // bail rather than produce a silently-wrong value.\n const oldStart = info.oldEvent.start;\n if (!oldStart) {\n if (import.meta.env.DEV) {\n console.warn(\n '[Calendar] handleEventDrop: oldEvent.start was null — dropping the event-drop callback rather than emitting wrong oldStart data.',\n );\n }\n return;\n }\n onEventDrop({\n event: adaptEvent(info.event),\n oldStart,\n newStart: info.event.start,\n });\n /* Announce via aria-live. The announced title must honour\n privacyMode — the event card's aria-label already masks, but\n the live-region text is a separate codepath that would leak\n the raw name on drop if not masked here too. */\n if (liveRegionRef.current) {\n const ext = (info.event.extendedProps ?? {}) as EventExtendedProps;\n const announcedTitle = privacyMode\n ? (ext.privacyModeTitle ?? '•••')\n : info.event.title;\n liveRegionRef.current.textContent = t('calendar.eventMoved', {\n title: announcedTitle,\n });\n }\n };\n }, [onEventDrop, privacyMode, t]);\n\n const handleEventResize = useMemo(() => {\n if (!onEventResize) return undefined;\n return (info: EventResizeDoneArg) => {\n if (!info.event.end) return;\n // Mirror the drop path: rely on `info.oldEvent.end` for the pre-resize\n // boundary. Bail on null rather than fabricating a value from deltas.\n const oldEnd = info.oldEvent.end;\n if (!oldEnd) {\n if (import.meta.env.DEV) {\n console.warn(\n '[Calendar] handleEventResize: oldEvent.end was null — dropping the resize callback rather than emitting wrong oldEnd data.',\n );\n }\n return;\n }\n const newEnd = info.event.end;\n // Fall back to the pre-resize start (info.oldEvent.start), not\n // oldEnd — using oldEnd collapses cancelled drags to a zero-minute\n // duration in the live-region announcement.\n const newStart = info.event.start ?? info.oldEvent.start ?? oldEnd;\n onEventResize({\n event: adaptEvent(info.event),\n oldEnd,\n newEnd,\n });\n if (liveRegionRef.current) {\n const duration = Math.round(\n (newEnd.getTime() - newStart.getTime()) / 60000,\n );\n /* Mirror the drop path: mask the title when privacyMode is on. */\n const ext = (info.event.extendedProps ?? {}) as EventExtendedProps;\n const announcedTitle = privacyMode\n ? (ext.privacyModeTitle ?? '•••')\n : info.event.title;\n liveRegionRef.current.textContent = t('calendar.eventResized', {\n title: announcedTitle,\n duration,\n });\n }\n };\n }, [onEventResize, privacyMode, t]);\n\n const handleEventClick = useMemo(() => {\n if (!onEventClick) return undefined;\n return (info: EventClickArg) => {\n if (!info.event.start) return;\n onEventClick(adaptEvent(info.event));\n };\n }, [onEventClick]);\n\n const handleDateSelect = useMemo(() => {\n if (!onDateSelect) return undefined;\n return (info: DateSelectArg) => {\n onDateSelect({\n start: info.start,\n end: info.end,\n allDay: info.allDay,\n resourceId: info.resource?.id,\n });\n };\n }, [onDateSelect]);\n\n const handleDatesSet = useCallback((info: DatesSetArg) => {\n setCurrentTitle(info.view.title);\n }, []);\n\n /* ---- firstDay from locale -------------------------------------- */\n const firstDay = useMemo(() => resolveFirstDay(locale), [locale]);\n\n /* ---- plugins --------------------------------------------------- */\n const plugins = useMemo(\n () => [\n dayGridPlugin,\n timeGridPlugin,\n listPlugin,\n interactionPlugin,\n resourcePlugin,\n resourceTimeGridPlugin,\n resourceTimelinePlugin,\n timelinePlugin,\n ],\n [],\n );\n\n /* ---- resolved internal FC view name ---------------------------- */\n const resolvedView = useMemo(\n () => resolveFullCalendarView(view, resourceLayout),\n [view, resourceLayout],\n );\n\n /* ---- resource label render prop -------------------------------- */\n /* FC's `resourceLabelContent` supplies a `ResourceApi` whose\n `extendedProps` is typed as `{ [k: string]: any }`. We narrow to\n just the fields we pushed through `fcResources` via a local\n interface reached by an `unknown` pivot — keeps the DS body free\n of `any` while accepting FC's runtime shape. */\n interface ResourceExtendedProps {\n shortTitle?: string;\n color?: string;\n shortTitleTextColor?: string;\n }\n\n const renderResourceLabel = useCallback(\n (arg: ResourceLabelContentArg): ReactElement => {\n const ext = arg.resource\n .extendedProps as unknown as ResourceExtendedProps;\n const title = arg.resource.title;\n const shortTitle = ext.shortTitle;\n const color = ext.color;\n const textColor = ext.shortTitleTextColor;\n\n /* Runtime caller-supplied hex values flow through inline CSS\n custom properties only; the consuming `background-color` /\n `color` references live in the className as Tailwind arbitrary\n values, matching the event/mode-banner pattern (see\n 23-constraints §Runtime-computed dimensions).\n\n Inline style — permitted per 23-constraints §Runtime-computed\n dimensions (CSS custom property setters for --resource-color /\n --resource-initials-text-color). */\n const swatchStyle: CSSProperties | undefined =\n color || textColor\n ? {\n ...(color\n ? ({ '--resource-color': color } as CSSProperties)\n : {}),\n ...(textColor\n ? ({\n '--resource-initials-text-color': textColor,\n } as CSSProperties)\n : {}),\n }\n : undefined;\n\n if (showResourceInitials && shortTitle && color) {\n /* DEV-only guardrail: the initials circle is the one resource\n branch that actually paints text over the caller-supplied\n colour. Warn when the pair falls below WCAG AA. */\n warnLowContrast(color, textColor, `resource ${arg.resource.id}`);\n const initialsClass = [\n 'resource-initials',\n 'ds:[background-color:var(--resource-color)]',\n textColor ? 'ds:[color:var(--resource-initials-text-color)]' : null,\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <span className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span\n className={initialsClass}\n // eslint-disable-next-line react/forbid-dom-props -- caller-supplied resource colours injected via CSS variables\n style={swatchStyle}\n aria-hidden=\"true\"\n >\n {shortTitle}\n </span>\n <span className=\"ds:truncate ds:text-start\">{title}</span>\n </span>\n );\n }\n\n if (color) {\n /* Dot branch has no text, but callers may still pass both halves\n of the pair in anticipation of flipping `showResourceInitials`.\n Only warn when both are defined — otherwise we'd noisily\n suggest a textColor that the dot renderer ignores. */\n if (color && textColor) {\n warnLowContrast(color, textColor, `resource ${arg.resource.id}`);\n }\n return (\n <span className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span\n className=\"resource-dot ds:[background-color:var(--resource-color)]\"\n // eslint-disable-next-line react/forbid-dom-props -- caller-supplied resource colour injected via CSS variable\n style={swatchStyle}\n aria-hidden=\"true\"\n />\n <span className=\"ds:truncate ds:text-start\">{title}</span>\n </span>\n );\n }\n\n return (\n <span className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <span className=\"ds:truncate ds:text-start\">{title}</span>\n </span>\n );\n },\n [showResourceInitials],\n );\n\n /* ---- resources adapted for FC with extendedProps --------------- */\n const fcResources = useMemo(\n () =>\n resources?.map((resource) => ({\n id: resource.id,\n title: resource.title,\n sequenceNumber: resource.sequenceNumber,\n extendedProps: {\n shortTitle: resource.shortTitle,\n color: resource.color,\n shortTitleTextColor: resource.shortTitleTextColor,\n sequenceNumber: resource.sequenceNumber,\n },\n })),\n [resources],\n );\n\n /* ---- default-toolbar button handlers --------------------------- */\n const handleToolbarToday = useCallback(() => {\n (fcRef.current?.getApi() as FcApi | undefined)?.today();\n }, []);\n const handleToolbarPrev = useCallback(() => {\n (fcRef.current?.getApi() as FcApi | undefined)?.prev();\n }, []);\n const handleToolbarNext = useCallback(() => {\n (fcRef.current?.getApi() as FcApi | undefined)?.next();\n }, []);\n\n const wrapperClassName = [\n 'fc-theme-alfadocs',\n 'ds:bg-background ds:text-foreground',\n 'ds:rounded-[var(--radius-md)]',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n /* Mode banner style — runtime caller-supplied hex values flow through\n inline CSS-variable assignments only. The consuming\n `background-color` / `color` references live in the className as\n Tailwind arbitrary values, same justification as the event\n colour overrides above. */\n const modeBannerStyle: CSSProperties | undefined =\n modeBannerColor || modeBannerTextColor\n ? {\n ...(modeBannerColor\n ? ({ '--calendar-mode-bg': modeBannerColor } as CSSProperties)\n : {}),\n ...(modeBannerTextColor\n ? ({ '--calendar-mode-fg': modeBannerTextColor } as CSSProperties)\n : {}),\n }\n : undefined;\n\n /* DEV-only guardrail: warn when the caller-supplied mode-banner\n bg/fg hex pair falls below WCAG AA. No-op when either half is\n missing — the component falls back to --muted / --muted-foreground\n which are already calibrated to AA. */\n if (mode !== 'default' && (modeBannerColor || modeBannerTextColor)) {\n warnLowContrast(modeBannerColor, modeBannerTextColor, 'mode banner');\n }\n\n /* Static key map — keeps i18n-extraction tools (i18next-parser, etc.)\n happy, since they can't resolve template-literal keys. */\n const resolvedModeLabel =\n mode !== 'default' ? (modeLabel ?? t(MODE_BANNER_KEYS[mode])) : '';\n\n const modeBannerClassName = [\n 'ds:sticky ds:top-0 ds:z-10',\n 'ds:flex ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:py-[var(--spacing-sm)]',\n /* Caller-supplied colours flow through CSS custom properties set\n in `modeBannerStyle`; fallback tokens apply when the caller\n doesn't supply a hex. */\n modeBannerColor\n ? 'ds:[background-color:var(--calendar-mode-bg)]'\n : 'ds:bg-[var(--muted)]',\n modeBannerTextColor\n ? 'ds:[color:var(--calendar-mode-fg)]'\n : 'ds:text-[var(--muted-foreground)]',\n ]\n .filter(Boolean)\n .join(' ');\n\n const modeCancelClassName = [\n 'ds:inline-flex ds:items-center ds:justify-center',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:rounded-[var(--radius-full)]',\n 'ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n 'ds:border ds:border-[var(--border)]',\n 'ds:font-[var(--font-weight-medium)] ds:text-[length:var(--font-size-sm)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]',\n 'ds:hover:bg-[var(--muted)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)]',\n 'ds:focus-visible:outline-[var(--ring)]',\n 'ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:motion-reduce:transition-none',\n ].join(' ');\n\n return (\n <div\n ref={rootRef}\n className={wrapperClassName}\n role=\"region\"\n aria-label={t('calendar.ariaLabel')}\n data-component=\"calendar\"\n data-component-id={id}\n data-mode={mode}\n >\n <div\n ref={liveRegionRef}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n className=\"ds:sr-only\"\n />\n {alertBanner}\n {/* role=\"status\" already implies aria-live=\"polite\" +\n aria-atomic=\"true\"; setting the live attributes explicitly\n causes double announcements in some AT combinations. */}\n {mode !== 'default' ? (\n <div\n className={modeBannerClassName}\n // eslint-disable-next-line react/forbid-dom-props -- caller-supplied mode banner colours injected via CSS variables\n style={modeBannerStyle}\n role=\"status\"\n >\n <span className=\"ds:flex-1 ds:text-start\">{resolvedModeLabel}</span>\n {onModeCancel ? (\n <button\n type=\"button\"\n onClick={onModeCancel}\n className={modeCancelClassName}\n >\n {t('calendar.modeBanner.cancel')}\n </button>\n ) : null}\n </div>\n ) : null}\n {toolbar !== false ? (\n <CalendarToolbar\n title={currentTitle}\n onToday={handleToolbarToday}\n onPrev={handleToolbarPrev}\n onNext={handleToolbarNext}\n end={toolbarEnd}\n />\n ) : null}\n <FullCalendar\n ref={fcRef}\n plugins={plugins}\n schedulerLicenseKey={schedulerLicenseKey}\n initialView={resolvedView}\n views={CALENDAR_CUSTOM_VIEWS}\n initialDate={initialDate}\n locale={locale}\n direction={direction}\n firstDay={firstDay}\n editable={editable}\n eventDurationEditable={eventDurationEditable ?? editable}\n selectable={selectable}\n droppable={editable}\n dayMaxEvents={dayMaxEvents}\n height={height}\n events={fcEvents}\n resources={fcResources}\n resourceOrder=\"sequenceNumber\"\n resourceLabelContent={renderResourceLabel}\n headerToolbar={false}\n allDayText={t('calendar.allDay')}\n noEventsText={t('calendar.noEvents')}\n titleFormat={titleFormat}\n dayHeaderFormat={dayHeaderFormat}\n eventTimeFormat={eventTimeFormat}\n slotLabelFormat={slotLabelFormat}\n slotMinTime={slotMinTime ?? '00:00:00'}\n slotMaxTime={slotMaxTime ?? '24:00:00'}\n slotDuration={slotDuration ?? '00:30:00'}\n // Explicit `slotLabelInterval` — FullCalendar 6.1.x crashes\n // inside `wholeDivideDurations` / `addDurations` when its\n // internal default computation produces an undefined Duration\n // (`Cannot read properties of undefined (reading 'years')`).\n // Passing all three slot props as explicit strings bypasses\n // the fragile default-resolution path. 1h matches FC's\n // documented default for day/week views.\n slotLabelInterval=\"01:00:00\"\n datesAboveResources={datesAboveResources}\n slotEventOverlap={slotEventOverlap}\n stickyHeaderDates={stickyHeaderDates}\n nowIndicator={nowIndicator}\n eventLongPressDelay={reducedMotion ? 0 : 1000}\n eventDragMinDistance={reducedMotion ? 0 : 5}\n eventContent={(arg) =>\n renderEventContent({\n arg,\n locale,\n resources: resources ?? [],\n statusLabels,\n privacyMode,\n showTime,\n })\n }\n eventClick={handleEventClick}\n eventDrop={handleEventDrop}\n eventResize={handleEventResize}\n eventResizeStart={onEventResizeStart}\n select={handleDateSelect}\n datesSet={handleDatesSet}\n />\n </div>\n );\n },\n);\nCalendarInner.displayName = 'Calendar';\n\n/* Compound attachment — exposes `<Calendar.Toolbar />` so consumers can\n render a standalone toolbar bound to their own handle-driven handlers\n when they hide the built-in toolbar via `toolbar={false}`. The\n `typeof CalendarInner & { Toolbar }` widening is the single acceptable\n cast called out in the implementation plan. */\ntype CalendarComponent = typeof CalendarInner & {\n Toolbar: typeof CalendarToolbar;\n};\nexport const Calendar = CalendarInner as CalendarComponent;\nCalendar.Toolbar = CalendarToolbar;\n"],"names":["__iconNode","Ban","createLucideIcon","Euro","ThumbsUp","Video","Zap","calendarAgent","handle","_a","args","RESOURCE_VIEW_MAP","STANDARD_VIEWS","resolveFullCalendarView","view","resourceLayout","stem","CALENDAR_CUSTOM_VIEWS","eventCardVariants","cva","STATUS_ICON","Clock","Stethoscope","Check","MODE_BANNER_KEYS","resolveFirstDay","locale","intlLocale","info","useIsRtl","i18n","useTranslation","isRtl","setIsRtl","useState","docDir","i18nDir","useEffect","observer","renderEventContent","arg","resources","statusLabels","privacyMode","showTime","extended","status","backgroundColor","textColor","suffix","privacyModeTitle","isBookedOnline","hasUnassignedPatient","hasHighlightedAnamnesis","hasBillableAmount","isTelehealth","resourceId","StatusIcon","start","end","allDay","rangeText","fmt","resourceTitle","r","statusLabel","displayTitle","ariaLabel","colourOverrides","className","jsxs","Globe","AlertTriangle","HeartPulse","toolbarButtonBaseClass","toolbarTextButtonClass","toolbarIconButtonClass","CalendarToolbar","forwardRef","title","onToday","onPrev","onNext","ref","t","PrevIcon","ChevronRight","ChevronLeft","NextIcon","rootClassName","jsx","CalendarInner","id","events","initialDate","localeProp","onEventDrop","onEventResize","onEventResizeStart","onEventClick","onDateSelect","editable","eventDurationEditable","selectable","height","mode","modeLabel","modeBannerColor","modeBannerTextColor","onModeCancel","alertBanner","slotMinTime","slotMaxTime","slotDuration","datesAboveResources","slotEventOverlap","stickyHeaderDates","nowIndicator","dayMaxEvents","schedulerLicenseKey","toolbar","toolbarEnd","showResourceInitials","fcRef","useRef","rootRef","liveRegionRef","focusTimerRef","focusedElRef","direction","setDirection","timer","api","root","patchMarkup","link","hidden","el","reducedMotion","usePrefersReducedMotion","currentTitle","setCurrentTitle","useMemo","getRawApi","date","nextView","eventId","selector","element","titleAttr","announcedTitle","useImperativeHandle","useAgentRegistration","privacyFirstRun","fcEvents","event","titleFormat","dayHeaderFormat","eventTimeFormat","slotLabelFormat","adaptEvent","fcEvent","ext","handleEventDrop","oldStart","handleEventResize","oldEnd","newEnd","newStart","duration","handleEventClick","handleDateSelect","handleDatesSet","useCallback","firstDay","plugins","dayGridPlugin","timeGridPlugin","listPlugin","interactionPlugin","resourcePlugin","resourceTimeGridPlugin","resourceTimelinePlugin","timelinePlugin","resolvedView","renderResourceLabel","shortTitle","color","swatchStyle","initialsClass","fcResources","resource","handleToolbarToday","_b","handleToolbarPrev","handleToolbarNext","wrapperClassName","modeBannerStyle","resolvedModeLabel","modeBannerClassName","modeCancelClassName","FullCalendar","Calendar"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,MAAM,KAAK,UAAU;AAAA,EACzD,CAAC,QAAQ,EAAE,GAAG,6BAA6B,KAAK,SAAQ,CAAE;AAC5D,GACMC,KAAMC,EAAiB,OAAOF,EAAU;ACb9C;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAAA,EACzC,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;A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cAChD,YAAAE;AAAA,cACA,WAAWF;AAAA,cACX,cAAAiB;AAAA,cACA,QAAAd;AAAA,cACA,QAAQkD;AAAA,cACR,WAAWoC;AAAA,cACX,eAAc;AAAA,cACd,sBAAsBL;AAAA,cACtB,eAAe;AAAA,cACf,YAAYrG,EAAE,iBAAiB;AAAA,cAC/B,cAAcA,EAAE,mBAAmB;AAAA,cACnC,aAAAwE;AAAA,cACA,iBAAAC;AAAA,cACA,iBAAAC;AAAA,cACA,iBAAAC;AAAA,cACA,aAAahD,KAAe;AAAA,cAC5B,aAAaC,KAAe;AAAA,cAC5B,cAAcC,KAAgB;AAAA,cAQ9B,mBAAkB;AAAA,cAClB,qBAAAC;AAAA,cACA,kBAAAC;AAAA,cACA,mBAAAC;AAAA,cACA,cAAAC;AAAA,cACA,qBAAqBqB,IAAgB,IAAI;AAAA,cACzC,sBAAsBA,IAAgB,IAAI;AAAA,cAC1C,cAAc,CAAClG,MACbD,GAAmB;AAAA,gBACjB,KAAAC;AAAA,gBACA,QAAAd;AAAA,gBACA,WAAWe,KAAa,CAAA;AAAA,gBACxB,cAAAC;AAAA,gBACA,aAAAC;AAAA,gBACA,UAAAC;AAAA,cAAA,CACD;AAAA,cAEH,YAAY8H;AAAA,cACZ,WAAWP;AAAA,cACX,aAAaE;AAAA,cACb,kBAAkBnE;AAAA,cAClB,QAAQyE;AAAA,cACR,UAAUC;AAAA,YAAA;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAjF,GAAc,cAAc;AAUrB,MAAM+G,KAAW/G;AACxB+G,GAAS,UAAU7H;","x_google_ignoreList":[0,1,2,3,4]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat-message-B5JpFj0F.js","sources":["../../src/components/chat-message/chat-message.tsx"],"sourcesContent":["import {\n forwardRef,\n Fragment,\n useMemo,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { AlertCircle, Check, Clock, RotateCcw } from 'lucide-react';\nimport { Button } from '../button';\nimport { Avatar } from '../avatar';\nimport { Timestamp } from '../timestamp';\nimport { safeImageSrc } from '../_shared';\nimport { CodeBlock, splitCodeFences } from '../_shared/code-block';\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport type ChatMessageRole = 'user' | 'assistant' | 'system';\nexport type ChatMessageStatus = 'sending' | 'sent' | 'error' | 'edited';\n\nexport interface ChatMessageAvatar {\n name?: string;\n src?: string;\n /**\n * Optional custom avatar node. When provided, it REPLACES the built-in\n * `<Avatar>` (initials / image) for this message. Used by the Alia\n * pattern to render a Sparkles identity tile instead of an avatar, and\n * by consumers that want to swap in a user-icon chip, brand glyph, etc.\n * The caller is responsible for accessible labelling on the custom node\n * — ChatMessage's own `aria-label` already announces the role/time, so\n * purely decorative nodes can be `aria-hidden`.\n */\n slot?: ReactNode;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst rowVariants = cva(\n 'ds:flex ds:w-full ds:items-start ds:gap-[var(--spacing-sm)]',\n {\n variants: {\n role: {\n user: 'ds:flex-row-reverse',\n assistant: 'ds:flex-row',\n system: 'ds:flex-col ds:items-center ds:text-center',\n },\n },\n defaultVariants: { role: 'assistant' },\n },\n);\n\nconst bubbleVariants = cva(\n [\n // Cap at 42rem on wide surfaces; on narrow docks (Alia sidebar ≈22rem)\n // leave room for the avatar column (size-8 = 32px = --spacing-xl) +\n // `gap-sm` (8px = --spacing-sm) so avatars don't clip off the inline\n // edge when the row is width-constrained.\n 'ds:relative ds:max-w-[min(42rem,calc(100%-var(--spacing-xl)-var(--spacing-sm)))]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]',\n 'type-body',\n 'ds:break-words',\n ].join(' '),\n {\n variants: {\n role: {\n user: 'ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:rounded-[var(--radius-md)] ds:rounded-ee-[var(--radius-sm)]',\n assistant:\n 'ds:bg-muted/40 ds:text-foreground ds:rounded-[var(--radius-md)] ds:rounded-es-[var(--radius-sm)]',\n system:\n 'ds:bg-transparent ds:text-[color:var(--muted-foreground)] type-body-sm ds:italic',\n },\n },\n defaultVariants: { role: 'assistant' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Safe markdown-ish (bold, inline code, line-breaks, links as text) */\n/* No dangerouslySetInnerHTML. */\n/* ------------------------------------------------------------------ */\n\ntype Token =\n | { type: 'text'; value: string }\n | { type: 'bold'; value: string }\n | { type: 'code'; value: string }\n | { type: 'br' }\n | { type: 'link'; label: string; href: string };\n\nconst SAFE_SCHEMES = /^(https?:|mailto:)/i;\n\nfunction tokenize(input: string): Token[] {\n const tokens: Token[] = [];\n let remaining = input;\n const pattern = /\\*\\*([^*]+)\\*\\*|`([^`]+)`|\\[([^\\]]+)\\]\\(([^)]+)\\)|\\n/;\n while (remaining.length > 0) {\n const match = pattern.exec(remaining);\n if (!match) {\n tokens.push({ type: 'text', value: remaining });\n break;\n }\n if (match.index > 0) {\n tokens.push({ type: 'text', value: remaining.slice(0, match.index) });\n }\n if (match[1] !== undefined) {\n tokens.push({ type: 'bold', value: match[1] });\n } else if (match[2] !== undefined) {\n tokens.push({ type: 'code', value: match[2] });\n } else if (match[3] !== undefined && match[4] !== undefined) {\n tokens.push({ type: 'link', label: match[3], href: match[4] });\n } else {\n tokens.push({ type: 'br' });\n }\n remaining = remaining.slice(match.index + match[0].length);\n }\n return tokens;\n}\n\nfunction renderInline(input: string): ReactNode {\n return tokenize(input).map((tok, i) => {\n if (tok.type === 'bold') return <strong key={i}>{tok.value}</strong>;\n if (tok.type === 'code') {\n return (\n <code\n key={i}\n dir=\"ltr\"\n className=\"ds:rounded-[var(--radius-sm)] ds:bg-muted/30 ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:font-[family-name:var(--font-mono)]\"\n >\n {tok.value}\n </code>\n );\n }\n if (tok.type === 'br') return <br key={i} />;\n if (tok.type === 'link') {\n if (!SAFE_SCHEMES.test(tok.href)) {\n // Unsafe scheme (javascript:, data:) — render as inert text.\n return <Fragment key={i}>{tok.label}</Fragment>;\n }\n return (\n <a\n key={i}\n href={tok.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"ds:underline ds:underline-offset-2 ds:hover:opacity-80\"\n >\n {tok.label}\n </a>\n );\n }\n return <Fragment key={i}>{tok.value}</Fragment>;\n });\n}\n\n/**\n * Render a message body: split fenced code blocks out to `<CodeBlock>` and run\n * the inline tokenizer over the surrounding text runs.\n */\nfunction renderBody(input: string): ReactNode {\n return splitCodeFences(input).map((seg, i) => {\n if (seg.type === 'code') {\n return <CodeBlock key={i} code={seg.value} language={seg.lang} />;\n }\n return <Fragment key={i}>{renderInline(seg.value)}</Fragment>;\n });\n}\n\n/* ------------------------------------------------------------------ */\n/* ChatMessage */\n/* ------------------------------------------------------------------ */\n\ntype NativeProps = Omit<HTMLAttributes<HTMLElement>, 'content' | 'role'>;\n\nexport interface ChatMessageProps\n extends NativeProps, VariantProps<typeof bubbleVariants> {\n role: ChatMessageRole;\n content: string;\n avatar?: ChatMessageAvatar;\n timestamp?: Date | number | string;\n status?: ChatMessageStatus;\n /** Parse a small, safe subset of markdown. Never renders raw HTML. */\n renderMarkdown?: boolean;\n /** Invoked when the retry button is activated (error status only). */\n onRetry?: () => void;\n /**\n * Optional action row rendered beneath the message body + timestamp,\n * aligned with the message (e.g. the Alia pattern's Copy / Download\n * buttons on assistant messages). Default off → renders nothing.\n */\n actions?: ReactNode;\n}\n\nexport const ChatMessage = forwardRef<HTMLElement, ChatMessageProps>(\n (\n {\n role,\n content,\n avatar,\n timestamp,\n status,\n renderMarkdown = false,\n onRetry,\n actions,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n\n // Local format — used for the aria-label interpolation only. Visible\n // label is rendered by `<Timestamp>` below, which computes the same\n // locale-aware HH:MM internally.\n const formattedTime = useMemo(() => {\n if (!timestamp) return null;\n const date = timestamp instanceof Date ? timestamp : new Date(timestamp);\n if (Number.isNaN(date.getTime())) return null;\n return new Intl.DateTimeFormat(i18n.language, {\n hour: '2-digit',\n minute: '2-digit',\n }).format(date);\n }, [timestamp, i18n.language]);\n\n const roleLabel = t(`chat.message.role.${role}`);\n const messageLabel = formattedTime\n ? t('chat.message.label', { role: roleLabel, time: formattedTime })\n : t('chat.message.labelNoTime', { role: roleLabel });\n\n const body = renderMarkdown ? renderBody(content) : content;\n\n const statusIcon = (() => {\n if (!status || status === 'edited') return null;\n if (status === 'sending')\n return <Clock aria-hidden=\"true\" className=\"ds:size-3.5\" />;\n if (status === 'sent')\n return <Check aria-hidden=\"true\" className=\"ds:size-3.5\" />;\n return (\n <AlertCircle\n aria-hidden=\"true\"\n className=\"ds:size-3.5 ds:text-[color:var(--destructive)]\"\n />\n );\n })();\n\n const statusText = status ? t(`chat.message.status.${status}`) : null;\n\n return (\n <article\n ref={ref}\n aria-label={messageLabel}\n data-component=\"chat-message\"\n className={[\n rowVariants({ role, className }),\n // Entrance: fade + slide up on mount. `--animation-duration` is 0ms\n // under `prefers-reduced-motion` and `.theme-accessible`, so both\n // collapse the animation to an instant state change automatically.\n 'ds:motion-safe:animate-in ds:motion-safe:fade-in-0 ds:motion-safe:slide-in-from-bottom-2',\n 'ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]',\n ].join(' ')}\n {...rest}\n >\n {role !== 'system' && avatar ? (\n avatar.slot ? (\n // Consumer-supplied avatar node (e.g. Alia's Sparkles tile).\n avatar.slot\n ) : (\n // Allow-list the src: LLM-supplied values can carry\n // `javascript:` / `data:text/html` / `data:image/svg+xml` and so\n // are scrubbed here before reaching <Avatar>. Fallback to initials.\n <Avatar\n name={avatar.name}\n src={safeImageSrc(avatar.src)}\n size=\"sm\"\n />\n )\n ) : null}\n\n <div\n className={[\n // min-w-0 allows this flex item to shrink below its content's\n // natural width — without it, a single unbreakable token (URL,\n // CJK run, hash) can force the bubble wider than the parent\n // and spill outside narrow containers like the Alia sidebar.\n 'ds:flex ds:flex-col ds:min-w-0',\n role === 'user'\n ? 'ds:items-end'\n : role === 'assistant'\n ? 'ds:items-start'\n : 'ds:items-center',\n ].join(' ')}\n >\n <div\n dir=\"auto\"\n className={[\n bubbleVariants({ role }),\n // `break-words` (from bubbleVariants) handles soft hyphens;\n // `overflow-wrap: anywhere` is the last-resort break for\n // URLs, hashes, or CJK runs that would otherwise push the\n // bubble wider than its parent in narrow docks like Alia.\n 'ds:[overflow-wrap:anywhere]',\n ].join(' ')}\n >\n {body}\n </div>\n\n {(formattedTime || statusText) && role !== 'system' ? (\n <div\n className={[\n 'ds:mt-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'type-meta ds:text-[color:var(--muted-foreground)]',\n ].join(' ')}\n >\n {timestamp ? (\n <Timestamp\n value={timestamp}\n format=\"absolute\"\n absoluteFormat={{ hour: '2-digit', minute: '2-digit' }}\n dir=\"ltr\"\n />\n ) : null}\n {statusIcon ? (\n // `key={status}` re-mounts the span on every status change so\n // `animate-in` re-runs — gives the sending → sent → error\n // swap a subtle cross-fade instead of an abrupt pop.\n <span\n key={status}\n className={[\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:motion-safe:animate-in ds:motion-safe:fade-in-0',\n 'ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]',\n ].join(' ')}\n >\n {statusIcon}\n <span className=\"ds:sr-only\">{statusText}</span>\n </span>\n ) : null}\n {status === 'error' && onRetry ? (\n <Button\n intent=\"ghost\"\n size=\"sm\"\n onClick={onRetry}\n startIcon={<RotateCcw />}\n >\n {t('chat.message.retry')}\n </Button>\n ) : null}\n </div>\n ) : null}\n {actions ? (\n <div className=\"ds:mt-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n {actions}\n </div>\n ) : null}\n </div>\n </article>\n );\n },\n);\n\nChatMessage.displayName = 'ChatMessage';\n"],"names":["rowVariants","cva","bubbleVariants","SAFE_SCHEMES","tokenize","input","tokens","remaining","pattern","match","renderInline","tok","i","jsx","Fragment","renderBody","splitCodeFences","seg","CodeBlock","ChatMessage","forwardRef","role","content","avatar","timestamp","status","renderMarkdown","onRetry","actions","className","rest","ref","t","i18n","useTranslation","formattedTime","useMemo","date","roleLabel","messageLabel","body","statusIcon","Clock","Check","AlertCircle","statusText","jsxs","Avatar","safeImageSrc","Timestamp","Button","RotateCcw"],"mappings":";;;;;;;;;;;;;AA0CA,MAAMA,IAAcC;AAAA,EAClB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,WAAW;AAAA,QACX,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,IAEF,iBAAiB,EAAE,MAAM,YAAA;AAAA,EAAY;AAEzC,GAEMC,IAAiBD;AAAA,EACrB;AAAA;AAAA;AAAA;AAAA;AAAA,IAKE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,EACA,KAAK,GAAG;AAAA,EACV;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,WACE;AAAA,QACF,QACE;AAAA,MAAA;AAAA,IACJ;AAAA,IAEF,iBAAiB,EAAE,MAAM,YAAA;AAAA,EAAY;AAEzC,GAcME,IAAe;AAErB,SAASC,EAASC,GAAwB;AACxC,QAAMC,IAAkB,CAAA;AACxB,MAAIC,IAAYF;AAChB,QAAMG,IAAU;AAChB,SAAOD,EAAU,SAAS,KAAG;AAC3B,UAAME,IAAQD,EAAQ,KAAKD,CAAS;AACpC,QAAI,CAACE,GAAO;AACV,MAAAH,EAAO,KAAK,EAAE,MAAM,QAAQ,OAAOC,GAAW;AAC9C;AAAA,IACF;AACA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yuAPXM.js","sources":["../../node_modules/lucide-react/dist/esm/icons/banknote.js","../../node_modules/lucide-react/dist/esm/icons/phone.js","../../src/components/contact-profile-card/contact-profile-card.agent.ts","../../src/components/contact-profile-card/contact-profile-card.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"rect\", { width: \"20\", height: \"12\", x: \"2\", y: \"6\", rx: \"2\", key: \"9lu3g6\" }],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"2\", key: \"1c9p78\" }],\n [\"path\", { d: \"M6 12h.01M18 12h.01\", key: \"113zkx\" }]\n];\nconst Banknote = createLucideIcon(\"banknote\", __iconNode);\n\nexport { __iconNode, Banknote as default };\n//# sourceMappingURL=banknote.js.map\n","/**\n * @license lucide-react v1.8.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384\",\n key: \"9njp5v\"\n }\n ]\n];\nconst Phone = createLucideIcon(\"phone\", __iconNode);\n\nexport { __iconNode, Phone as default };\n//# sourceMappingURL=phone.js.map\n","import type { AgentAdapter } from '../../agent/types';\nimport type { ContactProfileCardHandle } from './contact-profile-card';\n\n/* -------------------------------------------------------------------- */\n/* Agent adapter — ContactProfileCard */\n/* */\n/* Read-only adapter. Surfaces the rendered profession field so an */\n/* agent / MCP runtime can resolve \"what kind of practice is this?\" */\n/* without re-parsing the DOM. No actions yet — the card is a passive */\n/* presentation surface; navigation lives on the consumer's page. */\n/* -------------------------------------------------------------------- */\n\nexport const contactProfileCardAgent: AgentAdapter<ContactProfileCardHandle> = {\n id: 'contact-profile-card',\n capabilities: ['view_change'],\n state: {\n profession: {\n type: 'string',\n descriptionKey: 'ui.agent.contactProfileCard.state.profession',\n description:\n 'Profession string the card is currently rendering — undefined when the consumer omitted it.',\n read: (handle) => handle.getProfession(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'contact-profile-card',\n description: 'Marks the ContactProfileCard root region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useId,\n useMemo,\n type ComponentPropsWithoutRef,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport {\n Banknote,\n ExternalLink,\n Globe,\n Heart,\n Languages as LanguagesIcon,\n Mail,\n MapPin,\n MessageCircle,\n Phone,\n ShieldCheck,\n Stethoscope,\n type LucideIcon,\n} from 'lucide-react';\nimport { Badge } from '../badge/badge';\nimport { Card } from '../card/card';\nimport { KeyValueList, KeyValuePair } from '../key-value-pair/key-value-pair';\nimport { Link } from '../link/link';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { contactProfileCardAgent } from './contact-profile-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* ContactProfileCard */\n/* */\n/* Replaces the bespoke \"Profilo\" / \"Practice info\" cards that every */\n/* AlfaDocs surface composes by hand (booking-website PracticeInfoCard, */\n/* alfascribe operator pages, builders docs example, …). Composes Card */\n/* + KeyValueList + KeyValuePair so the labels share a column (no */\n/* zigzag values) and every row uses the same lucide icon family. */\n/* */\n/* The component is intentionally opinionated: every field is optional, */\n/* but the ORDER, ICONS, and LABELS are owned by the kit. Consumers */\n/* pass the data; the kit owns the visual + i18n. */\n/* */\n/* All visible text flows through `useTranslation('ui')` against the */\n/* `contactProfileCard.*` namespace. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\n// Override the KVP icon colour at the card root so every inner row's\n// leading glyph paints with `--accent` (brand magenta/violet) instead\n// of the default `--muted-foreground`. The ContactProfileCard is a\n// marketing surface — muted icons read as disabled against the\n// otherwise saturated card chrome. Scoped via CSS custom property so\n// only this card's icons shift; standalone KVPs elsewhere keep\n// `--muted-foreground`.\nconst rootVariants = cva(\n 'ds:w-full ds:text-[color:var(--foreground)] ds:[--key-value-pair-icon-color:var(--accent)]',\n {\n variants: {\n // Matches the kit's other `surface` props (Booking, ReviewsPanel).\n // The card itself renders `<Card variant=\"elevated\">` so the\n // `surface=\"flat\"` opt-out is rare — most consumers want the\n // boundary.\n surface: {\n flat: '',\n elevated: '',\n },\n },\n defaultVariants: { surface: 'elevated' },\n },\n);\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface ContactProfileCardAddress {\n /** Display text — already formatted by the consumer (street, postcode, city). */\n line: string;\n /** Optional lat/lng — drives the static-map link + the embedded thumbnail. */\n lat?: number;\n lng?: number;\n}\n\nexport interface ContactProfileCardHandle {\n /** Resolved consumer-supplied data — useful for agent introspection. */\n getProfession: () => string | undefined;\n}\n\nexport interface ContactProfileCardProps extends Omit<\n ComponentPropsWithoutRef<'div'>,\n 'aria-label' | 'children' | 'children'\n> {\n /**\n * Override the localised \"Profilo\" / \"Profile\" heading. Most\n * consumers leave this unset.\n */\n heading?: string;\n /**\n * Free-text intro paragraph rendered above the data rows (e.g.\n * the practice's `bookingDescription` field). When omitted, the\n * card jumps straight into the data rows.\n */\n description?: string;\n\n /* ----- Identity rows ----- */\n\n /** Street + postcode + city, with optional lat/lng for the map link. */\n address?: ContactProfileCardAddress;\n /** Phone number, displayed as-is. Compiled into a `tel:` link. */\n phone?: string;\n /**\n * WhatsApp number — digits only (no `+`, no spaces). Compiled into\n * a `https://wa.me/<number>` link with an optional pre-filled message.\n */\n whatsappNumber?: string;\n /** Optional pre-filled WhatsApp message. Consumer-localised. */\n whatsappMessage?: string;\n /** Public-facing email. Compiled into a `mailto:` link. */\n email?: string;\n /** Practice website (already an absolute URL with protocol). */\n website?: string;\n\n /* ----- Embedded map thumbnail ----- */\n\n /**\n * Google Maps Static API key. When provided alongside `address.lat`\n * and `address.lng`, renders a static-map thumbnail at the top of\n * the card — a single one-shot `<img>` fetch, no JS SDK boot, no\n * consent gate needed (the same pattern PracticeResults uses).\n *\n * Without it (or without coords), the card renders info rows only —\n * the address row's \"Open in Google Maps\" link is still emitted as\n * a real `<a>` so the spatial cue isn't lost.\n *\n * Additive — existing consumers that don't pass this prop see the\n * same render as before.\n */\n googleMapsApiKey?: string;\n /**\n * Zoom level for the embedded map thumbnail. Default `14` —\n * neighbourhood-level, shows the pin in context. Ignored when the\n * thumbnail isn't rendered.\n */\n mapZoom?: number;\n\n /* ----- Profile metadata ----- */\n\n /**\n * ISO 639-1 language codes the practice speaks. Rendered as\n * `<Badge variant=\"neutral\">` chips. Each code is auto-resolved\n * into the active locale's native language name via the kit's\n * built-in `languages.<iso>` i18n bundle (18 ISO codes × 18\n * locales). For example `languages={['it', 'en']}` with\n * `i18n.language === 'it'` renders \"Italiano\" + \"Inglese\".\n *\n * Unknown / unbundled codes fall back to the uppercase ISO code\n * (`'xyz'` → `'XYZ'`). To override a specific label — regional\n * dialect, brand-voice variant, codes the kit doesn't ship — pass\n * `languageLabels`.\n */\n languages?: string[];\n /**\n * Override map from ISO code → display label, applied on top of\n * the kit's i18n auto-resolution. Only set when you need a\n * consumer-specific label for a code — the typical case is\n * regional dialect / brand-voice variants / non-ISO codes.\n *\n * Resolution order: `languageLabels[code]` > `t('languages.<code>')`\n * > `code.toUpperCase()`.\n */\n languageLabels?: Record<string, string>;\n /**\n * Insurance / convention strings (consumer-supplied, free text).\n * Rendered as `<Badge variant=\"info\">` chips.\n */\n insurances?: string[];\n /**\n * First-visit price in the smallest currency unit (cents / centesimi).\n * Formatted via `Intl.NumberFormat`. Omit when the consumer doesn't\n * want to show the price.\n */\n firstVisitPriceCents?: number;\n /** ISO-4217 currency code for the price formatter. Defaults to `EUR`. */\n currencyCode?: string;\n /** Profession line — single value or already-joined comma list. */\n profession?: string;\n /** Show the \"expert for anxious patients\" row when true. */\n specializedInFearPatients?: boolean;\n\n /* ----- Telemetry hooks ----- */\n\n /**\n * Fires when the patient clicks the phone link. The kit emits a\n * `track('practice_profile_card_phone_click')` event before\n * invoking this — gate consumer-side analytics on the same event\n * to avoid duplicate fires.\n */\n onPhoneClick?: () => void;\n /** Fires when the patient clicks the WhatsApp link. */\n onWhatsAppClick?: () => void;\n /** Fires when the patient clicks the static-map link. */\n onMapClick?: () => void;\n /** Fires when the patient clicks the email mailto link. */\n onEmailClick?: () => void;\n\n /* ----- Slots ----- */\n\n /**\n * Rendered above the heading — e.g. a `<Avatar>` for the operator\n * variant, or a coloured chip strip. Optional.\n */\n headerSlot?: ReactNode;\n /**\n * Render an arbitrary map widget at the top of the card chrome —\n * replaces the built-in static `<img>` thumbnail that\n * `googleMapsApiKey` would otherwise produce. Use this when you\n * want an interactive map inside the card boundary instead of a\n * fixed image:\n *\n * <ContactProfileCard\n * mapSlot={\n * <PracticeMap practice={practice} googleMapsApiKey={key} />\n * }\n * …\n * />\n *\n * When both `mapSlot` and `googleMapsApiKey` are provided, the slot\n * wins (explicit > implicit). When neither is provided, no map area\n * renders. The slot is unstyled — pass through any container chrome\n * the consumer wants (e.g. a fixed height wrapper). The kit\n * positions it where the static thumbnail would have lived.\n */\n mapSlot?: ReactNode;\n /**\n * Rendered at the end of the card body, below the rows. Use for\n * a \"Book now\" `<Button>` or a \"View full profile\" link.\n */\n footerSlot?: ReactNode;\n\n /* ----- Styling ----- */\n\n /**\n * `'elevated'` (default) wraps the card in `<Card variant=\"elevated\">`\n * for a defined surface — what most consumers want when the card\n * stands alone on a page. `'flat'` drops the Card chrome so the\n * content sits naked — use when an outer card / sheet already\n * provides the boundary (e.g. embedded inside a `<Sheet>` or a\n * parent `<Card.Body>`).\n */\n surface?: 'flat' | 'elevated';\n\n /* ----- a11y ----- */\n\n /** Override the default region aria-label. */\n 'aria-label'?: string;\n /** Agent-readiness consumer id, surfaced as `data-component-id`. */\n id?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\n/** Strip everything except digits + leading `+` for `tel:` URLs. */\nfunction normalisePhone(raw: string): string {\n return raw.replace(/[^\\d+]/g, '');\n}\n\n/** Build the WhatsApp `wa.me` URL. Number must already be digits-only. */\nfunction buildWhatsAppHref(number: string, message?: string): string {\n const base = `https://wa.me/${number}`;\n if (!message) return base;\n return `${base}?text=${encodeURIComponent(message)}`;\n}\n\n/** Google Maps search query — works without an API key. */\nfunction buildMapHref(address: ContactProfileCardAddress): string {\n const q = encodeURIComponent(address.line);\n return `https://www.google.com/maps/search/?api=1&query=${q}`;\n}\n\n/** Format price (cents → currency string) using the consumer's locale. */\nfunction formatPrice(cents: number, currency: string, locale: string): string {\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency,\n }).format(cents / 100);\n } catch {\n // Locale or currency code rejected — fall back to a plain decimal.\n return (cents / 100).toFixed(2);\n }\n}\n\n/* -------------------------------------------------------------------- */\n/* MapThumbStrip — embedded Google Static Maps image */\n/* */\n/* Full-width strip rendered at the top of the card when the consumer */\n/* supplies both `address.lat`/`lng` and `googleMapsApiKey`. Same */\n/* one-shot `<img>` strategy as PracticeResults' StaticMapThumb (no JS */\n/* SDK boot → no consent gate needed), but full-card-width instead of */\n/* a 12rem aside. */\n/* -------------------------------------------------------------------- */\n\ninterface MapThumbStripProps {\n apiKey: string;\n center: { lat: number; lng: number };\n zoom: number;\n altText: string;\n}\n\n/**\n * Resolve the kit's `--map-marker-color` token to a six-character hex\n * string (no leading `#`) for Google Static Maps' `markers=color:` URL\n * parameter, which requires a literal hex value at fetch time.\n *\n * SSR-safe: when `document` is undefined we fall back to the kit's\n * brand violet. Same helper as PracticeResults — keep in sync if you\n * touch one.\n */\nfunction getStaticMapMarkerHex(): string {\n if (typeof document === 'undefined') return '4945a3';\n const raw = getComputedStyle(document.documentElement)\n .getPropertyValue('--map-marker-color')\n .trim();\n const match = /^#?([0-9a-fA-F]{6})$/.exec(raw);\n return match ? match[1] : '4945a3';\n}\n\nfunction MapThumbStrip({ apiKey, center, zoom, altText }: MapThumbStripProps) {\n // 640×192 keeps the asset under Google's 1MP free tier at scale=2\n // (1280×384 actual) and matches the strip's 12rem height at a\n // ~3.33:1 aspect ratio. Marker colour resolves from the kit's\n // `--map-marker-color` token at runtime so the value still lives\n // in `src/tokens/**` per the closed-palette constraint.\n const markerHex = getStaticMapMarkerHex();\n const src =\n `https://maps.googleapis.com/maps/api/staticmap` +\n `?center=${center.lat},${center.lng}` +\n `&zoom=${zoom}` +\n `&size=640x192&scale=2` +\n `&markers=color:0x${markerHex}%7C${center.lat},${center.lng}` +\n `&key=${encodeURIComponent(apiKey)}`;\n return (\n <img\n src={src}\n alt={altText}\n loading=\"lazy\"\n decoding=\"async\"\n width={640}\n height={192}\n className=\"ds:block ds:inline-size-full ds:block-size-[12rem] ds:[object-fit:cover] ds:rounded-[var(--radius-md)]\"\n />\n );\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const ContactProfileCard = forwardRef<\n HTMLDivElement,\n ContactProfileCardProps\n>(\n (\n {\n heading,\n description,\n address,\n phone,\n whatsappNumber,\n whatsappMessage,\n email,\n website,\n languages,\n languageLabels,\n insurances,\n firstVisitPriceCents,\n currencyCode = 'EUR',\n profession,\n specializedInFearPatients,\n googleMapsApiKey,\n mapZoom = 14,\n onPhoneClick,\n onWhatsAppClick,\n onMapClick,\n onEmailClick,\n headerSlot,\n footerSlot,\n mapSlot,\n surface = 'elevated',\n 'aria-label': ariaLabel,\n id,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const headingId = useId();\n const locale = i18n.language ?? 'en';\n\n const resolvedHeading = heading ?? t('contactProfileCard.heading');\n const resolvedAriaLabel = ariaLabel ?? resolvedHeading;\n\n const formattedPrice = useMemo(() => {\n if (firstVisitPriceCents == null) return undefined;\n return formatPrice(firstVisitPriceCents, currencyCode, locale);\n }, [firstVisitPriceCents, currencyCode, locale]);\n\n // Compose the rows in display order. Each `row` carries the icon +\n // localised label + the rendered value. Skipping a field is just\n // omitting the row — `KeyValueList` collapses the subgrid cleanly.\n const rows: Array<{\n key: string;\n icon: ReactElement;\n label: string;\n value: ReactNode;\n }> = [];\n\n if (address) {\n rows.push({\n key: 'address',\n icon: <MapPin aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.address'),\n value: (\n <span className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <span>{address.line}</span>\n {address.lat != null && address.lng != null ? (\n <Link\n href={buildMapHref(address)}\n external\n intent=\"default\"\n onClick={onMapClick}\n >\n {t('contactProfileCard.openInGoogleMaps')}\n </Link>\n ) : null}\n </span>\n ),\n });\n }\n\n if (phone) {\n rows.push({\n key: 'phone',\n icon: <Phone aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.phone'),\n value: (\n <Link\n href={`tel:${normalisePhone(phone)}`}\n intent=\"default\"\n onClick={onPhoneClick}\n >\n {phone}\n </Link>\n ),\n });\n }\n\n if (whatsappNumber) {\n rows.push({\n key: 'whatsapp',\n icon: <MessageCircle aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.whatsapp'),\n value: (\n <Link\n href={buildWhatsAppHref(whatsappNumber, whatsappMessage)}\n external\n intent=\"default\"\n onClick={onWhatsAppClick}\n >\n {whatsappNumber}\n </Link>\n ),\n });\n }\n\n if (email) {\n rows.push({\n key: 'email',\n icon: <Mail aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.email'),\n value: (\n <Link\n href={`mailto:${email}`}\n intent=\"default\"\n onClick={onEmailClick}\n >\n {email}\n </Link>\n ),\n });\n }\n\n if (website) {\n rows.push({\n key: 'website',\n icon: <Globe aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.website'),\n value: (\n <Link href={website} external intent=\"default\">\n {website}\n </Link>\n ),\n });\n }\n\n if (languages && languages.length > 0) {\n // Resolution order, highest to lowest:\n // 1. consumer `languageLabels` override — for regional dialects,\n // brand-voice variants, or codes the kit doesn't ship.\n // 2. kit i18n bundle (`languages.<iso>`) — auto-resolves the 18\n // ISO codes the kit ships into the active locale's native\n // language name. Retires consumer-side ISO→label plumbing.\n // 3. uppercase fallback for unknown codes that the consumer\n // didn't override.\n const resolveLabel = (code: string): string => {\n if (languageLabels?.[code]) return languageLabels[code];\n const key = `languages.${code}`;\n if (i18n.exists(key)) return t(key);\n return code.toUpperCase();\n };\n rows.push({\n key: 'languages',\n icon: <LanguagesIcon aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.languages'),\n value: (\n <span className=\"ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]\">\n {languages.map((code) => (\n <Badge key={code} variant=\"neutral\">\n {resolveLabel(code)}\n </Badge>\n ))}\n </span>\n ),\n });\n }\n\n if (insurances && insurances.length > 0) {\n rows.push({\n key: 'insurances',\n icon: <ShieldCheck aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.insurances'),\n value: (\n <span className=\"ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]\">\n {insurances.map((ins) => (\n <Badge key={ins} variant=\"info\">\n {ins}\n </Badge>\n ))}\n </span>\n ),\n });\n }\n\n if (formattedPrice) {\n rows.push({\n key: 'firstVisitPrice',\n icon: <Banknote aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.firstVisitPrice'),\n value: formattedPrice,\n });\n }\n\n if (specializedInFearPatients) {\n rows.push({\n key: 'expertForAnxiousPatients',\n icon: <Heart aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.expertForAnxiousPatients'),\n value: t('contactProfileCard.value.yesShort'),\n });\n }\n\n if (profession) {\n rows.push({\n key: 'profession',\n icon: <Stethoscope aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.profession'),\n value: profession,\n });\n }\n\n // Imperative handle for agent integrations.\n useAgentRegistration(\n contactProfileCardAgent,\n { getProfession: () => profession },\n id,\n );\n\n // Embedded static-map thumbnail. Renders only when the consumer\n // supplies BOTH a usable lat/lng pair AND a `googleMapsApiKey`.\n // The d.ts-promised behaviour; without a key the strip is silently\n // omitted and the address row's \"Open in Google Maps\" link still\n // emits as the spatial-cue fallback.\n const showMapThumb =\n !!googleMapsApiKey &&\n address?.lat !== undefined &&\n address?.lng !== undefined;\n const mapThumb = showMapThumb ? (\n <MapThumbStrip\n apiKey={googleMapsApiKey!}\n center={{ lat: address!.lat!, lng: address!.lng! }}\n zoom={mapZoom}\n altText={t('contactProfileCard.map.alt', {\n address: address!.line,\n defaultValue: 'Map showing {{address}}',\n })}\n />\n ) : null;\n\n // Map area: explicit consumer slot wins over the implicit\n // googleMapsApiKey-driven static thumbnail. 0.33.4 introduces the\n // slot so consumers can embed an interactive <MapView> /\n // <PracticeMap> wrapper inside the card chrome instead of the\n // fixed static <img>. When neither is set the area renders as\n // nothing. 0.33.6 moves the area from above the heading to below\n // the data rows — the map reads as the spatial closer (\"here it\n // is on the map\") rather than a stylised hero, and any CTA in\n // footerSlot still lands at the very bottom.\n const mapArea = mapSlot ?? mapThumb;\n\n const body = (\n <>\n {description ? (\n <p className=\"type-body-sm ds:m-0 ds:whitespace-pre-line\">\n {description}\n </p>\n ) : null}\n {rows.length > 0 ? (\n <KeyValueList rowGap=\"md\">\n {rows.map((row) => (\n <KeyValuePair\n key={row.key}\n icon={row.icon}\n label={row.label}\n value={row.value}\n />\n ))}\n </KeyValueList>\n ) : null}\n {mapArea}\n {footerSlot}\n </>\n );\n\n // `surface=\"flat\"` skips the Card wrapper — the consumer is\n // already inside a Card / Sheet and doesn't want a double border.\n const inner = (\n <>\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {headerSlot}\n <h2\n id={headingId}\n className=\"type-title-card ds:m-0 ds:text-[color:var(--foreground)]\"\n >\n {resolvedHeading}\n </h2>\n </div>\n {body}\n </>\n );\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n aria-labelledby={headingId}\n data-component=\"contact-profile-card\"\n data-component-id={id}\n id={id}\n className={rootVariants({ surface, className })}\n {...rest}\n >\n {surface === 'elevated' ? (\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {inner}\n </Card.Body>\n </Card>\n ) : (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {inner}\n </div>\n )}\n </div>\n );\n },\n);\n\nContactProfileCard.displayName = 'ContactProfileCard';\n\n// Helper export so consumers can mirror the kit's row order if they\n// need to compose a partial alternative (rare).\nexport const CONTACT_PROFILE_CARD_ROW_KEYS = [\n 'address',\n 'phone',\n 'whatsapp',\n 'email',\n 'website',\n 'languages',\n 'insurances',\n 'firstVisitPrice',\n 'expertForAnxiousPatients',\n 'profession',\n] as const;\n\n// Defensive icon export so consumers can render the same glyph\n// outside the card if they need it for consistency.\nexport const CONTACT_PROFILE_CARD_ROW_ICONS: Record<\n (typeof CONTACT_PROFILE_CARD_ROW_KEYS)[number],\n LucideIcon\n> = {\n address: MapPin,\n phone: Phone,\n whatsapp: MessageCircle,\n email: Mail,\n website: Globe,\n languages: LanguagesIcon,\n insurances: ShieldCheck,\n firstVisitPrice: Banknote,\n expertForAnxiousPatients: Heart,\n profession: Stethoscope,\n};\n\n// Re-exports of the rootVariants type for downstream typing.\nexport type ContactProfileCardSurface = NonNullable<\n VariantProps<typeof rootVariants>['surface']\n>;\n\n// ExternalLink is exported by lucide-react and used elsewhere in the\n// kit; re-exporting here so consumers don't have to add it as a\n// peer-dep import for icon parity in their own UIs.\nexport { ExternalLink };\n"],"names":["__iconNode","Banknote","createLucideIcon","Phone","contactProfileCardAgent","handle","rootVariants","cva","normalisePhone","raw","buildWhatsAppHref","number","message","base","buildMapHref","address","formatPrice","cents","currency","locale","getStaticMapMarkerHex","match","MapThumbStrip","apiKey","center","zoom","altText","markerHex","src","jsx","ContactProfileCard","forwardRef","heading","description","phone","whatsappNumber","whatsappMessage","email","website","languages","languageLabels","insurances","firstVisitPriceCents","currencyCode","profession","specializedInFearPatients","googleMapsApiKey","mapZoom","onPhoneClick","onWhatsAppClick","onMapClick","onEmailClick","headerSlot","footerSlot","mapSlot","surface","ariaLabel","id","className","rest","ref","t","i18n","useTranslation","headingId","useId","resolvedHeading","resolvedAriaLabel","formattedPrice","useMemo","rows","MapPin","jsxs","Link","MessageCircle","Mail","Globe","resolveLabel","code","key","LanguagesIcon","Badge","ShieldCheck","ins","Heart","Stethoscope","useAgentRegistration","mapThumb","mapArea","body","Fragment","KeyValueList","row","KeyValuePair","inner","Card","CONTACT_PROFILE_CARD_ROW_KEYS","CONTACT_PROFILE_CARD_ROW_ICONS"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,OAAO,MAAM,QAAQ,MAAM,GAAG,KAAK,GAAG,KAAK,IAAI,KAAK,KAAK,SAAQ,CAAE;AAAA,EAC9E,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,KAAK,KAAK,UAAU;AAAA,EACxD,CAAC,QAAQ,EAAE,GAAG,uBAAuB,KAAK,SAAQ,CAAE;AACtD,GACMC,IAAWC,EAAiB,YAAYF,EAAU;ACdxD;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB;AAAA,IACE;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,KAAK;AAAA,IACX;AAAA,EACA;AACA,GACMG,IAAQD,EAAiB,SAASF,EAAU,GCNrCI,KAAkE;AAAA,EAC7E,IAAI;AAAA,EACJ,cAAc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AAYO;AAAA,QACZ,mBAAiBH;AAAA,QACjB,kBAAe;AAAA,QACf,qBAAmBP;AAAA,QACnB,IAAAA;AAAA,QACA,WAAWnD,GAAa,EAAE,SAAAiD,GAAS,WAAAG,IAAW;AAAA,QAC7C,GAAGC;AAAA,QAEH,gBAAY,aACX,gBAAA9B,EAACkE,KAAK,SAAQ,YACZ,4BAACA,EAAK,MAAL,EAAU,WAAU,kDAClB,aACH,EAAA,CACF,sBAEC,OAAA,EAAI,WAAU,kDACZ,UAAAD,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEAhE,GAAmB,cAAc;AAI1B,MAAMkE,KAAgC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAIaC,KAGT;AAAA,EACF,SAAS1B;AAAA,EACT,OAAOpE;AAAA,EACP,UAAUuE;AAAA,EACV,OAAOC;AAAA,EACP,SAASC;AAAA,EACT,WAAWI;AAAAA,EACX,YAAYE;AAAA,EACZ,iBAAiBjF;AAAA,EACjB,0BAA0BmF;AAAA,EAC1B,YAAYC;AACd;","x_google_ignoreList":[0,1]}
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as F, useState as L, useMemo as y, useEffect as H } from "react";
|
|
3
|
-
import { c as $ } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as A } from "react-i18next";
|
|
5
|
-
import { F as w } from "./form-field-BOm9hK35.js";
|
|
6
|
-
import { D as I } from "./date-picker-Bq7xhMA-.js";
|
|
7
|
-
import { N as S } from "./number-input-Dj5L3pXK.js";
|
|
8
|
-
import { C as P } from "./card-DPmk26CL.js";
|
|
9
|
-
import { B as v } from "./badge-zsf5i5bH.js";
|
|
10
|
-
import { I as k } from "./insert-result-C5ABnzDl.js";
|
|
11
|
-
import { a as s } from "./date-picker-variants-DLi1Va_e.js";
|
|
12
|
-
import { C as z } from "./check-DPdL_Sm7.js";
|
|
13
|
-
import { H as B } from "./heart-C0faivFf.js";
|
|
14
|
-
import { c as G } from "./createLucideIcon-CrFbzy84.js";
|
|
15
|
-
/**
|
|
16
|
-
* @license lucide-react v1.8.0 - ISC
|
|
17
|
-
*
|
|
18
|
-
* This source code is licensed under the ISC license.
|
|
19
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/
|
|
21
|
-
const Y = [
|
|
22
|
-
[
|
|
23
|
-
"path",
|
|
24
|
-
{
|
|
25
|
-
d: "M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z",
|
|
26
|
-
key: "c7niix"
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
], j = G("droplet", Y), x = 28, M = 14, U = 1;
|
|
30
|
-
function K(n, c = 3) {
|
|
31
|
-
const d = n.cycleLength ?? x, { lastPeriodStart: o } = n, i = s(o, d - M), u = {
|
|
32
|
-
start: s(i, -5),
|
|
33
|
-
end: s(i, U)
|
|
34
|
-
}, f = s(o, d), p = Array.from(
|
|
35
|
-
{ length: c },
|
|
36
|
-
(C, g) => s(o, d * (g + 1))
|
|
37
|
-
);
|
|
38
|
-
return { nextPeriod: f, ovulation: i, fertileWindow: u, upcomingPeriods: p };
|
|
39
|
-
}
|
|
40
|
-
const O = $("ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", {
|
|
41
|
-
variants: {
|
|
42
|
-
width: { full: "ds:w-full", auto: "ds:inline-flex" }
|
|
43
|
-
},
|
|
44
|
-
defaultVariants: { width: "full" }
|
|
45
|
-
}), V = "--accent", q = F(
|
|
46
|
-
({
|
|
47
|
-
defaultCycleLength: n = x,
|
|
48
|
-
onResultChange: c,
|
|
49
|
-
onInsert: d,
|
|
50
|
-
insertVariant: o = "insert",
|
|
51
|
-
onCopy: i,
|
|
52
|
-
onError: u,
|
|
53
|
-
insertBrand: f,
|
|
54
|
-
id: p,
|
|
55
|
-
width: C,
|
|
56
|
-
className: g
|
|
57
|
-
}, b) => {
|
|
58
|
-
const { t: a, i18n: N } = A(), [m, D] = L(void 0), [h, E] = L(
|
|
59
|
-
n
|
|
60
|
-
), t = y(() => m ? K({
|
|
61
|
-
lastPeriodStart: m,
|
|
62
|
-
cycleLength: h ?? x
|
|
63
|
-
}) : null, [m, h]), T = y(
|
|
64
|
-
() => new Intl.DateTimeFormat(N.language, { dateStyle: "medium" }),
|
|
65
|
-
[N.language]
|
|
66
|
-
);
|
|
67
|
-
H(() => {
|
|
68
|
-
c == null || c(t);
|
|
69
|
-
}, [t, c]);
|
|
70
|
-
const _ = y(() => /* @__PURE__ */ new Date(), []), l = (W) => T.format(W);
|
|
71
|
-
return /* @__PURE__ */ r(
|
|
72
|
-
"div",
|
|
73
|
-
{
|
|
74
|
-
ref: b,
|
|
75
|
-
"data-component": "cycle-calculator",
|
|
76
|
-
"data-component-id": p,
|
|
77
|
-
className: O({ width: C, className: g }),
|
|
78
|
-
children: [
|
|
79
|
-
/* @__PURE__ */ r("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2", children: [
|
|
80
|
-
/* @__PURE__ */ e(w, { label: a("cycleCalculator.lastPeriod"), children: /* @__PURE__ */ e(
|
|
81
|
-
I,
|
|
82
|
-
{
|
|
83
|
-
value: m,
|
|
84
|
-
onChange: D,
|
|
85
|
-
maxDate: _
|
|
86
|
-
}
|
|
87
|
-
) }),
|
|
88
|
-
/* @__PURE__ */ e(
|
|
89
|
-
w,
|
|
90
|
-
{
|
|
91
|
-
label: a("cycleCalculator.cycleLength"),
|
|
92
|
-
description: a("cycleCalculator.cycleLengthHint"),
|
|
93
|
-
children: /* @__PURE__ */ e(
|
|
94
|
-
S,
|
|
95
|
-
{
|
|
96
|
-
mode: "integer",
|
|
97
|
-
min: 20,
|
|
98
|
-
max: 45,
|
|
99
|
-
value: h,
|
|
100
|
-
onChange: E
|
|
101
|
-
}
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
] }),
|
|
106
|
-
/* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: t ? `${a("cycleCalculator.ovulation")}: ${l(t.ovulation)}. ${a(
|
|
107
|
-
"cycleCalculator.nextPeriod"
|
|
108
|
-
)}: ${l(t.nextPeriod)}.` : "" }),
|
|
109
|
-
t ? /* @__PURE__ */ e(P, { variant: "elevated", children: /* @__PURE__ */ r(P.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
110
|
-
/* @__PURE__ */ r("dl", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3", children: [
|
|
111
|
-
/* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
|
|
112
|
-
/* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: a("cycleCalculator.ovulation") }),
|
|
113
|
-
/* @__PURE__ */ e("dd", { children: /* @__PURE__ */ e(
|
|
114
|
-
v,
|
|
115
|
-
{
|
|
116
|
-
variant: "success",
|
|
117
|
-
size: "lg",
|
|
118
|
-
leading: /* @__PURE__ */ e(z, { "aria-hidden": !0 }),
|
|
119
|
-
children: l(t.ovulation)
|
|
120
|
-
}
|
|
121
|
-
) })
|
|
122
|
-
] }),
|
|
123
|
-
/* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
|
|
124
|
-
/* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: a("cycleCalculator.fertileWindow") }),
|
|
125
|
-
/* @__PURE__ */ e("dd", { children: /* @__PURE__ */ r(
|
|
126
|
-
v,
|
|
127
|
-
{
|
|
128
|
-
variant: "accent",
|
|
129
|
-
size: "lg",
|
|
130
|
-
leading: /* @__PURE__ */ e(B, { "aria-hidden": !0 }),
|
|
131
|
-
children: [
|
|
132
|
-
l(t.fertileWindow.start),
|
|
133
|
-
" –",
|
|
134
|
-
" ",
|
|
135
|
-
l(t.fertileWindow.end)
|
|
136
|
-
]
|
|
137
|
-
}
|
|
138
|
-
) })
|
|
139
|
-
] }),
|
|
140
|
-
/* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:text-center", children: [
|
|
141
|
-
/* @__PURE__ */ e("dt", { className: "type-label ds:text-muted-foreground", children: a("cycleCalculator.nextPeriod") }),
|
|
142
|
-
/* @__PURE__ */ e("dd", { children: /* @__PURE__ */ e(
|
|
143
|
-
v,
|
|
144
|
-
{
|
|
145
|
-
variant: "error",
|
|
146
|
-
size: "lg",
|
|
147
|
-
leading: /* @__PURE__ */ e(j, { "aria-hidden": !0 }),
|
|
148
|
-
children: l(t.nextPeriod)
|
|
149
|
-
}
|
|
150
|
-
) })
|
|
151
|
-
] })
|
|
152
|
-
] }),
|
|
153
|
-
o === "copy" || d ? /* @__PURE__ */ e(
|
|
154
|
-
k,
|
|
155
|
-
{
|
|
156
|
-
onInsert: d,
|
|
157
|
-
variant: o,
|
|
158
|
-
onCopy: i,
|
|
159
|
-
onError: u,
|
|
160
|
-
card: {
|
|
161
|
-
title: a("insert.title.cycle"),
|
|
162
|
-
icon: "heart",
|
|
163
|
-
highlight: `${l(t.fertileWindow.start)} – ${l(
|
|
164
|
-
t.fertileWindow.end
|
|
165
|
-
)}`,
|
|
166
|
-
// Chip reuses the on-screen fertile-window badge's accent
|
|
167
|
-
// token so the inserted PNG chip matches the screen.
|
|
168
|
-
highlightToken: V,
|
|
169
|
-
brand: f,
|
|
170
|
-
fields: [
|
|
171
|
-
{
|
|
172
|
-
// Ovulation is a predicted date → calendar glyph (the
|
|
173
|
-
// on-screen badge uses a Check tick, which ICON_GEOMETRY
|
|
174
|
-
// does not carry, so the calendar reads the date meaning).
|
|
175
|
-
icon: "calendar",
|
|
176
|
-
label: a("cycleCalculator.ovulation"),
|
|
177
|
-
value: l(t.ovulation)
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
// Fertile window → heart glyph, matching the on-screen
|
|
181
|
-
// fertile-window badge's Heart icon.
|
|
182
|
-
icon: "heart",
|
|
183
|
-
label: a("cycleCalculator.fertileWindow"),
|
|
184
|
-
value: `${l(t.fertileWindow.start)} – ${l(
|
|
185
|
-
t.fertileWindow.end
|
|
186
|
-
)}`
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
// Next period → droplets glyph, matching the on-screen
|
|
190
|
-
// next-period badge's Droplet icon.
|
|
191
|
-
icon: "droplets",
|
|
192
|
-
label: a("cycleCalculator.nextPeriod"),
|
|
193
|
-
value: l(t.nextPeriod)
|
|
194
|
-
}
|
|
195
|
-
]
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
) : null
|
|
199
|
-
] }) }) : /* @__PURE__ */ e("p", { className: "type-body ds:text-muted-foreground", children: a("cycleCalculator.empty") })
|
|
200
|
-
]
|
|
201
|
-
}
|
|
202
|
-
);
|
|
203
|
-
}
|
|
204
|
-
);
|
|
205
|
-
q.displayName = "CycleCalculator";
|
|
206
|
-
export {
|
|
207
|
-
q as C,
|
|
208
|
-
M as L,
|
|
209
|
-
K as p
|
|
210
|
-
};
|
|
211
|
-
//# sourceMappingURL=cycle-calculator-KxA8dqDf.js.map
|