@pdf-viewer/react 1.5.0-beta.14 → 1.5.0-beta.15
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-c43ce254.js → RPDefaultLayout-36b2f311.js} +1125 -1111
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/LayoutContainer.js +1 -1
- 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/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/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/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- 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,215 +1,224 @@
|
|
|
1
|
-
import { jsx as a, Fragment as
|
|
1
|
+
import { jsx as a, Fragment as Se, jsxs as D } from "react/jsx-runtime";
|
|
2
2
|
import * as U from "react";
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { ChevronUpIcon as
|
|
3
|
+
import { useRef as M, useEffect as A, useCallback as L, useState as $, createContext as Ke, useContext as Xe, useMemo as F, forwardRef as We, useImperativeHandle as ln, createElement as Ge, PureComponent as nr, Component as rr, memo as or } from "react";
|
|
4
|
+
import { ChevronUpIcon as Me } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as ee } from "./components/ui/Button.js";
|
|
6
|
-
import { UIInput as
|
|
6
|
+
import { UIInput as dn } from "./components/ui/Input.js";
|
|
7
7
|
import { useScrollModeContext as Ee } from "./contexts/ScrollModeContext.js";
|
|
8
8
|
import { useDocumentContext as K } from "./contexts/RPDocumentContext.js";
|
|
9
|
-
import { useDarkModeContext as
|
|
10
|
-
import { ViewMode as
|
|
11
|
-
import { useRotationContext as
|
|
12
|
-
import { useLayerContext as
|
|
13
|
-
import { useZoomContext as
|
|
14
|
-
import { useViewModeContext as
|
|
15
|
-
import { useVirtualScrollContext as
|
|
16
|
-
import { useVirtualGridContext as
|
|
17
|
-
import { useSelectionModeContext as
|
|
18
|
-
import { useInitialStateContext as
|
|
19
|
-
import { useFullScreenContext as
|
|
9
|
+
import { useDarkModeContext as ir } from "./contexts/DarkModeContext.js";
|
|
10
|
+
import { ViewMode as Ze, ScrollMode as X, AnnotationSubType as kt, SelectionMode as ar, ZoomLevel as it } from "./utils/types.js";
|
|
11
|
+
import { useRotationContext as Ye } from "./contexts/RotationContext.js";
|
|
12
|
+
import { useLayerContext as sr } from "./contexts/LayerContext.js";
|
|
13
|
+
import { useZoomContext as Je } from "./contexts/ZoomContext.js";
|
|
14
|
+
import { useViewModeContext as Qe } from "./contexts/ViewModeContext.js";
|
|
15
|
+
import { useVirtualScrollContext as et } from "./contexts/VirtualScrollContext.js";
|
|
16
|
+
import { useVirtualGridContext as un } from "./contexts/VirtualGridContext.js";
|
|
17
|
+
import { useSelectionModeContext as cr } from "./contexts/SelectionModeContext.js";
|
|
18
|
+
import { useInitialStateContext as lr } from "./contexts/InitialStateContext.js";
|
|
19
|
+
import { useFullScreenContext as dr } from "./contexts/FullScreenContext.js";
|
|
20
20
|
import "./contexts/FileInputContext.js";
|
|
21
21
|
import "./contexts/DropFileZoneContext.js";
|
|
22
|
-
import { renderPage as
|
|
23
|
-
import { highlightMatches as
|
|
24
|
-
import * as
|
|
25
|
-
import { PixelsPerInch as
|
|
26
|
-
import { useLayoutContainer as
|
|
27
|
-
import { useDimensionPagesContext as
|
|
22
|
+
import { renderPage as wt } from "./utils/renderPage.js";
|
|
23
|
+
import { highlightMatches as pn, findMatches as ur, resetDivs as hn, highlightMultipleColorMatches as pr } from "./utils/highlight.js";
|
|
24
|
+
import * as Pt from "pdfjs-dist";
|
|
25
|
+
import { PixelsPerInch as hr, AnnotationMode as mr, RenderingCancelledException as fr, AnnotationLayer as gr } from "pdfjs-dist";
|
|
26
|
+
import { useLayoutContainer as Te } from "./contexts/LayoutContainerContext.js";
|
|
27
|
+
import { useDimensionPagesContext as tt } from "./contexts/DimensionPagesContext.js";
|
|
28
28
|
import { useLocalizationContext as ue } from "./contexts/LocalizationContext.js";
|
|
29
|
-
import { useHighlightContext as
|
|
30
|
-
import { useDownloadContext as
|
|
31
|
-
import { useSmoothScrollContext as
|
|
32
|
-
import { useLoaderContext as
|
|
29
|
+
import { useHighlightContext as vr } from "./contexts/HighlightContext.js";
|
|
30
|
+
import { useDownloadContext as _r } from "./contexts/DownloadContext.js";
|
|
31
|
+
import { useSmoothScrollContext as xt } from "./contexts/SmoothScrollContext.js";
|
|
32
|
+
import { useLoaderContext as mn } from "./contexts/LoaderContext.js";
|
|
33
33
|
import "./contexts/LicenseContext.js";
|
|
34
34
|
import "./components/RPConfig.js";
|
|
35
|
-
import { ThumbnailIcon as
|
|
35
|
+
import { ThumbnailIcon as wr } from "./components/icons/Thumbnail.js";
|
|
36
36
|
import { c as re } from "./clsx-0c6e471a.js";
|
|
37
|
-
import { LoaderIcon as
|
|
38
|
-
import { useInfiniteScroll as
|
|
39
|
-
import { RPSplitter as
|
|
40
|
-
import { useToolbarComponentContext as
|
|
41
|
-
import { useIconContext as pe, IconProvider as
|
|
37
|
+
import { LoaderIcon as St } from "./components/icons/LoaderIcon.js";
|
|
38
|
+
import { useInfiniteScroll as br } from "./utils/hooks/useInfiniteScroll.js";
|
|
39
|
+
import { RPSplitter as Cr } from "./components/layout/sidebar/RPSplitter.js";
|
|
40
|
+
import { useToolbarComponentContext as _e, ToolbarComponentProvider as Tr } from "./contexts/ToolbarComponentContext.js";
|
|
41
|
+
import { useIconContext as pe, IconProvider as Pr } from "./contexts/IconContext.js";
|
|
42
42
|
import q from "./components/ui/RPTooltip.js";
|
|
43
|
-
import { Container as
|
|
44
|
-
import { WrapperLayout as
|
|
45
|
-
import { RPDropFileZone as
|
|
46
|
-
import { useViewportContext as ye, ViewportProvider as
|
|
47
|
-
import { useThemeContext as
|
|
48
|
-
import { SimpleLinkService as
|
|
49
|
-
import { annotationsEvents as
|
|
50
|
-
import { _ as
|
|
51
|
-
import { useMousePressed as
|
|
52
|
-
import { useGrabScroll as
|
|
53
|
-
import { usePinch as
|
|
54
|
-
import { useDebounce as
|
|
55
|
-
import { getPositionFromPage as
|
|
56
|
-
import { getThumbnailViewport as
|
|
57
|
-
import { smoothScrollTo as
|
|
58
|
-
import { appConsole as
|
|
59
|
-
import { FileUploadTool as
|
|
60
|
-
import { DarkModeTool as
|
|
61
|
-
import { ThreeDotIcon as
|
|
62
|
-
import { UIDropDown as
|
|
63
|
-
import { e as
|
|
64
|
-
import { D as
|
|
65
|
-
import { a as
|
|
66
|
-
import { h as
|
|
67
|
-
import { CloseIcon as
|
|
68
|
-
import { dateFormatter as
|
|
69
|
-
import { PropertyItem as
|
|
70
|
-
import { useOtherToolContext as
|
|
71
|
-
import { DocumentProperties as
|
|
72
|
-
import { RotateTool as
|
|
73
|
-
import { ScrollModeTool as
|
|
74
|
-
import { MenuSeparator as
|
|
75
|
-
import { FileDownloadDefaultIcon as
|
|
76
|
-
import { MenuItem as
|
|
77
|
-
import { PrintDefaultTool as
|
|
78
|
-
import { FullScreenTool as
|
|
79
|
-
import { GoToDownIcon as
|
|
80
|
-
import { SelectionModeTool as
|
|
81
|
-
import { ZoomInIcon as
|
|
82
|
-
import { ZoomOutIcon as
|
|
83
|
-
import { PAGE_PADDING as
|
|
84
|
-
import { getZoomLevel as
|
|
85
|
-
import { SearchIcon as
|
|
86
|
-
import { UICheckbox as
|
|
87
|
-
import { ClearIcon as
|
|
88
|
-
import { InfoIcon as
|
|
89
|
-
import './assets/RPDefaultLayout.css';const
|
|
90
|
-
const { viewMode: e } =
|
|
43
|
+
import { Container as xr } from "./components/layout/Container.js";
|
|
44
|
+
import { WrapperLayout as Sr } from "./components/layout/WrapperLayout.js";
|
|
45
|
+
import { RPDropFileZone as Ir } from "./components/RPDropFileZone.js";
|
|
46
|
+
import { useViewportContext as ye, ViewportProvider as yr } from "./contexts/ViewportContext.js";
|
|
47
|
+
import { useThemeContext as Lr } from "./contexts/ThemeContext.js";
|
|
48
|
+
import { SimpleLinkService as Rr } from "./utils/link_service.js";
|
|
49
|
+
import { annotationsEvents as Nr, annotationEventsHandler as Er, handleClick as Mt, handleAnnotationWidget as Or, handleAnnotationLink as Dr, bindLayerEvents as zr, unbindLayerEvents as Wt } from "./utils/annotations.js";
|
|
50
|
+
import { _ as Ar, U as Fr } from "./Popover-b7402893.js";
|
|
51
|
+
import { useMousePressed as kr } from "./utils/hooks/useMousePressed.js";
|
|
52
|
+
import { useGrabScroll as Mr } from "./utils/hooks/useGrabScroll.js";
|
|
53
|
+
import { usePinch as Wr } from "./utils/hooks/usePinch.js";
|
|
54
|
+
import { useDebounce as It } from "./utils/hooks/useDebounce.js";
|
|
55
|
+
import { getPositionFromPage as Hr, getPageFromPosition as $r } from "./utils/calculatePage.js";
|
|
56
|
+
import { getThumbnailViewport as Ht } from "./utils/getThumbnailViewport.js";
|
|
57
|
+
import { smoothScrollTo as at } from "./utils/smoothScrollTo.js";
|
|
58
|
+
import { appConsole as Gr } from "./utils/appConsole.js";
|
|
59
|
+
import { FileUploadTool as fn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
60
|
+
import { DarkModeTool as Vr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
61
|
+
import { ThreeDotIcon as Ur } from "./components/icons/ThreeDotIcon.js";
|
|
62
|
+
import { UIDropDown as gn } from "./components/ui/DropDown.js";
|
|
63
|
+
import { e as qr, a as yt, P as He, c as ke, g as Lt, i as Zr, k as Br, f as jr } from "./index-1cb41342.js";
|
|
64
|
+
import { D as Kr, u as st } from "./index-aa2d3884.js";
|
|
65
|
+
import { a as Xr, u as Yr, F as Jr, b as Qr, G as Be } from "./index-7279fb4e.js";
|
|
66
|
+
import { h as eo } from "./component-1da194e8.js";
|
|
67
|
+
import { CloseIcon as vn } from "./components/icons/CloseIcon.js";
|
|
68
|
+
import { dateFormatter as $t } from "./utils/dateFormatter.js";
|
|
69
|
+
import { PropertyItem as to } from "./components/layout/toolbar/PropertyItem.js";
|
|
70
|
+
import { useOtherToolContext as no, OtherToolProvider as ro } from "./contexts/OtherToolContext.js";
|
|
71
|
+
import { DocumentProperties as oo } from "./components/layout/toolbar/DocumentProperties.js";
|
|
72
|
+
import { RotateTool as io } from "./components/layout/toolbar/RotateTool.js";
|
|
73
|
+
import { ScrollModeTool as ao } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
74
|
+
import { MenuSeparator as Rt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
75
|
+
import { FileDownloadDefaultIcon as so } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
76
|
+
import { MenuItem as Ce } from "./components/layout/toolbar/MenuItem.js";
|
|
77
|
+
import { PrintDefaultTool as co } from "./components/icons/PrintDefaultIcon.js";
|
|
78
|
+
import { FullScreenTool as _n } from "./components/layout/toolbar/FullScreenTool.js";
|
|
79
|
+
import { GoToDownIcon as wn } from "./components/icons/GoToDownIcon.js";
|
|
80
|
+
import { SelectionModeTool as lo } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
81
|
+
import { ZoomInIcon as uo } from "./components/icons/ZoomInIcon.js";
|
|
82
|
+
import { ZoomOutIcon as po } from "./components/icons/ZoomOutIcon.js";
|
|
83
|
+
import { PAGE_PADDING as Gt } from "./utils/constants.js";
|
|
84
|
+
import { getZoomLevel as ho } from "./utils/getZoomLevel.js";
|
|
85
|
+
import { SearchIcon as mo } from "./components/icons/SearchIcon.js";
|
|
86
|
+
import { UICheckbox as Vt } from "./components/ui/Checkbox.js";
|
|
87
|
+
import { ClearIcon as fo } from "./components/icons/ClearIcon.js";
|
|
88
|
+
import { InfoIcon as Ut } from "./components/icons/InfoIcon.js";
|
|
89
|
+
import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) => r < t ? n + o : n, 0), ct = (e, t) => Math.round(e.left) === Math.round(t.left) && Math.round(e.top) === Math.round(t.top), bn = () => {
|
|
90
|
+
const { viewMode: e } = Qe(), { scrollMode: t } = Ee(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: i } = ie(), c = M(), { columnCount: s } = un(), { widths: l, heights: u } = tt(), d = M(t), f = M(e), h = M(s), { targetScrollPosition: g, smoothScrolling: w } = xt();
|
|
91
91
|
A(() => {
|
|
92
92
|
n != null && n.scrollToItem && (c.current = n);
|
|
93
93
|
}, [n]), A(() => {
|
|
94
|
-
|
|
94
|
+
d.current = t, f.current = e;
|
|
95
95
|
}, [t, e]);
|
|
96
|
-
const
|
|
96
|
+
const b = L(
|
|
97
97
|
(_, m) => {
|
|
98
98
|
if (!r)
|
|
99
99
|
return;
|
|
100
|
-
const
|
|
101
|
-
if (_ ===
|
|
100
|
+
const P = Math.ceil(_ / 2) * 2 - 1;
|
|
101
|
+
if (_ === P + 1) {
|
|
102
102
|
const p = {
|
|
103
|
-
left: l[
|
|
103
|
+
left: l[P],
|
|
104
104
|
top: 0
|
|
105
105
|
};
|
|
106
106
|
return g.current = p, new Promise(
|
|
107
|
-
(
|
|
107
|
+
(T) => at(r, p, T)
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
|
-
const
|
|
110
|
+
const x = {
|
|
111
111
|
left: 0,
|
|
112
112
|
top: 0
|
|
113
113
|
};
|
|
114
|
-
return g.current =
|
|
115
|
-
...
|
|
114
|
+
return g.current = x, r == null ? void 0 : r.scrollTo({
|
|
115
|
+
...x,
|
|
116
116
|
behavior: m
|
|
117
117
|
});
|
|
118
118
|
},
|
|
119
|
-
[r, l,
|
|
119
|
+
[r, l, at]
|
|
120
120
|
);
|
|
121
121
|
return A(() => {
|
|
122
|
-
|
|
122
|
+
d.current = t, f.current = e;
|
|
123
123
|
}, [t, e]), A(() => {
|
|
124
124
|
h.current = s;
|
|
125
125
|
}, [s]), { scrollToPage: L(
|
|
126
126
|
(_, m = "smooth") => {
|
|
127
|
-
const
|
|
128
|
-
let
|
|
129
|
-
if (f.current ===
|
|
130
|
-
|
|
127
|
+
const P = _ - 1;
|
|
128
|
+
let x = P, p = 0;
|
|
129
|
+
if (f.current === Ze.DUAL_PAGE && d.current === X.PAGE_SCROLLING) {
|
|
130
|
+
b(_, m);
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
|
-
if (
|
|
133
|
+
if (d.current === X.PAGE_SCROLLING) {
|
|
134
134
|
i(_);
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
137
|
if (!c.current || !o)
|
|
138
138
|
return;
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
p =
|
|
142
|
-
const
|
|
143
|
-
left:
|
|
139
|
+
const T = o;
|
|
140
|
+
if (w.current = !0, d.current === X.HORIZONTAL_SCROLLING) {
|
|
141
|
+
p = P;
|
|
142
|
+
const N = {
|
|
143
|
+
left: $e(l, p),
|
|
144
144
|
top: 0
|
|
145
145
|
};
|
|
146
|
-
return
|
|
147
|
-
|
|
146
|
+
return ct(N, {
|
|
147
|
+
left: T.scrollLeft,
|
|
148
|
+
top: T.scrollTop
|
|
149
|
+
}) && (w.current = !1), g.current = N, T.scrollTo({
|
|
150
|
+
...N,
|
|
148
151
|
behavior: m
|
|
149
152
|
});
|
|
150
153
|
}
|
|
151
|
-
if (f.current ===
|
|
152
|
-
p =
|
|
153
|
-
const
|
|
154
|
-
left:
|
|
155
|
-
top:
|
|
154
|
+
if (f.current === Ze.DUAL_PAGE) {
|
|
155
|
+
p = P % 2, x = Math.floor(P / 2);
|
|
156
|
+
const N = {
|
|
157
|
+
left: $e(l, p),
|
|
158
|
+
top: $e(u, x)
|
|
156
159
|
};
|
|
157
|
-
return
|
|
158
|
-
|
|
160
|
+
return ct(N, {
|
|
161
|
+
left: T.scrollLeft,
|
|
162
|
+
top: T.scrollTop
|
|
163
|
+
}) && (w.current = !1), g.current = N, T.scrollTo({
|
|
164
|
+
...N,
|
|
159
165
|
behavior: m
|
|
160
166
|
});
|
|
161
167
|
}
|
|
162
|
-
const
|
|
168
|
+
const C = {
|
|
163
169
|
left: 0,
|
|
164
|
-
top:
|
|
170
|
+
top: $e(u, x)
|
|
165
171
|
};
|
|
166
|
-
return g.current =
|
|
167
|
-
|
|
172
|
+
return g.current = C, ct(C, {
|
|
173
|
+
left: T.scrollLeft,
|
|
174
|
+
top: T.scrollTop
|
|
175
|
+
}) && (w.current = !1), T.scrollTo({
|
|
176
|
+
...C,
|
|
168
177
|
behavior: m
|
|
169
178
|
});
|
|
170
179
|
},
|
|
171
180
|
[
|
|
172
181
|
o,
|
|
173
182
|
s,
|
|
174
|
-
|
|
183
|
+
b,
|
|
175
184
|
i,
|
|
176
|
-
|
|
177
|
-
|
|
185
|
+
at,
|
|
186
|
+
u,
|
|
178
187
|
l
|
|
179
188
|
]
|
|
180
189
|
) };
|
|
181
|
-
},
|
|
182
|
-
const [t, n] = $(e), [o, r] = $(0), { scrollToPage: i } =
|
|
183
|
-
(
|
|
184
|
-
if (!/^[0-9]*$/g.test(
|
|
190
|
+
}, go = (e = 1) => {
|
|
191
|
+
const [t, n] = $(e), [o, r] = $(0), { scrollToPage: i } = bn(), c = M(1), { viewMode: s } = Qe(), { scrollMode: l } = Ee(), u = It(t, 100), d = L(
|
|
192
|
+
(b) => {
|
|
193
|
+
if (!/^[0-9]*$/g.test(b.toString()) || !b)
|
|
185
194
|
return { success: !1, currentPage: c.current };
|
|
186
|
-
const _ = +
|
|
187
|
-
return _ < 0 || _ > o ? { success: !1, currentPage: c.current } : (n(_), c.current = _, { success: !0, currentPage: +
|
|
195
|
+
const _ = +b;
|
|
196
|
+
return _ < 0 || _ > o ? { success: !1, currentPage: c.current } : (n(_), c.current = _, { success: !0, currentPage: +b });
|
|
188
197
|
},
|
|
189
198
|
[o]
|
|
190
|
-
), f = L(
|
|
191
|
-
(
|
|
192
|
-
const v =
|
|
199
|
+
), f = L(d, [d]), h = L(
|
|
200
|
+
(b) => {
|
|
201
|
+
const v = d(b);
|
|
193
202
|
return v.success && i(v.currentPage), v;
|
|
194
203
|
},
|
|
195
|
-
[
|
|
204
|
+
[d, i]
|
|
196
205
|
), g = L(() => {
|
|
197
|
-
let
|
|
198
|
-
h(
|
|
199
|
-
}, [h, t, s, l]),
|
|
200
|
-
let
|
|
201
|
-
h(
|
|
206
|
+
let b = t - 1;
|
|
207
|
+
h(b);
|
|
208
|
+
}, [h, t, s, l]), w = L(() => {
|
|
209
|
+
let b = t + 1;
|
|
210
|
+
h(b);
|
|
202
211
|
}, [h, t, s, l]);
|
|
203
212
|
return {
|
|
204
|
-
focusedPage:
|
|
213
|
+
focusedPage: u,
|
|
205
214
|
totalPages: o,
|
|
206
215
|
setFocusedPage: f,
|
|
207
216
|
setTotalPages: r,
|
|
208
|
-
nextPage:
|
|
217
|
+
nextPage: w,
|
|
209
218
|
prevPage: g,
|
|
210
219
|
goToPage: h
|
|
211
220
|
};
|
|
212
|
-
},
|
|
221
|
+
}, Cn = Ke({
|
|
213
222
|
focusedPage: 0,
|
|
214
223
|
setFocusedPage: (e) => {
|
|
215
224
|
},
|
|
@@ -222,14 +231,14 @@ import './assets/RPDefaultLayout.css';const _n = () => {
|
|
|
222
231
|
nextPage: () => {
|
|
223
232
|
}
|
|
224
233
|
}), ie = () => {
|
|
225
|
-
const e =
|
|
226
|
-
return typeof (e == null ? void 0 : e.focusedPage) > "u" &&
|
|
227
|
-
},
|
|
228
|
-
const { pdf: t } = K(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: i, goToPage: c, nextPage: s, prevPage: l } =
|
|
234
|
+
const e = Xe(Cn);
|
|
235
|
+
return typeof (e == null ? void 0 : e.focusedPage) > "u" && Gr.error("Please use this hooks inside children component of RPProvider"), e;
|
|
236
|
+
}, Ts = ({ children: e }) => {
|
|
237
|
+
const { pdf: t } = K(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: i, goToPage: c, nextPage: s, prevPage: l } = go();
|
|
229
238
|
return A(() => {
|
|
230
239
|
t != null && t.numPages && (i(t.numPages), r(1));
|
|
231
240
|
}, [t, i, r]), /* @__PURE__ */ a(
|
|
232
|
-
|
|
241
|
+
Cn.Provider,
|
|
233
242
|
{
|
|
234
243
|
value: {
|
|
235
244
|
focusedPage: n,
|
|
@@ -244,157 +253,157 @@ import './assets/RPDefaultLayout.css';const _n = () => {
|
|
|
244
253
|
}
|
|
245
254
|
);
|
|
246
255
|
};
|
|
247
|
-
const
|
|
256
|
+
const vo = () => {
|
|
248
257
|
const { pdf: e, pages: t } = K(), [n, o] = $({
|
|
249
258
|
loadedPages: 0,
|
|
250
259
|
totalPages: 0,
|
|
251
260
|
percentage: 0
|
|
252
|
-
}), [r, i] = $(!1), [c, s] = $(!1), [l,
|
|
261
|
+
}), [r, i] = $(!1), [c, s] = $(!1), [l, u] = $(null), d = M(!1);
|
|
253
262
|
A(() => {
|
|
254
|
-
|
|
255
|
-
}, [
|
|
263
|
+
d.current;
|
|
264
|
+
}, [d]);
|
|
256
265
|
const f = L(() => {
|
|
257
266
|
document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
|
|
258
|
-
const
|
|
259
|
-
|
|
267
|
+
const P = document.querySelector(".rp-print-zone");
|
|
268
|
+
P && P.remove();
|
|
260
269
|
}, []), h = L(() => {
|
|
261
|
-
|
|
270
|
+
d.current = !1, i(!1), s(!1), u(null), o({
|
|
262
271
|
loadedPages: 0,
|
|
263
272
|
totalPages: 0,
|
|
264
273
|
percentage: 0
|
|
265
274
|
});
|
|
266
275
|
}, []), g = () => {
|
|
267
|
-
|
|
268
|
-
},
|
|
269
|
-
scratchCanvas:
|
|
270
|
-
pdfDocument:
|
|
276
|
+
d.current = !0;
|
|
277
|
+
}, w = async ({
|
|
278
|
+
scratchCanvas: P,
|
|
279
|
+
pdfDocument: x,
|
|
271
280
|
pageNumber: p,
|
|
272
|
-
viewerPdfPage:
|
|
281
|
+
viewerPdfPage: T,
|
|
273
282
|
printResolution: C,
|
|
274
|
-
optionalContentConfigPromise:
|
|
275
|
-
printAnnotationStoragePromise:
|
|
283
|
+
optionalContentConfigPromise: S,
|
|
284
|
+
printAnnotationStoragePromise: N
|
|
276
285
|
}) => {
|
|
277
|
-
if (
|
|
286
|
+
if (d.current) {
|
|
278
287
|
h();
|
|
279
288
|
return;
|
|
280
289
|
}
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
const O =
|
|
284
|
-
O.save(), O.fillStyle = "rgb(255, 255, 255)", O.fillRect(0, 0,
|
|
290
|
+
const y = C / hr.PDF;
|
|
291
|
+
P.width = Math.floor(T.width * y), P.height = Math.floor(T.height * y);
|
|
292
|
+
const O = P.getContext("2d");
|
|
293
|
+
O.save(), O.fillStyle = "rgb(255, 255, 255)", O.fillRect(0, 0, P.width, P.height), O.restore();
|
|
285
294
|
const [R, k] = await Promise.all([
|
|
286
|
-
|
|
287
|
-
|
|
295
|
+
x.getPage(p),
|
|
296
|
+
N
|
|
288
297
|
]);
|
|
289
|
-
if (
|
|
298
|
+
if (d.current) {
|
|
290
299
|
h();
|
|
291
300
|
return;
|
|
292
301
|
}
|
|
293
302
|
const z = {
|
|
294
303
|
canvasContext: O,
|
|
295
|
-
transform: [
|
|
296
|
-
viewport: R.getViewport({ scale: 1, rotation:
|
|
304
|
+
transform: [y, 0, 0, y, 0, 0],
|
|
305
|
+
viewport: R.getViewport({ scale: 1, rotation: T.rotation }),
|
|
297
306
|
intent: "print",
|
|
298
|
-
annotationMode:
|
|
299
|
-
optionalContentConfigPromise:
|
|
307
|
+
annotationMode: mr.ENABLE_STORAGE,
|
|
308
|
+
optionalContentConfigPromise: S,
|
|
300
309
|
printAnnotationStorage: k
|
|
301
310
|
};
|
|
302
311
|
try {
|
|
303
312
|
return R.render(z).promise;
|
|
304
|
-
} catch (
|
|
305
|
-
throw
|
|
313
|
+
} catch (I) {
|
|
314
|
+
throw I instanceof fr || console.error(I), I;
|
|
306
315
|
}
|
|
307
|
-
},
|
|
308
|
-
const
|
|
309
|
-
return new Promise((
|
|
310
|
-
const p = (
|
|
316
|
+
}, b = L(() => {
|
|
317
|
+
const P = window.print;
|
|
318
|
+
return new Promise((x) => {
|
|
319
|
+
const p = (S) => {
|
|
311
320
|
setTimeout(() => {
|
|
312
|
-
|
|
321
|
+
P.call(window), setTimeout(() => S(), 20);
|
|
313
322
|
}, 0);
|
|
314
323
|
};
|
|
315
324
|
if (document.querySelector(".rp-print-zone")) {
|
|
316
|
-
p(
|
|
325
|
+
p(x);
|
|
317
326
|
return;
|
|
318
327
|
}
|
|
319
328
|
const C = new MutationObserver(() => {
|
|
320
|
-
document.querySelector(".rp-print-zone") && (p(
|
|
329
|
+
document.querySelector(".rp-print-zone") && (p(x), C.disconnect());
|
|
321
330
|
});
|
|
322
331
|
C.observe(document.body, { childList: !0, subtree: !0 });
|
|
323
332
|
});
|
|
324
|
-
}, []), v = async (
|
|
325
|
-
const
|
|
326
|
-
return p.classList.add("rp-print-page"), await new Promise((
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
URL.revokeObjectURL(
|
|
330
|
-
},
|
|
333
|
+
}, []), v = async (P) => {
|
|
334
|
+
const x = document.createElement("img"), p = document.createElement("div");
|
|
335
|
+
return p.classList.add("rp-print-page"), await new Promise((T, C) => {
|
|
336
|
+
P.toBlob((S) => {
|
|
337
|
+
S ? (x.src = URL.createObjectURL(S), x.onload = () => {
|
|
338
|
+
URL.revokeObjectURL(x.src), T();
|
|
339
|
+
}, x.onerror = C) : C(new Error("Failed to create blob"));
|
|
331
340
|
});
|
|
332
341
|
}).catch(() => {
|
|
333
|
-
}), p.appendChild(
|
|
334
|
-
}, _ = (
|
|
342
|
+
}), p.appendChild(x), p;
|
|
343
|
+
}, _ = (P, x) => {
|
|
335
344
|
const p = document.createElement("div");
|
|
336
345
|
p.classList.add("rp-print-zone");
|
|
337
|
-
const
|
|
346
|
+
const T = document.createElement("style"), C = x.get(1);
|
|
338
347
|
if (C) {
|
|
339
|
-
const { width:
|
|
340
|
-
|
|
348
|
+
const { width: S, height: N } = C == null ? void 0 : C.page.getViewport({ scale: 1 });
|
|
349
|
+
T.innerHTML = `@page { size: ${S}px ${N}px }`;
|
|
341
350
|
}
|
|
342
|
-
return p.appendChild(
|
|
351
|
+
return p.appendChild(T), p.append(...P), p;
|
|
343
352
|
}, m = L(async () => {
|
|
344
353
|
if (!e)
|
|
345
354
|
return;
|
|
346
355
|
h();
|
|
347
|
-
const
|
|
356
|
+
const P = document.createElement("canvas"), x = [];
|
|
348
357
|
try {
|
|
349
358
|
e.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
350
|
-
const
|
|
359
|
+
const T = e.getOptionalContentConfig({ intent: "print" }), C = Promise.resolve(
|
|
351
360
|
e.annotationStorage.print ?? void 0
|
|
352
|
-
),
|
|
353
|
-
for (const [
|
|
354
|
-
if (
|
|
361
|
+
), S = t.size;
|
|
362
|
+
for (const [y, O] of t) {
|
|
363
|
+
if (d.current) {
|
|
355
364
|
h();
|
|
356
365
|
return;
|
|
357
366
|
}
|
|
358
367
|
const R = O.page.getViewport({ scale: 1 });
|
|
359
|
-
if (await
|
|
360
|
-
scratchCanvas:
|
|
368
|
+
if (await w({
|
|
369
|
+
scratchCanvas: P,
|
|
361
370
|
pdfDocument: e,
|
|
362
|
-
pageNumber:
|
|
371
|
+
pageNumber: y,
|
|
363
372
|
viewerPdfPage: R,
|
|
364
373
|
printResolution: 150,
|
|
365
|
-
optionalContentConfigPromise:
|
|
374
|
+
optionalContentConfigPromise: T,
|
|
366
375
|
printAnnotationStoragePromise: C
|
|
367
|
-
}),
|
|
376
|
+
}), d.current) {
|
|
368
377
|
h();
|
|
369
378
|
return;
|
|
370
379
|
}
|
|
371
|
-
const k = await v(
|
|
372
|
-
|
|
373
|
-
const z = parseFloat((
|
|
380
|
+
const k = await v(P);
|
|
381
|
+
x.push(k);
|
|
382
|
+
const z = parseFloat((x.length / S * 100).toFixed(2));
|
|
374
383
|
o({
|
|
375
|
-
loadedPages:
|
|
376
|
-
totalPages:
|
|
384
|
+
loadedPages: y,
|
|
385
|
+
totalPages: S,
|
|
377
386
|
percentage: z
|
|
378
387
|
});
|
|
379
388
|
}
|
|
380
|
-
if (
|
|
389
|
+
if (d.current) {
|
|
381
390
|
h();
|
|
382
391
|
return;
|
|
383
392
|
}
|
|
384
|
-
const
|
|
385
|
-
document.body.appendChild(
|
|
393
|
+
const N = _(x, t);
|
|
394
|
+
document.body.appendChild(N), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), i(!0), await b();
|
|
386
395
|
} catch (p) {
|
|
387
|
-
s(!0), p instanceof Error &&
|
|
396
|
+
s(!0), p instanceof Error && u(p);
|
|
388
397
|
} finally {
|
|
389
|
-
|
|
398
|
+
P.height = 0, P.width = 0;
|
|
390
399
|
}
|
|
391
|
-
}, [e, t,
|
|
400
|
+
}, [e, t, d]);
|
|
392
401
|
return A(() => {
|
|
393
|
-
const
|
|
402
|
+
const P = () => {
|
|
394
403
|
h(), f();
|
|
395
404
|
};
|
|
396
|
-
return window.addEventListener("afterprint",
|
|
397
|
-
window.removeEventListener("afterprint",
|
|
405
|
+
return window.addEventListener("afterprint", P, !0), () => {
|
|
406
|
+
window.removeEventListener("afterprint", P, !0);
|
|
398
407
|
};
|
|
399
408
|
}, [f, h]), {
|
|
400
409
|
print: m,
|
|
@@ -404,7 +413,7 @@ const fo = () => {
|
|
|
404
413
|
isError: c,
|
|
405
414
|
error: l
|
|
406
415
|
};
|
|
407
|
-
},
|
|
416
|
+
}, Tn = Ke({
|
|
408
417
|
print: () => {
|
|
409
418
|
},
|
|
410
419
|
cancel: () => {
|
|
@@ -421,11 +430,11 @@ const fo = () => {
|
|
|
421
430
|
console.error("Error in setOnError callback:", t);
|
|
422
431
|
}
|
|
423
432
|
}
|
|
424
|
-
}),
|
|
425
|
-
const [t, n] = $(null), [o, r] = $(null), { print: i, cancel: c, progress: s, isComplete: l, isError:
|
|
433
|
+
}), Ps = ({ children: e }) => {
|
|
434
|
+
const [t, n] = $(null), [o, r] = $(null), { print: i, cancel: c, progress: s, isComplete: l, isError: u, error: d } = vo(), f = L((v) => {
|
|
426
435
|
v && typeof v == "function" && r(() => v);
|
|
427
436
|
}, []), h = (v) => {
|
|
428
|
-
|
|
437
|
+
d && v(d);
|
|
429
438
|
}, g = L(
|
|
430
439
|
(v) => {
|
|
431
440
|
n(() => v);
|
|
@@ -433,17 +442,17 @@ const fo = () => {
|
|
|
433
442
|
[s, t]
|
|
434
443
|
);
|
|
435
444
|
A(() => {
|
|
436
|
-
l && o &&
|
|
445
|
+
l && o && w();
|
|
437
446
|
}, [l, o]), A(() => {
|
|
438
|
-
|
|
447
|
+
u && h((v) => {
|
|
439
448
|
console.error(v);
|
|
440
449
|
});
|
|
441
|
-
}, [
|
|
450
|
+
}, [u]), A(() => {
|
|
442
451
|
s && t && t(s);
|
|
443
452
|
}, [s, t]);
|
|
444
|
-
const
|
|
453
|
+
const w = () => {
|
|
445
454
|
o && (o(), r(null));
|
|
446
|
-
},
|
|
455
|
+
}, b = {
|
|
447
456
|
print: i,
|
|
448
457
|
cancel: c,
|
|
449
458
|
setOnProgress: g,
|
|
@@ -451,45 +460,45 @@ const fo = () => {
|
|
|
451
460
|
setOnError: h,
|
|
452
461
|
progress: s
|
|
453
462
|
};
|
|
454
|
-
return /* @__PURE__ */ a(
|
|
455
|
-
},
|
|
456
|
-
const e =
|
|
463
|
+
return /* @__PURE__ */ a(Tn.Provider, { value: b, children: e });
|
|
464
|
+
}, nt = () => {
|
|
465
|
+
const e = Xe(Tn);
|
|
457
466
|
if (!e)
|
|
458
467
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
459
468
|
return e;
|
|
460
|
-
},
|
|
461
|
-
const [e, t] = $({}), { pages: n } = K(), { rotate: o } =
|
|
469
|
+
}, _o = () => {
|
|
470
|
+
const [e, t] = $({}), { pages: n } = K(), { rotate: o } = Ye(), r = F(() => Object.keys(e).length, [e]), i = L(
|
|
462
471
|
(s) => {
|
|
463
472
|
if (!n.size || s > n.size)
|
|
464
473
|
return;
|
|
465
474
|
const l = Array.from(n.values()).slice(0, s).map((f) => {
|
|
466
|
-
const { thumbnailViewport: h, scale: g } =
|
|
475
|
+
const { thumbnailViewport: h, scale: g } = Ht(f.page, o);
|
|
467
476
|
return {
|
|
468
477
|
scale: g,
|
|
469
478
|
page: f.page,
|
|
470
479
|
loading: !0,
|
|
471
480
|
viewport: h
|
|
472
481
|
};
|
|
473
|
-
}),
|
|
474
|
-
t(
|
|
475
|
-
const
|
|
482
|
+
}), u = l.reduce((f, h) => (f[h.page.pageNumber] = h, f), {});
|
|
483
|
+
t(u);
|
|
484
|
+
const d = [];
|
|
476
485
|
for (const f of l) {
|
|
477
|
-
const h = document.createElement("canvas"), g =
|
|
486
|
+
const h = document.createElement("canvas"), g = wt(f.page, h, {
|
|
478
487
|
scale: f.scale,
|
|
479
488
|
rotate: o
|
|
480
489
|
}).promise.then(() => {
|
|
481
|
-
const
|
|
490
|
+
const w = h.toDataURL();
|
|
482
491
|
return {
|
|
483
492
|
...f,
|
|
484
|
-
thumbnailSrc:
|
|
493
|
+
thumbnailSrc: w,
|
|
485
494
|
loading: !1
|
|
486
495
|
};
|
|
487
496
|
});
|
|
488
|
-
|
|
497
|
+
d.push(g);
|
|
489
498
|
}
|
|
490
|
-
Promise.all(
|
|
499
|
+
Promise.all(d).then((f) => {
|
|
491
500
|
const h = f.reduce(
|
|
492
|
-
(g,
|
|
501
|
+
(g, w) => (g[w.page.pageNumber] = w, g),
|
|
493
502
|
{}
|
|
494
503
|
);
|
|
495
504
|
t((g) => ({ ...g, ...h }));
|
|
@@ -508,8 +517,8 @@ const fo = () => {
|
|
|
508
517
|
const l = n.get(s);
|
|
509
518
|
if (!l)
|
|
510
519
|
return;
|
|
511
|
-
t((
|
|
512
|
-
...
|
|
520
|
+
t((d) => ({
|
|
521
|
+
...d,
|
|
513
522
|
[s]: {
|
|
514
523
|
loading: !0,
|
|
515
524
|
page: l.page,
|
|
@@ -517,24 +526,24 @@ const fo = () => {
|
|
|
517
526
|
scale: l.thumbnailScale
|
|
518
527
|
}
|
|
519
528
|
}));
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
const
|
|
529
|
+
const u = document.createElement("canvas");
|
|
530
|
+
wt(l.page, u, { scale: l.thumbnailScale, rotate: o }).promise.then(() => {
|
|
531
|
+
const d = u.toDataURL(), { thumbnailViewport: f, scale: h } = Ht(l.page, o);
|
|
523
532
|
return {
|
|
524
533
|
scale: h,
|
|
525
|
-
thumbnailSrc:
|
|
534
|
+
thumbnailSrc: d,
|
|
526
535
|
page: l.page,
|
|
527
536
|
loading: !1,
|
|
528
537
|
viewport: f
|
|
529
538
|
};
|
|
530
|
-
}).then((
|
|
531
|
-
t((f) => ({ ...f, [s]:
|
|
539
|
+
}).then((d) => {
|
|
540
|
+
t((f) => ({ ...f, [s]: d }));
|
|
532
541
|
});
|
|
533
542
|
},
|
|
534
543
|
[n, o]
|
|
535
544
|
);
|
|
536
545
|
return { thumbnailPages: e, addPage: c, addToPage: i, thumbnailLength: r };
|
|
537
|
-
},
|
|
546
|
+
}, Pn = Ke({
|
|
538
547
|
thumbnailPages: {},
|
|
539
548
|
addPage: (e) => {
|
|
540
549
|
},
|
|
@@ -544,45 +553,45 @@ const fo = () => {
|
|
|
544
553
|
setActive: (e) => {
|
|
545
554
|
},
|
|
546
555
|
active: !1
|
|
547
|
-
}),
|
|
556
|
+
}), xn = () => Xe(Pn), xs = ({
|
|
548
557
|
children: e,
|
|
549
558
|
initialThumbnailsVisible: t
|
|
550
559
|
}) => {
|
|
551
|
-
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: i } =
|
|
560
|
+
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: i } = _o(), [c, s] = $(t);
|
|
552
561
|
return /* @__PURE__ */ a(
|
|
553
|
-
|
|
562
|
+
Pn.Provider,
|
|
554
563
|
{
|
|
555
564
|
value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: i, active: c, setActive: s },
|
|
556
565
|
children: e
|
|
557
566
|
}
|
|
558
567
|
);
|
|
559
|
-
},
|
|
560
|
-
const [n, o] = $(t), [r, i] = $(!1), { pdf: c, pages: s } = K(), l =
|
|
568
|
+
}, wo = (e = {}, t = "") => {
|
|
569
|
+
const [n, o] = $(t), [r, i] = $(!1), { pdf: c, pages: s } = K(), l = tt(), u = M(!n), { currentZoom: d } = Je(), [f, h] = $([]), { setFocusedPage: g } = ie(), [w, b] = $(0), { pageScrollElementRef: v, virtualScrollableElementRef: _ } = et(), { scrollMode: m } = Ee(), { pagesRef: P } = Te(), [x, p] = $(null), T = M({}), C = F(() => w === 0 ? null : f[w - 1], [w, f]), S = F(() => f.length, [f]);
|
|
561
570
|
A(() => {
|
|
562
571
|
if (!C || !s)
|
|
563
572
|
return;
|
|
564
573
|
const R = _ || v;
|
|
565
|
-
if (!R || !
|
|
574
|
+
if (!R || !P)
|
|
566
575
|
return;
|
|
567
|
-
const k = s.get(C.page), z =
|
|
568
|
-
let
|
|
569
|
-
m === X.PAGE_SCROLLING && g(C.page), m === X.VERTICAL_SCROLLING && (
|
|
576
|
+
const k = s.get(C.page), z = P.clientHeight / 2, I = P.clientWidth / 2;
|
|
577
|
+
let E = 0, W = 0;
|
|
578
|
+
m === X.PAGE_SCROLLING && g(C.page), m === X.VERTICAL_SCROLLING && (E = l.heights.slice(0, C.page - 1).reduce((j, B) => j + B, 0)), m === X.HORIZONTAL_SCROLLING && (W = l.widths.slice(0, C.page - 1).reduce((j, B) => j + B, 0));
|
|
570
579
|
let V;
|
|
571
580
|
if (!k)
|
|
572
581
|
return;
|
|
573
|
-
const Z =
|
|
574
|
-
V = new
|
|
582
|
+
const Z = T.current[C.page], Y = k.page.getViewport({ scale: 1 });
|
|
583
|
+
V = new Pt.TextLayer({
|
|
575
584
|
viewport: Y,
|
|
576
585
|
textContentSource: Z,
|
|
577
586
|
container: document.createElement("div")
|
|
578
587
|
}), V.render().then(() => {
|
|
579
|
-
const j = V.textDivs[C.start.idx], [B] =
|
|
580
|
-
j.style.position = "absolute", j.style.color = "transparent", ne.style.position = "absolute", ne.style.top = "0", ne.style.setProperty("--scale-factor", `${
|
|
581
|
-
const he = B.element.getBoundingClientRect(), ce = ne.getBoundingClientRect(), Oe = he.top - ce.top,
|
|
588
|
+
const j = V.textDivs[C.start.idx], [B] = pn([C], Z, V.textDivs), te = l.widths[C.page - 1], ae = l.heights[C.page - 1], J = document.createElement("div"), ne = document.createElement("div");
|
|
589
|
+
j.style.position = "absolute", j.style.color = "transparent", ne.style.position = "absolute", ne.style.top = "0", ne.style.setProperty("--scale-factor", `${d}`), J.style.position = "relative", J.style.width = `${te}px`, J.style.height = `${ae}px`, J.style.zIndex = "-1", J.appendChild(j), ne.appendChild(J), P.prepend(ne);
|
|
590
|
+
const he = B.element.getBoundingClientRect(), ce = ne.getBoundingClientRect(), Oe = he.top - ce.top, we = he.left - ce.left, me = E + Oe - z + he.height / 2, le = W + we - I + he.width / 2, De = {
|
|
582
591
|
left: Math.max(le, 0),
|
|
583
592
|
top: Math.max(me, 0)
|
|
584
593
|
};
|
|
585
|
-
|
|
594
|
+
P.removeChild(ne), R.scrollTo({
|
|
586
595
|
...De
|
|
587
596
|
});
|
|
588
597
|
});
|
|
@@ -594,58 +603,58 @@ const fo = () => {
|
|
|
594
603
|
m,
|
|
595
604
|
_,
|
|
596
605
|
v,
|
|
597
|
-
|
|
606
|
+
P
|
|
598
607
|
]);
|
|
599
|
-
const
|
|
600
|
-
|
|
601
|
-
}, [
|
|
602
|
-
|
|
603
|
-
}, [
|
|
608
|
+
const N = L(() => {
|
|
609
|
+
b((R) => S ? R + 1 > S ? 1 : R + 1 : 0);
|
|
610
|
+
}, [S]), y = L(() => {
|
|
611
|
+
b((R) => S ? R - 1 <= 0 ? S : R - 1 : 0);
|
|
612
|
+
}, [S]), O = L(async (R) => {
|
|
604
613
|
if (!R)
|
|
605
614
|
return {};
|
|
606
615
|
const k = R.numPages, z = {};
|
|
607
|
-
for (let
|
|
608
|
-
if (
|
|
616
|
+
for (let I = 1; I <= k; I++) {
|
|
617
|
+
if (u.current)
|
|
609
618
|
throw "close pop over";
|
|
610
|
-
const
|
|
611
|
-
z[
|
|
619
|
+
const E = await R.getPage(I);
|
|
620
|
+
z[I.toString()] = await E.getTextContent();
|
|
612
621
|
}
|
|
613
622
|
return z;
|
|
614
623
|
}, []);
|
|
615
624
|
return A(() => {
|
|
616
625
|
if (!n) {
|
|
617
|
-
|
|
626
|
+
u.current = !0, h([]), b(0);
|
|
618
627
|
return;
|
|
619
628
|
}
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
const z = Object.keys(R).reduce((
|
|
623
|
-
const
|
|
629
|
+
u.current = !1, i(!0), h([]), b(0), O(c).then((R) => {
|
|
630
|
+
T.current = R;
|
|
631
|
+
const z = Object.keys(R).reduce((I, E) => {
|
|
632
|
+
const W = ur(
|
|
624
633
|
[n],
|
|
625
|
-
R[
|
|
626
|
-
Number(
|
|
634
|
+
R[E],
|
|
635
|
+
Number(E) - 1,
|
|
627
636
|
e
|
|
628
|
-
).map((V, Z) => ({ ...V, page: Number(
|
|
629
|
-
return [...
|
|
637
|
+
).map((V, Z) => ({ ...V, page: Number(E), pageMatchIdx: Z }));
|
|
638
|
+
return [...I, ...W];
|
|
630
639
|
}, []);
|
|
631
|
-
h(z),
|
|
640
|
+
h(z), b(z.length ? 1 : 0);
|
|
632
641
|
}).catch(() => {
|
|
633
|
-
h([]),
|
|
642
|
+
h([]), b(0);
|
|
634
643
|
}).finally(() => i(!1));
|
|
635
644
|
}, [n, O, c, e]), {
|
|
636
645
|
search: n,
|
|
637
646
|
setSearch: o,
|
|
638
647
|
loading: r,
|
|
639
648
|
matches: f,
|
|
640
|
-
totalMatches:
|
|
641
|
-
currentMatchPosition:
|
|
649
|
+
totalMatches: S,
|
|
650
|
+
currentMatchPosition: w,
|
|
642
651
|
currentMatch: C,
|
|
643
|
-
nextMatch:
|
|
644
|
-
prevMatch:
|
|
645
|
-
currentMatchElement:
|
|
652
|
+
nextMatch: N,
|
|
653
|
+
prevMatch: y,
|
|
654
|
+
currentMatchElement: x,
|
|
646
655
|
setCurrentMatchElement: p
|
|
647
656
|
};
|
|
648
|
-
},
|
|
657
|
+
}, Sn = Ke({
|
|
649
658
|
search: "",
|
|
650
659
|
setSearch: (e) => {
|
|
651
660
|
},
|
|
@@ -663,7 +672,7 @@ const fo = () => {
|
|
|
663
672
|
currentMatchElement: null,
|
|
664
673
|
setCurrentMatchElement: (e) => {
|
|
665
674
|
}
|
|
666
|
-
}),
|
|
675
|
+
}), Ss = ({
|
|
667
676
|
children: e,
|
|
668
677
|
initialSearch: t
|
|
669
678
|
}) => {
|
|
@@ -673,15 +682,15 @@ const fo = () => {
|
|
|
673
682
|
totalMatches: c,
|
|
674
683
|
currentMatchPosition: s,
|
|
675
684
|
currentMatch: l,
|
|
676
|
-
search:
|
|
677
|
-
matches:
|
|
685
|
+
search: u,
|
|
686
|
+
matches: d,
|
|
678
687
|
nextMatch: f,
|
|
679
688
|
prevMatch: h,
|
|
680
689
|
currentMatchElement: g,
|
|
681
|
-
setCurrentMatchElement:
|
|
682
|
-
} =
|
|
690
|
+
setCurrentMatchElement: w
|
|
691
|
+
} = wo(n, t);
|
|
683
692
|
return /* @__PURE__ */ a(
|
|
684
|
-
|
|
693
|
+
Sn.Provider,
|
|
685
694
|
{
|
|
686
695
|
value: {
|
|
687
696
|
searchOptions: n,
|
|
@@ -693,15 +702,15 @@ const fo = () => {
|
|
|
693
702
|
currentMatch: l,
|
|
694
703
|
nextMatch: f,
|
|
695
704
|
prevMatch: h,
|
|
696
|
-
search:
|
|
697
|
-
matches:
|
|
705
|
+
search: u,
|
|
706
|
+
matches: d,
|
|
698
707
|
currentMatchElement: g,
|
|
699
|
-
setCurrentMatchElement:
|
|
708
|
+
setCurrentMatchElement: w
|
|
700
709
|
},
|
|
701
710
|
children: e
|
|
702
711
|
}
|
|
703
712
|
);
|
|
704
|
-
},
|
|
713
|
+
}, In = () => Xe(Sn), de = {
|
|
705
714
|
"rp-pages": "_rp-pages_1776r_1",
|
|
706
715
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
|
|
707
716
|
"rp-pages-container": "_rp-pages-container_1776r_11",
|
|
@@ -710,49 +719,49 @@ const fo = () => {
|
|
|
710
719
|
"rp-cursor-grab": "_rp-cursor-grab_1776r_27",
|
|
711
720
|
"rp-cursor-grabbing": "_rp-cursor-grabbing_1776r_35",
|
|
712
721
|
"rp-loader": "_rp-loader_1776r_43"
|
|
713
|
-
},
|
|
722
|
+
}, lt = {
|
|
714
723
|
"rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
|
|
715
724
|
"rp-page": "_rp-page_h7a2q_1",
|
|
716
725
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
717
|
-
},
|
|
718
|
-
const { pageNumber: t, onLoaded: n, onLoading: o } = e, r =
|
|
726
|
+
}, bo = (e) => {
|
|
727
|
+
const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = M(null), { pages: i } = K(), { rotate: c } = Ye(), s = M(), { currentZoom: l } = Je();
|
|
719
728
|
return A(() => {
|
|
720
729
|
if (!i || l === 0)
|
|
721
730
|
return;
|
|
722
|
-
const
|
|
723
|
-
if (r.current &&
|
|
724
|
-
const
|
|
725
|
-
|
|
731
|
+
const u = i.get(t);
|
|
732
|
+
if (r.current && u) {
|
|
733
|
+
const d = r.current;
|
|
734
|
+
d.hidden = !0;
|
|
726
735
|
const f = s.current;
|
|
727
|
-
f && f.cancel(), o && o(), s.current =
|
|
736
|
+
f && f.cancel(), o && o(), s.current = wt(u.page, d, {
|
|
728
737
|
scale: l,
|
|
729
738
|
rotate: c,
|
|
730
739
|
renderForms: !0
|
|
731
740
|
}), s.current.promise.then(() => {
|
|
732
|
-
|
|
741
|
+
d.hidden = !1;
|
|
733
742
|
}).catch(() => {
|
|
734
743
|
}).finally(() => {
|
|
735
744
|
n && n();
|
|
736
745
|
});
|
|
737
746
|
}
|
|
738
747
|
return () => {
|
|
739
|
-
var
|
|
740
|
-
(
|
|
748
|
+
var d;
|
|
749
|
+
(d = s.current) == null || d.cancel();
|
|
741
750
|
};
|
|
742
751
|
}, [i, t, c, l, o, n]), /* @__PURE__ */ a("canvas", { "data-rp": `page-${t}-canvas`, ref: r });
|
|
743
|
-
},
|
|
752
|
+
}, dt = {
|
|
744
753
|
"rp-text-layer": "_rp-text-layer_kwwfn_1",
|
|
745
754
|
"rp-text-layer-text": "_rp-text-layer-text_kwwfn_9"
|
|
746
|
-
},
|
|
747
|
-
const { pageNumber: t } = e, { pages: n } = K(), o =
|
|
755
|
+
}, Co = (e) => {
|
|
756
|
+
const { pageNumber: t } = e, { pages: n } = K(), o = M(null), { matches: r, currentMatch: i, setCurrentMatchElement: c } = In(), [s, l] = $(
|
|
748
757
|
[]
|
|
749
|
-
),
|
|
750
|
-
(
|
|
751
|
-
if (v &&
|
|
758
|
+
), u = M(), d = M(), f = M(), h = F(() => r.filter((w) => w.pageIndex === t - 1), [r, t]), g = L(
|
|
759
|
+
(w, b, v = !1) => {
|
|
760
|
+
if (v && hn(w, b), !h.length) {
|
|
752
761
|
f.current = void 0, l([]);
|
|
753
762
|
return;
|
|
754
763
|
}
|
|
755
|
-
const _ =
|
|
764
|
+
const _ = pn(h, w, b);
|
|
756
765
|
l(_);
|
|
757
766
|
},
|
|
758
767
|
[h]
|
|
@@ -761,58 +770,58 @@ const fo = () => {
|
|
|
761
770
|
var v;
|
|
762
771
|
if ((v = f.current) == null || v.classList.remove("selected"), !s.length || !i || i.pageIndex !== t - 1)
|
|
763
772
|
return;
|
|
764
|
-
const
|
|
773
|
+
const w = h.findIndex(
|
|
765
774
|
(_) => JSON.stringify(_) === JSON.stringify(i)
|
|
766
775
|
);
|
|
767
|
-
if (
|
|
776
|
+
if (w === -1)
|
|
768
777
|
return;
|
|
769
|
-
const
|
|
770
|
-
|
|
778
|
+
const b = s.find((_) => _.index === w);
|
|
779
|
+
b && (f.current = b.element, c(b.element), b.element.classList.add("selected"));
|
|
771
780
|
}, [i, s, h]), A(() => {
|
|
772
|
-
const
|
|
773
|
-
if (!
|
|
781
|
+
const w = n.get(t);
|
|
782
|
+
if (!w || !o.current)
|
|
774
783
|
return;
|
|
775
|
-
const
|
|
776
|
-
return
|
|
777
|
-
const _ =
|
|
778
|
-
return
|
|
784
|
+
const b = o.current;
|
|
785
|
+
return u.current && u.current.cancel(), w.page.getTextContent().then((v) => {
|
|
786
|
+
const _ = w.page.getViewport({ scale: 1 });
|
|
787
|
+
return u.current = new Pt.TextLayer({
|
|
779
788
|
viewport: _,
|
|
780
789
|
textContentSource: v,
|
|
781
|
-
container:
|
|
782
|
-
}),
|
|
790
|
+
container: b
|
|
791
|
+
}), d.current = v, b && (b.innerText = ""), u.current.render();
|
|
783
792
|
}).then(() => {
|
|
784
793
|
var m;
|
|
785
|
-
[].slice.call(
|
|
786
|
-
|
|
794
|
+
[].slice.call(b.children).forEach((P) => {
|
|
795
|
+
P.classList.add(dt["rp-text-layer-text"]);
|
|
787
796
|
});
|
|
788
|
-
const _ = (m =
|
|
789
|
-
_ &&
|
|
797
|
+
const _ = (m = u.current) == null ? void 0 : m.textDivs;
|
|
798
|
+
_ && d.current && g(d.current, _);
|
|
790
799
|
}).catch(() => {
|
|
791
800
|
}), () => {
|
|
792
801
|
var v;
|
|
793
|
-
(v =
|
|
802
|
+
(v = u.current) == null || v.cancel();
|
|
794
803
|
};
|
|
795
804
|
}, [n, t]), A(() => {
|
|
796
805
|
var v;
|
|
797
806
|
[].slice.call(o.current.children).forEach((_) => {
|
|
798
|
-
_.classList.add(
|
|
807
|
+
_.classList.add(dt["rp-text-layer-text"]);
|
|
799
808
|
});
|
|
800
|
-
const
|
|
801
|
-
|
|
809
|
+
const b = (v = u.current) == null ? void 0 : v.textDivs;
|
|
810
|
+
b && d.current && g(d.current, b, !0);
|
|
802
811
|
}, [g]), /* @__PURE__ */ a(
|
|
803
812
|
"div",
|
|
804
813
|
{
|
|
805
814
|
"data-rp": `page-${t}-textLayer`,
|
|
806
|
-
className:
|
|
815
|
+
className: dt["rp-text-layer"],
|
|
807
816
|
ref: o
|
|
808
817
|
}
|
|
809
818
|
);
|
|
810
|
-
},
|
|
819
|
+
}, To = {
|
|
811
820
|
"rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
|
|
812
821
|
};
|
|
813
|
-
let
|
|
814
|
-
const
|
|
815
|
-
const { pageNumber: t } = e, n =
|
|
822
|
+
let Po = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
823
|
+
const xo = (e) => {
|
|
824
|
+
const { pageNumber: t } = e, n = M(null), { pages: o, pdf: r } = K(), i = M(), [c, s] = $(), { setFocusedPage: l, goToPage: u } = ie(), { scrollMode: d } = Ee(), { print: f } = nt(), { download: h } = Un(), g = F(() => o.get(t), [o, t]), w = F(() => g == null ? void 0 : g.page.getViewport(), [g]);
|
|
816
825
|
A(() => {
|
|
817
826
|
i.current && (i.current.div.replaceChildren(), i.current = void 0);
|
|
818
827
|
}, [r]), A(() => {
|
|
@@ -820,14 +829,14 @@ const To = (e) => {
|
|
|
820
829
|
i.current = void 0, s(v), n.current && (n.current.innerText = "");
|
|
821
830
|
});
|
|
822
831
|
}, [g]);
|
|
823
|
-
const
|
|
832
|
+
const b = L(
|
|
824
833
|
(v) => {
|
|
825
|
-
!c || !r || (
|
|
826
|
-
var m,
|
|
827
|
-
((m = _ == null ? void 0 : _.data) == null ? void 0 : m.action) === "Print" ? f() : ((
|
|
828
|
-
}),
|
|
834
|
+
!c || !r || (Nr(v), Er(v, r, c).then((_) => {
|
|
835
|
+
var m, P;
|
|
836
|
+
((m = _ == null ? void 0 : _.data) == null ? void 0 : m.action) === "Print" ? f() : ((P = _ == null ? void 0 : _.data) == null ? void 0 : P.action) === "SaveAs" && h();
|
|
837
|
+
}), d === X.PAGE_SCROLLING ? Mt(v, c, r, (_) => l(_.pageIndex + 1)) : Mt(v, c, r, (_) => u(_.pageIndex + 1)));
|
|
829
838
|
},
|
|
830
|
-
[r, c,
|
|
839
|
+
[r, c, u, l, d, f, h]
|
|
831
840
|
);
|
|
832
841
|
return A(() => {
|
|
833
842
|
if (!g || !c)
|
|
@@ -840,21 +849,21 @@ const To = (e) => {
|
|
|
840
849
|
return;
|
|
841
850
|
}
|
|
842
851
|
const _ = /* @__PURE__ */ new Map([]);
|
|
843
|
-
for (const
|
|
844
|
-
const { annotationType: p } =
|
|
852
|
+
for (const x of c) {
|
|
853
|
+
const { annotationType: p } = x;
|
|
845
854
|
switch (p) {
|
|
846
|
-
case
|
|
847
|
-
|
|
855
|
+
case kt.Link:
|
|
856
|
+
Dr(x);
|
|
848
857
|
break;
|
|
849
|
-
case
|
|
850
|
-
|
|
858
|
+
case kt.Widget:
|
|
859
|
+
Or(x, v, _);
|
|
851
860
|
break;
|
|
852
861
|
}
|
|
853
862
|
}
|
|
854
863
|
const m = new AbortController();
|
|
855
864
|
return (async () => {
|
|
856
|
-
var
|
|
857
|
-
i.current && (i.current.div.replaceChildren(), i.current = void 0), n.current && (n.current.innerText = ""), i.current = new
|
|
865
|
+
var T;
|
|
866
|
+
i.current && (i.current.div.replaceChildren(), i.current = void 0), n.current && (n.current.innerText = ""), i.current = new gr({
|
|
858
867
|
div: n.current,
|
|
859
868
|
accessibilityManager: void 0,
|
|
860
869
|
annotationCanvasMap: void 0,
|
|
@@ -862,48 +871,48 @@ const To = (e) => {
|
|
|
862
871
|
structTreeLayer: null,
|
|
863
872
|
page: g.page,
|
|
864
873
|
viewport: v.clone({ dontFlip: !0 })
|
|
865
|
-
}), n.current &&
|
|
866
|
-
const
|
|
874
|
+
}), n.current && Wt(n.current, b);
|
|
875
|
+
const x = await (r == null ? void 0 : r.hasJSActions()), p = await (r == null ? void 0 : r.getFieldObjects());
|
|
867
876
|
if (m.signal.aborted)
|
|
868
877
|
throw "abort";
|
|
869
|
-
return (
|
|
878
|
+
return (T = i.current) == null ? void 0 : T.render({
|
|
870
879
|
annotations: c,
|
|
871
880
|
annotationStorage: r == null ? void 0 : r.annotationStorage,
|
|
872
|
-
hasJSActions:
|
|
881
|
+
hasJSActions: x,
|
|
873
882
|
fieldObjects: p,
|
|
874
883
|
div: n.current,
|
|
875
884
|
viewport: v.clone({ dontFlip: !0 }),
|
|
876
885
|
page: g.page,
|
|
877
|
-
imageResourcesPath:
|
|
886
|
+
imageResourcesPath: Po,
|
|
878
887
|
renderForms: !0,
|
|
879
|
-
linkService: new
|
|
888
|
+
linkService: new Rr(),
|
|
880
889
|
downloadManager: null,
|
|
881
890
|
enableScripting: !1
|
|
882
891
|
});
|
|
883
892
|
})().then(() => {
|
|
884
|
-
n.current &&
|
|
885
|
-
}).catch((
|
|
886
|
-
if (
|
|
887
|
-
throw
|
|
893
|
+
n.current && zr(n.current, b);
|
|
894
|
+
}).catch((x) => {
|
|
895
|
+
if (x !== "abort")
|
|
896
|
+
throw x;
|
|
888
897
|
}), () => {
|
|
889
|
-
m.abort("clear"), n.current &&
|
|
898
|
+
m.abort("clear"), n.current && Wt(n.current, b);
|
|
890
899
|
};
|
|
891
|
-
}, [r, c,
|
|
900
|
+
}, [r, c, b]), /* @__PURE__ */ a(
|
|
892
901
|
"div",
|
|
893
902
|
{
|
|
894
903
|
"data-rp": `page-${t}-annotationLayer`,
|
|
895
|
-
style: { width: `${
|
|
896
|
-
className:
|
|
904
|
+
style: { width: `${w == null ? void 0 : w.width}px`, height: `${w == null ? void 0 : w.height}px` },
|
|
905
|
+
className: To["rp-annotation-layer"],
|
|
897
906
|
ref: n
|
|
898
907
|
}
|
|
899
908
|
);
|
|
900
|
-
},
|
|
909
|
+
}, ut = {
|
|
901
910
|
"rp-text-highlight-layer": "_rp-text-highlight-layer_1470i_1",
|
|
902
911
|
"rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1470i_9"
|
|
903
|
-
},
|
|
904
|
-
const t =
|
|
905
|
-
(l,
|
|
906
|
-
|
|
912
|
+
}, So = ({ pageNumber: e }) => {
|
|
913
|
+
const t = M(null), n = M(), o = M(), { pages: r } = K(), { highlightMatches: i } = vr(), c = F(() => i.filter((u) => u.pageIndex === e - 1), [i]), s = L(
|
|
914
|
+
(l, u, d = !1) => {
|
|
915
|
+
d && hn(l, u), pr(c, l, u);
|
|
907
916
|
},
|
|
908
917
|
[c, r, e]
|
|
909
918
|
);
|
|
@@ -911,53 +920,53 @@ const To = (e) => {
|
|
|
911
920
|
const l = r.get(e);
|
|
912
921
|
if (!l || !t.current)
|
|
913
922
|
return;
|
|
914
|
-
const
|
|
915
|
-
return n.current && n.current.cancel(), l.page.getTextContent().then((
|
|
923
|
+
const u = t.current;
|
|
924
|
+
return n.current && n.current.cancel(), l.page.getTextContent().then((d) => {
|
|
916
925
|
const f = l.page.getViewport({ scale: 1 });
|
|
917
|
-
return n.current = new
|
|
926
|
+
return n.current = new Pt.TextLayer({
|
|
918
927
|
viewport: f,
|
|
919
|
-
textContentSource:
|
|
920
|
-
container:
|
|
921
|
-
}), o.current =
|
|
928
|
+
textContentSource: d,
|
|
929
|
+
container: u
|
|
930
|
+
}), o.current = d, u && (u.innerText = ""), n.current.render();
|
|
922
931
|
}).then(() => {
|
|
923
932
|
var h;
|
|
924
|
-
[].slice.call(
|
|
925
|
-
g.classList.add(
|
|
933
|
+
[].slice.call(u.children).forEach((g) => {
|
|
934
|
+
g.classList.add(ut["rp-text-highlight-layer-text"]);
|
|
926
935
|
});
|
|
927
936
|
const f = (h = n.current) == null ? void 0 : h.textDivs;
|
|
928
937
|
f && o.current && s(o.current, f);
|
|
929
938
|
}).catch(() => {
|
|
930
939
|
}), () => {
|
|
931
|
-
var
|
|
932
|
-
(
|
|
940
|
+
var d;
|
|
941
|
+
(d = n.current) == null || d.cancel();
|
|
933
942
|
};
|
|
934
943
|
}, [r, e]), A(() => {
|
|
935
|
-
var
|
|
944
|
+
var d;
|
|
936
945
|
[].slice.call(t.current.children).forEach((f) => {
|
|
937
|
-
f.classList.add(
|
|
946
|
+
f.classList.add(ut["rp-text-highlight-layer-text"]);
|
|
938
947
|
});
|
|
939
|
-
const
|
|
940
|
-
|
|
941
|
-
}, [s]), /* @__PURE__ */ a(
|
|
948
|
+
const u = (d = n.current) == null ? void 0 : d.textDivs;
|
|
949
|
+
u && o.current && s(o.current, u, !0);
|
|
950
|
+
}, [s]), /* @__PURE__ */ a(Se, { children: /* @__PURE__ */ a(
|
|
942
951
|
"div",
|
|
943
952
|
{
|
|
944
953
|
"data-rp": `page-${e}-textHighlightLayer`,
|
|
945
|
-
className:
|
|
954
|
+
className: ut["rp-text-highlight-layer"],
|
|
946
955
|
ref: t
|
|
947
956
|
}
|
|
948
957
|
) });
|
|
949
|
-
},
|
|
950
|
-
const { pageNumber: n, style: o, ...r } = e, { pages: i } = K(), { rotate: c } =
|
|
958
|
+
}, Nt = We((e, t) => {
|
|
959
|
+
const { pageNumber: n, style: o, ...r } = e, { pages: i } = K(), { rotate: c } = Ye(), { textLayer: s } = sr(), { currentZoom: l } = Je(), u = M(i.get(n)), [d, f] = $(!1), h = M(null), [g, w] = $({
|
|
951
960
|
width: 0,
|
|
952
961
|
height: 0
|
|
953
962
|
});
|
|
954
|
-
|
|
955
|
-
if (i && (
|
|
956
|
-
const m =
|
|
957
|
-
|
|
963
|
+
ln(t, () => h.current), A(() => {
|
|
964
|
+
if (i && (u.current = i.get(n), u.current)) {
|
|
965
|
+
const m = u.current.page.getViewport({ scale: l, rotation: c });
|
|
966
|
+
w(m);
|
|
958
967
|
}
|
|
959
968
|
}, [i, n, c, l]);
|
|
960
|
-
const
|
|
969
|
+
const b = F(() => {
|
|
961
970
|
switch (c) {
|
|
962
971
|
case 90:
|
|
963
972
|
return `${g.width / 2}px ${g.width / 2}px`;
|
|
@@ -982,10 +991,10 @@ const To = (e) => {
|
|
|
982
991
|
style: {
|
|
983
992
|
...o,
|
|
984
993
|
"--rp-rotate": `${c}deg`,
|
|
985
|
-
"--rp-page-rotate-translate": `${
|
|
994
|
+
"--rp-page-rotate-translate": `${b}`,
|
|
986
995
|
"--scale-factor": l
|
|
987
996
|
},
|
|
988
|
-
className:
|
|
997
|
+
className: lt["rp-page-wrapper"],
|
|
989
998
|
children: /* @__PURE__ */ D(
|
|
990
999
|
"div",
|
|
991
1000
|
{
|
|
@@ -993,48 +1002,48 @@ const To = (e) => {
|
|
|
993
1002
|
width: `${g.width}px`,
|
|
994
1003
|
height: `${g.height}px`
|
|
995
1004
|
},
|
|
996
|
-
className:
|
|
1005
|
+
className: lt["rp-page"],
|
|
997
1006
|
children: [
|
|
998
|
-
/* @__PURE__ */ a(
|
|
999
|
-
|
|
1000
|
-
s && /* @__PURE__ */ a(
|
|
1001
|
-
/* @__PURE__ */ a(
|
|
1002
|
-
/* @__PURE__ */ a(
|
|
1007
|
+
/* @__PURE__ */ a(bo, { onLoading: v, onLoaded: _, pageNumber: n }),
|
|
1008
|
+
d && /* @__PURE__ */ a("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ a(St, {}) }),
|
|
1009
|
+
s && /* @__PURE__ */ a(Co, { pageNumber: n }),
|
|
1010
|
+
/* @__PURE__ */ a(So, { pageNumber: n }),
|
|
1011
|
+
/* @__PURE__ */ a(xo, { pageNumber: n })
|
|
1003
1012
|
]
|
|
1004
1013
|
}
|
|
1005
1014
|
)
|
|
1006
1015
|
}
|
|
1007
1016
|
);
|
|
1008
1017
|
});
|
|
1009
|
-
function
|
|
1018
|
+
function qt(e) {
|
|
1010
1019
|
if (e === void 0)
|
|
1011
1020
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1012
1021
|
return e;
|
|
1013
1022
|
}
|
|
1014
|
-
function
|
|
1015
|
-
return
|
|
1023
|
+
function bt(e, t) {
|
|
1024
|
+
return bt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
|
|
1016
1025
|
return n.__proto__ = o, n;
|
|
1017
|
-
},
|
|
1026
|
+
}, bt(e, t);
|
|
1018
1027
|
}
|
|
1019
|
-
function
|
|
1020
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
1028
|
+
function Io(e, t) {
|
|
1029
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, bt(e, t);
|
|
1021
1030
|
}
|
|
1022
|
-
var
|
|
1031
|
+
var Zt = Number.isNaN || function(t) {
|
|
1023
1032
|
return typeof t == "number" && t !== t;
|
|
1024
1033
|
};
|
|
1025
|
-
function
|
|
1026
|
-
return !!(e === t ||
|
|
1034
|
+
function yo(e, t) {
|
|
1035
|
+
return !!(e === t || Zt(e) && Zt(t));
|
|
1027
1036
|
}
|
|
1028
|
-
function
|
|
1037
|
+
function Lo(e, t) {
|
|
1029
1038
|
if (e.length !== t.length)
|
|
1030
1039
|
return !1;
|
|
1031
1040
|
for (var n = 0; n < e.length; n++)
|
|
1032
|
-
if (!
|
|
1041
|
+
if (!yo(e[n], t[n]))
|
|
1033
1042
|
return !1;
|
|
1034
1043
|
return !0;
|
|
1035
1044
|
}
|
|
1036
|
-
function
|
|
1037
|
-
t === void 0 && (t =
|
|
1045
|
+
function pt(e, t) {
|
|
1046
|
+
t === void 0 && (t = Lo);
|
|
1038
1047
|
var n, o = [], r, i = !1;
|
|
1039
1048
|
function c() {
|
|
1040
1049
|
for (var s = [], l = 0; l < arguments.length; l++)
|
|
@@ -1043,7 +1052,7 @@ function dt(e, t) {
|
|
|
1043
1052
|
}
|
|
1044
1053
|
return c;
|
|
1045
1054
|
}
|
|
1046
|
-
function
|
|
1055
|
+
function Bt(e, t) {
|
|
1047
1056
|
if (e == null)
|
|
1048
1057
|
return {};
|
|
1049
1058
|
var n = {};
|
|
@@ -1055,34 +1064,34 @@ function qt(e, t) {
|
|
|
1055
1064
|
}
|
|
1056
1065
|
return n;
|
|
1057
1066
|
}
|
|
1058
|
-
var
|
|
1067
|
+
var Ro = typeof performance == "object" && typeof performance.now == "function", jt = Ro ? function() {
|
|
1059
1068
|
return performance.now();
|
|
1060
1069
|
} : function() {
|
|
1061
1070
|
return Date.now();
|
|
1062
1071
|
};
|
|
1063
|
-
function
|
|
1072
|
+
function Kt(e) {
|
|
1064
1073
|
cancelAnimationFrame(e.id);
|
|
1065
1074
|
}
|
|
1066
|
-
function
|
|
1067
|
-
var n =
|
|
1075
|
+
function No(e, t) {
|
|
1076
|
+
var n = jt();
|
|
1068
1077
|
function o() {
|
|
1069
|
-
|
|
1078
|
+
jt() - n >= t ? e.call(null) : r.id = requestAnimationFrame(o);
|
|
1070
1079
|
}
|
|
1071
1080
|
var r = {
|
|
1072
1081
|
id: requestAnimationFrame(o)
|
|
1073
1082
|
};
|
|
1074
1083
|
return r;
|
|
1075
1084
|
}
|
|
1076
|
-
var
|
|
1077
|
-
function
|
|
1078
|
-
if (e === void 0 && (e = !1),
|
|
1085
|
+
var ht = -1;
|
|
1086
|
+
function Eo(e) {
|
|
1087
|
+
if (e === void 0 && (e = !1), ht === -1 || e) {
|
|
1079
1088
|
var t = document.createElement("div"), n = t.style;
|
|
1080
|
-
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t),
|
|
1089
|
+
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), ht = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
1081
1090
|
}
|
|
1082
|
-
return
|
|
1091
|
+
return ht;
|
|
1083
1092
|
}
|
|
1084
1093
|
var Le = null;
|
|
1085
|
-
function
|
|
1094
|
+
function Xt(e) {
|
|
1086
1095
|
if (e === void 0 && (e = !1), Le === null || e) {
|
|
1087
1096
|
var t = document.createElement("div"), n = t.style;
|
|
1088
1097
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
@@ -1091,95 +1100,95 @@ function jt(e) {
|
|
|
1091
1100
|
}
|
|
1092
1101
|
return Le;
|
|
1093
1102
|
}
|
|
1094
|
-
var
|
|
1103
|
+
var Oo = 150, Do = function(t) {
|
|
1095
1104
|
var n = t.columnIndex;
|
|
1096
1105
|
t.data;
|
|
1097
1106
|
var o = t.rowIndex;
|
|
1098
1107
|
return o + ":" + n;
|
|
1099
|
-
},
|
|
1100
|
-
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (
|
|
1101
|
-
function
|
|
1102
|
-
var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, i = e.getColumnWidth, c = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, l = e.getOffsetForColumnAndAlignment,
|
|
1108
|
+
}, Ve = null, Ue = null, qe = null;
|
|
1109
|
+
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ve = /* @__PURE__ */ new WeakSet(), Ue = /* @__PURE__ */ new WeakSet(), qe = /* @__PURE__ */ new WeakSet());
|
|
1110
|
+
function zo(e) {
|
|
1111
|
+
var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, i = e.getColumnWidth, c = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, l = e.getOffsetForColumnAndAlignment, u = e.getOffsetForRowAndAlignment, d = e.getRowHeight, f = e.getRowOffset, h = e.getRowStartIndexForOffset, g = e.getRowStopIndexForStartIndex, w = e.initInstanceProps, b = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
|
|
1103
1112
|
return t = /* @__PURE__ */ function(_) {
|
|
1104
|
-
|
|
1105
|
-
function m(
|
|
1113
|
+
Io(m, _);
|
|
1114
|
+
function m(x) {
|
|
1106
1115
|
var p;
|
|
1107
|
-
return p = _.call(this,
|
|
1108
|
-
instance:
|
|
1116
|
+
return p = _.call(this, x) || this, p._instanceProps = w(p.props, qt(p)), p._resetIsScrollingTimeoutId = null, p._outerRef = void 0, p.state = {
|
|
1117
|
+
instance: qt(p),
|
|
1109
1118
|
isScrolling: !1,
|
|
1110
1119
|
horizontalScrollDirection: "forward",
|
|
1111
1120
|
scrollLeft: typeof p.props.initialScrollLeft == "number" ? p.props.initialScrollLeft : 0,
|
|
1112
1121
|
scrollTop: typeof p.props.initialScrollTop == "number" ? p.props.initialScrollTop : 0,
|
|
1113
1122
|
scrollUpdateWasRequested: !1,
|
|
1114
1123
|
verticalScrollDirection: "forward"
|
|
1115
|
-
}, p._callOnItemsRendered = void 0, p._callOnItemsRendered =
|
|
1124
|
+
}, p._callOnItemsRendered = void 0, p._callOnItemsRendered = pt(function(T, C, S, N, y, O, R, k) {
|
|
1116
1125
|
return p.props.onItemsRendered({
|
|
1117
|
-
overscanColumnStartIndex:
|
|
1126
|
+
overscanColumnStartIndex: T,
|
|
1118
1127
|
overscanColumnStopIndex: C,
|
|
1119
|
-
overscanRowStartIndex:
|
|
1120
|
-
overscanRowStopIndex:
|
|
1121
|
-
visibleColumnStartIndex:
|
|
1128
|
+
overscanRowStartIndex: S,
|
|
1129
|
+
overscanRowStopIndex: N,
|
|
1130
|
+
visibleColumnStartIndex: y,
|
|
1122
1131
|
visibleColumnStopIndex: O,
|
|
1123
1132
|
visibleRowStartIndex: R,
|
|
1124
1133
|
visibleRowStopIndex: k
|
|
1125
1134
|
});
|
|
1126
|
-
}), p._callOnScroll = void 0, p._callOnScroll =
|
|
1135
|
+
}), p._callOnScroll = void 0, p._callOnScroll = pt(function(T, C, S, N, y) {
|
|
1127
1136
|
return p.props.onScroll({
|
|
1128
|
-
horizontalScrollDirection:
|
|
1129
|
-
scrollLeft:
|
|
1137
|
+
horizontalScrollDirection: S,
|
|
1138
|
+
scrollLeft: T,
|
|
1130
1139
|
scrollTop: C,
|
|
1131
|
-
verticalScrollDirection:
|
|
1132
|
-
scrollUpdateWasRequested:
|
|
1140
|
+
verticalScrollDirection: N,
|
|
1141
|
+
scrollUpdateWasRequested: y
|
|
1133
1142
|
});
|
|
1134
|
-
}), p._getItemStyle = void 0, p._getItemStyle = function(
|
|
1135
|
-
var
|
|
1143
|
+
}), p._getItemStyle = void 0, p._getItemStyle = function(T, C) {
|
|
1144
|
+
var S = p.props, N = S.columnWidth, y = S.direction, O = S.rowHeight, R = p._getItemStyleCache(b && N, b && y, b && O), k = T + ":" + C, z;
|
|
1136
1145
|
if (R.hasOwnProperty(k))
|
|
1137
1146
|
z = R[k];
|
|
1138
1147
|
else {
|
|
1139
|
-
var
|
|
1148
|
+
var I = n(p.props, C, p._instanceProps), E = y === "rtl";
|
|
1140
1149
|
R[k] = z = {
|
|
1141
1150
|
position: "absolute",
|
|
1142
|
-
left:
|
|
1143
|
-
right:
|
|
1144
|
-
top: f(p.props,
|
|
1145
|
-
height:
|
|
1151
|
+
left: E ? void 0 : I,
|
|
1152
|
+
right: E ? I : void 0,
|
|
1153
|
+
top: f(p.props, T, p._instanceProps),
|
|
1154
|
+
height: d(p.props, T, p._instanceProps),
|
|
1146
1155
|
width: i(p.props, C, p._instanceProps)
|
|
1147
1156
|
};
|
|
1148
1157
|
}
|
|
1149
1158
|
return z;
|
|
1150
|
-
}, p._getItemStyleCache = void 0, p._getItemStyleCache =
|
|
1159
|
+
}, p._getItemStyleCache = void 0, p._getItemStyleCache = pt(function(T, C, S) {
|
|
1151
1160
|
return {};
|
|
1152
|
-
}), p._onScroll = function(
|
|
1153
|
-
var C =
|
|
1161
|
+
}), p._onScroll = function(T) {
|
|
1162
|
+
var C = T.currentTarget, S = C.clientHeight, N = C.clientWidth, y = C.scrollLeft, O = C.scrollTop, R = C.scrollHeight, k = C.scrollWidth;
|
|
1154
1163
|
p.setState(function(z) {
|
|
1155
|
-
if (z.scrollLeft ===
|
|
1164
|
+
if (z.scrollLeft === y && z.scrollTop === O)
|
|
1156
1165
|
return null;
|
|
1157
|
-
var
|
|
1158
|
-
if (
|
|
1159
|
-
switch (
|
|
1166
|
+
var I = p.props.direction, E = y;
|
|
1167
|
+
if (I === "rtl")
|
|
1168
|
+
switch (Xt()) {
|
|
1160
1169
|
case "negative":
|
|
1161
|
-
|
|
1170
|
+
E = -y;
|
|
1162
1171
|
break;
|
|
1163
1172
|
case "positive-descending":
|
|
1164
|
-
|
|
1173
|
+
E = k - N - y;
|
|
1165
1174
|
break;
|
|
1166
1175
|
}
|
|
1167
|
-
|
|
1168
|
-
var
|
|
1176
|
+
E = Math.max(0, Math.min(E, k - N));
|
|
1177
|
+
var W = Math.max(0, Math.min(O, R - S));
|
|
1169
1178
|
return {
|
|
1170
1179
|
isScrolling: !0,
|
|
1171
|
-
horizontalScrollDirection: z.scrollLeft <
|
|
1172
|
-
scrollLeft:
|
|
1173
|
-
scrollTop:
|
|
1180
|
+
horizontalScrollDirection: z.scrollLeft < y ? "forward" : "backward",
|
|
1181
|
+
scrollLeft: E,
|
|
1182
|
+
scrollTop: W,
|
|
1174
1183
|
verticalScrollDirection: z.scrollTop < O ? "forward" : "backward",
|
|
1175
1184
|
scrollUpdateWasRequested: !1
|
|
1176
1185
|
};
|
|
1177
1186
|
}, p._resetIsScrollingDebounced);
|
|
1178
|
-
}, p._outerRefSetter = function(
|
|
1187
|
+
}, p._outerRefSetter = function(T) {
|
|
1179
1188
|
var C = p.props.outerRef;
|
|
1180
|
-
p._outerRef =
|
|
1189
|
+
p._outerRef = T, typeof C == "function" ? C(T) : C != null && typeof C == "object" && C.hasOwnProperty("current") && (C.current = T);
|
|
1181
1190
|
}, p._resetIsScrollingDebounced = function() {
|
|
1182
|
-
p._resetIsScrollingTimeoutId !== null &&
|
|
1191
|
+
p._resetIsScrollingTimeoutId !== null && Kt(p._resetIsScrollingTimeoutId), p._resetIsScrollingTimeoutId = No(p._resetIsScrolling, Oo);
|
|
1183
1192
|
}, p._resetIsScrolling = function() {
|
|
1184
1193
|
p._resetIsScrollingTimeoutId = null, p.setState({
|
|
1185
1194
|
isScrolling: !1
|
|
@@ -1188,70 +1197,70 @@ function Oo(e) {
|
|
|
1188
1197
|
});
|
|
1189
1198
|
}, p;
|
|
1190
1199
|
}
|
|
1191
|
-
m.getDerivedStateFromProps = function(p,
|
|
1192
|
-
return
|
|
1200
|
+
m.getDerivedStateFromProps = function(p, T) {
|
|
1201
|
+
return Ao(p, T), v(p), null;
|
|
1193
1202
|
};
|
|
1194
|
-
var
|
|
1195
|
-
return
|
|
1196
|
-
var
|
|
1197
|
-
|
|
1198
|
-
return
|
|
1199
|
-
horizontalScrollDirection:
|
|
1200
|
-
scrollLeft:
|
|
1203
|
+
var P = m.prototype;
|
|
1204
|
+
return P.scrollTo = function(p) {
|
|
1205
|
+
var T = p.scrollLeft, C = p.scrollTop;
|
|
1206
|
+
T !== void 0 && (T = Math.max(0, T)), C !== void 0 && (C = Math.max(0, C)), this.setState(function(S) {
|
|
1207
|
+
return T === void 0 && (T = S.scrollLeft), C === void 0 && (C = S.scrollTop), S.scrollLeft === T && S.scrollTop === C ? null : {
|
|
1208
|
+
horizontalScrollDirection: S.scrollLeft < T ? "forward" : "backward",
|
|
1209
|
+
scrollLeft: T,
|
|
1201
1210
|
scrollTop: C,
|
|
1202
1211
|
scrollUpdateWasRequested: !0,
|
|
1203
|
-
verticalScrollDirection:
|
|
1212
|
+
verticalScrollDirection: S.scrollTop < C ? "forward" : "backward"
|
|
1204
1213
|
};
|
|
1205
1214
|
}, this._resetIsScrollingDebounced);
|
|
1206
|
-
},
|
|
1207
|
-
var
|
|
1208
|
-
|
|
1215
|
+
}, P.scrollToItem = function(p) {
|
|
1216
|
+
var T = p.align, C = T === void 0 ? "auto" : T, S = p.columnIndex, N = p.rowIndex, y = this.props, O = y.columnCount, R = y.height, k = y.rowCount, z = y.width, I = this.state, E = I.scrollLeft, W = I.scrollTop, V = Eo();
|
|
1217
|
+
S !== void 0 && (S = Math.max(0, Math.min(S, O - 1))), N !== void 0 && (N = Math.max(0, Math.min(N, k - 1)));
|
|
1209
1218
|
var Z = c(this.props, this._instanceProps), Y = s(this.props, this._instanceProps), j = Y > z ? V : 0, B = Z > R ? V : 0;
|
|
1210
1219
|
this.scrollTo({
|
|
1211
|
-
scrollLeft:
|
|
1212
|
-
scrollTop:
|
|
1220
|
+
scrollLeft: S !== void 0 ? l(this.props, S, C, E, this._instanceProps, B) : E,
|
|
1221
|
+
scrollTop: N !== void 0 ? u(this.props, N, C, W, this._instanceProps, j) : W
|
|
1213
1222
|
});
|
|
1214
|
-
},
|
|
1215
|
-
var p = this.props,
|
|
1223
|
+
}, P.componentDidMount = function() {
|
|
1224
|
+
var p = this.props, T = p.initialScrollLeft, C = p.initialScrollTop;
|
|
1216
1225
|
if (this._outerRef != null) {
|
|
1217
|
-
var
|
|
1218
|
-
typeof
|
|
1226
|
+
var S = this._outerRef;
|
|
1227
|
+
typeof T == "number" && (S.scrollLeft = T), typeof C == "number" && (S.scrollTop = C);
|
|
1219
1228
|
}
|
|
1220
1229
|
this._callPropsCallbacks();
|
|
1221
|
-
},
|
|
1222
|
-
var p = this.props.direction,
|
|
1223
|
-
if (
|
|
1224
|
-
var
|
|
1230
|
+
}, P.componentDidUpdate = function() {
|
|
1231
|
+
var p = this.props.direction, T = this.state, C = T.scrollLeft, S = T.scrollTop, N = T.scrollUpdateWasRequested;
|
|
1232
|
+
if (N && this._outerRef != null) {
|
|
1233
|
+
var y = this._outerRef;
|
|
1225
1234
|
if (p === "rtl")
|
|
1226
|
-
switch (
|
|
1235
|
+
switch (Xt()) {
|
|
1227
1236
|
case "negative":
|
|
1228
|
-
|
|
1237
|
+
y.scrollLeft = -C;
|
|
1229
1238
|
break;
|
|
1230
1239
|
case "positive-ascending":
|
|
1231
|
-
|
|
1240
|
+
y.scrollLeft = C;
|
|
1232
1241
|
break;
|
|
1233
1242
|
default:
|
|
1234
|
-
var O =
|
|
1235
|
-
|
|
1243
|
+
var O = y.clientWidth, R = y.scrollWidth;
|
|
1244
|
+
y.scrollLeft = R - O - C;
|
|
1236
1245
|
break;
|
|
1237
1246
|
}
|
|
1238
1247
|
else
|
|
1239
|
-
|
|
1240
|
-
|
|
1248
|
+
y.scrollLeft = Math.max(0, C);
|
|
1249
|
+
y.scrollTop = Math.max(0, S);
|
|
1241
1250
|
}
|
|
1242
1251
|
this._callPropsCallbacks();
|
|
1243
|
-
},
|
|
1244
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
1245
|
-
},
|
|
1246
|
-
var p = this.props,
|
|
1247
|
-
if (
|
|
1252
|
+
}, P.componentWillUnmount = function() {
|
|
1253
|
+
this._resetIsScrollingTimeoutId !== null && Kt(this._resetIsScrollingTimeoutId);
|
|
1254
|
+
}, P.render = function() {
|
|
1255
|
+
var p = this.props, T = p.children, C = p.className, S = p.columnCount, N = p.direction, y = p.height, O = p.innerRef, R = p.innerElementType, k = p.innerTagName, z = p.itemData, I = p.itemKey, E = I === void 0 ? Do : I, W = p.outerElementType, V = p.outerTagName, Z = p.rowCount, Y = p.style, j = p.useIsScrolling, B = p.width, te = this.state.isScrolling, ae = this._getHorizontalRangeToRender(), J = ae[0], ne = ae[1], he = this._getVerticalRangeToRender(), ce = he[0], Oe = he[1], we = [];
|
|
1256
|
+
if (S > 0 && Z)
|
|
1248
1257
|
for (var me = ce; me <= Oe; me++)
|
|
1249
1258
|
for (var le = J; le <= ne; le++)
|
|
1250
|
-
|
|
1259
|
+
we.push(Ge(T, {
|
|
1251
1260
|
columnIndex: le,
|
|
1252
1261
|
data: z,
|
|
1253
1262
|
isScrolling: j ? te : void 0,
|
|
1254
|
-
key:
|
|
1263
|
+
key: E({
|
|
1255
1264
|
columnIndex: le,
|
|
1256
1265
|
data: z,
|
|
1257
1266
|
rowIndex: me
|
|
@@ -1259,62 +1268,62 @@ function Oo(e) {
|
|
|
1259
1268
|
rowIndex: me,
|
|
1260
1269
|
style: this._getItemStyle(me, le)
|
|
1261
1270
|
}));
|
|
1262
|
-
var De = c(this.props, this._instanceProps),
|
|
1263
|
-
return
|
|
1271
|
+
var De = c(this.props, this._instanceProps), rt = s(this.props, this._instanceProps);
|
|
1272
|
+
return Ge(W || V || "div", {
|
|
1264
1273
|
className: C,
|
|
1265
1274
|
onScroll: this._onScroll,
|
|
1266
1275
|
ref: this._outerRefSetter,
|
|
1267
|
-
style:
|
|
1276
|
+
style: Ar({
|
|
1268
1277
|
position: "relative",
|
|
1269
|
-
height:
|
|
1278
|
+
height: y,
|
|
1270
1279
|
width: B,
|
|
1271
1280
|
overflow: "auto",
|
|
1272
1281
|
WebkitOverflowScrolling: "touch",
|
|
1273
1282
|
willChange: "transform",
|
|
1274
|
-
direction:
|
|
1283
|
+
direction: N
|
|
1275
1284
|
}, Y)
|
|
1276
|
-
},
|
|
1277
|
-
children:
|
|
1285
|
+
}, Ge(R || k || "div", {
|
|
1286
|
+
children: we,
|
|
1278
1287
|
ref: O,
|
|
1279
1288
|
style: {
|
|
1280
1289
|
height: De,
|
|
1281
1290
|
pointerEvents: te ? "none" : void 0,
|
|
1282
|
-
width:
|
|
1291
|
+
width: rt
|
|
1283
1292
|
}
|
|
1284
1293
|
}));
|
|
1285
|
-
},
|
|
1286
|
-
var p = this.props,
|
|
1287
|
-
if (typeof C == "function" &&
|
|
1288
|
-
var
|
|
1289
|
-
this._callOnItemsRendered(O, R,
|
|
1294
|
+
}, P._callPropsCallbacks = function() {
|
|
1295
|
+
var p = this.props, T = p.columnCount, C = p.onItemsRendered, S = p.onScroll, N = p.rowCount;
|
|
1296
|
+
if (typeof C == "function" && T > 0 && N > 0) {
|
|
1297
|
+
var y = this._getHorizontalRangeToRender(), O = y[0], R = y[1], k = y[2], z = y[3], I = this._getVerticalRangeToRender(), E = I[0], W = I[1], V = I[2], Z = I[3];
|
|
1298
|
+
this._callOnItemsRendered(O, R, E, W, k, z, V, Z);
|
|
1290
1299
|
}
|
|
1291
|
-
if (typeof
|
|
1300
|
+
if (typeof S == "function") {
|
|
1292
1301
|
var Y = this.state, j = Y.horizontalScrollDirection, B = Y.scrollLeft, te = Y.scrollTop, ae = Y.scrollUpdateWasRequested, J = Y.verticalScrollDirection;
|
|
1293
1302
|
this._callOnScroll(B, te, j, J, ae);
|
|
1294
1303
|
}
|
|
1295
|
-
},
|
|
1296
|
-
var p = this.props,
|
|
1297
|
-
if (
|
|
1304
|
+
}, P._getHorizontalRangeToRender = function() {
|
|
1305
|
+
var p = this.props, T = p.columnCount, C = p.overscanColumnCount, S = p.overscanColumnsCount, N = p.overscanCount, y = p.rowCount, O = this.state, R = O.horizontalScrollDirection, k = O.isScrolling, z = O.scrollLeft, I = C || S || N || 1;
|
|
1306
|
+
if (T === 0 || y === 0)
|
|
1298
1307
|
return [0, 0, 0, 0];
|
|
1299
|
-
var
|
|
1300
|
-
return [Math.max(0,
|
|
1301
|
-
},
|
|
1302
|
-
var p = this.props,
|
|
1303
|
-
if (
|
|
1308
|
+
var E = o(this.props, z, this._instanceProps), W = r(this.props, E, z, this._instanceProps), V = !k || R === "backward" ? Math.max(1, I) : 1, Z = !k || R === "forward" ? Math.max(1, I) : 1;
|
|
1309
|
+
return [Math.max(0, E - V), Math.max(0, Math.min(T - 1, W + Z)), E, W];
|
|
1310
|
+
}, P._getVerticalRangeToRender = function() {
|
|
1311
|
+
var p = this.props, T = p.columnCount, C = p.overscanCount, S = p.overscanRowCount, N = p.overscanRowsCount, y = p.rowCount, O = this.state, R = O.isScrolling, k = O.verticalScrollDirection, z = O.scrollTop, I = S || N || C || 1;
|
|
1312
|
+
if (T === 0 || y === 0)
|
|
1304
1313
|
return [0, 0, 0, 0];
|
|
1305
|
-
var
|
|
1306
|
-
return [Math.max(0,
|
|
1314
|
+
var E = h(this.props, z, this._instanceProps), W = g(this.props, E, z, this._instanceProps), V = !R || k === "backward" ? Math.max(1, I) : 1, Z = !R || k === "forward" ? Math.max(1, I) : 1;
|
|
1315
|
+
return [Math.max(0, E - V), Math.max(0, Math.min(y - 1, W + Z)), E, W];
|
|
1307
1316
|
}, m;
|
|
1308
|
-
}(
|
|
1317
|
+
}(nr), t.defaultProps = {
|
|
1309
1318
|
direction: "ltr",
|
|
1310
1319
|
itemData: void 0,
|
|
1311
1320
|
useIsScrolling: !1
|
|
1312
1321
|
}, t;
|
|
1313
1322
|
}
|
|
1314
|
-
var
|
|
1315
|
-
var o = t.children, r = t.direction, i = t.height, c = t.innerTagName, s = t.outerTagName, l = t.overscanColumnsCount,
|
|
1323
|
+
var Ao = function(t, n) {
|
|
1324
|
+
var o = t.children, r = t.direction, i = t.height, c = t.innerTagName, s = t.outerTagName, l = t.overscanColumnsCount, u = t.overscanCount, d = t.overscanRowsCount, f = t.width, h = n.instance;
|
|
1316
1325
|
if (process.env.NODE_ENV !== "production") {
|
|
1317
|
-
if (typeof
|
|
1326
|
+
if (typeof u == "number" && Ve && !Ve.has(h) && (Ve.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof l == "number" || typeof d == "number") && Ue && !Ue.has(h) && (Ue.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && qe && !qe.has(h) && (qe.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1318
1327
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1319
1328
|
switch (r) {
|
|
1320
1329
|
case "ltr":
|
|
@@ -1328,33 +1337,33 @@ var Do = function(t, n) {
|
|
|
1328
1337
|
if (typeof i != "number")
|
|
1329
1338
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (i === null ? "null" : typeof i) + '" was specified.'));
|
|
1330
1339
|
}
|
|
1331
|
-
},
|
|
1340
|
+
}, Yt = 50, yn = function(t, n) {
|
|
1332
1341
|
var o = t.rowCount, r = n.rowMetadataMap, i = n.estimatedRowHeight, c = n.lastMeasuredRowIndex, s = 0;
|
|
1333
1342
|
if (c >= o && (c = o - 1), c >= 0) {
|
|
1334
1343
|
var l = r[c];
|
|
1335
1344
|
s = l.offset + l.size;
|
|
1336
1345
|
}
|
|
1337
|
-
var
|
|
1338
|
-
return s +
|
|
1339
|
-
},
|
|
1346
|
+
var u = o - c - 1, d = u * i;
|
|
1347
|
+
return s + d;
|
|
1348
|
+
}, Ln = function(t, n) {
|
|
1340
1349
|
var o = t.columnCount, r = n.columnMetadataMap, i = n.estimatedColumnWidth, c = n.lastMeasuredColumnIndex, s = 0;
|
|
1341
1350
|
if (c >= o && (c = o - 1), c >= 0) {
|
|
1342
1351
|
var l = r[c];
|
|
1343
1352
|
s = l.offset + l.size;
|
|
1344
1353
|
}
|
|
1345
|
-
var
|
|
1346
|
-
return s +
|
|
1347
|
-
},
|
|
1354
|
+
var u = o - c - 1, d = u * i;
|
|
1355
|
+
return s + d;
|
|
1356
|
+
}, ve = function(t, n, o, r) {
|
|
1348
1357
|
var i, c, s;
|
|
1349
1358
|
if (t === "column" ? (i = r.columnMetadataMap, c = n.columnWidth, s = r.lastMeasuredColumnIndex) : (i = r.rowMetadataMap, c = n.rowHeight, s = r.lastMeasuredRowIndex), o > s) {
|
|
1350
1359
|
var l = 0;
|
|
1351
1360
|
if (s >= 0) {
|
|
1352
|
-
var
|
|
1353
|
-
l =
|
|
1361
|
+
var u = i[s];
|
|
1362
|
+
l = u.offset + u.size;
|
|
1354
1363
|
}
|
|
1355
|
-
for (var
|
|
1356
|
-
var f = c(
|
|
1357
|
-
i[
|
|
1364
|
+
for (var d = s + 1; d <= o; d++) {
|
|
1365
|
+
var f = c(d);
|
|
1366
|
+
i[d] = {
|
|
1358
1367
|
offset: l,
|
|
1359
1368
|
size: f
|
|
1360
1369
|
}, l += f;
|
|
@@ -1362,25 +1371,25 @@ var Do = function(t, n) {
|
|
|
1362
1371
|
t === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
|
|
1363
1372
|
}
|
|
1364
1373
|
return i[o];
|
|
1365
|
-
},
|
|
1374
|
+
}, Jt = function(t, n, o, r) {
|
|
1366
1375
|
var i, c;
|
|
1367
1376
|
t === "column" ? (i = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (i = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
|
|
1368
1377
|
var s = c > 0 ? i[c].offset : 0;
|
|
1369
|
-
return s >= r ?
|
|
1370
|
-
},
|
|
1378
|
+
return s >= r ? Rn(t, n, o, c, 0, r) : Fo(t, n, o, Math.max(0, c), r);
|
|
1379
|
+
}, Rn = function(t, n, o, r, i, c) {
|
|
1371
1380
|
for (; i <= r; ) {
|
|
1372
|
-
var s = i + Math.floor((r - i) / 2), l =
|
|
1381
|
+
var s = i + Math.floor((r - i) / 2), l = ve(t, n, s, o).offset;
|
|
1373
1382
|
if (l === c)
|
|
1374
1383
|
return s;
|
|
1375
1384
|
l < c ? i = s + 1 : l > c && (r = s - 1);
|
|
1376
1385
|
}
|
|
1377
1386
|
return i > 0 ? i - 1 : 0;
|
|
1378
|
-
},
|
|
1379
|
-
for (var c = t === "column" ? n.columnCount : n.rowCount, s = 1; r < c &&
|
|
1387
|
+
}, Fo = function(t, n, o, r, i) {
|
|
1388
|
+
for (var c = t === "column" ? n.columnCount : n.rowCount, s = 1; r < c && ve(t, n, r, o).offset < i; )
|
|
1380
1389
|
r += s, s *= 2;
|
|
1381
|
-
return
|
|
1382
|
-
},
|
|
1383
|
-
var l = t === "column" ? n.width : n.height,
|
|
1390
|
+
return Rn(t, n, o, Math.min(r, c - 1), Math.floor(r / 2), i);
|
|
1391
|
+
}, Qt = function(t, n, o, r, i, c, s) {
|
|
1392
|
+
var l = t === "column" ? n.width : n.height, u = ve(t, n, o, c), d = t === "column" ? Ln(n, c) : yn(n, c), f = Math.max(0, Math.min(d - l, u.offset)), h = Math.max(0, u.offset - l + s + u.size);
|
|
1384
1393
|
switch (r === "smart" && (i >= h - l && i <= f + l ? r = "auto" : r = "center"), r) {
|
|
1385
1394
|
case "start":
|
|
1386
1395
|
return f;
|
|
@@ -1392,48 +1401,48 @@ var Do = function(t, n) {
|
|
|
1392
1401
|
default:
|
|
1393
1402
|
return i >= h && i <= f ? i : h > f || i < h ? h : f;
|
|
1394
1403
|
}
|
|
1395
|
-
},
|
|
1404
|
+
}, ko = /* @__PURE__ */ zo({
|
|
1396
1405
|
getColumnOffset: function(t, n, o) {
|
|
1397
|
-
return
|
|
1406
|
+
return ve("column", t, n, o).offset;
|
|
1398
1407
|
},
|
|
1399
1408
|
getColumnStartIndexForOffset: function(t, n, o) {
|
|
1400
|
-
return
|
|
1409
|
+
return Jt("column", t, o, n);
|
|
1401
1410
|
},
|
|
1402
1411
|
getColumnStopIndexForStartIndex: function(t, n, o, r) {
|
|
1403
|
-
for (var i = t.columnCount, c = t.width, s =
|
|
1404
|
-
|
|
1405
|
-
return
|
|
1412
|
+
for (var i = t.columnCount, c = t.width, s = ve("column", t, n, r), l = o + c, u = s.offset + s.size, d = n; d < i - 1 && u < l; )
|
|
1413
|
+
d++, u += ve("column", t, d, r).size;
|
|
1414
|
+
return d;
|
|
1406
1415
|
},
|
|
1407
1416
|
getColumnWidth: function(t, n, o) {
|
|
1408
1417
|
return o.columnMetadataMap[n].size;
|
|
1409
1418
|
},
|
|
1410
|
-
getEstimatedTotalHeight:
|
|
1411
|
-
getEstimatedTotalWidth:
|
|
1419
|
+
getEstimatedTotalHeight: yn,
|
|
1420
|
+
getEstimatedTotalWidth: Ln,
|
|
1412
1421
|
getOffsetForColumnAndAlignment: function(t, n, o, r, i, c) {
|
|
1413
|
-
return
|
|
1422
|
+
return Qt("column", t, n, o, r, i, c);
|
|
1414
1423
|
},
|
|
1415
1424
|
getOffsetForRowAndAlignment: function(t, n, o, r, i, c) {
|
|
1416
|
-
return
|
|
1425
|
+
return Qt("row", t, n, o, r, i, c);
|
|
1417
1426
|
},
|
|
1418
1427
|
getRowOffset: function(t, n, o) {
|
|
1419
|
-
return
|
|
1428
|
+
return ve("row", t, n, o).offset;
|
|
1420
1429
|
},
|
|
1421
1430
|
getRowHeight: function(t, n, o) {
|
|
1422
1431
|
return o.rowMetadataMap[n].size;
|
|
1423
1432
|
},
|
|
1424
1433
|
getRowStartIndexForOffset: function(t, n, o) {
|
|
1425
|
-
return
|
|
1434
|
+
return Jt("row", t, o, n);
|
|
1426
1435
|
},
|
|
1427
1436
|
getRowStopIndexForStartIndex: function(t, n, o, r) {
|
|
1428
|
-
for (var i = t.rowCount, c = t.height, s =
|
|
1429
|
-
|
|
1430
|
-
return
|
|
1437
|
+
for (var i = t.rowCount, c = t.height, s = ve("row", t, n, r), l = o + c, u = s.offset + s.size, d = n; d < i - 1 && u < l; )
|
|
1438
|
+
d++, u += ve("row", t, d, r).size;
|
|
1439
|
+
return d;
|
|
1431
1440
|
},
|
|
1432
1441
|
initInstanceProps: function(t, n) {
|
|
1433
1442
|
var o = t, r = o.estimatedColumnWidth, i = o.estimatedRowHeight, c = {
|
|
1434
1443
|
columnMetadataMap: {},
|
|
1435
|
-
estimatedColumnWidth: r ||
|
|
1436
|
-
estimatedRowHeight: i ||
|
|
1444
|
+
estimatedColumnWidth: r || Yt,
|
|
1445
|
+
estimatedRowHeight: i || Yt,
|
|
1437
1446
|
lastMeasuredColumnIndex: -1,
|
|
1438
1447
|
lastMeasuredRowIndex: -1,
|
|
1439
1448
|
rowMetadataMap: {}
|
|
@@ -1449,8 +1458,8 @@ var Do = function(t, n) {
|
|
|
1449
1458
|
shouldForceUpdate: l
|
|
1450
1459
|
});
|
|
1451
1460
|
}, n.resetAfterIndices = function(s) {
|
|
1452
|
-
var l = s.columnIndex,
|
|
1453
|
-
typeof l == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, l - 1)), typeof
|
|
1461
|
+
var l = s.columnIndex, u = s.rowIndex, d = s.shouldForceUpdate, f = d === void 0 ? !0 : d;
|
|
1462
|
+
typeof l == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, l - 1)), typeof u == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, u - 1)), n._getItemStyleCache(-1), f && n.forceUpdate();
|
|
1454
1463
|
}, c;
|
|
1455
1464
|
},
|
|
1456
1465
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
@@ -1465,7 +1474,7 @@ var Do = function(t, n) {
|
|
|
1465
1474
|
}
|
|
1466
1475
|
});
|
|
1467
1476
|
process.env.NODE_ENV;
|
|
1468
|
-
function
|
|
1477
|
+
function en(e, t) {
|
|
1469
1478
|
for (var n in e)
|
|
1470
1479
|
if (!(n in t))
|
|
1471
1480
|
return !0;
|
|
@@ -1474,27 +1483,27 @@ function Jt(e, t) {
|
|
|
1474
1483
|
return !0;
|
|
1475
1484
|
return !1;
|
|
1476
1485
|
}
|
|
1477
|
-
var
|
|
1478
|
-
function
|
|
1479
|
-
var n = e.style, o =
|
|
1480
|
-
return !
|
|
1486
|
+
var Mo = ["style"], Wo = ["style"];
|
|
1487
|
+
function Ho(e, t) {
|
|
1488
|
+
var n = e.style, o = Bt(e, Mo), r = t.style, i = Bt(t, Wo);
|
|
1489
|
+
return !en(n, r) && !en(o, i);
|
|
1481
1490
|
}
|
|
1482
|
-
const
|
|
1483
|
-
const { viewMode: e } =
|
|
1491
|
+
const $o = () => {
|
|
1492
|
+
const { viewMode: e } = Qe(), { scrollMode: t } = Ee(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = tt(), i = L(
|
|
1484
1493
|
(g) => r.widths[g] || 0,
|
|
1485
1494
|
[r.widths]
|
|
1486
1495
|
), c = L(
|
|
1487
1496
|
(g) => r.heights[g] || 0,
|
|
1488
1497
|
[r.heights]
|
|
1489
|
-
), s = F(() => r.heights.length, [r.heights]), l = F(() => Math.max(...r.widths), [r.widths]),
|
|
1498
|
+
), s = F(() => r.heights.length, [r.heights]), l = F(() => Math.max(...r.widths), [r.widths]), u = F(() => t === X.HORIZONTAL_SCROLLING ? s : e === Ze.DUAL_PAGE ? 2 : 1, [e, t, t, s, o, l]);
|
|
1490
1499
|
A(() => {
|
|
1491
|
-
n(
|
|
1492
|
-
}, [
|
|
1493
|
-
const
|
|
1500
|
+
n(u);
|
|
1501
|
+
}, [u, n]);
|
|
1502
|
+
const d = F(() => t === X.HORIZONTAL_SCROLLING || t === X.PAGE_SCROLLING ? 1 : Math.round(s / u), [u, s, t]), f = F(() => r.heights.reduce((g, w) => g + w, 0) / r.heights.length || 0, [r]), h = F(() => r.widths.reduce((g, w) => g + w, 0) / r.heights.length || 0, [r]);
|
|
1494
1503
|
return {
|
|
1495
|
-
rowCount:
|
|
1504
|
+
rowCount: d,
|
|
1496
1505
|
rowHeight: c,
|
|
1497
|
-
columnCount:
|
|
1506
|
+
columnCount: u,
|
|
1498
1507
|
columnWidth: i,
|
|
1499
1508
|
pageDimension: r,
|
|
1500
1509
|
estimatedRowHeight: f,
|
|
@@ -1503,34 +1512,34 @@ const Mo = () => {
|
|
|
1503
1512
|
};
|
|
1504
1513
|
let oe;
|
|
1505
1514
|
typeof window < "u" ? oe = window : typeof self < "u" ? oe = self : oe = global;
|
|
1506
|
-
let
|
|
1507
|
-
const
|
|
1508
|
-
|
|
1509
|
-
return
|
|
1510
|
-
}) : (
|
|
1511
|
-
|
|
1512
|
-
},
|
|
1513
|
-
const n =
|
|
1514
|
-
|
|
1515
|
-
}), o =
|
|
1516
|
-
|
|
1517
|
-
},
|
|
1515
|
+
let Ct = null, Tt = null;
|
|
1516
|
+
const tn = 20, mt = oe.clearTimeout, nn = oe.setTimeout, ft = oe.cancelAnimationFrame || oe.mozCancelAnimationFrame || oe.webkitCancelAnimationFrame, rn = oe.requestAnimationFrame || oe.mozRequestAnimationFrame || oe.webkitRequestAnimationFrame;
|
|
1517
|
+
ft == null || rn == null ? (Ct = mt, Tt = function(t) {
|
|
1518
|
+
return nn(t, tn);
|
|
1519
|
+
}) : (Ct = function([t, n]) {
|
|
1520
|
+
ft(t), mt(n);
|
|
1521
|
+
}, Tt = function(t) {
|
|
1522
|
+
const n = rn(function() {
|
|
1523
|
+
mt(o), t();
|
|
1524
|
+
}), o = nn(function() {
|
|
1525
|
+
ft(n), t();
|
|
1526
|
+
}, tn);
|
|
1518
1527
|
return [n, o];
|
|
1519
1528
|
});
|
|
1520
|
-
function
|
|
1529
|
+
function Go(e) {
|
|
1521
1530
|
let t, n, o, r, i, c, s;
|
|
1522
1531
|
const l = typeof document < "u" && document.attachEvent;
|
|
1523
1532
|
if (!l) {
|
|
1524
1533
|
c = function(_) {
|
|
1525
|
-
const m = _.__resizeTriggers__,
|
|
1526
|
-
|
|
1534
|
+
const m = _.__resizeTriggers__, P = m.firstElementChild, x = m.lastElementChild, p = P.firstElementChild;
|
|
1535
|
+
x.scrollLeft = x.scrollWidth, x.scrollTop = x.scrollHeight, p.style.width = P.offsetWidth + 1 + "px", p.style.height = P.offsetHeight + 1 + "px", P.scrollLeft = P.scrollWidth, P.scrollTop = P.scrollHeight;
|
|
1527
1536
|
}, i = function(_) {
|
|
1528
1537
|
return _.offsetWidth !== _.__resizeLast__.width || _.offsetHeight !== _.__resizeLast__.height;
|
|
1529
1538
|
}, s = function(_) {
|
|
1530
1539
|
if (_.target.className && typeof _.target.className.indexOf == "function" && _.target.className.indexOf("contract-trigger") < 0 && _.target.className.indexOf("expand-trigger") < 0)
|
|
1531
1540
|
return;
|
|
1532
1541
|
const m = this;
|
|
1533
|
-
c(this), this.__resizeRAF__ &&
|
|
1542
|
+
c(this), this.__resizeRAF__ && Ct(this.__resizeRAF__), this.__resizeRAF__ = Tt(function() {
|
|
1534
1543
|
i(m) && (m.__resizeLast__.width = m.offsetWidth, m.__resizeLast__.height = m.offsetHeight, m.__resizeListeners__.forEach(function(p) {
|
|
1535
1544
|
p.call(m, _);
|
|
1536
1545
|
}));
|
|
@@ -1538,24 +1547,24 @@ function Ho(e) {
|
|
|
1538
1547
|
};
|
|
1539
1548
|
let h = !1, g = "";
|
|
1540
1549
|
o = "animationstart";
|
|
1541
|
-
const
|
|
1542
|
-
let
|
|
1550
|
+
const w = "Webkit Moz O ms".split(" ");
|
|
1551
|
+
let b = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = "";
|
|
1543
1552
|
{
|
|
1544
1553
|
const _ = document.createElement("fakeelement");
|
|
1545
1554
|
if (_.style.animationName !== void 0 && (h = !0), h === !1) {
|
|
1546
|
-
for (let m = 0; m <
|
|
1547
|
-
if (_.style[
|
|
1548
|
-
v =
|
|
1555
|
+
for (let m = 0; m < w.length; m++)
|
|
1556
|
+
if (_.style[w[m] + "AnimationName"] !== void 0) {
|
|
1557
|
+
v = w[m], g = "-" + v.toLowerCase() + "-", o = b[m], h = !0;
|
|
1549
1558
|
break;
|
|
1550
1559
|
}
|
|
1551
1560
|
}
|
|
1552
1561
|
}
|
|
1553
1562
|
n = "resizeanim", t = "@" + g + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = g + "animation: 1ms " + n + "; ";
|
|
1554
1563
|
}
|
|
1555
|
-
const
|
|
1564
|
+
const u = function(h) {
|
|
1556
1565
|
if (!h.getElementById("detectElementResize")) {
|
|
1557
|
-
const g = (t || "") + ".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%; }',
|
|
1558
|
-
|
|
1566
|
+
const g = (t || "") + ".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%; }', w = h.head || h.getElementsByTagName("head")[0], b = h.createElement("style");
|
|
1567
|
+
b.id = "detectElementResize", b.type = "text/css", e != null && b.setAttribute("nonce", e), b.styleSheet ? b.styleSheet.cssText = g : b.appendChild(h.createTextNode(g)), w.appendChild(b);
|
|
1559
1568
|
}
|
|
1560
1569
|
};
|
|
1561
1570
|
return {
|
|
@@ -1564,13 +1573,13 @@ function Ho(e) {
|
|
|
1564
1573
|
h.attachEvent("onresize", g);
|
|
1565
1574
|
else {
|
|
1566
1575
|
if (!h.__resizeTriggers__) {
|
|
1567
|
-
const
|
|
1568
|
-
|
|
1569
|
-
const v =
|
|
1570
|
-
v.className = "expand-trigger", v.appendChild(
|
|
1571
|
-
const _ =
|
|
1572
|
-
_.className = "contract-trigger", h.__resizeTriggers__.appendChild(v), h.__resizeTriggers__.appendChild(_), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", s, !0), o && (h.__resizeTriggers__.__animationListener__ = function(
|
|
1573
|
-
|
|
1576
|
+
const w = h.ownerDocument, b = oe.getComputedStyle(h);
|
|
1577
|
+
b && b.position === "static" && (h.style.position = "relative"), u(w), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = w.createElement("div")).className = "resize-triggers";
|
|
1578
|
+
const v = w.createElement("div");
|
|
1579
|
+
v.className = "expand-trigger", v.appendChild(w.createElement("div"));
|
|
1580
|
+
const _ = w.createElement("div");
|
|
1581
|
+
_.className = "contract-trigger", h.__resizeTriggers__.appendChild(v), h.__resizeTriggers__.appendChild(_), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", s, !0), o && (h.__resizeTriggers__.__animationListener__ = function(P) {
|
|
1582
|
+
P.animationName === n && c(h);
|
|
1574
1583
|
}, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
|
|
1575
1584
|
}
|
|
1576
1585
|
h.__resizeListeners__.push(g);
|
|
@@ -1589,7 +1598,7 @@ function Ho(e) {
|
|
|
1589
1598
|
}
|
|
1590
1599
|
};
|
|
1591
1600
|
}
|
|
1592
|
-
class
|
|
1601
|
+
class Vo extends rr {
|
|
1593
1602
|
constructor(...t) {
|
|
1594
1603
|
super(...t), this.state = {
|
|
1595
1604
|
height: this.props.defaultHeight || 0,
|
|
@@ -1604,17 +1613,17 @@ class $o extends tr {
|
|
|
1604
1613
|
onResize: r
|
|
1605
1614
|
} = this.props;
|
|
1606
1615
|
if (this._parentNode) {
|
|
1607
|
-
const i = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(i.paddingLeft || "0"), s = parseFloat(i.paddingRight || "0"), l = parseFloat(i.paddingTop || "0"),
|
|
1608
|
-
(!n && (this.state.height !== g || this.state.scaledHeight !== f) || !o && (this.state.width !==
|
|
1616
|
+
const i = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(i.paddingLeft || "0"), s = parseFloat(i.paddingRight || "0"), l = parseFloat(i.paddingTop || "0"), u = parseFloat(i.paddingBottom || "0"), d = this._parentNode.getBoundingClientRect(), f = d.height - l - u, h = d.width - c - s, g = this._parentNode.offsetHeight - l - u, w = this._parentNode.offsetWidth - c - s;
|
|
1617
|
+
(!n && (this.state.height !== g || this.state.scaledHeight !== f) || !o && (this.state.width !== w || this.state.scaledWidth !== h)) && (this.setState({
|
|
1609
1618
|
height: g,
|
|
1610
|
-
width:
|
|
1619
|
+
width: w,
|
|
1611
1620
|
scaledHeight: f,
|
|
1612
1621
|
scaledWidth: h
|
|
1613
1622
|
}), typeof r == "function" && r({
|
|
1614
1623
|
height: g,
|
|
1615
1624
|
scaledHeight: f,
|
|
1616
1625
|
scaledWidth: h,
|
|
1617
|
-
width:
|
|
1626
|
+
width: w
|
|
1618
1627
|
}));
|
|
1619
1628
|
}
|
|
1620
1629
|
}, this._setRef = (n) => {
|
|
@@ -1630,7 +1639,7 @@ class $o extends tr {
|
|
|
1630
1639
|
const o = n.ownerDocument.defaultView.ResizeObserver;
|
|
1631
1640
|
o != null ? (this._resizeObserver = new o(() => {
|
|
1632
1641
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1633
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1642
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = Go(t), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1634
1643
|
}
|
|
1635
1644
|
}
|
|
1636
1645
|
componentWillUnmount() {
|
|
@@ -1646,34 +1655,34 @@ class $o extends tr {
|
|
|
1646
1655
|
doNotBailOutOnEmptyChildren: c = !1,
|
|
1647
1656
|
nonce: s,
|
|
1648
1657
|
onResize: l,
|
|
1649
|
-
style:
|
|
1650
|
-
tagName:
|
|
1658
|
+
style: u = {},
|
|
1659
|
+
tagName: d = "div",
|
|
1651
1660
|
...f
|
|
1652
1661
|
} = this.props, {
|
|
1653
1662
|
height: h,
|
|
1654
1663
|
scaledHeight: g,
|
|
1655
|
-
scaledWidth:
|
|
1656
|
-
width:
|
|
1664
|
+
scaledWidth: w,
|
|
1665
|
+
width: b
|
|
1657
1666
|
} = this.state, v = {
|
|
1658
1667
|
overflow: "visible"
|
|
1659
1668
|
}, _ = {};
|
|
1660
1669
|
let m = !1;
|
|
1661
|
-
return r || (h === 0 && (m = !0), v.height = 0, _.height = h, _.scaledHeight = g), i || (
|
|
1670
|
+
return r || (h === 0 && (m = !0), v.height = 0, _.height = h, _.scaledHeight = g), i || (b === 0 && (m = !0), v.width = 0, _.width = b, _.scaledWidth = w), c && (m = !1), Ge(d, {
|
|
1662
1671
|
ref: this._setRef,
|
|
1663
1672
|
style: {
|
|
1664
1673
|
...v,
|
|
1665
|
-
...
|
|
1674
|
+
...u
|
|
1666
1675
|
},
|
|
1667
1676
|
...f
|
|
1668
1677
|
}, !m && t(_));
|
|
1669
1678
|
}
|
|
1670
1679
|
}
|
|
1671
|
-
const
|
|
1680
|
+
const Uo = ({ widths: e, heights: t }) => {
|
|
1672
1681
|
const { focusedPage: n, totalPages: o } = ie(), r = F(() => {
|
|
1673
1682
|
const s = [], l = Math.ceil(n / 2) * 2 - 1;
|
|
1674
1683
|
if (s.push(l), l + 1 < o) {
|
|
1675
|
-
const
|
|
1676
|
-
s.push(
|
|
1684
|
+
const u = l + 1;
|
|
1685
|
+
s.push(u);
|
|
1677
1686
|
}
|
|
1678
1687
|
return s;
|
|
1679
1688
|
}, [n, o]), i = F(() => [
|
|
@@ -1691,8 +1700,8 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
1691
1700
|
height: t(n)
|
|
1692
1701
|
}
|
|
1693
1702
|
], [e, t, r]), c = F(() => i.reduce((s, l) => s + Number(l.width || 0), 0), [i]);
|
|
1694
|
-
return /* @__PURE__ */ a("div", { style: { width: c, position: "relative" }, children: r.map((s, l) => /* @__PURE__ */ a(
|
|
1695
|
-
},
|
|
1703
|
+
return /* @__PURE__ */ a("div", { style: { width: c, position: "relative" }, children: r.map((s, l) => /* @__PURE__ */ a(Nt, { style: i[l], pageNumber: s }, s)) });
|
|
1704
|
+
}, qo = ({ widths: e, heights: t }) => {
|
|
1696
1705
|
const { focusedPage: n } = ie(), o = F(() => ({
|
|
1697
1706
|
position: "absolute",
|
|
1698
1707
|
width: e(n - 1),
|
|
@@ -1705,45 +1714,45 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
1705
1714
|
width: r,
|
|
1706
1715
|
position: "relative"
|
|
1707
1716
|
},
|
|
1708
|
-
children: /* @__PURE__ */ a(
|
|
1717
|
+
children: /* @__PURE__ */ a(Nt, { style: o, pageNumber: n }, n)
|
|
1709
1718
|
}
|
|
1710
1719
|
);
|
|
1711
|
-
},
|
|
1712
|
-
const o =
|
|
1713
|
-
const v = c[
|
|
1720
|
+
}, Zo = (e, t, n) => {
|
|
1721
|
+
const o = M(), { contentRef: r } = Te(), { heights: i, widths: c } = tt(), { setFocusedPage: s } = ie(), [l, u] = $([]), { smoothScrolling: d } = xt(), f = It(l, 100, 500), h = F(() => i.map((w, b) => {
|
|
1722
|
+
const v = c[b], _ = Hr(b + 1, e), m = v * _.columnIndex, P = w * _.rowIndex, x = m + v, p = P + w;
|
|
1714
1723
|
return {
|
|
1715
|
-
pageNumber:
|
|
1724
|
+
pageNumber: b + 1,
|
|
1716
1725
|
..._,
|
|
1717
1726
|
width: v,
|
|
1718
|
-
height:
|
|
1727
|
+
height: w,
|
|
1719
1728
|
startX: m,
|
|
1720
|
-
startY:
|
|
1721
|
-
endX:
|
|
1729
|
+
startY: P,
|
|
1730
|
+
endX: x,
|
|
1722
1731
|
endY: p
|
|
1723
1732
|
};
|
|
1724
1733
|
}), [i, c, e, t]);
|
|
1725
1734
|
A(() => {
|
|
1726
|
-
f.length > 0 && !
|
|
1735
|
+
f.length > 0 && !d.current && s(f[0].pageNumber);
|
|
1727
1736
|
}, [f, s]);
|
|
1728
1737
|
const g = L(
|
|
1729
|
-
(
|
|
1738
|
+
(w) => {
|
|
1730
1739
|
o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
|
|
1731
|
-
const
|
|
1732
|
-
startTop:
|
|
1733
|
-
startLeft:
|
|
1734
|
-
endTop:
|
|
1735
|
-
endLeft:
|
|
1740
|
+
const b = w.target, v = {
|
|
1741
|
+
startTop: b.scrollTop,
|
|
1742
|
+
startLeft: b.scrollLeft,
|
|
1743
|
+
endTop: b.scrollTop + b.clientHeight,
|
|
1744
|
+
endLeft: b.scrollLeft + b.clientWidth
|
|
1736
1745
|
}, _ = h.filter((m) => {
|
|
1737
|
-
const
|
|
1738
|
-
return
|
|
1746
|
+
const P = m.endX >= v.startLeft && m.endY >= v.startTop, x = m.startX <= v.endLeft && m.startY <= v.endTop;
|
|
1747
|
+
return P && x;
|
|
1739
1748
|
}).map((m) => {
|
|
1740
|
-
const
|
|
1749
|
+
const P = v.startLeft > m.startX ? v.startLeft : m.startX, x = v.startTop > m.startY ? v.startTop : m.startY, p = v.endLeft < m.endX ? v.endLeft : m.endX, T = v.endTop < m.endY ? v.endTop : m.endY, C = p - P, S = T - x, y = +(C * S / (m.width * m.height) * 100).toFixed(2);
|
|
1741
1750
|
return {
|
|
1742
1751
|
pageNumber: m.pageNumber,
|
|
1743
|
-
ratio:
|
|
1752
|
+
ratio: y
|
|
1744
1753
|
};
|
|
1745
|
-
}).sort((m,
|
|
1746
|
-
|
|
1754
|
+
}).sort((m, P) => P.ratio - m.ratio);
|
|
1755
|
+
u(_);
|
|
1747
1756
|
});
|
|
1748
1757
|
},
|
|
1749
1758
|
[r, h]
|
|
@@ -1754,136 +1763,141 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
1754
1763
|
n == null || n.removeEventListener("scroll", g);
|
|
1755
1764
|
};
|
|
1756
1765
|
}, [n, g]);
|
|
1757
|
-
},
|
|
1758
|
-
const r =
|
|
1759
|
-
return /* @__PURE__ */ a(
|
|
1760
|
-
},
|
|
1761
|
-
const { initialPage: e = 1, initialScrollMode: t } =
|
|
1766
|
+
}, Bo = or(({ columnIndex: e, rowIndex: t, data: n, style: o }) => {
|
|
1767
|
+
const r = $r(t, e, n.columnCount);
|
|
1768
|
+
return /* @__PURE__ */ a(Nt, { style: o, pageNumber: r }, r);
|
|
1769
|
+
}, Ho), Is = () => {
|
|
1770
|
+
const { initialPage: e = 1, initialScrollMode: t } = lr(), { pagesRef: n, setPagesRef: o } = Te(), { scrollToPage: r } = bn(), {
|
|
1762
1771
|
virtualScrollRef: i,
|
|
1763
1772
|
getVirtualScrollRef: c,
|
|
1764
1773
|
getPageScrollElementRef: s,
|
|
1765
1774
|
getVirtualScrollableElementRef: l,
|
|
1766
|
-
setTotalInnerDimensions:
|
|
1767
|
-
virtualScrollableElementRef:
|
|
1775
|
+
setTotalInnerDimensions: u,
|
|
1776
|
+
virtualScrollableElementRef: d,
|
|
1768
1777
|
totalInnerDimensions: f,
|
|
1769
1778
|
pageScrollElementRef: h
|
|
1770
|
-
} =
|
|
1779
|
+
} = et(), g = M(!0), { nextPage: w, prevPage: b, setFocusedPage: v, focusedPage: _ } = ie(), { scrollMode: m } = Ee(), { viewMode: P } = Qe(), x = M(null), { loading: p } = K(), { LoaderImageComponent: T } = mn(), { smoothScrolling: C, targetScrollPosition: S } = xt(), N = M(
|
|
1771
1780
|
f
|
|
1772
|
-
),
|
|
1773
|
-
viewMode:
|
|
1781
|
+
), y = M({
|
|
1782
|
+
viewMode: P,
|
|
1774
1783
|
scrollMode: m
|
|
1775
|
-
}), O =
|
|
1784
|
+
}), O = M(!1), R = M(), { isFullScreen: k } = dr(), {
|
|
1776
1785
|
pageDimension: z,
|
|
1777
|
-
rowCount:
|
|
1778
|
-
rowHeight:
|
|
1779
|
-
columnCount:
|
|
1786
|
+
rowCount: I,
|
|
1787
|
+
rowHeight: E,
|
|
1788
|
+
columnCount: W,
|
|
1780
1789
|
columnWidth: V,
|
|
1781
1790
|
estimatedColumnWidth: Z,
|
|
1782
1791
|
estimatedRowHeight: Y
|
|
1783
|
-
} =
|
|
1784
|
-
|
|
1785
|
-
const te =
|
|
1792
|
+
} = $o(), j = It(f, 100), B = M();
|
|
1793
|
+
Zo(W, I, d);
|
|
1794
|
+
const te = M({
|
|
1786
1795
|
scrollTop: 0,
|
|
1787
1796
|
scrollLeft: 0
|
|
1788
1797
|
});
|
|
1789
|
-
|
|
1790
|
-
const { isPressed: ae } =
|
|
1798
|
+
Wr(n);
|
|
1799
|
+
const { isPressed: ae } = kr(), { selectionMode: J } = cr(), { initializeGrabScroll: ne, resetGrabState: he } = Mr({
|
|
1791
1800
|
isPressed: ae
|
|
1792
|
-
}), ce = F(() => J ===
|
|
1793
|
-
columnCount:
|
|
1794
|
-
}), [
|
|
1801
|
+
}), ce = F(() => J === ar.HAND, [J]), Oe = F(() => ({
|
|
1802
|
+
columnCount: W
|
|
1803
|
+
}), [W]), we = L(
|
|
1795
1804
|
(H) => {
|
|
1796
1805
|
const G = document.activeElement !== n;
|
|
1797
|
-
!k && G || (["ArrowUp", "ArrowLeft"].includes(H.key) ? (H.preventDefault(),
|
|
1806
|
+
!k && G || (["ArrowUp", "ArrowLeft"].includes(H.key) ? (H.preventDefault(), b()) : ["ArrowDown", "ArrowRight"].includes(H.key) && (H.preventDefault(), w()));
|
|
1798
1807
|
},
|
|
1799
|
-
[
|
|
1808
|
+
[w, b, k, m]
|
|
1800
1809
|
);
|
|
1801
|
-
A(() => (window.addEventListener("keydown",
|
|
1802
|
-
window.removeEventListener("keydown",
|
|
1803
|
-
}), [
|
|
1804
|
-
if (
|
|
1805
|
-
for (let H = 0; H <
|
|
1806
|
-
for (let G = 0; G <
|
|
1810
|
+
A(() => (window.addEventListener("keydown", we), () => {
|
|
1811
|
+
window.removeEventListener("keydown", we);
|
|
1812
|
+
}), [we]), A(() => {
|
|
1813
|
+
if (x.current && (x.current.style.position = "relative"), !!i)
|
|
1814
|
+
for (let H = 0; H < I; H++)
|
|
1815
|
+
for (let G = 0; G < W; G++)
|
|
1807
1816
|
i.resetAfterIndices({
|
|
1808
1817
|
columnIndex: G,
|
|
1809
1818
|
rowIndex: H,
|
|
1810
1819
|
shouldForceUpdate: !0
|
|
1811
1820
|
});
|
|
1812
|
-
}, [
|
|
1821
|
+
}, [I, W, z, i]);
|
|
1813
1822
|
const me = L(
|
|
1814
1823
|
(H, G) => {
|
|
1815
|
-
if (!
|
|
1824
|
+
if (!d)
|
|
1816
1825
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
1817
|
-
const
|
|
1818
|
-
return
|
|
1819
|
-
scrollTop:
|
|
1820
|
-
scrollLeft:
|
|
1826
|
+
const fe = te.current.scrollTop > G, ge = te.current.scrollLeft > H;
|
|
1827
|
+
return fe || ge ? te.current : {
|
|
1828
|
+
scrollTop: d.scrollTop,
|
|
1829
|
+
scrollLeft: d.scrollLeft
|
|
1821
1830
|
};
|
|
1822
1831
|
},
|
|
1823
|
-
[
|
|
1832
|
+
[d]
|
|
1824
1833
|
), le = L(
|
|
1825
1834
|
(H, G) => {
|
|
1826
|
-
if (
|
|
1835
|
+
if (y.current.viewMode !== P || y.current.scrollMode !== m) {
|
|
1827
1836
|
B.current && clearTimeout(B.current), O.current = !0, r(_, "auto"), B.current = setTimeout(() => {
|
|
1828
1837
|
requestAnimationFrame(() => {
|
|
1829
|
-
|
|
1838
|
+
y.current = { viewMode: P, scrollMode: m };
|
|
1830
1839
|
});
|
|
1831
1840
|
}, 100);
|
|
1832
1841
|
return;
|
|
1833
1842
|
}
|
|
1834
|
-
const
|
|
1843
|
+
const ge = H.scrollTop, ze = H.scrollLeft;
|
|
1835
1844
|
if (!G.height || !G.width)
|
|
1836
1845
|
return;
|
|
1837
1846
|
O.current = !0;
|
|
1838
|
-
const { height: Pe, width:
|
|
1839
|
-
if (
|
|
1847
|
+
const { height: Pe, width: ot } = G, { height: At, width: Ft } = N.current;
|
|
1848
|
+
if (At === Pe && Ft === ot)
|
|
1840
1849
|
return;
|
|
1841
|
-
const
|
|
1850
|
+
const Jn = ge / At * Pe, Qn = ze / Ft * ot, er = Math.round(Math.min(Jn, Pe)) || 0, tr = Math.round(Math.min(Qn, ot)) || 0;
|
|
1842
1851
|
R.current = setTimeout(() => {
|
|
1843
1852
|
requestAnimationFrame(() => {
|
|
1844
1853
|
i == null || i.scrollTo({
|
|
1845
|
-
scrollTop:
|
|
1846
|
-
scrollLeft:
|
|
1854
|
+
scrollTop: er,
|
|
1855
|
+
scrollLeft: tr
|
|
1847
1856
|
});
|
|
1848
1857
|
});
|
|
1849
|
-
}, 0),
|
|
1858
|
+
}, 0), N.current = {
|
|
1850
1859
|
height: G.height,
|
|
1851
1860
|
width: G.width
|
|
1852
1861
|
};
|
|
1853
1862
|
},
|
|
1854
|
-
[i,
|
|
1863
|
+
[i, P, m, r]
|
|
1855
1864
|
);
|
|
1856
1865
|
A(() => {
|
|
1857
1866
|
clearTimeout(R.current);
|
|
1858
|
-
const H = Array.from({ length:
|
|
1859
|
-
(
|
|
1867
|
+
const H = Array.from({ length: I }).reduce(
|
|
1868
|
+
(ge, ze, Pe) => ge + E(Pe),
|
|
1860
1869
|
0
|
|
1861
|
-
), G = Array.from({ length:
|
|
1862
|
-
(
|
|
1870
|
+
), G = Array.from({ length: W }).reduce(
|
|
1871
|
+
(ge, ze, Pe) => ge + V(Pe),
|
|
1863
1872
|
0
|
|
1864
|
-
),
|
|
1865
|
-
te.current =
|
|
1873
|
+
), fe = me(G, H);
|
|
1874
|
+
te.current = fe, le(fe, { height: H, width: G }), u({
|
|
1866
1875
|
height: H,
|
|
1867
1876
|
width: G
|
|
1868
1877
|
});
|
|
1869
|
-
}, [z,
|
|
1870
|
-
const De = L(
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1878
|
+
}, [z, I, W, le]);
|
|
1879
|
+
const De = L(
|
|
1880
|
+
(H) => {
|
|
1881
|
+
te.current = {
|
|
1882
|
+
scrollTop: H.scrollTop,
|
|
1883
|
+
scrollLeft: H.scrollLeft
|
|
1884
|
+
};
|
|
1885
|
+
const G = ((d == null ? void 0 : d.scrollHeight) || 0) - ((d == null ? void 0 : d.clientHeight) || 0), fe = ((d == null ? void 0 : d.scrollWidth) || 0) - ((d == null ? void 0 : d.clientWidth) || 0), ge = Math.round(S.current.left) === Math.round(H.scrollLeft) && Math.round(S.current.top) === Math.round(H.scrollTop), ze = Math.round(G) === Math.round(H.scrollTop) && Math.round(fe) === Math.round(H.scrollLeft);
|
|
1886
|
+
(ge || ze) && (C.current = !1);
|
|
1887
|
+
},
|
|
1888
|
+
[d]
|
|
1889
|
+
);
|
|
1876
1890
|
A(() => () => {
|
|
1877
1891
|
B.current && clearTimeout(B.current);
|
|
1878
1892
|
}, []);
|
|
1879
|
-
const
|
|
1893
|
+
const rt = F(() => re(de["rp-pages-container"], {
|
|
1880
1894
|
[de["rp-cursor-grab"]]: ce && !ae,
|
|
1881
1895
|
[de["rp-cursor-grabbing"]]: ce && ae
|
|
1882
|
-
}), [ce, ae]),
|
|
1896
|
+
}), [ce, ae]), Yn = L(
|
|
1883
1897
|
(H) => {
|
|
1884
1898
|
if (ce && H) {
|
|
1885
|
-
const G = re(de["rp-pages"]),
|
|
1886
|
-
ne(
|
|
1899
|
+
const G = re(de["rp-pages"]), fe = document.querySelector(`.${G}`);
|
|
1900
|
+
ne(fe);
|
|
1887
1901
|
}
|
|
1888
1902
|
},
|
|
1889
1903
|
[ce, ne, de]
|
|
@@ -1922,35 +1936,35 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
1922
1936
|
h,
|
|
1923
1937
|
v,
|
|
1924
1938
|
j
|
|
1925
|
-
]), /* @__PURE__ */ a("div", { ref: o, tabIndex: -1, className:
|
|
1939
|
+
]), /* @__PURE__ */ a("div", { ref: o, tabIndex: -1, className: rt, children: /* @__PURE__ */ a(Vo, { style: { minHeight: "50px" }, children: ({ width: H, height: G }) => /* @__PURE__ */ a("div", { "data-rp": "pages", ref: Yn, style: { width: H, height: G }, children: m === X.PAGE_SCROLLING ? /* @__PURE__ */ a(
|
|
1926
1940
|
"div",
|
|
1927
1941
|
{
|
|
1928
1942
|
ref: s,
|
|
1929
1943
|
style: { width: H, height: G },
|
|
1930
1944
|
className: re(de["rp-pages"], de["rp-page-scrolling-wrapper"]),
|
|
1931
|
-
children:
|
|
1945
|
+
children: P === Ze.DUAL_PAGE ? /* @__PURE__ */ a(Uo, { widths: V, heights: E }) : /* @__PURE__ */ a(qo, { widths: V, heights: E })
|
|
1932
1946
|
}
|
|
1933
1947
|
) : Z ? /* @__PURE__ */ a(
|
|
1934
|
-
|
|
1948
|
+
ko,
|
|
1935
1949
|
{
|
|
1936
1950
|
ref: c,
|
|
1937
1951
|
itemData: Oe,
|
|
1938
1952
|
outerRef: l,
|
|
1939
|
-
innerRef:
|
|
1953
|
+
innerRef: x,
|
|
1940
1954
|
onScroll: De,
|
|
1941
|
-
columnCount:
|
|
1955
|
+
columnCount: W,
|
|
1942
1956
|
columnWidth: V,
|
|
1943
|
-
rowHeight:
|
|
1957
|
+
rowHeight: E,
|
|
1944
1958
|
height: G,
|
|
1945
1959
|
width: H,
|
|
1946
1960
|
estimatedColumnWidth: Z,
|
|
1947
1961
|
estimatedRowHeight: Y,
|
|
1948
|
-
rowCount:
|
|
1962
|
+
rowCount: I,
|
|
1949
1963
|
className: re(
|
|
1950
1964
|
de["rp-pages"],
|
|
1951
1965
|
m === X.HORIZONTAL_SCROLLING ? de["rp-pages-horizontal-scroll"] : ""
|
|
1952
1966
|
),
|
|
1953
|
-
children:
|
|
1967
|
+
children: Bo
|
|
1954
1968
|
}
|
|
1955
1969
|
) : p ? null : /* @__PURE__ */ a(
|
|
1956
1970
|
"div",
|
|
@@ -1963,41 +1977,41 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
1963
1977
|
height: "100%",
|
|
1964
1978
|
width: "100%"
|
|
1965
1979
|
},
|
|
1966
|
-
children:
|
|
1980
|
+
children: T && /* @__PURE__ */ a(T, {})
|
|
1967
1981
|
}
|
|
1968
1982
|
) }) }) });
|
|
1969
|
-
},
|
|
1983
|
+
}, Ae = {
|
|
1970
1984
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
1971
1985
|
"rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
|
|
1972
1986
|
"rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
|
|
1973
1987
|
"rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
|
|
1974
1988
|
"rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
|
|
1975
|
-
},
|
|
1989
|
+
}, gt = {
|
|
1976
1990
|
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
1977
1991
|
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
1978
1992
|
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
1979
|
-
},
|
|
1993
|
+
}, jo = () => {
|
|
1980
1994
|
const { prevIcon: e } = pe();
|
|
1981
|
-
return e || /* @__PURE__ */ a(
|
|
1982
|
-
},
|
|
1995
|
+
return e || /* @__PURE__ */ a(Me, {});
|
|
1996
|
+
}, Ko = () => {
|
|
1983
1997
|
const { nextIcon: e } = pe();
|
|
1984
|
-
return e || /* @__PURE__ */ a(
|
|
1985
|
-
},
|
|
1986
|
-
const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: i } = ie(), [c, s] = $(e.toString()), { pageNavigationTool: l = !0 } =
|
|
1998
|
+
return e || /* @__PURE__ */ a(Me, { style: { transform: "rotate(180deg" } });
|
|
1999
|
+
}, Xo = () => {
|
|
2000
|
+
const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: i } = ie(), [c, s] = $(e.toString()), { pageNavigationTool: l = !0 } = _e(), { isSmallScreen: u } = ye(), { localeMessages: d } = ue();
|
|
1987
2001
|
A(() => {
|
|
1988
2002
|
s(e.toString());
|
|
1989
2003
|
}, [e]);
|
|
1990
|
-
const f = L((
|
|
1991
|
-
const v =
|
|
2004
|
+
const f = L((b) => {
|
|
2005
|
+
const v = b.target.value;
|
|
1992
2006
|
s(v);
|
|
1993
2007
|
}, []), h = L(async () => {
|
|
1994
|
-
const
|
|
1995
|
-
|
|
2008
|
+
const b = i(c);
|
|
2009
|
+
b.success || s(b.currentPage.toString());
|
|
1996
2010
|
}, [i, c, t]), g = L(() => {
|
|
1997
2011
|
s(e.toString());
|
|
1998
|
-
}, [e]),
|
|
1999
|
-
(
|
|
2000
|
-
|
|
2012
|
+
}, [e]), w = L(
|
|
2013
|
+
(b) => {
|
|
2014
|
+
b.key === "Enter" && h();
|
|
2001
2015
|
},
|
|
2002
2016
|
[h]
|
|
2003
2017
|
);
|
|
@@ -2011,42 +2025,42 @@ const Go = ({ widths: e, heights: t }) => {
|
|
|
2011
2025
|
goToPage: i,
|
|
2012
2026
|
changePage: n
|
|
2013
2027
|
}
|
|
2014
|
-
) : l ? /* @__PURE__ */ D("div", { className:
|
|
2015
|
-
!
|
|
2028
|
+
) : l ? /* @__PURE__ */ D("div", { className: gt["rp-paginate"], children: [
|
|
2029
|
+
!u && /* @__PURE__ */ a(q, { content: d == null ? void 0 : d.previousPageTooltip, children: /* @__PURE__ */ a(
|
|
2016
2030
|
ee,
|
|
2017
2031
|
{
|
|
2018
2032
|
onClick: r,
|
|
2019
|
-
"aria-label":
|
|
2033
|
+
"aria-label": d == null ? void 0 : d.previousPageTooltip,
|
|
2020
2034
|
"aria-disabled": e === 1,
|
|
2021
|
-
children: /* @__PURE__ */ a(
|
|
2035
|
+
children: /* @__PURE__ */ a(jo, {})
|
|
2022
2036
|
}
|
|
2023
2037
|
) }),
|
|
2024
|
-
/* @__PURE__ */ a(q, { content:
|
|
2025
|
-
|
|
2038
|
+
/* @__PURE__ */ a(q, { content: d == null ? void 0 : d.currentPageTooltip, children: /* @__PURE__ */ a(
|
|
2039
|
+
dn,
|
|
2026
2040
|
{
|
|
2027
|
-
onKeyDown:
|
|
2041
|
+
onKeyDown: w,
|
|
2028
2042
|
onBlur: g,
|
|
2029
2043
|
onChange: f,
|
|
2030
2044
|
value: c,
|
|
2031
|
-
className:
|
|
2045
|
+
className: gt["rp-page-input"]
|
|
2032
2046
|
}
|
|
2033
2047
|
) }),
|
|
2034
|
-
/* @__PURE__ */ D("span", { className:
|
|
2048
|
+
/* @__PURE__ */ D("span", { className: gt["rp-total-page"], children: [
|
|
2035
2049
|
"/",
|
|
2036
2050
|
t
|
|
2037
2051
|
] }),
|
|
2038
|
-
!
|
|
2052
|
+
!u && /* @__PURE__ */ a(q, { content: d == null ? void 0 : d.nextPageTooltip, children: /* @__PURE__ */ a(
|
|
2039
2053
|
ee,
|
|
2040
2054
|
{
|
|
2041
2055
|
onClick: o,
|
|
2042
|
-
"aria-label":
|
|
2056
|
+
"aria-label": d == null ? void 0 : d.nextPageTooltip,
|
|
2043
2057
|
"aria-disabled": e === t,
|
|
2044
|
-
children: /* @__PURE__ */ a(
|
|
2058
|
+
children: /* @__PURE__ */ a(Ko, {})
|
|
2045
2059
|
}
|
|
2046
2060
|
) })
|
|
2047
2061
|
] }) : null;
|
|
2048
2062
|
};
|
|
2049
|
-
var
|
|
2063
|
+
var Et = "Dialog", [Nn, ys] = qr(Et), [Yo, se] = Nn(Et), En = (e) => {
|
|
2050
2064
|
const {
|
|
2051
2065
|
__scopeDialog: t,
|
|
2052
2066
|
children: n,
|
|
@@ -2054,72 +2068,72 @@ var Rt = "Dialog", [Ln, xs] = Vr(Rt), [Ko, se] = Ln(Rt), Rn = (e) => {
|
|
|
2054
2068
|
defaultOpen: r,
|
|
2055
2069
|
onOpenChange: i,
|
|
2056
2070
|
modal: c = !0
|
|
2057
|
-
} = e, s = U.useRef(null), l = U.useRef(null), [
|
|
2071
|
+
} = e, s = U.useRef(null), l = U.useRef(null), [u = !1, d] = jr({
|
|
2058
2072
|
prop: o,
|
|
2059
2073
|
defaultProp: r,
|
|
2060
2074
|
onChange: i
|
|
2061
2075
|
});
|
|
2062
2076
|
return /* @__PURE__ */ a(
|
|
2063
|
-
|
|
2077
|
+
Yo,
|
|
2064
2078
|
{
|
|
2065
2079
|
scope: t,
|
|
2066
2080
|
triggerRef: s,
|
|
2067
2081
|
contentRef: l,
|
|
2068
|
-
contentId:
|
|
2069
|
-
titleId:
|
|
2070
|
-
descriptionId:
|
|
2071
|
-
open:
|
|
2072
|
-
onOpenChange:
|
|
2073
|
-
onOpenToggle: U.useCallback(() =>
|
|
2082
|
+
contentId: st(),
|
|
2083
|
+
titleId: st(),
|
|
2084
|
+
descriptionId: st(),
|
|
2085
|
+
open: u,
|
|
2086
|
+
onOpenChange: d,
|
|
2087
|
+
onOpenToggle: U.useCallback(() => d((f) => !f), [d]),
|
|
2074
2088
|
modal: c,
|
|
2075
2089
|
children: n
|
|
2076
2090
|
}
|
|
2077
2091
|
);
|
|
2078
2092
|
};
|
|
2079
|
-
|
|
2080
|
-
var
|
|
2093
|
+
En.displayName = Et;
|
|
2094
|
+
var On = "DialogTrigger", Jo = U.forwardRef(
|
|
2081
2095
|
(e, t) => {
|
|
2082
|
-
const { __scopeDialog: n, ...o } = e, r = se(
|
|
2096
|
+
const { __scopeDialog: n, ...o } = e, r = se(On, n), i = yt(t, r.triggerRef);
|
|
2083
2097
|
return /* @__PURE__ */ a(
|
|
2084
|
-
|
|
2098
|
+
He.button,
|
|
2085
2099
|
{
|
|
2086
2100
|
type: "button",
|
|
2087
2101
|
"aria-haspopup": "dialog",
|
|
2088
2102
|
"aria-expanded": r.open,
|
|
2089
2103
|
"aria-controls": r.contentId,
|
|
2090
|
-
"data-state":
|
|
2104
|
+
"data-state": zt(r.open),
|
|
2091
2105
|
...o,
|
|
2092
2106
|
ref: i,
|
|
2093
|
-
onClick:
|
|
2107
|
+
onClick: ke(e.onClick, r.onOpenToggle)
|
|
2094
2108
|
}
|
|
2095
2109
|
);
|
|
2096
2110
|
}
|
|
2097
2111
|
);
|
|
2098
|
-
|
|
2099
|
-
var
|
|
2112
|
+
Jo.displayName = On;
|
|
2113
|
+
var Ot = "DialogPortal", [Qo, Dn] = Nn(Ot, {
|
|
2100
2114
|
forceMount: void 0
|
|
2101
|
-
}),
|
|
2102
|
-
const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, i = se(
|
|
2103
|
-
return /* @__PURE__ */ a(
|
|
2115
|
+
}), zn = (e) => {
|
|
2116
|
+
const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, i = se(Ot, t);
|
|
2117
|
+
return /* @__PURE__ */ a(Qo, { scope: t, forceMount: n, children: U.Children.map(o, (c) => /* @__PURE__ */ a(Lt, { present: n || i.open, children: /* @__PURE__ */ a(Qr, { asChild: !0, container: r, children: c }) })) });
|
|
2104
2118
|
};
|
|
2105
|
-
|
|
2106
|
-
var
|
|
2119
|
+
zn.displayName = Ot;
|
|
2120
|
+
var je = "DialogOverlay", An = U.forwardRef(
|
|
2107
2121
|
(e, t) => {
|
|
2108
|
-
const n =
|
|
2109
|
-
return i.modal ? /* @__PURE__ */ a(
|
|
2122
|
+
const n = Dn(je, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, i = se(je, e.__scopeDialog);
|
|
2123
|
+
return i.modal ? /* @__PURE__ */ a(Lt, { present: o || i.open, children: /* @__PURE__ */ a(ei, { ...r, ref: t }) }) : null;
|
|
2110
2124
|
}
|
|
2111
2125
|
);
|
|
2112
|
-
|
|
2113
|
-
var
|
|
2126
|
+
An.displayName = je;
|
|
2127
|
+
var ei = U.forwardRef(
|
|
2114
2128
|
(e, t) => {
|
|
2115
|
-
const { __scopeDialog: n, ...o } = e, r = se(
|
|
2129
|
+
const { __scopeDialog: n, ...o } = e, r = se(je, n);
|
|
2116
2130
|
return (
|
|
2117
2131
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2118
2132
|
// ie. when `Overlay` and `Content` are siblings
|
|
2119
|
-
/* @__PURE__ */ a(
|
|
2120
|
-
|
|
2133
|
+
/* @__PURE__ */ a(Xr, { as: Zr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ a(
|
|
2134
|
+
He.div,
|
|
2121
2135
|
{
|
|
2122
|
-
"data-state":
|
|
2136
|
+
"data-state": zt(r.open),
|
|
2123
2137
|
...o,
|
|
2124
2138
|
ref: t,
|
|
2125
2139
|
style: { pointerEvents: "auto", ...o.style }
|
|
@@ -2127,47 +2141,47 @@ var Jo = U.forwardRef(
|
|
|
2127
2141
|
) })
|
|
2128
2142
|
);
|
|
2129
2143
|
}
|
|
2130
|
-
), Ie = "DialogContent",
|
|
2144
|
+
), Ie = "DialogContent", Fn = U.forwardRef(
|
|
2131
2145
|
(e, t) => {
|
|
2132
|
-
const n =
|
|
2133
|
-
return /* @__PURE__ */ a(
|
|
2146
|
+
const n = Dn(Ie, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, i = se(Ie, e.__scopeDialog);
|
|
2147
|
+
return /* @__PURE__ */ a(Lt, { present: o || i.open, children: i.modal ? /* @__PURE__ */ a(ti, { ...r, ref: t }) : /* @__PURE__ */ a(ni, { ...r, ref: t }) });
|
|
2134
2148
|
}
|
|
2135
2149
|
);
|
|
2136
|
-
|
|
2137
|
-
var
|
|
2150
|
+
Fn.displayName = Ie;
|
|
2151
|
+
var ti = U.forwardRef(
|
|
2138
2152
|
(e, t) => {
|
|
2139
|
-
const n = se(Ie, e.__scopeDialog), o = U.useRef(null), r =
|
|
2153
|
+
const n = se(Ie, e.__scopeDialog), o = U.useRef(null), r = yt(t, n.contentRef, o);
|
|
2140
2154
|
return U.useEffect(() => {
|
|
2141
2155
|
const i = o.current;
|
|
2142
2156
|
if (i)
|
|
2143
|
-
return
|
|
2157
|
+
return eo(i);
|
|
2144
2158
|
}, []), /* @__PURE__ */ a(
|
|
2145
|
-
|
|
2159
|
+
kn,
|
|
2146
2160
|
{
|
|
2147
2161
|
...e,
|
|
2148
2162
|
ref: r,
|
|
2149
2163
|
trapFocus: n.open,
|
|
2150
2164
|
disableOutsidePointerEvents: !0,
|
|
2151
|
-
onCloseAutoFocus:
|
|
2165
|
+
onCloseAutoFocus: ke(e.onCloseAutoFocus, (i) => {
|
|
2152
2166
|
var c;
|
|
2153
2167
|
i.preventDefault(), (c = n.triggerRef.current) == null || c.focus();
|
|
2154
2168
|
}),
|
|
2155
|
-
onPointerDownOutside:
|
|
2169
|
+
onPointerDownOutside: ke(e.onPointerDownOutside, (i) => {
|
|
2156
2170
|
const c = i.detail.originalEvent, s = c.button === 0 && c.ctrlKey === !0;
|
|
2157
2171
|
(c.button === 2 || s) && i.preventDefault();
|
|
2158
2172
|
}),
|
|
2159
|
-
onFocusOutside:
|
|
2173
|
+
onFocusOutside: ke(
|
|
2160
2174
|
e.onFocusOutside,
|
|
2161
2175
|
(i) => i.preventDefault()
|
|
2162
2176
|
)
|
|
2163
2177
|
}
|
|
2164
2178
|
);
|
|
2165
2179
|
}
|
|
2166
|
-
),
|
|
2180
|
+
), ni = U.forwardRef(
|
|
2167
2181
|
(e, t) => {
|
|
2168
2182
|
const n = se(Ie, e.__scopeDialog), o = U.useRef(!1), r = U.useRef(!1);
|
|
2169
2183
|
return /* @__PURE__ */ a(
|
|
2170
|
-
|
|
2184
|
+
kn,
|
|
2171
2185
|
{
|
|
2172
2186
|
...e,
|
|
2173
2187
|
ref: t,
|
|
@@ -2178,20 +2192,20 @@ var Qo = U.forwardRef(
|
|
|
2178
2192
|
(c = e.onCloseAutoFocus) == null || c.call(e, i), i.defaultPrevented || (o.current || (s = n.triggerRef.current) == null || s.focus(), i.preventDefault()), o.current = !1, r.current = !1;
|
|
2179
2193
|
},
|
|
2180
2194
|
onInteractOutside: (i) => {
|
|
2181
|
-
var l,
|
|
2195
|
+
var l, u;
|
|
2182
2196
|
(l = e.onInteractOutside) == null || l.call(e, i), i.defaultPrevented || (o.current = !0, i.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
2183
2197
|
const c = i.target;
|
|
2184
|
-
((
|
|
2198
|
+
((u = n.triggerRef.current) == null ? void 0 : u.contains(c)) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && r.current && i.preventDefault();
|
|
2185
2199
|
}
|
|
2186
2200
|
}
|
|
2187
2201
|
);
|
|
2188
2202
|
}
|
|
2189
|
-
),
|
|
2203
|
+
), kn = U.forwardRef(
|
|
2190
2204
|
(e, t) => {
|
|
2191
|
-
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: i, ...c } = e, s = se(Ie, n), l = U.useRef(null),
|
|
2192
|
-
return
|
|
2205
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: i, ...c } = e, s = se(Ie, n), l = U.useRef(null), u = yt(t, l);
|
|
2206
|
+
return Yr(), /* @__PURE__ */ D(Se, { children: [
|
|
2193
2207
|
/* @__PURE__ */ a(
|
|
2194
|
-
|
|
2208
|
+
Jr,
|
|
2195
2209
|
{
|
|
2196
2210
|
asChild: !0,
|
|
2197
2211
|
loop: !0,
|
|
@@ -2199,64 +2213,64 @@ var Qo = U.forwardRef(
|
|
|
2199
2213
|
onMountAutoFocus: r,
|
|
2200
2214
|
onUnmountAutoFocus: i,
|
|
2201
2215
|
children: /* @__PURE__ */ a(
|
|
2202
|
-
|
|
2216
|
+
Kr,
|
|
2203
2217
|
{
|
|
2204
2218
|
role: "dialog",
|
|
2205
2219
|
id: s.contentId,
|
|
2206
2220
|
"aria-describedby": s.descriptionId,
|
|
2207
2221
|
"aria-labelledby": s.titleId,
|
|
2208
|
-
"data-state":
|
|
2222
|
+
"data-state": zt(s.open),
|
|
2209
2223
|
...c,
|
|
2210
|
-
ref:
|
|
2224
|
+
ref: u,
|
|
2211
2225
|
onDismiss: () => s.onOpenChange(!1)
|
|
2212
2226
|
}
|
|
2213
2227
|
)
|
|
2214
2228
|
}
|
|
2215
2229
|
),
|
|
2216
|
-
/* @__PURE__ */ D(
|
|
2217
|
-
/* @__PURE__ */ a(
|
|
2218
|
-
/* @__PURE__ */ a(
|
|
2230
|
+
/* @__PURE__ */ D(Se, { children: [
|
|
2231
|
+
/* @__PURE__ */ a(oi, { titleId: s.titleId }),
|
|
2232
|
+
/* @__PURE__ */ a(ai, { contentRef: l, descriptionId: s.descriptionId })
|
|
2219
2233
|
] })
|
|
2220
2234
|
] });
|
|
2221
2235
|
}
|
|
2222
|
-
),
|
|
2236
|
+
), Dt = "DialogTitle", Mn = U.forwardRef(
|
|
2223
2237
|
(e, t) => {
|
|
2224
|
-
const { __scopeDialog: n, ...o } = e, r = se(
|
|
2225
|
-
return /* @__PURE__ */ a(
|
|
2238
|
+
const { __scopeDialog: n, ...o } = e, r = se(Dt, n);
|
|
2239
|
+
return /* @__PURE__ */ a(He.h2, { id: r.titleId, ...o, ref: t });
|
|
2226
2240
|
}
|
|
2227
2241
|
);
|
|
2228
|
-
|
|
2229
|
-
var
|
|
2242
|
+
Mn.displayName = Dt;
|
|
2243
|
+
var Wn = "DialogDescription", ri = U.forwardRef(
|
|
2230
2244
|
(e, t) => {
|
|
2231
|
-
const { __scopeDialog: n, ...o } = e, r = se(
|
|
2232
|
-
return /* @__PURE__ */ a(
|
|
2245
|
+
const { __scopeDialog: n, ...o } = e, r = se(Wn, n);
|
|
2246
|
+
return /* @__PURE__ */ a(He.p, { id: r.descriptionId, ...o, ref: t });
|
|
2233
2247
|
}
|
|
2234
2248
|
);
|
|
2235
|
-
|
|
2236
|
-
var
|
|
2249
|
+
ri.displayName = Wn;
|
|
2250
|
+
var Hn = "DialogClose", $n = U.forwardRef(
|
|
2237
2251
|
(e, t) => {
|
|
2238
|
-
const { __scopeDialog: n, ...o } = e, r = se(
|
|
2252
|
+
const { __scopeDialog: n, ...o } = e, r = se(Hn, n);
|
|
2239
2253
|
return /* @__PURE__ */ a(
|
|
2240
|
-
|
|
2254
|
+
He.button,
|
|
2241
2255
|
{
|
|
2242
2256
|
type: "button",
|
|
2243
2257
|
...o,
|
|
2244
2258
|
ref: t,
|
|
2245
|
-
onClick:
|
|
2259
|
+
onClick: ke(e.onClick, () => r.onOpenChange(!1))
|
|
2246
2260
|
}
|
|
2247
2261
|
);
|
|
2248
2262
|
}
|
|
2249
2263
|
);
|
|
2250
|
-
|
|
2251
|
-
function
|
|
2264
|
+
$n.displayName = Hn;
|
|
2265
|
+
function zt(e) {
|
|
2252
2266
|
return e ? "open" : "closed";
|
|
2253
2267
|
}
|
|
2254
|
-
var
|
|
2268
|
+
var Gn = "DialogTitleWarning", [Ls, Vn] = Br(Gn, {
|
|
2255
2269
|
contentName: Ie,
|
|
2256
|
-
titleName:
|
|
2270
|
+
titleName: Dt,
|
|
2257
2271
|
docsSlug: "dialog"
|
|
2258
|
-
}),
|
|
2259
|
-
const t =
|
|
2272
|
+
}), oi = ({ titleId: e }) => {
|
|
2273
|
+
const t = Vn(Gn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2260
2274
|
|
|
2261
2275
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2262
2276
|
|
|
@@ -2264,15 +2278,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2264
2278
|
return U.useEffect(() => {
|
|
2265
2279
|
e && (document.getElementById(e) || console.error(n));
|
|
2266
2280
|
}, [n, e]), null;
|
|
2267
|
-
},
|
|
2268
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
2281
|
+
}, ii = "DialogDescriptionWarning", ai = ({ contentRef: e, descriptionId: t }) => {
|
|
2282
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vn(ii).contentName}}.`;
|
|
2269
2283
|
return U.useEffect(() => {
|
|
2270
2284
|
var i;
|
|
2271
2285
|
const r = (i = e.current) == null ? void 0 : i.getAttribute("aria-describedby");
|
|
2272
2286
|
t && r && (document.getElementById(t) || console.warn(o));
|
|
2273
2287
|
}, [o, e, t]), null;
|
|
2274
|
-
},
|
|
2275
|
-
const
|
|
2288
|
+
}, si = En, ci = zn, li = An, di = Fn, ui = Mn, pi = $n;
|
|
2289
|
+
const xe = {
|
|
2276
2290
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2277
2291
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
2278
2292
|
"rp-document-dialog": "_rp-document-dialog_slqo7_13",
|
|
@@ -2280,21 +2294,21 @@ const Se = {
|
|
|
2280
2294
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2281
2295
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2282
2296
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2283
|
-
},
|
|
2284
|
-
const { pdfProperties: e } = K(), { container: t } =
|
|
2297
|
+
}, hi = () => {
|
|
2298
|
+
const { pdfProperties: e } = K(), { container: t } = Te(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = no(), { localeMessages: r } = ue(), i = F(() => {
|
|
2285
2299
|
if (!e)
|
|
2286
2300
|
return [];
|
|
2287
2301
|
const {
|
|
2288
2302
|
fileSize: c,
|
|
2289
2303
|
filename: s,
|
|
2290
2304
|
title: l,
|
|
2291
|
-
author:
|
|
2292
|
-
subject:
|
|
2305
|
+
author: u,
|
|
2306
|
+
subject: d,
|
|
2293
2307
|
createdOn: f,
|
|
2294
2308
|
creator: h,
|
|
2295
2309
|
keywords: g,
|
|
2296
|
-
modifiedOn:
|
|
2297
|
-
pdfProducer:
|
|
2310
|
+
modifiedOn: w,
|
|
2311
|
+
pdfProducer: b,
|
|
2298
2312
|
pdfVersion: v,
|
|
2299
2313
|
pageCount: _
|
|
2300
2314
|
} = e;
|
|
@@ -2303,66 +2317,66 @@ const Se = {
|
|
|
2303
2317
|
{ label: r == null ? void 0 : r.propertiesFileSizeLabel, value: c },
|
|
2304
2318
|
{ separate: !0 },
|
|
2305
2319
|
{ label: r == null ? void 0 : r.propertiesTitleLabel, value: l },
|
|
2306
|
-
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value:
|
|
2307
|
-
{ label: r == null ? void 0 : r.propertiesSubjectLabel, value:
|
|
2320
|
+
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value: u },
|
|
2321
|
+
{ label: r == null ? void 0 : r.propertiesSubjectLabel, value: d },
|
|
2308
2322
|
{ label: r == null ? void 0 : r.propertiesKeywordLabel, value: g },
|
|
2309
2323
|
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value: h },
|
|
2310
2324
|
{
|
|
2311
2325
|
label: r == null ? void 0 : r.propertiesCreateOnLabel,
|
|
2312
|
-
value: f ?
|
|
2326
|
+
value: f ? $t(f) : ""
|
|
2313
2327
|
},
|
|
2314
2328
|
{
|
|
2315
2329
|
label: r == null ? void 0 : r.propertiesModifiedOnLabel,
|
|
2316
|
-
value:
|
|
2330
|
+
value: w ? $t(w) : ""
|
|
2317
2331
|
},
|
|
2318
2332
|
{ separate: !0 },
|
|
2319
|
-
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value:
|
|
2333
|
+
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: b },
|
|
2320
2334
|
{ label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: v },
|
|
2321
2335
|
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value: _ }
|
|
2322
2336
|
];
|
|
2323
2337
|
}, [e, r]);
|
|
2324
|
-
return /* @__PURE__ */ a(
|
|
2325
|
-
/* @__PURE__ */ a(
|
|
2326
|
-
/* @__PURE__ */ D(
|
|
2327
|
-
/* @__PURE__ */ a(
|
|
2328
|
-
/* @__PURE__ */ a("div", { className:
|
|
2329
|
-
/* @__PURE__ */ a(
|
|
2338
|
+
return /* @__PURE__ */ a(si, { open: n, onOpenChange: o, children: /* @__PURE__ */ a(ci, { container: t, children: /* @__PURE__ */ D("div", { className: xe["rp-dialog-wrapper"], children: [
|
|
2339
|
+
/* @__PURE__ */ a(li, { className: xe["rp-dialog-overlay"] }),
|
|
2340
|
+
/* @__PURE__ */ D(di, { className: xe["rp-document-dialog"], children: [
|
|
2341
|
+
/* @__PURE__ */ a(ui, { className: xe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2342
|
+
/* @__PURE__ */ a("div", { className: xe["rp-document-properties"], children: i.map((c, s) => /* @__PURE__ */ a("div", { children: c.separate ? /* @__PURE__ */ a("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ a(to, { label: c.label, value: c.value }) }, s)) }),
|
|
2343
|
+
/* @__PURE__ */ a(pi, { asChild: !0, className: xe["rp-dialog-close"], children: /* @__PURE__ */ a(vn, {}) })
|
|
2330
2344
|
] })
|
|
2331
2345
|
] }) }) });
|
|
2332
|
-
},
|
|
2346
|
+
}, mi = {
|
|
2333
2347
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2334
|
-
},
|
|
2348
|
+
}, on = ".pdf", fi = (e) => URL.createObjectURL(e), gi = async (e) => {
|
|
2335
2349
|
const n = await (await fetch(e)).blob();
|
|
2336
|
-
return
|
|
2337
|
-
},
|
|
2338
|
-
const { filename: e, pdfSrc: t } = K(), { downloadFilename: n } =
|
|
2350
|
+
return fi(n);
|
|
2351
|
+
}, Un = () => {
|
|
2352
|
+
const { filename: e, pdfSrc: t } = K(), { downloadFilename: n } = _r(), o = (i) => {
|
|
2339
2353
|
const c = n || i;
|
|
2340
|
-
return c.endsWith(
|
|
2354
|
+
return c.endsWith(on) ? c : `${c}${on}`;
|
|
2341
2355
|
};
|
|
2342
2356
|
return { download: L(async () => {
|
|
2343
2357
|
if (!e || !t)
|
|
2344
2358
|
throw new Error("There is no PDF source to download");
|
|
2345
2359
|
const i = document.createElement("a");
|
|
2346
|
-
i.href = await
|
|
2360
|
+
i.href = await gi(t), i.download = o(e), document.body.appendChild(i), i.click(), document.body.removeChild(i);
|
|
2347
2361
|
}, [e, t]) };
|
|
2348
|
-
},
|
|
2362
|
+
}, qn = () => {
|
|
2349
2363
|
const { downloadIcon: e } = pe();
|
|
2350
|
-
return e || /* @__PURE__ */ a(
|
|
2351
|
-
},
|
|
2352
|
-
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(
|
|
2364
|
+
return e || /* @__PURE__ */ a(so, {});
|
|
2365
|
+
}, Zn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ a(q, { className: t, content: n == null ? void 0 : n.downloadFileTooltip, children: e }), vi = ({ download: e, localeMessages: t }) => /* @__PURE__ */ a(Zn, { localeMessages: t, children: /* @__PURE__ */ a(ee, { onClick: e, "aria-label": t == null ? void 0 : t.downloadFileTooltip, children: /* @__PURE__ */ a(qn, {}) }) }), _i = ({ download: e, localeMessages: t }) => /* @__PURE__ */ a(Ce, { onClick: e, children: /* @__PURE__ */ D(Zn, { className: "rp-menu-item", localeMessages: t, children: [
|
|
2366
|
+
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(qn, {}) }),
|
|
2353
2367
|
t == null ? void 0 : t.downloadFileLabel
|
|
2354
|
-
] }) }),
|
|
2355
|
-
const { download: e } =
|
|
2356
|
-
return t ? n ? /* @__PURE__ */ a(
|
|
2357
|
-
},
|
|
2368
|
+
] }) }), Bn = () => {
|
|
2369
|
+
const { download: e } = Un(), { downloadTool: t = !0 } = _e(), { isSmallScreen: n } = ye(), { localeMessages: o } = ue();
|
|
2370
|
+
return t ? n ? /* @__PURE__ */ a(_i, { download: e, localeMessages: o }) : typeof t == "function" ? /* @__PURE__ */ a(t, { download: e }) : t ? /* @__PURE__ */ a(vi, { download: e, localeMessages: o }) : null : null;
|
|
2371
|
+
}, jn = () => {
|
|
2358
2372
|
const { printIcon: e } = pe();
|
|
2359
|
-
return e || /* @__PURE__ */ a(
|
|
2360
|
-
},
|
|
2361
|
-
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(
|
|
2373
|
+
return e || /* @__PURE__ */ a(co, {});
|
|
2374
|
+
}, Kn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ a(q, { className: t, content: n == null ? void 0 : n.printTooltip, children: e }), wi = ({ print: e, localeMessages: t }) => /* @__PURE__ */ a(Kn, { localeMessages: t, children: /* @__PURE__ */ a(ee, { onClick: e, "aria-label": t == null ? void 0 : t.printTooltip, children: /* @__PURE__ */ a(jn, {}) }) }), bi = ({ print: e, localeMessages: t }) => /* @__PURE__ */ a(Ce, { onClick: e, children: /* @__PURE__ */ D(Kn, { className: "rp-menu-item", localeMessages: t, children: [
|
|
2375
|
+
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(jn, {}) }),
|
|
2362
2376
|
t == null ? void 0 : t.printLabel
|
|
2363
|
-
] }) }),
|
|
2364
|
-
const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: i } =
|
|
2365
|
-
return c ? s ? /* @__PURE__ */ a(
|
|
2377
|
+
] }) }), Xn = () => {
|
|
2378
|
+
const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: i } = nt(), { printTool: c = !0 } = _e(), { isSmallScreen: s } = ye(), { localeMessages: l } = ue();
|
|
2379
|
+
return c ? s ? /* @__PURE__ */ a(bi, { print: e, localeMessages: l }) : typeof c == "function" ? /* @__PURE__ */ a(
|
|
2366
2380
|
c,
|
|
2367
2381
|
{
|
|
2368
2382
|
print: e,
|
|
@@ -2372,34 +2386,34 @@ const Se = {
|
|
|
2372
2386
|
setOnComplete: o,
|
|
2373
2387
|
progress: i
|
|
2374
2388
|
}
|
|
2375
|
-
) : c ? /* @__PURE__ */ a(
|
|
2376
|
-
},
|
|
2389
|
+
) : c ? /* @__PURE__ */ a(wi, { print: e, localeMessages: l }) : null : null;
|
|
2390
|
+
}, Ci = {
|
|
2377
2391
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2378
|
-
},
|
|
2392
|
+
}, Ti = () => {
|
|
2379
2393
|
const { goToFirstPageIcon: e } = pe();
|
|
2380
|
-
return e || /* @__PURE__ */ a(
|
|
2381
|
-
},
|
|
2394
|
+
return e || /* @__PURE__ */ a(wn, { className: Ci["rp-go-to-Top"] });
|
|
2395
|
+
}, Pi = () => {
|
|
2382
2396
|
const { goToLastPageIcon: e } = pe();
|
|
2383
|
-
return e || /* @__PURE__ */ a(
|
|
2384
|
-
},
|
|
2385
|
-
const { goToPage: e, totalPages: t, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } =
|
|
2397
|
+
return e || /* @__PURE__ */ a(wn, {});
|
|
2398
|
+
}, an = { width: "100%" }, xi = () => {
|
|
2399
|
+
const { goToPage: e, totalPages: t, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = _e(), { localeMessages: r } = ue(), i = F(() => n === 1, [n]), c = F(() => n === t, [n, t]), s = L(() => {
|
|
2386
2400
|
e(1);
|
|
2387
2401
|
}, [e]), l = L(() => {
|
|
2388
2402
|
e(t);
|
|
2389
2403
|
}, [e, t]);
|
|
2390
|
-
return o ? /* @__PURE__ */ D(
|
|
2391
|
-
/* @__PURE__ */ a(
|
|
2392
|
-
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(
|
|
2404
|
+
return o ? /* @__PURE__ */ D(Be, { children: [
|
|
2405
|
+
/* @__PURE__ */ a(Ce, { onClick: s, children: /* @__PURE__ */ a(q, { content: r == null ? void 0 : r.firstPageTooltip, style: an, children: /* @__PURE__ */ D("div", { className: "rp-menu-item", "aria-disabled": i, children: [
|
|
2406
|
+
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Ti, {}) }),
|
|
2393
2407
|
/* @__PURE__ */ a("span", { children: r == null ? void 0 : r.firstPageLabel })
|
|
2394
2408
|
] }) }) }),
|
|
2395
|
-
/* @__PURE__ */ a(
|
|
2396
|
-
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(
|
|
2409
|
+
/* @__PURE__ */ a(Ce, { onClick: l, children: /* @__PURE__ */ a(q, { content: r == null ? void 0 : r.lastPageTooltip, style: an, children: /* @__PURE__ */ D("div", { className: "rp-menu-item", "aria-disabled": c, children: [
|
|
2410
|
+
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Pi, {}) }),
|
|
2397
2411
|
/* @__PURE__ */ a("span", { children: r == null ? void 0 : r.lastPageLabel })
|
|
2398
2412
|
] }) }) }),
|
|
2399
|
-
/* @__PURE__ */ a(
|
|
2413
|
+
/* @__PURE__ */ a(Rt, {})
|
|
2400
2414
|
] }) : null;
|
|
2401
|
-
},
|
|
2402
|
-
const { container: e } =
|
|
2415
|
+
}, Si = () => {
|
|
2416
|
+
const { container: e } = Te(), { isSmallScreen: t } = ye(), {
|
|
2403
2417
|
openFileTool: n,
|
|
2404
2418
|
downloadTool: o,
|
|
2405
2419
|
documentProperties: r,
|
|
@@ -2407,13 +2421,13 @@ const Se = {
|
|
|
2407
2421
|
rotateTool: c,
|
|
2408
2422
|
selectionModeTool: s,
|
|
2409
2423
|
jumpNavigationTool: l,
|
|
2410
|
-
printTool:
|
|
2411
|
-
fullscreenTool:
|
|
2412
|
-
} =
|
|
2424
|
+
printTool: u,
|
|
2425
|
+
fullscreenTool: d
|
|
2426
|
+
} = _e(), { localeMessages: f } = ue();
|
|
2413
2427
|
return F(() => {
|
|
2414
2428
|
const g = l || c || s || i || r;
|
|
2415
|
-
let
|
|
2416
|
-
return t && (
|
|
2429
|
+
let w = !1;
|
|
2430
|
+
return t && (w = !(!n && !o && !u && !d)), g || w;
|
|
2417
2431
|
}, [
|
|
2418
2432
|
n,
|
|
2419
2433
|
o,
|
|
@@ -2423,41 +2437,41 @@ const Se = {
|
|
|
2423
2437
|
s,
|
|
2424
2438
|
l,
|
|
2425
2439
|
t
|
|
2426
|
-
]) ? /* @__PURE__ */ D(
|
|
2440
|
+
]) ? /* @__PURE__ */ D(ro, { children: [
|
|
2427
2441
|
/* @__PURE__ */ a(
|
|
2428
|
-
|
|
2442
|
+
gn,
|
|
2429
2443
|
{
|
|
2430
2444
|
container: e,
|
|
2431
|
-
triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(q, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ a(ee, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ a(
|
|
2432
|
-
children: /* @__PURE__ */ D("div", { className:
|
|
2433
|
-
t && /* @__PURE__ */ D(
|
|
2434
|
-
/* @__PURE__ */ a(
|
|
2435
|
-
/* @__PURE__ */ a(
|
|
2436
|
-
/* @__PURE__ */ a(
|
|
2437
|
-
/* @__PURE__ */ a(
|
|
2438
|
-
/* @__PURE__ */ a(
|
|
2445
|
+
triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(q, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ a(ee, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ a(Ur, {}) }) }) }),
|
|
2446
|
+
children: /* @__PURE__ */ D("div", { className: mi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2447
|
+
t && /* @__PURE__ */ D(Be, { children: [
|
|
2448
|
+
/* @__PURE__ */ a(fn, {}),
|
|
2449
|
+
/* @__PURE__ */ a(Bn, {}),
|
|
2450
|
+
/* @__PURE__ */ a(Xn, {}),
|
|
2451
|
+
/* @__PURE__ */ a(_n, {}),
|
|
2452
|
+
/* @__PURE__ */ a(Rt, {})
|
|
2439
2453
|
] }),
|
|
2440
|
-
/* @__PURE__ */ a(
|
|
2441
|
-
/* @__PURE__ */ a(
|
|
2442
|
-
/* @__PURE__ */ a(
|
|
2443
|
-
/* @__PURE__ */ a(
|
|
2444
|
-
/* @__PURE__ */ a(
|
|
2454
|
+
/* @__PURE__ */ a(xi, {}),
|
|
2455
|
+
/* @__PURE__ */ a(io, {}),
|
|
2456
|
+
/* @__PURE__ */ a(lo, {}),
|
|
2457
|
+
/* @__PURE__ */ a(ao, {}),
|
|
2458
|
+
/* @__PURE__ */ a(oo, {})
|
|
2445
2459
|
] })
|
|
2446
2460
|
}
|
|
2447
2461
|
),
|
|
2448
|
-
/* @__PURE__ */ a(
|
|
2462
|
+
/* @__PURE__ */ a(hi, {})
|
|
2449
2463
|
] }) : null;
|
|
2450
|
-
},
|
|
2464
|
+
}, Ii = () => {
|
|
2451
2465
|
const { isSmallScreen: e } = ye();
|
|
2452
|
-
return /* @__PURE__ */ D(
|
|
2453
|
-
/* @__PURE__ */ a(
|
|
2454
|
-
!e && /* @__PURE__ */ D(
|
|
2455
|
-
/* @__PURE__ */ a(
|
|
2456
|
-
/* @__PURE__ */ a(
|
|
2457
|
-
/* @__PURE__ */ a(
|
|
2458
|
-
/* @__PURE__ */ a(
|
|
2466
|
+
return /* @__PURE__ */ D(Se, { children: [
|
|
2467
|
+
/* @__PURE__ */ a(Vr, {}),
|
|
2468
|
+
!e && /* @__PURE__ */ D(Se, { children: [
|
|
2469
|
+
/* @__PURE__ */ a(fn, {}),
|
|
2470
|
+
/* @__PURE__ */ a(Bn, {}),
|
|
2471
|
+
/* @__PURE__ */ a(Xn, {}),
|
|
2472
|
+
/* @__PURE__ */ a(_n, {})
|
|
2459
2473
|
] }),
|
|
2460
|
-
/* @__PURE__ */ a(
|
|
2474
|
+
/* @__PURE__ */ a(Si, {})
|
|
2461
2475
|
] });
|
|
2462
2476
|
}, Re = {
|
|
2463
2477
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
|
|
@@ -2465,87 +2479,87 @@ const Se = {
|
|
|
2465
2479
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2466
2480
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2467
2481
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2468
|
-
},
|
|
2482
|
+
}, yi = 25, vt = 1e3, Li = [50, 75, 100, 125, 150, 200, 300, 400], Ri = () => {
|
|
2469
2483
|
const { zoomInIcon: e } = pe();
|
|
2470
|
-
return e || /* @__PURE__ */ a(
|
|
2471
|
-
},
|
|
2484
|
+
return e || /* @__PURE__ */ a(uo, {});
|
|
2485
|
+
}, Ni = () => {
|
|
2472
2486
|
const { zoomOutIcon: e } = pe();
|
|
2473
|
-
return e || /* @__PURE__ */ a(
|
|
2474
|
-
},
|
|
2475
|
-
const { zoomLevel: e, setZoomLevel: t } =
|
|
2487
|
+
return e || /* @__PURE__ */ a(po, {});
|
|
2488
|
+
}, Ei = () => {
|
|
2489
|
+
const { zoomLevel: e, setZoomLevel: t } = Je(), { container: n, contentRef: o } = Te(), { zoomTool: r = !0 } = _e(), { focusedPage: i } = ie(), { rotate: c } = Ye(), { pages: s } = K(), { isSmallScreen: l } = ye(), { localeMessages: u } = ue(), d = L(() => {
|
|
2476
2490
|
t((_) => {
|
|
2477
2491
|
const m = Math.floor(_ / 25) * 25;
|
|
2478
|
-
return Math.min(m + 25,
|
|
2492
|
+
return Math.min(m + 25, vt);
|
|
2479
2493
|
});
|
|
2480
2494
|
}, [t]), f = L(() => {
|
|
2481
2495
|
t((_) => {
|
|
2482
2496
|
const m = Math.ceil(_ / 25) * 25;
|
|
2483
|
-
return Math.min(m - 25,
|
|
2497
|
+
return Math.min(m - 25, vt);
|
|
2484
2498
|
});
|
|
2485
|
-
}, [t]), h = F(() => e ===
|
|
2499
|
+
}, [t]), h = F(() => e === yi, [e]), g = F(() => e === vt, [e]), w = F(() => {
|
|
2486
2500
|
var _;
|
|
2487
2501
|
return (_ = s.get(i)) == null ? void 0 : _.page.getViewport({ scale: 1, rotation: c });
|
|
2488
|
-
}, [s, i, c]),
|
|
2502
|
+
}, [s, i, c]), b = L(
|
|
2489
2503
|
(_) => {
|
|
2490
|
-
const m = ((
|
|
2491
|
-
t(
|
|
2504
|
+
const m = ((w == null ? void 0 : w.width) || 0) + 2 * Gt, P = ((w == null ? void 0 : w.height) || 0) + 2 * Gt, x = (o == null ? void 0 : o.clientWidth) || 0, p = (o == null ? void 0 : o.clientHeight) || 0, T = ho(_, x, p, m, P);
|
|
2505
|
+
t(T);
|
|
2492
2506
|
},
|
|
2493
|
-
[t,
|
|
2507
|
+
[t, w]
|
|
2494
2508
|
), v = L(
|
|
2495
2509
|
(_) => {
|
|
2496
|
-
typeof _ == "number" ? t(_) :
|
|
2510
|
+
typeof _ == "number" ? t(_) : b(_);
|
|
2497
2511
|
},
|
|
2498
|
-
[t,
|
|
2512
|
+
[t, b]
|
|
2499
2513
|
);
|
|
2500
2514
|
return typeof r != "boolean" ? /* @__PURE__ */ a(r, { zoomLevel: e, setZoomLevel: t }) : r ? /* @__PURE__ */ D("div", { className: Re["rp-zoom-wrapper"], children: [
|
|
2501
|
-
/* @__PURE__ */ a(q, { content:
|
|
2515
|
+
/* @__PURE__ */ a(q, { content: u == null ? void 0 : u.zoomOutTooltip, children: /* @__PURE__ */ a(
|
|
2502
2516
|
ee,
|
|
2503
2517
|
{
|
|
2504
2518
|
disabled: h,
|
|
2505
2519
|
onClick: f,
|
|
2506
|
-
"aria-label":
|
|
2507
|
-
children: /* @__PURE__ */ a(
|
|
2520
|
+
"aria-label": u == null ? void 0 : u.zoomOutTooltip,
|
|
2521
|
+
children: /* @__PURE__ */ a(Ni, {})
|
|
2508
2522
|
}
|
|
2509
2523
|
) }),
|
|
2510
2524
|
!l && /* @__PURE__ */ a(
|
|
2511
|
-
|
|
2525
|
+
gn,
|
|
2512
2526
|
{
|
|
2513
2527
|
container: n,
|
|
2514
|
-
triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(q, { content:
|
|
2528
|
+
triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(q, { content: u == null ? void 0 : u.zoomSelectTooltip, children: /* @__PURE__ */ D(
|
|
2515
2529
|
ee,
|
|
2516
2530
|
{
|
|
2517
2531
|
className: Re["rp-current-zoom-wrapper"],
|
|
2518
|
-
"aria-label":
|
|
2532
|
+
"aria-label": u == null ? void 0 : u.zoomSelectTooltip,
|
|
2519
2533
|
children: [
|
|
2520
2534
|
/* @__PURE__ */ a("span", { className: Re["rp-current-zoom-text"], children: e }),
|
|
2521
2535
|
/* @__PURE__ */ a("span", { className: Re["rp-current-zoom-text"], children: "%" }),
|
|
2522
|
-
/* @__PURE__ */ a(
|
|
2536
|
+
/* @__PURE__ */ a(Me, { className: Re["rp-current-zoom-icon"] })
|
|
2523
2537
|
]
|
|
2524
2538
|
}
|
|
2525
2539
|
) }) }),
|
|
2526
2540
|
style: { minWidth: "200px" },
|
|
2527
2541
|
align: "center",
|
|
2528
2542
|
children: /* @__PURE__ */ D("div", { className: Re["rp-zoom-dropdown-content"], children: [
|
|
2529
|
-
/* @__PURE__ */ D(
|
|
2530
|
-
/* @__PURE__ */ a(
|
|
2531
|
-
/* @__PURE__ */ a(
|
|
2532
|
-
/* @__PURE__ */ a(
|
|
2543
|
+
/* @__PURE__ */ D(Be, { children: [
|
|
2544
|
+
/* @__PURE__ */ a(Ce, { onClick: () => v(it.ACTUAL), children: u == null ? void 0 : u.zoomActualSize }),
|
|
2545
|
+
/* @__PURE__ */ a(Ce, { onClick: () => v(it.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
|
|
2546
|
+
/* @__PURE__ */ a(Ce, { onClick: () => v(it.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
|
|
2533
2547
|
] }),
|
|
2534
|
-
/* @__PURE__ */ a(
|
|
2535
|
-
/* @__PURE__ */ a(
|
|
2548
|
+
/* @__PURE__ */ a(Rt, {}),
|
|
2549
|
+
/* @__PURE__ */ a(Be, { children: Li.map((_) => /* @__PURE__ */ D(Ce, { onClick: () => v(_), children: [
|
|
2536
2550
|
_,
|
|
2537
2551
|
" %"
|
|
2538
2552
|
] }, _)) })
|
|
2539
2553
|
] })
|
|
2540
2554
|
}
|
|
2541
2555
|
),
|
|
2542
|
-
/* @__PURE__ */ a(q, { content:
|
|
2556
|
+
/* @__PURE__ */ a(q, { content: u == null ? void 0 : u.zoomInTooltip, children: /* @__PURE__ */ a(
|
|
2543
2557
|
ee,
|
|
2544
2558
|
{
|
|
2545
2559
|
disabled: g,
|
|
2546
|
-
onClick:
|
|
2547
|
-
"aria-label":
|
|
2548
|
-
children: /* @__PURE__ */ a(
|
|
2560
|
+
onClick: d,
|
|
2561
|
+
"aria-label": u == null ? void 0 : u.zoomInTooltip,
|
|
2562
|
+
children: /* @__PURE__ */ a(Ri, {})
|
|
2549
2563
|
}
|
|
2550
2564
|
) })
|
|
2551
2565
|
] }) : null;
|
|
@@ -2560,105 +2574,105 @@ const Se = {
|
|
|
2560
2574
|
"rp-search-input": "_rp-search-input_lnthn_60",
|
|
2561
2575
|
"rp-search-icon-info": "_rp-search-icon-info_lnthn_65",
|
|
2562
2576
|
"rp-search-loader-icon": "_rp-search-loader-icon_lnthn_74"
|
|
2563
|
-
},
|
|
2577
|
+
}, sn = () => {
|
|
2564
2578
|
const { searchIcon: e } = pe();
|
|
2565
|
-
return e || /* @__PURE__ */ a(
|
|
2566
|
-
},
|
|
2567
|
-
const { container: e } =
|
|
2579
|
+
return e || /* @__PURE__ */ a(mo, {});
|
|
2580
|
+
}, Oi = () => {
|
|
2581
|
+
const { container: e } = Te(), [t, n] = $(!1), { pdf: o } = K(), [r, i] = $(null), {
|
|
2568
2582
|
searchOptions: c,
|
|
2569
2583
|
setSearchOptions: s,
|
|
2570
2584
|
loading: l,
|
|
2571
|
-
setSearch:
|
|
2572
|
-
totalMatches:
|
|
2585
|
+
setSearch: u,
|
|
2586
|
+
totalMatches: d,
|
|
2573
2587
|
currentMatchPosition: f,
|
|
2574
2588
|
nextMatch: h,
|
|
2575
2589
|
prevMatch: g,
|
|
2576
|
-
search:
|
|
2577
|
-
} =
|
|
2590
|
+
search: w
|
|
2591
|
+
} = In(), { searchTool: b = !0 } = _e(), [v, _] = $(w), { localeMessages: m } = ue(), P = L(() => {
|
|
2578
2592
|
n(!0);
|
|
2579
|
-
}, []),
|
|
2580
|
-
|
|
2581
|
-
}, [
|
|
2582
|
-
const
|
|
2583
|
-
(
|
|
2584
|
-
},
|
|
2585
|
-
(
|
|
2586
|
-
|
|
2593
|
+
}, []), x = L(() => {
|
|
2594
|
+
u(""), _(""), n(!1);
|
|
2595
|
+
}, [u]), p = (I) => {
|
|
2596
|
+
const E = I.key === "Enter", W = I.key === " ";
|
|
2597
|
+
(E || W) && x();
|
|
2598
|
+
}, T = L(
|
|
2599
|
+
(I) => {
|
|
2600
|
+
I.key === "Escape" && t && x();
|
|
2587
2601
|
},
|
|
2588
2602
|
[t]
|
|
2589
2603
|
), C = L(
|
|
2590
|
-
(
|
|
2591
|
-
|
|
2604
|
+
(I) => {
|
|
2605
|
+
I.shiftKey && I.key === "Enter" ? g() : I.key === "Enter" && w !== v ? u(v) : I.key === "Enter" && h();
|
|
2592
2606
|
},
|
|
2593
|
-
[v, g, h,
|
|
2607
|
+
[v, g, h, u, w]
|
|
2594
2608
|
);
|
|
2595
|
-
A(() => (window.addEventListener("keydown",
|
|
2596
|
-
window.removeEventListener("keydown",
|
|
2597
|
-
}), [
|
|
2609
|
+
A(() => (window.addEventListener("keydown", T), () => {
|
|
2610
|
+
window.removeEventListener("keydown", T);
|
|
2611
|
+
}), [T]), A(() => {
|
|
2598
2612
|
r && r.focus();
|
|
2599
2613
|
}, [r]);
|
|
2600
|
-
const
|
|
2601
|
-
_(
|
|
2602
|
-
}, []),
|
|
2603
|
-
_(""),
|
|
2604
|
-
}, [
|
|
2605
|
-
(
|
|
2606
|
-
s((
|
|
2614
|
+
const S = L((I) => {
|
|
2615
|
+
_(I.target.value);
|
|
2616
|
+
}, []), N = L(() => {
|
|
2617
|
+
_(""), u("");
|
|
2618
|
+
}, [u]), y = F(() => `${f} / ${d}`, [f, d]), { wholeWords: O, matchCase: R } = F(() => c, [c]), k = L(
|
|
2619
|
+
(I) => {
|
|
2620
|
+
s((E) => ({ ...E, matchCase: I }));
|
|
2607
2621
|
},
|
|
2608
2622
|
[s]
|
|
2609
2623
|
), z = L(
|
|
2610
|
-
(
|
|
2611
|
-
s((
|
|
2624
|
+
(I) => {
|
|
2625
|
+
s((E) => ({ ...E, wholeWords: I }));
|
|
2612
2626
|
},
|
|
2613
2627
|
[s]
|
|
2614
2628
|
);
|
|
2615
2629
|
return A(() => {
|
|
2616
|
-
|
|
2617
|
-
}, [o,
|
|
2618
|
-
|
|
2630
|
+
x();
|
|
2631
|
+
}, [o, x]), b ? /* @__PURE__ */ a(Se, { children: /* @__PURE__ */ a(
|
|
2632
|
+
Fr,
|
|
2619
2633
|
{
|
|
2620
2634
|
open: t,
|
|
2621
2635
|
container: e,
|
|
2622
|
-
triggerComponent: /* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ a(ee, { onClick:
|
|
2636
|
+
triggerComponent: /* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ a(ee, { onClick: P, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ a(sn, {}) }) }),
|
|
2623
2637
|
children: /* @__PURE__ */ D("div", { className: Q["rp-search-tool-content"], children: [
|
|
2624
2638
|
/* @__PURE__ */ D("div", { className: Q["rp-search-tool-input-wrapper"], children: [
|
|
2625
2639
|
/* @__PURE__ */ D("div", { className: Q["rp-search-tool-input"], children: [
|
|
2626
2640
|
/* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ a(
|
|
2627
|
-
|
|
2641
|
+
dn,
|
|
2628
2642
|
{
|
|
2629
2643
|
value: v,
|
|
2630
2644
|
onKeyDown: C,
|
|
2631
|
-
onChange:
|
|
2632
|
-
icon: /* @__PURE__ */ a(
|
|
2645
|
+
onChange: S,
|
|
2646
|
+
icon: /* @__PURE__ */ a(sn, {}),
|
|
2633
2647
|
placeholder: m == null ? void 0 : m.searchInputPlaceholder,
|
|
2634
2648
|
className: Q["rp-search-input"],
|
|
2635
2649
|
ref: i,
|
|
2636
|
-
children: !!v && /* @__PURE__ */ a("span", { className: Q["rp-search-tool-input-clear"], onClick:
|
|
2650
|
+
children: !!v && /* @__PURE__ */ a("span", { className: Q["rp-search-tool-input-clear"], onClick: N, children: /* @__PURE__ */ a(fo, {}) })
|
|
2637
2651
|
}
|
|
2638
2652
|
) }),
|
|
2639
|
-
l ? /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(
|
|
2653
|
+
l ? /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(St, { className: Q["rp-search-loader-icon"] }) }) : /* @__PURE__ */ a("span", { children: y })
|
|
2640
2654
|
] }),
|
|
2641
2655
|
/* @__PURE__ */ D("div", { className: Q["rp-search-tool-input-checkboxes"], children: [
|
|
2642
|
-
/* @__PURE__ */ a(
|
|
2643
|
-
/* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ a("div", { className: Q["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ a(
|
|
2644
|
-
/* @__PURE__ */ a(
|
|
2645
|
-
/* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ a("div", { className: Q["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ a(
|
|
2656
|
+
/* @__PURE__ */ a(Vt, { name: "matchCase", value: R, onChange: k, children: m == null ? void 0 : m.searchMatchCaseLabel }),
|
|
2657
|
+
/* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ a("div", { className: Q["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ a(Ut, {}) }) }),
|
|
2658
|
+
/* @__PURE__ */ a(Vt, { name: "wholeWord", value: O, onChange: z, children: m == null ? void 0 : m.searchWholeWordsLabel }),
|
|
2659
|
+
/* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ a("div", { className: Q["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ a(Ut, {}) }) })
|
|
2646
2660
|
] })
|
|
2647
2661
|
] }),
|
|
2648
2662
|
/* @__PURE__ */ D("div", { className: Q["rp-search-tool-controls"], children: [
|
|
2649
2663
|
/* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchPrevTooltip, children: /* @__PURE__ */ a(ee, { onClick: g, "aria-label": m == null ? void 0 : m.searchPrevTooltip, children: /* @__PURE__ */ a(
|
|
2650
|
-
|
|
2664
|
+
Me,
|
|
2651
2665
|
{
|
|
2652
2666
|
className: Q["rp-search-tool-input-icon"],
|
|
2653
|
-
"aria-disabled": !
|
|
2667
|
+
"aria-disabled": !d
|
|
2654
2668
|
}
|
|
2655
2669
|
) }) }),
|
|
2656
2670
|
/* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchNextTooltip, children: /* @__PURE__ */ a(ee, { onClick: h, "aria-label": m == null ? void 0 : m.searchNextTooltip, children: /* @__PURE__ */ a(
|
|
2657
|
-
|
|
2671
|
+
Me,
|
|
2658
2672
|
{
|
|
2659
2673
|
style: { transform: "rotate(180deg" },
|
|
2660
2674
|
className: Q["rp-search-tool-input-icon"],
|
|
2661
|
-
"aria-disabled": !
|
|
2675
|
+
"aria-disabled": !d
|
|
2662
2676
|
}
|
|
2663
2677
|
) }) }),
|
|
2664
2678
|
/* @__PURE__ */ a(q, { content: m == null ? void 0 : m.searchCloseButtonTooltip, children: /* @__PURE__ */ a(
|
|
@@ -2666,23 +2680,23 @@ const Se = {
|
|
|
2666
2680
|
{
|
|
2667
2681
|
onKeyDown: p,
|
|
2668
2682
|
"aria-label": m == null ? void 0 : m.searchCloseButtonTooltip,
|
|
2669
|
-
children: /* @__PURE__ */ a(
|
|
2683
|
+
children: /* @__PURE__ */ a(vn, { onClick: x, className: Q["rp-search-tool-input-icon"] })
|
|
2670
2684
|
}
|
|
2671
2685
|
) })
|
|
2672
2686
|
] })
|
|
2673
2687
|
] })
|
|
2674
2688
|
}
|
|
2675
2689
|
) }) : null;
|
|
2676
|
-
},
|
|
2690
|
+
}, Di = "_loading_vpexk_1", Ne = {
|
|
2677
2691
|
"rp-loading-overlay": "_rp-loading-overlay_vpexk_1",
|
|
2678
2692
|
"rp-loading-modal": "_rp-loading-modal_vpexk_14",
|
|
2679
2693
|
"rp-loading-title": "_rp-loading-title_vpexk_27",
|
|
2680
2694
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_vpexk_35",
|
|
2681
2695
|
"rp-loading-progress": "_rp-loading-progress_vpexk_35",
|
|
2682
2696
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_vpexk_55",
|
|
2683
|
-
loading:
|
|
2684
|
-
},
|
|
2685
|
-
const { cancel: t } =
|
|
2697
|
+
loading: Di
|
|
2698
|
+
}, zi = ({ percentage: e }) => {
|
|
2699
|
+
const { cancel: t } = nt(), { localeMessages: n } = ue();
|
|
2686
2700
|
return e < 1 ? null : /* @__PURE__ */ a("div", { className: re(Ne["rp-loading-overlay"]), children: /* @__PURE__ */ D("div", { className: re(Ne["rp-loading-modal"]), children: [
|
|
2687
2701
|
/* @__PURE__ */ D("div", { className: re(Ne["rp-loading-title"]), children: [
|
|
2688
2702
|
n == null ? void 0 : n.printLoadingMessage,
|
|
@@ -2697,32 +2711,32 @@ const Se = {
|
|
|
2697
2711
|
) }),
|
|
2698
2712
|
/* @__PURE__ */ a("button", { className: re(Ne["rp-loading-cancel-button"]), onClick: t, children: n == null ? void 0 : n.printCancelLabel })
|
|
2699
2713
|
] }) });
|
|
2700
|
-
},
|
|
2701
|
-
const { showPrintProgress: n } =
|
|
2714
|
+
}, Ai = We((e, t) => {
|
|
2715
|
+
const { showPrintProgress: n } = _e(), { progress: o } = nt(), { isSmallScreen: r } = ye(), { percentage: i } = o || {}, c = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2702
2716
|
return /* @__PURE__ */ D("div", { children: [
|
|
2703
|
-
/* @__PURE__ */ a("div", { "data-rp": "topBar", ref: t, className:
|
|
2704
|
-
/* @__PURE__ */ D("div", { "data-rp": "topBarLeft", className:
|
|
2705
|
-
/* @__PURE__ */ a(
|
|
2706
|
-
/* @__PURE__ */ a(
|
|
2717
|
+
/* @__PURE__ */ a("div", { "data-rp": "topBar", ref: t, className: Ae["rp-toolbar-content"], children: /* @__PURE__ */ D("div", { className: Ae["rp-toolbar-wrapper"], style: c(), children: [
|
|
2718
|
+
/* @__PURE__ */ D("div", { "data-rp": "topBarLeft", className: Ae["rp-toolbar-start"], children: [
|
|
2719
|
+
/* @__PURE__ */ a(Oi, {}),
|
|
2720
|
+
/* @__PURE__ */ a(Xo, {})
|
|
2707
2721
|
] }),
|
|
2708
|
-
/* @__PURE__ */ a("div", { "data-rp": "topBarCenter", className:
|
|
2709
|
-
/* @__PURE__ */ a("div", { "data-rp": "topBarRight", className:
|
|
2722
|
+
/* @__PURE__ */ a("div", { "data-rp": "topBarCenter", className: Ae["rp-toolbar-middle"], children: /* @__PURE__ */ a(Ei, {}) }),
|
|
2723
|
+
/* @__PURE__ */ a("div", { "data-rp": "topBarRight", className: Ae["rp-toolbar-end"], children: /* @__PURE__ */ a(Ii, {}) })
|
|
2710
2724
|
] }) }),
|
|
2711
|
-
n && i ? /* @__PURE__ */ a(
|
|
2725
|
+
n && i ? /* @__PURE__ */ a(zi, { percentage: i }) : null
|
|
2712
2726
|
] });
|
|
2713
|
-
}),
|
|
2727
|
+
}), _t = {
|
|
2714
2728
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
2715
2729
|
"rp-sidebar-content": "_rp-sidebar-content_1sdl6_1",
|
|
2716
2730
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_1sdl6_16",
|
|
2717
2731
|
"rp-thumbnail-dragging": "_rp-thumbnail-dragging_1sdl6_21"
|
|
2718
|
-
},
|
|
2732
|
+
}, Fe = {
|
|
2719
2733
|
"rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
|
|
2720
2734
|
"rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
|
|
2721
2735
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2722
2736
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2723
2737
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2724
|
-
},
|
|
2725
|
-
const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: i } = ie(), c = F(() => o ?
|
|
2738
|
+
}, Fi = (e) => {
|
|
2739
|
+
const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: i } = ie(), c = F(() => o ? Fe["rp-thumbnail-active"] : "", [o]), s = F(() => ({
|
|
2726
2740
|
width: Math.round(r.width),
|
|
2727
2741
|
height: Math.round(r.height)
|
|
2728
2742
|
}), [r]), l = L(() => {
|
|
@@ -2733,9 +2747,9 @@ const Se = {
|
|
|
2733
2747
|
{
|
|
2734
2748
|
onClick: l,
|
|
2735
2749
|
id: `page-${n}`,
|
|
2736
|
-
className:
|
|
2750
|
+
className: Fe["rp-thumbnail-wrapper"],
|
|
2737
2751
|
children: [
|
|
2738
|
-
/* @__PURE__ */ a("div", { className: re(c,
|
|
2752
|
+
/* @__PURE__ */ a("div", { className: re(c, Fe["rp-thumbnail"]), children: t ? /* @__PURE__ */ a(
|
|
2739
2753
|
"img",
|
|
2740
2754
|
{
|
|
2741
2755
|
src: t,
|
|
@@ -2746,86 +2760,86 @@ const Se = {
|
|
|
2746
2760
|
) : /* @__PURE__ */ a(
|
|
2747
2761
|
"div",
|
|
2748
2762
|
{
|
|
2749
|
-
className:
|
|
2763
|
+
className: Fe["rp-thumbnail-loader"],
|
|
2750
2764
|
style: {
|
|
2751
2765
|
width: `${s.width}px`,
|
|
2752
2766
|
height: `${s.height}px`
|
|
2753
2767
|
},
|
|
2754
|
-
children: /* @__PURE__ */ a(
|
|
2768
|
+
children: /* @__PURE__ */ a(St, {})
|
|
2755
2769
|
}
|
|
2756
2770
|
) }),
|
|
2757
|
-
/* @__PURE__ */ a("div", { className:
|
|
2771
|
+
/* @__PURE__ */ a("div", { className: Fe["rp-thumbnail-text"], children: n })
|
|
2758
2772
|
]
|
|
2759
2773
|
}
|
|
2760
2774
|
);
|
|
2761
|
-
},
|
|
2775
|
+
}, cn = {
|
|
2762
2776
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2763
2777
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2764
|
-
},
|
|
2778
|
+
}, ki = 16, Mi = (e, t) => {
|
|
2765
2779
|
const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
|
|
2766
|
-
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
2767
|
-
},
|
|
2768
|
-
const { show: n } = e, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: i, addPage: c, thumbnailLength: s, addToPage: l } =
|
|
2769
|
-
|
|
2780
|
+
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - ki);
|
|
2781
|
+
}, Wi = We((e, t) => {
|
|
2782
|
+
const { show: n } = e, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: i, addPage: c, thumbnailLength: s, addToPage: l } = xn(), u = M(null), d = M(1);
|
|
2783
|
+
ln(t, () => u.current);
|
|
2770
2784
|
const f = F(() => Object.values(i), [i]), h = L(() => {
|
|
2771
2785
|
const g = s + 1;
|
|
2772
2786
|
g <= r && c(g);
|
|
2773
2787
|
}, [c, r, s]);
|
|
2774
2788
|
return A(() => {
|
|
2775
|
-
o > s ? l(o) : n &&
|
|
2776
|
-
}, [o, s, l, n, f]),
|
|
2777
|
-
var
|
|
2789
|
+
o > s ? l(o) : n && d.current !== o && (Mi(u.current, o), d.current = o);
|
|
2790
|
+
}, [o, s, l, n, f]), br(u.current, h), /* @__PURE__ */ a("div", { ref: u, className: cn["rp-thumbnails-container"], children: /* @__PURE__ */ a("div", { className: cn["rp-thumbnails"], children: n ? f.map((g, w) => {
|
|
2791
|
+
var b, v;
|
|
2778
2792
|
return /* @__PURE__ */ a(
|
|
2779
|
-
|
|
2793
|
+
Fi,
|
|
2780
2794
|
{
|
|
2781
|
-
isFocused: o === ((
|
|
2795
|
+
isFocused: o === ((b = g.page) == null ? void 0 : b.pageNumber),
|
|
2782
2796
|
pageNumber: (v = g.page) == null ? void 0 : v.pageNumber,
|
|
2783
2797
|
thumbnailSrc: g.thumbnailSrc,
|
|
2784
2798
|
loading: g.loading,
|
|
2785
2799
|
viewport: g.viewport
|
|
2786
2800
|
},
|
|
2787
|
-
|
|
2801
|
+
w
|
|
2788
2802
|
);
|
|
2789
2803
|
}) : null }) });
|
|
2790
|
-
}),
|
|
2804
|
+
}), Hi = () => {
|
|
2791
2805
|
const { thumbnailIcon: e } = pe();
|
|
2792
|
-
return e || /* @__PURE__ */ a(
|
|
2793
|
-
},
|
|
2794
|
-
const { active: e, setActive: t } =
|
|
2795
|
-
t((
|
|
2796
|
-
}, []),
|
|
2806
|
+
return e || /* @__PURE__ */ a(wr, {});
|
|
2807
|
+
}, $i = () => {
|
|
2808
|
+
const { active: e, setActive: t } = xn(), [n, o] = $(200), r = M(null), { thumbnailTool: i, sidebarEnable: c } = _e(), { localeMessages: s } = ue(), l = L(() => {
|
|
2809
|
+
t((d) => !d);
|
|
2810
|
+
}, []), u = F(() => typeof i != "boolean" && i ? /* @__PURE__ */ a(i, { onClick: l, active: e }) : i ? /* @__PURE__ */ a(q, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ a(
|
|
2797
2811
|
ee,
|
|
2798
2812
|
{
|
|
2799
2813
|
onClick: l,
|
|
2800
2814
|
active: e,
|
|
2801
2815
|
"aria-label": s == null ? void 0 : s.thumbnailTooltip,
|
|
2802
|
-
children: /* @__PURE__ */ a(
|
|
2816
|
+
children: /* @__PURE__ */ a(Hi, {})
|
|
2803
2817
|
}
|
|
2804
2818
|
) }) : null, [i, e, l, s]);
|
|
2805
|
-
return /* @__PURE__ */ a(
|
|
2819
|
+
return /* @__PURE__ */ a(Se, { children: c && /* @__PURE__ */ D(
|
|
2806
2820
|
"div",
|
|
2807
2821
|
{
|
|
2808
2822
|
style: { "--rp-thumbnail-width": `${n}px` },
|
|
2809
|
-
className:
|
|
2823
|
+
className: _t["rp-sidebar-content-wrapper"],
|
|
2810
2824
|
"data-rp": "sidebar",
|
|
2811
2825
|
children: [
|
|
2812
|
-
/* @__PURE__ */ a("div", { className:
|
|
2826
|
+
/* @__PURE__ */ a("div", { className: _t["rp-sidebar-content"], children: u }),
|
|
2813
2827
|
/* @__PURE__ */ D(
|
|
2814
2828
|
"div",
|
|
2815
2829
|
{
|
|
2816
2830
|
"data-rp": "thumbnailSidebar",
|
|
2817
2831
|
hidden: !e,
|
|
2818
|
-
className:
|
|
2832
|
+
className: _t["rp-thumbnails-wrapper"],
|
|
2819
2833
|
children: [
|
|
2820
|
-
/* @__PURE__ */ a(
|
|
2821
|
-
/* @__PURE__ */ a(
|
|
2834
|
+
/* @__PURE__ */ a(Wi, { show: e, ref: r }),
|
|
2835
|
+
/* @__PURE__ */ a(Cr, { onWidthChange: o, thumbnailRef: r })
|
|
2822
2836
|
]
|
|
2823
2837
|
}
|
|
2824
2838
|
)
|
|
2825
2839
|
]
|
|
2826
2840
|
}
|
|
2827
2841
|
) });
|
|
2828
|
-
},
|
|
2842
|
+
}, be = {
|
|
2829
2843
|
"rp-layout": "_rp-layout_12d1x_1",
|
|
2830
2844
|
"rp-content": "_rp-content_12d1x_5",
|
|
2831
2845
|
"rp-pages": "_rp-pages_12d1x_11",
|
|
@@ -2833,17 +2847,17 @@ const Se = {
|
|
|
2833
2847
|
"rp-loader": "_rp-loader_12d1x_52",
|
|
2834
2848
|
"rp-theme-variables": "_rp-theme-variables_12d1x_56",
|
|
2835
2849
|
"rp-dark-mode": "_rp-dark-mode_12d1x_147"
|
|
2836
|
-
},
|
|
2850
|
+
}, Gi = We(
|
|
2837
2851
|
(e, t) => {
|
|
2838
|
-
const { children: n, toolbarRef: o, style: r, className: i } = e, { customVariables: c, customDarkVariables: s } =
|
|
2852
|
+
const { children: n, toolbarRef: o, style: r, className: i } = e, { customVariables: c, customDarkVariables: s } = Lr(), { darkMode: l } = ir();
|
|
2839
2853
|
return /* @__PURE__ */ a(
|
|
2840
2854
|
"div",
|
|
2841
2855
|
{
|
|
2842
2856
|
ref: t,
|
|
2843
2857
|
className: re(
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
l ?
|
|
2858
|
+
be["rp-theme-variables"],
|
|
2859
|
+
be["rp-container"],
|
|
2860
|
+
l ? be["rp-dark-mode"] : "",
|
|
2847
2861
|
i
|
|
2848
2862
|
),
|
|
2849
2863
|
style: {
|
|
@@ -2856,7 +2870,7 @@ const Se = {
|
|
|
2856
2870
|
}
|
|
2857
2871
|
);
|
|
2858
2872
|
}
|
|
2859
|
-
),
|
|
2873
|
+
), Rs = We((e, t) => {
|
|
2860
2874
|
const {
|
|
2861
2875
|
children: n,
|
|
2862
2876
|
slots: o,
|
|
@@ -2865,26 +2879,26 @@ const Se = {
|
|
|
2865
2879
|
className: c,
|
|
2866
2880
|
mobileWidth: s,
|
|
2867
2881
|
onLoaded: l,
|
|
2868
|
-
cleanupOnLoaded:
|
|
2869
|
-
onLayoutWidthChange:
|
|
2870
|
-
} = e, [f, h] = $(null), { setContainer: g, setContentRef:
|
|
2882
|
+
cleanupOnLoaded: u,
|
|
2883
|
+
onLayoutWidthChange: d
|
|
2884
|
+
} = e, [f, h] = $(null), { setContainer: g, setContentRef: w } = Te(), { loading: b } = K(), { LoaderImageComponent: v } = mn();
|
|
2871
2885
|
return A(() => (l && l(), () => {
|
|
2872
|
-
|
|
2873
|
-
}), [l,
|
|
2874
|
-
/* @__PURE__ */ D(
|
|
2875
|
-
/* @__PURE__ */ D("div", { className:
|
|
2876
|
-
/* @__PURE__ */ a(
|
|
2877
|
-
/* @__PURE__ */ D("div", { className:
|
|
2878
|
-
/* @__PURE__ */ a("div", { className:
|
|
2879
|
-
/* @__PURE__ */ a("div", { ref:
|
|
2886
|
+
u && u();
|
|
2887
|
+
}), [l, u]), /* @__PURE__ */ a(Gi, { toolbarRef: f, ref: t, children: /* @__PURE__ */ a(yr, { mobileWidth: s, onLayoutWidthChange: d, children: /* @__PURE__ */ a(Tr, { slots: o, children: /* @__PURE__ */ a(Pr, { icons: r, children: /* @__PURE__ */ D(xr, { getContainerRef: g, style: i, className: c, children: [
|
|
2888
|
+
/* @__PURE__ */ D(Sr, { children: [
|
|
2889
|
+
/* @__PURE__ */ D("div", { className: be["rp-layout"], children: [
|
|
2890
|
+
/* @__PURE__ */ a(Ai, { ref: h }),
|
|
2891
|
+
/* @__PURE__ */ D("div", { className: be["rp-content"], children: [
|
|
2892
|
+
/* @__PURE__ */ a("div", { className: be["rp-sidebar"], children: /* @__PURE__ */ a($i, {}) }),
|
|
2893
|
+
/* @__PURE__ */ a("div", { ref: w, className: be["rp-pages"], children: n })
|
|
2880
2894
|
] })
|
|
2881
2895
|
] }),
|
|
2882
|
-
/* @__PURE__ */ a(
|
|
2896
|
+
/* @__PURE__ */ a(Ir, {})
|
|
2883
2897
|
] }),
|
|
2884
|
-
|
|
2898
|
+
b ? /* @__PURE__ */ a(
|
|
2885
2899
|
"div",
|
|
2886
2900
|
{
|
|
2887
|
-
className:
|
|
2901
|
+
className: be["rp-loader"],
|
|
2888
2902
|
style: {
|
|
2889
2903
|
position: "absolute",
|
|
2890
2904
|
top: 0,
|
|
@@ -2912,48 +2926,48 @@ const Se = {
|
|
|
2912
2926
|
] }) }) }) }) });
|
|
2913
2927
|
});
|
|
2914
2928
|
export {
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2929
|
+
xo as A,
|
|
2930
|
+
Oi as B,
|
|
2931
|
+
bo as C,
|
|
2932
|
+
Uo as D,
|
|
2933
|
+
Ai as E,
|
|
2934
|
+
Bn as F,
|
|
2935
|
+
Fi as G,
|
|
2936
|
+
Wi as H,
|
|
2937
|
+
$i as I,
|
|
2938
|
+
Gi as J,
|
|
2939
|
+
zi as L,
|
|
2940
|
+
xi as M,
|
|
2941
|
+
Si as O,
|
|
2942
|
+
Ts as P,
|
|
2943
|
+
Is as R,
|
|
2944
|
+
Ss as S,
|
|
2945
|
+
xs as T,
|
|
2946
|
+
Ei as Z,
|
|
2947
|
+
Ps as a,
|
|
2948
|
+
Rs as b,
|
|
2949
|
+
Un as c,
|
|
2950
|
+
nt as d,
|
|
2951
|
+
In as e,
|
|
2952
|
+
bn as f,
|
|
2953
|
+
go as g,
|
|
2954
|
+
Cn as h,
|
|
2955
|
+
vo as i,
|
|
2956
|
+
Tn as j,
|
|
2957
|
+
_o as k,
|
|
2958
|
+
Pn as l,
|
|
2959
|
+
xn as m,
|
|
2960
|
+
wo as n,
|
|
2961
|
+
Sn as o,
|
|
2962
|
+
Co as p,
|
|
2963
|
+
So as q,
|
|
2964
|
+
Nt as r,
|
|
2965
|
+
$o as s,
|
|
2966
|
+
qo as t,
|
|
2953
2967
|
ie as u,
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2968
|
+
Zo as v,
|
|
2969
|
+
Xo as w,
|
|
2970
|
+
hi as x,
|
|
2971
|
+
Xn as y,
|
|
2972
|
+
Ii as z
|
|
2959
2973
|
};
|