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