@pdf-viewer/react 1.8.0-beta.5 → 1.8.0-beta.7
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/{RPDefaultLayout-c962c0b0.js → RPDefaultLayout-2cca5d34.js} +566 -561
- package/dist/assets/RPDefaultLayout.css +1 -1
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/layout/LayoutContainer.js +2 -2
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/OtherTool.js +1 -1
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/contexts/ElementPageContext.js +37 -36
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/main.js +1 -1
- package/dist/types/components/layout/LayoutContainer.d.ts +3 -2
- package/dist/types/utils/const.d.ts +1 -0
- package/dist/utils/const.js +3 -2
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useHighlight.js +25 -23
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePageRotateContext.js +13 -12
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/package.json +1 -1
|
@@ -1,103 +1,103 @@
|
|
|
1
1
|
import { jsx as i, Fragment as fe, jsxs as W } from "react/jsx-runtime";
|
|
2
2
|
import * as B from "react";
|
|
3
|
-
import { useRef as H, useEffect as F, useCallback as N, useState as $, useMemo as k, createContext as Ye, useContext as Je, forwardRef as $e, useImperativeHandle as cn, createElement as qe, PureComponent as
|
|
3
|
+
import { useRef as H, useEffect as F, useCallback as N, useState as $, useMemo as k, createContext as Ye, useContext as Je, forwardRef as $e, useImperativeHandle as cn, createElement as qe, PureComponent as er, Component as tr, memo as ln } from "react";
|
|
4
4
|
import { ChevronUpIcon as He } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as re } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as dn } from "./components/ui/Input.js";
|
|
7
|
-
import { ViewMode as Re, ScrollMode as Q, AnnotationSubType as Dt, SelectionMode as
|
|
7
|
+
import { ViewMode as Re, ScrollMode as Q, AnnotationSubType as Dt, SelectionMode as nr, ZoomLevel as at } from "./utils/types.js";
|
|
8
8
|
import { useScrollModeContext as Ee } from "./contexts/ScrollModeContext.js";
|
|
9
9
|
import { useDocumentContext as ee } from "./contexts/RPDocumentContext.js";
|
|
10
|
-
import { useDocumentPasswordContext as
|
|
11
|
-
import { useDarkModeContext as
|
|
10
|
+
import { useDocumentPasswordContext as rr } from "./contexts/DocumentPasswordContext.js";
|
|
11
|
+
import { useDarkModeContext as or } from "./contexts/DarkModeContext.js";
|
|
12
12
|
import "./contexts/RotationContext.js";
|
|
13
|
-
import { useLayerContext as
|
|
13
|
+
import { useLayerContext as ir } from "./contexts/LayerContext.js";
|
|
14
14
|
import { useZoomContext as Qe } from "./contexts/ZoomContext.js";
|
|
15
15
|
import { useViewModeContext as Ne } from "./contexts/ViewModeContext.js";
|
|
16
16
|
import { useVirtualScrollContext as et } from "./contexts/VirtualScrollContext.js";
|
|
17
17
|
import { useVirtualGridContext as un } from "./contexts/VirtualGridContext.js";
|
|
18
|
-
import { useSelectionModeContext as
|
|
19
|
-
import { useInitialStateContext as
|
|
20
|
-
import { useFullScreenContext as
|
|
18
|
+
import { useSelectionModeContext as ar } from "./contexts/SelectionModeContext.js";
|
|
19
|
+
import { useInitialStateContext as sr } from "./contexts/InitialStateContext.js";
|
|
20
|
+
import { useFullScreenContext as cr } from "./contexts/FullScreenContext.js";
|
|
21
21
|
import "./contexts/FileInputContext.js";
|
|
22
22
|
import "./contexts/DropFileZoneContext.js";
|
|
23
23
|
import { renderPage as vt } from "./utils/renderPage.js";
|
|
24
|
-
import { findMatches as
|
|
24
|
+
import { findMatches as lr, resetDivs as dr, highlightMatches as ur, isMatchEntireWord as pr } from "./utils/highlight.js";
|
|
25
25
|
import { useLayoutContainer as me } from "./contexts/LayoutContainerContext.js";
|
|
26
26
|
import { useDimensionPagesContext as Ge } from "./contexts/DimensionPagesContext.js";
|
|
27
27
|
import { useLocalizationContext as ae } from "./contexts/LocalizationContext.js";
|
|
28
|
-
import { useHighlightContext as
|
|
28
|
+
import { useHighlightContext as hr } from "./contexts/HighlightContext.js";
|
|
29
29
|
import "./contexts/LicenseContext.js";
|
|
30
|
-
import { useDownloadContext as
|
|
30
|
+
import { useDownloadContext as fr } from "./contexts/DownloadContext.js";
|
|
31
31
|
import { useSmoothScrollContext as pn } from "./contexts/SmoothScrollContext.js";
|
|
32
32
|
import "./contexts/ElementPageContext.js";
|
|
33
33
|
import { usePagesRotateContext as Ue } from "./contexts/PagesRotateContext.js";
|
|
34
34
|
import { useLoaderContext as hn } from "./contexts/LoaderContext.js";
|
|
35
35
|
import "./components/RPConfig.js";
|
|
36
|
-
import { ThumbnailIcon as
|
|
36
|
+
import { ThumbnailIcon as mr } from "./components/icons/Thumbnail.js";
|
|
37
37
|
import { c as ne } from "./clsx-0c6e471a.js";
|
|
38
38
|
import { LoaderIcon as Ct } from "./components/icons/LoaderIcon.js";
|
|
39
|
-
import { useInfiniteScroll as
|
|
40
|
-
import { RPSplitter as
|
|
41
|
-
import { useToolbarComponentContext as ge, ToolbarComponentProvider as
|
|
42
|
-
import { useIconContext as ue, IconProvider as
|
|
39
|
+
import { useInfiniteScroll as gr } from "./utils/hooks/useInfiniteScroll.js";
|
|
40
|
+
import { RPSplitter as vr } from "./components/layout/sidebar/RPSplitter.js";
|
|
41
|
+
import { useToolbarComponentContext as ge, ToolbarComponentProvider as wr } from "./contexts/ToolbarComponentContext.js";
|
|
42
|
+
import { useIconContext as ue, IconProvider as _r } from "./contexts/IconContext.js";
|
|
43
43
|
import K from "./components/ui/RPTooltip.js";
|
|
44
|
-
import { Container as
|
|
45
|
-
import { WrapperLayout as
|
|
46
|
-
import { RPDropFileZone as
|
|
47
|
-
import { useViewportContext as Pe, ViewportProvider as
|
|
48
|
-
import { useThemeContext as
|
|
49
|
-
import * as
|
|
50
|
-
import { PixelsPerInch as
|
|
51
|
-
import { SimpleLinkService as
|
|
52
|
-
import { annotationsEvents as
|
|
53
|
-
import { normalizeSingleKeyword as
|
|
54
|
-
import { CustomElement as
|
|
55
|
-
import { _ as
|
|
56
|
-
import { useMousePressed as
|
|
57
|
-
import { useGrabScroll as
|
|
58
|
-
import { usePinch as
|
|
44
|
+
import { Container as br } from "./components/layout/Container.js";
|
|
45
|
+
import { WrapperLayout as Cr } from "./components/layout/WrapperLayout.js";
|
|
46
|
+
import { RPDropFileZone as Pr } from "./components/RPDropFileZone.js";
|
|
47
|
+
import { useViewportContext as Pe, ViewportProvider as Tr } from "./contexts/ViewportContext.js";
|
|
48
|
+
import { useThemeContext as Sr } from "./contexts/ThemeContext.js";
|
|
49
|
+
import * as yr from "pdfjs-dist";
|
|
50
|
+
import { PixelsPerInch as xr, AnnotationMode as Ir, RenderingCancelledException as Rr, AnnotationLayer as Lr } from "pdfjs-dist";
|
|
51
|
+
import { SimpleLinkService as Er } from "./utils/link_service.js";
|
|
52
|
+
import { annotationsEvents as Nr, annotationEventsHandler as Or, handleClick as At, handleAnnotationWidget as zr, handleAnnotationLink as Dr, bindLayerEvents as Ar, unbindLayerEvents as Ft } from "./utils/annotations.js";
|
|
53
|
+
import { normalizeSingleKeyword as Fr, sortHighlightPosition as Wr, unwrap as kr } from "./components/page/searchHighlight.js";
|
|
54
|
+
import { CustomElement as Mr } from "./components/page/CustomElement.js";
|
|
55
|
+
import { _ as Hr, U as $r } from "./Popover-1faa77f6.js";
|
|
56
|
+
import { useMousePressed as Gr } from "./utils/hooks/useMousePressed.js";
|
|
57
|
+
import { useGrabScroll as Ur } from "./utils/hooks/useGrabScroll.js";
|
|
58
|
+
import { usePinch as Vr } from "./utils/hooks/usePinch.js";
|
|
59
59
|
import { useDebounce as Pt } from "./utils/hooks/useDebounce.js";
|
|
60
|
-
import
|
|
61
|
-
import { getPositionFromPage as
|
|
60
|
+
import qr from "./components/ui/PasswordModal.js";
|
|
61
|
+
import { getPositionFromPage as Br, getPageFromPosition as Zr } from "./utils/calculatePage.js";
|
|
62
62
|
import { getScrollDistance as Ae } from "./utils/getScrollDistance.js";
|
|
63
|
-
import { getWordPositionInPage as
|
|
63
|
+
import { getWordPositionInPage as jr } from "./utils/getWordPositionInPage.js";
|
|
64
64
|
import { getThumbnailViewport as Wt } from "./utils/getThumbnailViewport.js";
|
|
65
65
|
import { smoothScrollTo as st } from "./utils/smoothScrollTo.js";
|
|
66
|
-
import { appConsole as
|
|
66
|
+
import { appConsole as Kr } from "./utils/appConsole.js";
|
|
67
67
|
import { FileUploadTool as fn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
68
|
-
import { DarkModeTool as
|
|
69
|
-
import { ThreeDotIcon as
|
|
68
|
+
import { DarkModeTool as Xr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
69
|
+
import { ThreeDotIcon as Yr } from "./components/icons/ThreeDotIcon.js";
|
|
70
70
|
import { UIDropDown as mn } from "./components/ui/DropDown.js";
|
|
71
|
-
import { e as
|
|
72
|
-
import { D as
|
|
73
|
-
import { a as
|
|
74
|
-
import { h as
|
|
75
|
-
import { CloseIcon as
|
|
71
|
+
import { e as Jr, a as Tt, P as Ve, c as Me, g as St, i as Qr, k as eo, f as to } from "./index-1cb41342.js";
|
|
72
|
+
import { D as no, u as ct } from "./index-aa2d3884.js";
|
|
73
|
+
import { a as ro, u as oo, F as io, b as ao, G as Ke } from "./index-7279fb4e.js";
|
|
74
|
+
import { h as so } from "./component-1da194e8.js";
|
|
75
|
+
import { CloseIcon as co } from "./components/icons/CloseIcon.js";
|
|
76
76
|
import { dateFormatter as kt } from "./utils/dateFormatter.js";
|
|
77
|
-
import { PropertyItem as
|
|
78
|
-
import { useOtherToolContext as
|
|
79
|
-
import { DocumentProperties as
|
|
80
|
-
import { RotateTool as
|
|
81
|
-
import { ViewModeTool as
|
|
82
|
-
import { ScrollModeTool as
|
|
77
|
+
import { PropertyItem as lo } from "./components/layout/toolbar/PropertyItem.js";
|
|
78
|
+
import { useOtherToolContext as uo, OtherToolProvider as po } from "./contexts/OtherToolContext.js";
|
|
79
|
+
import { DocumentProperties as ho } from "./components/layout/toolbar/DocumentProperties.js";
|
|
80
|
+
import { RotateTool as fo } from "./components/layout/toolbar/RotateTool.js";
|
|
81
|
+
import { ViewModeTool as mo } from "./components/layout/toolbar/ViewModeTool.js";
|
|
82
|
+
import { ScrollModeTool as go } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
83
83
|
import { MenuSeparator as yt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
84
|
-
import { FileDownloadDefaultIcon as
|
|
84
|
+
import { FileDownloadDefaultIcon as vo } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
85
85
|
import { MenuItem as Ce } from "./components/layout/toolbar/MenuItem.js";
|
|
86
|
-
import { PrintDefaultTool as
|
|
86
|
+
import { PrintDefaultTool as wo } from "./components/icons/PrintDefaultIcon.js";
|
|
87
87
|
import { FullScreenTool as gn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
88
88
|
import { GoToDownIcon as vn } from "./components/icons/GoToDownIcon.js";
|
|
89
|
-
import { SelectionModeTool as
|
|
90
|
-
import { ZoomInIcon as
|
|
91
|
-
import { ZoomOutIcon as
|
|
89
|
+
import { SelectionModeTool as _o } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
90
|
+
import { ZoomInIcon as bo } from "./components/icons/ZoomInIcon.js";
|
|
91
|
+
import { ZoomOutIcon as Co } from "./components/icons/ZoomOutIcon.js";
|
|
92
92
|
import { PAGE_PADDING as Mt } from "./utils/constants.js";
|
|
93
|
-
import { getZoomLevel as
|
|
94
|
-
import { SearchIcon as
|
|
93
|
+
import { getZoomLevel as Po } from "./utils/getZoomLevel.js";
|
|
94
|
+
import { SearchIcon as To } from "./components/icons/SearchIcon.js";
|
|
95
95
|
import { c as J, S as Ht } from "./SearchCloseButton-ddb9877e.js";
|
|
96
96
|
import { UICheckbox as $t } from "./components/ui/Checkbox.js";
|
|
97
|
-
import { ClearIcon as
|
|
97
|
+
import { ClearIcon as So } from "./components/icons/ClearIcon.js";
|
|
98
98
|
import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
|
|
99
99
|
import './assets/RPDefaultLayout.css';const wn = () => {
|
|
100
|
-
const { viewMode: t } = Ne(), { scrollMode: e } = Ee(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths:
|
|
100
|
+
const { viewMode: t } = Ne(), { scrollMode: e } = Ee(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: u, heights: d } = Ge(), m = H(e), v = H(t), p = H(c), { targetScrollPage: w } = pn();
|
|
101
101
|
F(() => {
|
|
102
102
|
n != null && n.scrollToItem && (l.current = n);
|
|
103
103
|
}, [n]), F(() => {
|
|
@@ -110,7 +110,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
110
110
|
const h = Math.ceil(b / 2) * 2 - 1;
|
|
111
111
|
if (b === h + 1) {
|
|
112
112
|
const g = {
|
|
113
|
-
left:
|
|
113
|
+
left: u[h],
|
|
114
114
|
top: 0
|
|
115
115
|
};
|
|
116
116
|
return new Promise(
|
|
@@ -126,7 +126,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
126
126
|
behavior: T
|
|
127
127
|
});
|
|
128
128
|
},
|
|
129
|
-
[r,
|
|
129
|
+
[r, u, st]
|
|
130
130
|
);
|
|
131
131
|
return F(() => {
|
|
132
132
|
m.current = e, v.current = t;
|
|
@@ -151,7 +151,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
151
151
|
if (w.current = b, m.current === Q.HORIZONTAL_SCROLLING) {
|
|
152
152
|
g = h;
|
|
153
153
|
const S = {
|
|
154
|
-
left: Ae(
|
|
154
|
+
left: Ae(u, g),
|
|
155
155
|
top: 0
|
|
156
156
|
};
|
|
157
157
|
return s.scrollTo({
|
|
@@ -162,8 +162,8 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
162
162
|
if (v.current === Re.DUAL_PAGE) {
|
|
163
163
|
g = h % 2, f = Math.floor(h / 2);
|
|
164
164
|
const S = {
|
|
165
|
-
left: Ae(
|
|
166
|
-
top: Ae(
|
|
165
|
+
left: Ae(u, g),
|
|
166
|
+
top: Ae(d, f)
|
|
167
167
|
};
|
|
168
168
|
return s.scrollTo({
|
|
169
169
|
...S,
|
|
@@ -172,7 +172,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
172
172
|
}
|
|
173
173
|
const C = {
|
|
174
174
|
left: 0,
|
|
175
|
-
top: Ae(
|
|
175
|
+
top: Ae(d, f)
|
|
176
176
|
};
|
|
177
177
|
return s.scrollTo({
|
|
178
178
|
...C,
|
|
@@ -185,12 +185,12 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
185
185
|
P,
|
|
186
186
|
a,
|
|
187
187
|
st,
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
d,
|
|
189
|
+
u
|
|
190
190
|
]
|
|
191
191
|
) };
|
|
192
|
-
},
|
|
193
|
-
const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ne(), { scrollMode:
|
|
192
|
+
}, yo = (t = 1) => {
|
|
193
|
+
const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ne(), { scrollMode: u } = Ee(), { widths: d } = Ge(), { pagesRef: m } = me(), v = Pt(e, 100), p = N(
|
|
194
194
|
(f) => {
|
|
195
195
|
if (!/^[0-9]*$/g.test(f.toString()) || !f)
|
|
196
196
|
return { success: !1, currentPage: l.current };
|
|
@@ -208,17 +208,17 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
208
208
|
const g = f % 2 === 1;
|
|
209
209
|
if (!m || g)
|
|
210
210
|
return !1;
|
|
211
|
-
const s = g ?
|
|
211
|
+
const s = g ? d[f] : d[f - 1], C = g ? d[f + 1] : d[f];
|
|
212
212
|
return c === Re.DUAL_PAGE && s + C < m.clientWidth;
|
|
213
|
-
}, [c,
|
|
213
|
+
}, [c, d, m, o]), b = N(() => {
|
|
214
214
|
let f = e - 1;
|
|
215
215
|
y(f) && (f = e - 2), P(f);
|
|
216
|
-
}, [P, e, c,
|
|
216
|
+
}, [P, e, c, u, y]), T = k(() => c === Re.DUAL_PAGE && u === Q.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, c, u]), h = N(() => {
|
|
217
217
|
if (T)
|
|
218
218
|
return;
|
|
219
219
|
let f = e + 1;
|
|
220
220
|
y(f) && (f = e + 2), P(f);
|
|
221
|
-
}, [P, e, y, c,
|
|
221
|
+
}, [P, e, y, c, u, T]);
|
|
222
222
|
return {
|
|
223
223
|
focusedPage: v,
|
|
224
224
|
totalPages: o,
|
|
@@ -242,9 +242,9 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
242
242
|
}
|
|
243
243
|
}), ie = () => {
|
|
244
244
|
const t = Je(_n);
|
|
245
|
-
return typeof (t == null ? void 0 : t.focusedPage) > "u" &&
|
|
245
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && Kr.error("Please use this hooks inside children component of RPProvider"), t;
|
|
246
246
|
}, Gs = ({ children: t }) => {
|
|
247
|
-
const { pdf: e } = ee(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: l, nextPage: c, prevPage:
|
|
247
|
+
const { pdf: e } = ee(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: l, nextPage: c, prevPage: u } = yo();
|
|
248
248
|
return F(() => {
|
|
249
249
|
e != null && e.numPages && (a(e.numPages), r(1));
|
|
250
250
|
}, [e, a, r]), /* @__PURE__ */ i(
|
|
@@ -256,19 +256,19 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
256
256
|
setFocusedPage: r,
|
|
257
257
|
setTotalPages: a,
|
|
258
258
|
nextPage: c,
|
|
259
|
-
prevPage:
|
|
259
|
+
prevPage: u,
|
|
260
260
|
goToPage: l
|
|
261
261
|
},
|
|
262
262
|
children: t
|
|
263
263
|
}
|
|
264
264
|
);
|
|
265
265
|
};
|
|
266
|
-
const
|
|
266
|
+
const xo = () => {
|
|
267
267
|
const { pdf: t, pages: e } = ee(), [n, o] = $({
|
|
268
268
|
loadedPages: 0,
|
|
269
269
|
totalPages: 0,
|
|
270
270
|
percentage: 0
|
|
271
|
-
}), [r, a] = $(!1), [l, c] = $(!1), [
|
|
271
|
+
}), [r, a] = $(!1), [l, c] = $(!1), [u, d] = $(null), m = H(!1);
|
|
272
272
|
F(() => {
|
|
273
273
|
m.current;
|
|
274
274
|
}, [m]);
|
|
@@ -277,7 +277,7 @@ const yo = () => {
|
|
|
277
277
|
const f = document.querySelector(".rp-print-zone");
|
|
278
278
|
f && f.remove();
|
|
279
279
|
}, []), p = N(() => {
|
|
280
|
-
m.current = !1, a(!1), c(!1),
|
|
280
|
+
m.current = !1, a(!1), c(!1), d(null), o({
|
|
281
281
|
loadedPages: 0,
|
|
282
282
|
totalPages: 0,
|
|
283
283
|
percentage: 0
|
|
@@ -297,7 +297,7 @@ const yo = () => {
|
|
|
297
297
|
p();
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
|
-
const x = _ /
|
|
300
|
+
const x = _ / xr.PDF;
|
|
301
301
|
f.width = Math.floor(C.width * x), f.height = Math.floor(C.height * x);
|
|
302
302
|
const R = f.getContext("2d");
|
|
303
303
|
R.save(), R.fillStyle = "rgb(255, 255, 255)", R.fillRect(0, 0, f.width, f.height), R.restore();
|
|
@@ -314,14 +314,14 @@ const yo = () => {
|
|
|
314
314
|
transform: [x, 0, 0, x, 0, 0],
|
|
315
315
|
viewport: z.getViewport({ scale: 1, rotation: C.rotation }),
|
|
316
316
|
intent: "print",
|
|
317
|
-
annotationMode:
|
|
317
|
+
annotationMode: Ir.ENABLE_STORAGE,
|
|
318
318
|
optionalContentConfigPromise: S,
|
|
319
319
|
printAnnotationStorage: D
|
|
320
320
|
};
|
|
321
321
|
try {
|
|
322
322
|
return z.render(A).promise;
|
|
323
323
|
} catch (L) {
|
|
324
|
-
throw L instanceof
|
|
324
|
+
throw L instanceof Rr || console.error(L), L;
|
|
325
325
|
}
|
|
326
326
|
}, y = N(() => {
|
|
327
327
|
const f = window.print;
|
|
@@ -403,7 +403,7 @@ const yo = () => {
|
|
|
403
403
|
const E = T(g, e);
|
|
404
404
|
document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await y();
|
|
405
405
|
} catch (s) {
|
|
406
|
-
c(!0), s instanceof Error &&
|
|
406
|
+
c(!0), s instanceof Error && d(s);
|
|
407
407
|
} finally {
|
|
408
408
|
f.height = 0, f.width = 0;
|
|
409
409
|
}
|
|
@@ -421,7 +421,7 @@ const yo = () => {
|
|
|
421
421
|
progress: n,
|
|
422
422
|
isComplete: r,
|
|
423
423
|
isError: l,
|
|
424
|
-
error:
|
|
424
|
+
error: u
|
|
425
425
|
};
|
|
426
426
|
}, bn = Ye({
|
|
427
427
|
print: () => {
|
|
@@ -441,7 +441,7 @@ const yo = () => {
|
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
}), Us = ({ children: t }) => {
|
|
444
|
-
const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete:
|
|
444
|
+
const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: u, isError: d, error: m } = xo(), v = N((b) => {
|
|
445
445
|
b && typeof b == "function" && r(() => b);
|
|
446
446
|
}, []), p = (b) => {
|
|
447
447
|
m && b(m);
|
|
@@ -452,12 +452,12 @@ const yo = () => {
|
|
|
452
452
|
[c, e]
|
|
453
453
|
);
|
|
454
454
|
F(() => {
|
|
455
|
-
|
|
456
|
-
}, [
|
|
457
|
-
|
|
455
|
+
u && o && P();
|
|
456
|
+
}, [u, o]), F(() => {
|
|
457
|
+
d && p((b) => {
|
|
458
458
|
console.error(b);
|
|
459
459
|
});
|
|
460
|
-
}, [
|
|
460
|
+
}, [d]), F(() => {
|
|
461
461
|
c && e && e(c);
|
|
462
462
|
}, [c, e]);
|
|
463
463
|
const P = () => {
|
|
@@ -476,12 +476,12 @@ const yo = () => {
|
|
|
476
476
|
if (!t)
|
|
477
477
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
478
478
|
return t;
|
|
479
|
-
},
|
|
479
|
+
}, Io = () => {
|
|
480
480
|
const [t, e] = $({}), { pages: n } = ee(), o = k(() => Object.keys(t).length, [t]), r = N(
|
|
481
481
|
(l) => {
|
|
482
482
|
if (!n.size)
|
|
483
483
|
return;
|
|
484
|
-
const c = l > n.size ? n.size : l,
|
|
484
|
+
const c = l > n.size ? n.size : l, u = Array.from(n.values()).slice(0, c).map((v) => {
|
|
485
485
|
const { thumbnailViewport: p, scale: w } = Wt(v.page, v.defaultRotation);
|
|
486
486
|
return {
|
|
487
487
|
scale: w,
|
|
@@ -490,10 +490,10 @@ const yo = () => {
|
|
|
490
490
|
viewport: p,
|
|
491
491
|
defaultRotation: v.defaultRotation
|
|
492
492
|
};
|
|
493
|
-
}),
|
|
494
|
-
e(
|
|
493
|
+
}), d = u.reduce((v, p) => (v[p.page.pageNumber] = p, v), {});
|
|
494
|
+
e(d);
|
|
495
495
|
const m = [];
|
|
496
|
-
for (const v of
|
|
496
|
+
for (const v of u) {
|
|
497
497
|
const p = document.createElement("canvas"), w = vt(v.page, p, {
|
|
498
498
|
scale: v.scale,
|
|
499
499
|
rotate: v.defaultRotation
|
|
@@ -529,8 +529,8 @@ const yo = () => {
|
|
|
529
529
|
const c = n.get(l);
|
|
530
530
|
if (!c)
|
|
531
531
|
return;
|
|
532
|
-
e((
|
|
533
|
-
...
|
|
532
|
+
e((d) => ({
|
|
533
|
+
...d,
|
|
534
534
|
[l]: {
|
|
535
535
|
loading: !0,
|
|
536
536
|
page: c.page,
|
|
@@ -539,22 +539,22 @@ const yo = () => {
|
|
|
539
539
|
defaultRotation: c.defaultRotation
|
|
540
540
|
}
|
|
541
541
|
}));
|
|
542
|
-
const
|
|
543
|
-
vt(c.page,
|
|
542
|
+
const u = document.createElement("canvas");
|
|
543
|
+
vt(c.page, u, {
|
|
544
544
|
scale: c.thumbnailScale,
|
|
545
545
|
rotate: c.defaultRotation
|
|
546
546
|
}).promise.then(() => {
|
|
547
|
-
const
|
|
547
|
+
const d = u.toDataURL(), { thumbnailViewport: m, scale: v } = Wt(c.page);
|
|
548
548
|
return {
|
|
549
549
|
scale: v,
|
|
550
|
-
thumbnailSrc:
|
|
550
|
+
thumbnailSrc: d,
|
|
551
551
|
page: c.page,
|
|
552
552
|
loading: !1,
|
|
553
553
|
viewport: m,
|
|
554
554
|
defaultRotation: c.defaultRotation
|
|
555
555
|
};
|
|
556
|
-
}).then((
|
|
557
|
-
e((m) => ({ ...m, [l]:
|
|
556
|
+
}).then((d) => {
|
|
557
|
+
e((m) => ({ ...m, [l]: d }));
|
|
558
558
|
});
|
|
559
559
|
},
|
|
560
560
|
[n]
|
|
@@ -574,7 +574,7 @@ const yo = () => {
|
|
|
574
574
|
children: t,
|
|
575
575
|
initialThumbnailsVisible: e
|
|
576
576
|
}) => {
|
|
577
|
-
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } =
|
|
577
|
+
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = Io(), [l, c] = $(e);
|
|
578
578
|
return /* @__PURE__ */ i(
|
|
579
579
|
Cn.Provider,
|
|
580
580
|
{
|
|
@@ -582,8 +582,8 @@ const yo = () => {
|
|
|
582
582
|
children: t
|
|
583
583
|
}
|
|
584
584
|
);
|
|
585
|
-
},
|
|
586
|
-
const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = ee(), { widths:
|
|
585
|
+
}, Ro = (t = {}, e = "") => {
|
|
586
|
+
const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = ee(), { widths: u, heights: d } = Ge(), m = H(!n), { currentZoom: v } = Qe(), [p, w] = $([]), { setFocusedPage: P } = ie(), { columnCount: y } = Ne(), { pageRotate: b } = Ue(), [T, h] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Ee(), { pagesRef: C } = me(), [_, S] = $(null), E = H({}), x = k(() => T === 0 ? null : p[T - 1], [T, p]), R = k(() => p.length, [p]);
|
|
587
587
|
F(() => {
|
|
588
588
|
if (!x || !c)
|
|
589
589
|
return;
|
|
@@ -596,16 +596,16 @@ const yo = () => {
|
|
|
596
596
|
let O = 0, M = 0;
|
|
597
597
|
if (s === Q.VERTICAL_SCROLLING) {
|
|
598
598
|
const le = x.page - 1, Y = y, Fe = le % Y, we = Math.floor(le / Y);
|
|
599
|
-
O = Ae(
|
|
599
|
+
O = Ae(d, we), M = Ae(u, Fe);
|
|
600
600
|
}
|
|
601
|
-
s === Q.HORIZONTAL_SCROLLING && (M =
|
|
601
|
+
s === Q.HORIZONTAL_SCROLLING && (M = u.slice(0, x.page - 1).reduce((le, Y) => le + Y, 0));
|
|
602
602
|
const G = {
|
|
603
|
-
height:
|
|
604
|
-
width:
|
|
603
|
+
height: d[x.page - 1],
|
|
604
|
+
width: u[x.page - 1]
|
|
605
605
|
}, Z = {
|
|
606
606
|
top: G.height / 2,
|
|
607
607
|
left: G.width / 2
|
|
608
|
-
}, j = b[x.page], { leftInPage: q, topInPage: te } =
|
|
608
|
+
}, j = b[x.page], { leftInPage: q, topInPage: te } = jr(
|
|
609
609
|
G,
|
|
610
610
|
Z,
|
|
611
611
|
x.rect,
|
|
@@ -622,8 +622,8 @@ const yo = () => {
|
|
|
622
622
|
}, [
|
|
623
623
|
c,
|
|
624
624
|
P,
|
|
625
|
-
d,
|
|
626
625
|
u,
|
|
626
|
+
d,
|
|
627
627
|
x,
|
|
628
628
|
s,
|
|
629
629
|
g,
|
|
@@ -654,7 +654,7 @@ const yo = () => {
|
|
|
654
654
|
m.current = !1, a(!0), w([]), h(0), A(l).then((L) => {
|
|
655
655
|
E.current = L;
|
|
656
656
|
const O = Object.keys(L).reduce((M, G) => {
|
|
657
|
-
const Z =
|
|
657
|
+
const Z = lr(
|
|
658
658
|
[n],
|
|
659
659
|
L[G],
|
|
660
660
|
Number(G) - 1,
|
|
@@ -706,14 +706,14 @@ const yo = () => {
|
|
|
706
706
|
setSearch: a,
|
|
707
707
|
totalMatches: l,
|
|
708
708
|
currentMatchPosition: c,
|
|
709
|
-
currentMatch:
|
|
710
|
-
search:
|
|
709
|
+
currentMatch: u,
|
|
710
|
+
search: d,
|
|
711
711
|
matches: m,
|
|
712
712
|
nextMatch: v,
|
|
713
713
|
prevMatch: p,
|
|
714
714
|
currentMatchElement: w,
|
|
715
715
|
setCurrentMatchElement: P
|
|
716
|
-
} =
|
|
716
|
+
} = Ro(n, e);
|
|
717
717
|
return /* @__PURE__ */ i(
|
|
718
718
|
Tn.Provider,
|
|
719
719
|
{
|
|
@@ -724,10 +724,10 @@ const yo = () => {
|
|
|
724
724
|
setSearch: a,
|
|
725
725
|
totalMatches: l,
|
|
726
726
|
currentMatchPosition: c,
|
|
727
|
-
currentMatch:
|
|
727
|
+
currentMatch: u,
|
|
728
728
|
nextMatch: v,
|
|
729
729
|
prevMatch: p,
|
|
730
|
-
search:
|
|
730
|
+
search: d,
|
|
731
731
|
matches: m,
|
|
732
732
|
currentMatchElement: w,
|
|
733
733
|
setCurrentMatchElement: P
|
|
@@ -736,30 +736,30 @@ const yo = () => {
|
|
|
736
736
|
}
|
|
737
737
|
);
|
|
738
738
|
}, xt = () => Je(Tn), de = {
|
|
739
|
-
"rp-pages": "_rp-
|
|
740
|
-
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-
|
|
741
|
-
"rp-pages-container": "_rp-pages-
|
|
742
|
-
"rp-page-scrolling-wrapper": "_rp-page-scrolling-
|
|
743
|
-
"rp-viewer": "_rp-
|
|
744
|
-
"rp-cursor-grab": "_rp-cursor-
|
|
745
|
-
"rp-cursor-grabbing": "_rp-cursor-
|
|
746
|
-
"rp-loader": "_rp-
|
|
739
|
+
"rp-pages": "_rp-pages_17t6t_1",
|
|
740
|
+
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_17t6t_7",
|
|
741
|
+
"rp-pages-container": "_rp-pages-container_17t6t_11",
|
|
742
|
+
"rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_17t6t_48",
|
|
743
|
+
"rp-viewer": "_rp-viewer_17t6t_53",
|
|
744
|
+
"rp-cursor-grab": "_rp-cursor-grab_17t6t_58",
|
|
745
|
+
"rp-cursor-grabbing": "_rp-cursor-grabbing_17t6t_66",
|
|
746
|
+
"rp-loader": "_rp-loader_17t6t_74"
|
|
747
747
|
}, lt = {
|
|
748
748
|
"rp-page-wrapper": "_rp-page-wrapper_14ohm_1",
|
|
749
749
|
"rp-page": "_rp-page_14ohm_1",
|
|
750
750
|
"rp-loader-wrapper": "_rp-loader-wrapper_14ohm_15"
|
|
751
|
-
},
|
|
752
|
-
const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = H(null), { pages: a } = ee(), { pageRotate: l } = Ue(), c = H(), { currentZoom:
|
|
751
|
+
}, Lo = (t) => {
|
|
752
|
+
const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = H(null), { pages: a } = ee(), { pageRotate: l } = Ue(), c = H(), { currentZoom: u } = Qe();
|
|
753
753
|
return F(() => {
|
|
754
|
-
if (!a ||
|
|
754
|
+
if (!a || u === 0)
|
|
755
755
|
return;
|
|
756
|
-
const
|
|
757
|
-
if (r.current &&
|
|
756
|
+
const d = a.get(e);
|
|
757
|
+
if (r.current && d) {
|
|
758
758
|
const m = r.current;
|
|
759
759
|
m.hidden = !0;
|
|
760
760
|
const v = c.current;
|
|
761
|
-
v && v.cancel(), o && o(), c.current = vt(
|
|
762
|
-
scale:
|
|
761
|
+
v && v.cancel(), o && o(), c.current = vt(d.page, m, {
|
|
762
|
+
scale: u,
|
|
763
763
|
rotate: l[e],
|
|
764
764
|
renderForms: !0
|
|
765
765
|
}), c.current.promise.then(() => {
|
|
@@ -773,22 +773,22 @@ const yo = () => {
|
|
|
773
773
|
var m;
|
|
774
774
|
(m = c.current) == null || m.cancel();
|
|
775
775
|
};
|
|
776
|
-
}, [a, e, l,
|
|
777
|
-
},
|
|
776
|
+
}, [a, e, l, u, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: r });
|
|
777
|
+
}, Eo = "_selecting_usdup_9", pe = {
|
|
778
778
|
"rp-text-layer": "_rp-text-layer_usdup_1",
|
|
779
|
-
selecting:
|
|
779
|
+
selecting: Eo,
|
|
780
780
|
"rp-text-layer-text": "_rp-text-layer-text_usdup_39"
|
|
781
|
-
},
|
|
782
|
-
const { pageNumber: e } = t, { pages: n } = ee(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = xt(), [c,
|
|
781
|
+
}, No = (t) => {
|
|
782
|
+
const { pageNumber: e } = t, { pages: n } = ee(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = xt(), [c, u] = $(
|
|
783
783
|
[]
|
|
784
|
-
),
|
|
784
|
+
), d = H(), m = H(), v = H([]), p = k(() => r.filter((f) => f.pageIndex === e - 1), [r, e]), w = N(
|
|
785
785
|
(f, g, s = !1) => {
|
|
786
|
-
if (s &&
|
|
787
|
-
v.current = [],
|
|
786
|
+
if (s && dr(f, g), !p.length) {
|
|
787
|
+
v.current = [], u([]);
|
|
788
788
|
return;
|
|
789
789
|
}
|
|
790
|
-
const C =
|
|
791
|
-
|
|
790
|
+
const C = ur(p, f, g);
|
|
791
|
+
u(C);
|
|
792
792
|
},
|
|
793
793
|
[p]
|
|
794
794
|
), P = H(), y = H(!1), b = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
@@ -892,33 +892,33 @@ const yo = () => {
|
|
|
892
892
|
if (!f || !o.current)
|
|
893
893
|
return;
|
|
894
894
|
const g = o.current;
|
|
895
|
-
return
|
|
895
|
+
return d.current && d.current.cancel(), f.page.getTextContent().then((s) => {
|
|
896
896
|
const C = f.page.getViewport({ scale: 1 });
|
|
897
|
-
return
|
|
897
|
+
return d.current = new yr.TextLayer({
|
|
898
898
|
viewport: C,
|
|
899
899
|
textContentSource: s,
|
|
900
900
|
container: g
|
|
901
|
-
}), m.current = s, g && (g.innerText = ""),
|
|
901
|
+
}), m.current = s, g && (g.innerText = ""), d.current.render();
|
|
902
902
|
}).then(() => {
|
|
903
903
|
var S, E;
|
|
904
904
|
[].slice.call(g.children).forEach((x) => {
|
|
905
905
|
x.classList.add(pe["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
|
|
906
906
|
});
|
|
907
|
-
const C = (S =
|
|
907
|
+
const C = (S = d.current) == null ? void 0 : S.textDivs;
|
|
908
908
|
C && m.current && w(m.current, C);
|
|
909
909
|
const _ = document.createElement("div");
|
|
910
910
|
_.className = "endOfContent", (E = o.current) == null || E.appendChild(_);
|
|
911
911
|
}).catch(() => {
|
|
912
912
|
}), () => {
|
|
913
913
|
var s;
|
|
914
|
-
(s =
|
|
914
|
+
(s = d.current) == null || s.cancel();
|
|
915
915
|
};
|
|
916
916
|
}, [n, e]), F(() => {
|
|
917
917
|
var s;
|
|
918
918
|
[].slice.call(o.current.children).forEach((C) => {
|
|
919
919
|
C.classList.add(pe["rp-text-layer-text"]);
|
|
920
920
|
});
|
|
921
|
-
const g = (s =
|
|
921
|
+
const g = (s = d.current) == null ? void 0 : s.textDivs;
|
|
922
922
|
g && m.current && w(m.current, g, !0);
|
|
923
923
|
}, [w]), /* @__PURE__ */ i(
|
|
924
924
|
"div",
|
|
@@ -930,12 +930,12 @@ const yo = () => {
|
|
|
930
930
|
onMouseUp: h
|
|
931
931
|
}
|
|
932
932
|
);
|
|
933
|
-
},
|
|
933
|
+
}, Oo = {
|
|
934
934
|
"rp-annotation-layer": "_rp-annotation-layer_1udza_1"
|
|
935
935
|
};
|
|
936
|
-
let
|
|
937
|
-
const
|
|
938
|
-
const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = ee(), a = H(), [l, c] = $(), { setFocusedPage:
|
|
936
|
+
let zo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
937
|
+
const Do = (t) => {
|
|
938
|
+
const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = ee(), a = H(), [l, c] = $(), { setFocusedPage: u, goToPage: d } = ie(), { scrollMode: m } = Ee(), { print: v } = tt(), { download: p } = Gn(), w = k(() => o.get(e), [o, e]), P = k(() => w == null ? void 0 : w.page.getViewport(), [w]);
|
|
939
939
|
F(() => {
|
|
940
940
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
941
941
|
}, [r]), F(() => {
|
|
@@ -945,12 +945,12 @@ const zo = (t) => {
|
|
|
945
945
|
}, [w]);
|
|
946
946
|
const y = N(
|
|
947
947
|
(b) => {
|
|
948
|
-
!l || !r || (
|
|
948
|
+
!l || !r || (Nr(b), Or(b, r, l).then((T) => {
|
|
949
949
|
var h, f;
|
|
950
950
|
((h = T == null ? void 0 : T.data) == null ? void 0 : h.action) === "Print" ? v() : ((f = T == null ? void 0 : T.data) == null ? void 0 : f.action) === "SaveAs" && p();
|
|
951
|
-
}), m === Q.PAGE_SCROLLING ? At(b, l, r, (T) =>
|
|
951
|
+
}), m === Q.PAGE_SCROLLING ? At(b, l, r, (T) => u(T.pageIndex + 1)) : At(b, l, r, (T) => d(T.pageIndex + 1)));
|
|
952
952
|
},
|
|
953
|
-
[r, l,
|
|
953
|
+
[r, l, d, u, m, v, p]
|
|
954
954
|
);
|
|
955
955
|
return F(() => {
|
|
956
956
|
if (!w || !l)
|
|
@@ -967,17 +967,17 @@ const zo = (t) => {
|
|
|
967
967
|
const { annotationType: s } = g;
|
|
968
968
|
switch (s) {
|
|
969
969
|
case Dt.Link:
|
|
970
|
-
|
|
970
|
+
Dr(g);
|
|
971
971
|
break;
|
|
972
972
|
case Dt.Widget:
|
|
973
|
-
|
|
973
|
+
zr(g, b, T);
|
|
974
974
|
break;
|
|
975
975
|
}
|
|
976
976
|
}
|
|
977
977
|
const h = new AbortController();
|
|
978
978
|
return (async () => {
|
|
979
979
|
var C;
|
|
980
|
-
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new
|
|
980
|
+
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new Lr({
|
|
981
981
|
div: n.current,
|
|
982
982
|
accessibilityManager: void 0,
|
|
983
983
|
annotationCanvasMap: void 0,
|
|
@@ -997,14 +997,14 @@ const zo = (t) => {
|
|
|
997
997
|
div: n.current,
|
|
998
998
|
viewport: b.clone({ dontFlip: !0 }),
|
|
999
999
|
page: w.page,
|
|
1000
|
-
imageResourcesPath:
|
|
1000
|
+
imageResourcesPath: zo,
|
|
1001
1001
|
renderForms: !0,
|
|
1002
|
-
linkService: new
|
|
1002
|
+
linkService: new Er(),
|
|
1003
1003
|
downloadManager: null,
|
|
1004
1004
|
enableScripting: !1
|
|
1005
1005
|
});
|
|
1006
1006
|
})().then(() => {
|
|
1007
|
-
n.current &&
|
|
1007
|
+
n.current && Ar(n.current, y);
|
|
1008
1008
|
}).catch((g) => {
|
|
1009
1009
|
if (g !== "abort")
|
|
1010
1010
|
throw g;
|
|
@@ -1016,16 +1016,16 @@ const zo = (t) => {
|
|
|
1016
1016
|
{
|
|
1017
1017
|
"data-rp": `page-${e}-annotationLayer`,
|
|
1018
1018
|
style: { width: `${P == null ? void 0 : P.width}px`, height: `${P == null ? void 0 : P.height}px` },
|
|
1019
|
-
className:
|
|
1019
|
+
className: Oo["rp-annotation-layer"],
|
|
1020
1020
|
ref: n
|
|
1021
1021
|
}
|
|
1022
1022
|
);
|
|
1023
|
-
},
|
|
1023
|
+
}, Ao = {
|
|
1024
1024
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1025
|
-
},
|
|
1026
|
-
const [n, o] = $(), { pages: r } = ee(), { highlightKeywords: a } =
|
|
1025
|
+
}, Fo = ({ pageNumber: t, viewport: e }) => {
|
|
1026
|
+
const [n, o] = $(), { pages: r } = ee(), { highlightKeywords: a } = hr(), l = !0, c = H(null), [u, d] = $(null), [m, v] = $([]);
|
|
1027
1027
|
F(() => {
|
|
1028
|
-
c.current &&
|
|
1028
|
+
c.current && d(c.current.parentElement);
|
|
1029
1029
|
}, [c]), F(() => {
|
|
1030
1030
|
(async () => {
|
|
1031
1031
|
const f = r.get(t);
|
|
@@ -1038,7 +1038,7 @@ const zo = (t) => {
|
|
|
1038
1038
|
const p = k(() => a ? a.map((h) => {
|
|
1039
1039
|
var f, g;
|
|
1040
1040
|
return {
|
|
1041
|
-
...
|
|
1041
|
+
...Fr(h.keyword, (f = h.options) == null ? void 0 : f.matchCase, (g = h.options) == null ? void 0 : g.wholeWords),
|
|
1042
1042
|
color: h.highlightColor
|
|
1043
1043
|
};
|
|
1044
1044
|
}) : [], [a]);
|
|
@@ -1087,7 +1087,7 @@ const zo = (t) => {
|
|
|
1087
1087
|
const R = document.createElement("span");
|
|
1088
1088
|
R.style.width = "auto", C.surroundContents(R);
|
|
1089
1089
|
const z = R.getBoundingClientRect(), D = h.getBoundingClientRect(), A = D.height, L = D.width, I = 100 * (z.left - D.left) / L, O = 100 * (z.top - D.top) / A, M = 100 * z.height / A, G = 100 * z.width / L;
|
|
1090
|
-
return
|
|
1090
|
+
return kr(R), {
|
|
1091
1091
|
keywordStr: f,
|
|
1092
1092
|
left: I,
|
|
1093
1093
|
top: O,
|
|
@@ -1098,7 +1098,7 @@ const zo = (t) => {
|
|
|
1098
1098
|
};
|
|
1099
1099
|
};
|
|
1100
1100
|
async function b(h, f) {
|
|
1101
|
-
const g = await w(
|
|
1101
|
+
const g = await w(u, h);
|
|
1102
1102
|
if (!g)
|
|
1103
1103
|
return;
|
|
1104
1104
|
const s = await P(g);
|
|
@@ -1135,7 +1135,7 @@ const zo = (t) => {
|
|
|
1135
1135
|
let I;
|
|
1136
1136
|
const O = [];
|
|
1137
1137
|
for (; (I = L.exec(S)) !== null; )
|
|
1138
|
-
z && !
|
|
1138
|
+
z && !pr(S, I.index, I[0].length) || O.push({
|
|
1139
1139
|
keyword: L,
|
|
1140
1140
|
startIndex: I.index,
|
|
1141
1141
|
endIndex: L.lastIndex
|
|
@@ -1166,7 +1166,7 @@ const zo = (t) => {
|
|
|
1166
1166
|
}
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
}), _.sort(
|
|
1169
|
+
}), _.sort(Wr), _;
|
|
1170
1170
|
};
|
|
1171
1171
|
return F(() => {
|
|
1172
1172
|
(async () => {
|
|
@@ -1180,7 +1180,7 @@ const zo = (t) => {
|
|
|
1180
1180
|
}, [l, a, t, n, e]), /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i("div", { ref: c, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((h, f) => /* @__PURE__ */ i(
|
|
1181
1181
|
"div",
|
|
1182
1182
|
{
|
|
1183
|
-
className:
|
|
1183
|
+
className: Ao["rp-text-highlight"],
|
|
1184
1184
|
style: {
|
|
1185
1185
|
top: `${h.top}%`,
|
|
1186
1186
|
left: `${h.left}%`,
|
|
@@ -1192,21 +1192,21 @@ const zo = (t) => {
|
|
|
1192
1192
|
f
|
|
1193
1193
|
)) }) });
|
|
1194
1194
|
}, It = $e((t, e) => {
|
|
1195
|
-
const { pageNumber: n, style: o, ...r } = t, { pages: a } = ee(), { pageRotate: l } = Ue(), { textLayer: c } =
|
|
1195
|
+
const { pageNumber: n, style: o, ...r } = t, { pages: a } = ee(), { pageRotate: l } = Ue(), { textLayer: c } = ir(), { currentZoom: u } = Qe(), d = H(a.get(n)), [m, v] = $(!1), p = H(null), [w, P] = $({
|
|
1196
1196
|
width: 0,
|
|
1197
1197
|
height: 0
|
|
1198
1198
|
});
|
|
1199
1199
|
cn(e, () => p.current);
|
|
1200
|
-
const y = k(() =>
|
|
1200
|
+
const y = k(() => d.current ? l[n] : 0, [n, l]);
|
|
1201
1201
|
F(() => {
|
|
1202
|
-
if (a && (
|
|
1203
|
-
const f =
|
|
1204
|
-
scale:
|
|
1202
|
+
if (a && (d.current = a.get(n), d.current)) {
|
|
1203
|
+
const f = d.current.page.getViewport({
|
|
1204
|
+
scale: u,
|
|
1205
1205
|
rotation: y
|
|
1206
1206
|
});
|
|
1207
1207
|
P(f);
|
|
1208
1208
|
}
|
|
1209
|
-
}, [a, n, y,
|
|
1209
|
+
}, [a, n, y, u]);
|
|
1210
1210
|
const b = k(() => {
|
|
1211
1211
|
switch (y) {
|
|
1212
1212
|
case 90:
|
|
@@ -1233,7 +1233,7 @@ const zo = (t) => {
|
|
|
1233
1233
|
...o,
|
|
1234
1234
|
"--rp-rotate": `${y}deg`,
|
|
1235
1235
|
"--rp-page-rotate-translate": `${b}`,
|
|
1236
|
-
"--scale-factor":
|
|
1236
|
+
"--scale-factor": u
|
|
1237
1237
|
},
|
|
1238
1238
|
className: lt["rp-page-wrapper"],
|
|
1239
1239
|
children: /* @__PURE__ */ W(
|
|
@@ -1245,12 +1245,12 @@ const zo = (t) => {
|
|
|
1245
1245
|
},
|
|
1246
1246
|
className: lt["rp-page"],
|
|
1247
1247
|
children: [
|
|
1248
|
-
/* @__PURE__ */ i(
|
|
1248
|
+
/* @__PURE__ */ i(Lo, { onLoading: T, onLoaded: h, pageNumber: n }),
|
|
1249
1249
|
m && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Ct, {}) }),
|
|
1250
|
-
/* @__PURE__ */ i(
|
|
1251
|
-
c && /* @__PURE__ */ i(
|
|
1252
|
-
/* @__PURE__ */ i(
|
|
1253
|
-
/* @__PURE__ */ i(
|
|
1250
|
+
/* @__PURE__ */ i(Mr, { pageNumber: n }),
|
|
1251
|
+
c && /* @__PURE__ */ i(No, { pageNumber: n }),
|
|
1252
|
+
/* @__PURE__ */ i(Fo, { pageNumber: n, viewport: w }),
|
|
1253
|
+
/* @__PURE__ */ i(Do, { pageNumber: n })
|
|
1254
1254
|
]
|
|
1255
1255
|
}
|
|
1256
1256
|
)
|
|
@@ -1267,29 +1267,29 @@ function wt(t, e) {
|
|
|
1267
1267
|
return n.__proto__ = o, n;
|
|
1268
1268
|
}, wt(t, e);
|
|
1269
1269
|
}
|
|
1270
|
-
function
|
|
1270
|
+
function Wo(t, e) {
|
|
1271
1271
|
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, wt(t, e);
|
|
1272
1272
|
}
|
|
1273
1273
|
var Vt = Number.isNaN || function(e) {
|
|
1274
1274
|
return typeof e == "number" && e !== e;
|
|
1275
1275
|
};
|
|
1276
|
-
function
|
|
1276
|
+
function ko(t, e) {
|
|
1277
1277
|
return !!(t === e || Vt(t) && Vt(e));
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1279
|
+
function Mo(t, e) {
|
|
1280
1280
|
if (t.length !== e.length)
|
|
1281
1281
|
return !1;
|
|
1282
1282
|
for (var n = 0; n < t.length; n++)
|
|
1283
|
-
if (!
|
|
1283
|
+
if (!ko(t[n], e[n]))
|
|
1284
1284
|
return !1;
|
|
1285
1285
|
return !0;
|
|
1286
1286
|
}
|
|
1287
1287
|
function dt(t, e) {
|
|
1288
|
-
e === void 0 && (e =
|
|
1288
|
+
e === void 0 && (e = Mo);
|
|
1289
1289
|
var n, o = [], r, a = !1;
|
|
1290
1290
|
function l() {
|
|
1291
|
-
for (var c = [],
|
|
1292
|
-
c[
|
|
1291
|
+
for (var c = [], u = 0; u < arguments.length; u++)
|
|
1292
|
+
c[u] = arguments[u];
|
|
1293
1293
|
return a && n === this && e(c, o) || (r = t.apply(this, c), a = !0, n = this, o = c), r;
|
|
1294
1294
|
}
|
|
1295
1295
|
return l;
|
|
@@ -1306,7 +1306,7 @@ function qt(t, e) {
|
|
|
1306
1306
|
}
|
|
1307
1307
|
return n;
|
|
1308
1308
|
}
|
|
1309
|
-
var
|
|
1309
|
+
var Ho = typeof performance == "object" && typeof performance.now == "function", Bt = Ho ? function() {
|
|
1310
1310
|
return performance.now();
|
|
1311
1311
|
} : function() {
|
|
1312
1312
|
return Date.now();
|
|
@@ -1314,7 +1314,7 @@ var Mo = typeof performance == "object" && typeof performance.now == "function",
|
|
|
1314
1314
|
function Zt(t) {
|
|
1315
1315
|
cancelAnimationFrame(t.id);
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1317
|
+
function $o(t, e) {
|
|
1318
1318
|
var n = Bt();
|
|
1319
1319
|
function o() {
|
|
1320
1320
|
Bt() - n >= e ? t.call(null) : r.id = requestAnimationFrame(o);
|
|
@@ -1325,7 +1325,7 @@ function Ho(t, e) {
|
|
|
1325
1325
|
return r;
|
|
1326
1326
|
}
|
|
1327
1327
|
var ut = -1;
|
|
1328
|
-
function
|
|
1328
|
+
function Go(t) {
|
|
1329
1329
|
if (t === void 0 && (t = !1), ut === -1 || t) {
|
|
1330
1330
|
var e = document.createElement("div"), n = e.style;
|
|
1331
1331
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e), ut = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
@@ -1342,17 +1342,17 @@ function jt(t) {
|
|
|
1342
1342
|
}
|
|
1343
1343
|
return Oe;
|
|
1344
1344
|
}
|
|
1345
|
-
var
|
|
1345
|
+
var Uo = 150, Vo = function(e) {
|
|
1346
1346
|
var n = e.columnIndex;
|
|
1347
1347
|
e.data;
|
|
1348
1348
|
var o = e.rowIndex;
|
|
1349
1349
|
return o + ":" + n;
|
|
1350
1350
|
}, Be = null, Ze = null, je = null;
|
|
1351
1351
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet());
|
|
1352
|
-
function
|
|
1353
|
-
var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth,
|
|
1352
|
+
function qo(t) {
|
|
1353
|
+
var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, u = t.getOffsetForColumnAndAlignment, d = t.getOffsetForRowAndAlignment, m = t.getRowHeight, v = t.getRowOffset, p = t.getRowStartIndexForOffset, w = t.getRowStopIndexForStartIndex, P = t.initInstanceProps, y = t.shouldResetStyleCacheOnItemSizeChange, b = t.validateProps;
|
|
1354
1354
|
return e = /* @__PURE__ */ function(T) {
|
|
1355
|
-
|
|
1355
|
+
Wo(h, T);
|
|
1356
1356
|
function h(g) {
|
|
1357
1357
|
var s;
|
|
1358
1358
|
return s = T.call(this, g) || this, s._instanceProps = P(s.props, Ut(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
|
|
@@ -1430,7 +1430,7 @@ function Vo(t) {
|
|
|
1430
1430
|
var _ = s.props.outerRef;
|
|
1431
1431
|
s._outerRef = C, typeof _ == "function" ? _(C) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = C);
|
|
1432
1432
|
}, s._resetIsScrollingDebounced = function() {
|
|
1433
|
-
s._resetIsScrollingTimeoutId !== null && Zt(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId =
|
|
1433
|
+
s._resetIsScrollingTimeoutId !== null && Zt(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId = $o(s._resetIsScrolling, Uo);
|
|
1434
1434
|
}, s._resetIsScrolling = function() {
|
|
1435
1435
|
s._resetIsScrollingTimeoutId = null, s.setState({
|
|
1436
1436
|
isScrolling: !1
|
|
@@ -1440,7 +1440,7 @@ function Vo(t) {
|
|
|
1440
1440
|
}, s;
|
|
1441
1441
|
}
|
|
1442
1442
|
h.getDerivedStateFromProps = function(s, C) {
|
|
1443
|
-
return
|
|
1443
|
+
return Bo(s, C), b(s), null;
|
|
1444
1444
|
};
|
|
1445
1445
|
var f = h.prototype;
|
|
1446
1446
|
return f.scrollTo = function(s) {
|
|
@@ -1455,12 +1455,12 @@ function Vo(t) {
|
|
|
1455
1455
|
};
|
|
1456
1456
|
}, this._resetIsScrollingDebounced);
|
|
1457
1457
|
}, f.scrollToItem = function(s) {
|
|
1458
|
-
var C = s.align, _ = C === void 0 ? "auto" : C, S = s.columnIndex, E = s.rowIndex, x = this.props, R = x.columnCount, z = x.height, D = x.rowCount, A = x.width, L = this.state, I = L.scrollLeft, O = L.scrollTop, M =
|
|
1458
|
+
var C = s.align, _ = C === void 0 ? "auto" : C, S = s.columnIndex, E = s.rowIndex, x = this.props, R = x.columnCount, z = x.height, D = x.rowCount, A = x.width, L = this.state, I = L.scrollLeft, O = L.scrollTop, M = Go();
|
|
1459
1459
|
S !== void 0 && (S = Math.max(0, Math.min(S, R - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, D - 1)));
|
|
1460
1460
|
var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > A ? M : 0, q = G > z ? M : 0;
|
|
1461
1461
|
this.scrollTo({
|
|
1462
|
-
scrollLeft: S !== void 0 ?
|
|
1463
|
-
scrollTop: E !== void 0 ?
|
|
1462
|
+
scrollLeft: S !== void 0 ? u(this.props, S, _, I, this._instanceProps, q) : I,
|
|
1463
|
+
scrollTop: E !== void 0 ? d(this.props, E, _, O, this._instanceProps, j) : O
|
|
1464
1464
|
});
|
|
1465
1465
|
}, f.componentDidMount = function() {
|
|
1466
1466
|
var s = this.props, C = s.initialScrollLeft, _ = s.initialScrollTop;
|
|
@@ -1494,7 +1494,7 @@ function Vo(t) {
|
|
|
1494
1494
|
}, f.componentWillUnmount = function() {
|
|
1495
1495
|
this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
|
|
1496
1496
|
}, f.render = function() {
|
|
1497
|
-
var s = this.props, C = s.children, _ = s.className, S = s.columnCount, E = s.direction, x = s.height, R = s.innerRef, z = s.innerElementType, D = s.innerTagName, A = s.itemData, L = s.itemKey, I = L === void 0 ?
|
|
1497
|
+
var s = this.props, C = s.children, _ = s.className, S = s.columnCount, E = s.direction, x = s.height, R = s.innerRef, z = s.innerElementType, D = s.innerTagName, A = s.itemData, L = s.itemKey, I = L === void 0 ? Vo : L, O = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, q = s.width, te = this.state.isScrolling, X = this._getHorizontalRangeToRender(), ce = X[0], ve = X[1], le = this._getVerticalRangeToRender(), Y = le[0], Fe = le[1], we = [];
|
|
1498
1498
|
if (S > 0 && G)
|
|
1499
1499
|
for (var Te = Y; Te <= Fe; Te++)
|
|
1500
1500
|
for (var _e = ce; _e <= ve; _e++)
|
|
@@ -1515,7 +1515,7 @@ function Vo(t) {
|
|
|
1515
1515
|
className: _,
|
|
1516
1516
|
onScroll: this._onScroll,
|
|
1517
1517
|
ref: this._outerRefSetter,
|
|
1518
|
-
style:
|
|
1518
|
+
style: Hr({
|
|
1519
1519
|
position: "relative",
|
|
1520
1520
|
height: x,
|
|
1521
1521
|
width: q,
|
|
@@ -1556,16 +1556,16 @@ function Vo(t) {
|
|
|
1556
1556
|
var I = p(this.props, A, this._instanceProps), O = w(this.props, I, A, this._instanceProps), M = !z || D === "backward" ? Math.max(1, L) : 1, G = !z || D === "forward" ? Math.max(1, L) : 1;
|
|
1557
1557
|
return [Math.max(0, I - M), Math.max(0, Math.min(x - 1, O + G)), I, O];
|
|
1558
1558
|
}, h;
|
|
1559
|
-
}(
|
|
1559
|
+
}(er), e.defaultProps = {
|
|
1560
1560
|
direction: "ltr",
|
|
1561
1561
|
itemData: void 0,
|
|
1562
1562
|
useIsScrolling: !1
|
|
1563
1563
|
}, e;
|
|
1564
1564
|
}
|
|
1565
|
-
var
|
|
1566
|
-
var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName,
|
|
1565
|
+
var Bo = function(e, n) {
|
|
1566
|
+
var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName, u = e.overscanColumnsCount, d = e.overscanCount, m = e.overscanRowsCount, v = e.width, p = n.instance;
|
|
1567
1567
|
if (process.env.NODE_ENV !== "production") {
|
|
1568
|
-
if (typeof
|
|
1568
|
+
if (typeof d == "number" && Be && !Be.has(p) && (Be.add(p), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof u == "number" || typeof m == "number") && Ze && !Ze.has(p) && (Ze.add(p), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (l != null || c != null) && je && !je.has(p) && (je.add(p), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1569
1569
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1570
1570
|
switch (r) {
|
|
1571
1571
|
case "ltr":
|
|
@@ -1582,33 +1582,33 @@ var qo = function(e, n) {
|
|
|
1582
1582
|
}, Kt = 50, Sn = function(e, n) {
|
|
1583
1583
|
var o = e.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, l = n.lastMeasuredRowIndex, c = 0;
|
|
1584
1584
|
if (l >= o && (l = o - 1), l >= 0) {
|
|
1585
|
-
var
|
|
1586
|
-
c =
|
|
1585
|
+
var u = r[l];
|
|
1586
|
+
c = u.offset + u.size;
|
|
1587
1587
|
}
|
|
1588
|
-
var
|
|
1588
|
+
var d = o - l - 1, m = d * a;
|
|
1589
1589
|
return c + m;
|
|
1590
1590
|
}, yn = function(e, n) {
|
|
1591
1591
|
var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, l = n.lastMeasuredColumnIndex, c = 0;
|
|
1592
1592
|
if (l >= o && (l = o - 1), l >= 0) {
|
|
1593
|
-
var
|
|
1594
|
-
c =
|
|
1593
|
+
var u = r[l];
|
|
1594
|
+
c = u.offset + u.size;
|
|
1595
1595
|
}
|
|
1596
|
-
var
|
|
1596
|
+
var d = o - l - 1, m = d * a;
|
|
1597
1597
|
return c + m;
|
|
1598
1598
|
}, he = function(e, n, o, r) {
|
|
1599
1599
|
var a, l, c;
|
|
1600
1600
|
if (e === "column" ? (a = r.columnMetadataMap, l = n.columnWidth, c = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, l = n.rowHeight, c = r.lastMeasuredRowIndex), o > c) {
|
|
1601
|
-
var
|
|
1601
|
+
var u = 0;
|
|
1602
1602
|
if (c >= 0) {
|
|
1603
|
-
var
|
|
1604
|
-
|
|
1603
|
+
var d = a[c];
|
|
1604
|
+
u = d.offset + d.size;
|
|
1605
1605
|
}
|
|
1606
1606
|
for (var m = c + 1; m <= o; m++) {
|
|
1607
1607
|
var v = l(m);
|
|
1608
1608
|
a[m] = {
|
|
1609
|
-
offset:
|
|
1609
|
+
offset: u,
|
|
1610
1610
|
size: v
|
|
1611
|
-
},
|
|
1611
|
+
}, u += v;
|
|
1612
1612
|
}
|
|
1613
1613
|
e === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
|
|
1614
1614
|
}
|
|
@@ -1617,22 +1617,22 @@ var qo = function(e, n) {
|
|
|
1617
1617
|
var a, l;
|
|
1618
1618
|
e === "column" ? (a = o.columnMetadataMap, l = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, l = o.lastMeasuredRowIndex);
|
|
1619
1619
|
var c = l > 0 ? a[l].offset : 0;
|
|
1620
|
-
return c >= r ? xn(e, n, o, l, 0, r) :
|
|
1620
|
+
return c >= r ? xn(e, n, o, l, 0, r) : Zo(e, n, o, Math.max(0, l), r);
|
|
1621
1621
|
}, xn = function(e, n, o, r, a, l) {
|
|
1622
1622
|
for (; a <= r; ) {
|
|
1623
|
-
var c = a + Math.floor((r - a) / 2),
|
|
1624
|
-
if (
|
|
1623
|
+
var c = a + Math.floor((r - a) / 2), u = he(e, n, c, o).offset;
|
|
1624
|
+
if (u === l)
|
|
1625
1625
|
return c;
|
|
1626
|
-
|
|
1626
|
+
u < l ? a = c + 1 : u > l && (r = c - 1);
|
|
1627
1627
|
}
|
|
1628
1628
|
return a > 0 ? a - 1 : 0;
|
|
1629
|
-
},
|
|
1629
|
+
}, Zo = function(e, n, o, r, a) {
|
|
1630
1630
|
for (var l = e === "column" ? n.columnCount : n.rowCount, c = 1; r < l && he(e, n, r, o).offset < a; )
|
|
1631
1631
|
r += c, c *= 2;
|
|
1632
1632
|
return xn(e, n, o, Math.min(r, l - 1), Math.floor(r / 2), a);
|
|
1633
1633
|
}, Yt = function(e, n, o, r, a, l, c) {
|
|
1634
|
-
var
|
|
1635
|
-
switch (r === "smart" && (a >= p -
|
|
1634
|
+
var u = e === "column" ? n.width : n.height, d = he(e, n, o, l), m = e === "column" ? yn(n, l) : Sn(n, l), v = Math.max(0, Math.min(m - u, d.offset)), p = Math.max(0, d.offset - u + c + d.size);
|
|
1635
|
+
switch (r === "smart" && (a >= p - u && a <= v + u ? r = "auto" : r = "center"), r) {
|
|
1636
1636
|
case "start":
|
|
1637
1637
|
return v;
|
|
1638
1638
|
case "end":
|
|
@@ -1643,7 +1643,7 @@ var qo = function(e, n) {
|
|
|
1643
1643
|
default:
|
|
1644
1644
|
return a >= p && a <= v ? a : p > v || a < p ? p : v;
|
|
1645
1645
|
}
|
|
1646
|
-
},
|
|
1646
|
+
}, jo = /* @__PURE__ */ qo({
|
|
1647
1647
|
getColumnOffset: function(e, n, o) {
|
|
1648
1648
|
return he("column", e, n, o).offset;
|
|
1649
1649
|
},
|
|
@@ -1651,8 +1651,8 @@ var qo = function(e, n) {
|
|
|
1651
1651
|
return Xt("column", e, o, n);
|
|
1652
1652
|
},
|
|
1653
1653
|
getColumnStopIndexForStartIndex: function(e, n, o, r) {
|
|
1654
|
-
for (var a = e.columnCount, l = e.width, c = he("column", e, n, r),
|
|
1655
|
-
m++,
|
|
1654
|
+
for (var a = e.columnCount, l = e.width, c = he("column", e, n, r), u = o + l, d = c.offset + c.size, m = n; m < a - 1 && d < u; )
|
|
1655
|
+
m++, d += he("column", e, m, r).size;
|
|
1656
1656
|
return m;
|
|
1657
1657
|
},
|
|
1658
1658
|
getColumnWidth: function(e, n, o) {
|
|
@@ -1676,8 +1676,8 @@ var qo = function(e, n) {
|
|
|
1676
1676
|
return Xt("row", e, o, n);
|
|
1677
1677
|
},
|
|
1678
1678
|
getRowStopIndexForStartIndex: function(e, n, o, r) {
|
|
1679
|
-
for (var a = e.rowCount, l = e.height, c = he("row", e, n, r),
|
|
1680
|
-
m++,
|
|
1679
|
+
for (var a = e.rowCount, l = e.height, c = he("row", e, n, r), u = o + l, d = c.offset + c.size, m = n; m < a - 1 && d < u; )
|
|
1680
|
+
m++, d += he("row", e, m, r).size;
|
|
1681
1681
|
return m;
|
|
1682
1682
|
},
|
|
1683
1683
|
initInstanceProps: function(e, n) {
|
|
@@ -1689,19 +1689,19 @@ var qo = function(e, n) {
|
|
|
1689
1689
|
lastMeasuredRowIndex: -1,
|
|
1690
1690
|
rowMetadataMap: {}
|
|
1691
1691
|
};
|
|
1692
|
-
return n.resetAfterColumnIndex = function(c,
|
|
1693
|
-
|
|
1692
|
+
return n.resetAfterColumnIndex = function(c, u) {
|
|
1693
|
+
u === void 0 && (u = !0), n.resetAfterIndices({
|
|
1694
1694
|
columnIndex: c,
|
|
1695
|
-
shouldForceUpdate:
|
|
1695
|
+
shouldForceUpdate: u
|
|
1696
1696
|
});
|
|
1697
|
-
}, n.resetAfterRowIndex = function(c,
|
|
1698
|
-
|
|
1697
|
+
}, n.resetAfterRowIndex = function(c, u) {
|
|
1698
|
+
u === void 0 && (u = !0), n.resetAfterIndices({
|
|
1699
1699
|
rowIndex: c,
|
|
1700
|
-
shouldForceUpdate:
|
|
1700
|
+
shouldForceUpdate: u
|
|
1701
1701
|
});
|
|
1702
1702
|
}, n.resetAfterIndices = function(c) {
|
|
1703
|
-
var
|
|
1704
|
-
typeof
|
|
1703
|
+
var u = c.columnIndex, d = c.rowIndex, m = c.shouldForceUpdate, v = m === void 0 ? !0 : m;
|
|
1704
|
+
typeof u == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, u - 1)), typeof d == "number" && (l.lastMeasuredRowIndex = Math.min(l.lastMeasuredRowIndex, d - 1)), n._getItemStyleCache(-1), v && n.forceUpdate();
|
|
1705
1705
|
}, l;
|
|
1706
1706
|
},
|
|
1707
1707
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
@@ -1725,22 +1725,22 @@ function Jt(t, e) {
|
|
|
1725
1725
|
return !0;
|
|
1726
1726
|
return !1;
|
|
1727
1727
|
}
|
|
1728
|
-
var
|
|
1729
|
-
function
|
|
1730
|
-
var n = t.style, o = qt(t,
|
|
1728
|
+
var Ko = ["style"], Xo = ["style"];
|
|
1729
|
+
function Yo(t, e) {
|
|
1730
|
+
var n = t.style, o = qt(t, Ko), r = e.style, a = qt(e, Xo);
|
|
1731
1731
|
return !Jt(n, r) && !Jt(o, a);
|
|
1732
1732
|
}
|
|
1733
|
-
const
|
|
1733
|
+
const Jo = () => {
|
|
1734
1734
|
const { viewMode: t } = Ne(), { scrollMode: e } = Ee(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ge(), a = k(() => r.heights.length, [r.heights]), l = k(() => e === Q.HORIZONTAL_SCROLLING ? a : t === Re.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = k(() => r.widths.reduce((P, y, b) => {
|
|
1735
1735
|
const T = b % l;
|
|
1736
1736
|
return (!P[T] || y > P[T]) && (P[T] = y), P;
|
|
1737
|
-
}, []), [r.widths, l]),
|
|
1737
|
+
}, []), [r.widths, l]), u = N(
|
|
1738
1738
|
(w) => {
|
|
1739
1739
|
const P = w % c.length;
|
|
1740
1740
|
return c[P] || 0;
|
|
1741
1741
|
},
|
|
1742
1742
|
[c]
|
|
1743
|
-
),
|
|
1743
|
+
), d = N(
|
|
1744
1744
|
(w) => {
|
|
1745
1745
|
const P = Array.from({ length: l }, (y, b) => {
|
|
1746
1746
|
const T = w * l + b;
|
|
@@ -1756,9 +1756,9 @@ const Yo = () => {
|
|
|
1756
1756
|
const m = k(() => e === Q.HORIZONTAL_SCROLLING || e === Q.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), v = k(() => r.heights.reduce((w, P) => w + P, 0) / r.heights.length || 0, [r]), p = k(() => r.widths.reduce((w, P) => w + P, 0) / r.heights.length || 0, [r]);
|
|
1757
1757
|
return {
|
|
1758
1758
|
rowCount: m,
|
|
1759
|
-
rowHeight:
|
|
1759
|
+
rowHeight: d,
|
|
1760
1760
|
columnCount: l,
|
|
1761
|
-
columnWidth:
|
|
1761
|
+
columnWidth: u,
|
|
1762
1762
|
pageDimension: r,
|
|
1763
1763
|
estimatedRowHeight: v,
|
|
1764
1764
|
estimatedColumnWidth: p
|
|
@@ -1780,10 +1780,10 @@ ht == null || tn == null ? (_t = pt, bt = function(e) {
|
|
|
1780
1780
|
}, Qt);
|
|
1781
1781
|
return [n, o];
|
|
1782
1782
|
});
|
|
1783
|
-
function
|
|
1783
|
+
function Qo(t) {
|
|
1784
1784
|
let e, n, o, r, a, l, c;
|
|
1785
|
-
const
|
|
1786
|
-
if (!
|
|
1785
|
+
const u = typeof document < "u" && document.attachEvent;
|
|
1786
|
+
if (!u) {
|
|
1787
1787
|
l = function(T) {
|
|
1788
1788
|
const h = T.__resizeTriggers__, f = h.firstElementChild, g = h.lastElementChild, s = f.firstElementChild;
|
|
1789
1789
|
g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, s.style.width = f.offsetWidth + 1 + "px", s.style.height = f.offsetHeight + 1 + "px", f.scrollLeft = f.scrollWidth, f.scrollTop = f.scrollHeight;
|
|
@@ -1815,7 +1815,7 @@ function Jo(t) {
|
|
|
1815
1815
|
}
|
|
1816
1816
|
n = "resizeanim", e = "@" + w + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = w + "animation: 1ms " + n + "; ";
|
|
1817
1817
|
}
|
|
1818
|
-
const
|
|
1818
|
+
const d = function(p) {
|
|
1819
1819
|
if (!p.getElementById("detectElementResize")) {
|
|
1820
1820
|
const w = (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%; }', P = p.head || p.getElementsByTagName("head")[0], y = p.createElement("style");
|
|
1821
1821
|
y.id = "detectElementResize", y.type = "text/css", t != null && y.setAttribute("nonce", t), y.styleSheet ? y.styleSheet.cssText = w : y.appendChild(p.createTextNode(w)), P.appendChild(y);
|
|
@@ -1823,12 +1823,12 @@ function Jo(t) {
|
|
|
1823
1823
|
};
|
|
1824
1824
|
return {
|
|
1825
1825
|
addResizeListener: function(p, w) {
|
|
1826
|
-
if (
|
|
1826
|
+
if (u)
|
|
1827
1827
|
p.attachEvent("onresize", w);
|
|
1828
1828
|
else {
|
|
1829
1829
|
if (!p.__resizeTriggers__) {
|
|
1830
1830
|
const P = p.ownerDocument, y = oe.getComputedStyle(p);
|
|
1831
|
-
y && y.position === "static" && (p.style.position = "relative"),
|
|
1831
|
+
y && y.position === "static" && (p.style.position = "relative"), d(P), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = P.createElement("div")).className = "resize-triggers";
|
|
1832
1832
|
const b = P.createElement("div");
|
|
1833
1833
|
b.className = "expand-trigger", b.appendChild(P.createElement("div"));
|
|
1834
1834
|
const T = P.createElement("div");
|
|
@@ -1840,7 +1840,7 @@ function Jo(t) {
|
|
|
1840
1840
|
}
|
|
1841
1841
|
},
|
|
1842
1842
|
removeResizeListener: function(p, w) {
|
|
1843
|
-
if (
|
|
1843
|
+
if (u)
|
|
1844
1844
|
p.detachEvent("onresize", w);
|
|
1845
1845
|
else if (p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(w), 1), !p.__resizeListeners__.length) {
|
|
1846
1846
|
p.removeEventListener("scroll", c, !0), p.__resizeTriggers__.__animationListener__ && (p.__resizeTriggers__.removeEventListener(o, p.__resizeTriggers__.__animationListener__), p.__resizeTriggers__.__animationListener__ = null);
|
|
@@ -1852,7 +1852,7 @@ function Jo(t) {
|
|
|
1852
1852
|
}
|
|
1853
1853
|
};
|
|
1854
1854
|
}
|
|
1855
|
-
class
|
|
1855
|
+
class ei extends tr {
|
|
1856
1856
|
constructor(...e) {
|
|
1857
1857
|
super(...e), this.state = {
|
|
1858
1858
|
height: this.props.defaultHeight || 0,
|
|
@@ -1867,7 +1867,7 @@ class Qo extends er {
|
|
|
1867
1867
|
onResize: r
|
|
1868
1868
|
} = this.props;
|
|
1869
1869
|
if (this._parentNode) {
|
|
1870
|
-
const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"),
|
|
1870
|
+
const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), u = parseFloat(a.paddingTop || "0"), d = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), v = m.height - u - d, p = m.width - l - c, w = this._parentNode.offsetHeight - u - d, P = this._parentNode.offsetWidth - l - c;
|
|
1871
1871
|
(!n && (this.state.height !== w || this.state.scaledHeight !== v) || !o && (this.state.width !== P || this.state.scaledWidth !== p)) && (this.setState({
|
|
1872
1872
|
height: w,
|
|
1873
1873
|
width: P,
|
|
@@ -1893,7 +1893,7 @@ class Qo extends er {
|
|
|
1893
1893
|
const o = n.ownerDocument.defaultView.ResizeObserver;
|
|
1894
1894
|
o != null ? (this._resizeObserver = new o(() => {
|
|
1895
1895
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1896
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1896
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = Qo(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1897
1897
|
}
|
|
1898
1898
|
}
|
|
1899
1899
|
componentWillUnmount() {
|
|
@@ -1908,8 +1908,8 @@ class Qo extends er {
|
|
|
1908
1908
|
disableWidth: a = !1,
|
|
1909
1909
|
doNotBailOutOnEmptyChildren: l = !1,
|
|
1910
1910
|
nonce: c,
|
|
1911
|
-
onResize:
|
|
1912
|
-
style:
|
|
1911
|
+
onResize: u,
|
|
1912
|
+
style: d = {},
|
|
1913
1913
|
tagName: m = "div",
|
|
1914
1914
|
...v
|
|
1915
1915
|
} = this.props, {
|
|
@@ -1925,41 +1925,41 @@ class Qo extends er {
|
|
|
1925
1925
|
ref: this._setRef,
|
|
1926
1926
|
style: {
|
|
1927
1927
|
...b,
|
|
1928
|
-
...
|
|
1928
|
+
...d
|
|
1929
1929
|
},
|
|
1930
1930
|
...v
|
|
1931
1931
|
}, !h && e(T));
|
|
1932
1932
|
}
|
|
1933
1933
|
}
|
|
1934
|
-
const
|
|
1934
|
+
const ti = ln(({ widths: t, heights: e }) => {
|
|
1935
1935
|
const { focusedPage: n, totalPages: o } = ie(), r = k(() => {
|
|
1936
|
-
const c = [],
|
|
1937
|
-
if (c.push(
|
|
1938
|
-
const
|
|
1939
|
-
c.push(
|
|
1936
|
+
const c = [], u = Math.ceil(n / 2) * 2 - 1;
|
|
1937
|
+
if (c.push(u), u + 1 <= o) {
|
|
1938
|
+
const d = u + 1;
|
|
1939
|
+
c.push(d);
|
|
1940
1940
|
}
|
|
1941
1941
|
return c;
|
|
1942
1942
|
}, [n, o]), a = k(() => {
|
|
1943
|
-
const c = n % 2 === 1 ? n - 1 : n - 2,
|
|
1943
|
+
const c = n % 2 === 1 ? n - 1 : n - 2, u = t(c), d = e(c), m = t(c + 1), v = e(c + 1), p = d > v ? d : v, w = d < v ? d : v, P = p / 2 - w / 2;
|
|
1944
1944
|
return [
|
|
1945
1945
|
{
|
|
1946
1946
|
position: "absolute",
|
|
1947
1947
|
left: 0,
|
|
1948
|
-
top: p ===
|
|
1949
|
-
width:
|
|
1950
|
-
height:
|
|
1948
|
+
top: p === d ? 0 : P,
|
|
1949
|
+
width: u,
|
|
1950
|
+
height: d
|
|
1951
1951
|
},
|
|
1952
1952
|
{
|
|
1953
1953
|
position: "absolute",
|
|
1954
|
-
left:
|
|
1954
|
+
left: u,
|
|
1955
1955
|
top: p === v ? 0 : P,
|
|
1956
1956
|
width: m,
|
|
1957
1957
|
height: v
|
|
1958
1958
|
}
|
|
1959
1959
|
];
|
|
1960
|
-
}, [t, e, r]), l = k(() => a.reduce((c,
|
|
1961
|
-
return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((c,
|
|
1962
|
-
}),
|
|
1960
|
+
}, [t, e, r]), l = k(() => a.reduce((c, u) => c + Number(u.width || 0), 0), [a]);
|
|
1961
|
+
return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((c, u) => /* @__PURE__ */ i(It, { style: a[u], pageNumber: c }, c)) });
|
|
1962
|
+
}), ni = ({ widths: t, heights: e }) => {
|
|
1963
1963
|
const { focusedPage: n } = ie(), o = k(() => ({
|
|
1964
1964
|
position: "absolute",
|
|
1965
1965
|
width: t(n - 1),
|
|
@@ -1975,9 +1975,9 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
1975
1975
|
children: /* @__PURE__ */ i(It, { style: o, pageNumber: n }, n)
|
|
1976
1976
|
}
|
|
1977
1977
|
);
|
|
1978
|
-
},
|
|
1979
|
-
const o = H(), { contentRef: r } = me(), { heights: a, widths: l } = Ge(), { setFocusedPage: c } = ie(), [
|
|
1980
|
-
const b = l[y], T =
|
|
1978
|
+
}, ri = (t, e, n) => {
|
|
1979
|
+
const o = H(), { contentRef: r } = me(), { heights: a, widths: l } = Ge(), { setFocusedPage: c } = ie(), [u, d] = $([]), { targetScrollPage: m } = pn(), v = Pt(u, 0, 500), p = k(() => a.map((P, y) => {
|
|
1980
|
+
const b = l[y], T = Br(y + 1, t), h = b * T.columnIndex, f = P * T.rowIndex, g = h + b, s = f + P;
|
|
1981
1981
|
return {
|
|
1982
1982
|
pageNumber: y + 1,
|
|
1983
1983
|
...T,
|
|
@@ -2015,7 +2015,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2015
2015
|
ratio: x
|
|
2016
2016
|
};
|
|
2017
2017
|
}).sort((h, f) => f.ratio - h.ratio);
|
|
2018
|
-
|
|
2018
|
+
d(T);
|
|
2019
2019
|
});
|
|
2020
2020
|
},
|
|
2021
2021
|
[r, p]
|
|
@@ -2026,25 +2026,57 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2026
2026
|
n == null || n.removeEventListener("scroll", w);
|
|
2027
2027
|
};
|
|
2028
2028
|
}, [n, w]);
|
|
2029
|
-
},
|
|
2030
|
-
|
|
2029
|
+
}, be = {
|
|
2030
|
+
"rp-layout": "_rp-layout_1g4ff_1",
|
|
2031
|
+
"rp-content": "_rp-content_1g4ff_5",
|
|
2032
|
+
"rp-pages": "_rp-pages_1g4ff_11",
|
|
2033
|
+
"rp-container": "_rp-container_1g4ff_16",
|
|
2034
|
+
"rp-loader": "_rp-loader_1g4ff_20",
|
|
2035
|
+
"rp-theme-variables": "_rp-theme-variables_1g4ff_24",
|
|
2036
|
+
"rp-dark-mode": "_rp-dark-mode_1g4ff_135"
|
|
2037
|
+
}, In = $e(
|
|
2038
|
+
(t, e) => {
|
|
2039
|
+
const { children: n, toolbarRef: o, style: r, className: a, ...l } = t, { customVariables: c, customDarkVariables: u } = Sr(), { darkMode: d } = or();
|
|
2040
|
+
return /* @__PURE__ */ i(
|
|
2041
|
+
"div",
|
|
2042
|
+
{
|
|
2043
|
+
ref: e,
|
|
2044
|
+
...l,
|
|
2045
|
+
className: ne(
|
|
2046
|
+
be["rp-theme-variables"],
|
|
2047
|
+
be["rp-container"],
|
|
2048
|
+
d ? be["rp-dark-mode"] : "",
|
|
2049
|
+
a
|
|
2050
|
+
),
|
|
2051
|
+
style: {
|
|
2052
|
+
"--rp-toolbar-height": `${(o == null ? void 0 : o.clientHeight) || 48}px`,
|
|
2053
|
+
...c,
|
|
2054
|
+
...d ? u : {},
|
|
2055
|
+
...r
|
|
2056
|
+
},
|
|
2057
|
+
children: n
|
|
2058
|
+
}
|
|
2059
|
+
);
|
|
2060
|
+
}
|
|
2061
|
+
), oi = ln(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
|
|
2062
|
+
const r = Zr(e, t, n.columnCount);
|
|
2031
2063
|
return /* @__PURE__ */ i(It, { style: o, pageNumber: r }, r);
|
|
2032
|
-
},
|
|
2033
|
-
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } =
|
|
2064
|
+
}, Yo), Bs = () => {
|
|
2065
|
+
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = sr(), { pagesRef: o, setPagesRef: r } = me(), { scrollToPage: a } = wn(), {
|
|
2034
2066
|
virtualScrollRef: l,
|
|
2035
2067
|
getVirtualScrollRef: c,
|
|
2036
|
-
getPageScrollElementRef:
|
|
2037
|
-
getVirtualScrollableElementRef:
|
|
2068
|
+
getPageScrollElementRef: u,
|
|
2069
|
+
getVirtualScrollableElementRef: d,
|
|
2038
2070
|
setTotalInnerDimensions: m,
|
|
2039
2071
|
virtualScrollableElementRef: v,
|
|
2040
2072
|
totalInnerDimensions: p,
|
|
2041
2073
|
pageScrollElementRef: w
|
|
2042
|
-
} = et(), P = H(!0), { nextPage: y, prevPage: b, setFocusedPage: T, focusedPage: h } = ie(), { scrollMode: f } = Ee(), { viewMode: g } = Ne(), s = H(null), { loading: C } = ee(), { passwordRequired: _ } =
|
|
2074
|
+
} = et(), P = H(!0), { nextPage: y, prevPage: b, setFocusedPage: T, focusedPage: h } = ie(), { scrollMode: f } = Ee(), { viewMode: g } = Ne(), s = H(null), { loading: C } = ee(), { passwordRequired: _ } = rr(), { LoaderImageComponent: S } = hn(), E = H(
|
|
2043
2075
|
p
|
|
2044
2076
|
), x = H({
|
|
2045
2077
|
viewMode: g,
|
|
2046
2078
|
scrollMode: f
|
|
2047
|
-
}), R = H(!1), z = H(), { isFullScreen: D } =
|
|
2079
|
+
}), R = H(!1), z = H(), { isFullScreen: D } = cr(), {
|
|
2048
2080
|
pageDimension: A,
|
|
2049
2081
|
rowCount: L,
|
|
2050
2082
|
rowHeight: I,
|
|
@@ -2052,16 +2084,16 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2052
2084
|
columnWidth: M,
|
|
2053
2085
|
estimatedColumnWidth: G,
|
|
2054
2086
|
estimatedRowHeight: Z
|
|
2055
|
-
} =
|
|
2056
|
-
|
|
2087
|
+
} = Jo(), j = Pt(p, 100), q = H();
|
|
2088
|
+
ri(O, L, v);
|
|
2057
2089
|
const te = H({
|
|
2058
2090
|
scrollTop: 0,
|
|
2059
2091
|
scrollLeft: 0
|
|
2060
2092
|
});
|
|
2061
|
-
|
|
2062
|
-
const { isPressed: X } =
|
|
2093
|
+
Vr(o);
|
|
2094
|
+
const { isPressed: X } = Gr(), { selectionMode: ce } = ar(), { initializeGrabScroll: ve, resetGrabState: le } = Ur({
|
|
2063
2095
|
isPressed: X
|
|
2064
|
-
}), Y = k(() => ce ===
|
|
2096
|
+
}), Y = k(() => ce === nr.HAND, [ce]), Fe = k(() => ({
|
|
2065
2097
|
columnCount: O
|
|
2066
2098
|
}), [O]), we = N(
|
|
2067
2099
|
(U) => {
|
|
@@ -2110,12 +2142,12 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2110
2142
|
const { height: xe, width: it } = V, { height: Ot, width: zt } = E.current;
|
|
2111
2143
|
if (Ot === xe && zt === it)
|
|
2112
2144
|
return;
|
|
2113
|
-
const
|
|
2145
|
+
const Xn = ye / Ot * xe, Yn = ot / zt * it, Jn = Math.round(Math.min(Xn, xe)) || 0, Qn = Math.round(Math.min(Yn, it)) || 0;
|
|
2114
2146
|
z.current = setTimeout(() => {
|
|
2115
2147
|
requestAnimationFrame(() => {
|
|
2116
2148
|
l == null || l.scrollTo({
|
|
2117
|
-
scrollTop:
|
|
2118
|
-
scrollLeft:
|
|
2149
|
+
scrollTop: Jn,
|
|
2150
|
+
scrollLeft: Qn
|
|
2119
2151
|
});
|
|
2120
2152
|
});
|
|
2121
2153
|
}, 0), E.current = {
|
|
@@ -2154,7 +2186,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2154
2186
|
const rt = k(() => ne(de["rp-pages-container"], {
|
|
2155
2187
|
[de["rp-cursor-grab"]]: Y && !X,
|
|
2156
2188
|
[de["rp-cursor-grabbing"]]: Y && X
|
|
2157
|
-
}), [Y, X]),
|
|
2189
|
+
}), [Y, X]), Kn = N(
|
|
2158
2190
|
(U) => {
|
|
2159
2191
|
if (Y && U) {
|
|
2160
2192
|
const V = ne(de["rp-pages"]), Se = document.querySelector(`.${V}`);
|
|
@@ -2180,20 +2212,20 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2180
2212
|
T,
|
|
2181
2213
|
j
|
|
2182
2214
|
]), /* @__PURE__ */ W(fe, { children: [
|
|
2183
|
-
/* @__PURE__ */ i(
|
|
2215
|
+
/* @__PURE__ */ i(In, { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(ei, { style: { minHeight: "50px" }, children: ({ width: U, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Kn, style: { width: U, height: V }, children: f === Q.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2184
2216
|
"div",
|
|
2185
2217
|
{
|
|
2186
|
-
ref:
|
|
2218
|
+
ref: u,
|
|
2187
2219
|
style: { width: U, height: V },
|
|
2188
2220
|
className: ne(de["rp-pages"], de["rp-page-scrolling-wrapper"]),
|
|
2189
|
-
children: g === Re.DUAL_PAGE ? /* @__PURE__ */ i(
|
|
2221
|
+
children: g === Re.DUAL_PAGE ? /* @__PURE__ */ i(ti, { widths: M, heights: I }) : /* @__PURE__ */ i(ni, { widths: M, heights: I })
|
|
2190
2222
|
}
|
|
2191
2223
|
) : G ? /* @__PURE__ */ i(
|
|
2192
|
-
|
|
2224
|
+
jo,
|
|
2193
2225
|
{
|
|
2194
2226
|
ref: c,
|
|
2195
2227
|
itemData: Fe,
|
|
2196
|
-
outerRef:
|
|
2228
|
+
outerRef: d,
|
|
2197
2229
|
innerRef: s,
|
|
2198
2230
|
onScroll: nt,
|
|
2199
2231
|
columnCount: O,
|
|
@@ -2208,7 +2240,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2208
2240
|
de["rp-pages"],
|
|
2209
2241
|
f === Q.HORIZONTAL_SCROLLING ? de["rp-pages-horizontal-scroll"] : ""
|
|
2210
2242
|
),
|
|
2211
|
-
children:
|
|
2243
|
+
children: oi
|
|
2212
2244
|
}
|
|
2213
2245
|
) : C ? null : /* @__PURE__ */ i(
|
|
2214
2246
|
"div",
|
|
@@ -2224,7 +2256,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2224
2256
|
children: S && /* @__PURE__ */ i(S, {})
|
|
2225
2257
|
}
|
|
2226
2258
|
) }) }) }),
|
|
2227
|
-
_ && /* @__PURE__ */ i(
|
|
2259
|
+
_ && /* @__PURE__ */ i(qr, {})
|
|
2228
2260
|
] });
|
|
2229
2261
|
}, We = {
|
|
2230
2262
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
@@ -2236,14 +2268,14 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2236
2268
|
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
2237
2269
|
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
2238
2270
|
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
2239
|
-
},
|
|
2271
|
+
}, ii = () => {
|
|
2240
2272
|
const { prevIcon: t } = ue();
|
|
2241
2273
|
return t || /* @__PURE__ */ i(He, {});
|
|
2242
|
-
},
|
|
2274
|
+
}, ai = () => {
|
|
2243
2275
|
const { nextIcon: t } = ue();
|
|
2244
2276
|
return t || /* @__PURE__ */ i(He, { style: { transform: "rotate(180deg" } });
|
|
2245
|
-
},
|
|
2246
|
-
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool:
|
|
2277
|
+
}, si = () => {
|
|
2278
|
+
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: u = !0 } = ge(), { isSmallScreen: d } = Pe(), { localeMessages: m } = ae(), { viewMode: v } = Ne(), { scrollMode: p } = Ee();
|
|
2247
2279
|
F(() => {
|
|
2248
2280
|
c(t.toString());
|
|
2249
2281
|
}, [t]);
|
|
@@ -2261,8 +2293,8 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2261
2293
|
},
|
|
2262
2294
|
[P]
|
|
2263
2295
|
), T = k(() => v === Re.DUAL_PAGE && p === Q.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, v, p]);
|
|
2264
|
-
return typeof
|
|
2265
|
-
|
|
2296
|
+
return typeof u != "boolean" ? /* @__PURE__ */ i(
|
|
2297
|
+
u,
|
|
2266
2298
|
{
|
|
2267
2299
|
total: e,
|
|
2268
2300
|
current: t,
|
|
@@ -2271,14 +2303,14 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2271
2303
|
goToPage: a,
|
|
2272
2304
|
changePage: n
|
|
2273
2305
|
}
|
|
2274
|
-
) :
|
|
2275
|
-
!
|
|
2306
|
+
) : u ? /* @__PURE__ */ W("div", { className: ft["rp-paginate"], children: [
|
|
2307
|
+
!d && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2276
2308
|
re,
|
|
2277
2309
|
{
|
|
2278
2310
|
onClick: r,
|
|
2279
2311
|
"aria-label": m == null ? void 0 : m.previousPageTooltip,
|
|
2280
2312
|
"aria-disabled": t === 1,
|
|
2281
|
-
children: /* @__PURE__ */ i(
|
|
2313
|
+
children: /* @__PURE__ */ i(ii, {})
|
|
2282
2314
|
}
|
|
2283
2315
|
) }),
|
|
2284
2316
|
/* @__PURE__ */ i(K, { content: m == null ? void 0 : m.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
@@ -2295,18 +2327,18 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2295
2327
|
"/",
|
|
2296
2328
|
e
|
|
2297
2329
|
] }),
|
|
2298
|
-
!
|
|
2330
|
+
!d && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2299
2331
|
re,
|
|
2300
2332
|
{
|
|
2301
2333
|
onClick: o,
|
|
2302
2334
|
"aria-label": m == null ? void 0 : m.nextPageTooltip,
|
|
2303
2335
|
"aria-disabled": T,
|
|
2304
|
-
children: /* @__PURE__ */ i(
|
|
2336
|
+
children: /* @__PURE__ */ i(ai, {})
|
|
2305
2337
|
}
|
|
2306
2338
|
) })
|
|
2307
2339
|
] }) : null;
|
|
2308
2340
|
};
|
|
2309
|
-
var Rt = "Dialog", [
|
|
2341
|
+
var Rt = "Dialog", [Rn, Zs] = Jr(Rt), [ci, se] = Rn(Rt), Ln = (t) => {
|
|
2310
2342
|
const {
|
|
2311
2343
|
__scopeDialog: e,
|
|
2312
2344
|
children: n,
|
|
@@ -2314,21 +2346,21 @@ var Rt = "Dialog", [In, Zs] = Yr(Rt), [si, se] = In(Rt), Rn = (t) => {
|
|
|
2314
2346
|
defaultOpen: r,
|
|
2315
2347
|
onOpenChange: a,
|
|
2316
2348
|
modal: l = !0
|
|
2317
|
-
} = t, c = B.useRef(null),
|
|
2349
|
+
} = t, c = B.useRef(null), u = B.useRef(null), [d = !1, m] = to({
|
|
2318
2350
|
prop: o,
|
|
2319
2351
|
defaultProp: r,
|
|
2320
2352
|
onChange: a
|
|
2321
2353
|
});
|
|
2322
2354
|
return /* @__PURE__ */ i(
|
|
2323
|
-
|
|
2355
|
+
ci,
|
|
2324
2356
|
{
|
|
2325
2357
|
scope: e,
|
|
2326
2358
|
triggerRef: c,
|
|
2327
|
-
contentRef:
|
|
2359
|
+
contentRef: u,
|
|
2328
2360
|
contentId: ct(),
|
|
2329
2361
|
titleId: ct(),
|
|
2330
2362
|
descriptionId: ct(),
|
|
2331
|
-
open:
|
|
2363
|
+
open: d,
|
|
2332
2364
|
onOpenChange: m,
|
|
2333
2365
|
onOpenToggle: B.useCallback(() => m((v) => !v), [m]),
|
|
2334
2366
|
modal: l,
|
|
@@ -2336,10 +2368,10 @@ var Rt = "Dialog", [In, Zs] = Yr(Rt), [si, se] = In(Rt), Rn = (t) => {
|
|
|
2336
2368
|
}
|
|
2337
2369
|
);
|
|
2338
2370
|
};
|
|
2339
|
-
|
|
2340
|
-
var
|
|
2371
|
+
Ln.displayName = Rt;
|
|
2372
|
+
var En = "DialogTrigger", li = B.forwardRef(
|
|
2341
2373
|
(t, e) => {
|
|
2342
|
-
const { __scopeDialog: n, ...o } = t, r = se(
|
|
2374
|
+
const { __scopeDialog: n, ...o } = t, r = se(En, n), a = Tt(e, r.triggerRef);
|
|
2343
2375
|
return /* @__PURE__ */ i(
|
|
2344
2376
|
Ve.button,
|
|
2345
2377
|
{
|
|
@@ -2355,28 +2387,28 @@ var Ln = "DialogTrigger", ci = B.forwardRef(
|
|
|
2355
2387
|
);
|
|
2356
2388
|
}
|
|
2357
2389
|
);
|
|
2358
|
-
|
|
2359
|
-
var Lt = "DialogPortal", [
|
|
2390
|
+
li.displayName = En;
|
|
2391
|
+
var Lt = "DialogPortal", [di, Nn] = Rn(Lt, {
|
|
2360
2392
|
forceMount: void 0
|
|
2361
|
-
}),
|
|
2393
|
+
}), On = (t) => {
|
|
2362
2394
|
const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = se(Lt, e);
|
|
2363
|
-
return /* @__PURE__ */ i(
|
|
2395
|
+
return /* @__PURE__ */ i(di, { scope: e, forceMount: n, children: B.Children.map(o, (l) => /* @__PURE__ */ i(St, { present: n || a.open, children: /* @__PURE__ */ i(ao, { asChild: !0, container: r, children: l }) })) });
|
|
2364
2396
|
};
|
|
2365
|
-
|
|
2366
|
-
var Xe = "DialogOverlay",
|
|
2397
|
+
On.displayName = Lt;
|
|
2398
|
+
var Xe = "DialogOverlay", zn = B.forwardRef(
|
|
2367
2399
|
(t, e) => {
|
|
2368
|
-
const n =
|
|
2369
|
-
return a.modal ? /* @__PURE__ */ i(St, { present: o || a.open, children: /* @__PURE__ */ i(
|
|
2400
|
+
const n = Nn(Xe, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = se(Xe, t.__scopeDialog);
|
|
2401
|
+
return a.modal ? /* @__PURE__ */ i(St, { present: o || a.open, children: /* @__PURE__ */ i(ui, { ...r, ref: e }) }) : null;
|
|
2370
2402
|
}
|
|
2371
2403
|
);
|
|
2372
|
-
|
|
2373
|
-
var
|
|
2404
|
+
zn.displayName = Xe;
|
|
2405
|
+
var ui = B.forwardRef(
|
|
2374
2406
|
(t, e) => {
|
|
2375
2407
|
const { __scopeDialog: n, ...o } = t, r = se(Xe, n);
|
|
2376
2408
|
return (
|
|
2377
2409
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2378
2410
|
// ie. when `Overlay` and `Content` are siblings
|
|
2379
|
-
/* @__PURE__ */ i(
|
|
2411
|
+
/* @__PURE__ */ i(ro, { as: Qr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
|
|
2380
2412
|
Ve.div,
|
|
2381
2413
|
{
|
|
2382
2414
|
"data-state": Nt(r.open),
|
|
@@ -2387,22 +2419,22 @@ var di = B.forwardRef(
|
|
|
2387
2419
|
) })
|
|
2388
2420
|
);
|
|
2389
2421
|
}
|
|
2390
|
-
), Le = "DialogContent",
|
|
2422
|
+
), Le = "DialogContent", Dn = B.forwardRef(
|
|
2391
2423
|
(t, e) => {
|
|
2392
|
-
const n =
|
|
2393
|
-
return /* @__PURE__ */ i(St, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(
|
|
2424
|
+
const n = Nn(Le, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = se(Le, t.__scopeDialog);
|
|
2425
|
+
return /* @__PURE__ */ i(St, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(pi, { ...r, ref: e }) : /* @__PURE__ */ i(hi, { ...r, ref: e }) });
|
|
2394
2426
|
}
|
|
2395
2427
|
);
|
|
2396
|
-
|
|
2397
|
-
var
|
|
2428
|
+
Dn.displayName = Le;
|
|
2429
|
+
var pi = B.forwardRef(
|
|
2398
2430
|
(t, e) => {
|
|
2399
2431
|
const n = se(Le, t.__scopeDialog), o = B.useRef(null), r = Tt(e, n.contentRef, o);
|
|
2400
2432
|
return B.useEffect(() => {
|
|
2401
2433
|
const a = o.current;
|
|
2402
2434
|
if (a)
|
|
2403
|
-
return
|
|
2435
|
+
return so(a);
|
|
2404
2436
|
}, []), /* @__PURE__ */ i(
|
|
2405
|
-
|
|
2437
|
+
An,
|
|
2406
2438
|
{
|
|
2407
2439
|
...t,
|
|
2408
2440
|
ref: r,
|
|
@@ -2423,11 +2455,11 @@ var ui = B.forwardRef(
|
|
|
2423
2455
|
}
|
|
2424
2456
|
);
|
|
2425
2457
|
}
|
|
2426
|
-
),
|
|
2458
|
+
), hi = B.forwardRef(
|
|
2427
2459
|
(t, e) => {
|
|
2428
2460
|
const n = se(Le, t.__scopeDialog), o = B.useRef(!1), r = B.useRef(!1);
|
|
2429
2461
|
return /* @__PURE__ */ i(
|
|
2430
|
-
|
|
2462
|
+
An,
|
|
2431
2463
|
{
|
|
2432
2464
|
...t,
|
|
2433
2465
|
ref: e,
|
|
@@ -2438,20 +2470,20 @@ var ui = B.forwardRef(
|
|
|
2438
2470
|
(l = t.onCloseAutoFocus) == null || l.call(t, a), a.defaultPrevented || (o.current || (c = n.triggerRef.current) == null || c.focus(), a.preventDefault()), o.current = !1, r.current = !1;
|
|
2439
2471
|
},
|
|
2440
2472
|
onInteractOutside: (a) => {
|
|
2441
|
-
var
|
|
2442
|
-
(
|
|
2473
|
+
var u, d;
|
|
2474
|
+
(u = t.onInteractOutside) == null || u.call(t, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
2443
2475
|
const l = a.target;
|
|
2444
|
-
((
|
|
2476
|
+
((d = n.triggerRef.current) == null ? void 0 : d.contains(l)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
|
|
2445
2477
|
}
|
|
2446
2478
|
}
|
|
2447
2479
|
);
|
|
2448
2480
|
}
|
|
2449
|
-
),
|
|
2481
|
+
), An = B.forwardRef(
|
|
2450
2482
|
(t, e) => {
|
|
2451
|
-
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = se(Le, n),
|
|
2452
|
-
return
|
|
2483
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = se(Le, n), u = B.useRef(null), d = Tt(e, u);
|
|
2484
|
+
return oo(), /* @__PURE__ */ W(fe, { children: [
|
|
2453
2485
|
/* @__PURE__ */ i(
|
|
2454
|
-
|
|
2486
|
+
io,
|
|
2455
2487
|
{
|
|
2456
2488
|
asChild: !0,
|
|
2457
2489
|
loop: !0,
|
|
@@ -2459,7 +2491,7 @@ var ui = B.forwardRef(
|
|
|
2459
2491
|
onMountAutoFocus: r,
|
|
2460
2492
|
onUnmountAutoFocus: a,
|
|
2461
2493
|
children: /* @__PURE__ */ i(
|
|
2462
|
-
|
|
2494
|
+
no,
|
|
2463
2495
|
{
|
|
2464
2496
|
role: "dialog",
|
|
2465
2497
|
id: c.contentId,
|
|
@@ -2467,35 +2499,35 @@ var ui = B.forwardRef(
|
|
|
2467
2499
|
"aria-labelledby": c.titleId,
|
|
2468
2500
|
"data-state": Nt(c.open),
|
|
2469
2501
|
...l,
|
|
2470
|
-
ref:
|
|
2502
|
+
ref: d,
|
|
2471
2503
|
onDismiss: () => c.onOpenChange(!1)
|
|
2472
2504
|
}
|
|
2473
2505
|
)
|
|
2474
2506
|
}
|
|
2475
2507
|
),
|
|
2476
2508
|
/* @__PURE__ */ W(fe, { children: [
|
|
2477
|
-
/* @__PURE__ */ i(
|
|
2478
|
-
/* @__PURE__ */ i(
|
|
2509
|
+
/* @__PURE__ */ i(mi, { titleId: c.titleId }),
|
|
2510
|
+
/* @__PURE__ */ i(vi, { contentRef: u, descriptionId: c.descriptionId })
|
|
2479
2511
|
] })
|
|
2480
2512
|
] });
|
|
2481
2513
|
}
|
|
2482
|
-
), Et = "DialogTitle",
|
|
2514
|
+
), Et = "DialogTitle", Fn = B.forwardRef(
|
|
2483
2515
|
(t, e) => {
|
|
2484
2516
|
const { __scopeDialog: n, ...o } = t, r = se(Et, n);
|
|
2485
2517
|
return /* @__PURE__ */ i(Ve.h2, { id: r.titleId, ...o, ref: e });
|
|
2486
2518
|
}
|
|
2487
2519
|
);
|
|
2488
|
-
|
|
2489
|
-
var
|
|
2520
|
+
Fn.displayName = Et;
|
|
2521
|
+
var Wn = "DialogDescription", fi = B.forwardRef(
|
|
2490
2522
|
(t, e) => {
|
|
2491
|
-
const { __scopeDialog: n, ...o } = t, r = se(
|
|
2523
|
+
const { __scopeDialog: n, ...o } = t, r = se(Wn, n);
|
|
2492
2524
|
return /* @__PURE__ */ i(Ve.p, { id: r.descriptionId, ...o, ref: e });
|
|
2493
2525
|
}
|
|
2494
2526
|
);
|
|
2495
|
-
|
|
2496
|
-
var
|
|
2527
|
+
fi.displayName = Wn;
|
|
2528
|
+
var kn = "DialogClose", Mn = B.forwardRef(
|
|
2497
2529
|
(t, e) => {
|
|
2498
|
-
const { __scopeDialog: n, ...o } = t, r = se(
|
|
2530
|
+
const { __scopeDialog: n, ...o } = t, r = se(kn, n);
|
|
2499
2531
|
return /* @__PURE__ */ i(
|
|
2500
2532
|
Ve.button,
|
|
2501
2533
|
{
|
|
@@ -2507,16 +2539,16 @@ var Wn = "DialogClose", kn = B.forwardRef(
|
|
|
2507
2539
|
);
|
|
2508
2540
|
}
|
|
2509
2541
|
);
|
|
2510
|
-
|
|
2542
|
+
Mn.displayName = kn;
|
|
2511
2543
|
function Nt(t) {
|
|
2512
2544
|
return t ? "open" : "closed";
|
|
2513
2545
|
}
|
|
2514
|
-
var
|
|
2546
|
+
var Hn = "DialogTitleWarning", [js, $n] = eo(Hn, {
|
|
2515
2547
|
contentName: Le,
|
|
2516
2548
|
titleName: Et,
|
|
2517
2549
|
docsSlug: "dialog"
|
|
2518
|
-
}),
|
|
2519
|
-
const e = Hn
|
|
2550
|
+
}), mi = ({ titleId: t }) => {
|
|
2551
|
+
const e = $n(Hn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2520
2552
|
|
|
2521
2553
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2522
2554
|
|
|
@@ -2524,14 +2556,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2524
2556
|
return B.useEffect(() => {
|
|
2525
2557
|
t && (document.getElementById(t) || console.error(n));
|
|
2526
2558
|
}, [n, t]), null;
|
|
2527
|
-
},
|
|
2528
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
2559
|
+
}, gi = "DialogDescriptionWarning", vi = ({ contentRef: t, descriptionId: e }) => {
|
|
2560
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$n(gi).contentName}}.`;
|
|
2529
2561
|
return B.useEffect(() => {
|
|
2530
2562
|
var a;
|
|
2531
2563
|
const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2532
2564
|
e && r && (document.getElementById(e) || console.warn(o));
|
|
2533
2565
|
}, [o, t, e]), null;
|
|
2534
|
-
},
|
|
2566
|
+
}, wi = Ln, _i = On, bi = zn, Ci = Dn, Pi = Fn, Ti = Mn;
|
|
2535
2567
|
const Ie = {
|
|
2536
2568
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2537
2569
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2540,15 +2572,15 @@ const Ie = {
|
|
|
2540
2572
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2541
2573
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2542
2574
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2543
|
-
},
|
|
2544
|
-
const { pdfProperties: t } = ee(), { container: e } = me(), { activeDocumentProperties: n, setActiveDocumentProperties: o } =
|
|
2575
|
+
}, Si = () => {
|
|
2576
|
+
const { pdfProperties: t } = ee(), { container: e } = me(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = uo(), { localeMessages: r } = ae(), a = k(() => {
|
|
2545
2577
|
if (!t)
|
|
2546
2578
|
return [];
|
|
2547
2579
|
const {
|
|
2548
2580
|
fileSize: l,
|
|
2549
2581
|
filename: c,
|
|
2550
|
-
title:
|
|
2551
|
-
author:
|
|
2582
|
+
title: u,
|
|
2583
|
+
author: d,
|
|
2552
2584
|
subject: m,
|
|
2553
2585
|
createdOn: v,
|
|
2554
2586
|
creator: p,
|
|
@@ -2562,8 +2594,8 @@ const Ie = {
|
|
|
2562
2594
|
{ label: r == null ? void 0 : r.propertiesFilenameLabel, value: c },
|
|
2563
2595
|
{ label: r == null ? void 0 : r.propertiesFileSizeLabel, value: l },
|
|
2564
2596
|
{ separate: !0 },
|
|
2565
|
-
{ label: r == null ? void 0 : r.propertiesTitleLabel, value:
|
|
2566
|
-
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value:
|
|
2597
|
+
{ label: r == null ? void 0 : r.propertiesTitleLabel, value: u },
|
|
2598
|
+
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value: d },
|
|
2567
2599
|
{ label: r == null ? void 0 : r.propertiesSubjectLabel, value: m },
|
|
2568
2600
|
{ label: r == null ? void 0 : r.propertiesKeywordLabel, value: w },
|
|
2569
2601
|
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value: p },
|
|
@@ -2581,21 +2613,21 @@ const Ie = {
|
|
|
2581
2613
|
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value: T }
|
|
2582
2614
|
];
|
|
2583
2615
|
}, [t, r]);
|
|
2584
|
-
return /* @__PURE__ */ i(
|
|
2585
|
-
/* @__PURE__ */ i(
|
|
2586
|
-
/* @__PURE__ */ W(
|
|
2587
|
-
/* @__PURE__ */ i(
|
|
2588
|
-
/* @__PURE__ */ i("div", { className: Ie["rp-document-properties"], children: a.map((l, c) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: Ie["rp-properties-divider"] }) : /* @__PURE__ */ i(
|
|
2589
|
-
/* @__PURE__ */ i(
|
|
2616
|
+
return /* @__PURE__ */ i(wi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(_i, { container: e, children: /* @__PURE__ */ W("div", { className: Ie["rp-dialog-wrapper"], children: [
|
|
2617
|
+
/* @__PURE__ */ i(bi, { className: Ie["rp-dialog-overlay"] }),
|
|
2618
|
+
/* @__PURE__ */ W(Ci, { className: Ie["rp-document-dialog"], children: [
|
|
2619
|
+
/* @__PURE__ */ i(Pi, { className: Ie["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2620
|
+
/* @__PURE__ */ i("div", { className: Ie["rp-document-properties"], children: a.map((l, c) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: Ie["rp-properties-divider"] }) : /* @__PURE__ */ i(lo, { label: l.label, value: l.value }) }, c)) }),
|
|
2621
|
+
/* @__PURE__ */ i(Ti, { asChild: !0, className: Ie["rp-dialog-close"], children: /* @__PURE__ */ i(co, {}) })
|
|
2590
2622
|
] })
|
|
2591
2623
|
] }) }) });
|
|
2592
|
-
},
|
|
2624
|
+
}, yi = {
|
|
2593
2625
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2594
|
-
}, nn = ".pdf",
|
|
2626
|
+
}, nn = ".pdf", xi = (t) => URL.createObjectURL(t), Ii = async (t) => {
|
|
2595
2627
|
const n = await (await fetch(t)).blob();
|
|
2596
|
-
return
|
|
2597
|
-
},
|
|
2598
|
-
const { filename: t, pdfSrc: e } = ee(), { downloadFilename: n } =
|
|
2628
|
+
return xi(n);
|
|
2629
|
+
}, Gn = () => {
|
|
2630
|
+
const { filename: t, pdfSrc: e } = ee(), { downloadFilename: n } = fr(), o = (a) => {
|
|
2599
2631
|
const l = n || a;
|
|
2600
2632
|
return l.endsWith(nn) ? l : `${l}${nn}`;
|
|
2601
2633
|
};
|
|
@@ -2603,26 +2635,26 @@ const Ie = {
|
|
|
2603
2635
|
if (!t || !e)
|
|
2604
2636
|
throw new Error("There is no PDF source to download");
|
|
2605
2637
|
const a = document.createElement("a");
|
|
2606
|
-
a.href = await
|
|
2638
|
+
a.href = await Ii(e), a.download = o(t), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2607
2639
|
}, [t, e]) };
|
|
2608
|
-
},
|
|
2640
|
+
}, Un = () => {
|
|
2609
2641
|
const { downloadIcon: t } = ue();
|
|
2610
|
-
return t || /* @__PURE__ */ i(
|
|
2611
|
-
},
|
|
2612
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2642
|
+
return t || /* @__PURE__ */ i(vo, {});
|
|
2643
|
+
}, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ri = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Vn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Un, {}) }) }), Li = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Ce, { onClick: t, children: /* @__PURE__ */ W(Vn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2644
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Un, {}) }),
|
|
2613
2645
|
e == null ? void 0 : e.downloadFileLabel
|
|
2614
|
-
] }) }),
|
|
2615
|
-
const { download: t } =
|
|
2616
|
-
return e ? n ? /* @__PURE__ */ i(
|
|
2617
|
-
},
|
|
2646
|
+
] }) }), qn = () => {
|
|
2647
|
+
const { download: t } = Gn(), { downloadTool: e = !0 } = ge(), { isSmallScreen: n } = Pe(), { localeMessages: o } = ae();
|
|
2648
|
+
return e ? n ? /* @__PURE__ */ i(Li, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(Ri, { download: t, localeMessages: o }) : null : null;
|
|
2649
|
+
}, Bn = () => {
|
|
2618
2650
|
const { printIcon: t } = ue();
|
|
2619
|
-
return t || /* @__PURE__ */ i(
|
|
2620
|
-
},
|
|
2621
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2651
|
+
return t || /* @__PURE__ */ i(wo, {});
|
|
2652
|
+
}, Zn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Ei = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Zn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Bn, {}) }) }), Ni = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Ce, { onClick: t, children: /* @__PURE__ */ W(Zn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2653
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Bn, {}) }),
|
|
2622
2654
|
e == null ? void 0 : e.printLabel
|
|
2623
|
-
] }) }),
|
|
2624
|
-
const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: l = !0 } = ge(), { isSmallScreen: c } = Pe(), { localeMessages:
|
|
2625
|
-
return l ? c ? /* @__PURE__ */ i(
|
|
2655
|
+
] }) }), jn = () => {
|
|
2656
|
+
const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: l = !0 } = ge(), { isSmallScreen: c } = Pe(), { localeMessages: u } = ae();
|
|
2657
|
+
return l ? c ? /* @__PURE__ */ i(Ni, { print: t, localeMessages: u }) : typeof l == "function" ? /* @__PURE__ */ i(
|
|
2626
2658
|
l,
|
|
2627
2659
|
{
|
|
2628
2660
|
print: t,
|
|
@@ -2632,41 +2664,41 @@ const Ie = {
|
|
|
2632
2664
|
setOnComplete: o,
|
|
2633
2665
|
progress: a
|
|
2634
2666
|
}
|
|
2635
|
-
) : l ? /* @__PURE__ */ i(
|
|
2636
|
-
},
|
|
2667
|
+
) : l ? /* @__PURE__ */ i(Ei, { print: t, localeMessages: u }) : null : null;
|
|
2668
|
+
}, Oi = {
|
|
2637
2669
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2638
|
-
}, Oi = () => {
|
|
2639
|
-
const { goToFirstPageIcon: t } = ue();
|
|
2640
|
-
return t || /* @__PURE__ */ i(vn, { className: Ni["rp-go-to-Top"] });
|
|
2641
2670
|
}, zi = () => {
|
|
2671
|
+
const { goToFirstPageIcon: t } = ue();
|
|
2672
|
+
return t || /* @__PURE__ */ i(vn, { className: Oi["rp-go-to-Top"] });
|
|
2673
|
+
}, Di = () => {
|
|
2642
2674
|
const { goToLastPageIcon: t } = ue();
|
|
2643
2675
|
return t || /* @__PURE__ */ i(vn, {});
|
|
2644
|
-
}, rn = { width: "100%" },
|
|
2676
|
+
}, rn = { width: "100%" }, Ai = () => {
|
|
2645
2677
|
const { goToPage: t, totalPages: e, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ge(), { localeMessages: r } = ae(), a = k(() => n === 1, [n]), l = k(() => n === e, [n, e]), c = N(() => {
|
|
2646
2678
|
t(1);
|
|
2647
|
-
}, [t]),
|
|
2679
|
+
}, [t]), u = N(() => {
|
|
2648
2680
|
t(e);
|
|
2649
2681
|
}, [t, e]);
|
|
2650
2682
|
return o ? /* @__PURE__ */ W(Ke, { children: [
|
|
2651
2683
|
/* @__PURE__ */ i(Ce, { onClick: c, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.firstPageTooltip, style: rn, children: /* @__PURE__ */ W("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2652
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2684
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(zi, {}) }),
|
|
2653
2685
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
|
|
2654
2686
|
] }) }) }),
|
|
2655
|
-
/* @__PURE__ */ i(Ce, { onClick:
|
|
2656
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2687
|
+
/* @__PURE__ */ i(Ce, { onClick: u, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ W("div", { className: "rp-menu-item", "aria-disabled": l, children: [
|
|
2688
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Di, {}) }),
|
|
2657
2689
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
|
|
2658
2690
|
] }) }) }),
|
|
2659
2691
|
/* @__PURE__ */ i(yt, {})
|
|
2660
2692
|
] }) : null;
|
|
2661
|
-
},
|
|
2693
|
+
}, Fi = () => {
|
|
2662
2694
|
const { container: t, pagesRef: e } = me(), { isSmallScreen: n } = Pe(), {
|
|
2663
2695
|
openFileTool: o,
|
|
2664
2696
|
downloadTool: r,
|
|
2665
2697
|
documentProperties: a,
|
|
2666
2698
|
scrollModeTool: l,
|
|
2667
2699
|
rotateTool: c,
|
|
2668
|
-
selectionModeTool:
|
|
2669
|
-
jumpNavigationTool:
|
|
2700
|
+
selectionModeTool: u,
|
|
2701
|
+
jumpNavigationTool: d,
|
|
2670
2702
|
printTool: m,
|
|
2671
2703
|
fullscreenTool: v
|
|
2672
2704
|
} = ge(), { localeMessages: p } = ae(), [w, P] = $(0), y = H(
|
|
@@ -2674,7 +2706,7 @@ const Ie = {
|
|
|
2674
2706
|
P(T[0].contentRect.height);
|
|
2675
2707
|
})
|
|
2676
2708
|
), b = k(() => {
|
|
2677
|
-
const T =
|
|
2709
|
+
const T = d || c || u || l || a;
|
|
2678
2710
|
let h = !1;
|
|
2679
2711
|
return n && (h = !(!o && !r && !m && !v)), T || h;
|
|
2680
2712
|
}, [
|
|
@@ -2683,56 +2715,58 @@ const Ie = {
|
|
|
2683
2715
|
a,
|
|
2684
2716
|
l,
|
|
2685
2717
|
c,
|
|
2686
|
-
d,
|
|
2687
2718
|
u,
|
|
2719
|
+
d,
|
|
2688
2720
|
n
|
|
2689
2721
|
]);
|
|
2690
2722
|
return F(() => (e && y.current.observe(e), () => {
|
|
2691
2723
|
y.current.disconnect();
|
|
2692
|
-
}), [e]), b ? /* @__PURE__ */ W(
|
|
2724
|
+
}), [e]), b ? /* @__PURE__ */ W(po, { children: [
|
|
2693
2725
|
/* @__PURE__ */ i(
|
|
2694
2726
|
mn,
|
|
2695
2727
|
{
|
|
2696
2728
|
container: t,
|
|
2697
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": p == null ? void 0 : p.moreOptionTooltip, children: /* @__PURE__ */ i(
|
|
2729
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": p == null ? void 0 : p.moreOptionTooltip, children: /* @__PURE__ */ i(Yr, {}) }) }) }),
|
|
2730
|
+
side: "bottom",
|
|
2731
|
+
avoidCollisions: !1,
|
|
2698
2732
|
children: /* @__PURE__ */ W(
|
|
2699
2733
|
"div",
|
|
2700
2734
|
{
|
|
2701
2735
|
style: { maxHeight: `${w}px`, overflow: "auto" },
|
|
2702
|
-
className:
|
|
2736
|
+
className: yi["rp-other-tool-content"],
|
|
2703
2737
|
"data-rp": "moreOptionsDropdown",
|
|
2704
2738
|
children: [
|
|
2705
2739
|
n && /* @__PURE__ */ W(Ke, { children: [
|
|
2706
2740
|
/* @__PURE__ */ i(fn, {}),
|
|
2707
|
-
/* @__PURE__ */ i(
|
|
2708
|
-
/* @__PURE__ */ i(
|
|
2741
|
+
/* @__PURE__ */ i(qn, {}),
|
|
2742
|
+
/* @__PURE__ */ i(jn, {}),
|
|
2709
2743
|
/* @__PURE__ */ i(gn, {}),
|
|
2710
2744
|
/* @__PURE__ */ i(yt, {})
|
|
2711
2745
|
] }),
|
|
2712
|
-
/* @__PURE__ */ i(
|
|
2713
|
-
/* @__PURE__ */ i(ho, {}),
|
|
2714
|
-
/* @__PURE__ */ i(wo, {}),
|
|
2746
|
+
/* @__PURE__ */ i(Ai, {}),
|
|
2715
2747
|
/* @__PURE__ */ i(fo, {}),
|
|
2748
|
+
/* @__PURE__ */ i(_o, {}),
|
|
2716
2749
|
/* @__PURE__ */ i(mo, {}),
|
|
2717
|
-
/* @__PURE__ */ i(
|
|
2750
|
+
/* @__PURE__ */ i(go, {}),
|
|
2751
|
+
/* @__PURE__ */ i(ho, {})
|
|
2718
2752
|
]
|
|
2719
2753
|
}
|
|
2720
2754
|
)
|
|
2721
2755
|
}
|
|
2722
2756
|
),
|
|
2723
|
-
/* @__PURE__ */ i(
|
|
2757
|
+
/* @__PURE__ */ i(Si, {})
|
|
2724
2758
|
] }) : null;
|
|
2725
|
-
},
|
|
2759
|
+
}, Wi = () => {
|
|
2726
2760
|
const { isSmallScreen: t } = Pe();
|
|
2727
2761
|
return /* @__PURE__ */ W(fe, { children: [
|
|
2728
|
-
/* @__PURE__ */ i(
|
|
2762
|
+
/* @__PURE__ */ i(Xr, {}),
|
|
2729
2763
|
!t && /* @__PURE__ */ W(fe, { children: [
|
|
2730
2764
|
/* @__PURE__ */ i(fn, {}),
|
|
2731
|
-
/* @__PURE__ */ i(
|
|
2732
|
-
/* @__PURE__ */ i(
|
|
2765
|
+
/* @__PURE__ */ i(qn, {}),
|
|
2766
|
+
/* @__PURE__ */ i(jn, {}),
|
|
2733
2767
|
/* @__PURE__ */ i(gn, {})
|
|
2734
2768
|
] }),
|
|
2735
|
-
/* @__PURE__ */ i(
|
|
2769
|
+
/* @__PURE__ */ i(Fi, {})
|
|
2736
2770
|
] });
|
|
2737
2771
|
}, ze = {
|
|
2738
2772
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
|
|
@@ -2740,14 +2774,14 @@ const Ie = {
|
|
|
2740
2774
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2741
2775
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2742
2776
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2743
|
-
},
|
|
2777
|
+
}, ki = 25, mt = 1e3, Mi = [50, 75, 100, 125, 150, 200, 300, 400], Hi = () => {
|
|
2744
2778
|
const { zoomInIcon: t } = ue();
|
|
2745
|
-
return t || /* @__PURE__ */ i(_o, {});
|
|
2746
|
-
}, Hi = () => {
|
|
2747
|
-
const { zoomOutIcon: t } = ue();
|
|
2748
2779
|
return t || /* @__PURE__ */ i(bo, {});
|
|
2749
2780
|
}, $i = () => {
|
|
2750
|
-
const {
|
|
2781
|
+
const { zoomOutIcon: t } = ue();
|
|
2782
|
+
return t || /* @__PURE__ */ i(Co, {});
|
|
2783
|
+
}, Gi = () => {
|
|
2784
|
+
const { zoomLevel: t, setZoomLevel: e } = Qe(), { container: n, pagesRef: o } = me(), { zoomTool: r = !0 } = ge(), { focusedPage: a } = ie(), { pageRotate: l } = Ue(), { pages: c } = ee(), { isSmallScreen: u } = Pe(), { localeMessages: d } = ae(), { viewMode: m } = Ne(), [v, p] = $(0), w = H(
|
|
2751
2785
|
new ResizeObserver((s) => {
|
|
2752
2786
|
p(s[0].contentRect.height);
|
|
2753
2787
|
})
|
|
@@ -2761,12 +2795,12 @@ const Ie = {
|
|
|
2761
2795
|
const C = Math.ceil(s / 25) * 25;
|
|
2762
2796
|
return Math.min(C - 25, mt);
|
|
2763
2797
|
});
|
|
2764
|
-
}, [e]), b = k(() => t ===
|
|
2798
|
+
}, [e]), b = k(() => t === ki, [t]), T = k(() => t === mt, [t]), h = k(() => {
|
|
2765
2799
|
const s = c.get(a);
|
|
2766
2800
|
return s ? s.page.getViewport({ scale: 1, rotation: l[a] }) : null;
|
|
2767
2801
|
}, [c, a, l]), f = N(
|
|
2768
2802
|
(s) => {
|
|
2769
|
-
const C = ((h == null ? void 0 : h.width) || 0) + 2 * Mt, _ = ((h == null ? void 0 : h.height) || 0) + 2 * Mt, S = (o == null ? void 0 : o.clientWidth) || 0, E = (o == null ? void 0 : o.clientHeight) || 0, x =
|
|
2803
|
+
const C = ((h == null ? void 0 : h.width) || 0) + 2 * Mt, _ = ((h == null ? void 0 : h.height) || 0) + 2 * Mt, S = (o == null ? void 0 : o.clientWidth) || 0, E = (o == null ? void 0 : o.clientHeight) || 0, x = Po(
|
|
2770
2804
|
s,
|
|
2771
2805
|
S,
|
|
2772
2806
|
E,
|
|
@@ -2786,24 +2820,24 @@ const Ie = {
|
|
|
2786
2820
|
return F(() => (o && w.current.observe(o), () => {
|
|
2787
2821
|
w.current.disconnect();
|
|
2788
2822
|
}), [o]), typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ W("div", { className: ze["rp-zoom-wrapper"], children: [
|
|
2789
|
-
/* @__PURE__ */ i(K, { content:
|
|
2823
|
+
/* @__PURE__ */ i(K, { content: d == null ? void 0 : d.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2790
2824
|
re,
|
|
2791
2825
|
{
|
|
2792
2826
|
disabled: b,
|
|
2793
2827
|
onClick: y,
|
|
2794
|
-
"aria-label":
|
|
2795
|
-
children: /* @__PURE__ */ i(
|
|
2828
|
+
"aria-label": d == null ? void 0 : d.zoomOutTooltip,
|
|
2829
|
+
children: /* @__PURE__ */ i($i, {})
|
|
2796
2830
|
}
|
|
2797
2831
|
) }),
|
|
2798
|
-
!
|
|
2832
|
+
!u && /* @__PURE__ */ i(
|
|
2799
2833
|
mn,
|
|
2800
2834
|
{
|
|
2801
2835
|
container: n,
|
|
2802
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content:
|
|
2836
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: d == null ? void 0 : d.zoomSelectTooltip, children: /* @__PURE__ */ W(
|
|
2803
2837
|
re,
|
|
2804
2838
|
{
|
|
2805
2839
|
className: ze["rp-current-zoom-wrapper"],
|
|
2806
|
-
"aria-label":
|
|
2840
|
+
"aria-label": d == null ? void 0 : d.zoomSelectTooltip,
|
|
2807
2841
|
children: [
|
|
2808
2842
|
/* @__PURE__ */ i("span", { className: ze["rp-current-zoom-text"], children: t }),
|
|
2809
2843
|
/* @__PURE__ */ i("span", { className: ze["rp-current-zoom-text"], children: "%" }),
|
|
@@ -2813,6 +2847,8 @@ const Ie = {
|
|
|
2813
2847
|
) }) }),
|
|
2814
2848
|
style: { minWidth: "200px" },
|
|
2815
2849
|
align: "center",
|
|
2850
|
+
side: "bottom",
|
|
2851
|
+
avoidCollisions: !1,
|
|
2816
2852
|
children: /* @__PURE__ */ W(
|
|
2817
2853
|
"div",
|
|
2818
2854
|
{
|
|
@@ -2820,12 +2856,12 @@ const Ie = {
|
|
|
2820
2856
|
className: ze["rp-zoom-dropdown-content"],
|
|
2821
2857
|
children: [
|
|
2822
2858
|
/* @__PURE__ */ W(Ke, { children: [
|
|
2823
|
-
/* @__PURE__ */ i(Ce, { onClick: () => g(at.ACTUAL), children:
|
|
2824
|
-
/* @__PURE__ */ i(Ce, { onClick: () => g(at.PAGE_FIT), children:
|
|
2825
|
-
/* @__PURE__ */ i(Ce, { onClick: () => g(at.PAGE_WIDTH), children:
|
|
2859
|
+
/* @__PURE__ */ i(Ce, { onClick: () => g(at.ACTUAL), children: d == null ? void 0 : d.zoomActualSize }),
|
|
2860
|
+
/* @__PURE__ */ i(Ce, { onClick: () => g(at.PAGE_FIT), children: d == null ? void 0 : d.zoomPageFit }),
|
|
2861
|
+
/* @__PURE__ */ i(Ce, { onClick: () => g(at.PAGE_WIDTH), children: d == null ? void 0 : d.zoomPageWidth })
|
|
2826
2862
|
] }),
|
|
2827
2863
|
/* @__PURE__ */ i(yt, {}),
|
|
2828
|
-
/* @__PURE__ */ i(Ke, { children:
|
|
2864
|
+
/* @__PURE__ */ i(Ke, { children: Mi.map((s) => /* @__PURE__ */ W(Ce, { onClick: () => g(s), children: [
|
|
2829
2865
|
s,
|
|
2830
2866
|
" %"
|
|
2831
2867
|
] }, s)) })
|
|
@@ -2834,13 +2870,13 @@ const Ie = {
|
|
|
2834
2870
|
)
|
|
2835
2871
|
}
|
|
2836
2872
|
),
|
|
2837
|
-
/* @__PURE__ */ i(K, { content:
|
|
2873
|
+
/* @__PURE__ */ i(K, { content: d == null ? void 0 : d.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
2838
2874
|
re,
|
|
2839
2875
|
{
|
|
2840
2876
|
disabled: T,
|
|
2841
2877
|
onClick: P,
|
|
2842
|
-
"aria-label":
|
|
2843
|
-
children: /* @__PURE__ */ i(
|
|
2878
|
+
"aria-label": d == null ? void 0 : d.zoomInTooltip,
|
|
2879
|
+
children: /* @__PURE__ */ i(Hi, {})
|
|
2844
2880
|
}
|
|
2845
2881
|
) })
|
|
2846
2882
|
] }) : null;
|
|
@@ -2869,13 +2905,13 @@ const Ie = {
|
|
|
2869
2905
|
] });
|
|
2870
2906
|
}, an = () => {
|
|
2871
2907
|
const { searchIcon: t } = ue();
|
|
2872
|
-
return t || /* @__PURE__ */ i(
|
|
2873
|
-
},
|
|
2908
|
+
return t || /* @__PURE__ */ i(To, {});
|
|
2909
|
+
}, Ui = () => {
|
|
2874
2910
|
const { container: t } = me(), [e, n] = $(!1), { pdf: o } = ee(), [r, a] = $(null), {
|
|
2875
2911
|
searchOptions: l,
|
|
2876
2912
|
setSearchOptions: c,
|
|
2877
|
-
loading:
|
|
2878
|
-
setSearch:
|
|
2913
|
+
loading: u,
|
|
2914
|
+
setSearch: d,
|
|
2879
2915
|
totalMatches: m,
|
|
2880
2916
|
currentMatchPosition: v,
|
|
2881
2917
|
nextMatch: p,
|
|
@@ -2884,8 +2920,8 @@ const Ie = {
|
|
|
2884
2920
|
} = xt(), { searchTool: y = !0 } = ge(), [b, T] = $(P), { localeMessages: h } = ae(), { isSmallScreen: f } = Pe(), g = N(() => {
|
|
2885
2921
|
n(!0);
|
|
2886
2922
|
}, []), s = N(() => {
|
|
2887
|
-
|
|
2888
|
-
}, [
|
|
2923
|
+
d(""), T(""), n(!1);
|
|
2924
|
+
}, [d]), C = (I) => {
|
|
2889
2925
|
const O = I.key === "Enter", M = I.key === " ";
|
|
2890
2926
|
(O || M) && s();
|
|
2891
2927
|
}, _ = N(
|
|
@@ -2895,9 +2931,9 @@ const Ie = {
|
|
|
2895
2931
|
[e]
|
|
2896
2932
|
), S = N(
|
|
2897
2933
|
(I) => {
|
|
2898
|
-
I.shiftKey && I.key === "Enter" ? w() : I.key === "Enter" && P !== b ?
|
|
2934
|
+
I.shiftKey && I.key === "Enter" ? w() : I.key === "Enter" && P !== b ? d(b) : I.key === "Enter" && p();
|
|
2899
2935
|
},
|
|
2900
|
-
[b, w, p,
|
|
2936
|
+
[b, w, p, d, P]
|
|
2901
2937
|
);
|
|
2902
2938
|
F(() => (window.addEventListener("keydown", _), () => {
|
|
2903
2939
|
window.removeEventListener("keydown", _);
|
|
@@ -2907,8 +2943,8 @@ const Ie = {
|
|
|
2907
2943
|
const E = N((I) => {
|
|
2908
2944
|
T(I.target.value);
|
|
2909
2945
|
}, []), x = N(() => {
|
|
2910
|
-
T(""),
|
|
2911
|
-
}, [
|
|
2946
|
+
T(""), d("");
|
|
2947
|
+
}, [d]), R = k(() => `${v} / ${m}`, [v, m]), { wholeWords: z, matchCase: D } = k(() => l, [l]), A = N(
|
|
2912
2948
|
(I) => {
|
|
2913
2949
|
c((O) => ({ ...O, matchCase: I }));
|
|
2914
2950
|
},
|
|
@@ -2922,7 +2958,7 @@ const Ie = {
|
|
|
2922
2958
|
return F(() => {
|
|
2923
2959
|
s();
|
|
2924
2960
|
}, [o, s]), y ? /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
|
|
2925
|
-
|
|
2961
|
+
$r,
|
|
2926
2962
|
{
|
|
2927
2963
|
open: e,
|
|
2928
2964
|
container: t,
|
|
@@ -2940,10 +2976,10 @@ const Ie = {
|
|
|
2940
2976
|
placeholder: h == null ? void 0 : h.searchInputPlaceholder,
|
|
2941
2977
|
className: J["rp-search-input"],
|
|
2942
2978
|
ref: a,
|
|
2943
|
-
children: !!b && /* @__PURE__ */ i("span", { className: J["rp-search-tool-input-clear"], onClick: x, children: /* @__PURE__ */ i(
|
|
2979
|
+
children: !!b && /* @__PURE__ */ i("span", { className: J["rp-search-tool-input-clear"], onClick: x, children: /* @__PURE__ */ i(So, {}) })
|
|
2944
2980
|
}
|
|
2945
2981
|
) }),
|
|
2946
|
-
|
|
2982
|
+
u ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Ct, { className: J["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: R }),
|
|
2947
2983
|
f && /* @__PURE__ */ i("div", { className: J["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: C, handleClose: s }) })
|
|
2948
2984
|
] }),
|
|
2949
2985
|
/* @__PURE__ */ W("div", { className: J["rp-search-tool-input-checkboxes"], children: [
|
|
@@ -2961,15 +2997,15 @@ const Ie = {
|
|
|
2961
2997
|
] })
|
|
2962
2998
|
}
|
|
2963
2999
|
) }) : null;
|
|
2964
|
-
},
|
|
3000
|
+
}, Vi = "_loading_wazy2_1", De = {
|
|
2965
3001
|
"rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
|
|
2966
3002
|
"rp-loading-modal": "_rp-loading-modal_wazy2_14",
|
|
2967
3003
|
"rp-loading-title": "_rp-loading-title_wazy2_27",
|
|
2968
3004
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_wazy2_35",
|
|
2969
3005
|
"rp-loading-progress": "_rp-loading-progress_wazy2_35",
|
|
2970
3006
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
|
|
2971
|
-
loading:
|
|
2972
|
-
},
|
|
3007
|
+
loading: Vi
|
|
3008
|
+
}, qi = ({ percentage: t }) => {
|
|
2973
3009
|
const { cancel: e } = tt(), { localeMessages: n } = ae();
|
|
2974
3010
|
return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(De["rp-loading-overlay"]), children: /* @__PURE__ */ W("div", { className: ne(De["rp-loading-modal"]), children: [
|
|
2975
3011
|
/* @__PURE__ */ W("div", { className: ne(De["rp-loading-title"]), children: [
|
|
@@ -2985,18 +3021,18 @@ const Ie = {
|
|
|
2985
3021
|
) }),
|
|
2986
3022
|
/* @__PURE__ */ i("button", { className: ne(De["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
2987
3023
|
] }) });
|
|
2988
|
-
},
|
|
3024
|
+
}, Bi = $e((t, e) => {
|
|
2989
3025
|
const { showPrintProgress: n } = ge(), { progress: o } = tt(), { isSmallScreen: r } = Pe(), { percentage: a } = o || {}, l = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2990
3026
|
return /* @__PURE__ */ W("div", { children: [
|
|
2991
3027
|
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: We["rp-toolbar-content"], children: /* @__PURE__ */ W("div", { className: We["rp-toolbar-wrapper"], style: l(), children: [
|
|
2992
3028
|
/* @__PURE__ */ W("div", { "data-rp": "topBarLeft", className: We["rp-toolbar-start"], children: [
|
|
2993
|
-
/* @__PURE__ */ i(
|
|
2994
|
-
/* @__PURE__ */ i(
|
|
3029
|
+
/* @__PURE__ */ i(Ui, {}),
|
|
3030
|
+
/* @__PURE__ */ i(si, {})
|
|
2995
3031
|
] }),
|
|
2996
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: We["rp-toolbar-middle"], children: /* @__PURE__ */ i(
|
|
2997
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: We["rp-toolbar-end"], children: /* @__PURE__ */ i(
|
|
3032
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: We["rp-toolbar-middle"], children: /* @__PURE__ */ i(Gi, {}) }),
|
|
3033
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: We["rp-toolbar-end"], children: /* @__PURE__ */ i(Wi, {}) })
|
|
2998
3034
|
] }) }),
|
|
2999
|
-
n && a ? /* @__PURE__ */ i(
|
|
3035
|
+
n && a ? /* @__PURE__ */ i(qi, { percentage: a }) : null
|
|
3000
3036
|
] });
|
|
3001
3037
|
}), gt = {
|
|
3002
3038
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
@@ -3009,17 +3045,17 @@ const Ie = {
|
|
|
3009
3045
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
3010
3046
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
3011
3047
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
3012
|
-
},
|
|
3013
|
-
const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = ie(), { pageRotate: l } = Ue(), c = k(() => o ? ke["rp-thumbnail-active"] : "", [o]),
|
|
3048
|
+
}, Zi = (t) => {
|
|
3049
|
+
const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = ie(), { pageRotate: l } = Ue(), c = k(() => o ? ke["rp-thumbnail-active"] : "", [o]), u = k(() => ({
|
|
3014
3050
|
width: Math.round(r.width),
|
|
3015
3051
|
height: Math.round(r.height)
|
|
3016
|
-
}), [r]),
|
|
3052
|
+
}), [r]), d = N(() => {
|
|
3017
3053
|
n && a(n);
|
|
3018
3054
|
}, [a, n]);
|
|
3019
3055
|
return /* @__PURE__ */ W(
|
|
3020
3056
|
"div",
|
|
3021
3057
|
{
|
|
3022
|
-
onClick:
|
|
3058
|
+
onClick: d,
|
|
3023
3059
|
id: `page-${n}`,
|
|
3024
3060
|
className: ke["rp-thumbnail-wrapper"],
|
|
3025
3061
|
children: [
|
|
@@ -3034,8 +3070,8 @@ const Ie = {
|
|
|
3034
3070
|
"img",
|
|
3035
3071
|
{
|
|
3036
3072
|
src: e,
|
|
3037
|
-
width:
|
|
3038
|
-
height:
|
|
3073
|
+
width: u.width,
|
|
3074
|
+
height: u.height,
|
|
3039
3075
|
alt: "thumbnail"
|
|
3040
3076
|
}
|
|
3041
3077
|
) : /* @__PURE__ */ i(
|
|
@@ -3043,8 +3079,8 @@ const Ie = {
|
|
|
3043
3079
|
{
|
|
3044
3080
|
className: ke["rp-thumbnail-loader"],
|
|
3045
3081
|
style: {
|
|
3046
|
-
width: `${
|
|
3047
|
-
height: `${
|
|
3082
|
+
width: `${u.width}px`,
|
|
3083
|
+
height: `${u.height}px`
|
|
3048
3084
|
},
|
|
3049
3085
|
children: /* @__PURE__ */ i(Ct, {})
|
|
3050
3086
|
}
|
|
@@ -3058,22 +3094,22 @@ const Ie = {
|
|
|
3058
3094
|
}, sn = {
|
|
3059
3095
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
3060
3096
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
3061
|
-
},
|
|
3097
|
+
}, ji = 16, Ki = (t, e) => {
|
|
3062
3098
|
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
3063
|
-
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
3064
|
-
},
|
|
3065
|
-
const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage:
|
|
3066
|
-
cn(e, () =>
|
|
3099
|
+
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - ji);
|
|
3100
|
+
}, Xi = $e((t, e) => {
|
|
3101
|
+
const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: u } = Pn(), d = H(null), m = H(1);
|
|
3102
|
+
cn(e, () => d.current);
|
|
3067
3103
|
const v = k(() => Object.values(a), [a]), p = N(() => {
|
|
3068
3104
|
const w = c + 1;
|
|
3069
3105
|
w <= r && l(w);
|
|
3070
3106
|
}, [l, r, c]);
|
|
3071
3107
|
return F(() => {
|
|
3072
|
-
o > c ?
|
|
3073
|
-
}, [o, c,
|
|
3108
|
+
o > c ? u(o) : n && m.current !== o && (Ki(d.current, o), m.current = o);
|
|
3109
|
+
}, [o, c, u, n, v]), gr(d.current, p), /* @__PURE__ */ i("div", { ref: d, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? v.map((w, P) => {
|
|
3074
3110
|
var y, b;
|
|
3075
3111
|
return /* @__PURE__ */ i(
|
|
3076
|
-
|
|
3112
|
+
Zi,
|
|
3077
3113
|
{
|
|
3078
3114
|
isFocused: o === ((y = w.page) == null ? void 0 : y.pageNumber),
|
|
3079
3115
|
pageNumber: (b = w.page) == null ? void 0 : b.pageNumber,
|
|
@@ -3085,21 +3121,21 @@ const Ie = {
|
|
|
3085
3121
|
P
|
|
3086
3122
|
);
|
|
3087
3123
|
}) : null }) });
|
|
3088
|
-
}),
|
|
3124
|
+
}), Yi = () => {
|
|
3089
3125
|
const { thumbnailIcon: t } = ue();
|
|
3090
|
-
return t || /* @__PURE__ */ i(
|
|
3091
|
-
},
|
|
3092
|
-
const { active: t, setActive: e } = Pn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: l } = ge(), { localeMessages: c } = ae(),
|
|
3126
|
+
return t || /* @__PURE__ */ i(mr, {});
|
|
3127
|
+
}, Ji = () => {
|
|
3128
|
+
const { active: t, setActive: e } = Pn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: l } = ge(), { localeMessages: c } = ae(), u = N(() => {
|
|
3093
3129
|
e((m) => !m);
|
|
3094
|
-
}, []),
|
|
3130
|
+
}, []), d = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: u, active: t }) : a ? /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
3095
3131
|
re,
|
|
3096
3132
|
{
|
|
3097
|
-
onClick:
|
|
3133
|
+
onClick: u,
|
|
3098
3134
|
active: t,
|
|
3099
3135
|
"aria-label": c == null ? void 0 : c.thumbnailTooltip,
|
|
3100
|
-
children: /* @__PURE__ */ i(
|
|
3136
|
+
children: /* @__PURE__ */ i(Yi, {})
|
|
3101
3137
|
}
|
|
3102
|
-
) }) : null, [a, t,
|
|
3138
|
+
) }) : null, [a, t, u, c]);
|
|
3103
3139
|
return /* @__PURE__ */ i(fe, { children: l && /* @__PURE__ */ W(
|
|
3104
3140
|
"div",
|
|
3105
3141
|
{
|
|
@@ -3107,7 +3143,7 @@ const Ie = {
|
|
|
3107
3143
|
className: gt["rp-sidebar-content-wrapper"],
|
|
3108
3144
|
"data-rp": "sidebar",
|
|
3109
3145
|
children: [
|
|
3110
|
-
/* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children:
|
|
3146
|
+
/* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children: d }),
|
|
3111
3147
|
/* @__PURE__ */ W(
|
|
3112
3148
|
"div",
|
|
3113
3149
|
{
|
|
@@ -3115,46 +3151,15 @@ const Ie = {
|
|
|
3115
3151
|
hidden: !t,
|
|
3116
3152
|
className: gt["rp-thumbnails-wrapper"],
|
|
3117
3153
|
children: [
|
|
3118
|
-
/* @__PURE__ */ i(
|
|
3119
|
-
/* @__PURE__ */ i(
|
|
3154
|
+
/* @__PURE__ */ i(Xi, { show: t, ref: r }),
|
|
3155
|
+
/* @__PURE__ */ i(vr, { onWidthChange: o, thumbnailRef: r })
|
|
3120
3156
|
]
|
|
3121
3157
|
}
|
|
3122
3158
|
)
|
|
3123
3159
|
]
|
|
3124
3160
|
}
|
|
3125
3161
|
) });
|
|
3126
|
-
},
|
|
3127
|
-
"rp-layout": "_rp-layout_1ixt5_1",
|
|
3128
|
-
"rp-content": "_rp-content_1ixt5_5",
|
|
3129
|
-
"rp-pages": "_rp-pages_1ixt5_11",
|
|
3130
|
-
"rp-container": "_rp-container_1ixt5_16",
|
|
3131
|
-
"rp-loader": "_rp-loader_1ixt5_52",
|
|
3132
|
-
"rp-theme-variables": "_rp-theme-variables_1ixt5_56",
|
|
3133
|
-
"rp-dark-mode": "_rp-dark-mode_1ixt5_167"
|
|
3134
|
-
}, Ji = $e(
|
|
3135
|
-
(t, e) => {
|
|
3136
|
-
const { children: n, toolbarRef: o, style: r, className: a } = t, { customVariables: l, customDarkVariables: c } = Tr(), { darkMode: d } = rr();
|
|
3137
|
-
return /* @__PURE__ */ i(
|
|
3138
|
-
"div",
|
|
3139
|
-
{
|
|
3140
|
-
ref: e,
|
|
3141
|
-
className: ne(
|
|
3142
|
-
be["rp-theme-variables"],
|
|
3143
|
-
be["rp-container"],
|
|
3144
|
-
d ? be["rp-dark-mode"] : "",
|
|
3145
|
-
a
|
|
3146
|
-
),
|
|
3147
|
-
style: {
|
|
3148
|
-
"--rp-toolbar-height": `${(o == null ? void 0 : o.clientHeight) || 48}px`,
|
|
3149
|
-
...l,
|
|
3150
|
-
...d ? c : {},
|
|
3151
|
-
...r
|
|
3152
|
-
},
|
|
3153
|
-
children: n
|
|
3154
|
-
}
|
|
3155
|
-
);
|
|
3156
|
-
}
|
|
3157
|
-
), Ks = $e((t, e) => {
|
|
3162
|
+
}, Ks = $e((t, e) => {
|
|
3158
3163
|
const {
|
|
3159
3164
|
children: n,
|
|
3160
3165
|
slots: o,
|
|
@@ -3162,22 +3167,22 @@ const Ie = {
|
|
|
3162
3167
|
style: a,
|
|
3163
3168
|
className: l,
|
|
3164
3169
|
mobileWidth: c,
|
|
3165
|
-
onLoaded:
|
|
3166
|
-
cleanupOnLoaded:
|
|
3170
|
+
onLoaded: u,
|
|
3171
|
+
cleanupOnLoaded: d,
|
|
3167
3172
|
onLayoutWidthChange: m
|
|
3168
3173
|
} = t, [v, p] = $(null), { setContainer: w, setContentRef: P } = me(), { loading: y } = ee(), { LoaderImageComponent: b } = hn();
|
|
3169
|
-
return F(() => (
|
|
3170
|
-
|
|
3171
|
-
}), [
|
|
3172
|
-
/* @__PURE__ */ W(
|
|
3174
|
+
return F(() => (u && u(), () => {
|
|
3175
|
+
d && d();
|
|
3176
|
+
}), [u, d]), /* @__PURE__ */ i(In, { toolbarRef: v, ref: e, children: /* @__PURE__ */ i(Tr, { mobileWidth: c, onLayoutWidthChange: m, children: /* @__PURE__ */ i(wr, { slots: o, children: /* @__PURE__ */ i(_r, { icons: r, children: /* @__PURE__ */ W(br, { getContainerRef: w, style: a, className: l, children: [
|
|
3177
|
+
/* @__PURE__ */ W(Cr, { children: [
|
|
3173
3178
|
/* @__PURE__ */ W("div", { className: be["rp-layout"], children: [
|
|
3174
|
-
/* @__PURE__ */ i(
|
|
3179
|
+
/* @__PURE__ */ i(Bi, { ref: p }),
|
|
3175
3180
|
/* @__PURE__ */ W("div", { className: be["rp-content"], children: [
|
|
3176
|
-
/* @__PURE__ */ i("div", { className: be["rp-sidebar"], children: /* @__PURE__ */ i(
|
|
3181
|
+
/* @__PURE__ */ i("div", { className: be["rp-sidebar"], children: /* @__PURE__ */ i(Ji, {}) }),
|
|
3177
3182
|
/* @__PURE__ */ i("div", { ref: P, className: be["rp-pages"], children: n })
|
|
3178
3183
|
] })
|
|
3179
3184
|
] }),
|
|
3180
|
-
/* @__PURE__ */ i(
|
|
3185
|
+
/* @__PURE__ */ i(Pr, {})
|
|
3181
3186
|
] }),
|
|
3182
3187
|
y ? /* @__PURE__ */ i(
|
|
3183
3188
|
"div",
|
|
@@ -3210,49 +3215,49 @@ const Ie = {
|
|
|
3210
3215
|
] }) }) }) }) });
|
|
3211
3216
|
});
|
|
3212
3217
|
export {
|
|
3213
|
-
|
|
3218
|
+
Do as A,
|
|
3214
3219
|
on as B,
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3220
|
+
Lo as C,
|
|
3221
|
+
ti as D,
|
|
3222
|
+
Ui as E,
|
|
3223
|
+
qn as F,
|
|
3219
3224
|
qi as G,
|
|
3220
3225
|
Bi as H,
|
|
3221
|
-
|
|
3222
|
-
|
|
3226
|
+
Zi as I,
|
|
3227
|
+
Xi as J,
|
|
3223
3228
|
Ji as K,
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3229
|
+
In as L,
|
|
3230
|
+
Ai as M,
|
|
3231
|
+
Fi as O,
|
|
3227
3232
|
Gs as P,
|
|
3228
3233
|
Bs as R,
|
|
3229
3234
|
qs as S,
|
|
3230
3235
|
Vs as T,
|
|
3231
|
-
|
|
3236
|
+
Gi as Z,
|
|
3232
3237
|
Ks as a,
|
|
3233
|
-
|
|
3238
|
+
Gn as b,
|
|
3234
3239
|
tt as c,
|
|
3235
3240
|
xt as d,
|
|
3236
3241
|
Us as e,
|
|
3237
3242
|
wn as f,
|
|
3238
|
-
|
|
3243
|
+
yo as g,
|
|
3239
3244
|
_n as h,
|
|
3240
|
-
|
|
3245
|
+
xo as i,
|
|
3241
3246
|
bn as j,
|
|
3242
|
-
|
|
3247
|
+
Io as k,
|
|
3243
3248
|
Cn as l,
|
|
3244
3249
|
Pn as m,
|
|
3245
|
-
|
|
3250
|
+
Ro as n,
|
|
3246
3251
|
Tn as o,
|
|
3247
|
-
|
|
3248
|
-
|
|
3252
|
+
No as p,
|
|
3253
|
+
Fo as q,
|
|
3249
3254
|
It as r,
|
|
3250
|
-
|
|
3251
|
-
|
|
3255
|
+
Jo as s,
|
|
3256
|
+
ni as t,
|
|
3252
3257
|
ie as u,
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
+
ri as v,
|
|
3259
|
+
si as w,
|
|
3260
|
+
Si as x,
|
|
3261
|
+
jn as y,
|
|
3262
|
+
Wi as z
|
|
3258
3263
|
};
|