@alfadocs/ui-kit 0.31.0 → 0.31.2
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-CNcodXuO.js → accordion-bSU21uTV.js} +3 -3
- package/dist/_chunks/{agenda-card-DO9_yogb.js → agenda-card-UJA6Arbs.js} +3 -3
- package/dist/_chunks/{agenda-tray-WLbfMip6.js → agenda-tray-1fAxNOMz.js} +4 -4
- package/dist/_chunks/{ai-prompt-input-BXlwNnWe.js → ai-prompt-input-C6sCr1Vi.js} +11 -10
- package/dist/_chunks/{alia-sidebar-C-232sD7.js → alia-sidebar-BEoMl6UL.js} +9 -9
- package/dist/_chunks/ar-CEpIJtcO.js +399 -0
- package/dist/_chunks/{audio-recorder-DL800PE_.js → audio-recorder-C1rhKhSN.js} +114 -114
- package/dist/_chunks/audio-visualiser-l6zPd0AG.js +162 -0
- package/dist/_chunks/{autocomplete-CUh0f7Dj.js → autocomplete-DIgdhCGJ.js} +2 -2
- package/dist/_chunks/{avatar-D_H4emLo.js → avatar-BNQNhoyL.js} +19 -18
- package/dist/_chunks/{badge-CIjQ1Us1.js → badge-CptERaHx.js} +2 -2
- package/dist/_chunks/{booking-Bhk9IYm3.js → booking-BIZ9GSer.js} +15 -15
- package/dist/_chunks/{breadcrumb--YI7lcHA.js → breadcrumb-CLlhx7qo.js} +2 -2
- package/dist/_chunks/{button-group-Bh2g_Ng-.js → button-group-Ciq6J4IW.js} +15 -14
- package/dist/_chunks/{calendar-WWNx448i.js → calendar-YHFknAGv.js} +22 -22
- package/dist/_chunks/{carousel.agent-C2Icc9_T.js → carousel.agent-DrX96W-1.js} +2 -2
- package/dist/_chunks/{chart-BLvFl169.js → chart-DLkVn_ex.js} +2 -2
- package/dist/_chunks/{chat-container-izziXViv.js → chat-container-ogB4OskO.js} +24 -23
- package/dist/_chunks/{chat-input-cyl_y9bh.js → chat-input-CQe7nR_v.js} +132 -118
- package/dist/_chunks/{chat-message-fg221-yx.js → chat-message-D53_fH2w.js} +2 -2
- package/dist/_chunks/{checkbox-Dgp_cfUr.js → checkbox-DRcOdmXv.js} +3 -3
- package/dist/_chunks/{checkbox-group-eVowqKcT.js → checkbox-group-CpUwlHug.js} +3 -3
- package/dist/_chunks/{collapsible-hHiyZp0b.js → collapsible-CERONory.js} +2 -2
- package/dist/_chunks/{color-picker-Bm-gzpsh.js → color-picker-9tL7pz5y.js} +192 -181
- package/dist/_chunks/{combobox-Da9eq00i.js → combobox-BC-DFx8G.js} +31 -30
- package/dist/_chunks/{command-palette-11BieSNq.js → command-palette-BiPAAno-.js} +125 -123
- package/dist/_chunks/{copy-field-BAF4mt9h.js → copy-field-CCq7j6Zc.js} +2 -2
- package/dist/_chunks/{date-picker-D0Ry1dMz.js → date-picker-B94HAV4A.js} +4 -4
- package/dist/_chunks/{date-range-picker-DYgHzMOo.js → date-range-picker-D4dgDlLU.js} +73 -73
- package/dist/_chunks/{date-time-picker-CGmGtcyc.js → date-time-picker-D1GEzf8p.js} +5 -5
- package/dist/_chunks/de-Dfbeau59.js +477 -0
- package/dist/_chunks/{description-list-CWjnaDGn.js → description-list-BEbK2g93.js} +2 -2
- package/dist/_chunks/{dialog-C-lTGVkB.js → dialog-Cee13rHU.js} +3 -3
- package/dist/_chunks/{dropdown-menu-DZxwF23X.js → dropdown-menu-BC5ZdOMo.js} +3 -3
- package/dist/_chunks/{editable-currency-cell-renderer-Od3Q-Y8J.js → editable-currency-cell-renderer-BpicmolK.js} +314 -317
- package/dist/_chunks/el-Dro3J7CP.js +373 -0
- package/dist/_chunks/{email-input-DvJ_kPKL.js → email-input-lQivsFrw.js} +3 -3
- package/dist/_chunks/es-Dvg8u70B.js +373 -0
- package/dist/_chunks/{file-upload-DxAQprcU.js → file-upload-CdozCPct.js} +226 -233
- package/dist/_chunks/fr-VOGjBSPP.js +338 -0
- package/dist/_chunks/{freemium-paywall-B9c8Ylww.js → freemium-paywall-D1N02Oam.js} +4 -4
- package/dist/_chunks/{header-DDj7uGD-.js → header-CTZWX-tm.js} +2 -2
- package/dist/_chunks/hi-BSDxWU_y.js +433 -0
- package/dist/_chunks/{icon-button-DPEqBKBQ.js → icon-button-CKEOrN37.js} +2 -2
- package/dist/_chunks/{icon-button-group-DeV3FpNY.js → icon-button-group-C48khLE0.js} +23 -22
- package/dist/_chunks/{isSameDay-DHG8Xade.js → isSameDay-DUEiAT0G.js} +2 -2
- package/dist/_chunks/isSameWeek-Dfzu29cW.js +14 -0
- package/dist/_chunks/it-CuonvcI_.js +401 -0
- package/dist/_chunks/ja-DO57gIOT.js +366 -0
- package/dist/_chunks/{key-value-pair-BvDY3zuc.js → key-value-pair-C8DaR3Xs.js} +2 -2
- package/dist/_chunks/{list-BdvDctBz.js → list-BOwqwy03.js} +44 -43
- package/dist/_chunks/{locale-picker-CY89MChR.js → locale-picker-D99UyZVJ.js} +4 -4
- package/dist/_chunks/{map-view-DyB8tr6c.js → map-view-WEWqXzof.js} +569 -557
- package/dist/_chunks/{message-card-D6iyPacd.js → message-card-BbRhZkDI.js} +3 -3
- package/dist/_chunks/{message-tray-Bh-0ra-Y.js → message-tray-B762TKuv.js} +11 -10
- package/dist/_chunks/{multi-select-dSe6Xtc4.js → multi-select-DOLO3K_z.js} +26 -25
- package/dist/_chunks/{navigation-menu-CyS1fBJ7.js → navigation-menu-C6lBYVv9.js} +3 -3
- package/dist/_chunks/nl-DjPaaWaW.js +326 -0
- package/dist/_chunks/{notification-card-vaMaA7Wa.js → notification-card-DMdO4g54.js} +2 -2
- package/dist/_chunks/{notification-tray-Cnum6LwM.js → notification-tray-Dl3FTleW.js} +17 -16
- package/dist/_chunks/{number-input-BZXu6bPY.js → number-input-Dj5L3pXK.js} +2 -2
- package/dist/_chunks/{otp-input-BDF_iNpa.js → otp-input-BEg_sn8A.js} +2 -2
- package/dist/_chunks/{pagination-BWaXF7W0.js → pagination-DQOgnxxw.js} +2 -2
- package/dist/_chunks/{parseISO-Dk4xa7q6.js → parseISO-DEpUNwxZ.js} +2 -2
- package/dist/_chunks/{patient-search-ZpHN-pgJ.js → patient-search-hFiYbqcl.js} +8 -8
- package/dist/_chunks/{patient-shell-CYaNkbA1.js → patient-shell-CDvMw_Nk.js} +6 -6
- package/dist/_chunks/{payment-form-Ds3rxvad.js → payment-form-D5rgnZu7.js} +2 -2
- package/dist/_chunks/{pdf-viewer-CIuaocnq.js → pdf-viewer-DvtEHcEP.js} +347 -320
- package/dist/_chunks/{phone-input-DKSHX7NQ.js → phone-input-DfZbPPvh.js} +217 -201
- package/dist/_chunks/pl-Cl4lOx2N.js +514 -0
- package/dist/_chunks/{popover-BfHSBEKq.js → popover-Devce-tT.js} +3 -3
- package/dist/_chunks/practice-results-JQunxBIg.js +1618 -0
- package/dist/_chunks/{privacy-lock-C6Ra5m3p.js → privacy-lock-DD-wHxBg.js} +3 -3
- package/dist/_chunks/{progress-B-PSO5OS.js → progress-kzIRcdaq.js} +11 -10
- package/dist/_chunks/pt-D7qO5CzD.js +370 -0
- package/dist/_chunks/{public-footer.agent-Bc99tE5Z.js → public-footer.agent-Bh0rnx4i.js} +21 -14
- package/dist/_chunks/{public-header.agent-B-B0WDAi.js → public-header.agent-B2dDg2_d.js} +3 -3
- package/dist/_chunks/{radio-i4ogu3cq.js → radio-TWf9Q-mp.js} +2 -2
- package/dist/_chunks/{radio-group-CTlGc36r.js → radio-group-BcF92GEF.js} +4 -4
- package/dist/_chunks/{react-day-picker-D3yzgvDB.js → react-day-picker-DsjfS7uI.js} +662 -615
- package/dist/_chunks/recaptcha-widget-CFYyLSEX.js +221 -0
- package/dist/_chunks/registry-nPAVE19X.js +21 -0
- package/dist/_chunks/{resizable-COV-cnth.js → resizable-3vzqDlg6.js} +29 -28
- package/dist/_chunks/{reviews-panel-bKEUKSic.js → reviews-panel-yanuBZs-.js} +4 -4
- package/dist/_chunks/{rich-text-editor-J-wAz9eN.js → rich-text-editor-CHmr9Bz8.js} +2 -2
- package/dist/_chunks/ro-CP2-VJ_O.js +361 -0
- package/dist/_chunks/ru-RPn9_Lpq.js +561 -0
- package/dist/_chunks/{scroll-area-DEDU-lp-.js → scroll-area-BWqCkEGz.js} +2 -2
- package/dist/_chunks/{search-bar-BRMW1-WG.js → search-bar-CP6wUJFY.js} +3 -3
- package/dist/_chunks/{search-input-CIA6pPfn.js → search-input-C1C3jQpD.js} +24 -23
- package/dist/_chunks/{select-C92AT_OZ.js → select-hsCaJSX3.js} +3 -3
- package/dist/_chunks/{sheet-D8Yl0nKR.js → sheet-BV-yuLE2.js} +3 -3
- package/dist/_chunks/{sidebar-DkyC6GvS.js → sidebar-BbR8f6oe.js} +3 -3
- package/dist/_chunks/{signature-capture-DjMlFOzS.js → signature-capture-C-fF71xI.js} +213 -205
- package/dist/_chunks/{slider-CfEzeseL.js → slider-BHWzXdjt.js} +3 -3
- package/dist/_chunks/{slot-grid-Q94gVmhn.js → slot-grid-Dz13dH82.js} +4 -4
- package/dist/_chunks/{sparkline-B5Ms55PZ.js → sparkline-DEROcSl0.js} +2 -2
- package/dist/_chunks/sq-AQvefouo.js +355 -0
- package/dist/_chunks/{stepper-progress-jFY8BSf7.js → stepper-progress-DDjq5nei.js} +16 -15
- package/dist/_chunks/streaming-text-GH07yIYh.js +127 -0
- package/dist/_chunks/sv-zkx9eBtD.js +376 -0
- package/dist/_chunks/{switch-D916VW86.js → switch-BJ6HD3Mn.js} +2 -2
- package/dist/_chunks/{tabs-aEQfQV3x.js → tabs-BpPYVme_.js} +4 -4
- package/dist/_chunks/{tag-bBPAvXyh.js → tag-CyoaEmf_.js} +2 -2
- package/dist/_chunks/{task-tray-6NlryfMJ.js → task-tray-DRK0b0Qb.js} +3 -3
- package/dist/_chunks/{text-area-D5GAe8pV.js → text-area-BIx0tZ05.js} +27 -26
- package/dist/_chunks/{text-input-CakysYnD.js → text-input-BaClJL8Y.js} +2 -2
- package/dist/_chunks/{theme-toggle-JoeMs_ws.js → theme-toggle-DpC28kt5.js} +6 -6
- package/dist/_chunks/{time-picker-DeVZkIY2.js → time-picker-B5umYwfv.js} +2 -2
- package/dist/_chunks/{timeline-CR7HjZCK.js → timeline-D0Wo7v_o.js} +3 -3
- package/dist/_chunks/{toast.agent-DVpKt38p.js → toast.agent-WHHfw5VX.js} +322 -320
- package/dist/_chunks/{tooltip-ClJd0ciy.js → tooltip-DvmfrNvB.js} +29 -20
- package/dist/_chunks/{tooth-scheme-3mITSXiZ.js → tooth-scheme-CxlsLjfN.js} +2 -2
- package/dist/_chunks/tr-Dmr412Ac.js +378 -0
- package/dist/_chunks/{transcript-panel-QUQ9XJmf.js → transcript-panel-DyhTpAP7.js} +21 -20
- package/dist/_chunks/{use-direction-D6rvvG9G.js → use-direction-Dp8h70PP.js} +7 -6
- package/dist/_chunks/use-isomorphic-layout-effect-BGfaCOP1.js +6 -0
- package/dist/_chunks/use-media-query-CcAx5SMM.js +16 -0
- package/dist/_chunks/{use-password-requirements-E0sSfx5X.js → use-password-requirements-DsgduV1x.js} +3 -3
- package/dist/_chunks/use-scroll-to-first-error-4Za-u5Nw.js +43 -0
- package/dist/_chunks/{workflow-map-DlWBJJBt.js → workflow-map-BSvQS3be.js} +6 -6
- package/dist/_chunks/zh-CN-DxVt64Zk.js +388 -0
- package/dist/agent/registry.d.ts +1 -6
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/date-locale.d.ts +7 -2
- package/dist/components/_shared/index.d.ts +1 -1
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/audio-visualiser/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- 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/chat-message/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/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/copy-field/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/description-list/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/email-input/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +6 -6
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- 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/map-view/map-view.d.ts +10 -0
- 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/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/number-input/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-search/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/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/practice-results/practice-results.d.ts +23 -1
- package/dist/components/privacy-lock/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/radio/index.js +1 -1
- package/dist/components/radio-group/index.js +2 -2
- 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/scroll-area/index.js +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/stepper-progress/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/switch/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tag/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/tooltip/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.js +69 -66
- package/dist/i18n/locales/ar.d.ts +92 -0
- package/dist/i18n/locales/ar.js +82 -0
- package/dist/i18n/locales/de.d.ts +92 -0
- package/dist/i18n/locales/de.js +81 -0
- package/dist/i18n/locales/el.d.ts +92 -0
- package/dist/i18n/locales/el.js +82 -0
- package/dist/i18n/locales/en.d.ts +27 -0
- package/dist/i18n/locales/en.js +27 -0
- package/dist/i18n/locales/es.d.ts +92 -0
- package/dist/i18n/locales/es.js +81 -0
- package/dist/i18n/locales/fr.d.ts +92 -0
- package/dist/i18n/locales/fr.js +81 -0
- package/dist/i18n/locales/hi.d.ts +92 -0
- package/dist/i18n/locales/hi.js +82 -0
- package/dist/i18n/locales/it.d.ts +92 -0
- package/dist/i18n/locales/it.js +81 -0
- package/dist/i18n/locales/ja.d.ts +92 -0
- package/dist/i18n/locales/ja.js +82 -0
- package/dist/i18n/locales/nl.d.ts +92 -0
- package/dist/i18n/locales/nl.js +81 -0
- package/dist/i18n/locales/pl.d.ts +92 -0
- package/dist/i18n/locales/pl.js +82 -0
- package/dist/i18n/locales/pt.d.ts +92 -0
- package/dist/i18n/locales/pt.js +83 -0
- package/dist/i18n/locales/ro.d.ts +92 -0
- package/dist/i18n/locales/ro.js +82 -0
- package/dist/i18n/locales/ru.d.ts +92 -0
- package/dist/i18n/locales/ru.js +82 -0
- package/dist/i18n/locales/sq.d.ts +92 -0
- package/dist/i18n/locales/sq.js +82 -0
- package/dist/i18n/locales/sv.d.ts +92 -0
- package/dist/i18n/locales/sv.js +82 -0
- package/dist/i18n/locales/tr.d.ts +92 -0
- package/dist/i18n/locales/tr.js +82 -0
- package/dist/i18n/locales/zh.d.ts +92 -0
- package/dist/i18n/locales/zh.js +82 -0
- package/dist/index.js +541 -540
- package/dist/locales/ar.json +92 -0
- package/dist/locales/de.json +92 -0
- package/dist/locales/el.json +92 -0
- package/dist/locales/en.json +27 -0
- package/dist/locales/es.json +92 -0
- package/dist/locales/fr.json +92 -0
- package/dist/locales/hi.json +92 -0
- package/dist/locales/it.json +92 -0
- package/dist/locales/ja.json +92 -0
- package/dist/locales/nl.json +92 -0
- package/dist/locales/pl.json +92 -0
- package/dist/locales/pt.json +92 -0
- package/dist/locales/ro.json +92 -0
- package/dist/locales/ru.json +92 -0
- package/dist/locales/sq.json +92 -0
- package/dist/locales/sv.json +92 -0
- package/dist/locales/tr.json +92 -0
- package/dist/locales/zh.json +92 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -2
- package/dist/_chunks/audio-visualiser-I-T4Z7EU.js +0 -145
- package/dist/_chunks/practice-results-CEKjwsgS.js +0 -1441
- package/dist/_chunks/recaptcha-widget-BtBNb6tB.js +0 -192
- package/dist/_chunks/registry-C9nwlNyL.js +0 -21
- package/dist/_chunks/streaming-text-BgjCTVOw.js +0 -105
- package/dist/_chunks/use-scroll-to-first-error-BrK7dKB_.js +0 -55
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as n, jsxs as B } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Ee, useId as _e, useMemo as xe, useState as b, useEffect as C, useRef as V, useCallback as K, useImperativeHandle as Le } from "react";
|
|
3
3
|
import * as fe from "pdfjs-dist";
|
|
4
4
|
import { c as J } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { useTranslation as pe } from "react-i18next";
|
|
6
6
|
import * as ee from "@radix-ui/react-popover";
|
|
7
|
-
import
|
|
8
|
-
import { S as
|
|
7
|
+
import Ce from "pdfjs-dist/build/pdf.worker.min.mjs?url";
|
|
8
|
+
import { S as Ze } from "./spinner-CCByyvcb.js";
|
|
9
9
|
import { A as we } from "./alert-ywPR59NE.js";
|
|
10
|
-
import { u as
|
|
10
|
+
import { u as Ke } from "./registry-nPAVE19X.js";
|
|
11
11
|
import { X as Be } from "./x-CCcI3eJp.js";
|
|
12
|
-
import { C as
|
|
13
|
-
import { C as
|
|
14
|
-
import { c as
|
|
12
|
+
import { C as He } from "./chevron-left-CX1jqD2M.js";
|
|
13
|
+
import { C as Qe } from "./chevron-right-BrpYejk0.js";
|
|
14
|
+
import { c as De } from "./createLucideIcon-CrFbzy84.js";
|
|
15
15
|
import { S as We } from "./search-BonnQsHv.js";
|
|
16
|
-
import { P as
|
|
16
|
+
import { P as qe } from "./printer-CeVEWfQq.js";
|
|
17
17
|
/**
|
|
18
18
|
* @license lucide-react v1.8.0 - ISC
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the ISC license.
|
|
21
21
|
* See the LICENSE file in the root directory of this source tree.
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const Ue = [
|
|
24
24
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
25
25
|
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
|
|
26
26
|
["line", { x1: "11", x2: "11", y1: "8", y2: "14", key: "1vmskp" }],
|
|
27
27
|
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
|
|
28
|
-
],
|
|
28
|
+
], Je = De("zoom-in", Ue);
|
|
29
29
|
/**
|
|
30
30
|
* @license lucide-react v1.8.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
34
|
*/
|
|
35
|
-
const
|
|
35
|
+
const $e = [
|
|
36
36
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
37
37
|
["line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65", key: "13gj7c" }],
|
|
38
38
|
["line", { x1: "8", x2: "14", y1: "11", y2: "11", key: "durymu" }]
|
|
39
|
-
],
|
|
39
|
+
], Xe = De("zoom-out", $e), Ge = {
|
|
40
40
|
id: "pdf-viewer",
|
|
41
41
|
capabilities: ["paginate", "view_change", "filter"],
|
|
42
42
|
state: {},
|
|
@@ -45,31 +45,31 @@ const Je = [
|
|
|
45
45
|
safety: "read",
|
|
46
46
|
argsType: "{ page: number }",
|
|
47
47
|
description: "Navigate to a specific 1-indexed page.",
|
|
48
|
-
invoke: (
|
|
49
|
-
|
|
48
|
+
invoke: (o, t) => {
|
|
49
|
+
o.goToPage(t.page);
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
set_zoom: {
|
|
53
53
|
safety: "read",
|
|
54
54
|
argsType: "{ zoom: PDFZoomPreset }",
|
|
55
55
|
description: "Apply a zoom preset.",
|
|
56
|
-
invoke: (
|
|
57
|
-
|
|
56
|
+
invoke: (o, t) => {
|
|
57
|
+
o.setZoom(t.zoom);
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
search: {
|
|
61
61
|
safety: "read",
|
|
62
62
|
argsType: "{ query: string }",
|
|
63
63
|
description: "Search the document for the given query and highlight matches.",
|
|
64
|
-
invoke: (
|
|
65
|
-
|
|
64
|
+
invoke: (o, t) => {
|
|
65
|
+
o.search(t.query);
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
print: {
|
|
69
69
|
safety: "read",
|
|
70
70
|
description: "Open the browser print dialog for the document.",
|
|
71
|
-
invoke: (
|
|
72
|
-
|
|
71
|
+
invoke: (o) => {
|
|
72
|
+
o.print();
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
},
|
|
@@ -82,7 +82,7 @@ const Je = [
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
|
-
fe.GlobalWorkerOptions.workerSrc =
|
|
85
|
+
fe.GlobalWorkerOptions.workerSrc = Ce;
|
|
86
86
|
const ke = J(
|
|
87
87
|
[
|
|
88
88
|
"ds:pdf-viewer-alfadocs ds:flex ds:flex-col",
|
|
@@ -95,7 +95,7 @@ const ke = J(
|
|
|
95
95
|
"ds:focus-visible:outline-[var(--ring)]",
|
|
96
96
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
97
97
|
].join(" ")
|
|
98
|
-
),
|
|
98
|
+
), Ye = J(
|
|
99
99
|
[
|
|
100
100
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
101
101
|
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
@@ -132,7 +132,7 @@ const ke = J(
|
|
|
132
132
|
"ds:focus-visible:outline-[var(--ring)]",
|
|
133
133
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
134
134
|
].join(" ")
|
|
135
|
-
),
|
|
135
|
+
), et = J(
|
|
136
136
|
[
|
|
137
137
|
"ds:min-block-size-[var(--min-target-size)]",
|
|
138
138
|
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
@@ -143,7 +143,7 @@ const ke = J(
|
|
|
143
143
|
"ds:focus-visible:outline-[var(--ring)]",
|
|
144
144
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
145
145
|
].join(" ")
|
|
146
|
-
),
|
|
146
|
+
), tt = J(
|
|
147
147
|
[
|
|
148
148
|
"ds:relative ds:flex ds:flex-col ds:items-center",
|
|
149
149
|
"ds:gap-[var(--spacing-md)]",
|
|
@@ -153,14 +153,14 @@ const ke = J(
|
|
|
153
153
|
"ds:min-block-size-[30rem]",
|
|
154
154
|
"ds:max-block-size-[80vh]"
|
|
155
155
|
].join(" ")
|
|
156
|
-
),
|
|
156
|
+
), rt = J(
|
|
157
157
|
[
|
|
158
158
|
"ds:relative ds:flex ds:items-center ds:justify-center",
|
|
159
159
|
"ds:bg-[var(--background)]",
|
|
160
160
|
"ds:shadow-[var(--shadow-md)]",
|
|
161
161
|
"ds:rounded-[var(--radius-sm)]"
|
|
162
162
|
].join(" ")
|
|
163
|
-
),
|
|
163
|
+
), nt = [
|
|
164
164
|
"fit-width",
|
|
165
165
|
"fit-page",
|
|
166
166
|
"actual-size",
|
|
@@ -171,50 +171,50 @@ const ke = J(
|
|
|
171
171
|
1.5,
|
|
172
172
|
2
|
|
173
173
|
];
|
|
174
|
-
function X(
|
|
175
|
-
return typeof
|
|
174
|
+
function X(o) {
|
|
175
|
+
return typeof o == "number";
|
|
176
176
|
}
|
|
177
|
-
function Se(
|
|
178
|
-
if (X(
|
|
179
|
-
if (
|
|
180
|
-
const
|
|
181
|
-
return
|
|
177
|
+
function Se(o, t, u) {
|
|
178
|
+
if (X(o)) return o;
|
|
179
|
+
if (o === "actual-size" || !u) return 1;
|
|
180
|
+
const y = window.getComputedStyle(u), h = parseFloat(y.paddingInlineStart || "0") + parseFloat(y.paddingInlineEnd || "0"), g = parseFloat(y.paddingBlockStart || "0") + parseFloat(y.paddingBlockEnd || "0"), x = Math.max(u.clientWidth - h, 1), w = Math.max(u.clientHeight - g, 1), k = t.width, z = t.height;
|
|
181
|
+
return o === "fit-width" ? x / k : Math.min(x / k, w / z);
|
|
182
182
|
}
|
|
183
|
-
const
|
|
183
|
+
const at = Ee(
|
|
184
184
|
({
|
|
185
|
-
id:
|
|
185
|
+
id: o,
|
|
186
186
|
src: t,
|
|
187
187
|
initialPage: u = 1,
|
|
188
|
-
initialZoom:
|
|
189
|
-
pageRotation:
|
|
188
|
+
initialZoom: y = "fit-width",
|
|
189
|
+
pageRotation: h,
|
|
190
190
|
renderPageOverlay: g,
|
|
191
|
-
onPageChange:
|
|
192
|
-
onLoadComplete:
|
|
193
|
-
onError:
|
|
194
|
-
toolbar:
|
|
195
|
-
ariaLabel:
|
|
196
|
-
className:
|
|
197
|
-
},
|
|
198
|
-
const { t:
|
|
199
|
-
() => `pdf-${
|
|
200
|
-
[
|
|
201
|
-
), [
|
|
202
|
-
|
|
191
|
+
onPageChange: x,
|
|
192
|
+
onLoadComplete: w,
|
|
193
|
+
onError: k,
|
|
194
|
+
toolbar: z = !0,
|
|
195
|
+
ariaLabel: O,
|
|
196
|
+
className: D
|
|
197
|
+
}, I) => {
|
|
198
|
+
const { t: f } = pe(), P = _e(), N = xe(
|
|
199
|
+
() => `pdf-${P.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
200
|
+
[P]
|
|
201
|
+
), [v, E] = b(!1), [p, H] = b(!1);
|
|
202
|
+
C(() => {
|
|
203
203
|
if (typeof document > "u") return;
|
|
204
|
-
|
|
204
|
+
E(document.documentElement.dir === "rtl");
|
|
205
205
|
const e = window.matchMedia("(prefers-reduced-motion: reduce)"), r = () => H(e.matches);
|
|
206
206
|
return r(), e.addEventListener("change", r), () => e.removeEventListener("change", r);
|
|
207
207
|
}, []);
|
|
208
|
-
const [s,
|
|
209
|
-
|
|
210
|
-
re.current =
|
|
211
|
-
}, [
|
|
212
|
-
const de =
|
|
213
|
-
|
|
208
|
+
const [s, Q] = b(null), [W, d] = b(null), [c, R] = b(u), [S, m] = b(y), [a, M] = b({ start: Math.max(1, u - 1), end: u + 1 }), [_, te] = b(""), [G, L] = b(!1), [T, me] = b(""), [Ie, Ae] = b({ current: 0, total: 0 }), re = V(x), ne = V(w), ae = V(k);
|
|
209
|
+
C(() => {
|
|
210
|
+
re.current = x, ne.current = w, ae.current = k;
|
|
211
|
+
}, [x, w, k]);
|
|
212
|
+
const de = V(null);
|
|
213
|
+
C(() => {
|
|
214
214
|
de.current = s;
|
|
215
|
-
}, [s]),
|
|
215
|
+
}, [s]), C(() => {
|
|
216
216
|
let e = !1;
|
|
217
|
-
|
|
217
|
+
Q(null), d(null);
|
|
218
218
|
const r = {
|
|
219
219
|
disableJavaScript: !0,
|
|
220
220
|
isEvalSupported: !1
|
|
@@ -222,261 +222,261 @@ const nt = Fe(
|
|
|
222
222
|
typeof t == "string" ? { url: t, ...r } : t instanceof Uint8Array ? { data: t, ...r } : { data: new Uint8Array(t), ...r }
|
|
223
223
|
);
|
|
224
224
|
return l.promise.then(
|
|
225
|
-
async (
|
|
225
|
+
async (i) => {
|
|
226
226
|
var q;
|
|
227
227
|
if (e) return;
|
|
228
|
-
let
|
|
228
|
+
let A;
|
|
229
229
|
try {
|
|
230
|
-
const U = await
|
|
231
|
-
|
|
230
|
+
const U = await i.getMetadata(), F = U == null ? void 0 : U.info;
|
|
231
|
+
A = F == null ? void 0 : F.Title;
|
|
232
232
|
} catch {
|
|
233
|
-
|
|
233
|
+
A = void 0;
|
|
234
234
|
}
|
|
235
235
|
if (e) {
|
|
236
236
|
try {
|
|
237
|
-
await
|
|
237
|
+
await i.destroy();
|
|
238
238
|
} catch {
|
|
239
239
|
}
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
|
-
const
|
|
243
|
-
|
|
242
|
+
const Z = { doc: i, numPages: i.numPages, title: A };
|
|
243
|
+
Q(Z), (q = ne.current) == null || q.call(ne, { numPages: i.numPages, title: A });
|
|
244
244
|
},
|
|
245
|
-
(
|
|
246
|
-
var
|
|
245
|
+
(i) => {
|
|
246
|
+
var Z;
|
|
247
247
|
if (e) return;
|
|
248
|
-
const
|
|
249
|
-
d(
|
|
248
|
+
const A = i instanceof Error ? i : new Error(String(i));
|
|
249
|
+
d(A), (Z = ae.current) == null || Z.call(ae, A);
|
|
250
250
|
}
|
|
251
251
|
), () => {
|
|
252
252
|
e = !0, l.destroy();
|
|
253
|
-
const
|
|
254
|
-
if (
|
|
253
|
+
const i = de.current;
|
|
254
|
+
if (i) {
|
|
255
255
|
try {
|
|
256
|
-
|
|
256
|
+
i.doc.destroy();
|
|
257
257
|
} catch {
|
|
258
258
|
}
|
|
259
259
|
de.current = null;
|
|
260
260
|
}
|
|
261
261
|
};
|
|
262
|
-
}, [t]),
|
|
262
|
+
}, [t]), C(() => {
|
|
263
263
|
var e;
|
|
264
264
|
s && (te(
|
|
265
|
-
|
|
265
|
+
f("pdf.pageOf", { current: c, total: s.numPages })
|
|
266
266
|
), (e = re.current) == null || e.call(re, c));
|
|
267
|
-
}, [c, s,
|
|
268
|
-
const se =
|
|
267
|
+
}, [c, s, f]);
|
|
268
|
+
const se = V(null), ce = V([]), j = K(
|
|
269
269
|
(e) => {
|
|
270
270
|
if (!s) return;
|
|
271
271
|
const r = Math.max(1, Math.min(e, s.numPages));
|
|
272
|
-
|
|
272
|
+
R(r);
|
|
273
273
|
const l = ce.current[r - 1];
|
|
274
274
|
l && l.scrollIntoView({
|
|
275
275
|
behavior: "auto",
|
|
276
276
|
block: "start"
|
|
277
277
|
});
|
|
278
278
|
},
|
|
279
|
-
[s,
|
|
280
|
-
),
|
|
281
|
-
|
|
282
|
-
}, []), Y =
|
|
279
|
+
[s, p]
|
|
280
|
+
), he = K((e) => {
|
|
281
|
+
m(e);
|
|
282
|
+
}, []), Y = K(() => {
|
|
283
283
|
typeof window < "u" && window.print();
|
|
284
|
-
}, []),
|
|
285
|
-
me(e),
|
|
284
|
+
}, []), ge = K((e) => {
|
|
285
|
+
me(e), L(e.length > 0);
|
|
286
286
|
}, []), le = xe(
|
|
287
287
|
() => ({
|
|
288
|
-
goToPage:
|
|
289
|
-
setZoom:
|
|
290
|
-
search:
|
|
288
|
+
goToPage: j,
|
|
289
|
+
setZoom: he,
|
|
290
|
+
search: ge,
|
|
291
291
|
print: Y
|
|
292
292
|
}),
|
|
293
|
-
[
|
|
293
|
+
[j, he, ge, Y]
|
|
294
294
|
);
|
|
295
|
-
|
|
296
|
-
const
|
|
295
|
+
Le(I, () => le, [le]), Ke(Ge, le, o);
|
|
296
|
+
const Oe = K(
|
|
297
297
|
(e) => {
|
|
298
298
|
if (!s) return;
|
|
299
299
|
const r = e.metaKey || e.ctrlKey;
|
|
300
300
|
if (e.key === "PageDown") {
|
|
301
|
-
e.preventDefault(),
|
|
301
|
+
e.preventDefault(), j(c + 1);
|
|
302
302
|
return;
|
|
303
303
|
}
|
|
304
304
|
if (e.key === "PageUp") {
|
|
305
|
-
e.preventDefault(),
|
|
305
|
+
e.preventDefault(), j(c - 1);
|
|
306
306
|
return;
|
|
307
307
|
}
|
|
308
308
|
if (e.key === "Home") {
|
|
309
|
-
e.preventDefault(),
|
|
309
|
+
e.preventDefault(), j(1);
|
|
310
310
|
return;
|
|
311
311
|
}
|
|
312
312
|
if (e.key === "End") {
|
|
313
|
-
e.preventDefault(),
|
|
313
|
+
e.preventDefault(), j(s.numPages);
|
|
314
314
|
return;
|
|
315
315
|
}
|
|
316
316
|
if (r && e.key.toLowerCase() === "f") {
|
|
317
|
-
e.preventDefault(),
|
|
317
|
+
e.preventDefault(), L(!0);
|
|
318
318
|
return;
|
|
319
319
|
}
|
|
320
320
|
if (r && (e.key === "+" || e.key === "=")) {
|
|
321
|
-
e.preventDefault(),
|
|
321
|
+
e.preventDefault(), m((l) => X(l) ? Math.min(l * 1.25, 4) : 1.25);
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
324
|
if (r && e.key === "-") {
|
|
325
|
-
e.preventDefault(),
|
|
325
|
+
e.preventDefault(), m(
|
|
326
326
|
(l) => X(l) ? Math.max(l / 1.25, 0.25) : 0.75
|
|
327
327
|
);
|
|
328
328
|
return;
|
|
329
329
|
}
|
|
330
330
|
if (r && e.key === "0") {
|
|
331
|
-
e.preventDefault(),
|
|
331
|
+
e.preventDefault(), m("fit-width");
|
|
332
332
|
return;
|
|
333
333
|
}
|
|
334
334
|
r && e.key.toLowerCase() === "p" && (e.preventDefault(), Y());
|
|
335
335
|
},
|
|
336
|
-
[c,
|
|
337
|
-
), ue =
|
|
338
|
-
|
|
336
|
+
[c, j, Y, s]
|
|
337
|
+
), ue = V(c);
|
|
338
|
+
C(() => {
|
|
339
339
|
ue.current = c;
|
|
340
|
-
}, [c]),
|
|
340
|
+
}, [c]), C(() => {
|
|
341
341
|
if (!s) return;
|
|
342
342
|
const e = se.current;
|
|
343
343
|
if (!e) return;
|
|
344
344
|
const r = /* @__PURE__ */ new Map(), l = new IntersectionObserver(
|
|
345
|
-
(
|
|
346
|
-
for (const
|
|
347
|
-
const $ =
|
|
345
|
+
(i) => {
|
|
346
|
+
for (const F of i) {
|
|
347
|
+
const $ = F.target.dataset.pageNumber;
|
|
348
348
|
if (!$) continue;
|
|
349
349
|
const Ve = Number($);
|
|
350
|
-
r.set(Ve,
|
|
350
|
+
r.set(Ve, F.intersectionRatio);
|
|
351
351
|
}
|
|
352
|
-
let
|
|
353
|
-
for (const [
|
|
354
|
-
$ >
|
|
355
|
-
|
|
352
|
+
let A = ue.current, Z = 0, q = 1 / 0, U = -1 / 0;
|
|
353
|
+
for (const [F, $] of r.entries())
|
|
354
|
+
$ > Z && (A = F, Z = $), $ > 0 && (q = Math.min(q, F), U = Math.max(U, F));
|
|
355
|
+
Z > 0 && A !== ue.current && R(A), q !== 1 / 0 && M({
|
|
356
356
|
start: Math.max(1, q - 1),
|
|
357
357
|
end: Math.min(s.numPages, U + 1)
|
|
358
358
|
});
|
|
359
359
|
},
|
|
360
360
|
{ root: e, threshold: [0, 0.25, 0.5, 0.75, 1] }
|
|
361
361
|
);
|
|
362
|
-
return ce.current.forEach((
|
|
363
|
-
|
|
362
|
+
return ce.current.forEach((i) => {
|
|
363
|
+
i && l.observe(i);
|
|
364
364
|
}), () => l.disconnect();
|
|
365
365
|
}, [s]);
|
|
366
|
-
const [
|
|
367
|
-
|
|
366
|
+
const [Re, Te] = b(0);
|
|
367
|
+
C(() => {
|
|
368
368
|
const e = se.current;
|
|
369
369
|
if (!e || typeof ResizeObserver > "u") return;
|
|
370
370
|
const r = new ResizeObserver(() => {
|
|
371
|
-
(
|
|
371
|
+
(S === "fit-width" || S === "fit-page") && Te((l) => l + 1);
|
|
372
372
|
});
|
|
373
373
|
return r.observe(e), () => r.disconnect();
|
|
374
|
-
}, [
|
|
375
|
-
const ve =
|
|
374
|
+
}, [S]);
|
|
375
|
+
const ve = V([]), [oe, be] = b(0), je = K(
|
|
376
376
|
(e) => (r) => {
|
|
377
377
|
ve.current[e] = r;
|
|
378
378
|
},
|
|
379
379
|
[]
|
|
380
|
-
), ye =
|
|
380
|
+
), ye = K((e) => {
|
|
381
381
|
const r = ve.current[e];
|
|
382
382
|
r && r.focus();
|
|
383
|
-
}, []), ie = 8,
|
|
383
|
+
}, []), ie = 8, Fe = K(
|
|
384
384
|
(e) => {
|
|
385
|
-
const r =
|
|
386
|
-
let
|
|
387
|
-
e.key === r ?
|
|
385
|
+
const r = v ? "ArrowLeft" : "ArrowRight", l = v ? "ArrowRight" : "ArrowLeft";
|
|
386
|
+
let i = null;
|
|
387
|
+
e.key === r ? i = (oe + 1) % ie : e.key === l ? i = (oe - 1 + ie) % ie : e.key === "Home" ? i = 0 : e.key === "End" && (i = ie - 1), i !== null && (e.preventDefault(), be(i), ye(i));
|
|
388
388
|
},
|
|
389
|
-
[ye,
|
|
389
|
+
[ye, v, oe]
|
|
390
390
|
);
|
|
391
|
-
return
|
|
391
|
+
return W ? /* @__PURE__ */ n(
|
|
392
392
|
"div",
|
|
393
393
|
{
|
|
394
|
-
className: [ke(),
|
|
395
|
-
"aria-label":
|
|
396
|
-
children: /* @__PURE__ */ n("div", { className: "ds:p-[var(--spacing-lg)]", children: /* @__PURE__ */ n(we, { variant: "error", live: "polite", children: /* @__PURE__ */
|
|
397
|
-
|
|
394
|
+
className: [ke(), D].filter(Boolean).join(" "),
|
|
395
|
+
"aria-label": O ?? f("pdf.error"),
|
|
396
|
+
children: /* @__PURE__ */ n("div", { className: "ds:p-[var(--spacing-lg)]", children: /* @__PURE__ */ n(we, { variant: "error", live: "polite", children: /* @__PURE__ */ B(we.Description, { children: [
|
|
397
|
+
f("pdf.error"),
|
|
398
398
|
": ",
|
|
399
|
-
|
|
399
|
+
W.message
|
|
400
400
|
] }) }) })
|
|
401
401
|
}
|
|
402
402
|
) : (
|
|
403
403
|
// 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
|
|
404
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ B(
|
|
405
405
|
"div",
|
|
406
406
|
{
|
|
407
|
-
id:
|
|
407
|
+
id: N,
|
|
408
408
|
role: "region",
|
|
409
|
-
"aria-label":
|
|
410
|
-
className: [ke(),
|
|
411
|
-
dir:
|
|
412
|
-
onKeyDown:
|
|
409
|
+
"aria-label": O ?? f("pdf.toolbarLabel"),
|
|
410
|
+
className: [ke(), D].filter(Boolean).join(" "),
|
|
411
|
+
dir: v ? "rtl" : void 0,
|
|
412
|
+
onKeyDown: Oe,
|
|
413
413
|
tabIndex: -1,
|
|
414
414
|
"data-component": "pdf-viewer",
|
|
415
|
-
"data-component-id":
|
|
416
|
-
"data-pdfjs-worker-src":
|
|
415
|
+
"data-component-id": o,
|
|
416
|
+
"data-pdfjs-worker-src": Ce,
|
|
417
417
|
children: [
|
|
418
|
-
|
|
419
|
-
|
|
418
|
+
z ? /* @__PURE__ */ n(
|
|
419
|
+
st,
|
|
420
420
|
{
|
|
421
421
|
currentPage: c,
|
|
422
422
|
numPages: (s == null ? void 0 : s.numPages) ?? 0,
|
|
423
|
-
zoom:
|
|
424
|
-
onPrev: () =>
|
|
425
|
-
onNext: () =>
|
|
426
|
-
onJump: (e) =>
|
|
423
|
+
zoom: S,
|
|
424
|
+
onPrev: () => j(c - 1),
|
|
425
|
+
onNext: () => j(c + 1),
|
|
426
|
+
onJump: (e) => j(e),
|
|
427
427
|
onZoomIn: () => {
|
|
428
|
-
|
|
428
|
+
m(
|
|
429
429
|
(e) => X(e) ? Math.min(e * 1.25, 4) : 1.25
|
|
430
430
|
);
|
|
431
431
|
},
|
|
432
432
|
onZoomOut: () => {
|
|
433
|
-
|
|
433
|
+
m(
|
|
434
434
|
(e) => X(e) ? Math.max(e / 1.25, 0.25) : 0.75
|
|
435
435
|
);
|
|
436
436
|
},
|
|
437
|
-
onZoomPreset: (e) =>
|
|
438
|
-
onOpenSearch: () =>
|
|
437
|
+
onZoomPreset: (e) => m(e),
|
|
438
|
+
onOpenSearch: () => L(!0),
|
|
439
439
|
onPrint: Y,
|
|
440
440
|
searchOpen: G,
|
|
441
|
-
onSearchOpenChange:
|
|
442
|
-
searchQuery:
|
|
441
|
+
onSearchOpenChange: L,
|
|
442
|
+
searchQuery: T,
|
|
443
443
|
onSearchQueryChange: (e) => {
|
|
444
444
|
me(e);
|
|
445
445
|
},
|
|
446
446
|
searchMatches: Ie,
|
|
447
|
-
register:
|
|
447
|
+
register: je,
|
|
448
448
|
focusIndex: oe,
|
|
449
449
|
setFocusIndex: be,
|
|
450
|
-
onToolbarKeyDown:
|
|
451
|
-
isRtl:
|
|
450
|
+
onToolbarKeyDown: Fe,
|
|
451
|
+
isRtl: v
|
|
452
452
|
}
|
|
453
453
|
) : null,
|
|
454
|
-
/* @__PURE__ */ n("div", { "aria-live": "polite", "aria-atomic": "true", className: "ds:sr-only", children:
|
|
454
|
+
/* @__PURE__ */ n("div", { "aria-live": "polite", "aria-atomic": "true", className: "ds:sr-only", children: _ }),
|
|
455
455
|
/* @__PURE__ */ n(
|
|
456
456
|
"div",
|
|
457
457
|
{
|
|
458
458
|
ref: se,
|
|
459
|
-
className:
|
|
459
|
+
className: tt(),
|
|
460
460
|
"data-testid": "pdf-pages-container",
|
|
461
461
|
children: s ? Array.from({ length: s.numPages }, (e, r) => r + 1).map(
|
|
462
462
|
(e) => /* @__PURE__ */ n(
|
|
463
|
-
|
|
463
|
+
ot,
|
|
464
464
|
{
|
|
465
465
|
pageNumber: e,
|
|
466
466
|
totalPages: s.numPages,
|
|
467
467
|
doc: s.doc,
|
|
468
|
-
zoom:
|
|
469
|
-
pageRotation:
|
|
468
|
+
zoom: S,
|
|
469
|
+
pageRotation: h,
|
|
470
470
|
renderPageOverlay: g,
|
|
471
471
|
container: se.current,
|
|
472
|
-
resizeTick:
|
|
472
|
+
resizeTick: Re,
|
|
473
473
|
shouldRender: e >= a.start && e <= a.end,
|
|
474
474
|
registerRef: (r) => {
|
|
475
475
|
ce.current[e - 1] = r;
|
|
476
476
|
},
|
|
477
|
-
searchQuery:
|
|
477
|
+
searchQuery: T,
|
|
478
478
|
onMatchCount: (r) => {
|
|
479
|
-
|
|
479
|
+
Ae((l) => r === 0 && l.total === 0 ? l : {
|
|
480
480
|
current: Math.min(l.current || 1, r || 1),
|
|
481
481
|
total: Math.max(l.total, r)
|
|
482
482
|
});
|
|
@@ -484,9 +484,9 @@ const nt = Fe(
|
|
|
484
484
|
},
|
|
485
485
|
e
|
|
486
486
|
)
|
|
487
|
-
) : /* @__PURE__ */
|
|
488
|
-
/* @__PURE__ */ n(
|
|
489
|
-
/* @__PURE__ */ n("span", { children:
|
|
487
|
+
) : /* @__PURE__ */ B("div", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)] ds:text-[var(--muted-foreground)] ds:p-[var(--spacing-lg)]", children: [
|
|
488
|
+
/* @__PURE__ */ n(Ze, { size: "sm", label: f("pdf.loading") }),
|
|
489
|
+
/* @__PURE__ */ n("span", { children: f("pdf.loading") })
|
|
490
490
|
] })
|
|
491
491
|
}
|
|
492
492
|
)
|
|
@@ -496,53 +496,53 @@ const nt = Fe(
|
|
|
496
496
|
);
|
|
497
497
|
}
|
|
498
498
|
);
|
|
499
|
-
|
|
500
|
-
function
|
|
499
|
+
at.displayName = "PDFViewer";
|
|
500
|
+
function st(o) {
|
|
501
501
|
const { t } = pe(), {
|
|
502
502
|
currentPage: u,
|
|
503
|
-
numPages:
|
|
504
|
-
zoom:
|
|
503
|
+
numPages: y,
|
|
504
|
+
zoom: h,
|
|
505
505
|
onPrev: g,
|
|
506
|
-
onNext:
|
|
507
|
-
onJump:
|
|
508
|
-
onZoomIn:
|
|
509
|
-
onZoomOut:
|
|
510
|
-
onZoomPreset:
|
|
511
|
-
onOpenSearch:
|
|
512
|
-
onPrint:
|
|
513
|
-
searchOpen:
|
|
514
|
-
onSearchOpenChange:
|
|
515
|
-
searchQuery:
|
|
516
|
-
onSearchQueryChange:
|
|
517
|
-
searchMatches:
|
|
518
|
-
register:
|
|
506
|
+
onNext: x,
|
|
507
|
+
onJump: w,
|
|
508
|
+
onZoomIn: k,
|
|
509
|
+
onZoomOut: z,
|
|
510
|
+
onZoomPreset: O,
|
|
511
|
+
onOpenSearch: D,
|
|
512
|
+
onPrint: I,
|
|
513
|
+
searchOpen: f,
|
|
514
|
+
onSearchOpenChange: P,
|
|
515
|
+
searchQuery: N,
|
|
516
|
+
onSearchQueryChange: v,
|
|
517
|
+
searchMatches: E,
|
|
518
|
+
register: p,
|
|
519
519
|
focusIndex: H,
|
|
520
520
|
setFocusIndex: s,
|
|
521
|
-
onToolbarKeyDown:
|
|
522
|
-
} =
|
|
523
|
-
|
|
521
|
+
onToolbarKeyDown: Q
|
|
522
|
+
} = o, [W, d] = b(String(u));
|
|
523
|
+
C(() => {
|
|
524
524
|
d(String(u));
|
|
525
525
|
}, [u]);
|
|
526
|
-
const c = u <= 1,
|
|
527
|
-
function
|
|
528
|
-
const a = Number(
|
|
529
|
-
Number.isFinite(a) && a >= 1 ?
|
|
526
|
+
const c = u <= 1, R = u >= y;
|
|
527
|
+
function S() {
|
|
528
|
+
const a = Number(W);
|
|
529
|
+
Number.isFinite(a) && a >= 1 ? w(Math.min(a, y)) : d(String(u));
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function m(a) {
|
|
532
532
|
return /* @__PURE__ */ n(
|
|
533
533
|
"button",
|
|
534
534
|
{
|
|
535
535
|
type: "button",
|
|
536
|
-
ref:
|
|
536
|
+
ref: p(a.index),
|
|
537
537
|
tabIndex: a.index === H ? 0 : -1,
|
|
538
538
|
onFocus: () => s(a.index),
|
|
539
|
-
onKeyDown:
|
|
539
|
+
onKeyDown: Q,
|
|
540
540
|
"aria-label": a.label,
|
|
541
541
|
"aria-disabled": a.disabled || void 0,
|
|
542
542
|
title: a.label,
|
|
543
|
-
onClick: (
|
|
543
|
+
onClick: (M) => {
|
|
544
544
|
if (a.disabled) {
|
|
545
|
-
|
|
545
|
+
M.preventDefault();
|
|
546
546
|
return;
|
|
547
547
|
}
|
|
548
548
|
a.onActivate();
|
|
@@ -552,33 +552,33 @@ function at(i) {
|
|
|
552
552
|
}
|
|
553
553
|
);
|
|
554
554
|
}
|
|
555
|
-
return /* @__PURE__ */
|
|
555
|
+
return /* @__PURE__ */ B(
|
|
556
556
|
"div",
|
|
557
557
|
{
|
|
558
558
|
role: "toolbar",
|
|
559
559
|
"aria-label": t("pdf.toolbarLabel"),
|
|
560
|
-
className:
|
|
560
|
+
className: Ye(),
|
|
561
561
|
children: [
|
|
562
|
-
|
|
562
|
+
m({
|
|
563
563
|
index: 0,
|
|
564
564
|
label: t("pdf.previousPage"),
|
|
565
565
|
disabled: c,
|
|
566
566
|
onActivate: g,
|
|
567
567
|
icon: /* @__PURE__ */ n(
|
|
568
|
-
|
|
568
|
+
He,
|
|
569
569
|
{
|
|
570
570
|
"aria-hidden": "true",
|
|
571
571
|
className: "ds:block-size-4 ds:inline-size-4 ds:rtl:rotate-180"
|
|
572
572
|
}
|
|
573
573
|
)
|
|
574
574
|
}),
|
|
575
|
-
|
|
575
|
+
m({
|
|
576
576
|
index: 1,
|
|
577
577
|
label: t("pdf.nextPage"),
|
|
578
|
-
disabled:
|
|
579
|
-
onActivate:
|
|
578
|
+
disabled: R,
|
|
579
|
+
onActivate: x,
|
|
580
580
|
icon: /* @__PURE__ */ n(
|
|
581
|
-
|
|
581
|
+
Qe,
|
|
582
582
|
{
|
|
583
583
|
"aria-hidden": "true",
|
|
584
584
|
className: "ds:block-size-4 ds:inline-size-4 ds:rtl:rotate-180"
|
|
@@ -590,15 +590,15 @@ function at(i) {
|
|
|
590
590
|
{
|
|
591
591
|
type: "number",
|
|
592
592
|
min: 1,
|
|
593
|
-
max: Math.max(
|
|
594
|
-
value:
|
|
593
|
+
max: Math.max(y, 1),
|
|
594
|
+
value: W,
|
|
595
595
|
onChange: (a) => d(a.target.value),
|
|
596
596
|
onKeyDown: (a) => {
|
|
597
|
-
a.key === "Enter" && (a.preventDefault(),
|
|
597
|
+
a.key === "Enter" && (a.preventDefault(), S());
|
|
598
598
|
},
|
|
599
|
-
onBlur:
|
|
599
|
+
onBlur: S,
|
|
600
600
|
onFocus: () => s(2),
|
|
601
|
-
ref:
|
|
601
|
+
ref: p(2),
|
|
602
602
|
tabIndex: H === 2 ? 0 : -1,
|
|
603
603
|
"aria-label": t("pdf.currentPageInput"),
|
|
604
604
|
className: Pe()
|
|
@@ -609,7 +609,7 @@ function at(i) {
|
|
|
609
609
|
{
|
|
610
610
|
"aria-hidden": "true",
|
|
611
611
|
className: "type-body-sm ds:text-[var(--muted-foreground)]",
|
|
612
|
-
children: t("pdf.pageOf", { current: u, total:
|
|
612
|
+
children: t("pdf.pageOf", { current: u, total: y || 0 })
|
|
613
613
|
}
|
|
614
614
|
),
|
|
615
615
|
/* @__PURE__ */ n(
|
|
@@ -619,62 +619,62 @@ function at(i) {
|
|
|
619
619
|
className: "ds:inline-block ds:block-size-6 ds:inline-size-px ds:bg-[var(--border)] ds:ms-[var(--spacing-xs)] ds:me-[var(--spacing-xs)]"
|
|
620
620
|
}
|
|
621
621
|
),
|
|
622
|
-
|
|
622
|
+
m({
|
|
623
623
|
index: 3,
|
|
624
624
|
label: t("pdf.zoom.out"),
|
|
625
|
-
onActivate:
|
|
625
|
+
onActivate: z,
|
|
626
626
|
icon: /* @__PURE__ */ n(
|
|
627
|
-
|
|
627
|
+
Xe,
|
|
628
628
|
{
|
|
629
629
|
"aria-hidden": "true",
|
|
630
630
|
className: "ds:block-size-4 ds:inline-size-4"
|
|
631
631
|
}
|
|
632
632
|
)
|
|
633
633
|
}),
|
|
634
|
-
|
|
634
|
+
m({
|
|
635
635
|
index: 4,
|
|
636
636
|
label: t("pdf.zoom.in"),
|
|
637
|
-
onActivate:
|
|
637
|
+
onActivate: k,
|
|
638
638
|
icon: /* @__PURE__ */ n(
|
|
639
|
-
|
|
639
|
+
Je,
|
|
640
640
|
{
|
|
641
641
|
"aria-hidden": "true",
|
|
642
642
|
className: "ds:block-size-4 ds:inline-size-4"
|
|
643
643
|
}
|
|
644
644
|
)
|
|
645
645
|
}),
|
|
646
|
-
/* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ B(
|
|
647
647
|
"select",
|
|
648
648
|
{
|
|
649
649
|
"aria-label": t("pdf.zoom.preset"),
|
|
650
|
-
value: typeof
|
|
650
|
+
value: typeof h == "number" ? String(h) : h,
|
|
651
651
|
onChange: (a) => {
|
|
652
|
-
const
|
|
653
|
-
if (
|
|
654
|
-
|
|
652
|
+
const M = a.target.value;
|
|
653
|
+
if (M === "fit-width" || M === "fit-page" || M === "actual-size")
|
|
654
|
+
O(M);
|
|
655
655
|
else {
|
|
656
|
-
const
|
|
657
|
-
Number.isFinite(
|
|
656
|
+
const _ = Number(M);
|
|
657
|
+
Number.isFinite(_) && O(_);
|
|
658
658
|
}
|
|
659
659
|
},
|
|
660
|
-
ref:
|
|
660
|
+
ref: p(5),
|
|
661
661
|
tabIndex: H === 5 ? 0 : -1,
|
|
662
662
|
onFocus: () => s(5),
|
|
663
|
-
onKeyDown:
|
|
664
|
-
className:
|
|
663
|
+
onKeyDown: Q,
|
|
664
|
+
className: et(),
|
|
665
665
|
children: [
|
|
666
666
|
/* @__PURE__ */ n("option", { value: "fit-width", children: t("pdf.zoom.fitWidth") }),
|
|
667
667
|
/* @__PURE__ */ n("option", { value: "fit-page", children: t("pdf.zoom.fitPage") }),
|
|
668
668
|
/* @__PURE__ */ n("option", { value: "actual-size", children: t("pdf.zoom.actualSize") }),
|
|
669
|
-
|
|
669
|
+
nt.filter(X).map((a) => /* @__PURE__ */ n("option", { value: String(a), children: `${Math.round(a * 100)}%` }, a))
|
|
670
670
|
]
|
|
671
671
|
}
|
|
672
672
|
),
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
/* @__PURE__ */ n(ee.Trigger, { asChild: !0, children:
|
|
673
|
+
/* @__PURE__ */ B(ee.Root, { open: f, onOpenChange: P, children: [
|
|
674
|
+
/* @__PURE__ */ n(ee.Trigger, { asChild: !0, children: m({
|
|
675
675
|
index: 6,
|
|
676
676
|
label: t("pdf.search.open"),
|
|
677
|
-
onActivate:
|
|
677
|
+
onActivate: D,
|
|
678
678
|
icon: /* @__PURE__ */ n(
|
|
679
679
|
We,
|
|
680
680
|
{
|
|
@@ -683,7 +683,7 @@ function at(i) {
|
|
|
683
683
|
}
|
|
684
684
|
)
|
|
685
685
|
}) }),
|
|
686
|
-
/* @__PURE__ */ n(ee.Portal, { children: /* @__PURE__ */
|
|
686
|
+
/* @__PURE__ */ n(ee.Portal, { children: /* @__PURE__ */ B(
|
|
687
687
|
ee.Content,
|
|
688
688
|
{
|
|
689
689
|
sideOffset: 8,
|
|
@@ -701,8 +701,8 @@ function at(i) {
|
|
|
701
701
|
{
|
|
702
702
|
type: "search",
|
|
703
703
|
autoFocus: !0,
|
|
704
|
-
value:
|
|
705
|
-
onChange: (a) =>
|
|
704
|
+
value: N,
|
|
705
|
+
onChange: (a) => v(a.target.value),
|
|
706
706
|
placeholder: t("pdf.search.placeholder"),
|
|
707
707
|
"aria-label": t("pdf.search.placeholder"),
|
|
708
708
|
className: Pe({
|
|
@@ -715,10 +715,10 @@ function at(i) {
|
|
|
715
715
|
{
|
|
716
716
|
"aria-live": "polite",
|
|
717
717
|
className: "type-meta ds:text-[var(--muted-foreground)]",
|
|
718
|
-
children:
|
|
719
|
-
current:
|
|
720
|
-
total:
|
|
721
|
-
}) :
|
|
718
|
+
children: E.total > 0 ? t("pdf.search.countOfTotal", {
|
|
719
|
+
current: E.current,
|
|
720
|
+
total: E.total
|
|
721
|
+
}) : N ? t("pdf.search.noResults") : ""
|
|
722
722
|
}
|
|
723
723
|
),
|
|
724
724
|
/* @__PURE__ */ n(ee.Close, { asChild: !0, children: /* @__PURE__ */ n(
|
|
@@ -740,12 +740,12 @@ function at(i) {
|
|
|
740
740
|
}
|
|
741
741
|
) })
|
|
742
742
|
] }),
|
|
743
|
-
|
|
743
|
+
m({
|
|
744
744
|
index: 7,
|
|
745
745
|
label: t("pdf.print"),
|
|
746
|
-
onActivate:
|
|
746
|
+
onActivate: I,
|
|
747
747
|
icon: /* @__PURE__ */ n(
|
|
748
|
-
|
|
748
|
+
qe,
|
|
749
749
|
{
|
|
750
750
|
"aria-hidden": "true",
|
|
751
751
|
className: "ds:block-size-4 ds:inline-size-4"
|
|
@@ -756,67 +756,67 @@ function at(i) {
|
|
|
756
756
|
}
|
|
757
757
|
);
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function ot(o) {
|
|
760
760
|
const {
|
|
761
761
|
pageNumber: t,
|
|
762
762
|
totalPages: u,
|
|
763
|
-
doc:
|
|
764
|
-
zoom:
|
|
763
|
+
doc: y,
|
|
764
|
+
zoom: h,
|
|
765
765
|
pageRotation: g,
|
|
766
|
-
renderPageOverlay:
|
|
767
|
-
container:
|
|
768
|
-
resizeTick:
|
|
769
|
-
shouldRender:
|
|
770
|
-
registerRef:
|
|
771
|
-
searchQuery:
|
|
772
|
-
onMatchCount:
|
|
773
|
-
} =
|
|
766
|
+
renderPageOverlay: x,
|
|
767
|
+
container: w,
|
|
768
|
+
resizeTick: k,
|
|
769
|
+
shouldRender: z,
|
|
770
|
+
registerRef: O,
|
|
771
|
+
searchQuery: D,
|
|
772
|
+
onMatchCount: I
|
|
773
|
+
} = o, { t: f } = pe(), P = V(null), N = V(null), [v, E] = b({
|
|
774
774
|
width: 612,
|
|
775
775
|
height: 792
|
|
776
|
-
}), [
|
|
777
|
-
|
|
776
|
+
}), [p, H] = b(null);
|
|
777
|
+
C(() => {
|
|
778
778
|
let d = !1;
|
|
779
|
-
return
|
|
779
|
+
return y.getPage(t).then((c) => {
|
|
780
780
|
d || H(c);
|
|
781
781
|
}), () => {
|
|
782
782
|
d = !0;
|
|
783
783
|
};
|
|
784
|
-
}, [
|
|
785
|
-
if (!
|
|
786
|
-
const d = (
|
|
787
|
-
|
|
788
|
-
width: Math.floor(
|
|
789
|
-
height: Math.floor(
|
|
784
|
+
}, [y, t]), C(() => {
|
|
785
|
+
if (!p) return;
|
|
786
|
+
const d = (m) => g === void 0 ? { scale: m } : { scale: m, rotation: g }, c = p.getViewport(d(1)), R = Se(h, c, w), S = p.getViewport(d(R));
|
|
787
|
+
E({
|
|
788
|
+
width: Math.floor(S.width),
|
|
789
|
+
height: Math.floor(S.height)
|
|
790
790
|
});
|
|
791
|
-
}, [
|
|
792
|
-
const s = g ?? (
|
|
793
|
-
|
|
794
|
-
if (!
|
|
795
|
-
const
|
|
796
|
-
|
|
791
|
+
}, [p, h, w, k, g]);
|
|
792
|
+
const s = g ?? (p == null ? void 0 : p.rotate) ?? 0;
|
|
793
|
+
C(() => {
|
|
794
|
+
if (!p || !z) {
|
|
795
|
+
const T = P.current;
|
|
796
|
+
T && !z && (T.width = 0);
|
|
797
797
|
return;
|
|
798
798
|
}
|
|
799
|
-
const d =
|
|
799
|
+
const d = P.current, c = N.current;
|
|
800
800
|
if (!d) return;
|
|
801
|
-
const
|
|
802
|
-
if (!
|
|
803
|
-
const
|
|
804
|
-
d.width = Math.floor(
|
|
805
|
-
const te =
|
|
801
|
+
const R = d.getContext("2d");
|
|
802
|
+
if (!R) return;
|
|
803
|
+
const S = (T) => g === void 0 ? { scale: T } : { scale: T, rotation: g }, m = p.getViewport(S(1)), a = Se(h, m, w), M = p.getViewport(S(a)), _ = Math.max(1, window.devicePixelRatio || 1);
|
|
804
|
+
d.width = Math.floor(M.width * _), d.height = Math.floor(M.height * _), R.setTransform(_, 0, 0, _, 0, 0);
|
|
805
|
+
const te = p.render({
|
|
806
806
|
canvas: d,
|
|
807
|
-
canvasContext:
|
|
808
|
-
viewport:
|
|
807
|
+
canvasContext: R,
|
|
808
|
+
viewport: M
|
|
809
809
|
});
|
|
810
|
-
let G = !1,
|
|
810
|
+
let G = !1, L = null;
|
|
811
811
|
return te.promise.then(async () => {
|
|
812
812
|
if (G || !c) return;
|
|
813
813
|
c.textContent = "";
|
|
814
|
-
const
|
|
815
|
-
G || (
|
|
816
|
-
textContentSource:
|
|
814
|
+
const T = await p.getTextContent();
|
|
815
|
+
G || (L = new fe.TextLayer({
|
|
816
|
+
textContentSource: T,
|
|
817
817
|
container: c,
|
|
818
|
-
viewport:
|
|
819
|
-
}), await
|
|
818
|
+
viewport: M
|
|
819
|
+
}), await L.render(), Ne(c, D, I));
|
|
820
820
|
}).catch(() => {
|
|
821
821
|
}), () => {
|
|
822
822
|
G = !0;
|
|
@@ -824,49 +824,49 @@ function st(i) {
|
|
|
824
824
|
te.cancel();
|
|
825
825
|
} catch {
|
|
826
826
|
}
|
|
827
|
-
if (
|
|
827
|
+
if (L)
|
|
828
828
|
try {
|
|
829
|
-
|
|
829
|
+
L.cancel();
|
|
830
830
|
} catch {
|
|
831
831
|
}
|
|
832
832
|
};
|
|
833
833
|
}, [
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
834
|
+
p,
|
|
835
|
+
z,
|
|
836
|
+
h,
|
|
837
|
+
w,
|
|
838
|
+
k,
|
|
839
|
+
D,
|
|
840
|
+
I,
|
|
841
841
|
g
|
|
842
|
-
]),
|
|
843
|
-
if (!
|
|
844
|
-
const d =
|
|
845
|
-
d &&
|
|
846
|
-
}, [
|
|
847
|
-
const
|
|
848
|
-
width:
|
|
849
|
-
height:
|
|
850
|
-
},
|
|
851
|
-
width:
|
|
852
|
-
height:
|
|
842
|
+
]), C(() => {
|
|
843
|
+
if (!z) return;
|
|
844
|
+
const d = N.current;
|
|
845
|
+
d && Ne(d, D, I);
|
|
846
|
+
}, [D, z, I]);
|
|
847
|
+
const Q = {
|
|
848
|
+
width: v.width,
|
|
849
|
+
height: v.height
|
|
850
|
+
}, W = {
|
|
851
|
+
width: v.width,
|
|
852
|
+
height: v.height
|
|
853
853
|
};
|
|
854
|
-
return /* @__PURE__ */
|
|
854
|
+
return /* @__PURE__ */ B(
|
|
855
855
|
"article",
|
|
856
856
|
{
|
|
857
857
|
ref: (d) => {
|
|
858
|
-
|
|
858
|
+
O(d);
|
|
859
859
|
},
|
|
860
860
|
"data-page-number": t,
|
|
861
|
-
"aria-label":
|
|
862
|
-
className:
|
|
863
|
-
style:
|
|
861
|
+
"aria-label": f("pdf.pageOf", { current: t, total: u }),
|
|
862
|
+
className: rt(),
|
|
863
|
+
style: W,
|
|
864
864
|
children: [
|
|
865
|
-
/* @__PURE__ */ n("canvas", { ref:
|
|
865
|
+
/* @__PURE__ */ n("canvas", { ref: P, style: Q }),
|
|
866
866
|
/* @__PURE__ */ n(
|
|
867
867
|
"div",
|
|
868
868
|
{
|
|
869
|
-
ref:
|
|
869
|
+
ref: N,
|
|
870
870
|
"aria-hidden": "false",
|
|
871
871
|
className: [
|
|
872
872
|
"ds:absolute ds:inset-0",
|
|
@@ -880,18 +880,18 @@ function st(i) {
|
|
|
880
880
|
].join(" ")
|
|
881
881
|
}
|
|
882
882
|
),
|
|
883
|
-
|
|
883
|
+
z && x ? /* @__PURE__ */ n(
|
|
884
884
|
"div",
|
|
885
885
|
{
|
|
886
886
|
role: "group",
|
|
887
|
-
"aria-label":
|
|
887
|
+
"aria-label": f("pdf.pageOverlay", { page: t }),
|
|
888
888
|
className: "ds:absolute ds:inset-0 ds:pointer-events-auto",
|
|
889
889
|
"data-pdf-page-overlay": "",
|
|
890
890
|
"data-page-number": t,
|
|
891
|
-
children:
|
|
891
|
+
children: x({
|
|
892
892
|
pageNumber: t,
|
|
893
|
-
pageWidthCss:
|
|
894
|
-
pageHeightCss:
|
|
893
|
+
pageWidthCss: v.width,
|
|
894
|
+
pageHeightCss: v.height,
|
|
895
895
|
rotation: s
|
|
896
896
|
})
|
|
897
897
|
}
|
|
@@ -900,21 +900,48 @@ function st(i) {
|
|
|
900
900
|
}
|
|
901
901
|
);
|
|
902
902
|
}
|
|
903
|
-
function
|
|
904
|
-
|
|
905
|
-
|
|
903
|
+
function Me(o) {
|
|
904
|
+
return o.normalize("NFKD").replace(new RegExp("\\p{Diacritic}", "gu"), "").toLowerCase();
|
|
905
|
+
}
|
|
906
|
+
function Ne(o, t, u) {
|
|
907
|
+
if (o.querySelectorAll("[data-match]").forEach((f) => {
|
|
908
|
+
f.removeAttribute("data-match");
|
|
906
909
|
}), !t) {
|
|
907
910
|
u(0);
|
|
908
911
|
return;
|
|
909
912
|
}
|
|
910
|
-
const
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
}
|
|
913
|
+
const h = Me(t);
|
|
914
|
+
if (!h) {
|
|
915
|
+
u(0);
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
const g = Array.from(o.querySelectorAll("span")), x = [], w = [];
|
|
919
|
+
let k = 0;
|
|
920
|
+
for (const f of g) {
|
|
921
|
+
const P = Me(f.textContent ?? "");
|
|
922
|
+
x.push({ start: k, end: k + P.length }), w.push(P), k += P.length;
|
|
923
|
+
}
|
|
924
|
+
const z = w.join("");
|
|
925
|
+
let O = 0;
|
|
926
|
+
const D = /* @__PURE__ */ new Set();
|
|
927
|
+
let I = 0;
|
|
928
|
+
for (; I <= z.length - h.length; ) {
|
|
929
|
+
const f = z.indexOf(h, I);
|
|
930
|
+
if (f === -1) break;
|
|
931
|
+
O += 1;
|
|
932
|
+
const P = f + h.length;
|
|
933
|
+
for (let N = 0; N < x.length; N++) {
|
|
934
|
+
const { start: v, end: E } = x[N];
|
|
935
|
+
v < P && E > f && D.add(N);
|
|
936
|
+
}
|
|
937
|
+
I = P;
|
|
938
|
+
}
|
|
939
|
+
D.forEach((f) => {
|
|
940
|
+
g[f].setAttribute("data-match", "true");
|
|
941
|
+
}), u(O);
|
|
915
942
|
}
|
|
916
943
|
export {
|
|
917
|
-
|
|
918
|
-
|
|
944
|
+
at as P,
|
|
945
|
+
Ge as p
|
|
919
946
|
};
|
|
920
|
-
//# sourceMappingURL=pdf-viewer-
|
|
947
|
+
//# sourceMappingURL=pdf-viewer-DvtEHcEP.js.map
|