@react-pdf-kit/viewer 2.6.0-beta.1 → 2.6.0-rc.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/AnnotationLayer-D6BfL976.js +113 -0
- package/dist/Button-jStpvb3T.js +21 -0
- package/dist/Checkbox-Brta-YKG.js +195 -0
- package/dist/Combination-DqNkTtir.js +695 -0
- package/dist/Container-DTWaZzc7.js +16 -0
- package/dist/CustomThumbnailElement-C2quEICO.js +19 -0
- package/dist/DarkPdfIcon-B5ehd9CV.js +9 -0
- package/dist/DocumentDialog-DHAWcYIz.js +324 -0
- package/dist/DropDown-DikL-krI.js +33 -0
- package/dist/Input-Bb_-ljl1.js +31 -0
- package/dist/LightPdfIcon-DL8MYtWQ.js +9 -0
- package/dist/LoaderIcon-D9YjinGf.js +14 -0
- package/dist/LoadingIndicator-MWrbKa6X.js +45 -0
- package/dist/MenuItem-BJDWfzAw.js +15 -0
- package/dist/MenuSeparator-D1H5l8Ej.js +6 -0
- package/dist/MostPageTool.module-BRVv-sGz.js +4 -0
- package/dist/OtherTool.module-BQY9Nfqz.js +4 -0
- package/dist/Paginate.module-B0GMw-MB.js +8 -0
- package/dist/PaginationContext--n91mIJ4.js +232 -0
- package/dist/PasswordModal-BDHdSpxf.js +76 -0
- package/dist/PropertyItem-evJWWmWZ.js +18 -0
- package/dist/RPDropFileZone-BunRfzst.js +35 -0
- package/dist/RPLayout.module-Vc3h4xxS.js +14 -0
- package/dist/RPPage-BuSGUFzw.js +91 -0
- package/dist/RPPages-V5CNUXFD.js +1007 -0
- package/dist/RPSplitter-C63X9M8w.js +121 -0
- package/dist/RPToolbar.module-BwqWLviy.js +10 -0
- package/dist/RPTooltip-ZZoFqP7C.js +381 -0
- package/dist/RotateTool.module-DH5yWbvM.js +4 -0
- package/dist/SearchTool.module-DUkVXfOn.js +16 -0
- package/dist/SkipLink-Bvbn3miT.js +18 -0
- package/dist/TextHighlightLayer-BSVgBxR3.js +157 -0
- package/dist/TextLayer-DWGFN9SF.js +125 -0
- package/dist/Thumbnail-Dwo2-4Ki.js +97 -0
- package/dist/Thumbnails-ComClyJJ.js +52 -0
- package/dist/ToolbarLayout.module-Zo715dbb.js +12 -0
- package/dist/WrapperLayout-Dcd9l9xH.js +13 -0
- package/dist/ZoomTool.module-BrIPy8pO.js +11 -0
- package/dist/assets/AnnotationLayer.css +1 -0
- package/dist/assets/Button.css +1 -0
- package/dist/assets/Checkbox.css +1 -0
- package/dist/assets/Container.css +1 -0
- package/dist/assets/CustomThumbnailElement.css +1 -0
- package/dist/assets/DocumentDialog.css +1 -0
- package/dist/assets/DropDown.css +1 -0
- package/dist/assets/Input.css +1 -0
- package/dist/assets/LoaderIcon.css +1 -0
- package/dist/assets/LoadingIndicator.css +1 -0
- package/dist/assets/MenuItem.css +1 -0
- package/dist/assets/MenuSeparator.css +1 -0
- package/dist/assets/MostPageTool.css +1 -0
- package/dist/assets/OtherTool.css +1 -0
- package/dist/assets/Paginate.css +1 -0
- package/dist/assets/PasswordModal.css +1 -0
- package/dist/assets/PropertyItem.css +1 -0
- package/dist/assets/RPDropFileZone.css +1 -0
- package/dist/assets/RPLayout.css +1 -0
- package/dist/assets/RPPage.css +1 -0
- package/dist/assets/RPPages.css +1 -0
- package/dist/assets/RPSplitter.css +1 -0
- package/dist/assets/RPToolbar.css +1 -0
- package/dist/assets/RPTooltip.css +1 -0
- package/dist/assets/RotateTool.css +1 -0
- package/dist/assets/SearchTool.css +1 -0
- package/dist/assets/SkipLink.css +1 -0
- package/dist/assets/TextHighlightLayer.css +1 -0
- package/dist/assets/TextLayer.css +1 -0
- package/dist/assets/Thumbnail.css +1 -0
- package/dist/assets/Thumbnails.css +1 -0
- package/dist/assets/ToolbarLayout.css +1 -0
- package/dist/assets/WrapperLayout.css +1 -0
- package/dist/assets/ZoomTool.css +1 -0
- package/dist/assets/style.js +2 -77
- package/dist/chunk-C_CI6nMA.js +13 -0
- package/dist/clsx-B7LyVm5O.js +16 -0
- package/dist/components/RPConfig.js +24 -26
- package/dist/components/RPController.js +85 -135
- package/dist/components/RPDropFileZone.js +3 -61
- package/dist/components/RPPages.js +3 -1082
- package/dist/components/RPProvider.js +50 -131
- package/dist/components/RPTheme.js +20 -21
- package/dist/components/icons/CheckIcon.js +16 -22
- package/dist/components/icons/ChevronDownIcon.js +17 -23
- package/dist/components/icons/ChevronUpIcon.js +16 -22
- package/dist/components/icons/ClearIcon.js +26 -25
- package/dist/components/icons/ClockwiseIcon.js +16 -22
- package/dist/components/icons/CloseIcon.js +16 -22
- package/dist/components/icons/DarkPdfIcon.js +2 -15
- package/dist/components/icons/DualPageIcon.js +16 -22
- package/dist/components/icons/DualPageWithCoverIcon.js +16 -22
- package/dist/components/icons/FileDownloadDefaultIcon.js +20 -23
- package/dist/components/icons/FileUploadDefaultIcon.js +20 -23
- package/dist/components/icons/FullScreenIcon.js +16 -22
- package/dist/components/icons/GoToDownIcon.js +16 -22
- package/dist/components/icons/HandModeDefaultIcon.js +16 -22
- package/dist/components/icons/HorizontalScrollingIcon.js +18 -24
- package/dist/components/icons/InfoIcon.js +16 -22
- package/dist/components/icons/LightPdfIcon.js +2 -15
- package/dist/components/icons/LoaderIcon.js +2 -17
- package/dist/components/icons/MoonIcon.js +16 -22
- package/dist/components/icons/PageScrollingIcon.js +18 -24
- package/dist/components/icons/PrintDefaultIcon.js +20 -23
- package/dist/components/icons/SearchIcon.js +16 -22
- package/dist/components/icons/SinglePageIcon.js +15 -21
- package/dist/components/icons/SunIcon.js +26 -25
- package/dist/components/icons/TextSelectionDefaultIcon.js +20 -23
- package/dist/components/icons/ThreeDotIcon.js +16 -22
- package/dist/components/icons/Thumbnail.js +39 -54
- package/dist/components/icons/VerticalScrollingIcon.js +18 -24
- package/dist/components/icons/WrappedScrollingIcon.js +18 -24
- package/dist/components/icons/ZoomInIcon.js +16 -22
- package/dist/components/icons/ZoomOutIcon.js +16 -22
- package/dist/components/layout/Container.js +2 -21
- package/dist/components/layout/LayoutContainer.js +23 -34
- package/dist/components/layout/LayoutWrapper.js +14 -10
- package/dist/components/layout/RPDefaultLayout.js +99 -244
- package/dist/components/layout/RPLayout.js +70 -220
- package/dist/components/layout/SkipLink.js +3 -29
- package/dist/components/layout/WrapperLayout.js +2 -27
- package/dist/components/layout/sidebar/CustomThumbnailElement.js +2 -68
- package/dist/components/layout/sidebar/RPSidebar.js +61 -112
- package/dist/components/layout/sidebar/RPSplitter.js +2 -9
- package/dist/components/layout/sidebar/Thumbnail.js +3 -155
- package/dist/components/layout/sidebar/Thumbnails.js +2 -82
- package/dist/components/layout/toolbar/DarkModeTool.js +44 -36
- package/dist/components/layout/toolbar/DocumentDialog.js +2 -322
- package/dist/components/layout/toolbar/DocumentProperties.js +30 -39
- package/dist/components/layout/toolbar/FileDownloadTool.js +54 -50
- package/dist/components/layout/toolbar/FileUploadTool.js +54 -49
- package/dist/components/layout/toolbar/FullScreenTool.js +62 -72
- package/dist/components/layout/toolbar/MenuItem.js +2 -19
- package/dist/components/layout/toolbar/MenuSeparator.js +2 -15
- package/dist/components/layout/toolbar/MostPageTool.js +62 -81
- package/dist/components/layout/toolbar/OtherTool.js +97 -198
- package/dist/components/layout/toolbar/Paginate.js +111 -145
- package/dist/components/layout/toolbar/PrintTool.js +70 -72
- package/dist/components/layout/toolbar/PropertyItem.js +2 -12
- package/dist/components/layout/toolbar/RPMenuItem.js +22 -31
- package/dist/components/layout/toolbar/RPMoreOptions.js +140 -220
- package/dist/components/layout/toolbar/RPToolbar.js +45 -151
- package/dist/components/layout/toolbar/RPToolbarEnd.js +23 -121
- package/dist/components/layout/toolbar/RotateTool.js +49 -60
- package/dist/components/layout/toolbar/ScrollModeTool.js +79 -67
- package/dist/components/layout/toolbar/SearchCloseButton.js +23 -31
- package/dist/components/layout/toolbar/SearchResultNavigator.js +39 -100
- package/dist/components/layout/toolbar/SearchTool.js +226 -267
- package/dist/components/layout/toolbar/SelectionModeTool.js +59 -51
- package/dist/components/layout/toolbar/ThumbnailTool.js +30 -39
- package/dist/components/layout/toolbar/ToolbarCustom.js +56 -113
- package/dist/components/layout/toolbar/ToolbarDefault.js +58 -196
- package/dist/components/layout/toolbar/ToolbarLayout.js +12 -158
- package/dist/components/layout/toolbar/ViewModeTool.js +82 -62
- package/dist/components/layout/toolbar/ZoomTool.js +139 -150
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +24 -54
- package/dist/components/layout/toolbar/tools/DualPageTool.js +23 -25
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +2 -206
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +23 -35
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +23 -34
- package/dist/components/layout/toolbar/tools/FirstPageTool.js +2 -201
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +25 -33
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +24 -36
- package/dist/components/layout/toolbar/tools/InputPageTool.js +51 -92
- package/dist/components/layout/toolbar/tools/LastPageTool.js +2 -201
- package/dist/components/layout/toolbar/tools/NextPageTool.js +32 -61
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +24 -36
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +21 -62
- package/dist/components/layout/toolbar/tools/PrintTool.js +23 -35
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +23 -47
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +26 -47
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +29 -38
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +22 -24
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +24 -35
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +24 -46
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +24 -36
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +29 -58
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +26 -26
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +94 -133
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +29 -58
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +60 -148
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +31 -42
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +23 -28
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +25 -52
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +25 -51
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +26 -42
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +57 -87
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +25 -52
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +44 -64
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +80 -71
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +59 -57
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +79 -66
- package/dist/components/page/AnnotationLayer.js +2 -146
- package/dist/components/page/CanvasLayer.js +47 -71
- package/dist/components/page/CustomElement.js +18 -53
- package/dist/components/page/DualPage.js +43 -98
- package/dist/components/page/DualPageWithCover.js +66 -130
- package/dist/components/page/RPPage.js +2 -143
- package/dist/components/page/SinglePage.js +27 -88
- package/dist/components/page/TextHighlightLayer.js +2 -198
- package/dist/components/page/TextLayer.js +2 -202
- package/dist/components/page/searchHighlight.js +32 -37
- package/dist/components/ui/Button.js +2 -25
- package/dist/components/ui/Checkbox.js +2 -273
- package/dist/components/ui/DropDown.js +2 -36
- package/dist/components/ui/Input.js +2 -28
- package/dist/components/ui/LoadingIndicator.js +2 -59
- package/dist/components/ui/PasswordModal.js +2 -75
- package/dist/components/ui/RPTooltip.js +2 -357
- package/dist/contexts/ConfigContext.js +13 -12
- package/dist/contexts/DarkModeContext.js +26 -27
- package/dist/contexts/DimensionPagesContext.js +49 -60
- package/dist/contexts/DocumentPasswordContext.js +37 -39
- package/dist/contexts/DownloadContext.js +13 -21
- package/dist/contexts/DropFileZoneContext.js +35 -62
- package/dist/contexts/ElementPageContext.js +114 -139
- package/dist/contexts/ElementThumbnailContext.js +132 -195
- package/dist/contexts/EventCallbackContext.js +19 -34
- package/dist/contexts/FileInputContext.js +30 -49
- package/dist/contexts/FullScreenContext.js +31 -24
- package/dist/contexts/GlobalCurrentPage.js +21 -18
- package/dist/contexts/HighlightContext.js +22 -31
- package/dist/contexts/IconContext.js +9 -11
- package/dist/contexts/IconToolContext.js +14 -11
- package/dist/contexts/InitialStateContext.js +9 -11
- package/dist/contexts/LayerContext.js +9 -8
- package/dist/contexts/LayoutContainerContext.js +12 -16
- package/dist/contexts/LayoutDropFileZoneContext.js +8 -11
- package/dist/contexts/LicenseContext.js +12 -17
- package/dist/contexts/LoaderContext.js +14 -27
- package/dist/contexts/LocalizationContext.js +22 -33
- package/dist/contexts/OtherToolContext.js +17 -17
- package/dist/contexts/PageViewportContext.js +9 -8
- package/dist/contexts/PagesRotateContext.js +42 -43
- package/dist/contexts/PaginationContext.js +2 -40
- package/dist/contexts/PrintContext.js +67 -78
- package/dist/contexts/RPDocumentContext.js +60 -73
- package/dist/contexts/RenderQueueProvider.js +43 -72
- package/dist/contexts/RenderedPagesCache.js +17 -13
- package/dist/contexts/RotationContext.js +27 -38
- package/dist/contexts/ScrollModeContext.js +22 -20
- package/dist/contexts/SearchContext.js +39 -97
- package/dist/contexts/SelectionModeContext.js +22 -23
- package/dist/contexts/SmoothScrollContext.js +18 -16
- package/dist/contexts/ThemeContext.js +5 -7
- package/dist/contexts/ThumbnailsContext.js +26 -43
- package/dist/contexts/ToolComponentContext.js +54 -51
- package/dist/contexts/ToolbarComponentContext.js +48 -47
- package/dist/contexts/ViewModeContext.js +34 -31
- package/dist/contexts/ViewportContext.js +91 -85
- package/dist/contexts/VirtualGridContext.js +17 -14
- package/dist/contexts/VirtualScrollContext.js +42 -52
- package/dist/contexts/ZoomContext.js +95 -107
- package/dist/de_DE--0LF-SJR.js +483 -0
- package/dist/dist-7FA4Do6I.js +1286 -0
- package/dist/dist-BRVqFn7R.js +144 -0
- package/dist/dist-C3WNMuW2.js +29 -0
- package/dist/dist-CKteKPPA.js +947 -0
- package/dist/dist-bK-AHWLF.js +314 -0
- package/dist/lib-BiapEtK1.js +10261 -0
- package/dist/libInjectCss.js +7 -8
- package/dist/main-CHO5p1qM.js +60 -0
- package/dist/main.js +53 -296
- package/dist/style-9n_QpMZt.js +5 -0
- package/dist/useWatermark-CvAAf66v.js +67 -0
- package/dist/utils/Queue.js +40 -46
- package/dist/utils/annotations.js +227 -261
- package/dist/utils/appConsole.js +24 -42
- package/dist/utils/approximateFragtion.js +16 -21
- package/dist/utils/calculatePage.js +29 -20
- package/dist/utils/charators.js +39 -48
- package/dist/utils/const.js +8 -11
- package/dist/utils/constants.js +4 -8
- package/dist/utils/convertPdfDate.js +20 -24
- package/dist/utils/dateFormatter.js +7 -7
- package/dist/utils/elementPagePosition.js +10 -10
- package/dist/utils/formatFileSize.js +17 -8
- package/dist/utils/getElementPositionInPage.js +44 -82
- package/dist/utils/getScrollDistance.js +4 -4
- package/dist/utils/getThumbnailViewport.js +12 -6
- package/dist/utils/getWordPositionInPage.js +24 -24
- package/dist/utils/getZoomLevel.js +16 -23
- package/dist/utils/highlight.js +195 -212
- package/dist/utils/hooks/useCopyText.js +23 -33
- package/dist/utils/hooks/useDarkMode.js +10 -10
- package/dist/utils/hooks/useDarkModeProps.js +9 -10
- package/dist/utils/hooks/useDebounce.js +22 -18
- package/dist/utils/hooks/useDropFileZone.js +13 -11
- package/dist/utils/hooks/useElementSize.js +24 -20
- package/dist/utils/hooks/useFileDownload.js +16 -33
- package/dist/utils/hooks/useFlickerSelectText.js +19 -24
- package/dist/utils/hooks/useFullScreen.js +31 -28
- package/dist/utils/hooks/useGrabScroll.js +52 -51
- package/dist/utils/hooks/useHighlight.js +92 -92
- package/dist/utils/hooks/useInfiniteScroll.js +17 -18
- package/dist/utils/hooks/useLicense.js +113 -135
- package/dist/utils/hooks/useLoadPdf.js +107 -96
- package/dist/utils/hooks/useLoadWorker.js +13 -15
- package/dist/utils/hooks/useLocalization.js +25 -25
- package/dist/utils/hooks/useMousePressed.js +25 -19
- package/dist/utils/hooks/usePageRotateContext.js +25 -41
- package/dist/utils/hooks/usePaginate.js +2 -38
- package/dist/utils/hooks/usePdfProperties.js +38 -36
- package/dist/utils/hooks/usePinch.js +65 -100
- package/dist/utils/hooks/usePresentPage.js +69 -92
- package/dist/utils/hooks/usePrint.js +167 -178
- package/dist/utils/hooks/useRequestAnimationFrame.js +16 -16
- package/dist/utils/hooks/useResizeObserver.js +18 -21
- package/dist/utils/hooks/useRotate.js +15 -27
- package/dist/utils/hooks/useScrollToPage.js +2 -38
- package/dist/utils/hooks/useSearch.js +125 -163
- package/dist/utils/hooks/useTextSelection.js +69 -75
- package/dist/utils/hooks/useThumbnail.js +42 -59
- package/dist/utils/hooks/useVirtualReactWindow.js +85 -96
- package/dist/utils/hooks/useWatermark.js +2 -78
- package/dist/utils/injectPrintCSS.js +6 -21
- package/dist/utils/link_service.js +59 -137
- package/dist/utils/renderPage.js +20 -19
- package/dist/utils/sanitizeExternalUrl.js +12 -15
- package/dist/utils/smoothScrollTo.js +8 -5
- package/dist/utils/types.js +29 -21
- package/dist/utils/withRef.js +7 -7
- package/dist/utils/zoom.js +5 -6
- package/package.json +7 -7
- package/dist/Combination-17ab8af1.js +0 -698
- package/dist/MostPageTool.module-13578ad6.js +0 -6
- package/dist/OtherTool.module-a4be5f1f.js +0 -6
- package/dist/Paginate.module-4eef00aa.js +0 -8
- package/dist/PaginationContext-87f832f2.js +0 -233
- package/dist/RPLayout.module-92fa19f7.js +0 -14
- package/dist/RPSplitter-b62772f9.js +0 -122
- package/dist/RPToolbar.module-27d7fe77.js +0 -10
- package/dist/RotateTool.module-67946714.js +0 -6
- package/dist/SearchTool.module-99f60dc7.js +0 -16
- package/dist/ToolbarLayout.module-6e339802.js +0 -12
- package/dist/ZoomTool.module-7082af8c.js +0 -12
- package/dist/assets/style.css +0 -1
- package/dist/clsx-0c6e471a.js +0 -22
- package/dist/de_DE-8145915f.js +0 -489
- package/dist/index-113053cf.js +0 -309
- package/dist/index-11f3cd64.js +0 -983
- package/dist/index-23911b43.js +0 -150
- package/dist/index-ada501c4.js +0 -27
- package/dist/index-d0f0aa9a.js +0 -1542
- package/dist/index-e04c91b1.js +0 -11671
|
@@ -1,1082 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { useVirtualReactWindow as pt } from "../utils/hooks/useVirtualReactWindow.js";
|
|
5
|
-
import { useVirtualScrollContext as ht } from "../contexts/VirtualScrollContext.js";
|
|
6
|
-
import { a as gt, u as vt } from "../PaginationContext-87f832f2.js";
|
|
7
|
-
import { useDocumentContext as _t } from "../contexts/RPDocumentContext.js";
|
|
8
|
-
import { useViewModeContext as wt } from "../contexts/ViewModeContext.js";
|
|
9
|
-
import { useScrollModeContext as Ct } from "../contexts/ScrollModeContext.js";
|
|
10
|
-
import { SelectionMode as St, ViewMode as Re, ScrollMode as xe, ErrorType as ye } from "../utils/types.js";
|
|
11
|
-
import { useFullScreenContext as It } from "../contexts/FullScreenContext.js";
|
|
12
|
-
import { c as ue } from "../clsx-0c6e471a.js";
|
|
13
|
-
import { DualPage as Tt } from "./page/DualPage.js";
|
|
14
|
-
import { DualPageWithCover as Rt } from "./page/DualPageWithCover.js";
|
|
15
|
-
import { SinglePage as xt } from "./page/SinglePage.js";
|
|
16
|
-
import { useMousePressed as yt } from "../utils/hooks/useMousePressed.js";
|
|
17
|
-
import { useSelectionModeContext as bt } from "../contexts/SelectionModeContext.js";
|
|
18
|
-
import { useGrabScroll as zt } from "../utils/hooks/useGrabScroll.js";
|
|
19
|
-
import { usePinch as Lt } from "../utils/hooks/usePinch.js";
|
|
20
|
-
import { useInitialStateContext as Mt } from "../contexts/InitialStateContext.js";
|
|
21
|
-
import { useLayoutContainer as Et } from "../contexts/LayoutContainerContext.js";
|
|
22
|
-
import { useDebounce as Ot } from "../utils/hooks/useDebounce.js";
|
|
23
|
-
import { useLoaderContext as Pt } from "../contexts/LoaderContext.js";
|
|
24
|
-
import Nt from "./ui/PasswordModal.js";
|
|
25
|
-
import { usePresentPage as Wt } from "../utils/hooks/usePresentPage.js";
|
|
26
|
-
import { getPageFromPosition as At } from "../utils/calculatePage.js";
|
|
27
|
-
import { useDocumentPasswordContext as Ft } from "../contexts/DocumentPasswordContext.js";
|
|
28
|
-
import { LayoutContainer as Dt } from "./layout/LayoutContainer.js";
|
|
29
|
-
import { LayoutWrapper as Ht } from "./layout/LayoutWrapper.js";
|
|
30
|
-
import { useEventCallbackContext as kt } from "../contexts/EventCallbackContext.js";
|
|
31
|
-
import { useCopyText as Ut } from "../utils/hooks/useCopyText.js";
|
|
32
|
-
import { useTextSelection as Vt } from "../utils/hooks/useTextSelection.js";
|
|
33
|
-
import { OutputScale as qt } from "pdfjs-dist";
|
|
34
|
-
import { approximateFraction as Ae } from "../utils/approximateFragtion.js";
|
|
35
|
-
import "./page/CanvasLayer.js";
|
|
36
|
-
import "../contexts/ZoomContext.js";
|
|
37
|
-
import "../utils/appConsole.js";
|
|
38
|
-
import "../utils/constants.js";
|
|
39
|
-
import "../utils/getZoomLevel.js";
|
|
40
|
-
import "../de_DE-8145915f.js";
|
|
41
|
-
import "../contexts/RotationContext.js";
|
|
42
|
-
import "../utils/hooks/useLoadPdf.js";
|
|
43
|
-
import "../utils/getThumbnailViewport.js";
|
|
44
|
-
import "../contexts/ConfigContext.js";
|
|
45
|
-
import "../utils/const.js";
|
|
46
|
-
import "../utils/hooks/usePdfProperties.js";
|
|
47
|
-
import "../utils/convertPdfDate.js";
|
|
48
|
-
import "../utils/formatFileSize.js";
|
|
49
|
-
import "../contexts/GlobalCurrentPage.js";
|
|
50
|
-
import "../contexts/PagesRotateContext.js";
|
|
51
|
-
import "../contexts/RenderQueueProvider.js";
|
|
52
|
-
import "../utils/Queue.js";
|
|
53
|
-
import "../utils/renderPage.js";
|
|
54
|
-
import "../contexts/VirtualGridContext.js";
|
|
55
|
-
import "../utils/smoothScrollTo.js";
|
|
56
|
-
import "../contexts/DimensionPagesContext.js";
|
|
57
|
-
import "../contexts/SmoothScrollContext.js";
|
|
58
|
-
import "../utils/getScrollDistance.js";
|
|
59
|
-
import "./page/TextLayer.js";
|
|
60
|
-
import "../utils/highlight.js";
|
|
61
|
-
import "../utils/charators.js";
|
|
62
|
-
import "../contexts/SearchContext.js";
|
|
63
|
-
import "../utils/hooks/useSearch.js";
|
|
64
|
-
import "../utils/getWordPositionInPage.js";
|
|
65
|
-
import "./page/AnnotationLayer.js";
|
|
66
|
-
import "../contexts/PrintContext.js";
|
|
67
|
-
import "../utils/hooks/usePrint.js";
|
|
68
|
-
import "../utils/link_service.js";
|
|
69
|
-
import "../utils/annotations.js";
|
|
70
|
-
import "../utils/sanitizeExternalUrl.js";
|
|
71
|
-
import "../utils/dateFormatter.js";
|
|
72
|
-
import "../utils/hooks/useFileDownload.js";
|
|
73
|
-
import "../contexts/DownloadContext.js";
|
|
74
|
-
import "../contexts/LayerContext.js";
|
|
75
|
-
import "./page/TextHighlightLayer.js";
|
|
76
|
-
import "../contexts/HighlightContext.js";
|
|
77
|
-
import "../utils/hooks/useHighlight.js";
|
|
78
|
-
import "./page/searchHighlight.js";
|
|
79
|
-
import "./page/CustomElement.js";
|
|
80
|
-
import "../contexts/ElementPageContext.js";
|
|
81
|
-
import "../contexts/LicenseContext.js";
|
|
82
|
-
import "../utils/hooks/useLicense.js";
|
|
83
|
-
import "../utils/getElementPositionInPage.js";
|
|
84
|
-
import "../utils/withRef.js";
|
|
85
|
-
import "./icons/LoaderIcon.js";
|
|
86
|
-
import "../utils/hooks/useFullScreen.js";
|
|
87
|
-
import "../contexts/LocalizationContext.js";
|
|
88
|
-
import "../utils/hooks/useLocalization.js";
|
|
89
|
-
import "../RPLayout.module-92fa19f7.js";
|
|
90
|
-
import "../contexts/ThemeContext.js";
|
|
91
|
-
import "../contexts/DarkModeContext.js";
|
|
92
|
-
import "../utils/hooks/useDarkMode.js";
|
|
93
|
-
const F = {
|
|
94
|
-
"rp-pages": "_rp-pages_fn8tz_1",
|
|
95
|
-
"rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_fn8tz_6",
|
|
96
|
-
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_fn8tz_11",
|
|
97
|
-
"rp-not-supported-list": "_rp-not-supported-list_fn8tz_15",
|
|
98
|
-
"rp-pages-container": "_rp-pages-container_fn8tz_23",
|
|
99
|
-
"rp-viewer": "_rp-viewer_fn8tz_65",
|
|
100
|
-
"rp-cursor-grab": "_rp-cursor-grab_fn8tz_70",
|
|
101
|
-
"rp-cursor-grabbing": "_rp-cursor-grabbing_fn8tz_78",
|
|
102
|
-
"rp-loader": "_rp-loader_fn8tz_86",
|
|
103
|
-
"rp-not-supported": "_rp-not-supported_fn8tz_15",
|
|
104
|
-
"rp-not-supported-content": "_rp-not-supported-content_fn8tz_102",
|
|
105
|
-
"rp-load-error": "_rp-load-error_fn8tz_108",
|
|
106
|
-
"rp-load-error-message": "_rp-load-error-message_fn8tz_116"
|
|
107
|
-
};
|
|
108
|
-
function Ee() {
|
|
109
|
-
return Ee = Object.assign ? Object.assign.bind() : function(n) {
|
|
110
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
111
|
-
var t = arguments[e];
|
|
112
|
-
for (var r in t)
|
|
113
|
-
({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
114
|
-
}
|
|
115
|
-
return n;
|
|
116
|
-
}, Ee.apply(null, arguments);
|
|
117
|
-
}
|
|
118
|
-
function Fe(n) {
|
|
119
|
-
if (n === void 0)
|
|
120
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
121
|
-
return n;
|
|
122
|
-
}
|
|
123
|
-
function Oe(n, e) {
|
|
124
|
-
return Oe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
|
|
125
|
-
return t.__proto__ = r, t;
|
|
126
|
-
}, Oe(n, e);
|
|
127
|
-
}
|
|
128
|
-
function Gt(n, e) {
|
|
129
|
-
n.prototype = Object.create(e.prototype), n.prototype.constructor = n, Oe(n, e);
|
|
130
|
-
}
|
|
131
|
-
var De = Number.isNaN || function(e) {
|
|
132
|
-
return typeof e == "number" && e !== e;
|
|
133
|
-
};
|
|
134
|
-
function $t(n, e) {
|
|
135
|
-
return !!(n === e || De(n) && De(e));
|
|
136
|
-
}
|
|
137
|
-
function jt(n, e) {
|
|
138
|
-
if (n.length !== e.length)
|
|
139
|
-
return !1;
|
|
140
|
-
for (var t = 0; t < n.length; t++)
|
|
141
|
-
if (!$t(n[t], e[t]))
|
|
142
|
-
return !1;
|
|
143
|
-
return !0;
|
|
144
|
-
}
|
|
145
|
-
function be(n, e) {
|
|
146
|
-
e === void 0 && (e = jt);
|
|
147
|
-
var t, r = [], s, l = !1;
|
|
148
|
-
function a() {
|
|
149
|
-
for (var c = [], u = 0; u < arguments.length; u++)
|
|
150
|
-
c[u] = arguments[u];
|
|
151
|
-
return l && t === this && e(c, r) || (s = n.apply(this, c), l = !0, t = this, r = c), s;
|
|
152
|
-
}
|
|
153
|
-
return a;
|
|
154
|
-
}
|
|
155
|
-
function He(n, e) {
|
|
156
|
-
if (n == null)
|
|
157
|
-
return {};
|
|
158
|
-
var t = {};
|
|
159
|
-
for (var r in n)
|
|
160
|
-
if ({}.hasOwnProperty.call(n, r)) {
|
|
161
|
-
if (e.indexOf(r) !== -1)
|
|
162
|
-
continue;
|
|
163
|
-
t[r] = n[r];
|
|
164
|
-
}
|
|
165
|
-
return t;
|
|
166
|
-
}
|
|
167
|
-
var Bt = typeof performance == "object" && typeof performance.now == "function", ke = Bt ? function() {
|
|
168
|
-
return performance.now();
|
|
169
|
-
} : function() {
|
|
170
|
-
return Date.now();
|
|
171
|
-
};
|
|
172
|
-
function Ue(n) {
|
|
173
|
-
cancelAnimationFrame(n.id);
|
|
174
|
-
}
|
|
175
|
-
function Kt(n, e) {
|
|
176
|
-
var t = ke();
|
|
177
|
-
function r() {
|
|
178
|
-
ke() - t >= e ? n.call(null) : s.id = requestAnimationFrame(r);
|
|
179
|
-
}
|
|
180
|
-
var s = {
|
|
181
|
-
id: requestAnimationFrame(r)
|
|
182
|
-
};
|
|
183
|
-
return s;
|
|
184
|
-
}
|
|
185
|
-
var ze = -1;
|
|
186
|
-
function Zt(n) {
|
|
187
|
-
if (n === void 0 && (n = !1), ze === -1 || n) {
|
|
188
|
-
var e = document.createElement("div"), t = e.style;
|
|
189
|
-
t.width = "50px", t.height = "50px", t.overflow = "scroll", document.body.appendChild(e), ze = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
190
|
-
}
|
|
191
|
-
return ze;
|
|
192
|
-
}
|
|
193
|
-
var oe = null;
|
|
194
|
-
function Ve(n) {
|
|
195
|
-
if (n === void 0 && (n = !1), oe === null || n) {
|
|
196
|
-
var e = document.createElement("div"), t = e.style;
|
|
197
|
-
t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
|
|
198
|
-
var r = document.createElement("div"), s = r.style;
|
|
199
|
-
return s.width = "100px", s.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ? oe = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? oe = "negative" : oe = "positive-ascending"), document.body.removeChild(e), oe;
|
|
200
|
-
}
|
|
201
|
-
return oe;
|
|
202
|
-
}
|
|
203
|
-
var Jt = 150, Qt = function(e) {
|
|
204
|
-
var t = e.columnIndex;
|
|
205
|
-
e.data;
|
|
206
|
-
var r = e.rowIndex;
|
|
207
|
-
return r + ":" + t;
|
|
208
|
-
}, me = null, pe = null, he = null;
|
|
209
|
-
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (me = /* @__PURE__ */ new WeakSet(), pe = /* @__PURE__ */ new WeakSet(), he = /* @__PURE__ */ new WeakSet());
|
|
210
|
-
function Xt(n) {
|
|
211
|
-
var e, t = n.getColumnOffset, r = n.getColumnStartIndexForOffset, s = n.getColumnStopIndexForStartIndex, l = n.getColumnWidth, a = n.getEstimatedTotalHeight, c = n.getEstimatedTotalWidth, u = n.getOffsetForColumnAndAlignment, g = n.getOffsetForRowAndAlignment, h = n.getRowHeight, I = n.getRowOffset, i = n.getRowStartIndexForOffset, L = n.getRowStopIndexForStartIndex, T = n.initInstanceProps, R = n.shouldResetStyleCacheOnItemSizeChange, H = n.validateProps;
|
|
212
|
-
return e = /* @__PURE__ */ function(M) {
|
|
213
|
-
Gt(b, M);
|
|
214
|
-
function b(N) {
|
|
215
|
-
var o;
|
|
216
|
-
return o = M.call(this, N) || this, o._instanceProps = T(o.props, Fe(o)), o._resetIsScrollingTimeoutId = null, o._outerRef = void 0, o.state = {
|
|
217
|
-
instance: Fe(o),
|
|
218
|
-
isScrolling: !1,
|
|
219
|
-
horizontalScrollDirection: "forward",
|
|
220
|
-
scrollLeft: typeof o.props.initialScrollLeft == "number" ? o.props.initialScrollLeft : 0,
|
|
221
|
-
scrollTop: typeof o.props.initialScrollTop == "number" ? o.props.initialScrollTop : 0,
|
|
222
|
-
scrollUpdateWasRequested: !1,
|
|
223
|
-
verticalScrollDirection: "forward"
|
|
224
|
-
}, o._callOnItemsRendered = void 0, o._callOnItemsRendered = be(function(f, d, m, C, p, S, O, P) {
|
|
225
|
-
return o.props.onItemsRendered({
|
|
226
|
-
overscanColumnStartIndex: f,
|
|
227
|
-
overscanColumnStopIndex: d,
|
|
228
|
-
overscanRowStartIndex: m,
|
|
229
|
-
overscanRowStopIndex: C,
|
|
230
|
-
visibleColumnStartIndex: p,
|
|
231
|
-
visibleColumnStopIndex: S,
|
|
232
|
-
visibleRowStartIndex: O,
|
|
233
|
-
visibleRowStopIndex: P
|
|
234
|
-
});
|
|
235
|
-
}), o._callOnScroll = void 0, o._callOnScroll = be(function(f, d, m, C, p) {
|
|
236
|
-
return o.props.onScroll({
|
|
237
|
-
horizontalScrollDirection: m,
|
|
238
|
-
scrollLeft: f,
|
|
239
|
-
scrollTop: d,
|
|
240
|
-
verticalScrollDirection: C,
|
|
241
|
-
scrollUpdateWasRequested: p
|
|
242
|
-
});
|
|
243
|
-
}), o._getItemStyle = void 0, o._getItemStyle = function(f, d) {
|
|
244
|
-
var m = o.props, C = m.columnWidth, p = m.direction, S = m.rowHeight, O = o._getItemStyleCache(R && C, R && p, R && S), P = f + ":" + d, x;
|
|
245
|
-
if (O.hasOwnProperty(P))
|
|
246
|
-
x = O[P];
|
|
247
|
-
else {
|
|
248
|
-
var z = t(o.props, d, o._instanceProps), y = p === "rtl";
|
|
249
|
-
O[P] = x = {
|
|
250
|
-
position: "absolute",
|
|
251
|
-
left: y ? void 0 : z,
|
|
252
|
-
right: y ? z : void 0,
|
|
253
|
-
top: I(o.props, f, o._instanceProps),
|
|
254
|
-
height: h(o.props, f, o._instanceProps),
|
|
255
|
-
width: l(o.props, d, o._instanceProps)
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
return x;
|
|
259
|
-
}, o._getItemStyleCache = void 0, o._getItemStyleCache = be(function(f, d, m) {
|
|
260
|
-
return {};
|
|
261
|
-
}), o._onScroll = function(f) {
|
|
262
|
-
var d = f.currentTarget, m = d.clientHeight, C = d.clientWidth, p = d.scrollLeft, S = d.scrollTop, O = d.scrollHeight, P = d.scrollWidth;
|
|
263
|
-
o.setState(function(x) {
|
|
264
|
-
if (x.scrollLeft === p && x.scrollTop === S)
|
|
265
|
-
return null;
|
|
266
|
-
var z = o.props.direction, y = p;
|
|
267
|
-
if (z === "rtl")
|
|
268
|
-
switch (Ve()) {
|
|
269
|
-
case "negative":
|
|
270
|
-
y = -p;
|
|
271
|
-
break;
|
|
272
|
-
case "positive-descending":
|
|
273
|
-
y = P - C - p;
|
|
274
|
-
break;
|
|
275
|
-
}
|
|
276
|
-
y = Math.max(0, Math.min(y, P - C));
|
|
277
|
-
var W = Math.max(0, Math.min(S, O - m));
|
|
278
|
-
return {
|
|
279
|
-
isScrolling: !0,
|
|
280
|
-
horizontalScrollDirection: x.scrollLeft < p ? "forward" : "backward",
|
|
281
|
-
scrollLeft: y,
|
|
282
|
-
scrollTop: W,
|
|
283
|
-
verticalScrollDirection: x.scrollTop < S ? "forward" : "backward",
|
|
284
|
-
scrollUpdateWasRequested: !1
|
|
285
|
-
};
|
|
286
|
-
}, o._resetIsScrollingDebounced);
|
|
287
|
-
}, o._outerRefSetter = function(f) {
|
|
288
|
-
var d = o.props.outerRef;
|
|
289
|
-
o._outerRef = f, typeof d == "function" ? d(f) : d != null && typeof d == "object" && d.hasOwnProperty("current") && (d.current = f);
|
|
290
|
-
}, o._resetIsScrollingDebounced = function() {
|
|
291
|
-
o._resetIsScrollingTimeoutId !== null && Ue(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = Kt(o._resetIsScrolling, Jt);
|
|
292
|
-
}, o._resetIsScrolling = function() {
|
|
293
|
-
o._resetIsScrollingTimeoutId = null, o.setState({
|
|
294
|
-
isScrolling: !1
|
|
295
|
-
}, function() {
|
|
296
|
-
o._getItemStyleCache(-1);
|
|
297
|
-
});
|
|
298
|
-
}, o;
|
|
299
|
-
}
|
|
300
|
-
b.getDerivedStateFromProps = function(o, f) {
|
|
301
|
-
return Yt(o, f), H(o), null;
|
|
302
|
-
};
|
|
303
|
-
var E = b.prototype;
|
|
304
|
-
return E.scrollTo = function(o) {
|
|
305
|
-
var f = o.scrollLeft, d = o.scrollTop;
|
|
306
|
-
f !== void 0 && (f = Math.max(0, f)), d !== void 0 && (d = Math.max(0, d)), this.setState(function(m) {
|
|
307
|
-
return f === void 0 && (f = m.scrollLeft), d === void 0 && (d = m.scrollTop), m.scrollLeft === f && m.scrollTop === d ? null : {
|
|
308
|
-
horizontalScrollDirection: m.scrollLeft < f ? "forward" : "backward",
|
|
309
|
-
scrollLeft: f,
|
|
310
|
-
scrollTop: d,
|
|
311
|
-
scrollUpdateWasRequested: !0,
|
|
312
|
-
verticalScrollDirection: m.scrollTop < d ? "forward" : "backward"
|
|
313
|
-
};
|
|
314
|
-
}, this._resetIsScrollingDebounced);
|
|
315
|
-
}, E.scrollToItem = function(o) {
|
|
316
|
-
var f = o.align, d = f === void 0 ? "auto" : f, m = o.columnIndex, C = o.rowIndex, p = this.props, S = p.columnCount, O = p.height, P = p.rowCount, x = p.width, z = this.state, y = z.scrollLeft, W = z.scrollTop, k = Zt();
|
|
317
|
-
m !== void 0 && (m = Math.max(0, Math.min(m, S - 1))), C !== void 0 && (C = Math.max(0, Math.min(C, P - 1)));
|
|
318
|
-
var U = a(this.props, this._instanceProps), A = c(this.props, this._instanceProps), G = A > x ? k : 0, D = U > O ? k : 0;
|
|
319
|
-
this.scrollTo({
|
|
320
|
-
scrollLeft: m !== void 0 ? u(this.props, m, d, y, this._instanceProps, D) : y,
|
|
321
|
-
scrollTop: C !== void 0 ? g(this.props, C, d, W, this._instanceProps, G) : W
|
|
322
|
-
});
|
|
323
|
-
}, E.componentDidMount = function() {
|
|
324
|
-
var o = this.props, f = o.initialScrollLeft, d = o.initialScrollTop;
|
|
325
|
-
if (this._outerRef != null) {
|
|
326
|
-
var m = this._outerRef;
|
|
327
|
-
typeof f == "number" && (m.scrollLeft = f), typeof d == "number" && (m.scrollTop = d);
|
|
328
|
-
}
|
|
329
|
-
this._callPropsCallbacks();
|
|
330
|
-
}, E.componentDidUpdate = function() {
|
|
331
|
-
var o = this.props.direction, f = this.state, d = f.scrollLeft, m = f.scrollTop, C = f.scrollUpdateWasRequested;
|
|
332
|
-
if (C && this._outerRef != null) {
|
|
333
|
-
var p = this._outerRef;
|
|
334
|
-
if (o === "rtl")
|
|
335
|
-
switch (Ve()) {
|
|
336
|
-
case "negative":
|
|
337
|
-
p.scrollLeft = -d;
|
|
338
|
-
break;
|
|
339
|
-
case "positive-ascending":
|
|
340
|
-
p.scrollLeft = d;
|
|
341
|
-
break;
|
|
342
|
-
default:
|
|
343
|
-
var S = p.clientWidth, O = p.scrollWidth;
|
|
344
|
-
p.scrollLeft = O - S - d;
|
|
345
|
-
break;
|
|
346
|
-
}
|
|
347
|
-
else
|
|
348
|
-
p.scrollLeft = Math.max(0, d);
|
|
349
|
-
p.scrollTop = Math.max(0, m);
|
|
350
|
-
}
|
|
351
|
-
this._callPropsCallbacks();
|
|
352
|
-
}, E.componentWillUnmount = function() {
|
|
353
|
-
this._resetIsScrollingTimeoutId !== null && Ue(this._resetIsScrollingTimeoutId);
|
|
354
|
-
}, E.render = function() {
|
|
355
|
-
var o = this.props, f = o.children, d = o.className, m = o.columnCount, C = o.direction, p = o.height, S = o.innerRef, O = o.innerElementType, P = o.innerTagName, x = o.itemData, z = o.itemKey, y = z === void 0 ? Qt : z, W = o.outerElementType, k = o.outerTagName, U = o.rowCount, A = o.style, G = o.useIsScrolling, D = o.width, V = this.state.isScrolling, te = this._getHorizontalRangeToRender(), re = te[0], ae = te[1], ne = this._getVerticalRangeToRender(), J = ne[0], ge = ne[1], Q = [];
|
|
356
|
-
if (m > 0 && U)
|
|
357
|
-
for (var $ = J; $ <= ge; $++)
|
|
358
|
-
for (var j = re; j <= ae; j++)
|
|
359
|
-
Q.push(fe(f, {
|
|
360
|
-
columnIndex: j,
|
|
361
|
-
data: x,
|
|
362
|
-
isScrolling: G ? V : void 0,
|
|
363
|
-
key: y({
|
|
364
|
-
columnIndex: j,
|
|
365
|
-
data: x,
|
|
366
|
-
rowIndex: $
|
|
367
|
-
}),
|
|
368
|
-
rowIndex: $,
|
|
369
|
-
style: this._getItemStyle($, j)
|
|
370
|
-
}));
|
|
371
|
-
var le = a(this.props, this._instanceProps), ce = c(this.props, this._instanceProps);
|
|
372
|
-
return fe(W || k || "div", {
|
|
373
|
-
className: d,
|
|
374
|
-
onScroll: this._onScroll,
|
|
375
|
-
ref: this._outerRefSetter,
|
|
376
|
-
style: Ee({
|
|
377
|
-
position: "relative",
|
|
378
|
-
height: p,
|
|
379
|
-
width: D,
|
|
380
|
-
overflow: "auto",
|
|
381
|
-
WebkitOverflowScrolling: "touch",
|
|
382
|
-
willChange: "transform",
|
|
383
|
-
direction: C
|
|
384
|
-
}, A)
|
|
385
|
-
}, fe(O || P || "div", {
|
|
386
|
-
children: Q,
|
|
387
|
-
ref: S,
|
|
388
|
-
style: {
|
|
389
|
-
height: le,
|
|
390
|
-
pointerEvents: V ? "none" : void 0,
|
|
391
|
-
width: ce
|
|
392
|
-
}
|
|
393
|
-
}));
|
|
394
|
-
}, E._callPropsCallbacks = function() {
|
|
395
|
-
var o = this.props, f = o.columnCount, d = o.onItemsRendered, m = o.onScroll, C = o.rowCount;
|
|
396
|
-
if (typeof d == "function" && f > 0 && C > 0) {
|
|
397
|
-
var p = this._getHorizontalRangeToRender(), S = p[0], O = p[1], P = p[2], x = p[3], z = this._getVerticalRangeToRender(), y = z[0], W = z[1], k = z[2], U = z[3];
|
|
398
|
-
this._callOnItemsRendered(S, O, y, W, P, x, k, U);
|
|
399
|
-
}
|
|
400
|
-
if (typeof m == "function") {
|
|
401
|
-
var A = this.state, G = A.horizontalScrollDirection, D = A.scrollLeft, V = A.scrollTop, te = A.scrollUpdateWasRequested, re = A.verticalScrollDirection;
|
|
402
|
-
this._callOnScroll(D, V, G, re, te);
|
|
403
|
-
}
|
|
404
|
-
}, E._getHorizontalRangeToRender = function() {
|
|
405
|
-
var o = this.props, f = o.columnCount, d = o.overscanColumnCount, m = o.overscanColumnsCount, C = o.overscanCount, p = o.rowCount, S = this.state, O = S.horizontalScrollDirection, P = S.isScrolling, x = S.scrollLeft, z = d || m || C || 1;
|
|
406
|
-
if (f === 0 || p === 0)
|
|
407
|
-
return [0, 0, 0, 0];
|
|
408
|
-
var y = r(this.props, x, this._instanceProps), W = s(this.props, y, x, this._instanceProps), k = !P || O === "backward" ? Math.max(1, z) : 1, U = !P || O === "forward" ? Math.max(1, z) : 1;
|
|
409
|
-
return [Math.max(0, y - k), Math.max(0, Math.min(f - 1, W + U)), y, W];
|
|
410
|
-
}, E._getVerticalRangeToRender = function() {
|
|
411
|
-
var o = this.props, f = o.columnCount, d = o.overscanCount, m = o.overscanRowCount, C = o.overscanRowsCount, p = o.rowCount, S = this.state, O = S.isScrolling, P = S.verticalScrollDirection, x = S.scrollTop, z = m || C || d || 1;
|
|
412
|
-
if (f === 0 || p === 0)
|
|
413
|
-
return [0, 0, 0, 0];
|
|
414
|
-
var y = i(this.props, x, this._instanceProps), W = L(this.props, y, x, this._instanceProps), k = !O || P === "backward" ? Math.max(1, z) : 1, U = !O || P === "forward" ? Math.max(1, z) : 1;
|
|
415
|
-
return [Math.max(0, y - k), Math.max(0, Math.min(p - 1, W + U)), y, W];
|
|
416
|
-
}, b;
|
|
417
|
-
}(dt), e.defaultProps = {
|
|
418
|
-
direction: "ltr",
|
|
419
|
-
itemData: void 0,
|
|
420
|
-
useIsScrolling: !1
|
|
421
|
-
}, e;
|
|
422
|
-
}
|
|
423
|
-
var Yt = function(e, t) {
|
|
424
|
-
var r = e.children, s = e.direction, l = e.height, a = e.innerTagName, c = e.outerTagName, u = e.overscanColumnsCount, g = e.overscanCount, h = e.overscanRowsCount, I = e.width, i = t.instance;
|
|
425
|
-
if (process.env.NODE_ENV !== "production") {
|
|
426
|
-
if (typeof g == "number" && me && !me.has(i) && (me.add(i), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof u == "number" || typeof h == "number") && pe && !pe.has(i) && (pe.add(i), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (a != null || c != null) && he && !he.has(i) && (he.add(i), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
|
|
427
|
-
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
|
|
428
|
-
switch (s) {
|
|
429
|
-
case "ltr":
|
|
430
|
-
case "rtl":
|
|
431
|
-
break;
|
|
432
|
-
default:
|
|
433
|
-
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + s + '" was specified.'));
|
|
434
|
-
}
|
|
435
|
-
if (typeof I != "number")
|
|
436
|
-
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (I === null ? "null" : typeof I) + '" was specified.'));
|
|
437
|
-
if (typeof l != "number")
|
|
438
|
-
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (l === null ? "null" : typeof l) + '" was specified.'));
|
|
439
|
-
}
|
|
440
|
-
}, qe = 50, Je = function(e, t) {
|
|
441
|
-
var r = e.rowCount, s = t.rowMetadataMap, l = t.estimatedRowHeight, a = t.lastMeasuredRowIndex, c = 0;
|
|
442
|
-
if (a >= r && (a = r - 1), a >= 0) {
|
|
443
|
-
var u = s[a];
|
|
444
|
-
c = u.offset + u.size;
|
|
445
|
-
}
|
|
446
|
-
var g = r - a - 1, h = g * l;
|
|
447
|
-
return c + h;
|
|
448
|
-
}, Qe = function(e, t) {
|
|
449
|
-
var r = e.columnCount, s = t.columnMetadataMap, l = t.estimatedColumnWidth, a = t.lastMeasuredColumnIndex, c = 0;
|
|
450
|
-
if (a >= r && (a = r - 1), a >= 0) {
|
|
451
|
-
var u = s[a];
|
|
452
|
-
c = u.offset + u.size;
|
|
453
|
-
}
|
|
454
|
-
var g = r - a - 1, h = g * l;
|
|
455
|
-
return c + h;
|
|
456
|
-
}, Z = function(e, t, r, s) {
|
|
457
|
-
var l, a, c;
|
|
458
|
-
if (e === "column" ? (l = s.columnMetadataMap, a = t.columnWidth, c = s.lastMeasuredColumnIndex) : (l = s.rowMetadataMap, a = t.rowHeight, c = s.lastMeasuredRowIndex), r > c) {
|
|
459
|
-
var u = 0;
|
|
460
|
-
if (c >= 0) {
|
|
461
|
-
var g = l[c];
|
|
462
|
-
u = g.offset + g.size;
|
|
463
|
-
}
|
|
464
|
-
for (var h = c + 1; h <= r; h++) {
|
|
465
|
-
var I = a(h);
|
|
466
|
-
l[h] = {
|
|
467
|
-
offset: u,
|
|
468
|
-
size: I
|
|
469
|
-
}, u += I;
|
|
470
|
-
}
|
|
471
|
-
e === "column" ? s.lastMeasuredColumnIndex = r : s.lastMeasuredRowIndex = r;
|
|
472
|
-
}
|
|
473
|
-
return l[r];
|
|
474
|
-
}, Ge = function(e, t, r, s) {
|
|
475
|
-
var l, a;
|
|
476
|
-
e === "column" ? (l = r.columnMetadataMap, a = r.lastMeasuredColumnIndex) : (l = r.rowMetadataMap, a = r.lastMeasuredRowIndex);
|
|
477
|
-
var c = a > 0 ? l[a].offset : 0;
|
|
478
|
-
return c >= s ? Xe(e, t, r, a, 0, s) : er(e, t, r, Math.max(0, a), s);
|
|
479
|
-
}, Xe = function(e, t, r, s, l, a) {
|
|
480
|
-
for (; l <= s; ) {
|
|
481
|
-
var c = l + Math.floor((s - l) / 2), u = Z(e, t, c, r).offset;
|
|
482
|
-
if (u === a)
|
|
483
|
-
return c;
|
|
484
|
-
u < a ? l = c + 1 : u > a && (s = c - 1);
|
|
485
|
-
}
|
|
486
|
-
return l > 0 ? l - 1 : 0;
|
|
487
|
-
}, er = function(e, t, r, s, l) {
|
|
488
|
-
for (var a = e === "column" ? t.columnCount : t.rowCount, c = 1; s < a && Z(e, t, s, r).offset < l; )
|
|
489
|
-
s += c, c *= 2;
|
|
490
|
-
return Xe(e, t, r, Math.min(s, a - 1), Math.floor(s / 2), l);
|
|
491
|
-
}, $e = function(e, t, r, s, l, a, c) {
|
|
492
|
-
var u = e === "column" ? t.width : t.height, g = Z(e, t, r, a), h = e === "column" ? Qe(t, a) : Je(t, a), I = Math.max(0, Math.min(h - u, g.offset)), i = Math.max(0, g.offset - u + c + g.size);
|
|
493
|
-
switch (s === "smart" && (l >= i - u && l <= I + u ? s = "auto" : s = "center"), s) {
|
|
494
|
-
case "start":
|
|
495
|
-
return I;
|
|
496
|
-
case "end":
|
|
497
|
-
return i;
|
|
498
|
-
case "center":
|
|
499
|
-
return Math.round(i + (I - i) / 2);
|
|
500
|
-
case "auto":
|
|
501
|
-
default:
|
|
502
|
-
return l >= i && l <= I ? l : i > I || l < i ? i : I;
|
|
503
|
-
}
|
|
504
|
-
}, tr = /* @__PURE__ */ Xt({
|
|
505
|
-
getColumnOffset: function(e, t, r) {
|
|
506
|
-
return Z("column", e, t, r).offset;
|
|
507
|
-
},
|
|
508
|
-
getColumnStartIndexForOffset: function(e, t, r) {
|
|
509
|
-
return Ge("column", e, r, t);
|
|
510
|
-
},
|
|
511
|
-
getColumnStopIndexForStartIndex: function(e, t, r, s) {
|
|
512
|
-
for (var l = e.columnCount, a = e.width, c = Z("column", e, t, s), u = r + a, g = c.offset + c.size, h = t; h < l - 1 && g < u; )
|
|
513
|
-
h++, g += Z("column", e, h, s).size;
|
|
514
|
-
return h;
|
|
515
|
-
},
|
|
516
|
-
getColumnWidth: function(e, t, r) {
|
|
517
|
-
return r.columnMetadataMap[t].size;
|
|
518
|
-
},
|
|
519
|
-
getEstimatedTotalHeight: Je,
|
|
520
|
-
getEstimatedTotalWidth: Qe,
|
|
521
|
-
getOffsetForColumnAndAlignment: function(e, t, r, s, l, a) {
|
|
522
|
-
return $e("column", e, t, r, s, l, a);
|
|
523
|
-
},
|
|
524
|
-
getOffsetForRowAndAlignment: function(e, t, r, s, l, a) {
|
|
525
|
-
return $e("row", e, t, r, s, l, a);
|
|
526
|
-
},
|
|
527
|
-
getRowOffset: function(e, t, r) {
|
|
528
|
-
return Z("row", e, t, r).offset;
|
|
529
|
-
},
|
|
530
|
-
getRowHeight: function(e, t, r) {
|
|
531
|
-
return r.rowMetadataMap[t].size;
|
|
532
|
-
},
|
|
533
|
-
getRowStartIndexForOffset: function(e, t, r) {
|
|
534
|
-
return Ge("row", e, r, t);
|
|
535
|
-
},
|
|
536
|
-
getRowStopIndexForStartIndex: function(e, t, r, s) {
|
|
537
|
-
for (var l = e.rowCount, a = e.height, c = Z("row", e, t, s), u = r + a, g = c.offset + c.size, h = t; h < l - 1 && g < u; )
|
|
538
|
-
h++, g += Z("row", e, h, s).size;
|
|
539
|
-
return h;
|
|
540
|
-
},
|
|
541
|
-
initInstanceProps: function(e, t) {
|
|
542
|
-
var r = e, s = r.estimatedColumnWidth, l = r.estimatedRowHeight, a = {
|
|
543
|
-
columnMetadataMap: {},
|
|
544
|
-
estimatedColumnWidth: s || qe,
|
|
545
|
-
estimatedRowHeight: l || qe,
|
|
546
|
-
lastMeasuredColumnIndex: -1,
|
|
547
|
-
lastMeasuredRowIndex: -1,
|
|
548
|
-
rowMetadataMap: {}
|
|
549
|
-
};
|
|
550
|
-
return t.resetAfterColumnIndex = function(c, u) {
|
|
551
|
-
u === void 0 && (u = !0), t.resetAfterIndices({
|
|
552
|
-
columnIndex: c,
|
|
553
|
-
shouldForceUpdate: u
|
|
554
|
-
});
|
|
555
|
-
}, t.resetAfterRowIndex = function(c, u) {
|
|
556
|
-
u === void 0 && (u = !0), t.resetAfterIndices({
|
|
557
|
-
rowIndex: c,
|
|
558
|
-
shouldForceUpdate: u
|
|
559
|
-
});
|
|
560
|
-
}, t.resetAfterIndices = function(c) {
|
|
561
|
-
var u = c.columnIndex, g = c.rowIndex, h = c.shouldForceUpdate, I = h === void 0 ? !0 : h;
|
|
562
|
-
typeof u == "number" && (a.lastMeasuredColumnIndex = Math.min(a.lastMeasuredColumnIndex, u - 1)), typeof g == "number" && (a.lastMeasuredRowIndex = Math.min(a.lastMeasuredRowIndex, g - 1)), t._getItemStyleCache(-1), I && t.forceUpdate();
|
|
563
|
-
}, a;
|
|
564
|
-
},
|
|
565
|
-
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
566
|
-
validateProps: function(e) {
|
|
567
|
-
var t = e.columnWidth, r = e.rowHeight;
|
|
568
|
-
if (process.env.NODE_ENV !== "production") {
|
|
569
|
-
if (typeof t != "function")
|
|
570
|
-
throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. ' + ('"' + (t === null ? "null" : typeof t) + '" was specified.'));
|
|
571
|
-
if (typeof r != "function")
|
|
572
|
-
throw Error('An invalid "rowHeight" prop has been specified. Value should be a function. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
|
-
process.env.NODE_ENV;
|
|
577
|
-
function je(n, e) {
|
|
578
|
-
for (var t in n)
|
|
579
|
-
if (!(t in e))
|
|
580
|
-
return !0;
|
|
581
|
-
for (var r in e)
|
|
582
|
-
if (n[r] !== e[r])
|
|
583
|
-
return !0;
|
|
584
|
-
return !1;
|
|
585
|
-
}
|
|
586
|
-
var rr = ["style"], or = ["style"];
|
|
587
|
-
function nr(n, e) {
|
|
588
|
-
var t = n.style, r = He(n, rr), s = e.style, l = He(e, or);
|
|
589
|
-
return !je(t, s) && !je(r, l);
|
|
590
|
-
}
|
|
591
|
-
let q;
|
|
592
|
-
typeof window < "u" ? q = window : typeof self < "u" ? q = self : q = global;
|
|
593
|
-
let Pe = null, Ne = null;
|
|
594
|
-
const Be = 20, Le = q.clearTimeout, Ke = q.setTimeout, Me = q.cancelAnimationFrame || q.mozCancelAnimationFrame || q.webkitCancelAnimationFrame, Ze = q.requestAnimationFrame || q.mozRequestAnimationFrame || q.webkitRequestAnimationFrame;
|
|
595
|
-
Me == null || Ze == null ? (Pe = Le, Ne = function(e) {
|
|
596
|
-
return Ke(e, Be);
|
|
597
|
-
}) : (Pe = function([e, t]) {
|
|
598
|
-
Me(e), Le(t);
|
|
599
|
-
}, Ne = function(e) {
|
|
600
|
-
const t = Ze(function() {
|
|
601
|
-
Le(r), e();
|
|
602
|
-
}), r = Ke(function() {
|
|
603
|
-
Me(t), e();
|
|
604
|
-
}, Be);
|
|
605
|
-
return [t, r];
|
|
606
|
-
});
|
|
607
|
-
function ir(n) {
|
|
608
|
-
let e, t, r, s, l, a, c;
|
|
609
|
-
const u = typeof document < "u" && document.attachEvent;
|
|
610
|
-
if (!u) {
|
|
611
|
-
a = function(M) {
|
|
612
|
-
const b = M.__resizeTriggers__, E = b.firstElementChild, N = b.lastElementChild, o = E.firstElementChild;
|
|
613
|
-
N.scrollLeft = N.scrollWidth, N.scrollTop = N.scrollHeight, o.style.width = E.offsetWidth + 1 + "px", o.style.height = E.offsetHeight + 1 + "px", E.scrollLeft = E.scrollWidth, E.scrollTop = E.scrollHeight;
|
|
614
|
-
}, l = function(M) {
|
|
615
|
-
return M.offsetWidth !== M.__resizeLast__.width || M.offsetHeight !== M.__resizeLast__.height;
|
|
616
|
-
}, c = function(M) {
|
|
617
|
-
if (M.target.className && typeof M.target.className.indexOf == "function" && M.target.className.indexOf("contract-trigger") < 0 && M.target.className.indexOf("expand-trigger") < 0)
|
|
618
|
-
return;
|
|
619
|
-
const b = this;
|
|
620
|
-
a(this), this.__resizeRAF__ && Pe(this.__resizeRAF__), this.__resizeRAF__ = Ne(function() {
|
|
621
|
-
l(b) && (b.__resizeLast__.width = b.offsetWidth, b.__resizeLast__.height = b.offsetHeight, b.__resizeListeners__.forEach(function(o) {
|
|
622
|
-
o.call(b, M);
|
|
623
|
-
}));
|
|
624
|
-
});
|
|
625
|
-
};
|
|
626
|
-
let i = !1, L = "";
|
|
627
|
-
r = "animationstart";
|
|
628
|
-
const T = "Webkit Moz O ms".split(" ");
|
|
629
|
-
let R = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), H = "";
|
|
630
|
-
{
|
|
631
|
-
const M = document.createElement("fakeelement");
|
|
632
|
-
if (M.style.animationName !== void 0 && (i = !0), i === !1) {
|
|
633
|
-
for (let b = 0; b < T.length; b++)
|
|
634
|
-
if (M.style[T[b] + "AnimationName"] !== void 0) {
|
|
635
|
-
H = T[b], L = "-" + H.toLowerCase() + "-", r = R[b], i = !0;
|
|
636
|
-
break;
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
t = "resizeanim", e = "@" + L + "keyframes " + t + " { from { opacity: 0; } to { opacity: 0; } } ", s = L + "animation: 1ms " + t + "; ";
|
|
641
|
-
}
|
|
642
|
-
const g = function(i) {
|
|
643
|
-
if (!i.getElementById("detectElementResize")) {
|
|
644
|
-
const L = (e || "") + ".resize-triggers { " + (s || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', T = i.head || i.getElementsByTagName("head")[0], R = i.createElement("style");
|
|
645
|
-
R.id = "detectElementResize", R.type = "text/css", n != null && R.setAttribute("nonce", n), R.styleSheet ? R.styleSheet.cssText = L : R.appendChild(i.createTextNode(L)), T.appendChild(R);
|
|
646
|
-
}
|
|
647
|
-
};
|
|
648
|
-
return {
|
|
649
|
-
addResizeListener: function(i, L) {
|
|
650
|
-
if (u)
|
|
651
|
-
i.attachEvent("onresize", L);
|
|
652
|
-
else {
|
|
653
|
-
if (!i.__resizeTriggers__) {
|
|
654
|
-
const T = i.ownerDocument, R = q.getComputedStyle(i);
|
|
655
|
-
R && R.position === "static" && (i.style.position = "relative"), g(T), i.__resizeLast__ = {}, i.__resizeListeners__ = [], (i.__resizeTriggers__ = T.createElement("div")).className = "resize-triggers";
|
|
656
|
-
const H = T.createElement("div");
|
|
657
|
-
H.className = "expand-trigger", H.appendChild(T.createElement("div"));
|
|
658
|
-
const M = T.createElement("div");
|
|
659
|
-
M.className = "contract-trigger", i.__resizeTriggers__.appendChild(H), i.__resizeTriggers__.appendChild(M), i.appendChild(i.__resizeTriggers__), a(i), i.addEventListener("scroll", c, !0), r && (i.__resizeTriggers__.__animationListener__ = function(E) {
|
|
660
|
-
E.animationName === t && a(i);
|
|
661
|
-
}, i.__resizeTriggers__.addEventListener(r, i.__resizeTriggers__.__animationListener__));
|
|
662
|
-
}
|
|
663
|
-
i.__resizeListeners__.push(L);
|
|
664
|
-
}
|
|
665
|
-
},
|
|
666
|
-
removeResizeListener: function(i, L) {
|
|
667
|
-
if (u)
|
|
668
|
-
i.detachEvent("onresize", L);
|
|
669
|
-
else if (i.__resizeListeners__.splice(i.__resizeListeners__.indexOf(L), 1), !i.__resizeListeners__.length) {
|
|
670
|
-
i.removeEventListener("scroll", c, !0), i.__resizeTriggers__.__animationListener__ && (i.__resizeTriggers__.removeEventListener(r, i.__resizeTriggers__.__animationListener__), i.__resizeTriggers__.__animationListener__ = null);
|
|
671
|
-
try {
|
|
672
|
-
i.__resizeTriggers__ = !i.removeChild(i.__resizeTriggers__);
|
|
673
|
-
} catch {
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
};
|
|
678
|
-
}
|
|
679
|
-
class sr extends ut {
|
|
680
|
-
constructor(...e) {
|
|
681
|
-
super(...e), this.state = {
|
|
682
|
-
height: this.props.defaultHeight || 0,
|
|
683
|
-
width: this.props.defaultWidth || 0
|
|
684
|
-
}, this._autoSizer = null, this._detectElementResize = null, this._didLogDeprecationWarning = !1, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
|
|
685
|
-
this._timeoutId = null;
|
|
686
|
-
const {
|
|
687
|
-
disableHeight: t,
|
|
688
|
-
disableWidth: r,
|
|
689
|
-
onResize: s
|
|
690
|
-
} = this.props;
|
|
691
|
-
if (this._parentNode) {
|
|
692
|
-
const l = window.getComputedStyle(this._parentNode) || {}, a = parseFloat(l.paddingLeft || "0"), c = parseFloat(l.paddingRight || "0"), u = parseFloat(l.paddingTop || "0"), g = parseFloat(l.paddingBottom || "0"), h = this._parentNode.getBoundingClientRect(), I = h.height - u - g, i = h.width - a - c;
|
|
693
|
-
if (!t && this.state.height !== I || !r && this.state.width !== i) {
|
|
694
|
-
this.setState({
|
|
695
|
-
height: I,
|
|
696
|
-
width: i
|
|
697
|
-
});
|
|
698
|
-
const L = () => {
|
|
699
|
-
this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
|
|
700
|
-
};
|
|
701
|
-
typeof s == "function" && s({
|
|
702
|
-
height: I,
|
|
703
|
-
width: i,
|
|
704
|
-
// TODO Remove these params in the next major release
|
|
705
|
-
get scaledHeight() {
|
|
706
|
-
return L(), I;
|
|
707
|
-
},
|
|
708
|
-
get scaledWidth() {
|
|
709
|
-
return L(), i;
|
|
710
|
-
}
|
|
711
|
-
});
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
}, this._setRef = (t) => {
|
|
715
|
-
this._autoSizer = t;
|
|
716
|
-
};
|
|
717
|
-
}
|
|
718
|
-
componentDidMount() {
|
|
719
|
-
const {
|
|
720
|
-
nonce: e
|
|
721
|
-
} = this.props, t = this._autoSizer ? this._autoSizer.parentNode : null;
|
|
722
|
-
if (t != null && t.ownerDocument && t.ownerDocument.defaultView && t instanceof t.ownerDocument.defaultView.HTMLElement) {
|
|
723
|
-
this._parentNode = t;
|
|
724
|
-
const r = t.ownerDocument.defaultView.ResizeObserver;
|
|
725
|
-
r != null ? (this._resizeObserver = new r(() => {
|
|
726
|
-
this._timeoutId = setTimeout(this._onResize, 0);
|
|
727
|
-
}), this._resizeObserver.observe(t)) : (this._detectElementResize = ir(e), this._detectElementResize.addResizeListener(t, this._onResize)), this._onResize();
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
componentWillUnmount() {
|
|
731
|
-
this._parentNode && (this._detectElementResize && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize), this._timeoutId !== null && clearTimeout(this._timeoutId), this._resizeObserver && this._resizeObserver.disconnect());
|
|
732
|
-
}
|
|
733
|
-
render() {
|
|
734
|
-
const {
|
|
735
|
-
children: e,
|
|
736
|
-
defaultHeight: t,
|
|
737
|
-
defaultWidth: r,
|
|
738
|
-
disableHeight: s = !1,
|
|
739
|
-
disableWidth: l = !1,
|
|
740
|
-
doNotBailOutOnEmptyChildren: a = !1,
|
|
741
|
-
nonce: c,
|
|
742
|
-
onResize: u,
|
|
743
|
-
style: g = {},
|
|
744
|
-
tagName: h = "div",
|
|
745
|
-
...I
|
|
746
|
-
} = this.props, {
|
|
747
|
-
height: i,
|
|
748
|
-
width: L
|
|
749
|
-
} = this.state, T = {
|
|
750
|
-
overflow: "visible"
|
|
751
|
-
}, R = {};
|
|
752
|
-
let H = !1;
|
|
753
|
-
return s || (i === 0 && (H = !0), T.height = 0, R.height = i, R.scaledHeight = i), l || (L === 0 && (H = !0), T.width = 0, R.width = L, R.scaledWidth = L), a && (H = !1), fe(h, {
|
|
754
|
-
ref: this._setRef,
|
|
755
|
-
style: {
|
|
756
|
-
...T,
|
|
757
|
-
...g
|
|
758
|
-
},
|
|
759
|
-
...I
|
|
760
|
-
}, !H && e(R));
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
const ar = ft(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
|
|
764
|
-
const s = At(
|
|
765
|
-
e,
|
|
766
|
-
n,
|
|
767
|
-
t.columnCount,
|
|
768
|
-
t.isDualPageWithCover
|
|
769
|
-
);
|
|
770
|
-
if (s <= 0)
|
|
771
|
-
return null;
|
|
772
|
-
if (t.isDualPageWithCover) {
|
|
773
|
-
const a = s === t.totalPages && t.totalPages % 2 === 0;
|
|
774
|
-
if (e === 0 && s === 1 || a && n === 0) {
|
|
775
|
-
const u = t.columnWidths.reduce((g, h) => g + h, 0);
|
|
776
|
-
return /* @__PURE__ */ w(
|
|
777
|
-
"div",
|
|
778
|
-
{
|
|
779
|
-
style: {
|
|
780
|
-
...r,
|
|
781
|
-
width: u,
|
|
782
|
-
display: "flex",
|
|
783
|
-
justifyContent: "center",
|
|
784
|
-
alignItems: "flex-start"
|
|
785
|
-
},
|
|
786
|
-
children: /* @__PURE__ */ w(Te, { style: { position: "relative" }, pageNumber: s }, s)
|
|
787
|
-
}
|
|
788
|
-
);
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
return t.columnCount === 2 ? /* @__PURE__ */ w(
|
|
792
|
-
"div",
|
|
793
|
-
{
|
|
794
|
-
style: {
|
|
795
|
-
...r,
|
|
796
|
-
display: "flex",
|
|
797
|
-
justifyContent: n === 0 ? "flex-end" : "flex-start",
|
|
798
|
-
alignItems: "flex-start"
|
|
799
|
-
},
|
|
800
|
-
children: /* @__PURE__ */ w(Te, { style: { position: "relative" }, pageNumber: s }, s)
|
|
801
|
-
}
|
|
802
|
-
) : /* @__PURE__ */ w(Te, { style: r, pageNumber: s }, s);
|
|
803
|
-
}, nr), Ko = () => {
|
|
804
|
-
const n = K(new qt()), { initialPage: e = 1, initialScrollMode: t } = Mt(), { pagesRef: r, setPagesRef: s, setContentRef: l } = Et(), { scrollToPage: a } = gt();
|
|
805
|
-
Ut(r);
|
|
806
|
-
const {
|
|
807
|
-
virtualScrollRef: c,
|
|
808
|
-
getVirtualScrollRef: u,
|
|
809
|
-
getPageScrollElementRef: g,
|
|
810
|
-
getVirtualScrollableElementRef: h,
|
|
811
|
-
setTotalInnerDimensions: I,
|
|
812
|
-
virtualScrollableElementRef: i,
|
|
813
|
-
totalInnerDimensions: L,
|
|
814
|
-
pageScrollElementRef: T
|
|
815
|
-
} = ht(), R = K(e > 1), [H, M] = mt(e > 1), { nextPage: b, prevPage: E, setFocusedPage: N, focusedPage: o, totalPages: f } = vt(), { scrollMode: d } = Ct(), { viewMode: m } = wt(), C = K(null), { loading: p, error: S } = _t(), { passwordRequired: O } = Ft(), { LoaderImageComponent: P } = Pt(), x = K(
|
|
816
|
-
L
|
|
817
|
-
), z = K({
|
|
818
|
-
viewMode: m,
|
|
819
|
-
scrollMode: d
|
|
820
|
-
}), y = K(!1), W = K(), { isFullScreen: k } = It(), {
|
|
821
|
-
pageDimension: U,
|
|
822
|
-
rowCount: A,
|
|
823
|
-
rowHeight: G,
|
|
824
|
-
columnCount: D,
|
|
825
|
-
columnWidth: V,
|
|
826
|
-
estimatedColumnWidth: te,
|
|
827
|
-
estimatedRowHeight: re,
|
|
828
|
-
totalDimension: ae
|
|
829
|
-
} = pt(), ne = Ot(L, 100), { onScroll: J, onTextSelect: ge } = kt();
|
|
830
|
-
Vt({ onTextSelect: ge, pagesRef: r });
|
|
831
|
-
const Q = K();
|
|
832
|
-
Wt(D, A, i, m);
|
|
833
|
-
const $ = K({
|
|
834
|
-
scrollTop: 0,
|
|
835
|
-
scrollLeft: 0
|
|
836
|
-
});
|
|
837
|
-
Lt(r);
|
|
838
|
-
const { isPressed: j } = yt(), { selectionMode: le } = bt(), { initializeGrabScroll: ce, resetGrabState: Ye } = zt({
|
|
839
|
-
isPressed: j
|
|
840
|
-
}), ie = Ie(() => le === St.HAND, [le]), et = Ie(() => {
|
|
841
|
-
const _ = Array.from({ length: D }, (v, B) => V(B));
|
|
842
|
-
return {
|
|
843
|
-
columnCount: D,
|
|
844
|
-
isDualPageWithCover: m === Re.DUAL_PAGE_WITH_COVER,
|
|
845
|
-
columnWidths: _,
|
|
846
|
-
totalPages: f
|
|
847
|
-
};
|
|
848
|
-
}, [D, m, V, f]), ve = se(
|
|
849
|
-
(_) => {
|
|
850
|
-
const v = document.activeElement !== r;
|
|
851
|
-
!k && v || (["ArrowUp", "ArrowLeft"].includes(_.key) ? (_.preventDefault(), E()) : ["ArrowDown", "ArrowRight"].includes(_.key) && (_.preventDefault(), b()));
|
|
852
|
-
},
|
|
853
|
-
[b, E, k, d]
|
|
854
|
-
);
|
|
855
|
-
ee(() => (window.addEventListener("keydown", ve), () => {
|
|
856
|
-
window.removeEventListener("keydown", ve);
|
|
857
|
-
}), [ve]), ee(() => {
|
|
858
|
-
if (C.current && (C.current.style.position = "relative"), !!c)
|
|
859
|
-
for (let _ = 0; _ < A; _++)
|
|
860
|
-
for (let v = 0; v < D; v++)
|
|
861
|
-
c.resetAfterIndices({
|
|
862
|
-
columnIndex: v,
|
|
863
|
-
rowIndex: _,
|
|
864
|
-
shouldForceUpdate: !0
|
|
865
|
-
});
|
|
866
|
-
}, [A, D, U, c]);
|
|
867
|
-
const tt = se(
|
|
868
|
-
(_, v) => {
|
|
869
|
-
if (!i)
|
|
870
|
-
return { scrollTop: 0, scrollLeft: 0 };
|
|
871
|
-
const B = $.current.scrollTop > v, X = $.current.scrollLeft > _;
|
|
872
|
-
return B || X ? $.current : {
|
|
873
|
-
scrollTop: i.scrollTop,
|
|
874
|
-
scrollLeft: i.scrollLeft
|
|
875
|
-
};
|
|
876
|
-
},
|
|
877
|
-
[i]
|
|
878
|
-
), We = se(
|
|
879
|
-
(_, v) => {
|
|
880
|
-
if (z.current.viewMode !== m || z.current.scrollMode !== d) {
|
|
881
|
-
Q.current && clearTimeout(Q.current), y.current = !0, a(o, "auto"), Q.current = setTimeout(() => {
|
|
882
|
-
requestAnimationFrame(() => {
|
|
883
|
-
z.current = { viewMode: m, scrollMode: d };
|
|
884
|
-
});
|
|
885
|
-
}, 100);
|
|
886
|
-
return;
|
|
887
|
-
}
|
|
888
|
-
const X = _.scrollTop, de = _.scrollLeft;
|
|
889
|
-
if (!v.height || !v.width)
|
|
890
|
-
return;
|
|
891
|
-
y.current = !0;
|
|
892
|
-
const { height: Y, width: _e } = v, { height: we, width: Ce } = x.current;
|
|
893
|
-
if (we === Y && Ce === _e)
|
|
894
|
-
return;
|
|
895
|
-
if (R.current && e > 1) {
|
|
896
|
-
x.current = {
|
|
897
|
-
height: v.height,
|
|
898
|
-
width: v.width
|
|
899
|
-
};
|
|
900
|
-
return;
|
|
901
|
-
}
|
|
902
|
-
if (!we || !Ce) {
|
|
903
|
-
x.current = {
|
|
904
|
-
height: v.height,
|
|
905
|
-
width: v.width
|
|
906
|
-
};
|
|
907
|
-
return;
|
|
908
|
-
}
|
|
909
|
-
if (X === 0 && de === 0) {
|
|
910
|
-
x.current = {
|
|
911
|
-
height: v.height,
|
|
912
|
-
width: v.width
|
|
913
|
-
};
|
|
914
|
-
return;
|
|
915
|
-
}
|
|
916
|
-
const it = X / we * Y, st = de / Ce * _e, at = Math.round(Math.min(it, Y)) || 0, lt = Math.round(Math.min(st, _e)) || 0;
|
|
917
|
-
W.current = setTimeout(() => {
|
|
918
|
-
requestAnimationFrame(() => {
|
|
919
|
-
i == null || i.scrollTo({
|
|
920
|
-
top: at,
|
|
921
|
-
left: lt,
|
|
922
|
-
behavior: "auto"
|
|
923
|
-
});
|
|
924
|
-
});
|
|
925
|
-
}, 0), x.current = {
|
|
926
|
-
height: v.height,
|
|
927
|
-
width: v.width
|
|
928
|
-
};
|
|
929
|
-
},
|
|
930
|
-
[i, m, d, a, e]
|
|
931
|
-
);
|
|
932
|
-
ee(() => {
|
|
933
|
-
clearTimeout(W.current);
|
|
934
|
-
const _ = Array.from({ length: A }).reduce(
|
|
935
|
-
(X, de, Y) => X + G(Y),
|
|
936
|
-
0
|
|
937
|
-
), v = Array.from({ length: D }).reduce(
|
|
938
|
-
(X, de, Y) => X + V(Y),
|
|
939
|
-
0
|
|
940
|
-
), B = tt(v, _);
|
|
941
|
-
$.current = B, We(B, { height: _, width: v }), I({
|
|
942
|
-
height: _,
|
|
943
|
-
width: v
|
|
944
|
-
});
|
|
945
|
-
}, [U, A, D, We]);
|
|
946
|
-
const rt = se(
|
|
947
|
-
(_) => {
|
|
948
|
-
$.current = {
|
|
949
|
-
scrollTop: _.scrollTop,
|
|
950
|
-
scrollLeft: _.scrollLeft
|
|
951
|
-
};
|
|
952
|
-
},
|
|
953
|
-
[i]
|
|
954
|
-
);
|
|
955
|
-
ee(() => {
|
|
956
|
-
if (J)
|
|
957
|
-
return T && T.addEventListener("scroll", J), i && i.addEventListener("scroll", J), () => {
|
|
958
|
-
T == null || T.removeEventListener("scroll", J), i == null || i.removeEventListener("scroll", J);
|
|
959
|
-
};
|
|
960
|
-
}, [i, T, J]), ee(() => () => {
|
|
961
|
-
Q.current && clearTimeout(Q.current);
|
|
962
|
-
}, []);
|
|
963
|
-
const ot = Ie(() => ue(F["rp-pages-container"], {
|
|
964
|
-
[F["rp-cursor-grab"]]: ie && !j,
|
|
965
|
-
[F["rp-cursor-grabbing"]]: ie && j
|
|
966
|
-
}), [ie, j]), nt = se(
|
|
967
|
-
(_) => {
|
|
968
|
-
if (ie && _) {
|
|
969
|
-
const v = ue(F["rp-pages"]), B = document.querySelector(`.${v}`);
|
|
970
|
-
ce(B);
|
|
971
|
-
}
|
|
972
|
-
},
|
|
973
|
-
[ie, ce, F]
|
|
974
|
-
);
|
|
975
|
-
return ee(() => {
|
|
976
|
-
p && Ye();
|
|
977
|
-
}, [p]), ee(() => {
|
|
978
|
-
if (ne.height === 0 || !R.current)
|
|
979
|
-
return;
|
|
980
|
-
if (t === xe.PAGE_SCROLLING) {
|
|
981
|
-
e !== o && T && N(e), R.current = !1, M(!1);
|
|
982
|
-
return;
|
|
983
|
-
}
|
|
984
|
-
!i || (a(e, "auto"), !(i.scrollLeft > 0 || i.scrollTop > 0)) || (N(e), R.current = !1, M(!1));
|
|
985
|
-
}, [
|
|
986
|
-
a,
|
|
987
|
-
t,
|
|
988
|
-
T,
|
|
989
|
-
N,
|
|
990
|
-
ne,
|
|
991
|
-
i
|
|
992
|
-
]), /* @__PURE__ */ Se(ct, { children: [
|
|
993
|
-
/* @__PURE__ */ w(Ht, { ref: l, children: /* @__PURE__ */ w(
|
|
994
|
-
Dt,
|
|
995
|
-
{
|
|
996
|
-
ref: s,
|
|
997
|
-
tabIndex: -1,
|
|
998
|
-
className: ot,
|
|
999
|
-
style: {
|
|
1000
|
-
"--scale-round-x": `${Ae(n.current.sx)[1]}px`,
|
|
1001
|
-
"--scale-round-y": `${Ae(n.current.sy)[1]}px`
|
|
1002
|
-
},
|
|
1003
|
-
children: /* @__PURE__ */ w(sr, { style: { minHeight: "50px" }, children: ({ width: _, height: v }) => /* @__PURE__ */ w(
|
|
1004
|
-
"div",
|
|
1005
|
-
{
|
|
1006
|
-
"data-rp": "pages",
|
|
1007
|
-
ref: nt,
|
|
1008
|
-
style: {
|
|
1009
|
-
width: _,
|
|
1010
|
-
height: v,
|
|
1011
|
-
...H && { visibility: "hidden" }
|
|
1012
|
-
},
|
|
1013
|
-
children: d === xe.PAGE_SCROLLING ? S === ye.INVALID_OR_CORRUPTED_PDF ? /* @__PURE__ */ w("div", { className: F["rp-load-error"], style: { width: _, height: v }, children: /* @__PURE__ */ w("div", { className: F["rp-load-error-message"], children: "Invalid or corrupted PDF file." }) }) : /* @__PURE__ */ w(
|
|
1014
|
-
"div",
|
|
1015
|
-
{
|
|
1016
|
-
ref: g,
|
|
1017
|
-
style: { width: _, height: v },
|
|
1018
|
-
className: ue(F["rp-pages"], F["rp-page-scrolling-wrapper"]),
|
|
1019
|
-
children: m === Re.DUAL_PAGE ? /* @__PURE__ */ w(Tt, { widths: V, heights: G }) : m === Re.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ w(Rt, { widths: V, heights: G }) : /* @__PURE__ */ w(xt, { widths: V, heights: G })
|
|
1020
|
-
}
|
|
1021
|
-
) : re ? /* @__PURE__ */ w(
|
|
1022
|
-
tr,
|
|
1023
|
-
{
|
|
1024
|
-
ref: u,
|
|
1025
|
-
itemData: et,
|
|
1026
|
-
outerRef: h,
|
|
1027
|
-
innerRef: C,
|
|
1028
|
-
onScroll: rt,
|
|
1029
|
-
columnCount: D,
|
|
1030
|
-
columnWidth: V,
|
|
1031
|
-
rowHeight: G,
|
|
1032
|
-
height: v,
|
|
1033
|
-
width: _,
|
|
1034
|
-
estimatedColumnWidth: te,
|
|
1035
|
-
estimatedRowHeight: re,
|
|
1036
|
-
rowCount: A,
|
|
1037
|
-
className: ue(
|
|
1038
|
-
F["rp-pages"],
|
|
1039
|
-
d === xe.HORIZONTAL_SCROLLING ? F["rp-pages-horizontal-scroll"] : ""
|
|
1040
|
-
),
|
|
1041
|
-
style: {
|
|
1042
|
-
"--rp-pages-height": `${ae.height}px`,
|
|
1043
|
-
"--rp-pages-width": `${ae.width}px`,
|
|
1044
|
-
"--rp-row-count": `${A}`,
|
|
1045
|
-
"--rp-column-count": `${D}`
|
|
1046
|
-
},
|
|
1047
|
-
children: ar
|
|
1048
|
-
}
|
|
1049
|
-
) : !p && !S ? /* @__PURE__ */ w(
|
|
1050
|
-
"div",
|
|
1051
|
-
{
|
|
1052
|
-
className: F["rp-loader"],
|
|
1053
|
-
style: {
|
|
1054
|
-
display: "flex",
|
|
1055
|
-
justifyContent: "center",
|
|
1056
|
-
alignItems: "center",
|
|
1057
|
-
height: "100%",
|
|
1058
|
-
width: "100%"
|
|
1059
|
-
},
|
|
1060
|
-
children: P && /* @__PURE__ */ w(P, {})
|
|
1061
|
-
}
|
|
1062
|
-
) : S === ye.NOT_SUPPORTED ? /* @__PURE__ */ w("div", { className: F["rp-not-supported"], children: /* @__PURE__ */ Se("div", { className: F["rp-not-supported-content"], children: [
|
|
1063
|
-
"React PDF Kit is unable to render on this browser. Please use the supported browsers from the list below:",
|
|
1064
|
-
/* @__PURE__ */ w("div", { children: /* @__PURE__ */ Se("ul", { className: F["rp-not-supported-list"], children: [
|
|
1065
|
-
/* @__PURE__ */ w("li", { children: "Chrome 126+" }),
|
|
1066
|
-
/* @__PURE__ */ w("li", { children: "Edge 126+" }),
|
|
1067
|
-
/* @__PURE__ */ w("li", { children: "Firefox 126+" }),
|
|
1068
|
-
/* @__PURE__ */ w("li", { children: "Safari 18.4+" }),
|
|
1069
|
-
/* @__PURE__ */ w("li", { children: "Safari iOS 18.4+" }),
|
|
1070
|
-
/* @__PURE__ */ w("li", { children: "Chrome Android 126+" })
|
|
1071
|
-
] }) })
|
|
1072
|
-
] }) }) : S === ye.INVALID_OR_CORRUPTED_PDF ? /* @__PURE__ */ w("div", { className: F["rp-load-error"], children: /* @__PURE__ */ w("div", { className: F["rp-load-error-message"], children: "Invalid or corrupted PDF file." }) }) : null
|
|
1073
|
-
}
|
|
1074
|
-
) })
|
|
1075
|
-
}
|
|
1076
|
-
) }),
|
|
1077
|
-
O && /* @__PURE__ */ w(Nt, {})
|
|
1078
|
-
] });
|
|
1079
|
-
};
|
|
1080
|
-
export {
|
|
1081
|
-
Ko as RPPages
|
|
1082
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "../RPPages-V5CNUXFD.js";
|
|
3
|
+
export { e as RPPages };
|