@pdf-viewer/react 1.17.0-rc.1 → 1.17.0-rc.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/LayoutWrapper-60db8675.js +20 -0
- package/dist/{ToolbarLayout.module-df04508a.js → ToolbarLayout.module-cf42c84d.js} +552 -552
- package/dist/assets/style.css +1 -1
- package/dist/assets/style.js +5 -5
- package/dist/components/RPController.js +5 -5
- package/dist/components/RPPages.js +5 -5
- package/dist/components/RPProvider.js +5 -5
- package/dist/components/layout/LayoutContainer.js +5 -5
- package/dist/components/layout/LayoutWrapper.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +5 -5
- package/dist/components/layout/RPLayout.js +18 -18
- package/dist/components/layout/SkipLink.js +6 -6
- package/dist/components/layout/sidebar/RPSidebar.js +5 -5
- package/dist/components/layout/sidebar/Thumbnail.js +5 -5
- package/dist/components/layout/sidebar/Thumbnails.js +5 -5
- package/dist/components/layout/toolbar/DarkModeTool.js +2 -2
- package/dist/components/layout/toolbar/DocumentDialog.js +5 -5
- package/dist/components/layout/toolbar/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/FileDownloadTool.js +5 -5
- package/dist/components/layout/toolbar/FileUploadTool.js +3 -3
- package/dist/components/layout/toolbar/FullScreenTool.js +3 -3
- package/dist/components/layout/toolbar/MenuItem.js +3 -3
- package/dist/components/layout/toolbar/MenuSeparator.js +3 -3
- package/dist/components/layout/toolbar/MostPageTool.js +5 -5
- package/dist/components/layout/toolbar/OtherTool.js +5 -5
- package/dist/components/layout/toolbar/Paginate.js +5 -5
- package/dist/components/layout/toolbar/PrintTool.js +5 -5
- package/dist/components/layout/toolbar/RPMenuItem.js +3 -3
- package/dist/components/layout/toolbar/RPMoreOptions.js +5 -5
- package/dist/components/layout/toolbar/RPToolbar.js +5 -5
- package/dist/components/layout/toolbar/RPToolbarEnd.js +5 -5
- package/dist/components/layout/toolbar/RotateTool.js +3 -3
- package/dist/components/layout/toolbar/ScrollModeTool.js +3 -3
- package/dist/components/layout/toolbar/SearchCloseButton.js +2 -2
- package/dist/components/layout/toolbar/SearchResultNavigator.js +5 -5
- package/dist/components/layout/toolbar/SearchTool.js +5 -5
- package/dist/components/layout/toolbar/SelectionModeTool.js +3 -3
- package/dist/components/layout/toolbar/ThumbnailTool.js +5 -5
- package/dist/components/layout/toolbar/ToolbarCustom.js +14 -14
- package/dist/components/layout/toolbar/ToolbarDefault.js +14 -14
- package/dist/components/layout/toolbar/ToolbarLayout.js +5 -5
- package/dist/components/layout/toolbar/ViewModeTool.js +3 -3
- package/dist/components/layout/toolbar/ZoomTool.js +5 -5
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +5 -5
- package/dist/components/layout/toolbar/tools/DualPageTool.js +5 -5
- package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +5 -5
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +5 -5
- package/dist/components/layout/toolbar/tools/FileUploadTool.js +2 -2
- package/dist/components/layout/toolbar/tools/FullScreenTool.js +2 -2
- package/dist/components/layout/toolbar/tools/HorizontalScrollingTool.js +2 -2
- package/dist/components/layout/toolbar/tools/InputPageTool.js +5 -5
- package/dist/components/layout/toolbar/tools/NextPageTool.js +5 -5
- package/dist/components/layout/toolbar/tools/PageScrollingTool.js +2 -2
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +5 -5
- package/dist/components/layout/toolbar/tools/PrintTool.js +5 -5
- package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +2 -2
- package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +2 -2
- package/dist/components/layout/toolbar/tools/SelectionModeSwitcherTool.js +2 -2
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +5 -5
- package/dist/components/layout/toolbar/tools/ThemeSwitcherTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +5 -5
- package/dist/components/layout/toolbar/tools/VerticalScrollingTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +2 -2
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +5 -5
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +5 -5
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +2 -2
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +5 -5
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +5 -5
- package/dist/components/layout/toolbar/tools/more-options/DocumentProperties.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +5 -5
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +5 -5
- package/dist/components/layout/toolbar/tools/more-options/FullScreenTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +5 -5
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +5 -5
- package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/ScrollModeTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/SelectionModeTool.js +3 -3
- package/dist/components/layout/toolbar/tools/more-options/ViewModeTool.js +3 -3
- package/dist/components/page/AnnotationLayer.js +5 -5
- package/dist/components/page/CanvasLayer.js +5 -5
- package/dist/components/page/DualPage.js +5 -5
- package/dist/components/page/DualPageWithCover.js +5 -5
- package/dist/components/page/RPPage.js +5 -5
- package/dist/components/page/SinglePage.js +5 -5
- package/dist/components/page/TextHighlightLayer.js +5 -5
- package/dist/components/page/TextLayer.js +5 -5
- package/dist/components/ui/Checkbox.js +1 -1
- package/dist/components/ui/DropDown.js +3 -3
- package/dist/components/ui/LoadingIndicator.js +5 -5
- package/dist/components/ui/RPTooltip.js +118 -102
- package/dist/contexts/PaginationContext.js +5 -5
- package/dist/contexts/PrintContext.js +5 -5
- package/dist/contexts/RenderQueueProvider.js +5 -5
- package/dist/contexts/SearchContext.js +5 -5
- package/dist/contexts/ThumbnailsContext.js +5 -5
- package/dist/{floating-ui.react-dom-6b2fe0df.js → floating-ui.react-dom-d22a10b4.js} +3 -3
- package/dist/{index-f563c6f0.js → index-3bf64864.js} +97 -100
- package/dist/{index-35c7f4a2.js → index-c9a2990a.js} +3 -3
- package/dist/main.js +5 -5
- package/dist/types/utils/types.d.ts +5 -1
- package/dist/utils/hooks/useFileDownload.js +5 -5
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +5 -5
- package/dist/utils/hooks/usePresentPage.js +5 -5
- package/dist/utils/hooks/usePrint.js +5 -5
- package/dist/utils/hooks/useScrollToPage.js +5 -5
- package/dist/utils/hooks/useSearch.js +5 -5
- package/dist/utils/hooks/useThumbnail.js +5 -5
- package/dist/utils/hooks/useVirtualReactWindow.js +5 -5
- package/dist/utils/types.js +5 -5
- package/package.json +1 -1
- package/dist/LayoutWrapper-0470458a.js +0 -20
|
@@ -1,111 +1,111 @@
|
|
|
1
1
|
import { jsx as i, Fragment as he, jsxs as k } from "react/jsx-runtime";
|
|
2
2
|
import * as X from "react";
|
|
3
|
-
import { useRef as M, useEffect as A, useCallback as N, useState as H, useMemo as W, createContext as Be, useContext as Ze, useImperativeHandle as mn, createElement as Qe, PureComponent as
|
|
3
|
+
import { useRef as M, useEffect as A, useCallback as N, useState as H, useMemo as W, createContext as Be, useContext as Ze, useImperativeHandle as mn, createElement as Qe, PureComponent as ur, Component as pr, memo as It, Fragment as hr, forwardRef as fr } from "react";
|
|
4
4
|
import { ChevronUpIcon as qe } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as de } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as gn } from "./components/ui/Input.js";
|
|
7
|
-
import { ViewMode as
|
|
7
|
+
import { ViewMode as re, ScrollMode as ie, AnnotationSubType as $t, SelectionMode as mr, ErrorType as gr, ZoomLevel as Me } from "./utils/types.js";
|
|
8
8
|
import { useScrollModeContext as Ae } from "./contexts/ScrollModeContext.js";
|
|
9
|
-
import { useDocumentContext as
|
|
10
|
-
import { useDocumentPasswordContext as
|
|
11
|
-
import { useDarkModeContext as
|
|
9
|
+
import { useDocumentContext as oe } from "./contexts/RPDocumentContext.js";
|
|
10
|
+
import { useDocumentPasswordContext as vr } from "./contexts/DocumentPasswordContext.js";
|
|
11
|
+
import { useDarkModeContext as wr } from "./contexts/DarkModeContext.js";
|
|
12
12
|
import "./contexts/RotationContext.js";
|
|
13
|
-
import { useLayerContext as
|
|
14
|
-
import { useZoomContext as
|
|
13
|
+
import { useLayerContext as br } from "./contexts/LayerContext.js";
|
|
14
|
+
import { useZoomContext as rt } from "./contexts/ZoomContext.js";
|
|
15
15
|
import { useViewModeContext as $e } from "./contexts/ViewModeContext.js";
|
|
16
|
-
import { useVirtualScrollContext as
|
|
16
|
+
import { useVirtualScrollContext as ot } from "./contexts/VirtualScrollContext.js";
|
|
17
17
|
import { useVirtualGridContext as vn } from "./contexts/VirtualGridContext.js";
|
|
18
|
-
import { useSelectionModeContext as
|
|
18
|
+
import { useSelectionModeContext as _r } from "./contexts/SelectionModeContext.js";
|
|
19
19
|
import { useInitialStateContext as xt } from "./contexts/InitialStateContext.js";
|
|
20
|
-
import { useFullScreenContext as
|
|
20
|
+
import { useFullScreenContext as Pr } from "./contexts/FullScreenContext.js";
|
|
21
21
|
import "./contexts/FileInputContext.js";
|
|
22
22
|
import "./contexts/DropFileZoneContext.js";
|
|
23
|
-
import { findMatches as
|
|
23
|
+
import { findMatches as Tr, resetDivs as Cr, highlightMatches as yr, isMatchEntireWord as Ir } from "./utils/highlight.js";
|
|
24
24
|
import { useLayoutContainer as Te } from "./contexts/LayoutContainerContext.js";
|
|
25
25
|
import { useDimensionPagesContext as je } from "./contexts/DimensionPagesContext.js";
|
|
26
26
|
import { useLocalizationContext as pe } from "./contexts/LocalizationContext.js";
|
|
27
|
-
import { useHighlightContext as
|
|
27
|
+
import { useHighlightContext as xr } from "./contexts/HighlightContext.js";
|
|
28
28
|
import "./contexts/LicenseContext.js";
|
|
29
|
-
import { useDownloadContext as
|
|
29
|
+
import { useDownloadContext as Sr } from "./contexts/DownloadContext.js";
|
|
30
30
|
import { useSmoothScrollContext as wn } from "./contexts/SmoothScrollContext.js";
|
|
31
31
|
import "./contexts/ElementPageContext.js";
|
|
32
32
|
import { usePagesRotateContext as it } from "./contexts/PagesRotateContext.js";
|
|
33
|
-
import { Queue as
|
|
34
|
-
import { renderPage as
|
|
35
|
-
import { useGlobalCurrentPage as
|
|
33
|
+
import { Queue as Rr } from "./utils/Queue.js";
|
|
34
|
+
import { renderPage as Lr } from "./utils/renderPage.js";
|
|
35
|
+
import { useGlobalCurrentPage as Er } from "./contexts/GlobalCurrentPage.js";
|
|
36
36
|
import { useLoaderContext as St } from "./contexts/LoaderContext.js";
|
|
37
37
|
import { useToolComponentContext as xe } from "./contexts/ToolComponentContext.js";
|
|
38
38
|
import { useIconToolContext as ge } from "./contexts/IconToolContext.js";
|
|
39
|
-
import { useOtherToolContext as
|
|
40
|
-
import { useEventCallbackContext as
|
|
41
|
-
import { useThemeContext as
|
|
39
|
+
import { useOtherToolContext as Nr } from "./contexts/OtherToolContext.js";
|
|
40
|
+
import { useEventCallbackContext as Or } from "./contexts/EventCallbackContext.js";
|
|
41
|
+
import { useThemeContext as Dr } from "./contexts/ThemeContext.js";
|
|
42
42
|
import "./contexts/ConfigContext.js";
|
|
43
|
-
import * as
|
|
44
|
-
import { PixelsPerInch as
|
|
45
|
-
import { ThumbnailIcon as
|
|
46
|
-
import { c as Xe, R as
|
|
43
|
+
import * as Ar from "pdfjs-dist";
|
|
44
|
+
import { PixelsPerInch as zr, AnnotationMode as Wr, RenderingCancelledException as Fr, AnnotationLayer as kr } from "pdfjs-dist";
|
|
45
|
+
import { ThumbnailIcon as Mr } from "./components/icons/Thumbnail.js";
|
|
46
|
+
import { c as Xe, R as Hr } from "./RPSplitter-f6acf13b.js";
|
|
47
47
|
import { c as se } from "./clsx-0c6e471a.js";
|
|
48
48
|
import { LoaderIcon as bn } from "./components/icons/LoaderIcon.js";
|
|
49
|
-
import { Container as
|
|
50
|
-
import { useViewportContext as Se, ViewportProvider as
|
|
51
|
-
import { useToolbarComponentContext as Ce, ToolbarComponentProvider as
|
|
52
|
-
import { WrapperLayout as
|
|
53
|
-
import { RPDropFileZone as
|
|
54
|
-
import { c as ye, L as
|
|
49
|
+
import { Container as $r } from "./components/layout/Container.js";
|
|
50
|
+
import { useViewportContext as Se, ViewportProvider as Gr } from "./contexts/ViewportContext.js";
|
|
51
|
+
import { useToolbarComponentContext as Ce, ToolbarComponentProvider as Ur } from "./contexts/ToolbarComponentContext.js";
|
|
52
|
+
import { WrapperLayout as Vr } from "./components/layout/WrapperLayout.js";
|
|
53
|
+
import { RPDropFileZone as qr } from "./components/RPDropFileZone.js";
|
|
54
|
+
import { c as ye, L as Br } from "./LayoutWrapper-60db8675.js";
|
|
55
55
|
import { SkipLink as Gt } from "./components/layout/SkipLink.js";
|
|
56
56
|
import { c as ne, S as Ut } from "./SearchCloseButton-08d57275.js";
|
|
57
57
|
import { UICheckbox as Vt } from "./components/ui/Checkbox.js";
|
|
58
|
-
import { useIconContext as ve, IconProvider as
|
|
58
|
+
import { useIconContext as ve, IconProvider as Zr } from "./contexts/IconContext.js";
|
|
59
59
|
import K from "./components/ui/RPTooltip.js";
|
|
60
60
|
import { UIDropDown as Rt } from "./components/ui/DropDown.js";
|
|
61
61
|
import { MenuItem as Ie } from "./components/layout/toolbar/MenuItem.js";
|
|
62
62
|
import { MenuSeparator as Lt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
63
63
|
import { dateFormatter as qt } from "./utils/dateFormatter.js";
|
|
64
|
-
import { PropertyItem as
|
|
64
|
+
import { PropertyItem as jr } from "./components/layout/toolbar/PropertyItem.js";
|
|
65
65
|
import "./RotateTool.module-67946714.js";
|
|
66
66
|
import { withRef as at } from "./utils/withRef.js";
|
|
67
|
-
import { useInfiniteScroll as
|
|
68
|
-
import { MAX_ZOOM_SCALE as Bt, THUMBNAIL_MIN_WIDTH as
|
|
69
|
-
import { SimpleLinkService as
|
|
70
|
-
import { annotationsEvents as
|
|
71
|
-
import { normalizeSingleKeyword as
|
|
72
|
-
import { CustomElement as
|
|
73
|
-
import { getGridDimension as Et, getPositionFromPage as
|
|
74
|
-
import { useMousePressed as
|
|
75
|
-
import { useGrabScroll as
|
|
76
|
-
import { usePinch as
|
|
67
|
+
import { useInfiniteScroll as Kr } from "./utils/hooks/useInfiniteScroll.js";
|
|
68
|
+
import { MAX_ZOOM_SCALE as Bt, THUMBNAIL_MIN_WIDTH as Xr } from "./utils/constants.js";
|
|
69
|
+
import { SimpleLinkService as Qr } from "./utils/link_service.js";
|
|
70
|
+
import { annotationsEvents as Yr, annotationEventsHandler as Jr, handleAnnotationWidget as eo, handleAnnotationLink as to, bindLayerEvents as no, fixTabIndexAccessibility as Zt, enhanceLinkAccessibility as jt, unbindLayerEvents as Kt } from "./utils/annotations.js";
|
|
71
|
+
import { normalizeSingleKeyword as ro, sortHighlightPosition as oo, unwrap as io } from "./components/page/searchHighlight.js";
|
|
72
|
+
import { CustomElement as ao } from "./components/page/CustomElement.js";
|
|
73
|
+
import { getGridDimension as Et, getPositionFromPage as so, getPageFromPosition as co } from "./utils/calculatePage.js";
|
|
74
|
+
import { useMousePressed as lo } from "./utils/hooks/useMousePressed.js";
|
|
75
|
+
import { useGrabScroll as uo } from "./utils/hooks/useGrabScroll.js";
|
|
76
|
+
import { usePinch as po } from "./utils/hooks/usePinch.js";
|
|
77
77
|
import { useDebounce as Nt } from "./utils/hooks/useDebounce.js";
|
|
78
|
-
import
|
|
79
|
-
import { useCopyText as
|
|
78
|
+
import ho from "./components/ui/PasswordModal.js";
|
|
79
|
+
import { useCopyText as fo } from "./utils/hooks/useCopyText.js";
|
|
80
80
|
import { getScrollDistance as ke } from "./utils/getScrollDistance.js";
|
|
81
|
-
import { getWordPositionInPage as
|
|
82
|
-
import { getThumbnailViewport as
|
|
81
|
+
import { getWordPositionInPage as mo } from "./utils/getWordPositionInPage.js";
|
|
82
|
+
import { getThumbnailViewport as go } from "./utils/getThumbnailViewport.js";
|
|
83
83
|
import { smoothScrollTo as ht } from "./utils/smoothScrollTo.js";
|
|
84
|
-
import { appConsole as
|
|
84
|
+
import { appConsole as vo } from "./utils/appConsole.js";
|
|
85
85
|
import { FileUploadTool as _n } from "./components/layout/toolbar/FileUploadTool.js";
|
|
86
|
-
import { DarkModeTool as
|
|
87
|
-
import { ThreeDotIcon as
|
|
88
|
-
import { c as
|
|
89
|
-
import { D as
|
|
90
|
-
import { a as
|
|
91
|
-
import { CloseIcon as
|
|
92
|
-
import { DocumentProperties as
|
|
93
|
-
import { RotateTool as
|
|
94
|
-
import { ViewModeTool as
|
|
95
|
-
import { ScrollModeTool as
|
|
96
|
-
import { FileDownloadDefaultIcon as
|
|
97
|
-
import { PrintDefaultTool as
|
|
86
|
+
import { DarkModeTool as wo } from "./components/layout/toolbar/DarkModeTool.js";
|
|
87
|
+
import { ThreeDotIcon as bo } from "./components/icons/ThreeDotIcon.js";
|
|
88
|
+
import { c as _o, u as Ot, P as Ke, a as Ve, b as Dt, k as Po, e as To, i as Co } from "./index-c9a2990a.js";
|
|
89
|
+
import { D as yo, d as ft } from "./floating-ui.react-dom-d22a10b4.js";
|
|
90
|
+
import { a as Io, h as xo, u as So, F as Ro, b as Lo, G as tt } from "./index-3bf64864.js";
|
|
91
|
+
import { CloseIcon as Eo } from "./components/icons/CloseIcon.js";
|
|
92
|
+
import { DocumentProperties as No } from "./components/layout/toolbar/DocumentProperties.js";
|
|
93
|
+
import { RotateTool as Oo } from "./components/layout/toolbar/RotateTool.js";
|
|
94
|
+
import { ViewModeTool as Do } from "./components/layout/toolbar/ViewModeTool.js";
|
|
95
|
+
import { ScrollModeTool as Ao } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
96
|
+
import { FileDownloadDefaultIcon as zo } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
97
|
+
import { PrintDefaultTool as Wo } from "./components/icons/PrintDefaultIcon.js";
|
|
98
98
|
import { FullScreenTool as Pn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
99
99
|
import { GoToDownIcon as Tn } from "./components/icons/GoToDownIcon.js";
|
|
100
|
-
import { SelectionModeTool as
|
|
101
|
-
import { ZoomInIcon as
|
|
102
|
-
import { ZoomOutIcon as
|
|
103
|
-
import { isZoomOutDisabled as
|
|
100
|
+
import { SelectionModeTool as Fo } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
101
|
+
import { ZoomInIcon as ko } from "./components/icons/ZoomInIcon.js";
|
|
102
|
+
import { ZoomOutIcon as Mo } from "./components/icons/ZoomOutIcon.js";
|
|
103
|
+
import { isZoomOutDisabled as Ho, isZoomInDisabled as $o } from "./utils/zoom.js";
|
|
104
104
|
import { SearchIcon as Cn } from "./components/icons/SearchIcon.js";
|
|
105
|
-
import { ClearIcon as
|
|
105
|
+
import { ClearIcon as Go } from "./components/icons/ClearIcon.js";
|
|
106
106
|
import { InfoIcon as Xt } from "./components/icons/InfoIcon.js";
|
|
107
107
|
const yn = () => {
|
|
108
|
-
const { viewMode: t } = $e(), { scrollMode: e } = Ae(), { virtualScrollRef: n, virtualScrollableElementRef:
|
|
108
|
+
const { viewMode: t } = $e(), { scrollMode: e } = Ae(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = ot(), { setFocusedPage: a } = ce(), c = M(), { columnCount: d } = vn(), { widths: s, heights: f } = je(), m = M(e), C = M(t), u = M(d), { targetScrollPage: T } = wn();
|
|
109
109
|
A(() => {
|
|
110
110
|
n != null && n.scrollToItem && (c.current = n);
|
|
111
111
|
}, [n]), A(() => {
|
|
@@ -113,7 +113,7 @@ const yn = () => {
|
|
|
113
113
|
}, [e, t]);
|
|
114
114
|
const b = N(
|
|
115
115
|
(y, w) => {
|
|
116
|
-
if (!
|
|
116
|
+
if (!r)
|
|
117
117
|
return;
|
|
118
118
|
const g = Math.ceil(y / 2) * 2 - 1;
|
|
119
119
|
if (y === g + 1) {
|
|
@@ -122,19 +122,19 @@ const yn = () => {
|
|
|
122
122
|
top: 0
|
|
123
123
|
};
|
|
124
124
|
return new Promise(
|
|
125
|
-
(l) => ht(
|
|
125
|
+
(l) => ht(r, p, l)
|
|
126
126
|
);
|
|
127
127
|
}
|
|
128
128
|
const h = {
|
|
129
129
|
left: 0,
|
|
130
130
|
top: 0
|
|
131
131
|
};
|
|
132
|
-
return
|
|
132
|
+
return r == null ? void 0 : r.scrollTo({
|
|
133
133
|
...h,
|
|
134
134
|
behavior: w
|
|
135
135
|
});
|
|
136
136
|
},
|
|
137
|
-
[
|
|
137
|
+
[r, s, ht]
|
|
138
138
|
);
|
|
139
139
|
return A(() => {
|
|
140
140
|
m.current = e, C.current = t;
|
|
@@ -145,7 +145,7 @@ const yn = () => {
|
|
|
145
145
|
a(y);
|
|
146
146
|
const g = y - 1;
|
|
147
147
|
let h = g, p = 0;
|
|
148
|
-
if (C.current ===
|
|
148
|
+
if (C.current === re.DUAL_PAGE && m.current === ie.PAGE_SCROLLING) {
|
|
149
149
|
b(y, w);
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
@@ -153,9 +153,9 @@ const yn = () => {
|
|
|
153
153
|
a(y);
|
|
154
154
|
return;
|
|
155
155
|
}
|
|
156
|
-
if (!c.current || !
|
|
156
|
+
if (!c.current || !o)
|
|
157
157
|
return;
|
|
158
|
-
const l =
|
|
158
|
+
const l = o;
|
|
159
159
|
w === "smooth" && (T.current = y);
|
|
160
160
|
const { columnsWidth: v, rowsHeight: _ } = Et(
|
|
161
161
|
{ widths: s, heights: f },
|
|
@@ -172,7 +172,7 @@ const yn = () => {
|
|
|
172
172
|
behavior: w
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
|
-
if (C.current ===
|
|
175
|
+
if (C.current === re.DUAL_PAGE) {
|
|
176
176
|
p = g % 2, h = Math.floor(g / 2);
|
|
177
177
|
const R = ke(v, p), O = ke(_, h), D = {
|
|
178
178
|
left: Math.floor(R),
|
|
@@ -193,7 +193,7 @@ const yn = () => {
|
|
|
193
193
|
});
|
|
194
194
|
},
|
|
195
195
|
[
|
|
196
|
-
|
|
196
|
+
o,
|
|
197
197
|
d,
|
|
198
198
|
b,
|
|
199
199
|
a,
|
|
@@ -202,15 +202,15 @@ const yn = () => {
|
|
|
202
202
|
s
|
|
203
203
|
]
|
|
204
204
|
) };
|
|
205
|
-
},
|
|
206
|
-
const [e, n] = H(t), [
|
|
205
|
+
}, Uo = (t = 1) => {
|
|
206
|
+
const [e, n] = H(t), [o, r] = H(0), { scrollToPage: a } = yn(), c = M(1), { viewMode: d } = $e(), { scrollMode: s } = Ae(), { widths: f } = je(), { pagesRef: m } = Te(), C = Nt(e, 100), u = N(
|
|
207
207
|
(h) => {
|
|
208
208
|
if (!/^[0-9]*$/g.test(h.toString()) || !h)
|
|
209
209
|
return { success: !1, currentPage: c.current };
|
|
210
210
|
const l = +h;
|
|
211
|
-
return l < 0 || l >
|
|
211
|
+
return l < 0 || l > o ? { success: !1, currentPage: c.current } : (n(l), c.current = l, { success: !0, currentPage: +h });
|
|
212
212
|
},
|
|
213
|
-
[
|
|
213
|
+
[o]
|
|
214
214
|
), T = N(u, [u]), b = N(
|
|
215
215
|
(h) => {
|
|
216
216
|
const p = u(h);
|
|
@@ -222,11 +222,11 @@ const yn = () => {
|
|
|
222
222
|
if (!m || p)
|
|
223
223
|
return !1;
|
|
224
224
|
const l = p ? f[h] : f[h - 1], v = p ? f[h + 1] : f[h];
|
|
225
|
-
return d ===
|
|
226
|
-
}, [d, f, m,
|
|
225
|
+
return d === re.DUAL_PAGE && l + v < m.clientWidth;
|
|
226
|
+
}, [d, f, m, o]), y = N(() => {
|
|
227
227
|
let h = e - 1;
|
|
228
228
|
P(h) && (h = e - 2), b(h);
|
|
229
|
-
}, [b, e, d, s, P]), w = W(() => d ===
|
|
229
|
+
}, [b, e, d, s, P]), w = W(() => d === re.DUAL_PAGE && s === ie.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, d, s]), g = N(() => {
|
|
230
230
|
if (w)
|
|
231
231
|
return;
|
|
232
232
|
let h = e + 1;
|
|
@@ -234,9 +234,9 @@ const yn = () => {
|
|
|
234
234
|
}, [b, e, P, d, s, w]);
|
|
235
235
|
return {
|
|
236
236
|
focusedPage: C,
|
|
237
|
-
totalPages:
|
|
237
|
+
totalPages: o,
|
|
238
238
|
setFocusedPage: T,
|
|
239
|
-
setTotalPages:
|
|
239
|
+
setTotalPages: r,
|
|
240
240
|
nextPage: g,
|
|
241
241
|
prevPage: y,
|
|
242
242
|
goToPage: b
|
|
@@ -255,19 +255,19 @@ const yn = () => {
|
|
|
255
255
|
}
|
|
256
256
|
}), ce = () => {
|
|
257
257
|
const t = Ze(In);
|
|
258
|
-
return typeof (t == null ? void 0 : t.focusedPage) > "u" &&
|
|
258
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && vo.error("Please use this hooks inside children component of RPProvider"), t;
|
|
259
259
|
}, bc = ({ children: t }) => {
|
|
260
|
-
const { pdf: e } =
|
|
260
|
+
const { pdf: e } = oe(), { setCurrentPage: n } = Er(), { focusedPage: o, totalPages: r, setFocusedPage: a, setTotalPages: c, goToPage: d, nextPage: s, prevPage: f } = Uo();
|
|
261
261
|
return A(() => {
|
|
262
262
|
e != null && e.numPages && (c(e.numPages), a(1));
|
|
263
263
|
}, [e, c, a]), A(() => {
|
|
264
|
-
n(
|
|
265
|
-
}, [
|
|
264
|
+
n(o);
|
|
265
|
+
}, [o, n]), /* @__PURE__ */ i(
|
|
266
266
|
In.Provider,
|
|
267
267
|
{
|
|
268
268
|
value: {
|
|
269
|
-
focusedPage:
|
|
270
|
-
totalPages:
|
|
269
|
+
focusedPage: o,
|
|
270
|
+
totalPages: r,
|
|
271
271
|
setFocusedPage: a,
|
|
272
272
|
setTotalPages: c,
|
|
273
273
|
nextPage: s,
|
|
@@ -277,12 +277,12 @@ const yn = () => {
|
|
|
277
277
|
children: t
|
|
278
278
|
}
|
|
279
279
|
);
|
|
280
|
-
},
|
|
281
|
-
const { pdf: t, pages: e } =
|
|
280
|
+
}, Vo = () => {
|
|
281
|
+
const { pdf: t, pages: e } = oe(), [n, o] = H({
|
|
282
282
|
loadedPages: 0,
|
|
283
283
|
totalPages: 0,
|
|
284
284
|
percentage: 0
|
|
285
|
-
}), [
|
|
285
|
+
}), [r, a] = H(!1), [c, d] = H(!1), [s, f] = H(null), [m, C] = H(void 0), u = M(!1);
|
|
286
286
|
A(() => {
|
|
287
287
|
u.current;
|
|
288
288
|
}, [u]);
|
|
@@ -291,7 +291,7 @@ const yn = () => {
|
|
|
291
291
|
const l = document.querySelector(".rp-print-zone");
|
|
292
292
|
l && l.remove();
|
|
293
293
|
}, []), b = N(() => {
|
|
294
|
-
u.current = !1, a(!1), d(!1), f(null), C(void 0),
|
|
294
|
+
u.current = !1, a(!1), d(!1), f(null), C(void 0), o({
|
|
295
295
|
loadedPages: 0,
|
|
296
296
|
totalPages: 0,
|
|
297
297
|
percentage: 0
|
|
@@ -311,7 +311,7 @@ const yn = () => {
|
|
|
311
311
|
b();
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
|
-
const O = S /
|
|
314
|
+
const O = S / zr.PDF;
|
|
315
315
|
l.width = Math.floor(I.width * O), l.height = Math.floor(I.height * O);
|
|
316
316
|
const D = l.getContext("2d");
|
|
317
317
|
D.save(), D.fillStyle = "rgb(255, 255, 255)", D.fillRect(0, 0, l.width, l.height), D.restore();
|
|
@@ -328,14 +328,14 @@ const yn = () => {
|
|
|
328
328
|
transform: [O, 0, 0, O, 0, 0],
|
|
329
329
|
viewport: z.getViewport({ scale: 1, rotation: I.rotation }),
|
|
330
330
|
intent: "print",
|
|
331
|
-
annotationMode:
|
|
331
|
+
annotationMode: Wr.ENABLE_STORAGE,
|
|
332
332
|
optionalContentConfigPromise: x,
|
|
333
333
|
printAnnotationStorage: E
|
|
334
334
|
};
|
|
335
335
|
try {
|
|
336
336
|
return z.render(L).promise;
|
|
337
337
|
} catch (F) {
|
|
338
|
-
throw F instanceof
|
|
338
|
+
throw F instanceof Fr || console.error(F), F;
|
|
339
339
|
}
|
|
340
340
|
}, w = N(() => {
|
|
341
341
|
const l = window.print;
|
|
@@ -407,7 +407,7 @@ const yn = () => {
|
|
|
407
407
|
const F = await g(_);
|
|
408
408
|
I.push(F);
|
|
409
409
|
const G = parseFloat((I.length / O * 100).toFixed(2));
|
|
410
|
-
|
|
410
|
+
o({
|
|
411
411
|
loadedPages: z,
|
|
412
412
|
totalPages: O,
|
|
413
413
|
percentage: G
|
|
@@ -438,7 +438,7 @@ const yn = () => {
|
|
|
438
438
|
print: p,
|
|
439
439
|
cancel: P,
|
|
440
440
|
progress: n,
|
|
441
|
-
isComplete:
|
|
441
|
+
isComplete: r,
|
|
442
442
|
isError: c,
|
|
443
443
|
error: s,
|
|
444
444
|
showDefaultProgress: m
|
|
@@ -461,8 +461,8 @@ const yn = () => {
|
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
}), _c = ({ children: t }) => {
|
|
464
|
-
const [e, n] = H(null), [
|
|
465
|
-
w && typeof w == "function" &&
|
|
464
|
+
const [e, n] = H(null), [o, r] = H(null), { print: a, cancel: c, progress: d, isComplete: s, isError: f, error: m, showDefaultProgress: C } = Vo(), u = N((w) => {
|
|
465
|
+
w && typeof w == "function" && r(() => w);
|
|
466
466
|
}, []), T = (w) => {
|
|
467
467
|
m && w(m);
|
|
468
468
|
}, b = N(
|
|
@@ -472,8 +472,8 @@ const yn = () => {
|
|
|
472
472
|
[d, e]
|
|
473
473
|
);
|
|
474
474
|
A(() => {
|
|
475
|
-
s &&
|
|
476
|
-
}, [s,
|
|
475
|
+
s && o && P();
|
|
476
|
+
}, [s, o]), A(() => {
|
|
477
477
|
f && T((w) => {
|
|
478
478
|
console.error(w);
|
|
479
479
|
});
|
|
@@ -481,7 +481,7 @@ const yn = () => {
|
|
|
481
481
|
d && e && e(d);
|
|
482
482
|
}, [d, e]);
|
|
483
483
|
const P = () => {
|
|
484
|
-
|
|
484
|
+
o && (o(), r(null));
|
|
485
485
|
}, y = {
|
|
486
486
|
print: a,
|
|
487
487
|
cancel: c,
|
|
@@ -497,13 +497,13 @@ const yn = () => {
|
|
|
497
497
|
if (!t)
|
|
498
498
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
499
499
|
return t;
|
|
500
|
-
},
|
|
501
|
-
const [t, e] = H({}), { pages: n } =
|
|
500
|
+
}, qo = () => {
|
|
501
|
+
const [t, e] = H({}), { pages: n } = oe(), o = W(() => Object.keys(t).length, [t]), r = N(
|
|
502
502
|
(c) => {
|
|
503
503
|
if (!n.size)
|
|
504
504
|
return;
|
|
505
505
|
const d = c > n.size ? n.size : c, f = Array.from(n.values()).slice(0, d).map((m) => {
|
|
506
|
-
const { thumbnailViewport: C, scale: u } =
|
|
506
|
+
const { thumbnailViewport: C, scale: u } = go(m.page, m.defaultRotation);
|
|
507
507
|
return {
|
|
508
508
|
scale: u,
|
|
509
509
|
page: m.page,
|
|
@@ -517,8 +517,8 @@ const yn = () => {
|
|
|
517
517
|
[n]
|
|
518
518
|
);
|
|
519
519
|
A(() => {
|
|
520
|
-
|
|
521
|
-
}, [
|
|
520
|
+
r(10);
|
|
521
|
+
}, [r]);
|
|
522
522
|
const a = N(
|
|
523
523
|
(c) => {
|
|
524
524
|
if (!n)
|
|
@@ -537,7 +537,7 @@ const yn = () => {
|
|
|
537
537
|
},
|
|
538
538
|
[n]
|
|
539
539
|
);
|
|
540
|
-
return { thumbnailPages: t, addPage: a, addToPage:
|
|
540
|
+
return { thumbnailPages: t, addPage: a, addToPage: r, thumbnailLength: o };
|
|
541
541
|
}, Sn = Be({
|
|
542
542
|
thumbnailPages: {},
|
|
543
543
|
addPage: (t) => {
|
|
@@ -552,16 +552,16 @@ const yn = () => {
|
|
|
552
552
|
children: t,
|
|
553
553
|
initialThumbnailsVisible: e
|
|
554
554
|
}) => {
|
|
555
|
-
const { thumbnailPages: n, addPage:
|
|
555
|
+
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = qo(), [c, d] = H(e);
|
|
556
556
|
return /* @__PURE__ */ i(
|
|
557
557
|
Sn.Provider,
|
|
558
558
|
{
|
|
559
|
-
value: { thumbnailPages: n, addPage:
|
|
559
|
+
value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a, active: c, setActive: d },
|
|
560
560
|
children: t
|
|
561
561
|
}
|
|
562
562
|
);
|
|
563
|
-
},
|
|
564
|
-
const [n,
|
|
563
|
+
}, Bo = (t = {}, e = "") => {
|
|
564
|
+
const [n, o] = H(e), [r, a] = H(!1), { pdf: c, pages: d } = oe(), { widths: s, heights: f } = je(), m = M(!n), { currentZoom: C } = rt(), [u, T] = H([]), { setFocusedPage: b } = ce(), { columnCount: P } = $e(), { pageRotate: y } = it(), [w, g] = H(0), { pageScrollElementRef: h, virtualScrollableElementRef: p } = ot(), { scrollMode: l } = Ae(), { pagesRef: v } = Te(), _ = M({}), I = M(0), S = W(() => w === 0 ? null : u[w - 1], [w, u]), x = W(() => u.length, [u]), R = N(
|
|
565
565
|
(E) => {
|
|
566
566
|
if (E === 0)
|
|
567
567
|
return;
|
|
@@ -583,7 +583,7 @@ const yn = () => {
|
|
|
583
583
|
const B = {
|
|
584
584
|
height: f[L.page - 1],
|
|
585
585
|
width: s[L.page - 1]
|
|
586
|
-
}, Z = y[L.page], { leftInPage: ae, topInPage: $ } =
|
|
586
|
+
}, Z = y[L.page], { leftInPage: ae, topInPage: $ } = mo(
|
|
587
587
|
B,
|
|
588
588
|
v,
|
|
589
589
|
L.rect,
|
|
@@ -643,7 +643,7 @@ const yn = () => {
|
|
|
643
643
|
m.current = !1, a(!0), T([]), g(0), z(c).then((E) => {
|
|
644
644
|
_.current = E;
|
|
645
645
|
const F = Object.keys(E).reduce((G, U) => {
|
|
646
|
-
const V =
|
|
646
|
+
const V = Tr(
|
|
647
647
|
[n],
|
|
648
648
|
E[U],
|
|
649
649
|
Number(U) - 1,
|
|
@@ -657,8 +657,8 @@ const yn = () => {
|
|
|
657
657
|
}).finally(() => a(!1));
|
|
658
658
|
}, [n, z, c, t]), {
|
|
659
659
|
search: n,
|
|
660
|
-
setSearch:
|
|
661
|
-
loading:
|
|
660
|
+
setSearch: o,
|
|
661
|
+
loading: r,
|
|
662
662
|
matches: u,
|
|
663
663
|
totalMatches: x,
|
|
664
664
|
currentMatchPosition: w,
|
|
@@ -687,8 +687,8 @@ const yn = () => {
|
|
|
687
687
|
children: t,
|
|
688
688
|
initialSearch: e
|
|
689
689
|
}) => {
|
|
690
|
-
const [n,
|
|
691
|
-
loading:
|
|
690
|
+
const [n, o] = H({}), {
|
|
691
|
+
loading: r,
|
|
692
692
|
setSearch: a,
|
|
693
693
|
totalMatches: c,
|
|
694
694
|
currentMatchPosition: d,
|
|
@@ -698,14 +698,14 @@ const yn = () => {
|
|
|
698
698
|
nextMatch: C,
|
|
699
699
|
prevMatch: u,
|
|
700
700
|
setCurrentMatchPosition: T
|
|
701
|
-
} =
|
|
701
|
+
} = Bo(n, e);
|
|
702
702
|
return /* @__PURE__ */ i(
|
|
703
703
|
Ln.Provider,
|
|
704
704
|
{
|
|
705
705
|
value: {
|
|
706
706
|
searchOptions: n,
|
|
707
|
-
setSearchOptions:
|
|
708
|
-
loading:
|
|
707
|
+
setSearchOptions: o,
|
|
708
|
+
loading: r,
|
|
709
709
|
setSearch: a,
|
|
710
710
|
totalMatches: c,
|
|
711
711
|
currentMatchPosition: d,
|
|
@@ -720,9 +720,9 @@ const yn = () => {
|
|
|
720
720
|
}
|
|
721
721
|
);
|
|
722
722
|
}, At = () => Ze(Ln), En = Be(null), Cc = ({ children: t }) => {
|
|
723
|
-
const e = M(!1), [n,
|
|
724
|
-
|
|
725
|
-
}, []), a = W(() => new
|
|
723
|
+
const e = M(!1), [n, o] = H([]), r = N((s) => {
|
|
724
|
+
o((f) => [...f, { id: s.page.pageNumber.toString(), data: s, priority: 0 }]);
|
|
725
|
+
}, []), a = W(() => new Rr(r), [r]), { focusedPage: c } = ce(), d = N((s) => (e.current = !0, Lr(
|
|
726
726
|
s.data.page,
|
|
727
727
|
s.data.canvasElem,
|
|
728
728
|
s.data.options
|
|
@@ -740,7 +740,7 @@ const yn = () => {
|
|
|
740
740
|
const f = a.dequeue();
|
|
741
741
|
f ? d(f).finally(() => {
|
|
742
742
|
s();
|
|
743
|
-
}) : (e.current = !1,
|
|
743
|
+
}) : (e.current = !1, o(a.peekAll()));
|
|
744
744
|
};
|
|
745
745
|
s();
|
|
746
746
|
}, [a, d, n]), /* @__PURE__ */ i(En.Provider, { value: a, children: t });
|
|
@@ -764,17 +764,17 @@ const yn = () => {
|
|
|
764
764
|
"rp-page-wrapper": "_rp-page-wrapper_ii91u_1",
|
|
765
765
|
"rp-page": "_rp-page_ii91u_1",
|
|
766
766
|
"rp-loader-wrapper": "_rp-loader-wrapper_ii91u_15"
|
|
767
|
-
},
|
|
768
|
-
const { pageNumber: e, onLoaded: n, onLoading:
|
|
767
|
+
}, Zo = (t) => {
|
|
768
|
+
const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = M(null), { pages: a } = oe(), { pageRotate: c } = it(), d = M(), { currentZoom: s } = rt(), { interactiveForm: f } = xt(), m = Nn(), C = M(`page-${e}`);
|
|
769
769
|
return A(() => {
|
|
770
770
|
if (!a || s === 0)
|
|
771
771
|
return;
|
|
772
772
|
const u = a.get(e);
|
|
773
|
-
if (
|
|
774
|
-
const T =
|
|
773
|
+
if (r.current && u) {
|
|
774
|
+
const T = r.current;
|
|
775
775
|
T.hidden = !0;
|
|
776
776
|
const b = d.current;
|
|
777
|
-
b && b.cancel(),
|
|
777
|
+
b && b.cancel(), o && o(), m.enqueue(
|
|
778
778
|
C.current,
|
|
779
779
|
{
|
|
780
780
|
page: u.page,
|
|
@@ -793,22 +793,22 @@ const yn = () => {
|
|
|
793
793
|
return () => {
|
|
794
794
|
m.removeQueue(C.current);
|
|
795
795
|
};
|
|
796
|
-
}, [a, e, c, s,
|
|
797
|
-
},
|
|
796
|
+
}, [a, e, c, s, o, n, m, f]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: r });
|
|
797
|
+
}, jo = "_selecting_1oep2_10", Ko = "_markedContent_1oep2_33", _e = {
|
|
798
798
|
"rp-text-layer": "_rp-text-layer_1oep2_1",
|
|
799
|
-
selecting:
|
|
800
|
-
markedContent:
|
|
799
|
+
selecting: jo,
|
|
800
|
+
markedContent: Ko,
|
|
801
801
|
"rp-text-layer-text": "_rp-text-layer-text_1oep2_52"
|
|
802
|
-
},
|
|
803
|
-
const { pageNumber: e } = t, { pages: n } =
|
|
802
|
+
}, Xo = (t) => {
|
|
803
|
+
const { pageNumber: e } = t, { pages: n } = oe(), o = M(null), { matches: r, currentMatch: a } = At(), [c, d] = H(
|
|
804
804
|
[]
|
|
805
|
-
), s = M(), f = M(), m = M([]), C = W(() =>
|
|
805
|
+
), s = M(), f = M(), m = M([]), C = W(() => r.filter((g) => g.pageIndex === e - 1), [r, e]), u = N(
|
|
806
806
|
(g, h, p = !1) => {
|
|
807
|
-
if (p &&
|
|
807
|
+
if (p && Cr(g, h), !C.length) {
|
|
808
808
|
m.current = [], d([]);
|
|
809
809
|
return;
|
|
810
810
|
}
|
|
811
|
-
const l =
|
|
811
|
+
const l = yr(C, g, h);
|
|
812
812
|
d(l);
|
|
813
813
|
},
|
|
814
814
|
[C]
|
|
@@ -890,9 +890,9 @@ const yn = () => {
|
|
|
890
890
|
(h = T.current) == null || h.abort(), T.current = void 0;
|
|
891
891
|
}), [P]);
|
|
892
892
|
const y = N(() => {
|
|
893
|
-
|
|
893
|
+
o.current && o.current.classList.add(_e.selecting);
|
|
894
894
|
}, []), w = N(() => {
|
|
895
|
-
|
|
895
|
+
o.current && o.current.classList.remove(_e.selecting);
|
|
896
896
|
}, []);
|
|
897
897
|
return A(() => {
|
|
898
898
|
if (m.current.forEach((p) => {
|
|
@@ -910,12 +910,12 @@ const yn = () => {
|
|
|
910
910
|
}));
|
|
911
911
|
}, [a, c, C]), A(() => {
|
|
912
912
|
const g = n.get(e);
|
|
913
|
-
if (!g || !
|
|
913
|
+
if (!g || !o.current)
|
|
914
914
|
return;
|
|
915
|
-
const h =
|
|
915
|
+
const h = o.current;
|
|
916
916
|
return s.current && s.current.cancel(), g.page.getTextContent().then((p) => {
|
|
917
917
|
const l = g.page.getViewport({ scale: 1 });
|
|
918
|
-
return s.current = new
|
|
918
|
+
return s.current = new Ar.TextLayer({
|
|
919
919
|
viewport: l,
|
|
920
920
|
textContentSource: p,
|
|
921
921
|
container: h
|
|
@@ -928,7 +928,7 @@ const yn = () => {
|
|
|
928
928
|
const l = (_ = s.current) == null ? void 0 : _.textDivs;
|
|
929
929
|
l && f.current && u(f.current, l);
|
|
930
930
|
const v = document.createElement("div");
|
|
931
|
-
v.className = "endOfContent", (I =
|
|
931
|
+
v.className = "endOfContent", (I = o.current) == null || I.appendChild(v);
|
|
932
932
|
}).catch(() => {
|
|
933
933
|
}), () => {
|
|
934
934
|
var p;
|
|
@@ -936,7 +936,7 @@ const yn = () => {
|
|
|
936
936
|
};
|
|
937
937
|
}, [n, e]), A(() => {
|
|
938
938
|
var p;
|
|
939
|
-
[].slice.call(
|
|
939
|
+
[].slice.call(o.current.children).forEach((l) => {
|
|
940
940
|
l.classList.add(_e["rp-text-layer-text"]);
|
|
941
941
|
});
|
|
942
942
|
const h = (p = s.current) == null ? void 0 : p.textDivs;
|
|
@@ -947,32 +947,32 @@ const yn = () => {
|
|
|
947
947
|
"data-rp-text-layer": !0,
|
|
948
948
|
"data-rp": `page-${e}-textLayer`,
|
|
949
949
|
className: _e["rp-text-layer"],
|
|
950
|
-
ref:
|
|
950
|
+
ref: o,
|
|
951
951
|
onMouseDown: y,
|
|
952
952
|
onMouseUp: w
|
|
953
953
|
}
|
|
954
954
|
);
|
|
955
|
-
},
|
|
955
|
+
}, Qo = {
|
|
956
956
|
"rp-annotation-layer": "_rp-annotation-layer_1udza_1"
|
|
957
957
|
};
|
|
958
|
-
let
|
|
959
|
-
const
|
|
960
|
-
const { pageNumber: e } = t, n = M(null), { pages:
|
|
958
|
+
let Yo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
959
|
+
const Jo = (t) => {
|
|
960
|
+
const { pageNumber: e } = t, n = M(null), { pages: o, pdf: r } = oe(), { interactiveForm: a } = xt(), c = M(), [d, s] = H(), { goToPage: f } = ce(), { scrollMode: m } = Ae(), { print: C } = st(), { download: u } = Xn(), T = M(null), b = W(() => o.get(e), [o, e]), P = W(() => b == null ? void 0 : b.page.getViewport(), [b]);
|
|
961
961
|
A(() => {
|
|
962
962
|
c.current && (c.current.div.replaceChildren(), c.current = void 0);
|
|
963
|
-
}, [
|
|
963
|
+
}, [r]), A(() => {
|
|
964
964
|
b && b.page.getAnnotations().then((w) => {
|
|
965
965
|
c.current = void 0, s(w), n.current && (n.current.innerText = "");
|
|
966
966
|
});
|
|
967
967
|
}, [b]);
|
|
968
968
|
const y = N(
|
|
969
969
|
(w) => {
|
|
970
|
-
!d || !
|
|
970
|
+
!d || !r || (Yr(w), Jr(w, r, d).then((g) => {
|
|
971
971
|
var h, p;
|
|
972
972
|
((h = g == null ? void 0 : g.data) == null ? void 0 : h.action) === "Print" ? C() : ((p = g == null ? void 0 : g.data) == null ? void 0 : p.action) === "SaveAs" && u();
|
|
973
973
|
}));
|
|
974
974
|
},
|
|
975
|
-
[
|
|
975
|
+
[r, d, m, C, u]
|
|
976
976
|
);
|
|
977
977
|
return A(() => {
|
|
978
978
|
if (!b || !d)
|
|
@@ -989,17 +989,17 @@ const Jr = (t) => {
|
|
|
989
989
|
const { annotationType: v } = l;
|
|
990
990
|
switch (v) {
|
|
991
991
|
case $t.Link:
|
|
992
|
-
|
|
992
|
+
to(l);
|
|
993
993
|
break;
|
|
994
994
|
case $t.Widget:
|
|
995
|
-
|
|
995
|
+
eo(l, w, g);
|
|
996
996
|
break;
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
const h = new AbortController();
|
|
1000
1000
|
return (async () => {
|
|
1001
1001
|
var _;
|
|
1002
|
-
c.current && (c.current.div.replaceChildren(), c.current = void 0), n.current && (n.current.innerText = ""), c.current = new
|
|
1002
|
+
c.current && (c.current.div.replaceChildren(), c.current = void 0), n.current && (n.current.innerText = ""), c.current = new kr({
|
|
1003
1003
|
div: n.current,
|
|
1004
1004
|
accessibilityManager: void 0,
|
|
1005
1005
|
annotationCanvasMap: void 0,
|
|
@@ -1008,25 +1008,25 @@ const Jr = (t) => {
|
|
|
1008
1008
|
page: b.page,
|
|
1009
1009
|
viewport: w.clone({ dontFlip: !0 })
|
|
1010
1010
|
}), n.current && Kt(n.current, y);
|
|
1011
|
-
const l = await (
|
|
1011
|
+
const l = await (r == null ? void 0 : r.hasJSActions()), v = await (r == null ? void 0 : r.getFieldObjects());
|
|
1012
1012
|
if (h.signal.aborted)
|
|
1013
1013
|
throw "abort";
|
|
1014
1014
|
return (_ = c.current) == null ? void 0 : _.render({
|
|
1015
1015
|
annotations: d,
|
|
1016
|
-
annotationStorage:
|
|
1016
|
+
annotationStorage: r == null ? void 0 : r.annotationStorage,
|
|
1017
1017
|
hasJSActions: l,
|
|
1018
1018
|
fieldObjects: v,
|
|
1019
1019
|
div: n.current,
|
|
1020
1020
|
viewport: w.clone({ dontFlip: !0 }),
|
|
1021
1021
|
page: b.page,
|
|
1022
|
-
imageResourcesPath:
|
|
1022
|
+
imageResourcesPath: Yo,
|
|
1023
1023
|
renderForms: a ?? !0,
|
|
1024
|
-
linkService: new
|
|
1024
|
+
linkService: new Qr(r, f),
|
|
1025
1025
|
downloadManager: null,
|
|
1026
1026
|
enableScripting: !1
|
|
1027
1027
|
});
|
|
1028
1028
|
})().then(() => {
|
|
1029
|
-
n.current && (
|
|
1029
|
+
n.current && (no(n.current, y), Zt(n.current), jt(n.current), T.current && T.current.disconnect(), T.current = new MutationObserver(() => {
|
|
1030
1030
|
n.current && (Zt(n.current), jt(n.current));
|
|
1031
1031
|
}), T.current.observe(n.current, {
|
|
1032
1032
|
childList: !0,
|
|
@@ -1042,34 +1042,34 @@ const Jr = (t) => {
|
|
|
1042
1042
|
}), () => {
|
|
1043
1043
|
h.abort("clear"), n.current && Kt(n.current, y), T.current && (T.current.disconnect(), T.current = null);
|
|
1044
1044
|
};
|
|
1045
|
-
}, [
|
|
1045
|
+
}, [r, d, y, f]), /* @__PURE__ */ i(
|
|
1046
1046
|
"div",
|
|
1047
1047
|
{
|
|
1048
1048
|
"data-rp": `page-${e}-annotationLayer`,
|
|
1049
1049
|
style: { width: `${P == null ? void 0 : P.width}px`, height: `${P == null ? void 0 : P.height}px` },
|
|
1050
|
-
className:
|
|
1050
|
+
className: Qo["rp-annotation-layer"],
|
|
1051
1051
|
ref: n
|
|
1052
1052
|
}
|
|
1053
1053
|
);
|
|
1054
1054
|
}, ei = {
|
|
1055
1055
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1056
1056
|
}, ti = ({ pageNumber: t, viewport: e }) => {
|
|
1057
|
-
const [n,
|
|
1057
|
+
const [n, o] = H(), { pages: r } = oe(), { highlightKeywords: a } = xr(), c = !0, d = M(null), [s, f] = H(null), [m, C] = H([]);
|
|
1058
1058
|
A(() => {
|
|
1059
1059
|
d.current && f(d.current.parentElement);
|
|
1060
1060
|
}, [d]), A(() => {
|
|
1061
1061
|
(async () => {
|
|
1062
|
-
const h =
|
|
1062
|
+
const h = r.get(t);
|
|
1063
1063
|
if (!h || !d.current)
|
|
1064
1064
|
return;
|
|
1065
1065
|
const p = await h.page.getTextContent();
|
|
1066
|
-
|
|
1066
|
+
o(p);
|
|
1067
1067
|
})();
|
|
1068
|
-
}, [
|
|
1068
|
+
}, [r, t]);
|
|
1069
1069
|
const u = W(() => a ? a.map((g) => {
|
|
1070
1070
|
var h, p;
|
|
1071
1071
|
return {
|
|
1072
|
-
...
|
|
1072
|
+
...ro(g.keyword, (h = g.options) == null ? void 0 : h.matchCase, (p = g.options) == null ? void 0 : p.wholeWords),
|
|
1073
1073
|
color: g.highlightColor
|
|
1074
1074
|
};
|
|
1075
1075
|
}) : [], [a]);
|
|
@@ -1118,7 +1118,7 @@ const Jr = (t) => {
|
|
|
1118
1118
|
const R = document.createElement("span");
|
|
1119
1119
|
R.style.width = "auto", v.surroundContents(R);
|
|
1120
1120
|
const O = R.getBoundingClientRect(), D = g.getBoundingClientRect(), z = D.height, E = D.width, L = 100 * (O.left - D.left) / E, F = 100 * (O.top - D.top) / z, G = 100 * O.height / z, U = 100 * O.width / E;
|
|
1121
|
-
return
|
|
1121
|
+
return io(R), {
|
|
1122
1122
|
keywordStr: h,
|
|
1123
1123
|
left: L,
|
|
1124
1124
|
top: F,
|
|
@@ -1166,7 +1166,7 @@ const Jr = (t) => {
|
|
|
1166
1166
|
let L;
|
|
1167
1167
|
const F = [];
|
|
1168
1168
|
for (; (L = E.exec(I)) !== null; )
|
|
1169
|
-
O && !
|
|
1169
|
+
O && !Ir(I, L.index, L[0].length) || F.push({
|
|
1170
1170
|
keyword: E,
|
|
1171
1171
|
startIndex: L.index,
|
|
1172
1172
|
endIndex: E.lastIndex
|
|
@@ -1197,7 +1197,7 @@ const Jr = (t) => {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
1199
|
}
|
|
1200
|
-
}), _.sort(
|
|
1200
|
+
}), _.sort(oo), _;
|
|
1201
1201
|
};
|
|
1202
1202
|
return A(() => {
|
|
1203
1203
|
(async () => {
|
|
@@ -1226,7 +1226,7 @@ const Jr = (t) => {
|
|
|
1226
1226
|
h
|
|
1227
1227
|
)) }) });
|
|
1228
1228
|
}, He = at((t, e) => {
|
|
1229
|
-
const { pageNumber: n, style:
|
|
1229
|
+
const { pageNumber: n, style: o, ...r } = t, { pages: a } = oe(), { pageRotate: c } = it(), { textLayer: d } = br(), { currentZoom: s } = rt(), { LoaderImageComponent: f } = St(), m = M(a.get(n)), [C, u] = H(!1), T = M(null), [b, P] = H({
|
|
1230
1230
|
width: 0,
|
|
1231
1231
|
height: 0
|
|
1232
1232
|
});
|
|
@@ -1262,9 +1262,9 @@ const Jr = (t) => {
|
|
|
1262
1262
|
ref: T,
|
|
1263
1263
|
id: `page-${n}`,
|
|
1264
1264
|
"data-rp": `page-${n}`,
|
|
1265
|
-
...
|
|
1265
|
+
...r,
|
|
1266
1266
|
style: {
|
|
1267
|
-
...
|
|
1267
|
+
...o,
|
|
1268
1268
|
"--rp-rotate": `${y}deg`,
|
|
1269
1269
|
"--rp-page-rotate-translate": `${w}`,
|
|
1270
1270
|
"--scale-factor": s
|
|
@@ -1279,12 +1279,12 @@ const Jr = (t) => {
|
|
|
1279
1279
|
},
|
|
1280
1280
|
className: mt["rp-page"],
|
|
1281
1281
|
children: [
|
|
1282
|
-
/* @__PURE__ */ i(
|
|
1282
|
+
/* @__PURE__ */ i(Zo, { onLoading: g, onLoaded: h, pageNumber: n }),
|
|
1283
1283
|
C && f && /* @__PURE__ */ i("div", { className: mt["rp-loader-wrapper"], children: /* @__PURE__ */ i(f, {}) }),
|
|
1284
|
-
/* @__PURE__ */ i(
|
|
1285
|
-
d && /* @__PURE__ */ i(
|
|
1284
|
+
/* @__PURE__ */ i(ao, { pageNumber: n }),
|
|
1285
|
+
d && /* @__PURE__ */ i(Xo, { pageNumber: n }),
|
|
1286
1286
|
/* @__PURE__ */ i(ti, { pageNumber: n, viewport: b }),
|
|
1287
|
-
/* @__PURE__ */ i(
|
|
1287
|
+
/* @__PURE__ */ i(Jo, { pageNumber: n })
|
|
1288
1288
|
]
|
|
1289
1289
|
}
|
|
1290
1290
|
)
|
|
@@ -1295,8 +1295,8 @@ function Pt() {
|
|
|
1295
1295
|
return Pt = Object.assign ? Object.assign.bind() : function(t) {
|
|
1296
1296
|
for (var e = 1; e < arguments.length; e++) {
|
|
1297
1297
|
var n = arguments[e];
|
|
1298
|
-
for (var
|
|
1299
|
-
({}).hasOwnProperty.call(n,
|
|
1298
|
+
for (var o in n)
|
|
1299
|
+
({}).hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
1300
1300
|
}
|
|
1301
1301
|
return t;
|
|
1302
1302
|
}, Pt.apply(null, arguments);
|
|
@@ -1307,8 +1307,8 @@ function Qt(t) {
|
|
|
1307
1307
|
return t;
|
|
1308
1308
|
}
|
|
1309
1309
|
function Tt(t, e) {
|
|
1310
|
-
return Tt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n,
|
|
1311
|
-
return n.__proto__ =
|
|
1310
|
+
return Tt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
|
|
1311
|
+
return n.__proto__ = o, n;
|
|
1312
1312
|
}, Tt(t, e);
|
|
1313
1313
|
}
|
|
1314
1314
|
function ni(t, e) {
|
|
@@ -1317,24 +1317,24 @@ function ni(t, e) {
|
|
|
1317
1317
|
var Yt = Number.isNaN || function(e) {
|
|
1318
1318
|
return typeof e == "number" && e !== e;
|
|
1319
1319
|
};
|
|
1320
|
-
function
|
|
1320
|
+
function ri(t, e) {
|
|
1321
1321
|
return !!(t === e || Yt(t) && Yt(e));
|
|
1322
1322
|
}
|
|
1323
|
-
function
|
|
1323
|
+
function oi(t, e) {
|
|
1324
1324
|
if (t.length !== e.length)
|
|
1325
1325
|
return !1;
|
|
1326
1326
|
for (var n = 0; n < t.length; n++)
|
|
1327
|
-
if (!
|
|
1327
|
+
if (!ri(t[n], e[n]))
|
|
1328
1328
|
return !1;
|
|
1329
1329
|
return !0;
|
|
1330
1330
|
}
|
|
1331
1331
|
function gt(t, e) {
|
|
1332
|
-
e === void 0 && (e =
|
|
1333
|
-
var n,
|
|
1332
|
+
e === void 0 && (e = oi);
|
|
1333
|
+
var n, o = [], r, a = !1;
|
|
1334
1334
|
function c() {
|
|
1335
1335
|
for (var d = [], s = 0; s < arguments.length; s++)
|
|
1336
1336
|
d[s] = arguments[s];
|
|
1337
|
-
return a && n === this && e(d,
|
|
1337
|
+
return a && n === this && e(d, o) || (r = t.apply(this, d), a = !0, n = this, o = d), r;
|
|
1338
1338
|
}
|
|
1339
1339
|
return c;
|
|
1340
1340
|
}
|
|
@@ -1342,11 +1342,11 @@ function Jt(t, e) {
|
|
|
1342
1342
|
if (t == null)
|
|
1343
1343
|
return {};
|
|
1344
1344
|
var n = {};
|
|
1345
|
-
for (var
|
|
1346
|
-
if ({}.hasOwnProperty.call(t,
|
|
1347
|
-
if (e.indexOf(
|
|
1345
|
+
for (var o in t)
|
|
1346
|
+
if ({}.hasOwnProperty.call(t, o)) {
|
|
1347
|
+
if (e.indexOf(o) !== -1)
|
|
1348
1348
|
continue;
|
|
1349
|
-
n[
|
|
1349
|
+
n[o] = t[o];
|
|
1350
1350
|
}
|
|
1351
1351
|
return n;
|
|
1352
1352
|
}
|
|
@@ -1360,13 +1360,13 @@ function tn(t) {
|
|
|
1360
1360
|
}
|
|
1361
1361
|
function ai(t, e) {
|
|
1362
1362
|
var n = en();
|
|
1363
|
-
function
|
|
1364
|
-
en() - n >= e ? t.call(null) :
|
|
1363
|
+
function o() {
|
|
1364
|
+
en() - n >= e ? t.call(null) : r.id = requestAnimationFrame(o);
|
|
1365
1365
|
}
|
|
1366
|
-
var
|
|
1367
|
-
id: requestAnimationFrame(
|
|
1366
|
+
var r = {
|
|
1367
|
+
id: requestAnimationFrame(o)
|
|
1368
1368
|
};
|
|
1369
|
-
return
|
|
1369
|
+
return r;
|
|
1370
1370
|
}
|
|
1371
1371
|
var vt = -1;
|
|
1372
1372
|
function si(t) {
|
|
@@ -1381,20 +1381,20 @@ function nn(t) {
|
|
|
1381
1381
|
if (t === void 0 && (t = !1), ze === null || t) {
|
|
1382
1382
|
var e = document.createElement("div"), n = e.style;
|
|
1383
1383
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
1384
|
-
var
|
|
1385
|
-
return
|
|
1384
|
+
var o = document.createElement("div"), r = o.style;
|
|
1385
|
+
return r.width = "100px", r.height = "100px", e.appendChild(o), document.body.appendChild(e), e.scrollLeft > 0 ? ze = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? ze = "negative" : ze = "positive-ascending"), document.body.removeChild(e), ze;
|
|
1386
1386
|
}
|
|
1387
1387
|
return ze;
|
|
1388
1388
|
}
|
|
1389
1389
|
var ci = 150, li = function(e) {
|
|
1390
1390
|
var n = e.columnIndex;
|
|
1391
1391
|
e.data;
|
|
1392
|
-
var
|
|
1393
|
-
return
|
|
1392
|
+
var o = e.rowIndex;
|
|
1393
|
+
return o + ":" + n;
|
|
1394
1394
|
}, Ye = null, Je = null, et = null;
|
|
1395
1395
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ye = /* @__PURE__ */ new WeakSet(), Je = /* @__PURE__ */ new WeakSet(), et = /* @__PURE__ */ new WeakSet());
|
|
1396
1396
|
function di(t) {
|
|
1397
|
-
var e, n = t.getColumnOffset,
|
|
1397
|
+
var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, c = t.getEstimatedTotalHeight, d = t.getEstimatedTotalWidth, s = t.getOffsetForColumnAndAlignment, f = t.getOffsetForRowAndAlignment, m = t.getRowHeight, C = t.getRowOffset, u = t.getRowStartIndexForOffset, T = t.getRowStopIndexForStartIndex, b = t.initInstanceProps, P = t.shouldResetStyleCacheOnItemSizeChange, y = t.validateProps;
|
|
1398
1398
|
return e = /* @__PURE__ */ function(w) {
|
|
1399
1399
|
ni(g, w);
|
|
1400
1400
|
function g(p) {
|
|
@@ -1591,7 +1591,7 @@ function di(t) {
|
|
|
1591
1591
|
var l = this.props, v = l.columnCount, _ = l.overscanColumnCount, I = l.overscanColumnsCount, S = l.overscanCount, x = l.rowCount, R = this.state, O = R.horizontalScrollDirection, D = R.isScrolling, z = R.scrollLeft, E = _ || I || S || 1;
|
|
1592
1592
|
if (v === 0 || x === 0)
|
|
1593
1593
|
return [0, 0, 0, 0];
|
|
1594
|
-
var L =
|
|
1594
|
+
var L = o(this.props, z, this._instanceProps), F = r(this.props, L, z, this._instanceProps), G = !D || O === "backward" ? Math.max(1, E) : 1, U = !D || O === "forward" ? Math.max(1, E) : 1;
|
|
1595
1595
|
return [Math.max(0, L - G), Math.max(0, Math.min(v - 1, F + U)), L, F];
|
|
1596
1596
|
}, h._getVerticalRangeToRender = function() {
|
|
1597
1597
|
var l = this.props, v = l.columnCount, _ = l.overscanCount, I = l.overscanRowCount, S = l.overscanRowsCount, x = l.rowCount, R = this.state, O = R.isScrolling, D = R.verticalScrollDirection, z = R.scrollTop, E = I || S || _ || 1;
|
|
@@ -1600,83 +1600,83 @@ function di(t) {
|
|
|
1600
1600
|
var L = u(this.props, z, this._instanceProps), F = T(this.props, L, z, this._instanceProps), G = !O || D === "backward" ? Math.max(1, E) : 1, U = !O || D === "forward" ? Math.max(1, E) : 1;
|
|
1601
1601
|
return [Math.max(0, L - G), Math.max(0, Math.min(x - 1, F + U)), L, F];
|
|
1602
1602
|
}, g;
|
|
1603
|
-
}(
|
|
1603
|
+
}(ur), e.defaultProps = {
|
|
1604
1604
|
direction: "ltr",
|
|
1605
1605
|
itemData: void 0,
|
|
1606
1606
|
useIsScrolling: !1
|
|
1607
1607
|
}, e;
|
|
1608
1608
|
}
|
|
1609
1609
|
var ui = function(e, n) {
|
|
1610
|
-
var
|
|
1610
|
+
var o = e.children, r = e.direction, a = e.height, c = e.innerTagName, d = e.outerTagName, s = e.overscanColumnsCount, f = e.overscanCount, m = e.overscanRowsCount, C = e.width, u = n.instance;
|
|
1611
1611
|
if (process.env.NODE_ENV !== "production") {
|
|
1612
|
-
if (typeof f == "number" && Ye && !Ye.has(u) && (Ye.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof s == "number" || typeof m == "number") && Je && !Je.has(u) && (Je.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || d != null) && et && !et.has(u) && (et.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")),
|
|
1613
|
-
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (
|
|
1614
|
-
switch (
|
|
1612
|
+
if (typeof f == "number" && Ye && !Ye.has(u) && (Ye.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof s == "number" || typeof m == "number") && Je && !Je.has(u) && (Je.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || d != null) && et && !et.has(u) && (et.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1613
|
+
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1614
|
+
switch (r) {
|
|
1615
1615
|
case "ltr":
|
|
1616
1616
|
case "rtl":
|
|
1617
1617
|
break;
|
|
1618
1618
|
default:
|
|
1619
|
-
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' +
|
|
1619
|
+
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + r + '" was specified.'));
|
|
1620
1620
|
}
|
|
1621
1621
|
if (typeof C != "number")
|
|
1622
1622
|
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (C === null ? "null" : typeof C) + '" was specified.'));
|
|
1623
1623
|
if (typeof a != "number")
|
|
1624
1624
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
1625
1625
|
}
|
|
1626
|
-
},
|
|
1627
|
-
var
|
|
1628
|
-
if (c >=
|
|
1629
|
-
var s =
|
|
1626
|
+
}, rn = 50, On = function(e, n) {
|
|
1627
|
+
var o = e.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, c = n.lastMeasuredRowIndex, d = 0;
|
|
1628
|
+
if (c >= o && (c = o - 1), c >= 0) {
|
|
1629
|
+
var s = r[c];
|
|
1630
1630
|
d = s.offset + s.size;
|
|
1631
1631
|
}
|
|
1632
|
-
var f =
|
|
1632
|
+
var f = o - c - 1, m = f * a;
|
|
1633
1633
|
return d + m;
|
|
1634
1634
|
}, Dn = function(e, n) {
|
|
1635
|
-
var
|
|
1636
|
-
if (c >=
|
|
1637
|
-
var s =
|
|
1635
|
+
var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, c = n.lastMeasuredColumnIndex, d = 0;
|
|
1636
|
+
if (c >= o && (c = o - 1), c >= 0) {
|
|
1637
|
+
var s = r[c];
|
|
1638
1638
|
d = s.offset + s.size;
|
|
1639
1639
|
}
|
|
1640
|
-
var f =
|
|
1640
|
+
var f = o - c - 1, m = f * a;
|
|
1641
1641
|
return d + m;
|
|
1642
|
-
}, Pe = function(e, n,
|
|
1642
|
+
}, Pe = function(e, n, o, r) {
|
|
1643
1643
|
var a, c, d;
|
|
1644
|
-
if (e === "column" ? (a =
|
|
1644
|
+
if (e === "column" ? (a = r.columnMetadataMap, c = n.columnWidth, d = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, c = n.rowHeight, d = r.lastMeasuredRowIndex), o > d) {
|
|
1645
1645
|
var s = 0;
|
|
1646
1646
|
if (d >= 0) {
|
|
1647
1647
|
var f = a[d];
|
|
1648
1648
|
s = f.offset + f.size;
|
|
1649
1649
|
}
|
|
1650
|
-
for (var m = d + 1; m <=
|
|
1650
|
+
for (var m = d + 1; m <= o; m++) {
|
|
1651
1651
|
var C = c(m);
|
|
1652
1652
|
a[m] = {
|
|
1653
1653
|
offset: s,
|
|
1654
1654
|
size: C
|
|
1655
1655
|
}, s += C;
|
|
1656
1656
|
}
|
|
1657
|
-
e === "column" ?
|
|
1657
|
+
e === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
|
|
1658
1658
|
}
|
|
1659
|
-
return a[
|
|
1660
|
-
},
|
|
1659
|
+
return a[o];
|
|
1660
|
+
}, on = function(e, n, o, r) {
|
|
1661
1661
|
var a, c;
|
|
1662
|
-
e === "column" ? (a =
|
|
1662
|
+
e === "column" ? (a = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
|
|
1663
1663
|
var d = c > 0 ? a[c].offset : 0;
|
|
1664
|
-
return d >=
|
|
1665
|
-
}, An = function(e, n,
|
|
1666
|
-
for (; a <=
|
|
1667
|
-
var d = a + Math.floor((
|
|
1664
|
+
return d >= r ? An(e, n, o, c, 0, r) : pi(e, n, o, Math.max(0, c), r);
|
|
1665
|
+
}, An = function(e, n, o, r, a, c) {
|
|
1666
|
+
for (; a <= r; ) {
|
|
1667
|
+
var d = a + Math.floor((r - a) / 2), s = Pe(e, n, d, o).offset;
|
|
1668
1668
|
if (s === c)
|
|
1669
1669
|
return d;
|
|
1670
|
-
s < c ? a = d + 1 : s > c && (
|
|
1670
|
+
s < c ? a = d + 1 : s > c && (r = d - 1);
|
|
1671
1671
|
}
|
|
1672
1672
|
return a > 0 ? a - 1 : 0;
|
|
1673
|
-
}, pi = function(e, n,
|
|
1674
|
-
for (var c = e === "column" ? n.columnCount : n.rowCount, d = 1;
|
|
1675
|
-
|
|
1676
|
-
return An(e, n,
|
|
1677
|
-
}, an = function(e, n,
|
|
1678
|
-
var s = e === "column" ? n.width : n.height, f = Pe(e, n,
|
|
1679
|
-
switch (
|
|
1673
|
+
}, pi = function(e, n, o, r, a) {
|
|
1674
|
+
for (var c = e === "column" ? n.columnCount : n.rowCount, d = 1; r < c && Pe(e, n, r, o).offset < a; )
|
|
1675
|
+
r += d, d *= 2;
|
|
1676
|
+
return An(e, n, o, Math.min(r, c - 1), Math.floor(r / 2), a);
|
|
1677
|
+
}, an = function(e, n, o, r, a, c, d) {
|
|
1678
|
+
var s = e === "column" ? n.width : n.height, f = Pe(e, n, o, c), m = e === "column" ? Dn(n, c) : On(n, c), C = Math.max(0, Math.min(m - s, f.offset)), u = Math.max(0, f.offset - s + d + f.size);
|
|
1679
|
+
switch (r === "smart" && (a >= u - s && a <= C + s ? r = "auto" : r = "center"), r) {
|
|
1680
1680
|
case "start":
|
|
1681
1681
|
return C;
|
|
1682
1682
|
case "end":
|
|
@@ -1688,47 +1688,47 @@ var ui = function(e, n) {
|
|
|
1688
1688
|
return a >= u && a <= C ? a : u > C || a < u ? u : C;
|
|
1689
1689
|
}
|
|
1690
1690
|
}, hi = /* @__PURE__ */ di({
|
|
1691
|
-
getColumnOffset: function(e, n,
|
|
1692
|
-
return Pe("column", e, n,
|
|
1691
|
+
getColumnOffset: function(e, n, o) {
|
|
1692
|
+
return Pe("column", e, n, o).offset;
|
|
1693
1693
|
},
|
|
1694
|
-
getColumnStartIndexForOffset: function(e, n,
|
|
1695
|
-
return
|
|
1694
|
+
getColumnStartIndexForOffset: function(e, n, o) {
|
|
1695
|
+
return on("column", e, o, n);
|
|
1696
1696
|
},
|
|
1697
|
-
getColumnStopIndexForStartIndex: function(e, n,
|
|
1698
|
-
for (var a = e.columnCount, c = e.width, d = Pe("column", e, n,
|
|
1699
|
-
m++, f += Pe("column", e, m,
|
|
1697
|
+
getColumnStopIndexForStartIndex: function(e, n, o, r) {
|
|
1698
|
+
for (var a = e.columnCount, c = e.width, d = Pe("column", e, n, r), s = o + c, f = d.offset + d.size, m = n; m < a - 1 && f < s; )
|
|
1699
|
+
m++, f += Pe("column", e, m, r).size;
|
|
1700
1700
|
return m;
|
|
1701
1701
|
},
|
|
1702
|
-
getColumnWidth: function(e, n,
|
|
1703
|
-
return
|
|
1702
|
+
getColumnWidth: function(e, n, o) {
|
|
1703
|
+
return o.columnMetadataMap[n].size;
|
|
1704
1704
|
},
|
|
1705
1705
|
getEstimatedTotalHeight: On,
|
|
1706
1706
|
getEstimatedTotalWidth: Dn,
|
|
1707
|
-
getOffsetForColumnAndAlignment: function(e, n,
|
|
1708
|
-
return an("column", e, n,
|
|
1707
|
+
getOffsetForColumnAndAlignment: function(e, n, o, r, a, c) {
|
|
1708
|
+
return an("column", e, n, o, r, a, c);
|
|
1709
1709
|
},
|
|
1710
|
-
getOffsetForRowAndAlignment: function(e, n,
|
|
1711
|
-
return an("row", e, n,
|
|
1710
|
+
getOffsetForRowAndAlignment: function(e, n, o, r, a, c) {
|
|
1711
|
+
return an("row", e, n, o, r, a, c);
|
|
1712
1712
|
},
|
|
1713
|
-
getRowOffset: function(e, n,
|
|
1714
|
-
return Pe("row", e, n,
|
|
1713
|
+
getRowOffset: function(e, n, o) {
|
|
1714
|
+
return Pe("row", e, n, o).offset;
|
|
1715
1715
|
},
|
|
1716
|
-
getRowHeight: function(e, n,
|
|
1717
|
-
return
|
|
1716
|
+
getRowHeight: function(e, n, o) {
|
|
1717
|
+
return o.rowMetadataMap[n].size;
|
|
1718
1718
|
},
|
|
1719
|
-
getRowStartIndexForOffset: function(e, n,
|
|
1720
|
-
return
|
|
1719
|
+
getRowStartIndexForOffset: function(e, n, o) {
|
|
1720
|
+
return on("row", e, o, n);
|
|
1721
1721
|
},
|
|
1722
|
-
getRowStopIndexForStartIndex: function(e, n,
|
|
1723
|
-
for (var a = e.rowCount, c = e.height, d = Pe("row", e, n,
|
|
1724
|
-
m++, f += Pe("row", e, m,
|
|
1722
|
+
getRowStopIndexForStartIndex: function(e, n, o, r) {
|
|
1723
|
+
for (var a = e.rowCount, c = e.height, d = Pe("row", e, n, r), s = o + c, f = d.offset + d.size, m = n; m < a - 1 && f < s; )
|
|
1724
|
+
m++, f += Pe("row", e, m, r).size;
|
|
1725
1725
|
return m;
|
|
1726
1726
|
},
|
|
1727
1727
|
initInstanceProps: function(e, n) {
|
|
1728
|
-
var
|
|
1728
|
+
var o = e, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, c = {
|
|
1729
1729
|
columnMetadataMap: {},
|
|
1730
|
-
estimatedColumnWidth:
|
|
1731
|
-
estimatedRowHeight: a ||
|
|
1730
|
+
estimatedColumnWidth: r || rn,
|
|
1731
|
+
estimatedRowHeight: a || rn,
|
|
1732
1732
|
lastMeasuredColumnIndex: -1,
|
|
1733
1733
|
lastMeasuredRowIndex: -1,
|
|
1734
1734
|
rowMetadataMap: {}
|
|
@@ -1750,12 +1750,12 @@ var ui = function(e, n) {
|
|
|
1750
1750
|
},
|
|
1751
1751
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
1752
1752
|
validateProps: function(e) {
|
|
1753
|
-
var n = e.columnWidth,
|
|
1753
|
+
var n = e.columnWidth, o = e.rowHeight;
|
|
1754
1754
|
if (process.env.NODE_ENV !== "production") {
|
|
1755
1755
|
if (typeof n != "function")
|
|
1756
1756
|
throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. ' + ('"' + (n === null ? "null" : typeof n) + '" was specified.'));
|
|
1757
|
-
if (typeof
|
|
1758
|
-
throw Error('An invalid "rowHeight" prop has been specified. Value should be a function. ' + ('"' + (
|
|
1757
|
+
if (typeof o != "function")
|
|
1758
|
+
throw Error('An invalid "rowHeight" prop has been specified. Value should be a function. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1759
1759
|
}
|
|
1760
1760
|
}
|
|
1761
1761
|
});
|
|
@@ -1764,21 +1764,21 @@ function sn(t, e) {
|
|
|
1764
1764
|
for (var n in t)
|
|
1765
1765
|
if (!(n in e))
|
|
1766
1766
|
return !0;
|
|
1767
|
-
for (var
|
|
1768
|
-
if (t[
|
|
1767
|
+
for (var o in e)
|
|
1768
|
+
if (t[o] !== e[o])
|
|
1769
1769
|
return !0;
|
|
1770
1770
|
return !1;
|
|
1771
1771
|
}
|
|
1772
1772
|
var fi = ["style"], mi = ["style"];
|
|
1773
1773
|
function gi(t, e) {
|
|
1774
|
-
var n = t.style,
|
|
1775
|
-
return !sn(n,
|
|
1774
|
+
var n = t.style, o = Jt(t, fi), r = e.style, a = Jt(e, mi);
|
|
1775
|
+
return !sn(n, r) && !sn(o, a);
|
|
1776
1776
|
}
|
|
1777
1777
|
const vi = () => {
|
|
1778
|
-
const { viewMode: t } = $e(), { scrollMode: e } = Ae(), { setColumnCount: n } = vn(), { virtualScrollableElementRef:
|
|
1779
|
-
if (t ===
|
|
1778
|
+
const { viewMode: t } = $e(), { scrollMode: e } = Ae(), { setColumnCount: n } = vn(), { virtualScrollableElementRef: o } = ot(), r = je(), a = W(() => r.heights.length, [r.heights]), c = W(() => e === ie.HORIZONTAL_SCROLLING ? a : t === re.DUAL_PAGE || t === re.DUAL_PAGE_WITH_COVER ? 2 : 1, [t, e, e, a, o]), d = W(() => {
|
|
1779
|
+
if (t === re.DUAL_PAGE_WITH_COVER && r.widths.length > 0) {
|
|
1780
1780
|
const w = [0, 0];
|
|
1781
|
-
return
|
|
1781
|
+
return r.widths.forEach((g, h) => {
|
|
1782
1782
|
const p = h + 1;
|
|
1783
1783
|
if (p === 1)
|
|
1784
1784
|
return;
|
|
@@ -1786,11 +1786,11 @@ const vi = () => {
|
|
|
1786
1786
|
w[l] = Math.max(w[l] || 0, g);
|
|
1787
1787
|
}), w;
|
|
1788
1788
|
}
|
|
1789
|
-
return
|
|
1789
|
+
return r.widths.reduce((w, g, h) => {
|
|
1790
1790
|
const p = h % c;
|
|
1791
1791
|
return (!w[p] || g > w[p]) && (w[p] = g), w;
|
|
1792
1792
|
}, []);
|
|
1793
|
-
}, [
|
|
1793
|
+
}, [r.widths, c, t]), s = N(
|
|
1794
1794
|
(P) => {
|
|
1795
1795
|
const y = P % d.length;
|
|
1796
1796
|
return d[y] || 0;
|
|
@@ -1798,30 +1798,30 @@ const vi = () => {
|
|
|
1798
1798
|
[d]
|
|
1799
1799
|
), f = N(
|
|
1800
1800
|
(P) => {
|
|
1801
|
-
if (t ===
|
|
1801
|
+
if (t === re.DUAL_PAGE_WITH_COVER) {
|
|
1802
1802
|
if (P === 0)
|
|
1803
|
-
return
|
|
1804
|
-
const g = 1 + (P - 1) * c + 1, p = Array.from({ length: c }, (l, v) => g + v - 1).filter((l) => l <
|
|
1803
|
+
return r.heights[0] || 0;
|
|
1804
|
+
const g = 1 + (P - 1) * c + 1, p = Array.from({ length: c }, (l, v) => g + v - 1).filter((l) => l < r.heights.length).map((l) => r.heights[l] || 0);
|
|
1805
1805
|
return Math.max(...p, 0);
|
|
1806
1806
|
}
|
|
1807
1807
|
const w = Array.from({ length: c }, (g, h) => {
|
|
1808
1808
|
const p = P * c + h;
|
|
1809
|
-
return
|
|
1809
|
+
return r.heights[p] || 0;
|
|
1810
1810
|
});
|
|
1811
1811
|
return Math.max(...w);
|
|
1812
1812
|
},
|
|
1813
|
-
[
|
|
1813
|
+
[r.heights, c, t]
|
|
1814
1814
|
);
|
|
1815
1815
|
A(() => {
|
|
1816
1816
|
n(c);
|
|
1817
1817
|
}, [c, n]);
|
|
1818
|
-
const m = W(() => e === ie.HORIZONTAL_SCROLLING || e === ie.PAGE_SCROLLING ? 1 : t ===
|
|
1819
|
-
const P = t ===
|
|
1818
|
+
const m = W(() => e === ie.HORIZONTAL_SCROLLING || e === ie.PAGE_SCROLLING ? 1 : t === re.DUAL_PAGE_WITH_COVER && a > 0 ? 1 + Math.ceil((a - 1) / c) : Math.round(a / c), [c, a, e, t]), C = W(() => r.heights.reduce((P, y) => P + y, 0) / r.heights.length || 0, [r]), u = W(() => r.widths.reduce((P, y) => P + y, 0) / r.widths.length || 0, [r]), T = W(() => {
|
|
1819
|
+
const P = t === re.DUAL_PAGE_WITH_COVER, { rowsHeight: y, columnsWidth: w } = Et(r, c, P);
|
|
1820
1820
|
return {
|
|
1821
1821
|
rowsHeight: y,
|
|
1822
1822
|
columnsWidth: w
|
|
1823
1823
|
};
|
|
1824
|
-
}, [
|
|
1824
|
+
}, [r, c, t]), b = W(() => ({
|
|
1825
1825
|
width: T.columnsWidth.reduce((P, y) => P + y, 0),
|
|
1826
1826
|
height: T.rowsHeight.reduce((P, y) => P + y, 0)
|
|
1827
1827
|
}), [T]);
|
|
@@ -1830,7 +1830,7 @@ const vi = () => {
|
|
|
1830
1830
|
rowHeight: f,
|
|
1831
1831
|
columnCount: c,
|
|
1832
1832
|
columnWidth: s,
|
|
1833
|
-
pageDimension:
|
|
1833
|
+
pageDimension: r,
|
|
1834
1834
|
estimatedRowHeight: C,
|
|
1835
1835
|
estimatedColumnWidth: u,
|
|
1836
1836
|
gridDimension: T,
|
|
@@ -1847,14 +1847,14 @@ bt == null || dn == null ? (Ct = wt, yt = function(e) {
|
|
|
1847
1847
|
bt(e), wt(n);
|
|
1848
1848
|
}, yt = function(e) {
|
|
1849
1849
|
const n = dn(function() {
|
|
1850
|
-
wt(
|
|
1851
|
-
}),
|
|
1850
|
+
wt(o), e();
|
|
1851
|
+
}), o = ln(function() {
|
|
1852
1852
|
bt(n), e();
|
|
1853
1853
|
}, cn);
|
|
1854
|
-
return [n,
|
|
1854
|
+
return [n, o];
|
|
1855
1855
|
});
|
|
1856
1856
|
function wi(t) {
|
|
1857
|
-
let e, n,
|
|
1857
|
+
let e, n, o, r, a, c, d;
|
|
1858
1858
|
const s = typeof document < "u" && document.attachEvent;
|
|
1859
1859
|
if (!s) {
|
|
1860
1860
|
c = function(w) {
|
|
@@ -1873,7 +1873,7 @@ function wi(t) {
|
|
|
1873
1873
|
});
|
|
1874
1874
|
};
|
|
1875
1875
|
let u = !1, T = "";
|
|
1876
|
-
|
|
1876
|
+
o = "animationstart";
|
|
1877
1877
|
const b = "Webkit Moz O ms".split(" ");
|
|
1878
1878
|
let P = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), y = "";
|
|
1879
1879
|
{
|
|
@@ -1881,16 +1881,16 @@ function wi(t) {
|
|
|
1881
1881
|
if (w.style.animationName !== void 0 && (u = !0), u === !1) {
|
|
1882
1882
|
for (let g = 0; g < b.length; g++)
|
|
1883
1883
|
if (w.style[b[g] + "AnimationName"] !== void 0) {
|
|
1884
|
-
y = b[g], T = "-" + y.toLowerCase() + "-",
|
|
1884
|
+
y = b[g], T = "-" + y.toLowerCase() + "-", o = P[g], u = !0;
|
|
1885
1885
|
break;
|
|
1886
1886
|
}
|
|
1887
1887
|
}
|
|
1888
1888
|
}
|
|
1889
|
-
n = "resizeanim", e = "@" + T + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ",
|
|
1889
|
+
n = "resizeanim", e = "@" + T + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = T + "animation: 1ms " + n + "; ";
|
|
1890
1890
|
}
|
|
1891
1891
|
const f = function(u) {
|
|
1892
1892
|
if (!u.getElementById("detectElementResize")) {
|
|
1893
|
-
const T = (e || "") + ".resize-triggers { " + (
|
|
1893
|
+
const T = (e || "") + ".resize-triggers { " + (r || "") + '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%; }', b = u.head || u.getElementsByTagName("head")[0], P = u.createElement("style");
|
|
1894
1894
|
P.id = "detectElementResize", P.type = "text/css", t != null && P.setAttribute("nonce", t), P.styleSheet ? P.styleSheet.cssText = T : P.appendChild(u.createTextNode(T)), b.appendChild(P);
|
|
1895
1895
|
}
|
|
1896
1896
|
};
|
|
@@ -1905,9 +1905,9 @@ function wi(t) {
|
|
|
1905
1905
|
const y = b.createElement("div");
|
|
1906
1906
|
y.className = "expand-trigger", y.appendChild(b.createElement("div"));
|
|
1907
1907
|
const w = b.createElement("div");
|
|
1908
|
-
w.className = "contract-trigger", u.__resizeTriggers__.appendChild(y), u.__resizeTriggers__.appendChild(w), u.appendChild(u.__resizeTriggers__), c(u), u.addEventListener("scroll", d, !0),
|
|
1908
|
+
w.className = "contract-trigger", u.__resizeTriggers__.appendChild(y), u.__resizeTriggers__.appendChild(w), u.appendChild(u.__resizeTriggers__), c(u), u.addEventListener("scroll", d, !0), o && (u.__resizeTriggers__.__animationListener__ = function(h) {
|
|
1909
1909
|
h.animationName === n && c(u);
|
|
1910
|
-
}, u.__resizeTriggers__.addEventListener(
|
|
1910
|
+
}, u.__resizeTriggers__.addEventListener(o, u.__resizeTriggers__.__animationListener__));
|
|
1911
1911
|
}
|
|
1912
1912
|
u.__resizeListeners__.push(T);
|
|
1913
1913
|
}
|
|
@@ -1916,7 +1916,7 @@ function wi(t) {
|
|
|
1916
1916
|
if (s)
|
|
1917
1917
|
u.detachEvent("onresize", T);
|
|
1918
1918
|
else if (u.__resizeListeners__.splice(u.__resizeListeners__.indexOf(T), 1), !u.__resizeListeners__.length) {
|
|
1919
|
-
u.removeEventListener("scroll", d, !0), u.__resizeTriggers__.__animationListener__ && (u.__resizeTriggers__.removeEventListener(
|
|
1919
|
+
u.removeEventListener("scroll", d, !0), u.__resizeTriggers__.__animationListener__ && (u.__resizeTriggers__.removeEventListener(o, u.__resizeTriggers__.__animationListener__), u.__resizeTriggers__.__animationListener__ = null);
|
|
1920
1920
|
try {
|
|
1921
1921
|
u.__resizeTriggers__ = !u.removeChild(u.__resizeTriggers__);
|
|
1922
1922
|
} catch {
|
|
@@ -1925,7 +1925,7 @@ function wi(t) {
|
|
|
1925
1925
|
}
|
|
1926
1926
|
};
|
|
1927
1927
|
}
|
|
1928
|
-
class bi extends
|
|
1928
|
+
class bi extends pr {
|
|
1929
1929
|
constructor(...e) {
|
|
1930
1930
|
super(...e), this.state = {
|
|
1931
1931
|
height: this.props.defaultHeight || 0,
|
|
@@ -1934,12 +1934,12 @@ class bi extends ho {
|
|
|
1934
1934
|
this._timeoutId = null;
|
|
1935
1935
|
const {
|
|
1936
1936
|
disableHeight: n,
|
|
1937
|
-
disableWidth:
|
|
1938
|
-
onResize:
|
|
1937
|
+
disableWidth: o,
|
|
1938
|
+
onResize: r
|
|
1939
1939
|
} = this.props;
|
|
1940
1940
|
if (this._parentNode) {
|
|
1941
1941
|
const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), d = parseFloat(a.paddingRight || "0"), s = parseFloat(a.paddingTop || "0"), f = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), C = m.height - s - f, u = m.width - c - d;
|
|
1942
|
-
if (!n && this.state.height !== C || !
|
|
1942
|
+
if (!n && this.state.height !== C || !o && this.state.width !== u) {
|
|
1943
1943
|
this.setState({
|
|
1944
1944
|
height: C,
|
|
1945
1945
|
width: u
|
|
@@ -1947,7 +1947,7 @@ class bi extends ho {
|
|
|
1947
1947
|
const T = () => {
|
|
1948
1948
|
this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
|
|
1949
1949
|
};
|
|
1950
|
-
typeof
|
|
1950
|
+
typeof r == "function" && r({
|
|
1951
1951
|
height: C,
|
|
1952
1952
|
width: u,
|
|
1953
1953
|
// TODO Remove these params in the next major release
|
|
@@ -1970,8 +1970,8 @@ class bi extends ho {
|
|
|
1970
1970
|
} = this.props, n = this._autoSizer ? this._autoSizer.parentNode : null;
|
|
1971
1971
|
if (n != null && n.ownerDocument && n.ownerDocument.defaultView && n instanceof n.ownerDocument.defaultView.HTMLElement) {
|
|
1972
1972
|
this._parentNode = n;
|
|
1973
|
-
const
|
|
1974
|
-
|
|
1973
|
+
const o = n.ownerDocument.defaultView.ResizeObserver;
|
|
1974
|
+
o != null ? (this._resizeObserver = new o(() => {
|
|
1975
1975
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1976
1976
|
}), this._resizeObserver.observe(n)) : (this._detectElementResize = wi(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1977
1977
|
}
|
|
@@ -1983,8 +1983,8 @@ class bi extends ho {
|
|
|
1983
1983
|
const {
|
|
1984
1984
|
children: e,
|
|
1985
1985
|
defaultHeight: n,
|
|
1986
|
-
defaultWidth:
|
|
1987
|
-
disableHeight:
|
|
1986
|
+
defaultWidth: o,
|
|
1987
|
+
disableHeight: r = !1,
|
|
1988
1988
|
disableWidth: a = !1,
|
|
1989
1989
|
doNotBailOutOnEmptyChildren: c = !1,
|
|
1990
1990
|
nonce: d,
|
|
@@ -1999,7 +1999,7 @@ class bi extends ho {
|
|
|
1999
1999
|
overflow: "visible"
|
|
2000
2000
|
}, P = {};
|
|
2001
2001
|
let y = !1;
|
|
2002
|
-
return
|
|
2002
|
+
return r || (u === 0 && (y = !0), b.height = 0, P.height = u, P.scaledHeight = u), a || (T === 0 && (y = !0), b.width = 0, P.width = T, P.scaledWidth = T), c && (y = !1), Qe(m, {
|
|
2003
2003
|
ref: this._setRef,
|
|
2004
2004
|
style: {
|
|
2005
2005
|
...b,
|
|
@@ -2010,14 +2010,14 @@ class bi extends ho {
|
|
|
2010
2010
|
}
|
|
2011
2011
|
}
|
|
2012
2012
|
const _i = It(({ widths: t, heights: e }) => {
|
|
2013
|
-
const { focusedPage: n, totalPages:
|
|
2013
|
+
const { focusedPage: n, totalPages: o } = ce(), r = W(() => {
|
|
2014
2014
|
const d = [], s = Math.ceil(n / 2) * 2 - 1;
|
|
2015
|
-
if (d.push(s), s + 1 <=
|
|
2015
|
+
if (d.push(s), s + 1 <= o) {
|
|
2016
2016
|
const f = s + 1;
|
|
2017
2017
|
d.push(f);
|
|
2018
2018
|
}
|
|
2019
2019
|
return d;
|
|
2020
|
-
}, [n,
|
|
2020
|
+
}, [n, o]), a = W(() => {
|
|
2021
2021
|
const d = n % 2 === 1 ? n - 1 : n - 2, s = Math.floor(d / 2), f = e(s), m = t(d), C = t(d + 1);
|
|
2022
2022
|
return [
|
|
2023
2023
|
{
|
|
@@ -2033,23 +2033,23 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2033
2033
|
height: f
|
|
2034
2034
|
}
|
|
2035
2035
|
];
|
|
2036
|
-
}, [t, e,
|
|
2037
|
-
return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children:
|
|
2036
|
+
}, [t, e, r]), c = W(() => a.reduce((d, s) => d + Number(s.width || 0), 0), [a]);
|
|
2037
|
+
return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: r.map((d, s) => /* @__PURE__ */ i(He, { style: a[s], pageNumber: d }, d)) });
|
|
2038
2038
|
}), Pi = It(({ widths: t, heights: e }) => {
|
|
2039
|
-
const { focusedPage: n, totalPages:
|
|
2039
|
+
const { focusedPage: n, totalPages: o } = ce(), r = W(() => {
|
|
2040
2040
|
const d = [];
|
|
2041
2041
|
if (n === 1)
|
|
2042
2042
|
return d.push(1), d;
|
|
2043
2043
|
const s = n - 1, m = Math.ceil(s / 2) * 2;
|
|
2044
|
-
return d.push(m), m + 1 <=
|
|
2045
|
-
}, [n,
|
|
2046
|
-
if (
|
|
2047
|
-
const T =
|
|
2044
|
+
return d.push(m), m + 1 <= o && d.push(m + 1), d;
|
|
2045
|
+
}, [n, o]), a = W(() => {
|
|
2046
|
+
if (r.length === 1) {
|
|
2047
|
+
const T = r[0] - 1, b = t(T);
|
|
2048
2048
|
let P = b * 2;
|
|
2049
|
-
if (
|
|
2049
|
+
if (o >= 3) {
|
|
2050
2050
|
const y = t(1), w = t(2);
|
|
2051
2051
|
P = y + w;
|
|
2052
|
-
} else if (
|
|
2052
|
+
} else if (o >= 2) {
|
|
2053
2053
|
const y = t(1);
|
|
2054
2054
|
P = b + y;
|
|
2055
2055
|
}
|
|
@@ -2061,14 +2061,14 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2061
2061
|
alignItems: "flex-start"
|
|
2062
2062
|
};
|
|
2063
2063
|
}
|
|
2064
|
-
const s =
|
|
2064
|
+
const s = r[0] - 1, f = t(s), m = r.length > 1 ? t(s + 1) : 0;
|
|
2065
2065
|
return {
|
|
2066
2066
|
width: f + m,
|
|
2067
2067
|
position: "relative"
|
|
2068
2068
|
};
|
|
2069
|
-
}, [t,
|
|
2070
|
-
if (
|
|
2071
|
-
const b =
|
|
2069
|
+
}, [t, r, o]), c = W(() => {
|
|
2070
|
+
if (r.length === 1) {
|
|
2071
|
+
const b = r[0], P = b - 1, y = e(b === 1 ? 0 : Math.floor((b - 2) / 2) + 1);
|
|
2072
2072
|
return [{
|
|
2073
2073
|
width: t(P),
|
|
2074
2074
|
height: y,
|
|
@@ -2076,7 +2076,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2076
2076
|
// Use relative for flexbox centering
|
|
2077
2077
|
}];
|
|
2078
2078
|
}
|
|
2079
|
-
const d =
|
|
2079
|
+
const d = r[0], s = d - 1, f = Math.floor((d - 2) / 2) + 1, m = e(f), C = t(s), u = t(s + 1);
|
|
2080
2080
|
return [
|
|
2081
2081
|
{
|
|
2082
2082
|
position: "absolute",
|
|
@@ -2091,29 +2091,29 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2091
2091
|
height: m
|
|
2092
2092
|
}
|
|
2093
2093
|
];
|
|
2094
|
-
}, [t, e,
|
|
2095
|
-
return /* @__PURE__ */ i("div", { style: a, children:
|
|
2094
|
+
}, [t, e, r]);
|
|
2095
|
+
return /* @__PURE__ */ i("div", { style: a, children: r.map((d, s) => /* @__PURE__ */ i(He, { style: c[s], pageNumber: d }, d)) });
|
|
2096
2096
|
}), Ti = ({ widths: t, heights: e }) => {
|
|
2097
|
-
const { focusedPage: n } = ce(),
|
|
2097
|
+
const { focusedPage: n } = ce(), o = W(() => ({
|
|
2098
2098
|
position: "absolute",
|
|
2099
2099
|
width: t(n - 1),
|
|
2100
2100
|
height: e(n - 1)
|
|
2101
|
-
}), [t, e, n]),
|
|
2101
|
+
}), [t, e, n]), r = W(() => t(n - 1), [t]);
|
|
2102
2102
|
return /* @__PURE__ */ i(
|
|
2103
2103
|
"div",
|
|
2104
2104
|
{
|
|
2105
2105
|
style: {
|
|
2106
|
-
width:
|
|
2106
|
+
width: r,
|
|
2107
2107
|
position: "relative"
|
|
2108
2108
|
},
|
|
2109
|
-
children: /* @__PURE__ */ i(He, { style:
|
|
2109
|
+
children: /* @__PURE__ */ i(He, { style: o, pageNumber: n }, n)
|
|
2110
2110
|
}
|
|
2111
2111
|
);
|
|
2112
|
-
}, Ci = (t, e, n,
|
|
2113
|
-
const
|
|
2114
|
-
const P =
|
|
2112
|
+
}, Ci = (t, e, n, o) => {
|
|
2113
|
+
const r = M(), { contentRef: a } = Te(), { heights: c, widths: d } = je(), { setFocusedPage: s } = ce(), [f, m] = H([]), { targetScrollPage: C } = wn(), u = Nt(f, 0, 500), T = W(() => {
|
|
2114
|
+
const P = o === re.DUAL_PAGE_WITH_COVER, { rowsHeight: y, columnsWidth: w } = Et({ heights: c, widths: d }, t, P);
|
|
2115
2115
|
return c.map((g, h) => {
|
|
2116
|
-
const p = d[h], l =
|
|
2116
|
+
const p = d[h], l = so(h + 1, t, P), v = w.slice(0, l.columnIndex).reduce((x, R) => x + R, 0), _ = y.slice(0, l.rowIndex).reduce((x, R) => x + R, 0), I = v + p, S = _ + g;
|
|
2117
2117
|
return {
|
|
2118
2118
|
pageNumber: h + 1,
|
|
2119
2119
|
...l,
|
|
@@ -2125,7 +2125,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2125
2125
|
endY: S
|
|
2126
2126
|
};
|
|
2127
2127
|
});
|
|
2128
|
-
}, [c, d, t, e,
|
|
2128
|
+
}, [c, d, t, e, o]);
|
|
2129
2129
|
A(() => {
|
|
2130
2130
|
var y;
|
|
2131
2131
|
u.length > 0 && !C.current && s(u[0].pageNumber), ((y = u[0]) == null ? void 0 : y.ratio) && u.some((w) => w.pageNumber === C.current) && setTimeout(() => {
|
|
@@ -2134,7 +2134,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2134
2134
|
}, [u, s]);
|
|
2135
2135
|
const b = N(
|
|
2136
2136
|
(P) => {
|
|
2137
|
-
|
|
2137
|
+
r.current && cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
2138
2138
|
const y = P.target, w = {
|
|
2139
2139
|
startTop: y.scrollTop,
|
|
2140
2140
|
startLeft: y.scrollLeft,
|
|
@@ -2162,7 +2162,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2162
2162
|
};
|
|
2163
2163
|
}, [n, b]);
|
|
2164
2164
|
}, zn = at((t, e) => {
|
|
2165
|
-
const { children: n, toolbarRef:
|
|
2165
|
+
const { children: n, toolbarRef: o, style: r, className: a, ...c } = t, { customVariables: d, customDarkVariables: s } = Dr(), { darkMode: f } = wr();
|
|
2166
2166
|
return /* @__PURE__ */ i(
|
|
2167
2167
|
"div",
|
|
2168
2168
|
{
|
|
@@ -2175,33 +2175,33 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2175
2175
|
a
|
|
2176
2176
|
),
|
|
2177
2177
|
style: {
|
|
2178
|
-
"--rp-toolbar-height": `${(
|
|
2178
|
+
"--rp-toolbar-height": `${(o == null ? void 0 : o.clientHeight) || 48}px`,
|
|
2179
2179
|
...d,
|
|
2180
2180
|
...f ? s : {},
|
|
2181
|
-
...
|
|
2181
|
+
...r
|
|
2182
2182
|
},
|
|
2183
2183
|
children: n
|
|
2184
2184
|
}
|
|
2185
2185
|
);
|
|
2186
|
-
}), yi = It(({ columnIndex: t, rowIndex: e, data: n, style:
|
|
2187
|
-
const
|
|
2188
|
-
if (
|
|
2186
|
+
}), yi = It(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
|
|
2187
|
+
const r = co(e, t, n.columnCount, n.isDualPageWithCover);
|
|
2188
|
+
if (r <= 0)
|
|
2189
2189
|
return null;
|
|
2190
2190
|
if (n.isDualPageWithCover) {
|
|
2191
|
-
const c =
|
|
2192
|
-
if (e === 0 &&
|
|
2191
|
+
const c = r === n.totalPages && n.totalPages % 2 === 0;
|
|
2192
|
+
if (e === 0 && r === 1 || c && t === 0) {
|
|
2193
2193
|
const s = n.columnWidths.reduce((f, m) => f + m, 0);
|
|
2194
2194
|
return /* @__PURE__ */ i(
|
|
2195
2195
|
"div",
|
|
2196
2196
|
{
|
|
2197
2197
|
style: {
|
|
2198
|
-
...
|
|
2198
|
+
...o,
|
|
2199
2199
|
width: s,
|
|
2200
2200
|
display: "flex",
|
|
2201
2201
|
justifyContent: "center",
|
|
2202
2202
|
alignItems: "flex-start"
|
|
2203
2203
|
},
|
|
2204
|
-
children: /* @__PURE__ */ i(He, { style: { position: "relative" }, pageNumber:
|
|
2204
|
+
children: /* @__PURE__ */ i(He, { style: { position: "relative" }, pageNumber: r }, r)
|
|
2205
2205
|
}
|
|
2206
2206
|
);
|
|
2207
2207
|
}
|
|
@@ -2210,17 +2210,17 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2210
2210
|
"div",
|
|
2211
2211
|
{
|
|
2212
2212
|
style: {
|
|
2213
|
-
...
|
|
2213
|
+
...o,
|
|
2214
2214
|
display: "flex",
|
|
2215
2215
|
justifyContent: t === 0 ? "flex-end" : "flex-start",
|
|
2216
2216
|
alignItems: "flex-start"
|
|
2217
2217
|
},
|
|
2218
|
-
children: /* @__PURE__ */ i(He, { style: { position: "relative" }, pageNumber:
|
|
2218
|
+
children: /* @__PURE__ */ i(He, { style: { position: "relative" }, pageNumber: r }, r)
|
|
2219
2219
|
}
|
|
2220
|
-
) : /* @__PURE__ */ i(He, { style:
|
|
2220
|
+
) : /* @__PURE__ */ i(He, { style: o, pageNumber: r }, r);
|
|
2221
2221
|
}, gi), yc = () => {
|
|
2222
|
-
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = xt(), { pagesRef:
|
|
2223
|
-
|
|
2222
|
+
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = xt(), { pagesRef: o, setPagesRef: r, setContentRef: a } = Te(), { scrollToPage: c } = yn();
|
|
2223
|
+
fo(o);
|
|
2224
2224
|
const {
|
|
2225
2225
|
virtualScrollRef: d,
|
|
2226
2226
|
getVirtualScrollRef: s,
|
|
@@ -2230,12 +2230,12 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2230
2230
|
virtualScrollableElementRef: u,
|
|
2231
2231
|
totalInnerDimensions: T,
|
|
2232
2232
|
pageScrollElementRef: b
|
|
2233
|
-
} =
|
|
2233
|
+
} = ot(), P = M(!0), { nextPage: y, prevPage: w, setFocusedPage: g, focusedPage: h, totalPages: p } = ce(), { scrollMode: l } = Ae(), { viewMode: v } = $e(), _ = M(null), { loading: I, error: S } = oe(), { passwordRequired: x } = vr(), { LoaderImageComponent: R } = St(), O = M(
|
|
2234
2234
|
T
|
|
2235
2235
|
), D = M({
|
|
2236
2236
|
viewMode: v,
|
|
2237
2237
|
scrollMode: l
|
|
2238
|
-
}), z = M(!1), E = M(), { isFullScreen: L } =
|
|
2238
|
+
}), z = M(!1), E = M(), { isFullScreen: L } = Pr(), {
|
|
2239
2239
|
pageDimension: F,
|
|
2240
2240
|
rowCount: G,
|
|
2241
2241
|
rowHeight: U,
|
|
@@ -2244,26 +2244,26 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2244
2244
|
estimatedColumnWidth: Z,
|
|
2245
2245
|
estimatedRowHeight: ae,
|
|
2246
2246
|
totalDimension: $
|
|
2247
|
-
} = vi(), Q = Nt(T, 100), { onScroll: J } =
|
|
2247
|
+
} = vi(), Q = Nt(T, 100), { onScroll: J } = Or(), te = M();
|
|
2248
2248
|
Ci(V, G, u, v);
|
|
2249
2249
|
const ee = M({
|
|
2250
2250
|
scrollTop: 0,
|
|
2251
2251
|
scrollLeft: 0
|
|
2252
2252
|
});
|
|
2253
|
-
|
|
2254
|
-
const { isPressed: Y } =
|
|
2253
|
+
po(o);
|
|
2254
|
+
const { isPressed: Y } = lo(), { selectionMode: we } = _r(), { initializeGrabScroll: me, resetGrabState: Re } = uo({
|
|
2255
2255
|
isPressed: Y
|
|
2256
|
-
}), Le = W(() => we ===
|
|
2256
|
+
}), Le = W(() => we === mr.HAND, [we]), lt = W(() => {
|
|
2257
2257
|
const q = Array.from({ length: V }, (j, be) => B(be));
|
|
2258
2258
|
return {
|
|
2259
2259
|
columnCount: V,
|
|
2260
|
-
isDualPageWithCover: v ===
|
|
2260
|
+
isDualPageWithCover: v === re.DUAL_PAGE_WITH_COVER,
|
|
2261
2261
|
columnWidths: q,
|
|
2262
2262
|
totalPages: p
|
|
2263
2263
|
};
|
|
2264
2264
|
}, [V, v, B, p]), dt = N(
|
|
2265
2265
|
(q) => {
|
|
2266
|
-
const j = document.activeElement !==
|
|
2266
|
+
const j = document.activeElement !== o;
|
|
2267
2267
|
!L && j || (["ArrowUp", "ArrowLeft"].includes(q.key) ? (q.preventDefault(), w()) : ["ArrowDown", "ArrowRight"].includes(q.key) && (q.preventDefault(), y()));
|
|
2268
2268
|
},
|
|
2269
2269
|
[y, w, L, l]
|
|
@@ -2280,7 +2280,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2280
2280
|
shouldForceUpdate: !0
|
|
2281
2281
|
});
|
|
2282
2282
|
}, [G, V, F, d]);
|
|
2283
|
-
const
|
|
2283
|
+
const rr = N(
|
|
2284
2284
|
(q, j) => {
|
|
2285
2285
|
if (!u)
|
|
2286
2286
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
@@ -2308,12 +2308,12 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2308
2308
|
const { height: Ne, width: pt } = j, { height: Mt, width: Ht } = O.current;
|
|
2309
2309
|
if (Mt === Ne && Ht === pt)
|
|
2310
2310
|
return;
|
|
2311
|
-
const
|
|
2311
|
+
const sr = Ee / Mt * Ne, cr = ut / Ht * pt, lr = Math.round(Math.min(sr, Ne)) || 0, dr = Math.round(Math.min(cr, pt)) || 0;
|
|
2312
2312
|
E.current = setTimeout(() => {
|
|
2313
2313
|
requestAnimationFrame(() => {
|
|
2314
2314
|
u == null || u.scrollTo({
|
|
2315
|
-
top:
|
|
2316
|
-
left:
|
|
2315
|
+
top: lr,
|
|
2316
|
+
left: dr,
|
|
2317
2317
|
behavior: "auto"
|
|
2318
2318
|
});
|
|
2319
2319
|
});
|
|
@@ -2332,13 +2332,13 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2332
2332
|
), j = Array.from({ length: V }).reduce(
|
|
2333
2333
|
(Ee, ut, Ne) => Ee + B(Ne),
|
|
2334
2334
|
0
|
|
2335
|
-
), be =
|
|
2335
|
+
), be = rr(j, q);
|
|
2336
2336
|
ee.current = be, kt(be, { height: q, width: j }), C({
|
|
2337
2337
|
height: q,
|
|
2338
2338
|
width: j
|
|
2339
2339
|
});
|
|
2340
2340
|
}, [F, G, V, kt]);
|
|
2341
|
-
const
|
|
2341
|
+
const or = N(
|
|
2342
2342
|
(q) => {
|
|
2343
2343
|
ee.current = {
|
|
2344
2344
|
scrollTop: q.scrollTop,
|
|
@@ -2355,10 +2355,10 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2355
2355
|
}, [u, b, J]), A(() => () => {
|
|
2356
2356
|
te.current && clearTimeout(te.current);
|
|
2357
2357
|
}, []);
|
|
2358
|
-
const
|
|
2358
|
+
const ir = W(() => se(le["rp-pages-container"], {
|
|
2359
2359
|
[le["rp-cursor-grab"]]: Le && !Y,
|
|
2360
2360
|
[le["rp-cursor-grabbing"]]: Le && Y
|
|
2361
|
-
}), [Le, Y]),
|
|
2361
|
+
}), [Le, Y]), ar = N(
|
|
2362
2362
|
(q) => {
|
|
2363
2363
|
if (Le && q) {
|
|
2364
2364
|
const j = se(le["rp-pages"]), be = document.querySelector(`.${j}`);
|
|
@@ -2384,20 +2384,20 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2384
2384
|
g,
|
|
2385
2385
|
Q
|
|
2386
2386
|
]), /* @__PURE__ */ k(he, { children: [
|
|
2387
|
-
/* @__PURE__ */ i(
|
|
2387
|
+
/* @__PURE__ */ i(Br, { ref: a, children: /* @__PURE__ */ i(
|
|
2388
2388
|
zn,
|
|
2389
2389
|
{
|
|
2390
2390
|
id: n,
|
|
2391
|
-
ref:
|
|
2391
|
+
ref: r,
|
|
2392
2392
|
tabIndex: -1,
|
|
2393
|
-
className:
|
|
2394
|
-
children: /* @__PURE__ */ i(bi, { style: { minHeight: "50px" }, children: ({ width: q, height: j }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref:
|
|
2393
|
+
className: ir,
|
|
2394
|
+
children: /* @__PURE__ */ i(bi, { style: { minHeight: "50px" }, children: ({ width: q, height: j }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: ar, style: { width: q, height: j }, children: l === ie.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2395
2395
|
"div",
|
|
2396
2396
|
{
|
|
2397
2397
|
ref: f,
|
|
2398
2398
|
style: { width: q, height: j },
|
|
2399
2399
|
className: se(le["rp-pages"], le["rp-page-scrolling-wrapper"]),
|
|
2400
|
-
children: v ===
|
|
2400
|
+
children: v === re.DUAL_PAGE ? /* @__PURE__ */ i(_i, { widths: B, heights: U }) : v === re.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ i(Pi, { widths: B, heights: U }) : /* @__PURE__ */ i(Ti, { widths: B, heights: U })
|
|
2401
2401
|
}
|
|
2402
2402
|
) : ae ? /* @__PURE__ */ i(
|
|
2403
2403
|
hi,
|
|
@@ -2406,7 +2406,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2406
2406
|
itemData: lt,
|
|
2407
2407
|
outerRef: m,
|
|
2408
2408
|
innerRef: _,
|
|
2409
|
-
onScroll:
|
|
2409
|
+
onScroll: or,
|
|
2410
2410
|
columnCount: V,
|
|
2411
2411
|
columnWidth: B,
|
|
2412
2412
|
rowHeight: U,
|
|
@@ -2440,7 +2440,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2440
2440
|
},
|
|
2441
2441
|
children: R && /* @__PURE__ */ i(R, {})
|
|
2442
2442
|
}
|
|
2443
|
-
) : S ===
|
|
2443
|
+
) : S === gr.NOT_SUPPORTED ? /* @__PURE__ */ i("div", { className: le["rp-not-supported"], children: /* @__PURE__ */ k("div", { className: le["rp-not-supported-content"], children: [
|
|
2444
2444
|
"React PDF is unable to render on this browser. Please use the supported browsers from the list below:",
|
|
2445
2445
|
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ k("ul", { children: [
|
|
2446
2446
|
/* @__PURE__ */ i("li", { children: "Chrome 119+" }),
|
|
@@ -2453,7 +2453,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2453
2453
|
] }) }) : null }) })
|
|
2454
2454
|
}
|
|
2455
2455
|
) }),
|
|
2456
|
-
x && /* @__PURE__ */ i(
|
|
2456
|
+
x && /* @__PURE__ */ i(ho, {})
|
|
2457
2457
|
] });
|
|
2458
2458
|
}, Ge = {
|
|
2459
2459
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
@@ -2472,7 +2472,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2472
2472
|
const { nextIcon: t } = ve(), { nextIcon: e } = ge();
|
|
2473
2473
|
return t || e || /* @__PURE__ */ i(qe, { style: { transform: "rotate(180deg" } });
|
|
2474
2474
|
}, Si = () => {
|
|
2475
|
-
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage:
|
|
2475
|
+
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ce(), [c, d] = H(t.toString()), { pageNavigationTool: s = !0 } = Ce(), { pageNavigationTool: f = !0 } = xe(), { isSmallScreen: m } = Se(), { viewMode: C } = $e(), { scrollMode: u } = Ae(), { localeMessages: T } = pe();
|
|
2476
2476
|
A(() => {
|
|
2477
2477
|
d(t.toString());
|
|
2478
2478
|
}, [t]);
|
|
@@ -2489,14 +2489,14 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2489
2489
|
h.key === "Enter" && P();
|
|
2490
2490
|
},
|
|
2491
2491
|
[P]
|
|
2492
|
-
), g = W(() => C ===
|
|
2492
|
+
), g = W(() => C === re.DUAL_PAGE && u === ie.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, C, u]);
|
|
2493
2493
|
return !s || !f ? null : typeof s != "boolean" ? /* @__PURE__ */ i(
|
|
2494
2494
|
s,
|
|
2495
2495
|
{
|
|
2496
2496
|
total: e,
|
|
2497
2497
|
current: t,
|
|
2498
|
-
nextPage:
|
|
2499
|
-
prevPage:
|
|
2498
|
+
nextPage: o,
|
|
2499
|
+
prevPage: r,
|
|
2500
2500
|
goToPage: a,
|
|
2501
2501
|
changePage: n
|
|
2502
2502
|
}
|
|
@@ -2505,8 +2505,8 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2505
2505
|
{
|
|
2506
2506
|
total: e,
|
|
2507
2507
|
current: t,
|
|
2508
|
-
nextPage:
|
|
2509
|
-
prevPage:
|
|
2508
|
+
nextPage: o,
|
|
2509
|
+
prevPage: r,
|
|
2510
2510
|
goToPage: a,
|
|
2511
2511
|
changePage: n
|
|
2512
2512
|
}
|
|
@@ -2514,7 +2514,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2514
2514
|
!m && /* @__PURE__ */ i(K, { content: T == null ? void 0 : T.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2515
2515
|
de,
|
|
2516
2516
|
{
|
|
2517
|
-
onClick:
|
|
2517
|
+
onClick: r,
|
|
2518
2518
|
"aria-label": T == null ? void 0 : T.previousPageTooltip,
|
|
2519
2519
|
"aria-disabled": t === 1,
|
|
2520
2520
|
children: /* @__PURE__ */ i(Ii, {})
|
|
@@ -2546,7 +2546,7 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2546
2546
|
!m && /* @__PURE__ */ i(K, { content: T == null ? void 0 : T.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2547
2547
|
de,
|
|
2548
2548
|
{
|
|
2549
|
-
onClick:
|
|
2549
|
+
onClick: o,
|
|
2550
2550
|
"aria-label": T == null ? void 0 : T.nextPageTooltip,
|
|
2551
2551
|
"aria-disabled": g,
|
|
2552
2552
|
children: /* @__PURE__ */ i(xi, {})
|
|
@@ -2554,17 +2554,17 @@ const _i = It(({ widths: t, heights: e }) => {
|
|
|
2554
2554
|
) })
|
|
2555
2555
|
] });
|
|
2556
2556
|
};
|
|
2557
|
-
var ct = "Dialog", [Wn, Ic] =
|
|
2557
|
+
var ct = "Dialog", [Wn, Ic] = _o(ct), [Ri, fe] = Wn(ct), Fn = (t) => {
|
|
2558
2558
|
const {
|
|
2559
2559
|
__scopeDialog: e,
|
|
2560
2560
|
children: n,
|
|
2561
|
-
open:
|
|
2562
|
-
defaultOpen:
|
|
2561
|
+
open: o,
|
|
2562
|
+
defaultOpen: r,
|
|
2563
2563
|
onOpenChange: a,
|
|
2564
2564
|
modal: c = !0
|
|
2565
|
-
} = t, d = X.useRef(null), s = X.useRef(null), [f, m] =
|
|
2566
|
-
prop:
|
|
2567
|
-
defaultProp:
|
|
2565
|
+
} = t, d = X.useRef(null), s = X.useRef(null), [f, m] = To({
|
|
2566
|
+
prop: o,
|
|
2567
|
+
defaultProp: r ?? !1,
|
|
2568
2568
|
onChange: a,
|
|
2569
2569
|
caller: ct
|
|
2570
2570
|
});
|
|
@@ -2588,18 +2588,18 @@ var ct = "Dialog", [Wn, Ic] = _r(ct), [Ri, fe] = Wn(ct), Fn = (t) => {
|
|
|
2588
2588
|
Fn.displayName = ct;
|
|
2589
2589
|
var kn = "DialogTrigger", Li = X.forwardRef(
|
|
2590
2590
|
(t, e) => {
|
|
2591
|
-
const { __scopeDialog: n, ...
|
|
2591
|
+
const { __scopeDialog: n, ...o } = t, r = fe(kn, n), a = Ot(e, r.triggerRef);
|
|
2592
2592
|
return /* @__PURE__ */ i(
|
|
2593
2593
|
Ke.button,
|
|
2594
2594
|
{
|
|
2595
2595
|
type: "button",
|
|
2596
2596
|
"aria-haspopup": "dialog",
|
|
2597
|
-
"aria-expanded":
|
|
2598
|
-
"aria-controls":
|
|
2599
|
-
"data-state": Ft(
|
|
2600
|
-
...
|
|
2597
|
+
"aria-expanded": r.open,
|
|
2598
|
+
"aria-controls": r.contentId,
|
|
2599
|
+
"data-state": Ft(r.open),
|
|
2600
|
+
...o,
|
|
2601
2601
|
ref: a,
|
|
2602
|
-
onClick: Ve(t.onClick,
|
|
2602
|
+
onClick: Ve(t.onClick, r.onOpenToggle)
|
|
2603
2603
|
}
|
|
2604
2604
|
);
|
|
2605
2605
|
}
|
|
@@ -2608,53 +2608,53 @@ Li.displayName = kn;
|
|
|
2608
2608
|
var zt = "DialogPortal", [Ei, Mn] = Wn(zt, {
|
|
2609
2609
|
forceMount: void 0
|
|
2610
2610
|
}), Hn = (t) => {
|
|
2611
|
-
const { __scopeDialog: e, forceMount: n, children:
|
|
2612
|
-
return /* @__PURE__ */ i(Ei, { scope: e, forceMount: n, children: X.Children.map(
|
|
2611
|
+
const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = fe(zt, e);
|
|
2612
|
+
return /* @__PURE__ */ i(Ei, { scope: e, forceMount: n, children: X.Children.map(o, (c) => /* @__PURE__ */ i(Dt, { present: n || a.open, children: /* @__PURE__ */ i(Lo, { asChild: !0, container: r, children: c }) })) });
|
|
2613
2613
|
};
|
|
2614
2614
|
Hn.displayName = zt;
|
|
2615
2615
|
var nt = "DialogOverlay", $n = X.forwardRef(
|
|
2616
2616
|
(t, e) => {
|
|
2617
|
-
const n = Mn(nt, t.__scopeDialog), { forceMount:
|
|
2618
|
-
return a.modal ? /* @__PURE__ */ i(Dt, { present:
|
|
2617
|
+
const n = Mn(nt, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = fe(nt, t.__scopeDialog);
|
|
2618
|
+
return a.modal ? /* @__PURE__ */ i(Dt, { present: o || a.open, children: /* @__PURE__ */ i(Oi, { ...r, ref: e }) }) : null;
|
|
2619
2619
|
}
|
|
2620
2620
|
);
|
|
2621
2621
|
$n.displayName = nt;
|
|
2622
|
-
var Ni =
|
|
2622
|
+
var Ni = Co("DialogOverlay.RemoveScroll"), Oi = X.forwardRef(
|
|
2623
2623
|
(t, e) => {
|
|
2624
|
-
const { __scopeDialog: n, ...
|
|
2624
|
+
const { __scopeDialog: n, ...o } = t, r = fe(nt, n);
|
|
2625
2625
|
return (
|
|
2626
2626
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2627
2627
|
// ie. when `Overlay` and `Content` are siblings
|
|
2628
|
-
/* @__PURE__ */ i(
|
|
2628
|
+
/* @__PURE__ */ i(Io, { as: Ni, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
|
|
2629
2629
|
Ke.div,
|
|
2630
2630
|
{
|
|
2631
|
-
"data-state": Ft(
|
|
2632
|
-
...
|
|
2631
|
+
"data-state": Ft(r.open),
|
|
2632
|
+
...o,
|
|
2633
2633
|
ref: e,
|
|
2634
|
-
style: { pointerEvents: "auto", ...
|
|
2634
|
+
style: { pointerEvents: "auto", ...o.style }
|
|
2635
2635
|
}
|
|
2636
2636
|
) })
|
|
2637
2637
|
);
|
|
2638
2638
|
}
|
|
2639
2639
|
), De = "DialogContent", Gn = X.forwardRef(
|
|
2640
2640
|
(t, e) => {
|
|
2641
|
-
const n = Mn(De, t.__scopeDialog), { forceMount:
|
|
2642
|
-
return /* @__PURE__ */ i(Dt, { present:
|
|
2641
|
+
const n = Mn(De, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = fe(De, t.__scopeDialog);
|
|
2642
|
+
return /* @__PURE__ */ i(Dt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(Di, { ...r, ref: e }) : /* @__PURE__ */ i(Ai, { ...r, ref: e }) });
|
|
2643
2643
|
}
|
|
2644
2644
|
);
|
|
2645
2645
|
Gn.displayName = De;
|
|
2646
2646
|
var Di = X.forwardRef(
|
|
2647
2647
|
(t, e) => {
|
|
2648
|
-
const n = fe(De, t.__scopeDialog),
|
|
2648
|
+
const n = fe(De, t.__scopeDialog), o = X.useRef(null), r = Ot(e, n.contentRef, o);
|
|
2649
2649
|
return X.useEffect(() => {
|
|
2650
|
-
const a =
|
|
2650
|
+
const a = o.current;
|
|
2651
2651
|
if (a)
|
|
2652
|
-
return
|
|
2652
|
+
return xo(a);
|
|
2653
2653
|
}, []), /* @__PURE__ */ i(
|
|
2654
2654
|
Un,
|
|
2655
2655
|
{
|
|
2656
2656
|
...t,
|
|
2657
|
-
ref:
|
|
2657
|
+
ref: r,
|
|
2658
2658
|
trapFocus: n.open,
|
|
2659
2659
|
disableOutsidePointerEvents: !0,
|
|
2660
2660
|
onCloseAutoFocus: Ve(t.onCloseAutoFocus, (a) => {
|
|
@@ -2674,7 +2674,7 @@ var Di = X.forwardRef(
|
|
|
2674
2674
|
}
|
|
2675
2675
|
), Ai = X.forwardRef(
|
|
2676
2676
|
(t, e) => {
|
|
2677
|
-
const n = fe(De, t.__scopeDialog),
|
|
2677
|
+
const n = fe(De, t.__scopeDialog), o = X.useRef(!1), r = X.useRef(!1);
|
|
2678
2678
|
return /* @__PURE__ */ i(
|
|
2679
2679
|
Un,
|
|
2680
2680
|
{
|
|
@@ -2684,31 +2684,31 @@ var Di = X.forwardRef(
|
|
|
2684
2684
|
disableOutsidePointerEvents: !1,
|
|
2685
2685
|
onCloseAutoFocus: (a) => {
|
|
2686
2686
|
var c, d;
|
|
2687
|
-
(c = t.onCloseAutoFocus) == null || c.call(t, a), a.defaultPrevented || (
|
|
2687
|
+
(c = t.onCloseAutoFocus) == null || c.call(t, a), a.defaultPrevented || (o.current || (d = n.triggerRef.current) == null || d.focus(), a.preventDefault()), o.current = !1, r.current = !1;
|
|
2688
2688
|
},
|
|
2689
2689
|
onInteractOutside: (a) => {
|
|
2690
2690
|
var s, f;
|
|
2691
|
-
(s = t.onInteractOutside) == null || s.call(t, a), a.defaultPrevented || (
|
|
2691
|
+
(s = t.onInteractOutside) == null || s.call(t, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
2692
2692
|
const c = a.target;
|
|
2693
|
-
((f = n.triggerRef.current) == null ? void 0 : f.contains(c)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" &&
|
|
2693
|
+
((f = n.triggerRef.current) == null ? void 0 : f.contains(c)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
|
|
2694
2694
|
}
|
|
2695
2695
|
}
|
|
2696
2696
|
);
|
|
2697
2697
|
}
|
|
2698
2698
|
), Un = X.forwardRef(
|
|
2699
2699
|
(t, e) => {
|
|
2700
|
-
const { __scopeDialog: n, trapFocus:
|
|
2701
|
-
return
|
|
2700
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = t, d = fe(De, n), s = X.useRef(null), f = Ot(e, s);
|
|
2701
|
+
return So(), /* @__PURE__ */ k(he, { children: [
|
|
2702
2702
|
/* @__PURE__ */ i(
|
|
2703
|
-
|
|
2703
|
+
Ro,
|
|
2704
2704
|
{
|
|
2705
2705
|
asChild: !0,
|
|
2706
2706
|
loop: !0,
|
|
2707
|
-
trapped:
|
|
2708
|
-
onMountAutoFocus:
|
|
2707
|
+
trapped: o,
|
|
2708
|
+
onMountAutoFocus: r,
|
|
2709
2709
|
onUnmountAutoFocus: a,
|
|
2710
2710
|
children: /* @__PURE__ */ i(
|
|
2711
|
-
|
|
2711
|
+
yo,
|
|
2712
2712
|
{
|
|
2713
2713
|
role: "dialog",
|
|
2714
2714
|
id: d.contentId,
|
|
@@ -2730,28 +2730,28 @@ var Di = X.forwardRef(
|
|
|
2730
2730
|
}
|
|
2731
2731
|
), Wt = "DialogTitle", Vn = X.forwardRef(
|
|
2732
2732
|
(t, e) => {
|
|
2733
|
-
const { __scopeDialog: n, ...
|
|
2734
|
-
return /* @__PURE__ */ i(Ke.h2, { id:
|
|
2733
|
+
const { __scopeDialog: n, ...o } = t, r = fe(Wt, n);
|
|
2734
|
+
return /* @__PURE__ */ i(Ke.h2, { id: r.titleId, ...o, ref: e });
|
|
2735
2735
|
}
|
|
2736
2736
|
);
|
|
2737
2737
|
Vn.displayName = Wt;
|
|
2738
2738
|
var qn = "DialogDescription", zi = X.forwardRef(
|
|
2739
2739
|
(t, e) => {
|
|
2740
|
-
const { __scopeDialog: n, ...
|
|
2741
|
-
return /* @__PURE__ */ i(Ke.p, { id:
|
|
2740
|
+
const { __scopeDialog: n, ...o } = t, r = fe(qn, n);
|
|
2741
|
+
return /* @__PURE__ */ i(Ke.p, { id: r.descriptionId, ...o, ref: e });
|
|
2742
2742
|
}
|
|
2743
2743
|
);
|
|
2744
2744
|
zi.displayName = qn;
|
|
2745
2745
|
var Bn = "DialogClose", Zn = X.forwardRef(
|
|
2746
2746
|
(t, e) => {
|
|
2747
|
-
const { __scopeDialog: n, ...
|
|
2747
|
+
const { __scopeDialog: n, ...o } = t, r = fe(Bn, n);
|
|
2748
2748
|
return /* @__PURE__ */ i(
|
|
2749
2749
|
Ke.button,
|
|
2750
2750
|
{
|
|
2751
2751
|
type: "button",
|
|
2752
|
-
...
|
|
2752
|
+
...o,
|
|
2753
2753
|
ref: e,
|
|
2754
|
-
onClick: Ve(t.onClick, () =>
|
|
2754
|
+
onClick: Ve(t.onClick, () => r.onOpenChange(!1))
|
|
2755
2755
|
}
|
|
2756
2756
|
);
|
|
2757
2757
|
}
|
|
@@ -2760,7 +2760,7 @@ Zn.displayName = Bn;
|
|
|
2760
2760
|
function Ft(t) {
|
|
2761
2761
|
return t ? "open" : "closed";
|
|
2762
2762
|
}
|
|
2763
|
-
var jn = "DialogTitleWarning", [xc, Kn] =
|
|
2763
|
+
var jn = "DialogTitleWarning", [xc, Kn] = Po(jn, {
|
|
2764
2764
|
contentName: De,
|
|
2765
2765
|
titleName: Wt,
|
|
2766
2766
|
docsSlug: "dialog"
|
|
@@ -2774,12 +2774,12 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2774
2774
|
t && (document.getElementById(t) || console.error(n));
|
|
2775
2775
|
}, [n, t]), null;
|
|
2776
2776
|
}, Fi = "DialogDescriptionWarning", ki = ({ contentRef: t, descriptionId: e }) => {
|
|
2777
|
-
const
|
|
2777
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Kn(Fi).contentName}}.`;
|
|
2778
2778
|
return X.useEffect(() => {
|
|
2779
2779
|
var a;
|
|
2780
|
-
const
|
|
2781
|
-
e &&
|
|
2782
|
-
}, [
|
|
2780
|
+
const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2781
|
+
e && r && (document.getElementById(e) || console.warn(o));
|
|
2782
|
+
}, [o, t, e]), null;
|
|
2783
2783
|
}, Mi = Fn, Hi = Hn, $i = $n, Gi = Gn, Ui = Vn, Vi = Zn;
|
|
2784
2784
|
const Oe = {
|
|
2785
2785
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
@@ -2790,7 +2790,7 @@ const Oe = {
|
|
|
2790
2790
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2791
2791
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2792
2792
|
}, qi = () => {
|
|
2793
|
-
const { pdfProperties: t } =
|
|
2793
|
+
const { pdfProperties: t } = oe(), { container: e } = Te(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = Nr(), { localeMessages: r } = pe(), a = W(() => {
|
|
2794
2794
|
if (!t)
|
|
2795
2795
|
return [];
|
|
2796
2796
|
const {
|
|
@@ -2808,34 +2808,34 @@ const Oe = {
|
|
|
2808
2808
|
pageCount: w
|
|
2809
2809
|
} = t;
|
|
2810
2810
|
return [
|
|
2811
|
-
{ label:
|
|
2812
|
-
{ label:
|
|
2811
|
+
{ label: r == null ? void 0 : r.propertiesFilenameLabel, value: d },
|
|
2812
|
+
{ label: r == null ? void 0 : r.propertiesFileSizeLabel, value: c },
|
|
2813
2813
|
{ separate: !0 },
|
|
2814
|
-
{ label:
|
|
2815
|
-
{ label:
|
|
2816
|
-
{ label:
|
|
2817
|
-
{ label:
|
|
2818
|
-
{ label:
|
|
2814
|
+
{ label: r == null ? void 0 : r.propertiesTitleLabel, value: s },
|
|
2815
|
+
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value: f },
|
|
2816
|
+
{ label: r == null ? void 0 : r.propertiesSubjectLabel, value: m },
|
|
2817
|
+
{ label: r == null ? void 0 : r.propertiesKeywordLabel, value: T },
|
|
2818
|
+
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value: u },
|
|
2819
2819
|
{
|
|
2820
|
-
label:
|
|
2820
|
+
label: r == null ? void 0 : r.propertiesCreateOnLabel,
|
|
2821
2821
|
value: C ? qt(C) : ""
|
|
2822
2822
|
},
|
|
2823
2823
|
{
|
|
2824
|
-
label:
|
|
2824
|
+
label: r == null ? void 0 : r.propertiesModifiedOnLabel,
|
|
2825
2825
|
value: b ? qt(b) : ""
|
|
2826
2826
|
},
|
|
2827
2827
|
{ separate: !0 },
|
|
2828
|
-
{ label:
|
|
2829
|
-
{ label:
|
|
2830
|
-
{ label:
|
|
2828
|
+
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: P },
|
|
2829
|
+
{ label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: y },
|
|
2830
|
+
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value: w }
|
|
2831
2831
|
];
|
|
2832
|
-
}, [t,
|
|
2833
|
-
return /* @__PURE__ */ i(Mi, { open: n, onOpenChange:
|
|
2832
|
+
}, [t, r]);
|
|
2833
|
+
return /* @__PURE__ */ i(Mi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(Hi, { container: e, children: /* @__PURE__ */ k("div", { className: Oe["rp-dialog-wrapper"], children: [
|
|
2834
2834
|
/* @__PURE__ */ i($i, { className: Oe["rp-dialog-overlay"] }),
|
|
2835
2835
|
/* @__PURE__ */ k(Gi, { className: Oe["rp-document-dialog"], "aria-labelledby": "document-properties-title", children: [
|
|
2836
|
-
/* @__PURE__ */ i(Ui, { id: "document-properties-title", className: Oe["rp-dialog-title"], children:
|
|
2837
|
-
/* @__PURE__ */ i("div", { className: Oe["rp-document-properties"], role: "region", "aria-labelledby": "document-properties-title", children: a.map((c, d) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Oe["rp-properties-divider"], role: "separator", "aria-orientation": "horizontal" }) : /* @__PURE__ */ i(
|
|
2838
|
-
/* @__PURE__ */ i(Vi, { asChild: !0, className: Oe["rp-dialog-close"], "aria-label": (
|
|
2836
|
+
/* @__PURE__ */ i(Ui, { id: "document-properties-title", className: Oe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2837
|
+
/* @__PURE__ */ i("div", { className: Oe["rp-document-properties"], role: "region", "aria-labelledby": "document-properties-title", children: a.map((c, d) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Oe["rp-properties-divider"], role: "separator", "aria-orientation": "horizontal" }) : /* @__PURE__ */ i(jr, { label: c.label, value: c.value }) }, d)) }),
|
|
2838
|
+
/* @__PURE__ */ i(Vi, { asChild: !0, className: Oe["rp-dialog-close"], "aria-label": (r == null ? void 0 : r.searchCloseButtonTooltip) || "Close dialog", children: /* @__PURE__ */ i(Eo, { "aria-hidden": "true" }) })
|
|
2839
2839
|
] })
|
|
2840
2840
|
] }) }) });
|
|
2841
2841
|
}, Bi = {
|
|
@@ -2844,7 +2844,7 @@ const Oe = {
|
|
|
2844
2844
|
const n = await (await fetch(t)).blob();
|
|
2845
2845
|
return Zi(n);
|
|
2846
2846
|
}, Xn = () => {
|
|
2847
|
-
const { filename: t, pdfSrc: e } =
|
|
2847
|
+
const { filename: t, pdfSrc: e } = oe(), { downloadFilename: n } = Sr(), o = (a) => {
|
|
2848
2848
|
const c = n || a;
|
|
2849
2849
|
return c.endsWith(un) ? c : `${c}${un}`;
|
|
2850
2850
|
};
|
|
@@ -2852,33 +2852,33 @@ const Oe = {
|
|
|
2852
2852
|
if (!t || !e)
|
|
2853
2853
|
throw new Error("There is no PDF source to download");
|
|
2854
2854
|
const a = document.createElement("a");
|
|
2855
|
-
a.href = await ji(e), a.download =
|
|
2855
|
+
a.href = await ji(e), a.download = o(t), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2856
2856
|
}, [t, e]) };
|
|
2857
2857
|
}, Qn = () => {
|
|
2858
2858
|
const { downloadIcon: t } = ve(), { downloadIcon: e } = ge();
|
|
2859
|
-
return t || e || /* @__PURE__ */ i(
|
|
2859
|
+
return t || e || /* @__PURE__ */ i(zo, {});
|
|
2860
2860
|
}, Yn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ki = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Yn, { localeMessages: e, children: /* @__PURE__ */ i(de, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Qn, {}) }) }), Xi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Ie, { onClick: t, children: /* @__PURE__ */ k(Yn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2861
2861
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Qn, {}) }),
|
|
2862
2862
|
e == null ? void 0 : e.downloadFileLabel
|
|
2863
2863
|
] }) }), Jn = () => {
|
|
2864
|
-
const { download: t } = Xn(), { downloadTool: e = !0 } = Ce(), { downloadTool: n = !0 } = xe(), { isSmallScreen:
|
|
2865
|
-
return !e || !n ? null :
|
|
2866
|
-
},
|
|
2864
|
+
const { download: t } = Xn(), { downloadTool: e = !0 } = Ce(), { downloadTool: n = !0 } = xe(), { isSmallScreen: o } = Se(), { localeMessages: r } = pe(), a = r == null ? void 0 : r.downloadFileTooltip;
|
|
2865
|
+
return !e || !n ? null : o ? /* @__PURE__ */ i(Xi, { download: t, localeMessages: r }) : typeof e == "function" ? /* @__PURE__ */ i(K, { content: a, children: /* @__PURE__ */ i(e, { download: t }) }) : typeof n == "function" ? /* @__PURE__ */ i(K, { content: a, children: /* @__PURE__ */ i(n, { download: t }) }) : /* @__PURE__ */ i(Ki, { download: t, localeMessages: r });
|
|
2866
|
+
}, er = () => {
|
|
2867
2867
|
const { printIcon: t } = ve(), { printIcon: e } = ge();
|
|
2868
|
-
return t || e || /* @__PURE__ */ i(
|
|
2869
|
-
},
|
|
2870
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2868
|
+
return t || e || /* @__PURE__ */ i(Wo, {});
|
|
2869
|
+
}, tr = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Qi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(tr, { localeMessages: e, children: /* @__PURE__ */ i(de, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(er, {}) }) }), Yi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Ie, { onClick: t, children: /* @__PURE__ */ k(tr, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2870
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(er, {}) }),
|
|
2871
2871
|
e == null ? void 0 : e.printLabel
|
|
2872
|
-
] }) }),
|
|
2873
|
-
const { print: t, cancel: e, setOnProgress: n, setOnComplete:
|
|
2872
|
+
] }) }), nr = () => {
|
|
2873
|
+
const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a, showDefaultProgress: c } = st(), { printTool: d = !0 } = Ce(), { printTool: s = !0 } = xe(), { isSmallScreen: f } = Se(), { localeMessages: m } = pe(), C = m == null ? void 0 : m.printTooltip;
|
|
2874
2874
|
return !d || !s ? null : f ? /* @__PURE__ */ i(Yi, { print: t, localeMessages: m }) : typeof d == "function" ? /* @__PURE__ */ i(K, { content: C, children: /* @__PURE__ */ i(
|
|
2875
2875
|
d,
|
|
2876
2876
|
{
|
|
2877
2877
|
print: t,
|
|
2878
2878
|
cancel: e,
|
|
2879
2879
|
setOnProgress: n,
|
|
2880
|
-
setOnError:
|
|
2881
|
-
setOnComplete:
|
|
2880
|
+
setOnError: r,
|
|
2881
|
+
setOnComplete: o,
|
|
2882
2882
|
progress: a,
|
|
2883
2883
|
showDefaultProgress: c
|
|
2884
2884
|
}
|
|
@@ -2888,8 +2888,8 @@ const Oe = {
|
|
|
2888
2888
|
print: t,
|
|
2889
2889
|
cancel: e,
|
|
2890
2890
|
setOnProgress: n,
|
|
2891
|
-
setOnError:
|
|
2892
|
-
setOnComplete:
|
|
2891
|
+
setOnError: r,
|
|
2892
|
+
setOnComplete: o,
|
|
2893
2893
|
progress: a,
|
|
2894
2894
|
showDefaultProgress: c
|
|
2895
2895
|
}
|
|
@@ -2903,12 +2903,12 @@ const Oe = {
|
|
|
2903
2903
|
const { goToLastPageIcon: t } = ve(), { goToLastPageIcon: e } = ge();
|
|
2904
2904
|
return t || e || /* @__PURE__ */ i(Tn, {});
|
|
2905
2905
|
}, pn = { width: "100%" }, na = () => {
|
|
2906
|
-
const { goToPage: t, totalPages: e, focusedPage: n } = ce(), { jumpNavigationTool:
|
|
2906
|
+
const { goToPage: t, totalPages: e, focusedPage: n } = ce(), { jumpNavigationTool: o = !0 } = Ce(), { jumpNavigationTool: r = !0 } = xe(), { localeMessages: a } = pe(), c = W(() => n === 1, [n]), d = W(() => n === e, [n, e]), s = N(() => {
|
|
2907
2907
|
t(1);
|
|
2908
2908
|
}, [t]), f = N(() => {
|
|
2909
2909
|
t(e);
|
|
2910
2910
|
}, [t, e]);
|
|
2911
|
-
return !
|
|
2911
|
+
return !o || !r ? null : /* @__PURE__ */ k(tt, { children: [
|
|
2912
2912
|
/* @__PURE__ */ i(Ie, { onClick: s, children: /* @__PURE__ */ i(K, { content: a == null ? void 0 : a.firstPageTooltip, style: pn, children: /* @__PURE__ */ k("div", { className: "rp-menu-item", "aria-disabled": c, children: [
|
|
2913
2913
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(ea, {}) }),
|
|
2914
2914
|
/* @__PURE__ */ i("span", { children: a == null ? void 0 : a.firstPageLabel })
|
|
@@ -2919,8 +2919,8 @@ const Oe = {
|
|
|
2919
2919
|
] }) }) }),
|
|
2920
2920
|
/* @__PURE__ */ i(Lt, {})
|
|
2921
2921
|
] });
|
|
2922
|
-
},
|
|
2923
|
-
const [t, e] = H(!1), { container: n, pagesRef:
|
|
2922
|
+
}, ra = () => {
|
|
2923
|
+
const [t, e] = H(!1), { container: n, pagesRef: o } = Te(), { isSmallScreen: r } = Se(), {
|
|
2924
2924
|
openFileTool: a,
|
|
2925
2925
|
downloadTool: c,
|
|
2926
2926
|
documentProperties: d,
|
|
@@ -2946,7 +2946,7 @@ const Oe = {
|
|
|
2946
2946
|
new ResizeObserver((E) => {
|
|
2947
2947
|
R(E[0].contentRect.height);
|
|
2948
2948
|
})
|
|
2949
|
-
), D = W(() => C || f || m || s || d || b ||
|
|
2949
|
+
), D = W(() => C || f || m || s || d || b || r && (a || c || u || T), [
|
|
2950
2950
|
a,
|
|
2951
2951
|
c,
|
|
2952
2952
|
u,
|
|
@@ -2956,8 +2956,8 @@ const Oe = {
|
|
|
2956
2956
|
f,
|
|
2957
2957
|
m,
|
|
2958
2958
|
C,
|
|
2959
|
-
|
|
2960
|
-
]), z = W(() => l || h || p || g || w || I ||
|
|
2959
|
+
r
|
|
2960
|
+
]), z = W(() => l || h || p || g || w || I || r && (P || y || v || _), [
|
|
2961
2961
|
P,
|
|
2962
2962
|
y,
|
|
2963
2963
|
v,
|
|
@@ -2967,11 +2967,11 @@ const Oe = {
|
|
|
2967
2967
|
h,
|
|
2968
2968
|
p,
|
|
2969
2969
|
l,
|
|
2970
|
-
|
|
2970
|
+
r
|
|
2971
2971
|
]);
|
|
2972
|
-
return A(() => (
|
|
2972
|
+
return A(() => (o && O.current.observe(o), () => {
|
|
2973
2973
|
O.current.disconnect();
|
|
2974
|
-
}), [
|
|
2974
|
+
}), [o]), !D || !z ? null : /* @__PURE__ */ k(he, { children: [
|
|
2975
2975
|
/* @__PURE__ */ i(
|
|
2976
2976
|
Rt,
|
|
2977
2977
|
{
|
|
@@ -2983,7 +2983,7 @@ const Oe = {
|
|
|
2983
2983
|
active: t,
|
|
2984
2984
|
"aria-label": S == null ? void 0 : S.moreOptionTooltip,
|
|
2985
2985
|
"aria-expanded": t,
|
|
2986
|
-
children: /* @__PURE__ */ i(
|
|
2986
|
+
children: /* @__PURE__ */ i(bo, { "aria-hidden": "true" })
|
|
2987
2987
|
}
|
|
2988
2988
|
) }) }),
|
|
2989
2989
|
side: "bottom",
|
|
@@ -2995,19 +2995,19 @@ const Oe = {
|
|
|
2995
2995
|
className: Bi["rp-other-tool-content"],
|
|
2996
2996
|
"data-rp": "moreOptionsDropdown",
|
|
2997
2997
|
children: [
|
|
2998
|
-
|
|
2998
|
+
r && /* @__PURE__ */ k(tt, { children: [
|
|
2999
2999
|
/* @__PURE__ */ i(_n, {}),
|
|
3000
3000
|
/* @__PURE__ */ i(Jn, {}),
|
|
3001
|
-
/* @__PURE__ */ i(
|
|
3001
|
+
/* @__PURE__ */ i(nr, {}),
|
|
3002
3002
|
/* @__PURE__ */ i(Pn, {}),
|
|
3003
3003
|
/* @__PURE__ */ i(Lt, {})
|
|
3004
3004
|
] }),
|
|
3005
3005
|
/* @__PURE__ */ i(na, {}),
|
|
3006
|
-
/* @__PURE__ */ i(
|
|
3007
|
-
/* @__PURE__ */ i(
|
|
3008
|
-
/* @__PURE__ */ i(
|
|
3009
|
-
/* @__PURE__ */ i(
|
|
3010
|
-
/* @__PURE__ */ i(
|
|
3006
|
+
/* @__PURE__ */ i(Oo, {}),
|
|
3007
|
+
/* @__PURE__ */ i(Fo, {}),
|
|
3008
|
+
/* @__PURE__ */ i(Do, {}),
|
|
3009
|
+
/* @__PURE__ */ i(Ao, {}),
|
|
3010
|
+
/* @__PURE__ */ i(No, {})
|
|
3011
3011
|
]
|
|
3012
3012
|
}
|
|
3013
3013
|
)
|
|
@@ -3015,17 +3015,17 @@ const Oe = {
|
|
|
3015
3015
|
),
|
|
3016
3016
|
/* @__PURE__ */ i(qi, {})
|
|
3017
3017
|
] });
|
|
3018
|
-
},
|
|
3018
|
+
}, oa = () => {
|
|
3019
3019
|
const { isSmallScreen: t } = Se();
|
|
3020
3020
|
return /* @__PURE__ */ k(he, { children: [
|
|
3021
|
-
/* @__PURE__ */ i(
|
|
3021
|
+
/* @__PURE__ */ i(wo, {}),
|
|
3022
3022
|
!t && /* @__PURE__ */ k(he, { children: [
|
|
3023
3023
|
/* @__PURE__ */ i(_n, {}),
|
|
3024
3024
|
/* @__PURE__ */ i(Jn, {}),
|
|
3025
|
-
/* @__PURE__ */ i(
|
|
3025
|
+
/* @__PURE__ */ i(nr, {}),
|
|
3026
3026
|
/* @__PURE__ */ i(Pn, {})
|
|
3027
3027
|
] }),
|
|
3028
|
-
/* @__PURE__ */ i(
|
|
3028
|
+
/* @__PURE__ */ i(ra, {})
|
|
3029
3029
|
] });
|
|
3030
3030
|
}, ia = "_active_1yldl_11", We = {
|
|
3031
3031
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_1yldl_1",
|
|
@@ -3036,7 +3036,7 @@ const Oe = {
|
|
|
3036
3036
|
"rp-current-zoom-text": "_rp-current-zoom-text_1yldl_24",
|
|
3037
3037
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_1yldl_28"
|
|
3038
3038
|
}, aa = ({ zoomLevel: t, className: e }) => {
|
|
3039
|
-
const { localeMessages: n } = pe(),
|
|
3039
|
+
const { localeMessages: n } = pe(), o = W(() => {
|
|
3040
3040
|
switch (t) {
|
|
3041
3041
|
case Me.ACTUAL:
|
|
3042
3042
|
return n == null ? void 0 : n.zoomActualSize;
|
|
@@ -3047,18 +3047,18 @@ const Oe = {
|
|
|
3047
3047
|
}
|
|
3048
3048
|
return t.toString();
|
|
3049
3049
|
}, [t, n]);
|
|
3050
|
-
return /* @__PURE__ */ i(he, { children: typeof t == "number" ? /* @__PURE__ */ k(
|
|
3050
|
+
return /* @__PURE__ */ i(he, { children: typeof t == "number" ? /* @__PURE__ */ k(hr, { children: [
|
|
3051
3051
|
/* @__PURE__ */ i("span", { className: e, children: t }),
|
|
3052
3052
|
/* @__PURE__ */ i("span", { className: e, children: "%" })
|
|
3053
|
-
] }) : /* @__PURE__ */ i("span", { className: e, children:
|
|
3053
|
+
] }) : /* @__PURE__ */ i("span", { className: e, children: o }) });
|
|
3054
3054
|
}, sa = [50, 75, 100, 125, 150, 200, 300, 400], ca = () => {
|
|
3055
3055
|
const { zoomInIcon: t } = ve(), { zoomInIcon: e } = ge();
|
|
3056
|
-
return t || e || /* @__PURE__ */ i(
|
|
3056
|
+
return t || e || /* @__PURE__ */ i(ko, {});
|
|
3057
3057
|
}, la = () => {
|
|
3058
3058
|
const { zoomOutIcon: t } = ve(), { zoomOutIcon: e } = ge();
|
|
3059
|
-
return t || e || /* @__PURE__ */ i(
|
|
3059
|
+
return t || e || /* @__PURE__ */ i(Mo, {});
|
|
3060
3060
|
}, da = () => {
|
|
3061
|
-
const { zoomLevel: t, setZoomLevel: e, currentZoom: n } =
|
|
3061
|
+
const { zoomLevel: t, setZoomLevel: e, currentZoom: n } = rt(), { container: o, pagesRef: r } = Te(), { zoomTool: a = !0 } = Ce(), { zoomTool: c = !0 } = xe(), { isSmallScreen: d } = Se(), { localeMessages: s } = pe(), [f, m] = H(0), [C, u] = H(!1), T = M(
|
|
3062
3062
|
new ResizeObserver((g) => {
|
|
3063
3063
|
m(g[0].contentRect.height);
|
|
3064
3064
|
})
|
|
@@ -3072,10 +3072,10 @@ const Oe = {
|
|
|
3072
3072
|
const g = Math.ceil(n * 100 / 25) * 25;
|
|
3073
3073
|
return Math.min(g - 25, Bt);
|
|
3074
3074
|
});
|
|
3075
|
-
}, [e, n]), y = W(() =>
|
|
3076
|
-
return A(() => (
|
|
3075
|
+
}, [e, n]), y = W(() => Ho(n), [n]), w = W(() => $o(n), [n]);
|
|
3076
|
+
return A(() => (r && T.current.observe(r), () => {
|
|
3077
3077
|
T.current.disconnect();
|
|
3078
|
-
}), [
|
|
3078
|
+
}), [r]), !a || !c ? null : typeof a == "function" ? /* @__PURE__ */ i(a, { zoomLevel: t, setZoomLevel: e }) : typeof c == "function" ? /* @__PURE__ */ i(c, { zoomLevel: t, setZoomLevel: e }) : /* @__PURE__ */ k("div", { className: We["rp-zoom-wrapper"], children: [
|
|
3079
3079
|
/* @__PURE__ */ i(K, { content: s == null ? void 0 : s.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
3080
3080
|
de,
|
|
3081
3081
|
{
|
|
@@ -3088,7 +3088,7 @@ const Oe = {
|
|
|
3088
3088
|
!d && /* @__PURE__ */ i(
|
|
3089
3089
|
Rt,
|
|
3090
3090
|
{
|
|
3091
|
-
container:
|
|
3091
|
+
container: o,
|
|
3092
3092
|
open: C,
|
|
3093
3093
|
onOpenChange: u,
|
|
3094
3094
|
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.zoomSelectTooltip, children: /* @__PURE__ */ k(
|
|
@@ -3147,21 +3147,21 @@ const Oe = {
|
|
|
3147
3147
|
) })
|
|
3148
3148
|
] });
|
|
3149
3149
|
}, hn = () => {
|
|
3150
|
-
const { totalMatches: t, nextMatch: e, prevMatch: n } = At(), { localeMessages:
|
|
3150
|
+
const { totalMatches: t, nextMatch: e, prevMatch: n } = At(), { localeMessages: o } = pe(), r = !t || t === 0;
|
|
3151
3151
|
return /* @__PURE__ */ k(he, { children: [
|
|
3152
3152
|
/* @__PURE__ */ i(
|
|
3153
3153
|
K,
|
|
3154
3154
|
{
|
|
3155
|
-
content:
|
|
3155
|
+
content: o == null ? void 0 : o.searchPrevTooltip,
|
|
3156
3156
|
className: ne["rp-search-tool-result-navigator"],
|
|
3157
3157
|
children: /* @__PURE__ */ i(
|
|
3158
3158
|
de,
|
|
3159
3159
|
{
|
|
3160
3160
|
tabIndex: 0,
|
|
3161
3161
|
onClick: n,
|
|
3162
|
-
"aria-label":
|
|
3163
|
-
disabled:
|
|
3164
|
-
"aria-disabled":
|
|
3162
|
+
"aria-label": o == null ? void 0 : o.searchPrevTooltip,
|
|
3163
|
+
disabled: r,
|
|
3164
|
+
"aria-disabled": r,
|
|
3165
3165
|
children: /* @__PURE__ */ i(
|
|
3166
3166
|
qe,
|
|
3167
3167
|
{
|
|
@@ -3176,16 +3176,16 @@ const Oe = {
|
|
|
3176
3176
|
/* @__PURE__ */ i(
|
|
3177
3177
|
K,
|
|
3178
3178
|
{
|
|
3179
|
-
content:
|
|
3179
|
+
content: o == null ? void 0 : o.searchNextTooltip,
|
|
3180
3180
|
className: ne["rp-search-tool-result-navigator"],
|
|
3181
3181
|
children: /* @__PURE__ */ i(
|
|
3182
3182
|
de,
|
|
3183
3183
|
{
|
|
3184
3184
|
tabIndex: 0,
|
|
3185
3185
|
onClick: e,
|
|
3186
|
-
"aria-label":
|
|
3187
|
-
disabled:
|
|
3188
|
-
"aria-disabled":
|
|
3186
|
+
"aria-label": o == null ? void 0 : o.searchNextTooltip,
|
|
3187
|
+
disabled: r,
|
|
3188
|
+
"aria-disabled": r,
|
|
3189
3189
|
children: /* @__PURE__ */ i(
|
|
3190
3190
|
qe,
|
|
3191
3191
|
{
|
|
@@ -3203,7 +3203,7 @@ const Oe = {
|
|
|
3203
3203
|
const { searchIcon: t } = ve(), { searchIcon: e } = ge();
|
|
3204
3204
|
return t || e || /* @__PURE__ */ i(Cn, {});
|
|
3205
3205
|
}, pa = ({ icon: t }) => {
|
|
3206
|
-
const { container: e } = Te(), [n,
|
|
3206
|
+
const { container: e } = Te(), [n, o] = H(!1), { pdf: r } = oe(), [a, c] = H(null), {
|
|
3207
3207
|
searchOptions: d,
|
|
3208
3208
|
setSearchOptions: s,
|
|
3209
3209
|
loading: f,
|
|
@@ -3214,9 +3214,9 @@ const Oe = {
|
|
|
3214
3214
|
prevMatch: b,
|
|
3215
3215
|
search: P
|
|
3216
3216
|
} = At(), { searchTool: y = !0 } = Ce(), { searchTool: w = !0 } = xe(), [g, h] = H(P), { localeMessages: p } = pe(), { isSmallScreen: l } = Se(), [v, _] = H(null), [I, S] = H(!1), x = N(() => {
|
|
3217
|
-
|
|
3217
|
+
o(!0);
|
|
3218
3218
|
}, []), R = N(() => {
|
|
3219
|
-
m(""), h(""),
|
|
3219
|
+
m(""), h(""), o(!1);
|
|
3220
3220
|
}, [m]), O = ($) => {
|
|
3221
3221
|
const Q = $.key === "Enter", J = $.key === " ";
|
|
3222
3222
|
(Q || J) && R();
|
|
@@ -3234,8 +3234,8 @@ const Oe = {
|
|
|
3234
3234
|
A(() => {
|
|
3235
3235
|
h(P);
|
|
3236
3236
|
}, [P]), A(() => {
|
|
3237
|
-
P &&
|
|
3238
|
-
}, [P,
|
|
3237
|
+
P && r && S(!0);
|
|
3238
|
+
}, [P, r]), A(() => {
|
|
3239
3239
|
P && P.trim() !== "" && (h(P), m(P));
|
|
3240
3240
|
}, []), A(() => (window.addEventListener("keydown", D), () => {
|
|
3241
3241
|
window.removeEventListener("keydown", D);
|
|
@@ -3260,8 +3260,8 @@ const Oe = {
|
|
|
3260
3260
|
[s]
|
|
3261
3261
|
);
|
|
3262
3262
|
A(() => {
|
|
3263
|
-
|
|
3264
|
-
}, [
|
|
3263
|
+
r && I && R();
|
|
3264
|
+
}, [r, R]);
|
|
3265
3265
|
const Z = W(() => (v == null ? void 0 : v.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [v]), ae = N(
|
|
3266
3266
|
($) => {
|
|
3267
3267
|
if ($.key === "Tab") {
|
|
@@ -3344,7 +3344,7 @@ const Oe = {
|
|
|
3344
3344
|
onKeyDown: ($) => {
|
|
3345
3345
|
($.key === "Enter" || $.key === " ") && ($.preventDefault(), L());
|
|
3346
3346
|
},
|
|
3347
|
-
children: /* @__PURE__ */ i(
|
|
3347
|
+
children: /* @__PURE__ */ i(Go, {})
|
|
3348
3348
|
}
|
|
3349
3349
|
)
|
|
3350
3350
|
}
|
|
@@ -3414,8 +3414,8 @@ const Oe = {
|
|
|
3414
3414
|
/* @__PURE__ */ i("button", { className: se(Fe["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
3415
3415
|
] }) });
|
|
3416
3416
|
}, ma = at((t, e) => {
|
|
3417
|
-
const { showPrintProgress: n = !0 } = Ce(), { showPrintProgress:
|
|
3418
|
-
if (!(!(a ?? (n &&
|
|
3417
|
+
const { showPrintProgress: n = !0 } = Ce(), { showPrintProgress: o = !0 } = xe(), { progress: r, showDefaultProgress: a } = st(), { isSmallScreen: c } = Se(), { percentage: d } = r || {}, s = () => c ? { gridTemplateColumns: "25% 60% 15%" } : void 0, f = () => {
|
|
3418
|
+
if (!(!(a ?? (n && o)) || !d))
|
|
3419
3419
|
return /* @__PURE__ */ i(fa, { percentage: d });
|
|
3420
3420
|
};
|
|
3421
3421
|
return /* @__PURE__ */ k("div", { children: [
|
|
@@ -3425,7 +3425,7 @@ const Oe = {
|
|
|
3425
3425
|
/* @__PURE__ */ i(Si, {})
|
|
3426
3426
|
] }),
|
|
3427
3427
|
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ge["rp-toolbar-middle"], children: /* @__PURE__ */ i(da, {}) }),
|
|
3428
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ge["rp-toolbar-end"], children: /* @__PURE__ */ i(
|
|
3428
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ge["rp-toolbar-end"], children: /* @__PURE__ */ i(oa, {}) })
|
|
3429
3429
|
] }) }),
|
|
3430
3430
|
/* @__PURE__ */ i(f, {})
|
|
3431
3431
|
] });
|
|
@@ -3436,12 +3436,12 @@ const Oe = {
|
|
|
3436
3436
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
3437
3437
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
3438
3438
|
}, ga = (t) => {
|
|
3439
|
-
const { pageNumber: e, isFocused: n, viewport:
|
|
3440
|
-
width: Math.round(
|
|
3441
|
-
height: Math.round(
|
|
3442
|
-
}), [
|
|
3443
|
-
e &&
|
|
3444
|
-
}, [
|
|
3439
|
+
const { pageNumber: e, isFocused: n, viewport: o } = t, { goToPage: r } = ce(), { pageRotate: a } = it(), c = M(null), d = Nn(), { pages: s } = oe(), [f, m] = H(null), C = M(!1), u = M(), T = W(() => n ? Ue["rp-thumbnail-active"] : "", [n]), b = W(() => ({
|
|
3440
|
+
width: Math.round(o.width),
|
|
3441
|
+
height: Math.round(o.height)
|
|
3442
|
+
}), [o]), P = N(() => {
|
|
3443
|
+
e && r(e);
|
|
3444
|
+
}, [r, e]);
|
|
3445
3445
|
return A(() => {
|
|
3446
3446
|
const y = s.get(e);
|
|
3447
3447
|
u.current === y || (m(null), u.current = y);
|
|
@@ -3538,20 +3538,20 @@ const Oe = {
|
|
|
3538
3538
|
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
3539
3539
|
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - va);
|
|
3540
3540
|
}, ba = at((t, e) => {
|
|
3541
|
-
const { show: n, width:
|
|
3541
|
+
const { show: n, width: o } = t, { focusedPage: r, totalPages: a } = ce(), { thumbnailPages: c, addPage: d, thumbnailLength: s, addToPage: f } = Rn(), m = M(null), C = M(1);
|
|
3542
3542
|
mn(e, () => m.current);
|
|
3543
3543
|
const u = W(() => Object.values(c), [c]), T = N(() => {
|
|
3544
3544
|
const b = s + 1;
|
|
3545
3545
|
b <= a && d(b);
|
|
3546
3546
|
}, [d, a, s]);
|
|
3547
3547
|
return A(() => {
|
|
3548
|
-
|
|
3549
|
-
}, [
|
|
3548
|
+
r > s && a > s ? f(r) : n && C.current !== r && (wa(m.current, r), C.current = r);
|
|
3549
|
+
}, [r, s, f, n, u]), Kr(m.current, T), /* @__PURE__ */ i("div", { ref: m, className: fn["rp-thumbnails-container"], style: { width: o }, children: /* @__PURE__ */ i("div", { className: fn["rp-thumbnails"], children: n ? u.map((b, P) => {
|
|
3550
3550
|
var y, w;
|
|
3551
3551
|
return /* @__PURE__ */ i(
|
|
3552
3552
|
ga,
|
|
3553
3553
|
{
|
|
3554
|
-
isFocused:
|
|
3554
|
+
isFocused: r === ((y = b.page) == null ? void 0 : y.pageNumber),
|
|
3555
3555
|
pageNumber: (w = b.page) == null ? void 0 : w.pageNumber,
|
|
3556
3556
|
loading: b.loading,
|
|
3557
3557
|
viewport: b.viewport,
|
|
@@ -3562,9 +3562,9 @@ const Oe = {
|
|
|
3562
3562
|
}) : null }) });
|
|
3563
3563
|
}), _a = () => {
|
|
3564
3564
|
const { thumbnailIcon: t } = ve(), { thumbnailIcon: e } = ge();
|
|
3565
|
-
return t || e || /* @__PURE__ */ i(
|
|
3565
|
+
return t || e || /* @__PURE__ */ i(Mr, {});
|
|
3566
3566
|
}, Pa = () => {
|
|
3567
|
-
const { active: t, setActive: e } = Rn(), [n,
|
|
3567
|
+
const { active: t, setActive: e } = Rn(), [n, o] = H(Xr), r = M(null), a = M(null), { thumbnailTool: c, sidebarEnable: d } = Ce(), { localeMessages: s } = pe(), f = N(() => {
|
|
3568
3568
|
e((C) => !C);
|
|
3569
3569
|
}, []), m = W(() => typeof c != "boolean" && c ? /* @__PURE__ */ i(c, { onClick: f, active: t }) : c ? /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
3570
3570
|
de,
|
|
@@ -3589,12 +3589,12 @@ const Oe = {
|
|
|
3589
3589
|
"data-rp": "thumbnailSidebar",
|
|
3590
3590
|
className: `${Xe["rp-thumbnails-wrapper"]} ${t ? "" : Xe["rp-thumbnails-wrapper-hidden"]}`,
|
|
3591
3591
|
children: [
|
|
3592
|
-
/* @__PURE__ */ i(ba, { show: t, ref:
|
|
3592
|
+
/* @__PURE__ */ i(ba, { show: t, ref: r }),
|
|
3593
3593
|
/* @__PURE__ */ i(
|
|
3594
|
-
|
|
3594
|
+
Hr,
|
|
3595
3595
|
{
|
|
3596
|
-
onWidthChange:
|
|
3597
|
-
thumbnailRef:
|
|
3596
|
+
onWidthChange: o,
|
|
3597
|
+
thumbnailRef: r,
|
|
3598
3598
|
leftSidebarRef: a
|
|
3599
3599
|
}
|
|
3600
3600
|
)
|
|
@@ -3604,27 +3604,27 @@ const Oe = {
|
|
|
3604
3604
|
]
|
|
3605
3605
|
}
|
|
3606
3606
|
) });
|
|
3607
|
-
}, Sc =
|
|
3607
|
+
}, Sc = fr((t, e) => {
|
|
3608
3608
|
const {
|
|
3609
3609
|
children: n,
|
|
3610
|
-
slots:
|
|
3611
|
-
icons:
|
|
3610
|
+
slots: o,
|
|
3611
|
+
icons: r,
|
|
3612
3612
|
style: a,
|
|
3613
3613
|
className: c,
|
|
3614
3614
|
mobileWidth: d,
|
|
3615
3615
|
onLoaded: s,
|
|
3616
3616
|
cleanupOnLoaded: f,
|
|
3617
3617
|
onLayoutWidthChange: m
|
|
3618
|
-
} = t, [C, u] = H(null), { setContainer: T, setContentRef: b } = Te(), { loading: P } =
|
|
3618
|
+
} = t, [C, u] = H(null), { setContainer: T, setContentRef: b } = Te(), { loading: P } = oe(), { LoaderImageComponent: y } = St();
|
|
3619
3619
|
return A(() => (s && s(), () => {
|
|
3620
3620
|
f && f();
|
|
3621
3621
|
}), [s, f]), // TODO: deprecated in v2.0.0, remove later ~
|
|
3622
|
-
/* @__PURE__ */ i(zn, { toolbarRef: C, ref: e, children: /* @__PURE__ */ i(
|
|
3623
|
-
/* @__PURE__ */ i(Gt, { href: "#rp-
|
|
3624
|
-
/* @__PURE__ */ i(Gt, { href: "#rp-main-content", label: "Skip to
|
|
3625
|
-
/* @__PURE__ */ k(
|
|
3622
|
+
/* @__PURE__ */ i(zn, { toolbarRef: C, ref: e, children: /* @__PURE__ */ i(Gr, { mobileWidth: d, onLayoutWidthChange: m, children: /* @__PURE__ */ i(Ur, { slots: o, children: /* @__PURE__ */ i(Zr, { icons: r, children: /* @__PURE__ */ k($r, { getContainerRef: T, style: a, className: c, children: [
|
|
3623
|
+
/* @__PURE__ */ i(Gt, { href: "#rp-menu", label: "Skip to Menu" }),
|
|
3624
|
+
/* @__PURE__ */ i(Gt, { href: "#rp-main-content", label: "Skip to Main Content" }),
|
|
3625
|
+
/* @__PURE__ */ k(Vr, { children: [
|
|
3626
3626
|
/* @__PURE__ */ k("div", { className: ye["rp-layout"], children: [
|
|
3627
|
-
/* @__PURE__ */ i("nav", { id: "rp-
|
|
3627
|
+
/* @__PURE__ */ i("nav", { id: "rp-menu", role: "menu", "aria-label": "PDF viewer toolbar", children: /* @__PURE__ */ i(
|
|
3628
3628
|
ma,
|
|
3629
3629
|
{
|
|
3630
3630
|
ref: u
|
|
@@ -3653,7 +3653,7 @@ const Oe = {
|
|
|
3653
3653
|
)
|
|
3654
3654
|
] })
|
|
3655
3655
|
] }),
|
|
3656
|
-
/* @__PURE__ */ i(
|
|
3656
|
+
/* @__PURE__ */ i(qr, {})
|
|
3657
3657
|
] }),
|
|
3658
3658
|
P ? /* @__PURE__ */ i(
|
|
3659
3659
|
"div",
|
|
@@ -3696,14 +3696,14 @@ const Oe = {
|
|
|
3696
3696
|
export {
|
|
3697
3697
|
ma as $,
|
|
3698
3698
|
Sn as A,
|
|
3699
|
-
|
|
3699
|
+
Bo as B,
|
|
3700
3700
|
Ln as C,
|
|
3701
3701
|
qi as D,
|
|
3702
3702
|
En as E,
|
|
3703
3703
|
Nn as F,
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3704
|
+
Zo as G,
|
|
3705
|
+
Xo as H,
|
|
3706
|
+
Jo as I,
|
|
3707
3707
|
ti as J,
|
|
3708
3708
|
He as K,
|
|
3709
3709
|
zn as L,
|
|
@@ -3717,9 +3717,9 @@ export {
|
|
|
3717
3717
|
Pc as T,
|
|
3718
3718
|
Ci as U,
|
|
3719
3719
|
Jn as V,
|
|
3720
|
-
|
|
3720
|
+
nr as W,
|
|
3721
3721
|
na as X,
|
|
3722
|
-
|
|
3722
|
+
ra as Y,
|
|
3723
3723
|
aa as Z,
|
|
3724
3724
|
hn as _,
|
|
3725
3725
|
Sc as a,
|
|
@@ -3733,7 +3733,7 @@ export {
|
|
|
3733
3733
|
We as g,
|
|
3734
3734
|
Ge as h,
|
|
3735
3735
|
da as i,
|
|
3736
|
-
|
|
3736
|
+
oa as j,
|
|
3737
3737
|
bc as k,
|
|
3738
3738
|
Tc as l,
|
|
3739
3739
|
Cc as m,
|
|
@@ -3745,9 +3745,9 @@ export {
|
|
|
3745
3745
|
Ji as s,
|
|
3746
3746
|
yn as t,
|
|
3747
3747
|
ce as u,
|
|
3748
|
-
|
|
3748
|
+
Uo as v,
|
|
3749
3749
|
In as w,
|
|
3750
|
-
|
|
3750
|
+
Vo as x,
|
|
3751
3751
|
xn as y,
|
|
3752
|
-
|
|
3752
|
+
qo as z
|
|
3753
3753
|
};
|