@alfadocs/ui-kit 0.68.0 → 0.70.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/{accordion-9lJSMMsZ.js → accordion-DnIa7OHX.js} +69 -47
- package/dist/_chunks/address-autocomplete-BEX9PXty.js +496 -0
- package/dist/_chunks/{agenda-card-BxSFkqgY.js → agenda-card-BQ-IKAru.js} +2 -2
- package/dist/_chunks/{agenda-card.agent-B_R47-c9.js → agenda-card.agent-mTCrkKSZ.js} +6 -1
- package/dist/_chunks/{agenda-tray-T-BumlGZ.js → agenda-tray-CGXRk58j.js} +37 -25
- package/dist/_chunks/{ai-consent-banner-Dxtx_WAh.js → ai-consent-banner-Be-h9mRI.js} +5 -5
- package/dist/_chunks/{ai-prompt-input-BwEACCPm.js → ai-prompt-input-CuhTo9mh.js} +80 -61
- package/dist/_chunks/ai-tools-rail-B5NEghsp.js +511 -0
- package/dist/_chunks/{alert-_mUKLmwA.js → alert-CHYZ96tR.js} +150 -96
- package/dist/_chunks/{alia-sidebar-Ckv0yCKi.js → alia-sidebar-B47qRQb5.js} +5 -5
- package/dist/_chunks/{anamnesis-card-N8pIKWuS.js → anamnesis-card-DvYCa16e.js} +3 -3
- package/dist/_chunks/anatomy-scheme-CJB6dI6p.js +2445 -0
- package/dist/_chunks/annotation-marker-qt5R9WZX.js +120 -0
- package/dist/_chunks/{antenatal-schedule-timeline-35ebkcZT.js → antenatal-schedule-timeline-CwXrQRm1.js} +2 -2
- package/dist/_chunks/appointment-card-C06aZqA7.js +310 -0
- package/dist/_chunks/appointment-timeline-BJM0S_Fg.js +386 -0
- package/dist/_chunks/appointment-tray-DRRw5ROi.js +193 -0
- package/dist/_chunks/{audio-recorder-DjXLP4aF.js → audio-recorder-Cpdk5qpQ.js} +60 -57
- package/dist/_chunks/{autocomplete-CcCFlVf-.js → autocomplete-DOeGouCL.js} +157 -132
- package/dist/_chunks/{badge-CqGsX32l.js → badge-DCOqV9mI.js} +32 -27
- package/dist/_chunks/bishop-score-DnYWtZa_.js +304 -0
- package/dist/_chunks/bmi-calculator-zjeY4E7J.js +434 -0
- package/dist/_chunks/{booking-L8-YP8BJ.js → booking-DUBI0oqt.js} +422 -399
- package/dist/_chunks/{breadcrumb-OTbaY70e.js → breadcrumb-CchdeG7d.js} +42 -28
- package/dist/_chunks/{calculator-dialog-CFk4I91b.js → calculator-dialog-BR5iU0kf.js} +2 -2
- package/dist/_chunks/{calendar-oYWOCrnf.js → calendar-CZUjL8SZ.js} +258 -201
- package/dist/_chunks/{care-plan-card-BwVUyUBb.js → care-plan-card-C5sTfY9G.js} +13 -9
- package/dist/_chunks/{care-plan-entry-card-VzdQHcOL.js → care-plan-entry-card-CXnxGCWA.js} +20 -16
- package/dist/_chunks/care-plan-header-BUwqDTtz.js +206 -0
- package/dist/_chunks/{carousel.agent-vt21A_el.js → carousel.agent-4v8Emr9E.js} +219 -198
- package/dist/_chunks/{chart-Cg3e9EH9.js → chart-CMr3eW62.js} +150 -109
- package/dist/_chunks/{chat-container-ogB4OskO.js → chat-container-DWho5hPR.js} +47 -34
- package/dist/_chunks/{chat-input-B5zjNEUN.js → chat-input-BcXTetgM.js} +57 -41
- package/dist/_chunks/{checkbox-DRcOdmXv.js → checkbox-BuZ1u__2.js} +41 -27
- package/dist/_chunks/{checkbox-group-CpUwlHug.js → checkbox-group-PqNmQ-cE.js} +3 -3
- package/dist/_chunks/clinical-note-card-BUvNMNGL.js +436 -0
- package/dist/_chunks/{collapsible-X3oaLPU3.js → collapsible-BrnRiCC6.js} +26 -23
- package/dist/_chunks/{color-picker-FXpItIaF.js → color-picker-C_fZl6sA.js} +124 -112
- package/dist/_chunks/{combobox-BC-DFx8G.js → combobox-Clum7gJ1.js} +165 -128
- package/dist/_chunks/{command-palette-BiPAAno-.js → command-palette-CJzmc5pC.js} +87 -64
- package/dist/_chunks/{contact-profile-card-7BMB85T6.js → contact-profile-card-DDPwRFiP.js} +13 -11
- package/dist/_chunks/control-room-rail-Y8ryLYsP.js +229 -0
- package/dist/_chunks/{copy-field-CCq7j6Zc.js → copy-field-Bjw9u2cV.js} +42 -35
- package/dist/_chunks/counter-dRlTNC_y.js +55 -0
- package/dist/_chunks/{cycle-calculator-BF0ointe.js → cycle-calculator-CCmPwcBl.js} +4 -4
- package/dist/_chunks/{date-picker-oGg5BnXL.js → date-picker-Dl9RKxaV.js} +76 -57
- package/dist/_chunks/{date-range-picker-C5BWfH_T.js → date-range-picker-CTUeR6Bj.js} +73 -46
- package/dist/_chunks/{date-time-picker-Ze1My59T.js → date-time-picker-BhoogS5Q.js} +64 -40
- package/dist/_chunks/{dependent-selector-DpzGtr_J.js → dependent-selector-DUV4thxX.js} +45 -31
- package/dist/_chunks/{dialog-DMGnSelc.js → dialog-ZNuboNmy.js} +35 -28
- package/dist/_chunks/{document-scanner-D2qehl3-.js → document-scanner-C_AxLooF.js} +13 -5
- package/dist/_chunks/{dropdown-menu-DwwPovMZ.js → dropdown-menu-qrxjymfw.js} +94 -93
- package/dist/_chunks/{due-date-calculator-DU9AEWNy.js → due-date-calculator-Brdj-euS.js} +6 -6
- package/dist/_chunks/editable-currency-cell-renderer-C9twtALM.js +328 -0
- package/dist/_chunks/email-input-DJ7EXklP.js +397 -0
- package/dist/_chunks/{entity-card-COhmqHly.js → entity-card-9_62gY7l.js} +38 -20
- package/dist/_chunks/entity-summary-BxRjFh_4.js +138 -0
- package/dist/_chunks/{fetal-weight-BVSzOhuR.js → fetal-weight-DNCkyeVo.js} +3 -3
- package/dist/_chunks/field-value-NXYczdpO.js +415 -0
- package/dist/_chunks/{file-upload-BosbPDb1.js → file-upload-DwZcAK8D.js} +119 -100
- package/dist/_chunks/{fiscal-code-input-DPtqluVb.js → fiscal-code-input-Cf-8O4Fj.js} +76 -63
- package/dist/_chunks/{freemium-paywall-CkWjv3o6.js → freemium-paywall-WYlNO7yT.js} +78 -71
- package/dist/_chunks/{gestational-age-calculator-DBlFdoiP.js → gestational-age-calculator-CF2ISaYQ.js} +7 -7
- package/dist/_chunks/hash-CysBBS_N.js +17 -0
- package/dist/_chunks/{hcg-doubling-if4Q8aSX.js → hcg-doubling-C7bmuaU3.js} +4 -4
- package/dist/_chunks/{header-settings-CNOqIhoW.js → header-settings-DJqoAl5m.js} +86 -46
- package/dist/_chunks/{index.modern-D2LGACWg.js → index.modern-Zta-A4Jm.js} +3 -3
- package/dist/_chunks/link-cell-renderer-CTXqtXV-.js +2184 -0
- package/dist/_chunks/{list-BOwqwy03.js → list-DgE1xWBM.js} +99 -84
- package/dist/_chunks/{locale-picker-C9JmBht3.js → locale-picker-ChYYSX2N.js} +47 -35
- package/dist/_chunks/lock-CKOIn0IK.js +15 -0
- package/dist/_chunks/{map-view-Tb5VfK9Y.js → map-view-BkOoGoX2.js} +160 -115
- package/dist/_chunks/{marketplace-app-shell-D4-T9Qzz.js → marketplace-app-shell-Skhfp6vK.js} +6 -6
- package/dist/_chunks/{message-card.agent-4IeIgrnJ.js → message-card.agent-ZLhx3Bs5.js} +6 -1
- package/dist/_chunks/{message-tray-CVyJajVJ.js → message-tray-DwrBLJlf.js} +90 -48
- package/dist/_chunks/{multi-select-BcPylvHR.js → multi-select-BdHHDrRN.js} +196 -153
- package/dist/_chunks/{navigation-menu-C6lBYVv9.js → navigation-menu-DRUi6sSj.js} +75 -42
- package/dist/_chunks/notes-panel-ay8_lPrA.js +158 -0
- package/dist/_chunks/{notification-card-BiESdm8q.js → notification-card-D2jiKSJJ.js} +27 -23
- package/dist/_chunks/{notification-card.agent-Rqt3ofk9.js → notification-card.agent-DxGBZb8T.js} +5 -1
- package/dist/_chunks/{notification-tray-DlgenTEe.js → notification-tray-AEun6DN2.js} +112 -97
- package/dist/_chunks/{number-input-Dj5L3pXK.js → number-input-DxphVG_A.js} +36 -27
- package/dist/_chunks/{operator-hero-f_KaRhw5.js → operator-hero-CR0Rqh4-.js} +14 -10
- package/dist/_chunks/{otp-input-xQ4Ps5VY.js → otp-input-DzBQ-CpE.js} +52 -33
- package/dist/_chunks/{pagination-DQOgnxxw.js → pagination-D58kglCr.js} +181 -162
- package/dist/_chunks/patient-details-Dlhqb5ig.js +675 -0
- package/dist/_chunks/{patient-search-DR9XUYRQ.js → patient-search-Be6cLrHR.js} +70 -61
- package/dist/_chunks/{patient-shell-BfgufL_q.js → patient-shell-DV3XEtIB.js} +3 -3
- package/dist/_chunks/patient-summary-card-WySCMwwA.js +437 -0
- package/dist/_chunks/patient-table-CHxf3Oqk.js +1110 -0
- package/dist/_chunks/{payment-form-nXocS_MX.js → payment-form-CxqIXqw7.js} +57 -45
- package/dist/_chunks/{payment-request-card-CYE5vhZ0.js → payment-request-card-BcZJwu9z.js} +125 -136
- package/dist/_chunks/{pdf-viewer-GsfNqeeT.js → pdf-viewer-QfebdLOd.js} +317 -291
- package/dist/_chunks/{periodontal-chart-card-Dh3KgvYG.js → periodontal-chart-card-hRRJY1NN.js} +3 -3
- package/dist/_chunks/{phone-input-DVXhNlIl.js → phone-input-DjU-XmO_.js} +64 -47
- package/dist/_chunks/{popover-DTbfAuR0.js → popover-B2qCDhJC.js} +37 -32
- package/dist/_chunks/{practice-results-DND2SAt7.js → practice-results-C6qDfxos.js} +280 -244
- package/dist/_chunks/{pregnancy-dating-QY-sqpvj.js → pregnancy-dating-CRVWswD-.js} +8 -8
- package/dist/_chunks/{pregnancy-weight-gain-DOJXXNYP.js → pregnancy-weight-gain-BUNpTsH-.js} +4 -4
- package/dist/_chunks/{privacy-lock-C7JyMf0y.js → privacy-lock-BzMLQu-j.js} +32 -28
- package/dist/_chunks/{product-hub-panel-CAXDFeGP.js → product-hub-panel-e6pW220e.js} +45 -27
- package/dist/_chunks/{progress-kzIRcdaq.js → progress-DA413-zn.js} +2 -2
- package/dist/_chunks/{public-footer.agent-CfXuW1x6.js → public-footer.agent-D0cFbjWl.js} +151 -146
- package/dist/_chunks/{public-header.agent-BOhJgZEU.js → public-header.agent-DqkqA-ca.js} +107 -102
- package/dist/_chunks/{qr-code-DNXhi6se.js → qr-code-CPkEs5mG.js} +52 -46
- package/dist/_chunks/{radio-group-CLjK-SlK.js → radio-group-BPt7pKZW.js} +5 -5
- package/dist/_chunks/radiograph-panel.agent-CAX-C3g3.js +558 -0
- package/dist/_chunks/{recaptcha-widget-BCNHsgqt.js → recaptcha-widget-BC-4To9b.js} +9 -2
- package/dist/_chunks/registry-DvAUVLHh.js +51 -0
- package/dist/_chunks/{resizable-3vzqDlg6.js → resizable-DVGcfOrk.js} +193 -173
- package/dist/_chunks/{reviews-panel-DBktKm7i.js → reviews-panel-Dq7LMDcH.js} +87 -68
- package/dist/_chunks/{rich-text-editor-VawKN1FI.js → rich-text-editor-DlCqPixb.js} +833 -728
- package/dist/_chunks/{search-bar-SY2BcV2N.js → search-bar-C_T3pBJn.js} +105 -78
- package/dist/_chunks/{search-input-DbxrnHkW.js → search-input-DQvGxR74.js} +2 -2
- package/dist/_chunks/{search-input.agent-CfZvViOd.js → search-input.agent-DRH54coT.js} +19 -4
- package/dist/_chunks/{select-CEtRcon5.js → select-DMLG44F5.js} +72 -56
- package/dist/_chunks/{session-countdown-LPnhTHjn.js → session-countdown-X1Ki6i0M.js} +3 -3
- package/dist/_chunks/{sheet-taJer-Ha.js → sheet-BxsE7eQm.js} +59 -45
- package/dist/_chunks/{sidebar-DaB4ulxH.js → sidebar-DY9jGjgt.js} +254 -248
- package/dist/_chunks/{sign-document-CdAiHiCh.js → sign-document-By6hMOra.js} +75 -49
- package/dist/_chunks/{signature-capture-COi0Uiqu.js → signature-capture-Ct_4Md4e.js} +138 -104
- package/dist/_chunks/{slider-BHWzXdjt.js → slider-DN1CWkKB.js} +85 -65
- package/dist/_chunks/{sparkline-DGhCSw8M.js → sparkline-iOXYgvJe.js} +75 -53
- package/dist/_chunks/{stepper-accordion-Dki6r9ZE.js → stepper-accordion-DC-H-8v4.js} +38 -48
- package/dist/_chunks/{stepper-accordion.agent-C4quJ-MD.js → stepper-accordion.agent-cmEguIdx.js} +7 -1
- package/dist/_chunks/{stepper-progress-DDjq5nei.js → stepper-progress-Bv0njx4g.js} +30 -24
- package/dist/_chunks/{suggestion-chip.agent-6sNWFj7m.js → suggestion-chip.agent-Brn3CiFE.js} +9 -8
- package/dist/_chunks/{switch-BJ6HD3Mn.js → switch-OILsBLWo.js} +25 -19
- package/dist/_chunks/tab-bar-Bv9nGNdO.js +262 -0
- package/dist/_chunks/{tabs-BIQ0ew1T.js → tabs-BxcOziCo.js} +67 -58
- package/dist/_chunks/{task-card.agent-CUPKYd7w.js → task-card.agent-Bt14CzUd.js} +4 -1
- package/dist/_chunks/{task-tray-CAncV-QQ.js → task-tray-qOEQflu4.js} +74 -57
- package/dist/_chunks/{text-area-BIx0tZ05.js → text-area-Bt3p7Pt0.js} +41 -34
- package/dist/_chunks/{text-input-BaClJL8Y.js → text-input-B-OWQ1Je.js} +15 -8
- package/dist/_chunks/{theme-toggle-DETmSu_h.js → theme-toggle-XB6o_lgs.js} +38 -26
- package/dist/_chunks/{time-picker-B5umYwfv.js → time-picker-BPlJWm8w.js} +41 -31
- package/dist/_chunks/{timeline-DQa5Tyz4.js → timeline-CqA4nKTI.js} +33 -25
- package/dist/_chunks/{toast.agent-vuLRRn2a.js → toast.agent-57UzyR9U.js} +62 -45
- package/dist/_chunks/tooth-scheme-BhQoPNBD.js +2131 -0
- package/dist/_chunks/{transaction-chip-DK84XCBU.js → transaction-chip-CscoQbxF.js} +88 -61
- package/dist/_chunks/{transcript-panel-CLHmv83g.js → transcript-panel-3THQX6nJ.js} +47 -33
- package/dist/_chunks/unit-converter-YEpD9evj.js +337 -0
- package/dist/_chunks/use-clamp-overflow-DQE2kwZ9.js +20 -0
- package/dist/_chunks/use-overflow-collapse-BIOzKbni.js +32 -0
- package/dist/_chunks/{use-password-requirements-DsgduV1x.js → use-password-requirements-BXvS2MBS.js} +131 -117
- package/dist/_chunks/use-persistent-state-nZwZAnE9.js +24 -0
- package/dist/_chunks/users-MBVtUzwd.js +17 -0
- package/dist/_chunks/warning-stack--sTrrBDA.js +268 -0
- package/dist/_chunks/{whatsapp-button-DUjlWGKf.js → whatsapp-button-BIy6NaJK.js} +6 -3
- package/dist/_chunks/{workflow-map-JAZryZJr.js → workflow-map-Dy8mLCqF.js} +101 -90
- package/dist/_chunks/zoom-out-CgVtf2Wx.js +29 -0
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +37 -0
- package/dist/agent/registry.d.ts +33 -0
- package/dist/agent/types.d.ts +97 -4
- package/dist/agent-catalog.json +8081 -518
- package/dist/agent-i18n/en.json +1277 -0
- package/dist/components/_shared/entity-card/entity-card.d.ts +6 -0
- package/dist/components/_shared/entity-card/index.d.ts +1 -1
- package/dist/components/_shared/field-value.d.ts +21 -0
- package/dist/components/_shared/field-visibility-cog.d.ts +20 -0
- package/dist/components/_shared/field-visibility.d.ts +36 -0
- package/dist/components/_shared/patient-fields.d.ts +119 -0
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/address-autocomplete/address-autocomplete.agent.d.ts +4 -0
- package/dist/components/address-autocomplete/address-autocomplete.d.ts +18 -0
- package/dist/components/address-autocomplete/index.d.ts +2 -1
- package/dist/components/address-autocomplete/index.js +3 -2
- package/dist/components/agenda-card/index.js +2 -2
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +75 -0
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/alert/alert.d.ts +5 -0
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anatomy-scheme/anatomy-face-paths.d.ts +15 -0
- package/dist/components/anatomy-scheme/anatomy-muscle-paths.d.ts +20 -0
- package/dist/components/anatomy-scheme/anatomy-scheme-data.d.ts +121 -0
- package/dist/components/anatomy-scheme/anatomy-scheme.agent.d.ts +6 -0
- package/dist/components/anatomy-scheme/anatomy-scheme.d.ts +69 -0
- package/dist/components/anatomy-scheme/index.d.ts +6 -0
- package/dist/components/anatomy-scheme/index.js +17 -0
- package/dist/components/annotation-marker/annotation-marker.d.ts +33 -0
- package/dist/components/annotation-marker/index.d.ts +3 -0
- package/dist/components/annotation-marker/index.js +7 -0
- package/dist/components/appointment-card/appointment-card.d.ts +25 -1
- package/dist/components/appointment-card/index.js +6 -5
- package/dist/components/appointment-timeline/appointment-timeline.agent.d.ts +4 -0
- package/dist/components/appointment-timeline/appointment-timeline.d.ts +66 -0
- package/dist/components/appointment-timeline/index.d.ts +4 -0
- package/dist/components/appointment-timeline/index.js +6 -0
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/badge/badge.d.ts +6 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/bishop-score/bishop-score.agent.d.ts +4 -0
- package/dist/components/bishop-score/bishop-score.d.ts +17 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/bmi-calculator.agent.d.ts +4 -0
- package/dist/components/bmi-calculator/bmi-calculator.d.ts +26 -0
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/care-plan-header.agent.d.ts +4 -0
- package/dist/components/care-plan-header/care-plan-header.d.ts +100 -0
- package/dist/components/care-plan-header/index.d.ts +4 -0
- package/dist/components/care-plan-header/index.js +6 -0
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-container/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +21 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/command-palette/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/control-room-context.d.ts +53 -0
- package/dist/components/control-room-rail/control-room-rail.d.ts +35 -0
- package/dist/components/control-room-rail/index.d.ts +5 -0
- package/dist/components/control-room-rail/index.js +9 -0
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/counter/counter.d.ts +22 -0
- package/dist/components/counter/index.d.ts +3 -0
- package/dist/components/counter/index.js +5 -0
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/cell-renderers/actions-cell-renderer.d.ts +18 -0
- package/dist/components/data-table/index.d.ts +1 -1
- package/dist/components/data-table/index.js +32 -30
- 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/dependent-selector/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/email-input/index.js +1 -1
- package/dist/components/entity-summary/entity-summary.d.ts +43 -0
- package/dist/components/entity-summary/index.d.ts +3 -0
- package/dist/components/entity-summary/index.js +5 -0
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/freemium-paywall/freemium-paywall.d.ts +6 -0
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/index.d.ts +11 -0
- package/dist/components/list/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/navigation-menu/index.js +1 -1
- package/dist/components/notes-panel/index.d.ts +3 -0
- package/dist/components/notes-panel/index.js +5 -0
- package/dist/components/notes-panel/notes-panel.d.ts +64 -0
- package/dist/components/notification-card/index.js +2 -2
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/password-input/index.js +1 -1
- package/dist/components/patient-details/index.d.ts +5 -0
- package/dist/components/patient-details/index.js +6 -0
- package/dist/components/patient-details/patient-details.agent.d.ts +4 -0
- package/dist/components/patient-details/patient-details.d.ts +96 -0
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +40 -1
- package/dist/components/patient-table/cell-renderers/balance-badge-cell.d.ts +13 -0
- package/dist/components/patient-table/cell-renderers/care-plan-status-cell.d.ts +43 -0
- package/dist/components/patient-table/cell-renderers/next-appointment-cell.d.ts +24 -0
- package/dist/components/patient-table/columns.d.ts +131 -0
- package/dist/components/patient-table/index.d.ts +20 -0
- package/dist/components/patient-table/index.js +12 -0
- package/dist/components/patient-table/patient-table.d.ts +172 -0
- package/dist/components/patient-table/types.d.ts +222 -0
- package/dist/components/patient-table/use-responsive-columns.d.ts +111 -0
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/progress/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/qr-code/index.js +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radiograph-panel/index.d.ts +4 -0
- package/dist/components/radiograph-panel/index.js +7 -0
- package/dist/components/radiograph-panel/radiograph-panel.agent.d.ts +13 -0
- package/dist/components/radiograph-panel/radiograph-panel.d.ts +36 -0
- package/dist/components/recaptcha-widget/index.js +1 -1
- package/dist/components/resizable/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +2 -2
- package/dist/components/select/index.js +1 -1
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +2 -2
- package/dist/components/sidebar/sidebar.d.ts +7 -0
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/stepper-accordion/index.js +2 -2
- package/dist/components/stepper-progress/index.js +1 -1
- package/dist/components/suggestion-chip/index.js +1 -1
- package/dist/components/switch/index.js +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +18 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/text-area/index.js +1 -1
- package/dist/components/text-input/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/tooth-scheme/index.d.ts +2 -2
- package/dist/components/tooth-scheme/index.js +30 -23
- package/dist/components/tooth-scheme/tooth-data.d.ts +112 -1
- package/dist/components/tooth-scheme/tooth-scheme.agent.d.ts +2 -2
- package/dist/components/tooth-scheme/tooth-scheme.d.ts +75 -11
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transaction-chip/transaction-chip.d.ts +2 -2
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/unit-converter/unit-converter.agent.d.ts +4 -0
- package/dist/components/unit-converter/unit-converter.d.ts +27 -0
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/warning-stack/warning-stack.d.ts +14 -2
- package/dist/components/whatsapp-button/index.d.ts +1 -1
- package/dist/components/whatsapp-button/index.js +3 -2
- package/dist/components/whatsapp-button/whatsapp-button.d.ts +3 -0
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +24 -22
- package/dist/hooks/use-clamp-overflow.d.ts +19 -0
- package/dist/hooks/use-overflow-collapse.d.ts +46 -0
- package/dist/hooks/use-persistent-state.d.ts +7 -1
- package/dist/hooks/use-scroll-overflow.d.ts +36 -0
- package/dist/i18n/locales/ar.d.ts +356 -0
- package/dist/i18n/locales/ar.js +370 -3
- package/dist/i18n/locales/de.d.ts +356 -0
- package/dist/i18n/locales/de.js +370 -3
- package/dist/i18n/locales/el.d.ts +356 -0
- package/dist/i18n/locales/el.js +370 -3
- package/dist/i18n/locales/en.d.ts +367 -0
- package/dist/i18n/locales/en.js +381 -3
- package/dist/i18n/locales/es.d.ts +356 -0
- package/dist/i18n/locales/es.js +370 -3
- package/dist/i18n/locales/fr.d.ts +356 -0
- package/dist/i18n/locales/fr.js +370 -3
- package/dist/i18n/locales/hi.d.ts +356 -0
- package/dist/i18n/locales/hi.js +370 -3
- package/dist/i18n/locales/it.d.ts +356 -0
- package/dist/i18n/locales/it.js +370 -3
- package/dist/i18n/locales/ja.d.ts +356 -0
- package/dist/i18n/locales/ja.js +370 -3
- package/dist/i18n/locales/nl.d.ts +356 -0
- package/dist/i18n/locales/nl.js +370 -3
- package/dist/i18n/locales/pl.d.ts +356 -0
- package/dist/i18n/locales/pl.js +370 -3
- package/dist/i18n/locales/pt.d.ts +356 -0
- package/dist/i18n/locales/pt.js +370 -3
- package/dist/i18n/locales/ro.d.ts +356 -0
- package/dist/i18n/locales/ro.js +370 -3
- package/dist/i18n/locales/ru.d.ts +356 -0
- package/dist/i18n/locales/ru.js +370 -3
- package/dist/i18n/locales/sq.d.ts +356 -0
- package/dist/i18n/locales/sq.js +370 -3
- package/dist/i18n/locales/sv.d.ts +356 -0
- package/dist/i18n/locales/sv.js +370 -3
- package/dist/i18n/locales/tr.d.ts +356 -0
- package/dist/i18n/locales/tr.js +370 -3
- package/dist/i18n/locales/zh.d.ts +356 -0
- package/dist/i18n/locales/zh.js +370 -3
- package/dist/index.js +740 -676
- package/dist/locales/ar.json +359 -3
- package/dist/locales/de.json +359 -3
- package/dist/locales/el.json +359 -3
- package/dist/locales/en.json +359 -3
- package/dist/locales/es.json +359 -3
- package/dist/locales/fr.json +359 -3
- package/dist/locales/hi.json +359 -3
- package/dist/locales/it.json +359 -3
- package/dist/locales/ja.json +359 -3
- package/dist/locales/nl.json +359 -3
- package/dist/locales/pl.json +359 -3
- package/dist/locales/pt.json +359 -3
- package/dist/locales/ro.json +359 -3
- package/dist/locales/ru.json +359 -3
- package/dist/locales/sq.json +359 -3
- package/dist/locales/sv.json +359 -3
- package/dist/locales/tr.json +359 -3
- package/dist/locales/zh.json +359 -3
- 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 +3 -2
- package/package.json +50 -1
- package/dist/_chunks/address-autocomplete-CT-9AOli.js +0 -358
- package/dist/_chunks/ai-tools-rail-CInA_1-E.js +0 -356
- package/dist/_chunks/appointment-tray-BMl89NPW.js +0 -419
- package/dist/_chunks/bishop-score-CjsB9bM-.js +0 -185
- package/dist/_chunks/bmi-calculator-n-823_1V.js +0 -258
- package/dist/_chunks/clinical-note-card-gtrxv6zn.js +0 -333
- package/dist/_chunks/editable-currency-cell-renderer-DHOspPee.js +0 -2409
- package/dist/_chunks/email-input-lQivsFrw.js +0 -396
- package/dist/_chunks/patient-summary-card-hEmr4eTW.js +0 -443
- package/dist/_chunks/registry-nPAVE19X.js +0 -21
- package/dist/_chunks/tab-bar-B1ovILzh.js +0 -105
- package/dist/_chunks/tooth-scheme-BIx1O2aJ.js +0 -1257
- package/dist/_chunks/unit-converter-C1V3ACM9.js +0 -196
- package/dist/_chunks/use-persistent-state-i23OWy6G.js +0 -24
- package/dist/_chunks/warning-stack-Cv4fr5zo.js +0 -220
|
@@ -1,49 +1,45 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as a, jsxs as Z, Fragment as xe } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Ze, useId as Ke, useMemo as ze, useState as y, useEffect as T, useRef as E, useCallback as H, useImperativeHandle as Le } from "react";
|
|
3
3
|
import * as pe from "pdfjs-dist/legacy/build/pdf.min.mjs";
|
|
4
|
-
import { c as
|
|
4
|
+
import { c as $ } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { useTranslation as me } from "react-i18next";
|
|
6
6
|
import * as re from "@radix-ui/react-popover";
|
|
7
7
|
import De from "pdfjs-dist/legacy/build/pdf.worker.min.mjs?url";
|
|
8
|
-
import { S as
|
|
9
|
-
import { A as
|
|
10
|
-
import { u as
|
|
11
|
-
import { X as
|
|
12
|
-
import { C as
|
|
13
|
-
import { C as
|
|
14
|
-
import {
|
|
15
|
-
import { S as
|
|
16
|
-
import { P as
|
|
17
|
-
|
|
18
|
-
* @license lucide-react v1.8.0 - ISC
|
|
19
|
-
*
|
|
20
|
-
* This source code is licensed under the ISC license.
|
|
21
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/
|
|
23
|
-
const $e = [
|
|
24
|
-
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
25
|
-
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
|
|
26
|
-
["line", { x1: "11", x2: "11", y1: "8", y2: "14", key: "1vmskp" }],
|
|
27
|
-
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
|
|
28
|
-
], Xe = Oe("zoom-in", $e);
|
|
29
|
-
/**
|
|
30
|
-
* @license lucide-react v1.8.0 - ISC
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the ISC license.
|
|
33
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/
|
|
35
|
-
const Ge = [
|
|
36
|
-
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
37
|
-
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
|
|
38
|
-
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
|
|
39
|
-
], Ye = Oe("zoom-out", Ge), et = {
|
|
8
|
+
import { S as _e } from "./spinner-hbwuKwMf.js";
|
|
9
|
+
import { A as ke } from "./alert-CHYZ96tR.js";
|
|
10
|
+
import { u as qe } from "./registry-DvAUVLHh.js";
|
|
11
|
+
import { X as Be } from "./x-CCcI3eJp.js";
|
|
12
|
+
import { C as He } from "./chevron-left-CX1jqD2M.js";
|
|
13
|
+
import { C as Qe } from "./chevron-right-BrpYejk0.js";
|
|
14
|
+
import { Z as We, a as Ue } from "./zoom-out-CgVtf2Wx.js";
|
|
15
|
+
import { S as Je } from "./search-BonnQsHv.js";
|
|
16
|
+
import { P as Xe } from "./printer-CeVEWfQq.js";
|
|
17
|
+
const $e = {
|
|
40
18
|
id: "pdf-viewer",
|
|
41
|
-
|
|
19
|
+
// `paginate` (go_to_page), `set_value` (zoom preset — ephemeral view state),
|
|
20
|
+
// `filter` (in-document search/highlight). Zoom maps to `set_value` rather
|
|
21
|
+
// than the old `view_change` per the agent-readiness capability vocabulary.
|
|
22
|
+
capabilities: ["paginate", "set_value", "filter"],
|
|
42
23
|
state: {},
|
|
43
24
|
actions: {
|
|
44
25
|
go_to_page: {
|
|
45
26
|
safety: "read",
|
|
46
27
|
argsType: "{ page: number }",
|
|
28
|
+
argsSchema: {
|
|
29
|
+
type: "object",
|
|
30
|
+
properties: {
|
|
31
|
+
page: {
|
|
32
|
+
type: "integer",
|
|
33
|
+
minimum: 1,
|
|
34
|
+
description: "1-indexed target page."
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
required: ["page"]
|
|
38
|
+
},
|
|
39
|
+
idempotent: !0,
|
|
40
|
+
errors: ["Page is out of range for the loaded document."],
|
|
41
|
+
examples: [{ args: { page: 2 } }],
|
|
42
|
+
descriptionKey: "ui.agent.pdfViewer.actions.goToPage",
|
|
47
43
|
description: "Navigate to a specific 1-indexed page.",
|
|
48
44
|
invoke: (o, t) => {
|
|
49
45
|
o.goToPage(t.page);
|
|
@@ -52,7 +48,23 @@ const Ge = [
|
|
|
52
48
|
set_zoom: {
|
|
53
49
|
safety: "read",
|
|
54
50
|
argsType: "{ zoom: PDFZoomPreset }",
|
|
55
|
-
|
|
51
|
+
argsSchema: {
|
|
52
|
+
type: "object",
|
|
53
|
+
properties: {
|
|
54
|
+
zoom: {
|
|
55
|
+
description: "Either a named preset ('fit-width' | 'fit-page' | 'actual-size') or a numeric scale factor (e.g. 1.5).",
|
|
56
|
+
oneOf: [
|
|
57
|
+
{ enum: ["fit-width", "fit-page", "actual-size"] },
|
|
58
|
+
{ type: "number", exclusiveMinimum: 0 }
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
required: ["zoom"]
|
|
63
|
+
},
|
|
64
|
+
idempotent: !0,
|
|
65
|
+
examples: [{ args: { zoom: "fit-width" } }, { args: { zoom: 1.5 } }],
|
|
66
|
+
descriptionKey: "ui.agent.pdfViewer.actions.setZoom",
|
|
67
|
+
description: "Apply a zoom preset or numeric scale factor.",
|
|
56
68
|
invoke: (o, t) => {
|
|
57
69
|
o.setZoom(t.zoom);
|
|
58
70
|
}
|
|
@@ -60,6 +72,19 @@ const Ge = [
|
|
|
60
72
|
search: {
|
|
61
73
|
safety: "read",
|
|
62
74
|
argsType: "{ query: string }",
|
|
75
|
+
argsSchema: {
|
|
76
|
+
type: "object",
|
|
77
|
+
properties: {
|
|
78
|
+
query: {
|
|
79
|
+
type: "string",
|
|
80
|
+
description: "Text to find and highlight in the loaded document."
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
required: ["query"]
|
|
84
|
+
},
|
|
85
|
+
idempotent: !0,
|
|
86
|
+
examples: [{ args: { query: "consent" } }],
|
|
87
|
+
descriptionKey: "ui.agent.pdfViewer.actions.search",
|
|
63
88
|
description: "Search the document for the given query and highlight matches.",
|
|
64
89
|
invoke: (o, t) => {
|
|
65
90
|
o.search(t.query);
|
|
@@ -67,6 +92,7 @@ const Ge = [
|
|
|
67
92
|
},
|
|
68
93
|
print: {
|
|
69
94
|
safety: "read",
|
|
95
|
+
descriptionKey: "ui.agent.pdfViewer.actions.print",
|
|
70
96
|
description: "Open the browser print dialog for the document.",
|
|
71
97
|
invoke: (o) => {
|
|
72
98
|
o.print();
|
|
@@ -83,7 +109,7 @@ const Ge = [
|
|
|
83
109
|
}
|
|
84
110
|
};
|
|
85
111
|
pe.GlobalWorkerOptions.workerSrc = De;
|
|
86
|
-
const Pe =
|
|
112
|
+
const Pe = $(
|
|
87
113
|
[
|
|
88
114
|
"ds:pdf-viewer-alfadocs ds:flex ds:flex-col",
|
|
89
115
|
// Allow the viewer to shrink below its content's intrinsic width when it
|
|
@@ -100,7 +126,7 @@ const Pe = X(
|
|
|
100
126
|
"ds:focus-visible:outline-[var(--ring)]",
|
|
101
127
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
102
128
|
].join(" ")
|
|
103
|
-
),
|
|
129
|
+
), Ge = $(
|
|
104
130
|
[
|
|
105
131
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
106
132
|
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
@@ -108,7 +134,7 @@ const Pe = X(
|
|
|
108
134
|
"ds:bg-[var(--background)]",
|
|
109
135
|
"ds:border-b ds:border-[color:var(--border)]"
|
|
110
136
|
].join(" ")
|
|
111
|
-
), Se =
|
|
137
|
+
), Se = $(
|
|
112
138
|
[
|
|
113
139
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
114
140
|
"ds:[min-block-size:var(--min-target-size)]",
|
|
@@ -125,7 +151,7 @@ const Pe = X(
|
|
|
125
151
|
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
126
152
|
"ds:aria-disabled:opacity-[var(--opacity-50)] ds:aria-disabled:cursor-not-allowed"
|
|
127
153
|
].join(" ")
|
|
128
|
-
),
|
|
154
|
+
), Me = $(
|
|
129
155
|
[
|
|
130
156
|
"ds:[min-block-size:var(--min-target-size)]",
|
|
131
157
|
"ds:inline-size-[4rem] ds:text-center",
|
|
@@ -137,7 +163,7 @@ const Pe = X(
|
|
|
137
163
|
"ds:focus-visible:outline-[var(--ring)]",
|
|
138
164
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
139
165
|
].join(" ")
|
|
140
|
-
),
|
|
166
|
+
), Ye = $(
|
|
141
167
|
[
|
|
142
168
|
"ds:[min-block-size:var(--min-target-size)]",
|
|
143
169
|
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
@@ -148,7 +174,7 @@ const Pe = X(
|
|
|
148
174
|
"ds:focus-visible:outline-[var(--ring)]",
|
|
149
175
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
150
176
|
].join(" ")
|
|
151
|
-
),
|
|
177
|
+
), et = $(
|
|
152
178
|
[
|
|
153
179
|
"ds:relative ds:flex ds:flex-col ds:items-center",
|
|
154
180
|
"ds:gap-[var(--spacing-md)]",
|
|
@@ -169,14 +195,14 @@ const Pe = X(
|
|
|
169
195
|
"ds:min-h-[30rem]",
|
|
170
196
|
"ds:max-h-[80vh]"
|
|
171
197
|
].join(" ")
|
|
172
|
-
),
|
|
198
|
+
), tt = $(
|
|
173
199
|
[
|
|
174
200
|
"ds:relative ds:flex ds:items-center ds:justify-center",
|
|
175
201
|
"ds:bg-[var(--background)]",
|
|
176
202
|
"ds:shadow-[var(--shadow-md)]",
|
|
177
203
|
"ds:rounded-[var(--radius-sm)]"
|
|
178
204
|
].join(" ")
|
|
179
|
-
),
|
|
205
|
+
), rt = [
|
|
180
206
|
"fit-width",
|
|
181
207
|
"fit-page",
|
|
182
208
|
"actual-size",
|
|
@@ -190,48 +216,48 @@ const Pe = X(
|
|
|
190
216
|
function Y(o) {
|
|
191
217
|
return typeof o == "number";
|
|
192
218
|
}
|
|
193
|
-
function
|
|
219
|
+
function Ce(o, t, v) {
|
|
194
220
|
if (Y(o)) return o;
|
|
195
221
|
if (o === "actual-size" || !v) return 1;
|
|
196
|
-
const m = window.getComputedStyle(v),
|
|
197
|
-
return o === "fit-width" ?
|
|
222
|
+
const m = window.getComputedStyle(v), g = parseFloat(m.paddingInlineStart || "0") + parseFloat(m.paddingInlineEnd || "0"), h = parseFloat(m.paddingBlockStart || "0") + parseFloat(m.paddingBlockEnd || "0"), w = Math.max(v.clientWidth - g, 1), x = Math.max(v.clientHeight - h, 1), z = t.width, k = t.height;
|
|
223
|
+
return o === "fit-width" ? w / z : Math.min(w / z, x / k);
|
|
198
224
|
}
|
|
199
|
-
const
|
|
225
|
+
const nt = Ze(
|
|
200
226
|
({
|
|
201
227
|
id: o,
|
|
202
228
|
src: t,
|
|
203
229
|
initialPage: v = 1,
|
|
204
230
|
initialZoom: m = "fit-width",
|
|
205
|
-
pageRotation:
|
|
206
|
-
renderPageOverlay:
|
|
207
|
-
onPageChange:
|
|
208
|
-
onLoadComplete:
|
|
209
|
-
onError:
|
|
210
|
-
toolbar:
|
|
211
|
-
toolbarVariant:
|
|
231
|
+
pageRotation: g,
|
|
232
|
+
renderPageOverlay: h,
|
|
233
|
+
onPageChange: w,
|
|
234
|
+
onLoadComplete: x,
|
|
235
|
+
onError: z,
|
|
236
|
+
toolbar: k = !0,
|
|
237
|
+
toolbarVariant: K = "full",
|
|
212
238
|
ariaLabel: P,
|
|
213
239
|
className: S
|
|
214
240
|
}, b) => {
|
|
215
|
-
const { t: l } = me(),
|
|
216
|
-
() => `pdf-${
|
|
217
|
-
[
|
|
218
|
-
), [A, p] = y(!1), [
|
|
219
|
-
|
|
241
|
+
const { t: l } = me(), M = Ke(), C = ze(
|
|
242
|
+
() => `pdf-${M.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
243
|
+
[M]
|
|
244
|
+
), [A, p] = y(!1), [_, Q] = y(!1);
|
|
245
|
+
T(() => {
|
|
220
246
|
if (typeof document > "u") return;
|
|
221
247
|
p(document.documentElement.dir === "rtl");
|
|
222
|
-
const e = window.matchMedia("(prefers-reduced-motion: reduce)"), r = () =>
|
|
248
|
+
const e = window.matchMedia("(prefers-reduced-motion: reduce)"), r = () => Q(e.matches);
|
|
223
249
|
return r(), e.addEventListener("change", r), () => e.removeEventListener("change", r);
|
|
224
250
|
}, []);
|
|
225
|
-
const [s,
|
|
226
|
-
|
|
227
|
-
ne.current =
|
|
228
|
-
}, [
|
|
251
|
+
const [s, W] = y(null), [i, I] = y(null), [u, O] = y(v), [N, D] = y(m), [L, q] = y({ start: Math.max(1, v - 1), end: v + 1 }), [U, R] = y(""), [n, f] = y(!1), [ee, ge] = y(""), [Te, Oe] = y({ current: 0, total: 0 }), ne = E(w), ae = E(x), se = E(z);
|
|
252
|
+
T(() => {
|
|
253
|
+
ne.current = w, ae.current = x, se.current = z;
|
|
254
|
+
}, [w, x, z]);
|
|
229
255
|
const ce = E(null);
|
|
230
|
-
|
|
256
|
+
T(() => {
|
|
231
257
|
ce.current = s;
|
|
232
|
-
}, [s]),
|
|
258
|
+
}, [s]), T(() => {
|
|
233
259
|
let e = !1;
|
|
234
|
-
|
|
260
|
+
W(null), I(null);
|
|
235
261
|
const r = {
|
|
236
262
|
disableJavaScript: !0,
|
|
237
263
|
isEvalSupported: !1
|
|
@@ -242,12 +268,12 @@ const ot = Le(
|
|
|
242
268
|
async (d) => {
|
|
243
269
|
var J;
|
|
244
270
|
if (e) return;
|
|
245
|
-
let
|
|
271
|
+
let V;
|
|
246
272
|
try {
|
|
247
|
-
const
|
|
248
|
-
|
|
273
|
+
const X = await d.getMetadata(), F = X == null ? void 0 : X.info;
|
|
274
|
+
V = F == null ? void 0 : F.Title;
|
|
249
275
|
} catch {
|
|
250
|
-
|
|
276
|
+
V = void 0;
|
|
251
277
|
}
|
|
252
278
|
if (e) {
|
|
253
279
|
try {
|
|
@@ -256,14 +282,14 @@ const ot = Le(
|
|
|
256
282
|
}
|
|
257
283
|
return;
|
|
258
284
|
}
|
|
259
|
-
const
|
|
260
|
-
|
|
285
|
+
const B = { doc: d, numPages: d.numPages, title: V };
|
|
286
|
+
W(B), (J = ae.current) == null || J.call(ae, { numPages: d.numPages, title: V });
|
|
261
287
|
},
|
|
262
288
|
(d) => {
|
|
263
|
-
var
|
|
289
|
+
var B;
|
|
264
290
|
if (e) return;
|
|
265
|
-
const
|
|
266
|
-
|
|
291
|
+
const V = d instanceof Error ? d : new Error(String(d));
|
|
292
|
+
I(V), (B = se.current) == null || B.call(se, V);
|
|
267
293
|
}
|
|
268
294
|
), () => {
|
|
269
295
|
e = !0, c.destroy();
|
|
@@ -276,58 +302,58 @@ const ot = Le(
|
|
|
276
302
|
ce.current = null;
|
|
277
303
|
}
|
|
278
304
|
};
|
|
279
|
-
}, [t]),
|
|
305
|
+
}, [t]), T(() => {
|
|
280
306
|
var e;
|
|
281
|
-
s && (
|
|
307
|
+
s && (R(
|
|
282
308
|
l("pdf.pageOf", { current: u, total: s.numPages })
|
|
283
309
|
), (e = ne.current) == null || e.call(ne, u));
|
|
284
310
|
}, [u, s, l]);
|
|
285
|
-
const oe = E(null), le = E([]),
|
|
311
|
+
const oe = E(null), le = E([]), j = H(
|
|
286
312
|
(e) => {
|
|
287
313
|
if (!s) return;
|
|
288
314
|
const r = Math.max(1, Math.min(e, s.numPages));
|
|
289
|
-
|
|
315
|
+
O(r);
|
|
290
316
|
const c = le.current[r - 1];
|
|
291
317
|
c && c.scrollIntoView({
|
|
292
318
|
behavior: "auto",
|
|
293
319
|
block: "start"
|
|
294
320
|
});
|
|
295
321
|
},
|
|
296
|
-
[s,
|
|
297
|
-
),
|
|
322
|
+
[s, _]
|
|
323
|
+
), he = H((e) => {
|
|
298
324
|
D(e);
|
|
299
|
-
}, []), te =
|
|
325
|
+
}, []), te = H(() => {
|
|
300
326
|
typeof window < "u" && window.print();
|
|
301
|
-
}, []), ve =
|
|
302
|
-
|
|
303
|
-
}, []), ue =
|
|
327
|
+
}, []), ve = H((e) => {
|
|
328
|
+
ge(e), f(e.length > 0);
|
|
329
|
+
}, []), ue = ze(
|
|
304
330
|
() => ({
|
|
305
|
-
goToPage:
|
|
306
|
-
setZoom:
|
|
331
|
+
goToPage: j,
|
|
332
|
+
setZoom: he,
|
|
307
333
|
search: ve,
|
|
308
334
|
print: te
|
|
309
335
|
}),
|
|
310
|
-
[
|
|
336
|
+
[j, he, ve, te]
|
|
311
337
|
);
|
|
312
|
-
|
|
313
|
-
const
|
|
338
|
+
Le(b, () => ue, [ue]), qe($e, ue, o);
|
|
339
|
+
const Re = H(
|
|
314
340
|
(e) => {
|
|
315
341
|
if (!s) return;
|
|
316
342
|
const r = e.metaKey || e.ctrlKey;
|
|
317
343
|
if (e.key === "PageDown") {
|
|
318
|
-
e.preventDefault(),
|
|
344
|
+
e.preventDefault(), j(u + 1);
|
|
319
345
|
return;
|
|
320
346
|
}
|
|
321
347
|
if (e.key === "PageUp") {
|
|
322
|
-
e.preventDefault(),
|
|
348
|
+
e.preventDefault(), j(u - 1);
|
|
323
349
|
return;
|
|
324
350
|
}
|
|
325
351
|
if (e.key === "Home") {
|
|
326
|
-
e.preventDefault(),
|
|
352
|
+
e.preventDefault(), j(1);
|
|
327
353
|
return;
|
|
328
354
|
}
|
|
329
355
|
if (e.key === "End") {
|
|
330
|
-
e.preventDefault(),
|
|
356
|
+
e.preventDefault(), j(s.numPages);
|
|
331
357
|
return;
|
|
332
358
|
}
|
|
333
359
|
if (r && e.key.toLowerCase() === "f") {
|
|
@@ -350,28 +376,28 @@ const ot = Le(
|
|
|
350
376
|
}
|
|
351
377
|
r && e.key.toLowerCase() === "p" && (e.preventDefault(), te());
|
|
352
378
|
},
|
|
353
|
-
[u,
|
|
379
|
+
[u, j, te, s]
|
|
354
380
|
), fe = E(u);
|
|
355
|
-
|
|
381
|
+
T(() => {
|
|
356
382
|
fe.current = u;
|
|
357
|
-
}, [u]),
|
|
383
|
+
}, [u]), T(() => {
|
|
358
384
|
if (!s) return;
|
|
359
385
|
const e = oe.current;
|
|
360
386
|
if (!e) return;
|
|
361
387
|
const r = /* @__PURE__ */ new Map(), c = new IntersectionObserver(
|
|
362
388
|
(d) => {
|
|
363
|
-
for (const
|
|
364
|
-
const G =
|
|
389
|
+
for (const F of d) {
|
|
390
|
+
const G = F.target.dataset.pageNumber;
|
|
365
391
|
if (!G) continue;
|
|
366
|
-
const
|
|
367
|
-
r.set(
|
|
392
|
+
const Ee = Number(G);
|
|
393
|
+
r.set(Ee, F.intersectionRatio);
|
|
368
394
|
}
|
|
369
|
-
let
|
|
370
|
-
for (const [
|
|
371
|
-
G >
|
|
372
|
-
|
|
395
|
+
let V = fe.current, B = 0, J = 1 / 0, X = -1 / 0;
|
|
396
|
+
for (const [F, G] of r.entries())
|
|
397
|
+
G > B && (V = F, B = G), G > 0 && (J = Math.min(J, F), X = Math.max(X, F));
|
|
398
|
+
B > 0 && V !== fe.current && O(V), J !== 1 / 0 && q({
|
|
373
399
|
start: Math.max(1, J - 1),
|
|
374
|
-
end: Math.min(s.numPages,
|
|
400
|
+
end: Math.min(s.numPages, X + 1)
|
|
375
401
|
});
|
|
376
402
|
},
|
|
377
403
|
{ root: e, threshold: [0, 0.25, 0.5, 0.75, 1] }
|
|
@@ -380,37 +406,37 @@ const ot = Le(
|
|
|
380
406
|
d && c.observe(d);
|
|
381
407
|
}), () => c.disconnect();
|
|
382
408
|
}, [s]);
|
|
383
|
-
const [
|
|
384
|
-
|
|
409
|
+
const [Ae, Ve] = y(0);
|
|
410
|
+
T(() => {
|
|
385
411
|
const e = oe.current;
|
|
386
412
|
if (!e || typeof ResizeObserver > "u") return;
|
|
387
413
|
const r = new ResizeObserver(() => {
|
|
388
|
-
(
|
|
414
|
+
(N === "fit-width" || N === "fit-page") && Ve((c) => c + 1);
|
|
389
415
|
});
|
|
390
416
|
return r.observe(e), () => r.disconnect();
|
|
391
|
-
}, [
|
|
392
|
-
const be = E([]), [ie, ye] = y(0),
|
|
417
|
+
}, [N]);
|
|
418
|
+
const be = E([]), [ie, ye] = y(0), je = H(
|
|
393
419
|
(e) => (r) => {
|
|
394
420
|
be.current[e] = r;
|
|
395
421
|
},
|
|
396
422
|
[]
|
|
397
|
-
),
|
|
423
|
+
), we = H((e) => {
|
|
398
424
|
const r = be.current[e];
|
|
399
425
|
r && r.focus();
|
|
400
|
-
}, []), de =
|
|
426
|
+
}, []), de = K === "minimal" ? 2 : 8, Fe = H(
|
|
401
427
|
(e) => {
|
|
402
428
|
const r = A ? "ArrowLeft" : "ArrowRight", c = A ? "ArrowRight" : "ArrowLeft";
|
|
403
429
|
let d = null;
|
|
404
|
-
e.key === r ? d = (ie + 1) % de : e.key === c ? d = (ie - 1 + de) % de : e.key === "Home" ? d = 0 : e.key === "End" && (d = de - 1), d !== null && (e.preventDefault(), ye(d),
|
|
430
|
+
e.key === r ? d = (ie + 1) % de : e.key === c ? d = (ie - 1 + de) % de : e.key === "Home" ? d = 0 : e.key === "End" && (d = de - 1), d !== null && (e.preventDefault(), ye(d), we(d));
|
|
405
431
|
},
|
|
406
|
-
[
|
|
432
|
+
[we, A, ie]
|
|
407
433
|
);
|
|
408
434
|
return i ? /* @__PURE__ */ a(
|
|
409
435
|
"div",
|
|
410
436
|
{
|
|
411
437
|
className: [Pe(), S].filter(Boolean).join(" "),
|
|
412
438
|
"aria-label": P ?? l("pdf.error"),
|
|
413
|
-
children: /* @__PURE__ */ a("div", { className: "ds:p-[var(--spacing-lg)]", children: /* @__PURE__ */ a(
|
|
439
|
+
children: /* @__PURE__ */ a("div", { className: "ds:p-[var(--spacing-lg)]", children: /* @__PURE__ */ a(ke, { variant: "error", live: "polite", children: /* @__PURE__ */ Z(ke.Description, { children: [
|
|
414
440
|
l("pdf.error"),
|
|
415
441
|
": ",
|
|
416
442
|
i.message
|
|
@@ -418,30 +444,30 @@ const ot = Le(
|
|
|
418
444
|
}
|
|
419
445
|
) : (
|
|
420
446
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- region-level keyboard shortcuts (search, zoom) intentionally captured at the wrapper for the entire PDF viewer
|
|
421
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ Z(
|
|
422
448
|
"div",
|
|
423
449
|
{
|
|
424
|
-
id:
|
|
450
|
+
id: C,
|
|
425
451
|
role: "region",
|
|
426
452
|
"aria-label": P ?? l("pdf.toolbarLabel"),
|
|
427
453
|
className: [Pe(), S].filter(Boolean).join(" "),
|
|
428
454
|
dir: A ? "rtl" : void 0,
|
|
429
|
-
onKeyDown:
|
|
455
|
+
onKeyDown: Re,
|
|
430
456
|
tabIndex: -1,
|
|
431
457
|
"data-component": "pdf-viewer",
|
|
432
458
|
"data-component-id": o,
|
|
433
459
|
"data-pdfjs-worker-src": De,
|
|
434
460
|
children: [
|
|
435
|
-
|
|
436
|
-
|
|
461
|
+
k ? /* @__PURE__ */ a(
|
|
462
|
+
at,
|
|
437
463
|
{
|
|
438
|
-
variant:
|
|
464
|
+
variant: K,
|
|
439
465
|
currentPage: u,
|
|
440
466
|
numPages: (s == null ? void 0 : s.numPages) ?? 0,
|
|
441
|
-
zoom:
|
|
442
|
-
onPrev: () =>
|
|
443
|
-
onNext: () =>
|
|
444
|
-
onJump: (e) =>
|
|
467
|
+
zoom: N,
|
|
468
|
+
onPrev: () => j(u - 1),
|
|
469
|
+
onNext: () => j(u + 1),
|
|
470
|
+
onJump: (e) => j(e),
|
|
445
471
|
onZoomIn: () => {
|
|
446
472
|
D(
|
|
447
473
|
(e) => Y(e) ? Math.min(e * 1.25, 4) : 1.25
|
|
@@ -459,13 +485,13 @@ const ot = Le(
|
|
|
459
485
|
onSearchOpenChange: f,
|
|
460
486
|
searchQuery: ee,
|
|
461
487
|
onSearchQueryChange: (e) => {
|
|
462
|
-
|
|
488
|
+
ge(e);
|
|
463
489
|
},
|
|
464
|
-
searchMatches:
|
|
465
|
-
register:
|
|
490
|
+
searchMatches: Te,
|
|
491
|
+
register: je,
|
|
466
492
|
focusIndex: ie,
|
|
467
493
|
setFocusIndex: ye,
|
|
468
|
-
onToolbarKeyDown:
|
|
494
|
+
onToolbarKeyDown: Fe,
|
|
469
495
|
isRtl: A
|
|
470
496
|
}
|
|
471
497
|
) : null,
|
|
@@ -474,29 +500,29 @@ const ot = Le(
|
|
|
474
500
|
"div",
|
|
475
501
|
{
|
|
476
502
|
ref: oe,
|
|
477
|
-
className:
|
|
503
|
+
className: et(),
|
|
478
504
|
"data-testid": "pdf-pages-container",
|
|
479
505
|
tabIndex: 0,
|
|
480
506
|
"aria-label": l("pdf.pagesRegionLabel"),
|
|
481
507
|
children: s ? Array.from({ length: s.numPages }, (e, r) => r + 1).map(
|
|
482
508
|
(e) => /* @__PURE__ */ a(
|
|
483
|
-
|
|
509
|
+
st,
|
|
484
510
|
{
|
|
485
511
|
pageNumber: e,
|
|
486
512
|
totalPages: s.numPages,
|
|
487
513
|
doc: s.doc,
|
|
488
|
-
zoom:
|
|
489
|
-
pageRotation:
|
|
490
|
-
renderPageOverlay:
|
|
514
|
+
zoom: N,
|
|
515
|
+
pageRotation: g,
|
|
516
|
+
renderPageOverlay: h,
|
|
491
517
|
container: oe.current,
|
|
492
|
-
resizeTick:
|
|
493
|
-
shouldRender: e >=
|
|
518
|
+
resizeTick: Ae,
|
|
519
|
+
shouldRender: e >= L.start && e <= L.end,
|
|
494
520
|
registerRef: (r) => {
|
|
495
521
|
le.current[e - 1] = r;
|
|
496
522
|
},
|
|
497
523
|
searchQuery: ee,
|
|
498
524
|
onMatchCount: (r) => {
|
|
499
|
-
|
|
525
|
+
Oe((c) => r === 0 && c.total === 0 ? c : {
|
|
500
526
|
current: Math.min(c.current || 1, r || 1),
|
|
501
527
|
total: Math.max(c.total, r)
|
|
502
528
|
});
|
|
@@ -504,8 +530,8 @@ const ot = Le(
|
|
|
504
530
|
},
|
|
505
531
|
e
|
|
506
532
|
)
|
|
507
|
-
) : /* @__PURE__ */
|
|
508
|
-
/* @__PURE__ */ a(
|
|
533
|
+
) : /* @__PURE__ */ Z("div", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)] ds:text-[var(--muted-foreground)] ds:p-[var(--spacing-lg)]", children: [
|
|
534
|
+
/* @__PURE__ */ a(_e, { variant: "pulse", size: "sm", label: l("pdf.loading") }),
|
|
509
535
|
/* @__PURE__ */ a("span", { children: l("pdf.loading") })
|
|
510
536
|
] })
|
|
511
537
|
}
|
|
@@ -516,48 +542,48 @@ const ot = Le(
|
|
|
516
542
|
);
|
|
517
543
|
}
|
|
518
544
|
);
|
|
519
|
-
|
|
520
|
-
function
|
|
545
|
+
nt.displayName = "PDFViewer";
|
|
546
|
+
function at(o) {
|
|
521
547
|
const { t } = me(), {
|
|
522
548
|
variant: v,
|
|
523
549
|
currentPage: m,
|
|
524
|
-
numPages:
|
|
525
|
-
zoom:
|
|
526
|
-
onPrev:
|
|
527
|
-
onNext:
|
|
528
|
-
onJump:
|
|
529
|
-
onZoomIn:
|
|
530
|
-
onZoomOut:
|
|
550
|
+
numPages: g,
|
|
551
|
+
zoom: h,
|
|
552
|
+
onPrev: w,
|
|
553
|
+
onNext: x,
|
|
554
|
+
onJump: z,
|
|
555
|
+
onZoomIn: k,
|
|
556
|
+
onZoomOut: K,
|
|
531
557
|
onZoomPreset: P,
|
|
532
558
|
onOpenSearch: S,
|
|
533
559
|
onPrint: b,
|
|
534
560
|
searchOpen: l,
|
|
535
|
-
onSearchOpenChange:
|
|
536
|
-
searchQuery:
|
|
561
|
+
onSearchOpenChange: M,
|
|
562
|
+
searchQuery: C,
|
|
537
563
|
onSearchQueryChange: A,
|
|
538
564
|
searchMatches: p,
|
|
539
|
-
register:
|
|
540
|
-
focusIndex:
|
|
565
|
+
register: _,
|
|
566
|
+
focusIndex: Q,
|
|
541
567
|
setFocusIndex: s,
|
|
542
|
-
onToolbarKeyDown:
|
|
543
|
-
} = o, i = v === "minimal",
|
|
544
|
-
|
|
568
|
+
onToolbarKeyDown: W
|
|
569
|
+
} = o, i = v === "minimal", I = i ? 0 : 3, u = i ? 1 : 4, O = 5, [N, D] = y(String(m));
|
|
570
|
+
T(() => {
|
|
545
571
|
D(String(m));
|
|
546
572
|
}, [m]);
|
|
547
|
-
const
|
|
573
|
+
const L = m <= 1, q = m >= g;
|
|
548
574
|
function U() {
|
|
549
|
-
const n = Number(
|
|
550
|
-
Number.isFinite(n) && n >= 1 ?
|
|
575
|
+
const n = Number(N);
|
|
576
|
+
Number.isFinite(n) && n >= 1 ? z(Math.min(n, g)) : D(String(m));
|
|
551
577
|
}
|
|
552
|
-
function
|
|
578
|
+
function R(n) {
|
|
553
579
|
return /* @__PURE__ */ a(
|
|
554
580
|
"button",
|
|
555
581
|
{
|
|
556
582
|
type: "button",
|
|
557
|
-
ref:
|
|
558
|
-
tabIndex: n.index ===
|
|
583
|
+
ref: _(n.index),
|
|
584
|
+
tabIndex: n.index === Q ? 0 : -1,
|
|
559
585
|
onFocus: () => s(n.index),
|
|
560
|
-
onKeyDown:
|
|
586
|
+
onKeyDown: W,
|
|
561
587
|
"aria-label": n.label,
|
|
562
588
|
"aria-disabled": n.disabled || void 0,
|
|
563
589
|
title: n.label,
|
|
@@ -573,34 +599,34 @@ function it(o) {
|
|
|
573
599
|
}
|
|
574
600
|
);
|
|
575
601
|
}
|
|
576
|
-
return /* @__PURE__ */
|
|
602
|
+
return /* @__PURE__ */ Z(
|
|
577
603
|
"div",
|
|
578
604
|
{
|
|
579
605
|
role: "toolbar",
|
|
580
606
|
"aria-label": t("pdf.toolbarLabel"),
|
|
581
|
-
className:
|
|
607
|
+
className: Ge(),
|
|
582
608
|
children: [
|
|
583
|
-
!i && /* @__PURE__ */
|
|
584
|
-
|
|
609
|
+
!i && /* @__PURE__ */ Z(xe, { children: [
|
|
610
|
+
R({
|
|
585
611
|
index: 0,
|
|
586
612
|
label: t("pdf.previousPage"),
|
|
587
|
-
disabled:
|
|
588
|
-
onActivate:
|
|
613
|
+
disabled: L,
|
|
614
|
+
onActivate: w,
|
|
589
615
|
icon: /* @__PURE__ */ a(
|
|
590
|
-
|
|
616
|
+
He,
|
|
591
617
|
{
|
|
592
618
|
"aria-hidden": "true",
|
|
593
619
|
className: "ds:block-size-4 ds:inline-size-4 ds:rtl:rotate-180"
|
|
594
620
|
}
|
|
595
621
|
)
|
|
596
622
|
}),
|
|
597
|
-
|
|
623
|
+
R({
|
|
598
624
|
index: 1,
|
|
599
625
|
label: t("pdf.nextPage"),
|
|
600
|
-
disabled:
|
|
601
|
-
onActivate:
|
|
626
|
+
disabled: q,
|
|
627
|
+
onActivate: x,
|
|
602
628
|
icon: /* @__PURE__ */ a(
|
|
603
|
-
|
|
629
|
+
Qe,
|
|
604
630
|
{
|
|
605
631
|
"aria-hidden": "true",
|
|
606
632
|
className: "ds:block-size-4 ds:inline-size-4 ds:rtl:rotate-180"
|
|
@@ -612,18 +638,18 @@ function it(o) {
|
|
|
612
638
|
{
|
|
613
639
|
type: "number",
|
|
614
640
|
min: 1,
|
|
615
|
-
max: Math.max(
|
|
616
|
-
value:
|
|
641
|
+
max: Math.max(g, 1),
|
|
642
|
+
value: N,
|
|
617
643
|
onChange: (n) => D(n.target.value),
|
|
618
644
|
onKeyDown: (n) => {
|
|
619
645
|
n.key === "Enter" && (n.preventDefault(), U());
|
|
620
646
|
},
|
|
621
647
|
onBlur: U,
|
|
622
648
|
onFocus: () => s(2),
|
|
623
|
-
ref:
|
|
624
|
-
tabIndex:
|
|
649
|
+
ref: _(2),
|
|
650
|
+
tabIndex: Q === 2 ? 0 : -1,
|
|
625
651
|
"aria-label": t("pdf.currentPageInput"),
|
|
626
|
-
className:
|
|
652
|
+
className: Me()
|
|
627
653
|
}
|
|
628
654
|
),
|
|
629
655
|
/* @__PURE__ */ a(
|
|
@@ -631,7 +657,7 @@ function it(o) {
|
|
|
631
657
|
{
|
|
632
658
|
"aria-hidden": "true",
|
|
633
659
|
className: "type-body-sm ds:text-[var(--muted-foreground)]",
|
|
634
|
-
children: t("pdf.pageOf", { current: m, total:
|
|
660
|
+
children: t("pdf.pageOf", { current: m, total: g || 0 })
|
|
635
661
|
}
|
|
636
662
|
),
|
|
637
663
|
/* @__PURE__ */ a(
|
|
@@ -642,35 +668,35 @@ function it(o) {
|
|
|
642
668
|
}
|
|
643
669
|
)
|
|
644
670
|
] }),
|
|
645
|
-
|
|
646
|
-
index:
|
|
671
|
+
R({
|
|
672
|
+
index: I,
|
|
647
673
|
label: t("pdf.zoom.out"),
|
|
648
|
-
onActivate:
|
|
674
|
+
onActivate: K,
|
|
649
675
|
icon: /* @__PURE__ */ a(
|
|
650
|
-
|
|
676
|
+
We,
|
|
651
677
|
{
|
|
652
678
|
"aria-hidden": "true",
|
|
653
679
|
className: "ds:block-size-4 ds:inline-size-4"
|
|
654
680
|
}
|
|
655
681
|
)
|
|
656
682
|
}),
|
|
657
|
-
|
|
683
|
+
R({
|
|
658
684
|
index: u,
|
|
659
685
|
label: t("pdf.zoom.in"),
|
|
660
|
-
onActivate:
|
|
686
|
+
onActivate: k,
|
|
661
687
|
icon: /* @__PURE__ */ a(
|
|
662
|
-
|
|
688
|
+
Ue,
|
|
663
689
|
{
|
|
664
690
|
"aria-hidden": "true",
|
|
665
691
|
className: "ds:block-size-4 ds:inline-size-4"
|
|
666
692
|
}
|
|
667
693
|
)
|
|
668
694
|
}),
|
|
669
|
-
!i && /* @__PURE__ */
|
|
695
|
+
!i && /* @__PURE__ */ Z(
|
|
670
696
|
"select",
|
|
671
697
|
{
|
|
672
698
|
"aria-label": t("pdf.zoom.preset"),
|
|
673
|
-
value: typeof
|
|
699
|
+
value: typeof h == "number" ? String(h) : h,
|
|
674
700
|
onChange: (n) => {
|
|
675
701
|
const f = n.target.value;
|
|
676
702
|
if (f === "fit-width" || f === "fit-page" || f === "actual-size")
|
|
@@ -680,39 +706,39 @@ function it(o) {
|
|
|
680
706
|
Number.isFinite(ee) && P(ee);
|
|
681
707
|
}
|
|
682
708
|
},
|
|
683
|
-
ref:
|
|
684
|
-
tabIndex:
|
|
685
|
-
onFocus: () => s(
|
|
686
|
-
onKeyDown:
|
|
687
|
-
className:
|
|
709
|
+
ref: _(O),
|
|
710
|
+
tabIndex: Q === O ? 0 : -1,
|
|
711
|
+
onFocus: () => s(O),
|
|
712
|
+
onKeyDown: W,
|
|
713
|
+
className: Ye(),
|
|
688
714
|
children: [
|
|
689
715
|
/* @__PURE__ */ a("option", { value: "fit-width", children: t("pdf.zoom.fitWidth") }),
|
|
690
716
|
/* @__PURE__ */ a("option", { value: "fit-page", children: t("pdf.zoom.fitPage") }),
|
|
691
717
|
/* @__PURE__ */ a("option", { value: "actual-size", children: t("pdf.zoom.actualSize") }),
|
|
692
|
-
|
|
718
|
+
rt.filter(Y).map((n) => /* @__PURE__ */ a("option", { value: String(n), children: `${Math.round(n * 100)}%` }, n))
|
|
693
719
|
]
|
|
694
720
|
}
|
|
695
721
|
),
|
|
696
|
-
!i && /* @__PURE__ */
|
|
697
|
-
/* @__PURE__ */
|
|
722
|
+
!i && /* @__PURE__ */ Z(xe, { children: [
|
|
723
|
+
/* @__PURE__ */ Z(
|
|
698
724
|
re.Root,
|
|
699
725
|
{
|
|
700
726
|
open: l,
|
|
701
|
-
onOpenChange:
|
|
727
|
+
onOpenChange: M,
|
|
702
728
|
children: [
|
|
703
|
-
/* @__PURE__ */ a(re.Trigger, { asChild: !0, children:
|
|
729
|
+
/* @__PURE__ */ a(re.Trigger, { asChild: !0, children: R({
|
|
704
730
|
index: 6,
|
|
705
731
|
label: t("pdf.search.open"),
|
|
706
732
|
onActivate: S,
|
|
707
733
|
icon: /* @__PURE__ */ a(
|
|
708
|
-
|
|
734
|
+
Je,
|
|
709
735
|
{
|
|
710
736
|
"aria-hidden": "true",
|
|
711
737
|
className: "ds:block-size-4 ds:inline-size-4"
|
|
712
738
|
}
|
|
713
739
|
)
|
|
714
740
|
}) }),
|
|
715
|
-
/* @__PURE__ */ a(re.Portal, { children: /* @__PURE__ */
|
|
741
|
+
/* @__PURE__ */ a(re.Portal, { children: /* @__PURE__ */ Z(
|
|
716
742
|
re.Content,
|
|
717
743
|
{
|
|
718
744
|
sideOffset: 8,
|
|
@@ -730,11 +756,11 @@ function it(o) {
|
|
|
730
756
|
{
|
|
731
757
|
type: "search",
|
|
732
758
|
autoFocus: !0,
|
|
733
|
-
value:
|
|
759
|
+
value: C,
|
|
734
760
|
onChange: (n) => A(n.target.value),
|
|
735
761
|
placeholder: t("pdf.search.placeholder"),
|
|
736
762
|
"aria-label": t("pdf.search.placeholder"),
|
|
737
|
-
className:
|
|
763
|
+
className: Me({
|
|
738
764
|
className: "ds:inline-size-[16rem] ds:text-start"
|
|
739
765
|
})
|
|
740
766
|
}
|
|
@@ -747,7 +773,7 @@ function it(o) {
|
|
|
747
773
|
children: p.total > 0 ? t("pdf.search.countOfTotal", {
|
|
748
774
|
current: p.current,
|
|
749
775
|
total: p.total
|
|
750
|
-
}) :
|
|
776
|
+
}) : C ? t("pdf.search.noResults") : ""
|
|
751
777
|
}
|
|
752
778
|
),
|
|
753
779
|
/* @__PURE__ */ a(re.Close, { asChild: !0, children: /* @__PURE__ */ a(
|
|
@@ -757,7 +783,7 @@ function it(o) {
|
|
|
757
783
|
"aria-label": t("pdf.search.close"),
|
|
758
784
|
className: Se(),
|
|
759
785
|
children: /* @__PURE__ */ a(
|
|
760
|
-
|
|
786
|
+
Be,
|
|
761
787
|
{
|
|
762
788
|
"aria-hidden": "true",
|
|
763
789
|
className: "ds:block-size-4 ds:inline-size-4"
|
|
@@ -771,12 +797,12 @@ function it(o) {
|
|
|
771
797
|
]
|
|
772
798
|
}
|
|
773
799
|
),
|
|
774
|
-
|
|
800
|
+
R({
|
|
775
801
|
index: 7,
|
|
776
802
|
label: t("pdf.print"),
|
|
777
803
|
onActivate: b,
|
|
778
804
|
icon: /* @__PURE__ */ a(
|
|
779
|
-
|
|
805
|
+
Xe,
|
|
780
806
|
{
|
|
781
807
|
"aria-hidden": "true",
|
|
782
808
|
className: "ds:block-size-4 ds:inline-size-4"
|
|
@@ -788,70 +814,70 @@ function it(o) {
|
|
|
788
814
|
}
|
|
789
815
|
);
|
|
790
816
|
}
|
|
791
|
-
function
|
|
817
|
+
function st(o) {
|
|
792
818
|
const {
|
|
793
819
|
pageNumber: t,
|
|
794
820
|
totalPages: v,
|
|
795
821
|
doc: m,
|
|
796
|
-
zoom:
|
|
797
|
-
pageRotation:
|
|
798
|
-
renderPageOverlay:
|
|
799
|
-
container:
|
|
800
|
-
resizeTick:
|
|
801
|
-
shouldRender:
|
|
802
|
-
registerRef:
|
|
822
|
+
zoom: g,
|
|
823
|
+
pageRotation: h,
|
|
824
|
+
renderPageOverlay: w,
|
|
825
|
+
container: x,
|
|
826
|
+
resizeTick: z,
|
|
827
|
+
shouldRender: k,
|
|
828
|
+
registerRef: K,
|
|
803
829
|
searchQuery: P,
|
|
804
830
|
onMatchCount: S
|
|
805
|
-
} = o, { t: b } = me(), l = E(null),
|
|
831
|
+
} = o, { t: b } = me(), l = E(null), M = E(null), [C, A] = y({
|
|
806
832
|
width: 612,
|
|
807
833
|
height: 792
|
|
808
|
-
}), [p,
|
|
809
|
-
|
|
834
|
+
}), [p, _] = y(null);
|
|
835
|
+
T(() => {
|
|
810
836
|
let i = !1;
|
|
811
|
-
return m.getPage(t).then((
|
|
812
|
-
i ||
|
|
837
|
+
return m.getPage(t).then((I) => {
|
|
838
|
+
i || _(I);
|
|
813
839
|
}), () => {
|
|
814
840
|
i = !0;
|
|
815
841
|
};
|
|
816
|
-
}, [m, t]),
|
|
842
|
+
}, [m, t]), T(() => {
|
|
817
843
|
if (!p) return;
|
|
818
|
-
const i = (
|
|
844
|
+
const i = (N) => h === void 0 ? { scale: N } : { scale: N, rotation: h }, I = p.getViewport(i(1)), u = Ce(g, I, x), O = p.getViewport(i(u));
|
|
819
845
|
A({
|
|
820
|
-
width: Math.floor(
|
|
821
|
-
height: Math.floor(
|
|
846
|
+
width: Math.floor(O.width),
|
|
847
|
+
height: Math.floor(O.height)
|
|
822
848
|
});
|
|
823
|
-
}, [p,
|
|
824
|
-
const
|
|
825
|
-
|
|
826
|
-
if (!p || !
|
|
849
|
+
}, [p, g, x, z, h]);
|
|
850
|
+
const Q = h ?? (p == null ? void 0 : p.rotate) ?? 0;
|
|
851
|
+
T(() => {
|
|
852
|
+
if (!p || !k) {
|
|
827
853
|
const f = l.current;
|
|
828
|
-
f && !
|
|
854
|
+
f && !k && (f.width = 0);
|
|
829
855
|
return;
|
|
830
856
|
}
|
|
831
|
-
const i = l.current,
|
|
857
|
+
const i = l.current, I = M.current;
|
|
832
858
|
if (!i) return;
|
|
833
859
|
const u = i.getContext("2d");
|
|
834
860
|
if (!u) return;
|
|
835
|
-
const
|
|
836
|
-
i.width = Math.floor(
|
|
861
|
+
const O = (f) => h === void 0 ? { scale: f } : { scale: f, rotation: h }, N = p.getViewport(O(1)), D = Ce(g, N, x), L = p.getViewport(O(D)), q = Math.max(1, window.devicePixelRatio || 1);
|
|
862
|
+
i.width = Math.floor(L.width * q), i.height = Math.floor(L.height * q), u.setTransform(q, 0, 0, q, 0, 0);
|
|
837
863
|
const U = p.render({
|
|
838
864
|
canvas: i,
|
|
839
865
|
canvasContext: u,
|
|
840
|
-
viewport:
|
|
866
|
+
viewport: L
|
|
841
867
|
});
|
|
842
|
-
let
|
|
868
|
+
let R = !1, n = null;
|
|
843
869
|
return U.promise.then(async () => {
|
|
844
|
-
if (
|
|
845
|
-
|
|
870
|
+
if (R || !I) return;
|
|
871
|
+
I.textContent = "";
|
|
846
872
|
const f = await p.getTextContent();
|
|
847
|
-
|
|
873
|
+
R || (n = new pe.TextLayer({
|
|
848
874
|
textContentSource: f,
|
|
849
|
-
container:
|
|
850
|
-
viewport:
|
|
851
|
-
}), await n.render(),
|
|
875
|
+
container: I,
|
|
876
|
+
viewport: L
|
|
877
|
+
}), await n.render(), Ne(I, P, S));
|
|
852
878
|
}).catch(() => {
|
|
853
879
|
}), () => {
|
|
854
|
-
|
|
880
|
+
R = !0;
|
|
855
881
|
try {
|
|
856
882
|
U.cancel();
|
|
857
883
|
} catch {
|
|
@@ -864,41 +890,41 @@ function dt(o) {
|
|
|
864
890
|
};
|
|
865
891
|
}, [
|
|
866
892
|
p,
|
|
867
|
-
z,
|
|
868
|
-
h,
|
|
869
|
-
w,
|
|
870
893
|
k,
|
|
894
|
+
g,
|
|
895
|
+
x,
|
|
896
|
+
z,
|
|
871
897
|
P,
|
|
872
898
|
S,
|
|
873
|
-
|
|
874
|
-
]),
|
|
875
|
-
if (!
|
|
876
|
-
const i =
|
|
877
|
-
i &&
|
|
878
|
-
}, [P,
|
|
899
|
+
h
|
|
900
|
+
]), T(() => {
|
|
901
|
+
if (!k) return;
|
|
902
|
+
const i = M.current;
|
|
903
|
+
i && Ne(i, P, S);
|
|
904
|
+
}, [P, k, S]);
|
|
879
905
|
const s = {
|
|
880
|
-
width:
|
|
881
|
-
height:
|
|
882
|
-
},
|
|
883
|
-
width:
|
|
884
|
-
height:
|
|
906
|
+
width: C.width,
|
|
907
|
+
height: C.height
|
|
908
|
+
}, W = {
|
|
909
|
+
width: C.width,
|
|
910
|
+
height: C.height
|
|
885
911
|
};
|
|
886
|
-
return /* @__PURE__ */
|
|
912
|
+
return /* @__PURE__ */ Z(
|
|
887
913
|
"article",
|
|
888
914
|
{
|
|
889
915
|
ref: (i) => {
|
|
890
|
-
|
|
916
|
+
K(i);
|
|
891
917
|
},
|
|
892
918
|
"data-page-number": t,
|
|
893
919
|
"aria-label": b("pdf.pageOf", { current: t, total: v }),
|
|
894
|
-
className:
|
|
895
|
-
style:
|
|
920
|
+
className: tt(),
|
|
921
|
+
style: W,
|
|
896
922
|
children: [
|
|
897
923
|
/* @__PURE__ */ a("canvas", { ref: l, style: s }),
|
|
898
924
|
/* @__PURE__ */ a(
|
|
899
925
|
"div",
|
|
900
926
|
{
|
|
901
|
-
ref:
|
|
927
|
+
ref: M,
|
|
902
928
|
"aria-hidden": "false",
|
|
903
929
|
className: [
|
|
904
930
|
"ds:absolute ds:inset-0",
|
|
@@ -912,7 +938,7 @@ function dt(o) {
|
|
|
912
938
|
].join(" ")
|
|
913
939
|
}
|
|
914
940
|
),
|
|
915
|
-
|
|
941
|
+
k && w ? /* @__PURE__ */ a(
|
|
916
942
|
"div",
|
|
917
943
|
{
|
|
918
944
|
role: "group",
|
|
@@ -920,11 +946,11 @@ function dt(o) {
|
|
|
920
946
|
className: "ds:absolute ds:inset-0 ds:pointer-events-auto",
|
|
921
947
|
"data-pdf-page-overlay": "",
|
|
922
948
|
"data-page-number": t,
|
|
923
|
-
children:
|
|
949
|
+
children: w({
|
|
924
950
|
pageNumber: t,
|
|
925
|
-
pageWidthCss:
|
|
926
|
-
pageHeightCss:
|
|
927
|
-
rotation:
|
|
951
|
+
pageWidthCss: C.width,
|
|
952
|
+
pageHeightCss: C.height,
|
|
953
|
+
rotation: Q
|
|
928
954
|
})
|
|
929
955
|
}
|
|
930
956
|
) : null
|
|
@@ -932,48 +958,48 @@ function dt(o) {
|
|
|
932
958
|
}
|
|
933
959
|
);
|
|
934
960
|
}
|
|
935
|
-
function
|
|
961
|
+
function Ie(o) {
|
|
936
962
|
return o.normalize("NFKD").replace(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase();
|
|
937
963
|
}
|
|
938
|
-
function
|
|
964
|
+
function Ne(o, t, v) {
|
|
939
965
|
if (o.querySelectorAll("[data-match]").forEach((b) => {
|
|
940
966
|
b.removeAttribute("data-match");
|
|
941
967
|
}), !t) {
|
|
942
968
|
v(0);
|
|
943
969
|
return;
|
|
944
970
|
}
|
|
945
|
-
const
|
|
946
|
-
if (!
|
|
971
|
+
const g = Ie(t);
|
|
972
|
+
if (!g) {
|
|
947
973
|
v(0);
|
|
948
974
|
return;
|
|
949
975
|
}
|
|
950
|
-
const
|
|
951
|
-
let
|
|
952
|
-
for (const b of
|
|
953
|
-
const l =
|
|
954
|
-
|
|
976
|
+
const h = Array.from(o.querySelectorAll("span")), w = [], x = [];
|
|
977
|
+
let z = 0;
|
|
978
|
+
for (const b of h) {
|
|
979
|
+
const l = Ie(b.textContent ?? "");
|
|
980
|
+
w.push({ start: z, end: z + l.length }), x.push(l), z += l.length;
|
|
955
981
|
}
|
|
956
|
-
const
|
|
957
|
-
let
|
|
982
|
+
const k = x.join("");
|
|
983
|
+
let K = 0;
|
|
958
984
|
const P = /* @__PURE__ */ new Set();
|
|
959
985
|
let S = 0;
|
|
960
|
-
for (; S <=
|
|
961
|
-
const b =
|
|
986
|
+
for (; S <= k.length - g.length; ) {
|
|
987
|
+
const b = k.indexOf(g, S);
|
|
962
988
|
if (b === -1) break;
|
|
963
|
-
|
|
964
|
-
const l = b +
|
|
965
|
-
for (let
|
|
966
|
-
const { start:
|
|
967
|
-
|
|
989
|
+
K += 1;
|
|
990
|
+
const l = b + g.length;
|
|
991
|
+
for (let M = 0; M < w.length; M++) {
|
|
992
|
+
const { start: C, end: A } = w[M];
|
|
993
|
+
C < l && A > b && P.add(M);
|
|
968
994
|
}
|
|
969
995
|
S = l;
|
|
970
996
|
}
|
|
971
997
|
P.forEach((b) => {
|
|
972
|
-
|
|
973
|
-
}), v(
|
|
998
|
+
h[b].setAttribute("data-match", "true");
|
|
999
|
+
}), v(K);
|
|
974
1000
|
}
|
|
975
1001
|
export {
|
|
976
|
-
|
|
977
|
-
|
|
1002
|
+
nt as P,
|
|
1003
|
+
$e as p
|
|
978
1004
|
};
|
|
979
|
-
//# sourceMappingURL=pdf-viewer-
|
|
1005
|
+
//# sourceMappingURL=pdf-viewer-QfebdLOd.js.map
|