@pdf-viewer/react 1.7.0 → 1.7.1-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-d9b4e8b5.js → RPDefaultLayout-f9f79b4d.js} +354 -354
- package/dist/assets/RPDefaultLayout.css +1 -1
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/OtherTool.js +1 -1
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/main.js +1 -1
- package/dist/utils/annotations.js +4 -2
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/useLoadPdf.js +12 -12
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as i, Fragment as
|
|
1
|
+
import { jsx as i, Fragment as fe, jsxs as F } from "react/jsx-runtime";
|
|
2
2
|
import * as B from "react";
|
|
3
|
-
import { useRef as H, useEffect as k, useCallback as N, useState as $, useMemo as W, createContext as Ye, useContext as Je, forwardRef as $e, useImperativeHandle as cn, createElement as
|
|
3
|
+
import { useRef as H, useEffect as k, useCallback as N, useState as $, useMemo as W, createContext as Ye, useContext as Je, forwardRef as $e, useImperativeHandle as cn, createElement as qe, PureComponent as Qn, Component as er, memo as ln } from "react";
|
|
4
4
|
import { ChevronUpIcon as He } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as re } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as dn } from "./components/ui/Input.js";
|
|
@@ -23,7 +23,7 @@ import "./contexts/DropFileZoneContext.js";
|
|
|
23
23
|
import { renderPage as vt } from "./utils/renderPage.js";
|
|
24
24
|
import { findMatches as cr, resetDivs as lr, highlightMatches as dr, isMatchEntireWord as ur } from "./utils/highlight.js";
|
|
25
25
|
import { useLayoutContainer as ge } from "./contexts/LayoutContainerContext.js";
|
|
26
|
-
import { useDimensionPagesContext as
|
|
26
|
+
import { useDimensionPagesContext as Ue } from "./contexts/DimensionPagesContext.js";
|
|
27
27
|
import { useLocalizationContext as se } from "./contexts/LocalizationContext.js";
|
|
28
28
|
import { useHighlightContext as pr } from "./contexts/HighlightContext.js";
|
|
29
29
|
import "./contexts/LicenseContext.js";
|
|
@@ -31,10 +31,10 @@ import { useDownloadContext as hr } from "./contexts/DownloadContext.js";
|
|
|
31
31
|
import { useSmoothScrollContext as pn } from "./contexts/SmoothScrollContext.js";
|
|
32
32
|
import { useLoaderContext as hn } from "./contexts/LoaderContext.js";
|
|
33
33
|
import "./components/RPConfig.js";
|
|
34
|
-
import { ThumbnailIcon as
|
|
34
|
+
import { ThumbnailIcon as mr } from "./components/icons/Thumbnail.js";
|
|
35
35
|
import { c as ne } from "./clsx-0c6e471a.js";
|
|
36
36
|
import { LoaderIcon as Ct } from "./components/icons/LoaderIcon.js";
|
|
37
|
-
import { useInfiniteScroll as
|
|
37
|
+
import { useInfiniteScroll as fr } from "./utils/hooks/useInfiniteScroll.js";
|
|
38
38
|
import { RPSplitter as gr } from "./components/layout/sidebar/RPSplitter.js";
|
|
39
39
|
import { useToolbarComponentContext as ve, ToolbarComponentProvider as vr } from "./contexts/ToolbarComponentContext.js";
|
|
40
40
|
import { useIconContext as pe, IconProvider as wr } from "./contexts/IconContext.js";
|
|
@@ -54,18 +54,18 @@ import { useMousePressed as Hr } from "./utils/hooks/useMousePressed.js";
|
|
|
54
54
|
import { useGrabScroll as $r } from "./utils/hooks/useGrabScroll.js";
|
|
55
55
|
import { usePinch as Gr } from "./utils/hooks/usePinch.js";
|
|
56
56
|
import { useDebounce as Pt } from "./utils/hooks/useDebounce.js";
|
|
57
|
-
import
|
|
58
|
-
import { getPositionFromPage as
|
|
57
|
+
import Ur from "./components/ui/PasswordModal.js";
|
|
58
|
+
import { getPositionFromPage as Vr, getPageFromPosition as qr } from "./utils/calculatePage.js";
|
|
59
59
|
import { getScrollDistance as ze } from "./utils/getScrollDistance.js";
|
|
60
60
|
import { getWordPositionInPage as Br } from "./utils/getWordPositionInPage.js";
|
|
61
61
|
import { getThumbnailViewport as kt } from "./utils/getThumbnailViewport.js";
|
|
62
62
|
import { smoothScrollTo as st } from "./utils/smoothScrollTo.js";
|
|
63
63
|
import { appConsole as Zr } from "./utils/appConsole.js";
|
|
64
|
-
import { FileUploadTool as
|
|
64
|
+
import { FileUploadTool as mn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
65
65
|
import { DarkModeTool as jr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
66
66
|
import { ThreeDotIcon as Kr } from "./components/icons/ThreeDotIcon.js";
|
|
67
|
-
import { UIDropDown as
|
|
68
|
-
import { e as Xr, a as Tt, P as
|
|
67
|
+
import { UIDropDown as fn } from "./components/ui/DropDown.js";
|
|
68
|
+
import { e as Xr, a as Tt, P as Ve, c as Me, g as St, i as Yr, k as Jr, f as Qr } from "./index-1cb41342.js";
|
|
69
69
|
import { D as eo, u as ct } from "./index-aa2d3884.js";
|
|
70
70
|
import { a as to, u as no, F as ro, b as oo, G as Ke } from "./index-7279fb4e.js";
|
|
71
71
|
import { h as io } from "./component-1da194e8.js";
|
|
@@ -76,9 +76,9 @@ import { useOtherToolContext as co, OtherToolProvider as lo } from "./contexts/O
|
|
|
76
76
|
import { DocumentProperties as uo } from "./components/layout/toolbar/DocumentProperties.js";
|
|
77
77
|
import { RotateTool as po } from "./components/layout/toolbar/RotateTool.js";
|
|
78
78
|
import { ViewModeTool as ho } from "./components/layout/toolbar/ViewModeTool.js";
|
|
79
|
-
import { ScrollModeTool as
|
|
79
|
+
import { ScrollModeTool as mo } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
80
80
|
import { MenuSeparator as yt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
81
|
-
import { FileDownloadDefaultIcon as
|
|
81
|
+
import { FileDownloadDefaultIcon as fo } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
82
82
|
import { MenuItem as be } from "./components/layout/toolbar/MenuItem.js";
|
|
83
83
|
import { PrintDefaultTool as go } from "./components/icons/PrintDefaultIcon.js";
|
|
84
84
|
import { FullScreenTool as gn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
@@ -94,11 +94,11 @@ import { UICheckbox as $t } from "./components/ui/Checkbox.js";
|
|
|
94
94
|
import { ClearIcon as Po } from "./components/icons/ClearIcon.js";
|
|
95
95
|
import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
|
|
96
96
|
import './assets/RPDefaultLayout.css';const wn = () => {
|
|
97
|
-
const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: d, heights: p } =
|
|
97
|
+
const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: d, heights: p } = Ue(), f = H(e), _ = H(t), h = H(c), { targetScrollPage: v } = pn();
|
|
98
98
|
k(() => {
|
|
99
99
|
n != null && n.scrollToItem && (l.current = n);
|
|
100
100
|
}, [n]), k(() => {
|
|
101
|
-
|
|
101
|
+
f.current = e, _.current = t;
|
|
102
102
|
}, [e, t]);
|
|
103
103
|
const w = N(
|
|
104
104
|
(P, S) => {
|
|
@@ -114,38 +114,38 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
114
114
|
(s) => st(r, g, s)
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
|
-
const
|
|
117
|
+
const m = {
|
|
118
118
|
left: 0,
|
|
119
119
|
top: 0
|
|
120
120
|
};
|
|
121
121
|
return r == null ? void 0 : r.scrollTo({
|
|
122
|
-
...
|
|
122
|
+
...m,
|
|
123
123
|
behavior: S
|
|
124
124
|
});
|
|
125
125
|
},
|
|
126
126
|
[r, d, st]
|
|
127
127
|
);
|
|
128
128
|
return k(() => {
|
|
129
|
-
|
|
129
|
+
f.current = e, _.current = t;
|
|
130
130
|
}, [e, t]), k(() => {
|
|
131
131
|
h.current = c;
|
|
132
132
|
}, [c]), { scrollToPage: N(
|
|
133
133
|
(P, S = "smooth") => {
|
|
134
134
|
a(P);
|
|
135
135
|
const u = P - 1;
|
|
136
|
-
let
|
|
137
|
-
if (_.current === Ie.DUAL_PAGE &&
|
|
136
|
+
let m = u, g = 0;
|
|
137
|
+
if (_.current === Ie.DUAL_PAGE && f.current === J.PAGE_SCROLLING) {
|
|
138
138
|
w(P, S);
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
|
-
if (
|
|
141
|
+
if (f.current === J.PAGE_SCROLLING) {
|
|
142
142
|
a(P);
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
145
145
|
if (!l.current || !o)
|
|
146
146
|
return;
|
|
147
147
|
const s = o;
|
|
148
|
-
if (v.current = P,
|
|
148
|
+
if (v.current = P, f.current === J.HORIZONTAL_SCROLLING) {
|
|
149
149
|
g = u;
|
|
150
150
|
const y = {
|
|
151
151
|
left: ze(d, g),
|
|
@@ -157,10 +157,10 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
if (_.current === Ie.DUAL_PAGE) {
|
|
160
|
-
g = u % 2,
|
|
160
|
+
g = u % 2, m = Math.floor(u / 2);
|
|
161
161
|
const y = {
|
|
162
162
|
left: ze(d, g),
|
|
163
|
-
top: ze(p,
|
|
163
|
+
top: ze(p, m)
|
|
164
164
|
};
|
|
165
165
|
return s.scrollTo({
|
|
166
166
|
...y,
|
|
@@ -169,7 +169,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
169
169
|
}
|
|
170
170
|
const C = {
|
|
171
171
|
left: 0,
|
|
172
|
-
top: ze(p,
|
|
172
|
+
top: ze(p, m)
|
|
173
173
|
};
|
|
174
174
|
return s.scrollTo({
|
|
175
175
|
...C,
|
|
@@ -187,34 +187,34 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
187
187
|
]
|
|
188
188
|
) };
|
|
189
189
|
}, To = (t = 1) => {
|
|
190
|
-
const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ee(), { scrollMode: d } = Re(), { widths: p } =
|
|
191
|
-
(
|
|
192
|
-
if (!/^[0-9]*$/g.test(
|
|
190
|
+
const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ee(), { scrollMode: d } = Re(), { widths: p } = Ue(), { pagesRef: f } = ge(), _ = Pt(e, 100), h = N(
|
|
191
|
+
(m) => {
|
|
192
|
+
if (!/^[0-9]*$/g.test(m.toString()) || !m)
|
|
193
193
|
return { success: !1, currentPage: l.current };
|
|
194
|
-
const s = +
|
|
195
|
-
return s < 0 || s > o ? { success: !1, currentPage: l.current } : (n(s), l.current = s, { success: !0, currentPage: +
|
|
194
|
+
const s = +m;
|
|
195
|
+
return s < 0 || s > o ? { success: !1, currentPage: l.current } : (n(s), l.current = s, { success: !0, currentPage: +m });
|
|
196
196
|
},
|
|
197
197
|
[o]
|
|
198
198
|
), v = N(h, [h]), w = N(
|
|
199
|
-
(
|
|
200
|
-
const g = h(
|
|
199
|
+
(m) => {
|
|
200
|
+
const g = h(m);
|
|
201
201
|
return g.success && a(g.currentPage), g;
|
|
202
202
|
},
|
|
203
203
|
[h, a]
|
|
204
|
-
), T = N((
|
|
205
|
-
const g =
|
|
206
|
-
if (!
|
|
204
|
+
), T = N((m) => {
|
|
205
|
+
const g = m % 2 === 1;
|
|
206
|
+
if (!f || g)
|
|
207
207
|
return !1;
|
|
208
|
-
const s = g ? p[
|
|
209
|
-
return c === Ie.DUAL_PAGE && s + C <
|
|
210
|
-
}, [c, p,
|
|
211
|
-
let
|
|
212
|
-
T(
|
|
208
|
+
const s = g ? p[m] : p[m - 1], C = g ? p[m + 1] : p[m];
|
|
209
|
+
return c === Ie.DUAL_PAGE && s + C < f.clientWidth;
|
|
210
|
+
}, [c, p, f, o]), P = N(() => {
|
|
211
|
+
let m = e - 1;
|
|
212
|
+
T(m) && (m = e - 2), w(m);
|
|
213
213
|
}, [w, e, c, d, T]), S = W(() => c === Ie.DUAL_PAGE && d === J.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, c, d]), u = N(() => {
|
|
214
214
|
if (S)
|
|
215
215
|
return;
|
|
216
|
-
let
|
|
217
|
-
T(
|
|
216
|
+
let m = e + 1;
|
|
217
|
+
T(m) && (m = e + 2), w(m);
|
|
218
218
|
}, [w, e, T, c, d, S]);
|
|
219
219
|
return {
|
|
220
220
|
focusedPage: _,
|
|
@@ -265,24 +265,24 @@ const So = () => {
|
|
|
265
265
|
loadedPages: 0,
|
|
266
266
|
totalPages: 0,
|
|
267
267
|
percentage: 0
|
|
268
|
-
}), [r, a] = $(!1), [l, c] = $(!1), [d, p] = $(null),
|
|
268
|
+
}), [r, a] = $(!1), [l, c] = $(!1), [d, p] = $(null), f = H(!1);
|
|
269
269
|
k(() => {
|
|
270
|
-
|
|
271
|
-
}, [
|
|
270
|
+
f.current;
|
|
271
|
+
}, [f]);
|
|
272
272
|
const _ = N(() => {
|
|
273
273
|
document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
|
|
274
|
-
const
|
|
275
|
-
|
|
274
|
+
const m = document.querySelector(".rp-print-zone");
|
|
275
|
+
m && m.remove();
|
|
276
276
|
}, []), h = N(() => {
|
|
277
|
-
|
|
277
|
+
f.current = !1, a(!1), c(!1), p(null), o({
|
|
278
278
|
loadedPages: 0,
|
|
279
279
|
totalPages: 0,
|
|
280
280
|
percentage: 0
|
|
281
281
|
});
|
|
282
282
|
}, []), v = () => {
|
|
283
|
-
|
|
283
|
+
f.current = !0;
|
|
284
284
|
}, w = async ({
|
|
285
|
-
scratchCanvas:
|
|
285
|
+
scratchCanvas: m,
|
|
286
286
|
pdfDocument: g,
|
|
287
287
|
pageNumber: s,
|
|
288
288
|
viewerPdfPage: C,
|
|
@@ -290,19 +290,19 @@ const So = () => {
|
|
|
290
290
|
optionalContentConfigPromise: y,
|
|
291
291
|
printAnnotationStoragePromise: E
|
|
292
292
|
}) => {
|
|
293
|
-
if (
|
|
293
|
+
if (f.current) {
|
|
294
294
|
h();
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
297
|
const x = b / yr.PDF;
|
|
298
|
-
|
|
299
|
-
const L =
|
|
300
|
-
L.save(), L.fillStyle = "rgb(255, 255, 255)", L.fillRect(0, 0,
|
|
298
|
+
m.width = Math.floor(C.width * x), m.height = Math.floor(C.height * x);
|
|
299
|
+
const L = m.getContext("2d");
|
|
300
|
+
L.save(), L.fillStyle = "rgb(255, 255, 255)", L.fillRect(0, 0, m.width, m.height), L.restore();
|
|
301
301
|
const [D, A] = await Promise.all([
|
|
302
302
|
g.getPage(s),
|
|
303
303
|
E
|
|
304
304
|
]);
|
|
305
|
-
if (
|
|
305
|
+
if (f.current) {
|
|
306
306
|
h();
|
|
307
307
|
return;
|
|
308
308
|
}
|
|
@@ -321,11 +321,11 @@ const So = () => {
|
|
|
321
321
|
throw R instanceof Ir || console.error(R), R;
|
|
322
322
|
}
|
|
323
323
|
}, T = N(() => {
|
|
324
|
-
const
|
|
324
|
+
const m = window.print;
|
|
325
325
|
return new Promise((g) => {
|
|
326
326
|
const s = (y) => {
|
|
327
327
|
setTimeout(() => {
|
|
328
|
-
|
|
328
|
+
m.call(window), setTimeout(() => y(), 20);
|
|
329
329
|
}, 0);
|
|
330
330
|
};
|
|
331
331
|
if (document.querySelector(".rp-print-zone")) {
|
|
@@ -337,17 +337,17 @@ const So = () => {
|
|
|
337
337
|
});
|
|
338
338
|
b.observe(document.body, { childList: !0, subtree: !0 });
|
|
339
339
|
});
|
|
340
|
-
}, []), P = async (
|
|
340
|
+
}, []), P = async (m) => {
|
|
341
341
|
const g = document.createElement("img"), s = document.createElement("div");
|
|
342
342
|
return s.classList.add("rp-print-page"), await new Promise((C, b) => {
|
|
343
|
-
|
|
343
|
+
m.toBlob((y) => {
|
|
344
344
|
y ? (g.src = URL.createObjectURL(y), g.onload = () => {
|
|
345
345
|
URL.revokeObjectURL(g.src), C();
|
|
346
346
|
}, g.onerror = b) : b(new Error("Failed to create blob"));
|
|
347
347
|
});
|
|
348
348
|
}).catch(() => {
|
|
349
349
|
}), s.appendChild(g), s;
|
|
350
|
-
}, S = (
|
|
350
|
+
}, S = (m, g) => {
|
|
351
351
|
const s = document.createElement("div");
|
|
352
352
|
s.classList.add("rp-print-zone");
|
|
353
353
|
const C = document.createElement("style"), b = g.get(1);
|
|
@@ -355,36 +355,36 @@ const So = () => {
|
|
|
355
355
|
const { width: y, height: E } = b == null ? void 0 : b.page.getViewport({ scale: 1 });
|
|
356
356
|
C.innerHTML = `@page { size: ${y}px ${E}px }`;
|
|
357
357
|
}
|
|
358
|
-
return s.appendChild(C), s.append(...
|
|
358
|
+
return s.appendChild(C), s.append(...m), s;
|
|
359
359
|
}, u = N(async () => {
|
|
360
360
|
if (!t)
|
|
361
361
|
return;
|
|
362
362
|
h();
|
|
363
|
-
const
|
|
363
|
+
const m = document.createElement("canvas"), g = [];
|
|
364
364
|
try {
|
|
365
365
|
t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
366
366
|
const C = t.getOptionalContentConfig({ intent: "print" }), b = Promise.resolve(
|
|
367
367
|
t.annotationStorage.print ?? void 0
|
|
368
368
|
), y = e.size;
|
|
369
369
|
for (const [x, L] of e) {
|
|
370
|
-
if (
|
|
370
|
+
if (f.current) {
|
|
371
371
|
h();
|
|
372
372
|
return;
|
|
373
373
|
}
|
|
374
374
|
const D = L.page.getViewport({ scale: 1 });
|
|
375
375
|
if (await w({
|
|
376
|
-
scratchCanvas:
|
|
376
|
+
scratchCanvas: m,
|
|
377
377
|
pdfDocument: t,
|
|
378
378
|
pageNumber: x,
|
|
379
379
|
viewerPdfPage: D,
|
|
380
380
|
printResolution: 150,
|
|
381
381
|
optionalContentConfigPromise: C,
|
|
382
382
|
printAnnotationStoragePromise: b
|
|
383
|
-
}),
|
|
383
|
+
}), f.current) {
|
|
384
384
|
h();
|
|
385
385
|
return;
|
|
386
386
|
}
|
|
387
|
-
const A = await P(
|
|
387
|
+
const A = await P(m);
|
|
388
388
|
g.push(A);
|
|
389
389
|
const z = parseFloat((g.length / y * 100).toFixed(2));
|
|
390
390
|
o({
|
|
@@ -393,7 +393,7 @@ const So = () => {
|
|
|
393
393
|
percentage: z
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
|
-
if (
|
|
396
|
+
if (f.current) {
|
|
397
397
|
h();
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
@@ -402,15 +402,15 @@ const So = () => {
|
|
|
402
402
|
} catch (s) {
|
|
403
403
|
c(!0), s instanceof Error && p(s);
|
|
404
404
|
} finally {
|
|
405
|
-
|
|
405
|
+
m.height = 0, m.width = 0;
|
|
406
406
|
}
|
|
407
|
-
}, [t, e,
|
|
407
|
+
}, [t, e, f]);
|
|
408
408
|
return k(() => {
|
|
409
|
-
const
|
|
409
|
+
const m = () => {
|
|
410
410
|
h(), _();
|
|
411
411
|
};
|
|
412
|
-
return window.addEventListener("afterprint",
|
|
413
|
-
window.removeEventListener("afterprint",
|
|
412
|
+
return window.addEventListener("afterprint", m, !0), () => {
|
|
413
|
+
window.removeEventListener("afterprint", m, !0);
|
|
414
414
|
};
|
|
415
415
|
}, [_, h]), {
|
|
416
416
|
print: u,
|
|
@@ -438,10 +438,10 @@ const So = () => {
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
}), Hs = ({ children: t }) => {
|
|
441
|
-
const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: d, isError: p, error:
|
|
441
|
+
const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: d, isError: p, error: f } = So(), _ = N((P) => {
|
|
442
442
|
P && typeof P == "function" && r(() => P);
|
|
443
443
|
}, []), h = (P) => {
|
|
444
|
-
|
|
444
|
+
f && P(f);
|
|
445
445
|
}, v = N(
|
|
446
446
|
(P) => {
|
|
447
447
|
n(() => P);
|
|
@@ -486,8 +486,8 @@ const So = () => {
|
|
|
486
486
|
loading: !0,
|
|
487
487
|
viewport: v
|
|
488
488
|
};
|
|
489
|
-
}),
|
|
490
|
-
e(
|
|
489
|
+
}), f = p.reduce((h, v) => (h[v.page.pageNumber] = v, h), {});
|
|
490
|
+
e(f);
|
|
491
491
|
const _ = [];
|
|
492
492
|
for (const h of p) {
|
|
493
493
|
const v = document.createElement("canvas"), w = vt(h.page, v, {
|
|
@@ -524,8 +524,8 @@ const So = () => {
|
|
|
524
524
|
const d = n.get(c);
|
|
525
525
|
if (!d)
|
|
526
526
|
return;
|
|
527
|
-
e((
|
|
528
|
-
...
|
|
527
|
+
e((f) => ({
|
|
528
|
+
...f,
|
|
529
529
|
[c]: {
|
|
530
530
|
loading: !0,
|
|
531
531
|
page: d.page,
|
|
@@ -535,16 +535,16 @@ const So = () => {
|
|
|
535
535
|
}));
|
|
536
536
|
const p = document.createElement("canvas");
|
|
537
537
|
vt(d.page, p, { scale: d.thumbnailScale, rotate: o }).promise.then(() => {
|
|
538
|
-
const
|
|
538
|
+
const f = p.toDataURL(), { thumbnailViewport: _, scale: h } = kt(d.page, o);
|
|
539
539
|
return {
|
|
540
540
|
scale: h,
|
|
541
|
-
thumbnailSrc:
|
|
541
|
+
thumbnailSrc: f,
|
|
542
542
|
page: d.page,
|
|
543
543
|
loading: !1,
|
|
544
544
|
viewport: _
|
|
545
545
|
};
|
|
546
|
-
}).then((
|
|
547
|
-
e((_) => ({ ..._, [c]:
|
|
546
|
+
}).then((f) => {
|
|
547
|
+
e((_) => ({ ..._, [c]: f }));
|
|
548
548
|
});
|
|
549
549
|
},
|
|
550
550
|
[n, o]
|
|
@@ -573,11 +573,11 @@ const So = () => {
|
|
|
573
573
|
}
|
|
574
574
|
);
|
|
575
575
|
}, xo = (t = {}, e = "") => {
|
|
576
|
-
const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights: p } =
|
|
576
|
+
const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights: p } = Ue(), f = H(!n), { currentZoom: _ } = Qe(), [h, v] = $([]), { setFocusedPage: w } = ie(), { columnCount: T } = Ee(), { rotate: P } = Ge(), [S, u] = $(0), { pageScrollElementRef: m, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Re(), { pagesRef: C } = ge(), [b, y] = $(null), E = H({}), x = W(() => S === 0 ? null : h[S - 1], [S, h]), L = W(() => h.length, [h]);
|
|
577
577
|
k(() => {
|
|
578
578
|
if (!x || !c)
|
|
579
579
|
return;
|
|
580
|
-
const R = g ||
|
|
580
|
+
const R = g || m;
|
|
581
581
|
if (!R || !C)
|
|
582
582
|
return;
|
|
583
583
|
const I = c.get(x.page);
|
|
@@ -595,13 +595,13 @@ const So = () => {
|
|
|
595
595
|
}, Z = {
|
|
596
596
|
height: p[x.page - 1],
|
|
597
597
|
width: d[x.page - 1]
|
|
598
|
-
}, { leftInPage: j, topInPage:
|
|
598
|
+
}, { leftInPage: j, topInPage: q } = Br(
|
|
599
599
|
Z,
|
|
600
600
|
G,
|
|
601
601
|
x.rect,
|
|
602
602
|
_,
|
|
603
603
|
P
|
|
604
|
-
), ee = M + j, X = O +
|
|
604
|
+
), ee = M + j, X = O + q, le = {
|
|
605
605
|
left: Math.max(ee, 0),
|
|
606
606
|
top: Math.max(X, 0)
|
|
607
607
|
};
|
|
@@ -616,7 +616,7 @@ const So = () => {
|
|
|
616
616
|
x,
|
|
617
617
|
s,
|
|
618
618
|
g,
|
|
619
|
-
|
|
619
|
+
m,
|
|
620
620
|
C
|
|
621
621
|
]);
|
|
622
622
|
const D = N(() => {
|
|
@@ -628,7 +628,7 @@ const So = () => {
|
|
|
628
628
|
return {};
|
|
629
629
|
const I = R.numPages, O = {};
|
|
630
630
|
for (let M = 1; M <= I; M++) {
|
|
631
|
-
if (
|
|
631
|
+
if (f.current)
|
|
632
632
|
throw "close pop over";
|
|
633
633
|
const G = await R.getPage(M);
|
|
634
634
|
O[M.toString()] = await G.getTextContent();
|
|
@@ -637,10 +637,10 @@ const So = () => {
|
|
|
637
637
|
}, []);
|
|
638
638
|
return k(() => {
|
|
639
639
|
if (!n) {
|
|
640
|
-
|
|
640
|
+
f.current = !0, v([]), u(0);
|
|
641
641
|
return;
|
|
642
642
|
}
|
|
643
|
-
|
|
643
|
+
f.current = !1, a(!0), v([]), u(0), z(l).then((R) => {
|
|
644
644
|
E.current = R;
|
|
645
645
|
const O = Object.keys(R).reduce((M, G) => {
|
|
646
646
|
const Z = cr(
|
|
@@ -648,7 +648,7 @@ const So = () => {
|
|
|
648
648
|
R[G],
|
|
649
649
|
Number(G) - 1,
|
|
650
650
|
t
|
|
651
|
-
).map((j,
|
|
651
|
+
).map((j, q) => ({ ...j, page: Number(G), pageMatchIdx: q }));
|
|
652
652
|
return [...M, ...Z];
|
|
653
653
|
}, []);
|
|
654
654
|
v(O), u(O.length ? 1 : 0);
|
|
@@ -697,7 +697,7 @@ const So = () => {
|
|
|
697
697
|
currentMatchPosition: c,
|
|
698
698
|
currentMatch: d,
|
|
699
699
|
search: p,
|
|
700
|
-
matches:
|
|
700
|
+
matches: f,
|
|
701
701
|
nextMatch: _,
|
|
702
702
|
prevMatch: h,
|
|
703
703
|
currentMatchElement: v,
|
|
@@ -717,7 +717,7 @@ const So = () => {
|
|
|
717
717
|
nextMatch: _,
|
|
718
718
|
prevMatch: h,
|
|
719
719
|
search: p,
|
|
720
|
-
matches:
|
|
720
|
+
matches: f,
|
|
721
721
|
currentMatchElement: v,
|
|
722
722
|
setCurrentMatchElement: w
|
|
723
723
|
},
|
|
@@ -734,9 +734,9 @@ const So = () => {
|
|
|
734
734
|
"rp-cursor-grabbing": "_rp-cursor-grabbing_1776r_35",
|
|
735
735
|
"rp-loader": "_rp-loader_1776r_43"
|
|
736
736
|
}, lt = {
|
|
737
|
-
"rp-page-wrapper": "_rp-page-
|
|
738
|
-
"rp-page": "_rp-
|
|
739
|
-
"rp-loader-wrapper": "_rp-loader-
|
|
737
|
+
"rp-page-wrapper": "_rp-page-wrapper_14ohm_1",
|
|
738
|
+
"rp-page": "_rp-page_14ohm_1",
|
|
739
|
+
"rp-loader-wrapper": "_rp-loader-wrapper_14ohm_15"
|
|
740
740
|
}, Io = (t) => {
|
|
741
741
|
const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = H(null), { pages: a } = Q(), { rotate: l } = Ge(), c = H(), { currentZoom: d } = Qe();
|
|
742
742
|
return k(() => {
|
|
@@ -744,23 +744,23 @@ const So = () => {
|
|
|
744
744
|
return;
|
|
745
745
|
const p = a.get(e);
|
|
746
746
|
if (r.current && p) {
|
|
747
|
-
const
|
|
748
|
-
|
|
747
|
+
const f = r.current;
|
|
748
|
+
f.hidden = !0;
|
|
749
749
|
const _ = c.current;
|
|
750
|
-
_ && _.cancel(), o && o(), c.current = vt(p.page,
|
|
750
|
+
_ && _.cancel(), o && o(), c.current = vt(p.page, f, {
|
|
751
751
|
scale: d,
|
|
752
752
|
rotate: l,
|
|
753
753
|
renderForms: !0
|
|
754
754
|
}), c.current.promise.then(() => {
|
|
755
|
-
|
|
755
|
+
f.hidden = !1;
|
|
756
756
|
}).catch(() => {
|
|
757
757
|
}).finally(() => {
|
|
758
758
|
n && n();
|
|
759
759
|
});
|
|
760
760
|
}
|
|
761
761
|
return () => {
|
|
762
|
-
var
|
|
763
|
-
(
|
|
762
|
+
var f;
|
|
763
|
+
(f = c.current) == null || f.cancel();
|
|
764
764
|
};
|
|
765
765
|
}, [a, e, l, d, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: r });
|
|
766
766
|
}, Lo = "_selecting_1x8te_9", Ro = "_endOfContent_1x8te_24", he = {
|
|
@@ -771,13 +771,13 @@ const So = () => {
|
|
|
771
771
|
}, Eo = (t) => {
|
|
772
772
|
const { pageNumber: e } = t, { pages: n } = Q(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = xt(), [c, d] = $(
|
|
773
773
|
[]
|
|
774
|
-
), p = H(),
|
|
775
|
-
(
|
|
776
|
-
if (s && lr(
|
|
774
|
+
), p = H(), f = H(), _ = H([]), h = W(() => r.filter((m) => m.pageIndex === e - 1), [r, e]), v = N(
|
|
775
|
+
(m, g, s = !1) => {
|
|
776
|
+
if (s && lr(m, g), !h.length) {
|
|
777
777
|
_.current = [], d([]);
|
|
778
778
|
return;
|
|
779
779
|
}
|
|
780
|
-
const C = dr(h,
|
|
780
|
+
const C = dr(h, m, g);
|
|
781
781
|
d(C);
|
|
782
782
|
},
|
|
783
783
|
[h]
|
|
@@ -868,34 +868,34 @@ const So = () => {
|
|
|
868
868
|
s.classList.remove("selected");
|
|
869
869
|
}), !c.length || !a || a.pageIndex !== e - 1)
|
|
870
870
|
return;
|
|
871
|
-
const
|
|
871
|
+
const m = h.findIndex(
|
|
872
872
|
(s) => JSON.stringify(s) === JSON.stringify(a)
|
|
873
873
|
);
|
|
874
|
-
if (
|
|
874
|
+
if (m === -1)
|
|
875
875
|
return;
|
|
876
|
-
const g = c.filter((s) => s.index ===
|
|
876
|
+
const g = c.filter((s) => s.index === m);
|
|
877
877
|
g.length && (_.current = g.map((s) => s.element), l(g[0].element), g.forEach((s) => {
|
|
878
878
|
s.element.classList.add("selected");
|
|
879
879
|
}));
|
|
880
880
|
}, [a, c, h]), k(() => {
|
|
881
|
-
const
|
|
882
|
-
if (!
|
|
881
|
+
const m = n.get(e);
|
|
882
|
+
if (!m || !o.current)
|
|
883
883
|
return;
|
|
884
884
|
const g = o.current;
|
|
885
|
-
return p.current && p.current.cancel(),
|
|
886
|
-
const C =
|
|
885
|
+
return p.current && p.current.cancel(), m.page.getTextContent().then((s) => {
|
|
886
|
+
const C = m.page.getViewport({ scale: 1 });
|
|
887
887
|
return p.current = new Sr.TextLayer({
|
|
888
888
|
viewport: C,
|
|
889
889
|
textContentSource: s,
|
|
890
890
|
container: g
|
|
891
|
-
}),
|
|
891
|
+
}), f.current = s, g && (g.innerText = ""), p.current.render();
|
|
892
892
|
}).then(() => {
|
|
893
893
|
var y, E;
|
|
894
894
|
[].slice.call(g.children).forEach((x) => {
|
|
895
895
|
x.classList.add(he["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
|
|
896
896
|
});
|
|
897
897
|
const C = (y = p.current) == null ? void 0 : y.textDivs;
|
|
898
|
-
C &&
|
|
898
|
+
C && f.current && v(f.current, C);
|
|
899
899
|
const b = document.createElement("div");
|
|
900
900
|
b.className = "endOfContent", (E = o.current) == null || E.appendChild(b);
|
|
901
901
|
}).catch(() => {
|
|
@@ -909,7 +909,7 @@ const So = () => {
|
|
|
909
909
|
C.classList.add(he["rp-text-layer-text"]);
|
|
910
910
|
});
|
|
911
911
|
const g = (s = p.current) == null ? void 0 : s.textDivs;
|
|
912
|
-
g &&
|
|
912
|
+
g && f.current && v(f.current, g, !0);
|
|
913
913
|
}, [v]), /* @__PURE__ */ i(
|
|
914
914
|
"div",
|
|
915
915
|
{
|
|
@@ -925,7 +925,7 @@ const So = () => {
|
|
|
925
925
|
};
|
|
926
926
|
let Oo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
927
927
|
const Do = (t) => {
|
|
928
|
-
const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = Q(), a = H(), [l, c] = $(), { setFocusedPage: d, goToPage: p } = ie(), { scrollMode:
|
|
928
|
+
const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = Q(), a = H(), [l, c] = $(), { setFocusedPage: d, goToPage: p } = ie(), { scrollMode: f } = Re(), { print: _ } = tt(), { download: h } = $n(), v = W(() => o.get(e), [o, e]), w = W(() => v == null ? void 0 : v.page.getViewport(), [v]);
|
|
929
929
|
k(() => {
|
|
930
930
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
931
931
|
}, [r]), k(() => {
|
|
@@ -936,11 +936,11 @@ const Do = (t) => {
|
|
|
936
936
|
const T = N(
|
|
937
937
|
(P) => {
|
|
938
938
|
!l || !r || (Er(P), Nr(P, r, l).then((S) => {
|
|
939
|
-
var u,
|
|
940
|
-
((u = S == null ? void 0 : S.data) == null ? void 0 : u.action) === "Print" ? _() : ((
|
|
941
|
-
}),
|
|
939
|
+
var u, m;
|
|
940
|
+
((u = S == null ? void 0 : S.data) == null ? void 0 : u.action) === "Print" ? _() : ((m = S == null ? void 0 : S.data) == null ? void 0 : m.action) === "SaveAs" && h();
|
|
941
|
+
}), f === J.PAGE_SCROLLING ? zt(P, l, r, (S) => d(S.pageIndex + 1)) : zt(P, l, r, (S) => p(S.pageIndex + 1)));
|
|
942
942
|
},
|
|
943
|
-
[r, l, p, d,
|
|
943
|
+
[r, l, p, d, f, _, h]
|
|
944
944
|
);
|
|
945
945
|
return k(() => {
|
|
946
946
|
if (!v || !l)
|
|
@@ -1013,29 +1013,29 @@ const Do = (t) => {
|
|
|
1013
1013
|
}, Ao = {
|
|
1014
1014
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1015
1015
|
}, zo = ({ pageNumber: t, viewport: e }) => {
|
|
1016
|
-
const [n, o] = $(), { pages: r } = Q(), { highlightKeywords: a } = pr(), l = !0, c = H(null), [d, p] = $(null), [
|
|
1016
|
+
const [n, o] = $(), { pages: r } = Q(), { highlightKeywords: a } = pr(), l = !0, c = H(null), [d, p] = $(null), [f, _] = $([]);
|
|
1017
1017
|
k(() => {
|
|
1018
1018
|
c.current && p(c.current.parentElement);
|
|
1019
1019
|
}, [c]), k(() => {
|
|
1020
1020
|
(async () => {
|
|
1021
|
-
const
|
|
1022
|
-
if (!
|
|
1021
|
+
const m = r.get(t);
|
|
1022
|
+
if (!m || !c.current)
|
|
1023
1023
|
return;
|
|
1024
|
-
const g = await
|
|
1024
|
+
const g = await m.page.getTextContent();
|
|
1025
1025
|
o(g);
|
|
1026
1026
|
})();
|
|
1027
1027
|
}, [r, t]);
|
|
1028
1028
|
const h = W(() => a ? a.map((u) => {
|
|
1029
|
-
var
|
|
1029
|
+
var m, g;
|
|
1030
1030
|
return {
|
|
1031
|
-
...zr(u.keyword, (
|
|
1031
|
+
...zr(u.keyword, (m = u.options) == null ? void 0 : m.matchCase, (g = u.options) == null ? void 0 : g.wholeWords),
|
|
1032
1032
|
color: u.highlightColor
|
|
1033
1033
|
};
|
|
1034
1034
|
}) : [], [a]);
|
|
1035
|
-
function v(u,
|
|
1035
|
+
function v(u, m) {
|
|
1036
1036
|
if (!u)
|
|
1037
1037
|
return;
|
|
1038
|
-
const g = `[data-rp="page-${
|
|
1038
|
+
const g = `[data-rp="page-${m}-textLayer"]`;
|
|
1039
1039
|
return new Promise((s) => {
|
|
1040
1040
|
const C = u.querySelector(g);
|
|
1041
1041
|
if (C) {
|
|
@@ -1049,23 +1049,23 @@ const Do = (t) => {
|
|
|
1049
1049
|
});
|
|
1050
1050
|
}
|
|
1051
1051
|
function w(u) {
|
|
1052
|
-
return new Promise((
|
|
1052
|
+
return new Promise((m) => {
|
|
1053
1053
|
const g = u.querySelectorAll(
|
|
1054
1054
|
'[data-rp="rp-text-layer-text"]'
|
|
1055
1055
|
);
|
|
1056
1056
|
if (g.length) {
|
|
1057
|
-
|
|
1057
|
+
m(Array.from(g));
|
|
1058
1058
|
return;
|
|
1059
1059
|
}
|
|
1060
1060
|
new MutationObserver((C, b) => {
|
|
1061
1061
|
const y = u.querySelectorAll(
|
|
1062
1062
|
".vpv-text-layer-text"
|
|
1063
1063
|
);
|
|
1064
|
-
y.length && (
|
|
1064
|
+
y.length && (m(Array.from(y)), b.disconnect());
|
|
1065
1065
|
}).observe(u, { childList: !0, subtree: !0 });
|
|
1066
1066
|
});
|
|
1067
1067
|
}
|
|
1068
|
-
const T = (u,
|
|
1068
|
+
const T = (u, m, g, s) => {
|
|
1069
1069
|
var Z;
|
|
1070
1070
|
const C = document.createRange(), b = g.firstChild;
|
|
1071
1071
|
if (!b || b.nodeType !== Node.TEXT_NODE)
|
|
@@ -1078,7 +1078,7 @@ const Do = (t) => {
|
|
|
1078
1078
|
L.style.width = "auto", C.surroundContents(L);
|
|
1079
1079
|
const D = L.getBoundingClientRect(), A = u.getBoundingClientRect(), z = A.height, R = A.width, I = 100 * (D.left - A.left) / R, O = 100 * (D.top - A.top) / z, M = 100 * D.height / z, G = 100 * D.width / R;
|
|
1080
1080
|
return kr(L), {
|
|
1081
|
-
keywordStr:
|
|
1081
|
+
keywordStr: m,
|
|
1082
1082
|
left: I,
|
|
1083
1083
|
top: O,
|
|
1084
1084
|
height: M,
|
|
@@ -1087,7 +1087,7 @@ const Do = (t) => {
|
|
|
1087
1087
|
pageWidth: R
|
|
1088
1088
|
};
|
|
1089
1089
|
};
|
|
1090
|
-
async function P(u,
|
|
1090
|
+
async function P(u, m) {
|
|
1091
1091
|
const g = await v(d, u);
|
|
1092
1092
|
if (!g)
|
|
1093
1093
|
return;
|
|
@@ -1108,12 +1108,12 @@ const Do = (t) => {
|
|
|
1108
1108
|
spanIdx: 0
|
|
1109
1109
|
}
|
|
1110
1110
|
]
|
|
1111
|
-
).slice(1), b = S(g,
|
|
1111
|
+
).slice(1), b = S(g, m, s, C);
|
|
1112
1112
|
_(b);
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
|
-
const S = (u,
|
|
1116
|
-
const C =
|
|
1115
|
+
const S = (u, m, g, s) => {
|
|
1116
|
+
const C = m.length;
|
|
1117
1117
|
if (!s.length || !C)
|
|
1118
1118
|
return [];
|
|
1119
1119
|
const b = [], y = s.map((E) => E.char).join("");
|
|
@@ -1137,16 +1137,16 @@ const Do = (t) => {
|
|
|
1137
1137
|
}));
|
|
1138
1138
|
for (const G of M) {
|
|
1139
1139
|
const Z = G.indexes.reduce(
|
|
1140
|
-
(j,
|
|
1140
|
+
(j, q) => (j[q.spanIdx] = (j[q.spanIdx] || []).concat([q]), j),
|
|
1141
1141
|
{}
|
|
1142
1142
|
);
|
|
1143
1143
|
for (const j of Object.values(Z))
|
|
1144
1144
|
if (j.length !== 1 || j[0].char.trim() !== "") {
|
|
1145
|
-
const
|
|
1145
|
+
const q = j, ee = g[q[0].spanIdx], X = T(
|
|
1146
1146
|
u,
|
|
1147
1147
|
z,
|
|
1148
1148
|
ee,
|
|
1149
|
-
|
|
1149
|
+
q
|
|
1150
1150
|
);
|
|
1151
1151
|
if (X) {
|
|
1152
1152
|
const { left: le, top: ae } = X;
|
|
@@ -1163,11 +1163,11 @@ const Do = (t) => {
|
|
|
1163
1163
|
if (!(!a || a.length === 0))
|
|
1164
1164
|
try {
|
|
1165
1165
|
await P(t, a);
|
|
1166
|
-
} catch (
|
|
1167
|
-
console.error(
|
|
1166
|
+
} catch (m) {
|
|
1167
|
+
console.error(m);
|
|
1168
1168
|
}
|
|
1169
1169
|
})();
|
|
1170
|
-
}, [l, a, t, n, e]), /* @__PURE__ */ i(
|
|
1170
|
+
}, [l, a, t, n, e]), /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i("div", { ref: c, "data-rp": `page-${t}-textHighlightLayer`, children: f.map((u, m) => /* @__PURE__ */ i(
|
|
1171
1171
|
"div",
|
|
1172
1172
|
{
|
|
1173
1173
|
className: Ao["rp-text-highlight"],
|
|
@@ -1179,10 +1179,10 @@ const Do = (t) => {
|
|
|
1179
1179
|
backgroundColor: u.highlightColor
|
|
1180
1180
|
}
|
|
1181
1181
|
},
|
|
1182
|
-
|
|
1182
|
+
m
|
|
1183
1183
|
)) }) });
|
|
1184
1184
|
}, It = $e((t, e) => {
|
|
1185
|
-
const { pageNumber: n, style: o, ...r } = t, { pages: a } = Q(), { rotate: l } = Ge(), { textLayer: c } = or(), { currentZoom: d } = Qe(), p = H(a.get(n)), [
|
|
1185
|
+
const { pageNumber: n, style: o, ...r } = t, { pages: a } = Q(), { rotate: l } = Ge(), { textLayer: c } = or(), { currentZoom: d } = Qe(), p = H(a.get(n)), [f, _] = $(!1), h = H(null), [v, w] = $({
|
|
1186
1186
|
width: 0,
|
|
1187
1187
|
height: 0
|
|
1188
1188
|
});
|
|
@@ -1231,7 +1231,7 @@ const Do = (t) => {
|
|
|
1231
1231
|
className: lt["rp-page"],
|
|
1232
1232
|
children: [
|
|
1233
1233
|
/* @__PURE__ */ i(Io, { onLoading: P, onLoaded: S, pageNumber: n }),
|
|
1234
|
-
|
|
1234
|
+
f && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Ct, {}) }),
|
|
1235
1235
|
c && /* @__PURE__ */ i(Eo, { pageNumber: n }),
|
|
1236
1236
|
/* @__PURE__ */ i(zo, { pageNumber: n, viewport: v }),
|
|
1237
1237
|
/* @__PURE__ */ i(Do, { pageNumber: n })
|
|
@@ -1241,7 +1241,7 @@ const Do = (t) => {
|
|
|
1241
1241
|
}
|
|
1242
1242
|
);
|
|
1243
1243
|
});
|
|
1244
|
-
function
|
|
1244
|
+
function Ut(t) {
|
|
1245
1245
|
if (t === void 0)
|
|
1246
1246
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1247
1247
|
return t;
|
|
@@ -1254,11 +1254,11 @@ function wt(t, e) {
|
|
|
1254
1254
|
function Fo(t, e) {
|
|
1255
1255
|
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, wt(t, e);
|
|
1256
1256
|
}
|
|
1257
|
-
var
|
|
1257
|
+
var Vt = Number.isNaN || function(e) {
|
|
1258
1258
|
return typeof e == "number" && e !== e;
|
|
1259
1259
|
};
|
|
1260
1260
|
function ko(t, e) {
|
|
1261
|
-
return !!(t === e ||
|
|
1261
|
+
return !!(t === e || Vt(t) && Vt(e));
|
|
1262
1262
|
}
|
|
1263
1263
|
function Wo(t, e) {
|
|
1264
1264
|
if (t.length !== e.length)
|
|
@@ -1278,7 +1278,7 @@ function dt(t, e) {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
return l;
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1281
|
+
function qt(t, e) {
|
|
1282
1282
|
if (t == null)
|
|
1283
1283
|
return {};
|
|
1284
1284
|
var n = {};
|
|
@@ -1326,21 +1326,21 @@ function jt(t) {
|
|
|
1326
1326
|
}
|
|
1327
1327
|
return Oe;
|
|
1328
1328
|
}
|
|
1329
|
-
var Go = 150,
|
|
1329
|
+
var Go = 150, Uo = function(e) {
|
|
1330
1330
|
var n = e.columnIndex;
|
|
1331
1331
|
e.data;
|
|
1332
1332
|
var o = e.rowIndex;
|
|
1333
1333
|
return o + ":" + n;
|
|
1334
1334
|
}, Be = null, Ze = null, je = null;
|
|
1335
1335
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet());
|
|
1336
|
-
function
|
|
1337
|
-
var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, p = t.getOffsetForRowAndAlignment,
|
|
1336
|
+
function Vo(t) {
|
|
1337
|
+
var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, p = t.getOffsetForRowAndAlignment, f = t.getRowHeight, _ = t.getRowOffset, h = t.getRowStartIndexForOffset, v = t.getRowStopIndexForStartIndex, w = t.initInstanceProps, T = t.shouldResetStyleCacheOnItemSizeChange, P = t.validateProps;
|
|
1338
1338
|
return e = /* @__PURE__ */ function(S) {
|
|
1339
1339
|
Fo(u, S);
|
|
1340
1340
|
function u(g) {
|
|
1341
1341
|
var s;
|
|
1342
|
-
return s = S.call(this, g) || this, s._instanceProps = w(s.props,
|
|
1343
|
-
instance:
|
|
1342
|
+
return s = S.call(this, g) || this, s._instanceProps = w(s.props, Ut(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
|
|
1343
|
+
instance: Ut(s),
|
|
1344
1344
|
isScrolling: !1,
|
|
1345
1345
|
horizontalScrollDirection: "forward",
|
|
1346
1346
|
scrollLeft: typeof s.props.initialScrollLeft == "number" ? s.props.initialScrollLeft : 0,
|
|
@@ -1377,7 +1377,7 @@ function Uo(t) {
|
|
|
1377
1377
|
left: I ? void 0 : R,
|
|
1378
1378
|
right: I ? R : void 0,
|
|
1379
1379
|
top: _(s.props, C, s._instanceProps),
|
|
1380
|
-
height:
|
|
1380
|
+
height: f(s.props, C, s._instanceProps),
|
|
1381
1381
|
width: a(s.props, b, s._instanceProps)
|
|
1382
1382
|
};
|
|
1383
1383
|
}
|
|
@@ -1424,10 +1424,10 @@ function Uo(t) {
|
|
|
1424
1424
|
}, s;
|
|
1425
1425
|
}
|
|
1426
1426
|
u.getDerivedStateFromProps = function(s, C) {
|
|
1427
|
-
return
|
|
1427
|
+
return qo(s, C), P(s), null;
|
|
1428
1428
|
};
|
|
1429
|
-
var
|
|
1430
|
-
return
|
|
1429
|
+
var m = u.prototype;
|
|
1430
|
+
return m.scrollTo = function(s) {
|
|
1431
1431
|
var C = s.scrollLeft, b = s.scrollTop;
|
|
1432
1432
|
C !== void 0 && (C = Math.max(0, C)), b !== void 0 && (b = Math.max(0, b)), this.setState(function(y) {
|
|
1433
1433
|
return C === void 0 && (C = y.scrollLeft), b === void 0 && (b = y.scrollTop), y.scrollLeft === C && y.scrollTop === b ? null : {
|
|
@@ -1438,22 +1438,22 @@ function Uo(t) {
|
|
|
1438
1438
|
verticalScrollDirection: y.scrollTop < b ? "forward" : "backward"
|
|
1439
1439
|
};
|
|
1440
1440
|
}, this._resetIsScrollingDebounced);
|
|
1441
|
-
},
|
|
1441
|
+
}, m.scrollToItem = function(s) {
|
|
1442
1442
|
var C = s.align, b = C === void 0 ? "auto" : C, y = s.columnIndex, E = s.rowIndex, x = this.props, L = x.columnCount, D = x.height, A = x.rowCount, z = x.width, R = this.state, I = R.scrollLeft, O = R.scrollTop, M = $o();
|
|
1443
1443
|
y !== void 0 && (y = Math.max(0, Math.min(y, L - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, A - 1)));
|
|
1444
|
-
var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > z ? M : 0,
|
|
1444
|
+
var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > z ? M : 0, q = G > D ? M : 0;
|
|
1445
1445
|
this.scrollTo({
|
|
1446
|
-
scrollLeft: y !== void 0 ? d(this.props, y, b, I, this._instanceProps,
|
|
1446
|
+
scrollLeft: y !== void 0 ? d(this.props, y, b, I, this._instanceProps, q) : I,
|
|
1447
1447
|
scrollTop: E !== void 0 ? p(this.props, E, b, O, this._instanceProps, j) : O
|
|
1448
1448
|
});
|
|
1449
|
-
},
|
|
1449
|
+
}, m.componentDidMount = function() {
|
|
1450
1450
|
var s = this.props, C = s.initialScrollLeft, b = s.initialScrollTop;
|
|
1451
1451
|
if (this._outerRef != null) {
|
|
1452
1452
|
var y = this._outerRef;
|
|
1453
1453
|
typeof C == "number" && (y.scrollLeft = C), typeof b == "number" && (y.scrollTop = b);
|
|
1454
1454
|
}
|
|
1455
1455
|
this._callPropsCallbacks();
|
|
1456
|
-
},
|
|
1456
|
+
}, m.componentDidUpdate = function() {
|
|
1457
1457
|
var s = this.props.direction, C = this.state, b = C.scrollLeft, y = C.scrollTop, E = C.scrollUpdateWasRequested;
|
|
1458
1458
|
if (E && this._outerRef != null) {
|
|
1459
1459
|
var x = this._outerRef;
|
|
@@ -1475,14 +1475,14 @@ function Uo(t) {
|
|
|
1475
1475
|
x.scrollTop = Math.max(0, y);
|
|
1476
1476
|
}
|
|
1477
1477
|
this._callPropsCallbacks();
|
|
1478
|
-
},
|
|
1478
|
+
}, m.componentWillUnmount = function() {
|
|
1479
1479
|
this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
|
|
1480
|
-
},
|
|
1481
|
-
var s = this.props, C = s.children, b = s.className, y = s.columnCount, E = s.direction, x = s.height, L = s.innerRef, D = s.innerElementType, A = s.innerTagName, z = s.itemData, R = s.itemKey, I = R === void 0 ?
|
|
1480
|
+
}, m.render = function() {
|
|
1481
|
+
var s = this.props, C = s.children, b = s.className, y = s.columnCount, E = s.direction, x = s.height, L = s.innerRef, D = s.innerElementType, A = s.innerTagName, z = s.itemData, R = s.itemKey, I = R === void 0 ? Uo : R, O = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, q = s.width, ee = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], Fe = de[1], Ne = [];
|
|
1482
1482
|
if (y > 0 && G)
|
|
1483
1483
|
for (var Pe = te; Pe <= Fe; Pe++)
|
|
1484
1484
|
for (var we = le; we <= ae; we++)
|
|
1485
|
-
Ne.push(
|
|
1485
|
+
Ne.push(qe(C, {
|
|
1486
1486
|
columnIndex: we,
|
|
1487
1487
|
data: z,
|
|
1488
1488
|
isScrolling: j ? ee : void 0,
|
|
@@ -1495,20 +1495,20 @@ function Uo(t) {
|
|
|
1495
1495
|
style: this._getItemStyle(Pe, we)
|
|
1496
1496
|
}));
|
|
1497
1497
|
var nt = l(this.props, this._instanceProps), rt = c(this.props, this._instanceProps);
|
|
1498
|
-
return
|
|
1498
|
+
return qe(O || M || "div", {
|
|
1499
1499
|
className: b,
|
|
1500
1500
|
onScroll: this._onScroll,
|
|
1501
1501
|
ref: this._outerRefSetter,
|
|
1502
1502
|
style: Wr({
|
|
1503
1503
|
position: "relative",
|
|
1504
1504
|
height: x,
|
|
1505
|
-
width:
|
|
1505
|
+
width: q,
|
|
1506
1506
|
overflow: "auto",
|
|
1507
1507
|
WebkitOverflowScrolling: "touch",
|
|
1508
1508
|
willChange: "transform",
|
|
1509
1509
|
direction: E
|
|
1510
1510
|
}, Z)
|
|
1511
|
-
},
|
|
1511
|
+
}, qe(D || A || "div", {
|
|
1512
1512
|
children: Ne,
|
|
1513
1513
|
ref: L,
|
|
1514
1514
|
style: {
|
|
@@ -1517,23 +1517,23 @@ function Uo(t) {
|
|
|
1517
1517
|
width: rt
|
|
1518
1518
|
}
|
|
1519
1519
|
}));
|
|
1520
|
-
},
|
|
1520
|
+
}, m._callPropsCallbacks = function() {
|
|
1521
1521
|
var s = this.props, C = s.columnCount, b = s.onItemsRendered, y = s.onScroll, E = s.rowCount;
|
|
1522
1522
|
if (typeof b == "function" && C > 0 && E > 0) {
|
|
1523
1523
|
var x = this._getHorizontalRangeToRender(), L = x[0], D = x[1], A = x[2], z = x[3], R = this._getVerticalRangeToRender(), I = R[0], O = R[1], M = R[2], G = R[3];
|
|
1524
1524
|
this._callOnItemsRendered(L, D, I, O, A, z, M, G);
|
|
1525
1525
|
}
|
|
1526
1526
|
if (typeof y == "function") {
|
|
1527
|
-
var Z = this.state, j = Z.horizontalScrollDirection,
|
|
1528
|
-
this._callOnScroll(
|
|
1527
|
+
var Z = this.state, j = Z.horizontalScrollDirection, q = Z.scrollLeft, ee = Z.scrollTop, X = Z.scrollUpdateWasRequested, le = Z.verticalScrollDirection;
|
|
1528
|
+
this._callOnScroll(q, ee, j, le, X);
|
|
1529
1529
|
}
|
|
1530
|
-
},
|
|
1530
|
+
}, m._getHorizontalRangeToRender = function() {
|
|
1531
1531
|
var s = this.props, C = s.columnCount, b = s.overscanColumnCount, y = s.overscanColumnsCount, E = s.overscanCount, x = s.rowCount, L = this.state, D = L.horizontalScrollDirection, A = L.isScrolling, z = L.scrollLeft, R = b || y || E || 1;
|
|
1532
1532
|
if (C === 0 || x === 0)
|
|
1533
1533
|
return [0, 0, 0, 0];
|
|
1534
1534
|
var I = o(this.props, z, this._instanceProps), O = r(this.props, I, z, this._instanceProps), M = !A || D === "backward" ? Math.max(1, R) : 1, G = !A || D === "forward" ? Math.max(1, R) : 1;
|
|
1535
1535
|
return [Math.max(0, I - M), Math.max(0, Math.min(C - 1, O + G)), I, O];
|
|
1536
|
-
},
|
|
1536
|
+
}, m._getVerticalRangeToRender = function() {
|
|
1537
1537
|
var s = this.props, C = s.columnCount, b = s.overscanCount, y = s.overscanRowCount, E = s.overscanRowsCount, x = s.rowCount, L = this.state, D = L.isScrolling, A = L.verticalScrollDirection, z = L.scrollTop, R = y || E || b || 1;
|
|
1538
1538
|
if (C === 0 || x === 0)
|
|
1539
1539
|
return [0, 0, 0, 0];
|
|
@@ -1546,10 +1546,10 @@ function Uo(t) {
|
|
|
1546
1546
|
useIsScrolling: !1
|
|
1547
1547
|
}, e;
|
|
1548
1548
|
}
|
|
1549
|
-
var
|
|
1550
|
-
var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName, d = e.overscanColumnsCount, p = e.overscanCount,
|
|
1549
|
+
var qo = function(e, n) {
|
|
1550
|
+
var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName, d = e.overscanColumnsCount, p = e.overscanCount, f = e.overscanRowsCount, _ = e.width, h = n.instance;
|
|
1551
1551
|
if (process.env.NODE_ENV !== "production") {
|
|
1552
|
-
if (typeof p == "number" && Be && !Be.has(h) && (Be.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof
|
|
1552
|
+
if (typeof p == "number" && Be && !Be.has(h) && (Be.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof f == "number") && Ze && !Ze.has(h) && (Ze.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (l != null || c != null) && je && !je.has(h) && (je.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1553
1553
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1554
1554
|
switch (r) {
|
|
1555
1555
|
case "ltr":
|
|
@@ -1569,17 +1569,17 @@ var Vo = function(e, n) {
|
|
|
1569
1569
|
var d = r[l];
|
|
1570
1570
|
c = d.offset + d.size;
|
|
1571
1571
|
}
|
|
1572
|
-
var p = o - l - 1,
|
|
1573
|
-
return c +
|
|
1572
|
+
var p = o - l - 1, f = p * a;
|
|
1573
|
+
return c + f;
|
|
1574
1574
|
}, yn = function(e, n) {
|
|
1575
1575
|
var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, l = n.lastMeasuredColumnIndex, c = 0;
|
|
1576
1576
|
if (l >= o && (l = o - 1), l >= 0) {
|
|
1577
1577
|
var d = r[l];
|
|
1578
1578
|
c = d.offset + d.size;
|
|
1579
1579
|
}
|
|
1580
|
-
var p = o - l - 1,
|
|
1581
|
-
return c +
|
|
1582
|
-
},
|
|
1580
|
+
var p = o - l - 1, f = p * a;
|
|
1581
|
+
return c + f;
|
|
1582
|
+
}, me = function(e, n, o, r) {
|
|
1583
1583
|
var a, l, c;
|
|
1584
1584
|
if (e === "column" ? (a = r.columnMetadataMap, l = n.columnWidth, c = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, l = n.rowHeight, c = r.lastMeasuredRowIndex), o > c) {
|
|
1585
1585
|
var d = 0;
|
|
@@ -1587,9 +1587,9 @@ var Vo = function(e, n) {
|
|
|
1587
1587
|
var p = a[c];
|
|
1588
1588
|
d = p.offset + p.size;
|
|
1589
1589
|
}
|
|
1590
|
-
for (var
|
|
1591
|
-
var _ = l(
|
|
1592
|
-
a[
|
|
1590
|
+
for (var f = c + 1; f <= o; f++) {
|
|
1591
|
+
var _ = l(f);
|
|
1592
|
+
a[f] = {
|
|
1593
1593
|
offset: d,
|
|
1594
1594
|
size: _
|
|
1595
1595
|
}, d += _;
|
|
@@ -1604,18 +1604,18 @@ var Vo = function(e, n) {
|
|
|
1604
1604
|
return c >= r ? xn(e, n, o, l, 0, r) : Bo(e, n, o, Math.max(0, l), r);
|
|
1605
1605
|
}, xn = function(e, n, o, r, a, l) {
|
|
1606
1606
|
for (; a <= r; ) {
|
|
1607
|
-
var c = a + Math.floor((r - a) / 2), d =
|
|
1607
|
+
var c = a + Math.floor((r - a) / 2), d = me(e, n, c, o).offset;
|
|
1608
1608
|
if (d === l)
|
|
1609
1609
|
return c;
|
|
1610
1610
|
d < l ? a = c + 1 : d > l && (r = c - 1);
|
|
1611
1611
|
}
|
|
1612
1612
|
return a > 0 ? a - 1 : 0;
|
|
1613
1613
|
}, Bo = function(e, n, o, r, a) {
|
|
1614
|
-
for (var l = e === "column" ? n.columnCount : n.rowCount, c = 1; r < l &&
|
|
1614
|
+
for (var l = e === "column" ? n.columnCount : n.rowCount, c = 1; r < l && me(e, n, r, o).offset < a; )
|
|
1615
1615
|
r += c, c *= 2;
|
|
1616
1616
|
return xn(e, n, o, Math.min(r, l - 1), Math.floor(r / 2), a);
|
|
1617
1617
|
}, Yt = function(e, n, o, r, a, l, c) {
|
|
1618
|
-
var d = e === "column" ? n.width : n.height, p =
|
|
1618
|
+
var d = e === "column" ? n.width : n.height, p = me(e, n, o, l), f = e === "column" ? yn(n, l) : Sn(n, l), _ = Math.max(0, Math.min(f - d, p.offset)), h = Math.max(0, p.offset - d + c + p.size);
|
|
1619
1619
|
switch (r === "smart" && (a >= h - d && a <= _ + d ? r = "auto" : r = "center"), r) {
|
|
1620
1620
|
case "start":
|
|
1621
1621
|
return _;
|
|
@@ -1627,17 +1627,17 @@ var Vo = function(e, n) {
|
|
|
1627
1627
|
default:
|
|
1628
1628
|
return a >= h && a <= _ ? a : h > _ || a < h ? h : _;
|
|
1629
1629
|
}
|
|
1630
|
-
}, Zo = /* @__PURE__ */
|
|
1630
|
+
}, Zo = /* @__PURE__ */ Vo({
|
|
1631
1631
|
getColumnOffset: function(e, n, o) {
|
|
1632
|
-
return
|
|
1632
|
+
return me("column", e, n, o).offset;
|
|
1633
1633
|
},
|
|
1634
1634
|
getColumnStartIndexForOffset: function(e, n, o) {
|
|
1635
1635
|
return Xt("column", e, o, n);
|
|
1636
1636
|
},
|
|
1637
1637
|
getColumnStopIndexForStartIndex: function(e, n, o, r) {
|
|
1638
|
-
for (var a = e.columnCount, l = e.width, c =
|
|
1639
|
-
|
|
1640
|
-
return
|
|
1638
|
+
for (var a = e.columnCount, l = e.width, c = me("column", e, n, r), d = o + l, p = c.offset + c.size, f = n; f < a - 1 && p < d; )
|
|
1639
|
+
f++, p += me("column", e, f, r).size;
|
|
1640
|
+
return f;
|
|
1641
1641
|
},
|
|
1642
1642
|
getColumnWidth: function(e, n, o) {
|
|
1643
1643
|
return o.columnMetadataMap[n].size;
|
|
@@ -1651,7 +1651,7 @@ var Vo = function(e, n) {
|
|
|
1651
1651
|
return Yt("row", e, n, o, r, a, l);
|
|
1652
1652
|
},
|
|
1653
1653
|
getRowOffset: function(e, n, o) {
|
|
1654
|
-
return
|
|
1654
|
+
return me("row", e, n, o).offset;
|
|
1655
1655
|
},
|
|
1656
1656
|
getRowHeight: function(e, n, o) {
|
|
1657
1657
|
return o.rowMetadataMap[n].size;
|
|
@@ -1660,9 +1660,9 @@ var Vo = function(e, n) {
|
|
|
1660
1660
|
return Xt("row", e, o, n);
|
|
1661
1661
|
},
|
|
1662
1662
|
getRowStopIndexForStartIndex: function(e, n, o, r) {
|
|
1663
|
-
for (var a = e.rowCount, l = e.height, c =
|
|
1664
|
-
|
|
1665
|
-
return
|
|
1663
|
+
for (var a = e.rowCount, l = e.height, c = me("row", e, n, r), d = o + l, p = c.offset + c.size, f = n; f < a - 1 && p < d; )
|
|
1664
|
+
f++, p += me("row", e, f, r).size;
|
|
1665
|
+
return f;
|
|
1666
1666
|
},
|
|
1667
1667
|
initInstanceProps: function(e, n) {
|
|
1668
1668
|
var o = e, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, l = {
|
|
@@ -1684,7 +1684,7 @@ var Vo = function(e, n) {
|
|
|
1684
1684
|
shouldForceUpdate: d
|
|
1685
1685
|
});
|
|
1686
1686
|
}, n.resetAfterIndices = function(c) {
|
|
1687
|
-
var d = c.columnIndex, p = c.rowIndex,
|
|
1687
|
+
var d = c.columnIndex, p = c.rowIndex, f = c.shouldForceUpdate, _ = f === void 0 ? !0 : f;
|
|
1688
1688
|
typeof d == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, d - 1)), typeof p == "number" && (l.lastMeasuredRowIndex = Math.min(l.lastMeasuredRowIndex, p - 1)), n._getItemStyleCache(-1), _ && n.forceUpdate();
|
|
1689
1689
|
}, l;
|
|
1690
1690
|
},
|
|
@@ -1711,11 +1711,11 @@ function Jt(t, e) {
|
|
|
1711
1711
|
}
|
|
1712
1712
|
var jo = ["style"], Ko = ["style"];
|
|
1713
1713
|
function Xo(t, e) {
|
|
1714
|
-
var n = t.style, o =
|
|
1714
|
+
var n = t.style, o = qt(t, jo), r = e.style, a = qt(e, Ko);
|
|
1715
1715
|
return !Jt(n, r) && !Jt(o, a);
|
|
1716
1716
|
}
|
|
1717
1717
|
const Yo = () => {
|
|
1718
|
-
const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r =
|
|
1718
|
+
const { viewMode: t } = Ee(), { scrollMode: e } = Re(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ue(), a = W(() => r.heights.length, [r.heights]), l = W(() => e === J.HORIZONTAL_SCROLLING ? a : t === Ie.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = W(() => r.widths.reduce((w, T, P) => {
|
|
1719
1719
|
const S = P % l;
|
|
1720
1720
|
return (!w[S] || T > w[S]) && (w[S] = T), w;
|
|
1721
1721
|
}, []), [r.widths, l]), d = N(
|
|
@@ -1731,9 +1731,9 @@ const Yo = () => {
|
|
|
1731
1731
|
k(() => {
|
|
1732
1732
|
n(l);
|
|
1733
1733
|
}, [l, n]);
|
|
1734
|
-
const
|
|
1734
|
+
const f = W(() => e === J.HORIZONTAL_SCROLLING || e === J.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), _ = W(() => r.heights.reduce((v, w) => v + w, 0) / r.heights.length || 0, [r]), h = W(() => r.widths.reduce((v, w) => v + w, 0) / r.heights.length || 0, [r]);
|
|
1735
1735
|
return {
|
|
1736
|
-
rowCount:
|
|
1736
|
+
rowCount: f,
|
|
1737
1737
|
rowHeight: p,
|
|
1738
1738
|
columnCount: l,
|
|
1739
1739
|
columnWidth: d,
|
|
@@ -1763,8 +1763,8 @@ function Jo(t) {
|
|
|
1763
1763
|
const d = typeof document < "u" && document.attachEvent;
|
|
1764
1764
|
if (!d) {
|
|
1765
1765
|
l = function(S) {
|
|
1766
|
-
const u = S.__resizeTriggers__,
|
|
1767
|
-
g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, s.style.width =
|
|
1766
|
+
const u = S.__resizeTriggers__, m = u.firstElementChild, g = u.lastElementChild, s = m.firstElementChild;
|
|
1767
|
+
g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, s.style.width = m.offsetWidth + 1 + "px", s.style.height = m.offsetHeight + 1 + "px", m.scrollLeft = m.scrollWidth, m.scrollTop = m.scrollHeight;
|
|
1768
1768
|
}, a = function(S) {
|
|
1769
1769
|
return S.offsetWidth !== S.__resizeLast__.width || S.offsetHeight !== S.__resizeLast__.height;
|
|
1770
1770
|
}, c = function(S) {
|
|
@@ -1810,8 +1810,8 @@ function Jo(t) {
|
|
|
1810
1810
|
const P = w.createElement("div");
|
|
1811
1811
|
P.className = "expand-trigger", P.appendChild(w.createElement("div"));
|
|
1812
1812
|
const S = w.createElement("div");
|
|
1813
|
-
S.className = "contract-trigger", h.__resizeTriggers__.appendChild(P), h.__resizeTriggers__.appendChild(S), h.appendChild(h.__resizeTriggers__), l(h), h.addEventListener("scroll", c, !0), o && (h.__resizeTriggers__.__animationListener__ = function(
|
|
1814
|
-
|
|
1813
|
+
S.className = "contract-trigger", h.__resizeTriggers__.appendChild(P), h.__resizeTriggers__.appendChild(S), h.appendChild(h.__resizeTriggers__), l(h), h.addEventListener("scroll", c, !0), o && (h.__resizeTriggers__.__animationListener__ = function(m) {
|
|
1814
|
+
m.animationName === n && l(h);
|
|
1815
1815
|
}, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
|
|
1816
1816
|
}
|
|
1817
1817
|
h.__resizeListeners__.push(v);
|
|
@@ -1845,7 +1845,7 @@ class Qo extends er {
|
|
|
1845
1845
|
onResize: r
|
|
1846
1846
|
} = this.props;
|
|
1847
1847
|
if (this._parentNode) {
|
|
1848
|
-
const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), p = parseFloat(a.paddingBottom || "0"),
|
|
1848
|
+
const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), p = parseFloat(a.paddingBottom || "0"), f = this._parentNode.getBoundingClientRect(), _ = f.height - d - p, h = f.width - l - c, v = this._parentNode.offsetHeight - d - p, w = this._parentNode.offsetWidth - l - c;
|
|
1849
1849
|
(!n && (this.state.height !== v || this.state.scaledHeight !== _) || !o && (this.state.width !== w || this.state.scaledWidth !== h)) && (this.setState({
|
|
1850
1850
|
height: v,
|
|
1851
1851
|
width: w,
|
|
@@ -1888,7 +1888,7 @@ class Qo extends er {
|
|
|
1888
1888
|
nonce: c,
|
|
1889
1889
|
onResize: d,
|
|
1890
1890
|
style: p = {},
|
|
1891
|
-
tagName:
|
|
1891
|
+
tagName: f = "div",
|
|
1892
1892
|
..._
|
|
1893
1893
|
} = this.props, {
|
|
1894
1894
|
height: h,
|
|
@@ -1899,7 +1899,7 @@ class Qo extends er {
|
|
|
1899
1899
|
overflow: "visible"
|
|
1900
1900
|
}, S = {};
|
|
1901
1901
|
let u = !1;
|
|
1902
|
-
return r || (h === 0 && (u = !0), P.height = 0, S.height = h, S.scaledHeight = v), a || (T === 0 && (u = !0), P.width = 0, S.width = T, S.scaledWidth = w), l && (u = !1),
|
|
1902
|
+
return r || (h === 0 && (u = !0), P.height = 0, S.height = h, S.scaledHeight = v), a || (T === 0 && (u = !0), P.width = 0, S.width = T, S.scaledWidth = w), l && (u = !1), qe(f, {
|
|
1903
1903
|
ref: this._setRef,
|
|
1904
1904
|
style: {
|
|
1905
1905
|
...P,
|
|
@@ -1918,7 +1918,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
1918
1918
|
}
|
|
1919
1919
|
return c;
|
|
1920
1920
|
}, [n, o]), a = W(() => {
|
|
1921
|
-
const c = n % 2 === 1 ? n - 1 : n - 2, d = t(c), p = e(c),
|
|
1921
|
+
const c = n % 2 === 1 ? n - 1 : n - 2, d = t(c), p = e(c), f = t(c + 1), _ = e(c + 1), h = p > _ ? p : _, v = p < _ ? p : _, w = h / 2 - v / 2;
|
|
1922
1922
|
return [
|
|
1923
1923
|
{
|
|
1924
1924
|
position: "absolute",
|
|
@@ -1931,7 +1931,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
1931
1931
|
position: "absolute",
|
|
1932
1932
|
left: d,
|
|
1933
1933
|
top: h === _ ? 0 : w,
|
|
1934
|
-
width:
|
|
1934
|
+
width: f,
|
|
1935
1935
|
height: _
|
|
1936
1936
|
}
|
|
1937
1937
|
];
|
|
@@ -1954,25 +1954,25 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
1954
1954
|
}
|
|
1955
1955
|
);
|
|
1956
1956
|
}, ni = (t, e, n) => {
|
|
1957
|
-
const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } =
|
|
1958
|
-
const P = l[T], S =
|
|
1957
|
+
const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } = Ue(), { setFocusedPage: c } = ie(), [d, p] = $([]), { targetScrollPage: f } = pn(), _ = Pt(d, 0, 500), h = W(() => a.map((w, T) => {
|
|
1958
|
+
const P = l[T], S = Vr(T + 1, t), u = P * S.columnIndex, m = w * S.rowIndex, g = u + P, s = m + w;
|
|
1959
1959
|
return {
|
|
1960
1960
|
pageNumber: T + 1,
|
|
1961
1961
|
...S,
|
|
1962
1962
|
width: P,
|
|
1963
1963
|
height: w,
|
|
1964
1964
|
startX: u,
|
|
1965
|
-
startY:
|
|
1965
|
+
startY: m,
|
|
1966
1966
|
endX: g,
|
|
1967
1967
|
endY: s
|
|
1968
1968
|
};
|
|
1969
1969
|
}), [a, l, t, e]);
|
|
1970
1970
|
k(() => {
|
|
1971
1971
|
var T;
|
|
1972
|
-
_.length > 0 && !
|
|
1972
|
+
_.length > 0 && !f.current && c(_[0].pageNumber);
|
|
1973
1973
|
let w = (T = _[0]) == null ? void 0 : T.ratio;
|
|
1974
|
-
w && _.filter((P) => Math.round(P.ratio) === Math.round(w)).some((P) => P.pageNumber ===
|
|
1975
|
-
|
|
1974
|
+
w && _.filter((P) => Math.round(P.ratio) === Math.round(w)).some((P) => P.pageNumber === f.current) && setTimeout(() => {
|
|
1975
|
+
f.current = void 0;
|
|
1976
1976
|
}, 500);
|
|
1977
1977
|
}, [_, c]);
|
|
1978
1978
|
const v = N(
|
|
@@ -1984,15 +1984,15 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
1984
1984
|
endTop: T.scrollTop + T.clientHeight,
|
|
1985
1985
|
endLeft: T.scrollLeft + T.clientWidth
|
|
1986
1986
|
}, S = h.filter((u) => {
|
|
1987
|
-
const
|
|
1988
|
-
return
|
|
1987
|
+
const m = u.endX >= P.startLeft && u.endY >= P.startTop, g = u.startX <= P.endLeft && u.startY <= P.endTop;
|
|
1988
|
+
return m && g;
|
|
1989
1989
|
}).map((u) => {
|
|
1990
|
-
const
|
|
1990
|
+
const m = P.startLeft > u.startX ? P.startLeft : u.startX, g = P.startTop > u.startY ? P.startTop : u.startY, s = P.endLeft < u.endX ? P.endLeft : u.endX, C = P.endTop < u.endY ? P.endTop : u.endY, b = s - m, y = C - g, x = +(b * y / (u.width * u.height) * 100).toFixed(2);
|
|
1991
1991
|
return {
|
|
1992
1992
|
pageNumber: u.pageNumber,
|
|
1993
1993
|
ratio: x
|
|
1994
1994
|
};
|
|
1995
|
-
}).sort((u,
|
|
1995
|
+
}).sort((u, m) => m.ratio - u.ratio);
|
|
1996
1996
|
p(S);
|
|
1997
1997
|
});
|
|
1998
1998
|
},
|
|
@@ -2005,23 +2005,23 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2005
2005
|
};
|
|
2006
2006
|
}, [n, v]);
|
|
2007
2007
|
}, ri = ln(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
|
|
2008
|
-
const r =
|
|
2008
|
+
const r = qr(e, t, n.columnCount);
|
|
2009
2009
|
return /* @__PURE__ */ i(It, { style: o, pageNumber: r }, r);
|
|
2010
|
-
}, Xo),
|
|
2010
|
+
}, Xo), Us = () => {
|
|
2011
2011
|
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = ar(), { pagesRef: o, setPagesRef: r } = ge(), { scrollToPage: a } = wn(), {
|
|
2012
2012
|
virtualScrollRef: l,
|
|
2013
2013
|
getVirtualScrollRef: c,
|
|
2014
2014
|
getPageScrollElementRef: d,
|
|
2015
2015
|
getVirtualScrollableElementRef: p,
|
|
2016
|
-
setTotalInnerDimensions:
|
|
2016
|
+
setTotalInnerDimensions: f,
|
|
2017
2017
|
virtualScrollableElementRef: _,
|
|
2018
2018
|
totalInnerDimensions: h,
|
|
2019
2019
|
pageScrollElementRef: v
|
|
2020
|
-
} = et(), w = H(!0), { nextPage: T, prevPage: P, setFocusedPage: S, focusedPage: u } = ie(), { scrollMode:
|
|
2020
|
+
} = et(), w = H(!0), { nextPage: T, prevPage: P, setFocusedPage: S, focusedPage: u } = ie(), { scrollMode: m } = Re(), { viewMode: g } = Ee(), s = H(null), { loading: C } = Q(), { passwordRequired: b } = nr(), { LoaderImageComponent: y } = hn(), E = H(
|
|
2021
2021
|
h
|
|
2022
2022
|
), x = H({
|
|
2023
2023
|
viewMode: g,
|
|
2024
|
-
scrollMode:
|
|
2024
|
+
scrollMode: m
|
|
2025
2025
|
}), L = H(!1), D = H(), { isFullScreen: A } = sr(), {
|
|
2026
2026
|
pageDimension: z,
|
|
2027
2027
|
rowCount: R,
|
|
@@ -2030,7 +2030,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2030
2030
|
columnWidth: M,
|
|
2031
2031
|
estimatedColumnWidth: G,
|
|
2032
2032
|
estimatedRowHeight: Z
|
|
2033
|
-
} = Yo(), j = Pt(h, 100),
|
|
2033
|
+
} = Yo(), j = Pt(h, 100), q = H();
|
|
2034
2034
|
ni(O, R, _);
|
|
2035
2035
|
const ee = H({
|
|
2036
2036
|
scrollTop: 0,
|
|
@@ -2042,29 +2042,29 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2042
2042
|
}), te = W(() => le === tr.HAND, [le]), Fe = W(() => ({
|
|
2043
2043
|
columnCount: O
|
|
2044
2044
|
}), [O]), Ne = N(
|
|
2045
|
-
(
|
|
2046
|
-
const
|
|
2047
|
-
!A &&
|
|
2045
|
+
(U) => {
|
|
2046
|
+
const V = document.activeElement !== o;
|
|
2047
|
+
!A && V || (["ArrowUp", "ArrowLeft"].includes(U.key) ? (U.preventDefault(), P()) : ["ArrowDown", "ArrowRight"].includes(U.key) && (U.preventDefault(), T()));
|
|
2048
2048
|
},
|
|
2049
|
-
[T, P, A,
|
|
2049
|
+
[T, P, A, m]
|
|
2050
2050
|
);
|
|
2051
2051
|
k(() => (window.addEventListener("keydown", Ne), () => {
|
|
2052
2052
|
window.removeEventListener("keydown", Ne);
|
|
2053
2053
|
}), [Ne]), k(() => {
|
|
2054
2054
|
if (s.current && (s.current.style.position = "relative"), !!l)
|
|
2055
|
-
for (let
|
|
2056
|
-
for (let
|
|
2055
|
+
for (let U = 0; U < R; U++)
|
|
2056
|
+
for (let V = 0; V < O; V++)
|
|
2057
2057
|
l.resetAfterIndices({
|
|
2058
|
-
columnIndex:
|
|
2059
|
-
rowIndex:
|
|
2058
|
+
columnIndex: V,
|
|
2059
|
+
rowIndex: U,
|
|
2060
2060
|
shouldForceUpdate: !0
|
|
2061
2061
|
});
|
|
2062
2062
|
}, [R, O, z, l]);
|
|
2063
2063
|
const Pe = N(
|
|
2064
|
-
(
|
|
2064
|
+
(U, V) => {
|
|
2065
2065
|
if (!_)
|
|
2066
2066
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
2067
|
-
const Te = ee.current.scrollTop >
|
|
2067
|
+
const Te = ee.current.scrollTop > V, Se = ee.current.scrollLeft > U;
|
|
2068
2068
|
return Te || Se ? ee.current : {
|
|
2069
2069
|
scrollTop: _.scrollTop,
|
|
2070
2070
|
scrollLeft: _.scrollLeft
|
|
@@ -2072,20 +2072,20 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2072
2072
|
},
|
|
2073
2073
|
[_]
|
|
2074
2074
|
), we = N(
|
|
2075
|
-
(
|
|
2076
|
-
if (x.current.viewMode !== g || x.current.scrollMode !==
|
|
2077
|
-
|
|
2075
|
+
(U, V) => {
|
|
2076
|
+
if (x.current.viewMode !== g || x.current.scrollMode !== m) {
|
|
2077
|
+
q.current && clearTimeout(q.current), L.current = !0, a(u, "auto"), q.current = setTimeout(() => {
|
|
2078
2078
|
requestAnimationFrame(() => {
|
|
2079
|
-
x.current = { viewMode: g, scrollMode:
|
|
2079
|
+
x.current = { viewMode: g, scrollMode: m };
|
|
2080
2080
|
});
|
|
2081
2081
|
}, 100);
|
|
2082
2082
|
return;
|
|
2083
2083
|
}
|
|
2084
|
-
const Se =
|
|
2085
|
-
if (!
|
|
2084
|
+
const Se = U.scrollTop, ot = U.scrollLeft;
|
|
2085
|
+
if (!V.height || !V.width)
|
|
2086
2086
|
return;
|
|
2087
2087
|
L.current = !0;
|
|
2088
|
-
const { height: ye, width: it } =
|
|
2088
|
+
const { height: ye, width: it } = V, { height: Ot, width: Dt } = E.current;
|
|
2089
2089
|
if (Ot === ye && Dt === it)
|
|
2090
2090
|
return;
|
|
2091
2091
|
const Kn = Se / Ot * ye, Xn = ot / Dt * it, Yn = Math.round(Math.min(Kn, ye)) || 0, Jn = Math.round(Math.min(Xn, it)) || 0;
|
|
@@ -2097,45 +2097,45 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2097
2097
|
});
|
|
2098
2098
|
});
|
|
2099
2099
|
}, 0), E.current = {
|
|
2100
|
-
height:
|
|
2101
|
-
width:
|
|
2100
|
+
height: V.height,
|
|
2101
|
+
width: V.width
|
|
2102
2102
|
};
|
|
2103
2103
|
},
|
|
2104
|
-
[l, g,
|
|
2104
|
+
[l, g, m, a]
|
|
2105
2105
|
);
|
|
2106
2106
|
k(() => {
|
|
2107
2107
|
clearTimeout(D.current);
|
|
2108
|
-
const
|
|
2108
|
+
const U = Array.from({ length: R }).reduce(
|
|
2109
2109
|
(Se, ot, ye) => Se + I(ye),
|
|
2110
2110
|
0
|
|
2111
|
-
),
|
|
2111
|
+
), V = Array.from({ length: O }).reduce(
|
|
2112
2112
|
(Se, ot, ye) => Se + M(ye),
|
|
2113
2113
|
0
|
|
2114
|
-
), Te = Pe(
|
|
2115
|
-
ee.current = Te, we(Te, { height:
|
|
2116
|
-
height:
|
|
2117
|
-
width:
|
|
2114
|
+
), Te = Pe(V, U);
|
|
2115
|
+
ee.current = Te, we(Te, { height: U, width: V }), f({
|
|
2116
|
+
height: U,
|
|
2117
|
+
width: V
|
|
2118
2118
|
});
|
|
2119
2119
|
}, [z, R, O, we]);
|
|
2120
2120
|
const nt = N(
|
|
2121
|
-
(
|
|
2121
|
+
(U) => {
|
|
2122
2122
|
ee.current = {
|
|
2123
|
-
scrollTop:
|
|
2124
|
-
scrollLeft:
|
|
2123
|
+
scrollTop: U.scrollTop,
|
|
2124
|
+
scrollLeft: U.scrollLeft
|
|
2125
2125
|
};
|
|
2126
2126
|
},
|
|
2127
2127
|
[_]
|
|
2128
2128
|
);
|
|
2129
2129
|
k(() => () => {
|
|
2130
|
-
|
|
2130
|
+
q.current && clearTimeout(q.current);
|
|
2131
2131
|
}, []);
|
|
2132
2132
|
const rt = W(() => ne(ue["rp-pages-container"], {
|
|
2133
2133
|
[ue["rp-cursor-grab"]]: te && !X,
|
|
2134
2134
|
[ue["rp-cursor-grabbing"]]: te && X
|
|
2135
2135
|
}), [te, X]), jn = N(
|
|
2136
|
-
(
|
|
2137
|
-
if (te &&
|
|
2138
|
-
const
|
|
2136
|
+
(U) => {
|
|
2137
|
+
if (te && U) {
|
|
2138
|
+
const V = ne(ue["rp-pages"]), Te = document.querySelector(`.${V}`);
|
|
2139
2139
|
ae(Te);
|
|
2140
2140
|
}
|
|
2141
2141
|
},
|
|
@@ -2157,12 +2157,12 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2157
2157
|
v,
|
|
2158
2158
|
S,
|
|
2159
2159
|
j
|
|
2160
|
-
]), /* @__PURE__ */ F(
|
|
2161
|
-
/* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(Qo, { style: { minHeight: "50px" }, children: ({ width:
|
|
2160
|
+
]), /* @__PURE__ */ F(fe, { children: [
|
|
2161
|
+
/* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(Qo, { style: { minHeight: "50px" }, children: ({ width: U, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: jn, style: { width: U, height: V }, children: m === J.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2162
2162
|
"div",
|
|
2163
2163
|
{
|
|
2164
2164
|
ref: d,
|
|
2165
|
-
style: { width:
|
|
2165
|
+
style: { width: U, height: V },
|
|
2166
2166
|
className: ne(ue["rp-pages"], ue["rp-page-scrolling-wrapper"]),
|
|
2167
2167
|
children: g === Ie.DUAL_PAGE ? /* @__PURE__ */ i(ei, { widths: M, heights: I }) : /* @__PURE__ */ i(ti, { widths: M, heights: I })
|
|
2168
2168
|
}
|
|
@@ -2177,14 +2177,14 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2177
2177
|
columnCount: O,
|
|
2178
2178
|
columnWidth: M,
|
|
2179
2179
|
rowHeight: I,
|
|
2180
|
-
height:
|
|
2181
|
-
width:
|
|
2180
|
+
height: V,
|
|
2181
|
+
width: U,
|
|
2182
2182
|
estimatedColumnWidth: G,
|
|
2183
2183
|
estimatedRowHeight: Z,
|
|
2184
2184
|
rowCount: R,
|
|
2185
2185
|
className: ne(
|
|
2186
2186
|
ue["rp-pages"],
|
|
2187
|
-
|
|
2187
|
+
m === J.HORIZONTAL_SCROLLING ? ue["rp-pages-horizontal-scroll"] : ""
|
|
2188
2188
|
),
|
|
2189
2189
|
children: ri
|
|
2190
2190
|
}
|
|
@@ -2202,7 +2202,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2202
2202
|
children: y && /* @__PURE__ */ i(y, {})
|
|
2203
2203
|
}
|
|
2204
2204
|
) }) }) }),
|
|
2205
|
-
b && /* @__PURE__ */ i(
|
|
2205
|
+
b && /* @__PURE__ */ i(Ur, {})
|
|
2206
2206
|
] });
|
|
2207
2207
|
}, ke = {
|
|
2208
2208
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
@@ -2210,7 +2210,7 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2210
2210
|
"rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
|
|
2211
2211
|
"rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
|
|
2212
2212
|
"rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
|
|
2213
|
-
},
|
|
2213
|
+
}, mt = {
|
|
2214
2214
|
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
2215
2215
|
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
2216
2216
|
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
@@ -2221,13 +2221,13 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2221
2221
|
const { nextIcon: t } = pe();
|
|
2222
2222
|
return t || /* @__PURE__ */ i(He, { style: { transform: "rotate(180deg" } });
|
|
2223
2223
|
}, ai = () => {
|
|
2224
|
-
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen: p } = Ce(), { localeMessages:
|
|
2224
|
+
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen: p } = Ce(), { localeMessages: f } = se(), { viewMode: _ } = Ee(), { scrollMode: h } = Re();
|
|
2225
2225
|
k(() => {
|
|
2226
2226
|
c(t.toString());
|
|
2227
2227
|
}, [t]);
|
|
2228
2228
|
const v = N((u) => {
|
|
2229
|
-
const
|
|
2230
|
-
c(
|
|
2229
|
+
const m = u.target.value;
|
|
2230
|
+
c(m);
|
|
2231
2231
|
}, []), w = N(async () => {
|
|
2232
2232
|
const u = a(l);
|
|
2233
2233
|
u.success || c(u.currentPage.toString());
|
|
@@ -2249,42 +2249,42 @@ const ei = ln(({ widths: t, heights: e }) => {
|
|
|
2249
2249
|
goToPage: a,
|
|
2250
2250
|
changePage: n
|
|
2251
2251
|
}
|
|
2252
|
-
) : d ? /* @__PURE__ */ F("div", { className:
|
|
2253
|
-
!p && /* @__PURE__ */ i(K, { content:
|
|
2252
|
+
) : d ? /* @__PURE__ */ F("div", { className: mt["rp-paginate"], children: [
|
|
2253
|
+
!p && /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2254
2254
|
re,
|
|
2255
2255
|
{
|
|
2256
2256
|
onClick: r,
|
|
2257
|
-
"aria-label":
|
|
2257
|
+
"aria-label": f == null ? void 0 : f.previousPageTooltip,
|
|
2258
2258
|
"aria-disabled": t === 1,
|
|
2259
2259
|
children: /* @__PURE__ */ i(oi, {})
|
|
2260
2260
|
}
|
|
2261
2261
|
) }),
|
|
2262
|
-
/* @__PURE__ */ i(K, { content:
|
|
2262
|
+
/* @__PURE__ */ i(K, { content: f == null ? void 0 : f.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2263
2263
|
dn,
|
|
2264
2264
|
{
|
|
2265
2265
|
onKeyDown: P,
|
|
2266
2266
|
onBlur: T,
|
|
2267
2267
|
onChange: v,
|
|
2268
2268
|
value: l,
|
|
2269
|
-
className:
|
|
2269
|
+
className: mt["rp-page-input"]
|
|
2270
2270
|
}
|
|
2271
2271
|
) }),
|
|
2272
|
-
/* @__PURE__ */ F("span", { className:
|
|
2272
|
+
/* @__PURE__ */ F("span", { className: mt["rp-total-page"], children: [
|
|
2273
2273
|
"/",
|
|
2274
2274
|
e
|
|
2275
2275
|
] }),
|
|
2276
|
-
!p && /* @__PURE__ */ i(K, { content:
|
|
2276
|
+
!p && /* @__PURE__ */ i(K, { content: f == null ? void 0 : f.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2277
2277
|
re,
|
|
2278
2278
|
{
|
|
2279
2279
|
onClick: o,
|
|
2280
|
-
"aria-label":
|
|
2280
|
+
"aria-label": f == null ? void 0 : f.nextPageTooltip,
|
|
2281
2281
|
"aria-disabled": S,
|
|
2282
2282
|
children: /* @__PURE__ */ i(ii, {})
|
|
2283
2283
|
}
|
|
2284
2284
|
) })
|
|
2285
2285
|
] }) : null;
|
|
2286
2286
|
};
|
|
2287
|
-
var Lt = "Dialog", [In,
|
|
2287
|
+
var Lt = "Dialog", [In, Vs] = Xr(Lt), [si, ce] = In(Lt), Ln = (t) => {
|
|
2288
2288
|
const {
|
|
2289
2289
|
__scopeDialog: e,
|
|
2290
2290
|
children: n,
|
|
@@ -2292,7 +2292,7 @@ var Lt = "Dialog", [In, Us] = Xr(Lt), [si, ce] = In(Lt), Ln = (t) => {
|
|
|
2292
2292
|
defaultOpen: r,
|
|
2293
2293
|
onOpenChange: a,
|
|
2294
2294
|
modal: l = !0
|
|
2295
|
-
} = t, c = B.useRef(null), d = B.useRef(null), [p = !1,
|
|
2295
|
+
} = t, c = B.useRef(null), d = B.useRef(null), [p = !1, f] = Qr({
|
|
2296
2296
|
prop: o,
|
|
2297
2297
|
defaultProp: r,
|
|
2298
2298
|
onChange: a
|
|
@@ -2307,8 +2307,8 @@ var Lt = "Dialog", [In, Us] = Xr(Lt), [si, ce] = In(Lt), Ln = (t) => {
|
|
|
2307
2307
|
titleId: ct(),
|
|
2308
2308
|
descriptionId: ct(),
|
|
2309
2309
|
open: p,
|
|
2310
|
-
onOpenChange:
|
|
2311
|
-
onOpenToggle: B.useCallback(() =>
|
|
2310
|
+
onOpenChange: f,
|
|
2311
|
+
onOpenToggle: B.useCallback(() => f((_) => !_), [f]),
|
|
2312
2312
|
modal: l,
|
|
2313
2313
|
children: n
|
|
2314
2314
|
}
|
|
@@ -2319,7 +2319,7 @@ var Rn = "DialogTrigger", ci = B.forwardRef(
|
|
|
2319
2319
|
(t, e) => {
|
|
2320
2320
|
const { __scopeDialog: n, ...o } = t, r = ce(Rn, n), a = Tt(e, r.triggerRef);
|
|
2321
2321
|
return /* @__PURE__ */ i(
|
|
2322
|
-
|
|
2322
|
+
Ve.button,
|
|
2323
2323
|
{
|
|
2324
2324
|
type: "button",
|
|
2325
2325
|
"aria-haspopup": "dialog",
|
|
@@ -2355,7 +2355,7 @@ var di = B.forwardRef(
|
|
|
2355
2355
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2356
2356
|
// ie. when `Overlay` and `Content` are siblings
|
|
2357
2357
|
/* @__PURE__ */ i(to, { as: Yr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
|
|
2358
|
-
|
|
2358
|
+
Ve.div,
|
|
2359
2359
|
{
|
|
2360
2360
|
"data-state": Nt(r.open),
|
|
2361
2361
|
...o,
|
|
@@ -2427,7 +2427,7 @@ var ui = B.forwardRef(
|
|
|
2427
2427
|
), An = B.forwardRef(
|
|
2428
2428
|
(t, e) => {
|
|
2429
2429
|
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = ce(Le, n), d = B.useRef(null), p = Tt(e, d);
|
|
2430
|
-
return no(), /* @__PURE__ */ F(
|
|
2430
|
+
return no(), /* @__PURE__ */ F(fe, { children: [
|
|
2431
2431
|
/* @__PURE__ */ i(
|
|
2432
2432
|
ro,
|
|
2433
2433
|
{
|
|
@@ -2451,8 +2451,8 @@ var ui = B.forwardRef(
|
|
|
2451
2451
|
)
|
|
2452
2452
|
}
|
|
2453
2453
|
),
|
|
2454
|
-
/* @__PURE__ */ F(
|
|
2455
|
-
/* @__PURE__ */ i(
|
|
2454
|
+
/* @__PURE__ */ F(fe, { children: [
|
|
2455
|
+
/* @__PURE__ */ i(mi, { titleId: c.titleId }),
|
|
2456
2456
|
/* @__PURE__ */ i(gi, { contentRef: d, descriptionId: c.descriptionId })
|
|
2457
2457
|
] })
|
|
2458
2458
|
] });
|
|
@@ -2460,14 +2460,14 @@ var ui = B.forwardRef(
|
|
|
2460
2460
|
), Et = "DialogTitle", zn = B.forwardRef(
|
|
2461
2461
|
(t, e) => {
|
|
2462
2462
|
const { __scopeDialog: n, ...o } = t, r = ce(Et, n);
|
|
2463
|
-
return /* @__PURE__ */ i(
|
|
2463
|
+
return /* @__PURE__ */ i(Ve.h2, { id: r.titleId, ...o, ref: e });
|
|
2464
2464
|
}
|
|
2465
2465
|
);
|
|
2466
2466
|
zn.displayName = Et;
|
|
2467
2467
|
var Fn = "DialogDescription", hi = B.forwardRef(
|
|
2468
2468
|
(t, e) => {
|
|
2469
2469
|
const { __scopeDialog: n, ...o } = t, r = ce(Fn, n);
|
|
2470
|
-
return /* @__PURE__ */ i(
|
|
2470
|
+
return /* @__PURE__ */ i(Ve.p, { id: r.descriptionId, ...o, ref: e });
|
|
2471
2471
|
}
|
|
2472
2472
|
);
|
|
2473
2473
|
hi.displayName = Fn;
|
|
@@ -2475,7 +2475,7 @@ var kn = "DialogClose", Wn = B.forwardRef(
|
|
|
2475
2475
|
(t, e) => {
|
|
2476
2476
|
const { __scopeDialog: n, ...o } = t, r = ce(kn, n);
|
|
2477
2477
|
return /* @__PURE__ */ i(
|
|
2478
|
-
|
|
2478
|
+
Ve.button,
|
|
2479
2479
|
{
|
|
2480
2480
|
type: "button",
|
|
2481
2481
|
...o,
|
|
@@ -2489,11 +2489,11 @@ Wn.displayName = kn;
|
|
|
2489
2489
|
function Nt(t) {
|
|
2490
2490
|
return t ? "open" : "closed";
|
|
2491
2491
|
}
|
|
2492
|
-
var Mn = "DialogTitleWarning", [
|
|
2492
|
+
var Mn = "DialogTitleWarning", [qs, Hn] = Jr(Mn, {
|
|
2493
2493
|
contentName: Le,
|
|
2494
2494
|
titleName: Et,
|
|
2495
2495
|
docsSlug: "dialog"
|
|
2496
|
-
}),
|
|
2496
|
+
}), mi = ({ titleId: t }) => {
|
|
2497
2497
|
const e = Hn(Mn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2498
2498
|
|
|
2499
2499
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -2502,8 +2502,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2502
2502
|
return B.useEffect(() => {
|
|
2503
2503
|
t && (document.getElementById(t) || console.error(n));
|
|
2504
2504
|
}, [n, t]), null;
|
|
2505
|
-
},
|
|
2506
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hn(
|
|
2505
|
+
}, fi = "DialogDescriptionWarning", gi = ({ contentRef: t, descriptionId: e }) => {
|
|
2506
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hn(fi).contentName}}.`;
|
|
2507
2507
|
return B.useEffect(() => {
|
|
2508
2508
|
var a;
|
|
2509
2509
|
const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
@@ -2527,7 +2527,7 @@ const xe = {
|
|
|
2527
2527
|
filename: c,
|
|
2528
2528
|
title: d,
|
|
2529
2529
|
author: p,
|
|
2530
|
-
subject:
|
|
2530
|
+
subject: f,
|
|
2531
2531
|
createdOn: _,
|
|
2532
2532
|
creator: h,
|
|
2533
2533
|
keywords: v,
|
|
@@ -2542,7 +2542,7 @@ const xe = {
|
|
|
2542
2542
|
{ separate: !0 },
|
|
2543
2543
|
{ label: r == null ? void 0 : r.propertiesTitleLabel, value: d },
|
|
2544
2544
|
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value: p },
|
|
2545
|
-
{ label: r == null ? void 0 : r.propertiesSubjectLabel, value:
|
|
2545
|
+
{ label: r == null ? void 0 : r.propertiesSubjectLabel, value: f },
|
|
2546
2546
|
{ label: r == null ? void 0 : r.propertiesKeywordLabel, value: v },
|
|
2547
2547
|
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value: h },
|
|
2548
2548
|
{
|
|
@@ -2585,18 +2585,18 @@ const xe = {
|
|
|
2585
2585
|
}, [t, e]) };
|
|
2586
2586
|
}, Gn = () => {
|
|
2587
2587
|
const { downloadIcon: t } = pe();
|
|
2588
|
-
return t || /* @__PURE__ */ i(
|
|
2589
|
-
},
|
|
2588
|
+
return t || /* @__PURE__ */ i(fo, {});
|
|
2589
|
+
}, Un = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ii = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Un, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Gn, {}) }) }), Li = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ F(Un, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2590
2590
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Gn, {}) }),
|
|
2591
2591
|
e == null ? void 0 : e.downloadFileLabel
|
|
2592
|
-
] }) }),
|
|
2592
|
+
] }) }), Vn = () => {
|
|
2593
2593
|
const { download: t } = $n(), { downloadTool: e = !0 } = ve(), { isSmallScreen: n } = Ce(), { localeMessages: o } = se();
|
|
2594
2594
|
return e ? n ? /* @__PURE__ */ i(Li, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(Ii, { download: t, localeMessages: o }) : null : null;
|
|
2595
|
-
},
|
|
2595
|
+
}, qn = () => {
|
|
2596
2596
|
const { printIcon: t } = pe();
|
|
2597
2597
|
return t || /* @__PURE__ */ i(go, {});
|
|
2598
|
-
}, Bn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Ri = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Bn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(
|
|
2599
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2598
|
+
}, Bn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Ri = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Bn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(qn, {}) }) }), Ei = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ F(Bn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2599
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(qn, {}) }),
|
|
2600
2600
|
e == null ? void 0 : e.printLabel
|
|
2601
2601
|
] }) }), Zn = () => {
|
|
2602
2602
|
const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: l = !0 } = ve(), { isSmallScreen: c } = Ce(), { localeMessages: d } = se();
|
|
@@ -2646,12 +2646,12 @@ const xe = {
|
|
|
2646
2646
|
selectionModeTool: c,
|
|
2647
2647
|
jumpNavigationTool: d,
|
|
2648
2648
|
printTool: p,
|
|
2649
|
-
fullscreenTool:
|
|
2649
|
+
fullscreenTool: f
|
|
2650
2650
|
} = ve(), { localeMessages: _ } = se();
|
|
2651
2651
|
return W(() => {
|
|
2652
2652
|
const v = d || l || c || a || r;
|
|
2653
2653
|
let w = !1;
|
|
2654
|
-
return e && (w = !(!n && !o && !p && !
|
|
2654
|
+
return e && (w = !(!n && !o && !p && !f)), v || w;
|
|
2655
2655
|
}, [
|
|
2656
2656
|
n,
|
|
2657
2657
|
o,
|
|
@@ -2663,14 +2663,14 @@ const xe = {
|
|
|
2663
2663
|
e
|
|
2664
2664
|
]) ? /* @__PURE__ */ F(lo, { children: [
|
|
2665
2665
|
/* @__PURE__ */ i(
|
|
2666
|
-
|
|
2666
|
+
fn,
|
|
2667
2667
|
{
|
|
2668
2668
|
container: t,
|
|
2669
2669
|
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: _ == null ? void 0 : _.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": _ == null ? void 0 : _.moreOptionTooltip, children: /* @__PURE__ */ i(Kr, {}) }) }) }),
|
|
2670
2670
|
children: /* @__PURE__ */ F("div", { className: Si["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2671
2671
|
e && /* @__PURE__ */ F(Ke, { children: [
|
|
2672
|
-
/* @__PURE__ */ i(
|
|
2673
|
-
/* @__PURE__ */ i(
|
|
2672
|
+
/* @__PURE__ */ i(mn, {}),
|
|
2673
|
+
/* @__PURE__ */ i(Vn, {}),
|
|
2674
2674
|
/* @__PURE__ */ i(Zn, {}),
|
|
2675
2675
|
/* @__PURE__ */ i(gn, {}),
|
|
2676
2676
|
/* @__PURE__ */ i(yt, {})
|
|
@@ -2679,7 +2679,7 @@ const xe = {
|
|
|
2679
2679
|
/* @__PURE__ */ i(po, {}),
|
|
2680
2680
|
/* @__PURE__ */ i(vo, {}),
|
|
2681
2681
|
/* @__PURE__ */ i(ho, {}),
|
|
2682
|
-
/* @__PURE__ */ i(
|
|
2682
|
+
/* @__PURE__ */ i(mo, {}),
|
|
2683
2683
|
/* @__PURE__ */ i(uo, {})
|
|
2684
2684
|
] })
|
|
2685
2685
|
}
|
|
@@ -2688,11 +2688,11 @@ const xe = {
|
|
|
2688
2688
|
] }) : null;
|
|
2689
2689
|
}, Fi = () => {
|
|
2690
2690
|
const { isSmallScreen: t } = Ce();
|
|
2691
|
-
return /* @__PURE__ */ F(
|
|
2691
|
+
return /* @__PURE__ */ F(fe, { children: [
|
|
2692
2692
|
/* @__PURE__ */ i(jr, {}),
|
|
2693
|
-
!t && /* @__PURE__ */ F(
|
|
2694
|
-
/* @__PURE__ */ i(
|
|
2695
|
-
/* @__PURE__ */ i(
|
|
2693
|
+
!t && /* @__PURE__ */ F(fe, { children: [
|
|
2694
|
+
/* @__PURE__ */ i(mn, {}),
|
|
2695
|
+
/* @__PURE__ */ i(Vn, {}),
|
|
2696
2696
|
/* @__PURE__ */ i(Zn, {}),
|
|
2697
2697
|
/* @__PURE__ */ i(gn, {})
|
|
2698
2698
|
] }),
|
|
@@ -2704,35 +2704,35 @@ const xe = {
|
|
|
2704
2704
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2705
2705
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2706
2706
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2707
|
-
}, ki = 25,
|
|
2707
|
+
}, ki = 25, ft = 1e3, Wi = [50, 75, 100, 125, 150, 200, 300, 400], Mi = () => {
|
|
2708
2708
|
const { zoomInIcon: t } = pe();
|
|
2709
2709
|
return t || /* @__PURE__ */ i(wo, {});
|
|
2710
2710
|
}, Hi = () => {
|
|
2711
2711
|
const { zoomOutIcon: t } = pe();
|
|
2712
2712
|
return t || /* @__PURE__ */ i(_o, {});
|
|
2713
2713
|
}, $i = () => {
|
|
2714
|
-
const { zoomLevel: t, setZoomLevel: e } = Qe(), { container: n, pagesRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: l } = Ge(), { pages: c } = Q(), { isSmallScreen: d } = Ce(), { localeMessages: p } = se(), { viewMode:
|
|
2714
|
+
const { zoomLevel: t, setZoomLevel: e } = Qe(), { container: n, pagesRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: l } = Ge(), { pages: c } = Q(), { isSmallScreen: d } = Ce(), { localeMessages: p } = se(), { viewMode: f } = Ee(), _ = N(() => {
|
|
2715
2715
|
e((u) => {
|
|
2716
|
-
const
|
|
2717
|
-
return Math.min(
|
|
2716
|
+
const m = Math.floor(u / 25) * 25;
|
|
2717
|
+
return Math.min(m + 25, ft);
|
|
2718
2718
|
});
|
|
2719
2719
|
}, [e]), h = N(() => {
|
|
2720
2720
|
e((u) => {
|
|
2721
|
-
const
|
|
2722
|
-
return Math.min(
|
|
2721
|
+
const m = Math.ceil(u / 25) * 25;
|
|
2722
|
+
return Math.min(m - 25, ft);
|
|
2723
2723
|
});
|
|
2724
|
-
}, [e]), v = W(() => t === ki, [t]), w = W(() => t ===
|
|
2724
|
+
}, [e]), v = W(() => t === ki, [t]), w = W(() => t === ft, [t]), T = W(() => {
|
|
2725
2725
|
var u;
|
|
2726
2726
|
return (u = c.get(a)) == null ? void 0 : u.page.getViewport({ scale: 1, rotation: l });
|
|
2727
2727
|
}, [c, a, l]), P = N(
|
|
2728
2728
|
(u) => {
|
|
2729
|
-
const
|
|
2729
|
+
const m = ((T == null ? void 0 : T.width) || 0) + 2 * Mt, g = ((T == null ? void 0 : T.height) || 0) + 2 * Mt, s = (o == null ? void 0 : o.clientWidth) || 0, C = (o == null ? void 0 : o.clientHeight) || 0, b = bo(
|
|
2730
2730
|
u,
|
|
2731
2731
|
s,
|
|
2732
2732
|
C,
|
|
2733
|
-
|
|
2733
|
+
m,
|
|
2734
2734
|
g,
|
|
2735
|
-
|
|
2735
|
+
f
|
|
2736
2736
|
);
|
|
2737
2737
|
e(b);
|
|
2738
2738
|
},
|
|
@@ -2754,7 +2754,7 @@ const xe = {
|
|
|
2754
2754
|
}
|
|
2755
2755
|
) }),
|
|
2756
2756
|
!d && /* @__PURE__ */ i(
|
|
2757
|
-
|
|
2757
|
+
fn,
|
|
2758
2758
|
{
|
|
2759
2759
|
container: n,
|
|
2760
2760
|
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.zoomSelectTooltip, children: /* @__PURE__ */ F(
|
|
@@ -2801,7 +2801,7 @@ const xe = {
|
|
|
2801
2801
|
nextMatch: e,
|
|
2802
2802
|
prevMatch: n
|
|
2803
2803
|
} = xt(), { localeMessages: o } = se();
|
|
2804
|
-
return /* @__PURE__ */ F(
|
|
2804
|
+
return /* @__PURE__ */ F(fe, { children: [
|
|
2805
2805
|
/* @__PURE__ */ i(K, { content: o == null ? void 0 : o.searchPrevTooltip, className: Y["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(re, { onClick: n, "aria-label": o == null ? void 0 : o.searchPrevTooltip, children: /* @__PURE__ */ i(
|
|
2806
2806
|
He,
|
|
2807
2807
|
{
|
|
@@ -2827,12 +2827,12 @@ const xe = {
|
|
|
2827
2827
|
setSearchOptions: c,
|
|
2828
2828
|
loading: d,
|
|
2829
2829
|
setSearch: p,
|
|
2830
|
-
totalMatches:
|
|
2830
|
+
totalMatches: f,
|
|
2831
2831
|
currentMatchPosition: _,
|
|
2832
2832
|
nextMatch: h,
|
|
2833
2833
|
prevMatch: v,
|
|
2834
2834
|
search: w
|
|
2835
|
-
} = xt(), { searchTool: T = !0 } = ve(), [P, S] = $(w), { localeMessages: u } = se(), { isSmallScreen:
|
|
2835
|
+
} = xt(), { searchTool: T = !0 } = ve(), [P, S] = $(w), { localeMessages: u } = se(), { isSmallScreen: m } = Ce(), g = N(() => {
|
|
2836
2836
|
n(!0);
|
|
2837
2837
|
}, []), s = N(() => {
|
|
2838
2838
|
p(""), S(""), n(!1);
|
|
@@ -2859,7 +2859,7 @@ const xe = {
|
|
|
2859
2859
|
S(I.target.value);
|
|
2860
2860
|
}, []), x = N(() => {
|
|
2861
2861
|
S(""), p("");
|
|
2862
|
-
}, [p]), L = W(() => `${_} / ${
|
|
2862
|
+
}, [p]), L = W(() => `${_} / ${f}`, [_, f]), { wholeWords: D, matchCase: A } = W(() => l, [l]), z = N(
|
|
2863
2863
|
(I) => {
|
|
2864
2864
|
c((O) => ({ ...O, matchCase: I }));
|
|
2865
2865
|
},
|
|
@@ -2872,7 +2872,7 @@ const xe = {
|
|
|
2872
2872
|
);
|
|
2873
2873
|
return k(() => {
|
|
2874
2874
|
s();
|
|
2875
|
-
}, [o, s]), T ? /* @__PURE__ */ i(
|
|
2875
|
+
}, [o, s]), T ? /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
|
|
2876
2876
|
Mr,
|
|
2877
2877
|
{
|
|
2878
2878
|
open: e,
|
|
@@ -2895,32 +2895,32 @@ const xe = {
|
|
|
2895
2895
|
}
|
|
2896
2896
|
) }),
|
|
2897
2897
|
d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Ct, { className: Y["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: L }),
|
|
2898
|
-
|
|
2898
|
+
m && /* @__PURE__ */ i("div", { className: Y["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: C, handleClose: s }) })
|
|
2899
2899
|
] }),
|
|
2900
2900
|
/* @__PURE__ */ F("div", { className: Y["rp-search-tool-input-checkboxes"], children: [
|
|
2901
|
-
|
|
2901
|
+
m && /* @__PURE__ */ i(on, {}),
|
|
2902
2902
|
/* @__PURE__ */ i($t, { name: "matchCase", value: A, onChange: z, children: u == null ? void 0 : u.searchMatchCaseLabel }),
|
|
2903
|
-
!
|
|
2903
|
+
!m && /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) }),
|
|
2904
2904
|
/* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange: R, children: u == null ? void 0 : u.searchWholeWordsLabel }),
|
|
2905
|
-
!
|
|
2905
|
+
!m && /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: Y["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) })
|
|
2906
2906
|
] })
|
|
2907
2907
|
] }),
|
|
2908
|
-
!
|
|
2908
|
+
!m && /* @__PURE__ */ F("div", { className: Y["rp-search-tool-controls"], children: [
|
|
2909
2909
|
/* @__PURE__ */ i(on, {}),
|
|
2910
2910
|
/* @__PURE__ */ i(Ht, { onKeyPress: C, handleClose: s })
|
|
2911
2911
|
] })
|
|
2912
2912
|
] })
|
|
2913
2913
|
}
|
|
2914
2914
|
) }) : null;
|
|
2915
|
-
},
|
|
2915
|
+
}, Ui = "_loading_vpexk_1", Ae = {
|
|
2916
2916
|
"rp-loading-overlay": "_rp-loading-overlay_vpexk_1",
|
|
2917
2917
|
"rp-loading-modal": "_rp-loading-modal_vpexk_14",
|
|
2918
2918
|
"rp-loading-title": "_rp-loading-title_vpexk_27",
|
|
2919
2919
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_vpexk_35",
|
|
2920
2920
|
"rp-loading-progress": "_rp-loading-progress_vpexk_35",
|
|
2921
2921
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_vpexk_55",
|
|
2922
|
-
loading:
|
|
2923
|
-
},
|
|
2922
|
+
loading: Ui
|
|
2923
|
+
}, Vi = ({ percentage: t }) => {
|
|
2924
2924
|
const { cancel: e } = tt(), { localeMessages: n } = se();
|
|
2925
2925
|
return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(Ae["rp-loading-overlay"]), children: /* @__PURE__ */ F("div", { className: ne(Ae["rp-loading-modal"]), children: [
|
|
2926
2926
|
/* @__PURE__ */ F("div", { className: ne(Ae["rp-loading-title"]), children: [
|
|
@@ -2936,7 +2936,7 @@ const xe = {
|
|
|
2936
2936
|
) }),
|
|
2937
2937
|
/* @__PURE__ */ i("button", { className: ne(Ae["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
2938
2938
|
] }) });
|
|
2939
|
-
},
|
|
2939
|
+
}, qi = $e((t, e) => {
|
|
2940
2940
|
const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Ce(), { percentage: a } = o || {}, l = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2941
2941
|
return /* @__PURE__ */ F("div", { children: [
|
|
2942
2942
|
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: ke["rp-toolbar-content"], children: /* @__PURE__ */ F("div", { className: ke["rp-toolbar-wrapper"], style: l(), children: [
|
|
@@ -2947,7 +2947,7 @@ const xe = {
|
|
|
2947
2947
|
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: ke["rp-toolbar-middle"], children: /* @__PURE__ */ i($i, {}) }),
|
|
2948
2948
|
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: ke["rp-toolbar-end"], children: /* @__PURE__ */ i(Fi, {}) })
|
|
2949
2949
|
] }) }),
|
|
2950
|
-
n && a ? /* @__PURE__ */ i(
|
|
2950
|
+
n && a ? /* @__PURE__ */ i(Vi, { percentage: a }) : null
|
|
2951
2951
|
] });
|
|
2952
2952
|
}), gt = {
|
|
2953
2953
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
@@ -3004,15 +3004,15 @@ const xe = {
|
|
|
3004
3004
|
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
3005
3005
|
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Zi);
|
|
3006
3006
|
}, Ki = $e((t, e) => {
|
|
3007
|
-
const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: d } = Pn(), p = H(null),
|
|
3007
|
+
const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: d } = Pn(), p = H(null), f = H(1);
|
|
3008
3008
|
cn(e, () => p.current);
|
|
3009
3009
|
const _ = W(() => Object.values(a), [a]), h = N(() => {
|
|
3010
3010
|
const v = c + 1;
|
|
3011
3011
|
v <= r && l(v);
|
|
3012
3012
|
}, [l, r, c]);
|
|
3013
3013
|
return k(() => {
|
|
3014
|
-
o > c ? d(o) : n &&
|
|
3015
|
-
}, [o, c, d, n, _]),
|
|
3014
|
+
o > c ? d(o) : n && f.current !== o && (ji(p.current, o), f.current = o);
|
|
3015
|
+
}, [o, c, d, n, _]), fr(p.current, h), /* @__PURE__ */ i("div", { ref: p, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? _.map((v, w) => {
|
|
3016
3016
|
var T, P;
|
|
3017
3017
|
return /* @__PURE__ */ i(
|
|
3018
3018
|
Bi,
|
|
@@ -3028,10 +3028,10 @@ const xe = {
|
|
|
3028
3028
|
}) : null }) });
|
|
3029
3029
|
}), Xi = () => {
|
|
3030
3030
|
const { thumbnailIcon: t } = pe();
|
|
3031
|
-
return t || /* @__PURE__ */ i(
|
|
3031
|
+
return t || /* @__PURE__ */ i(mr, {});
|
|
3032
3032
|
}, Yi = () => {
|
|
3033
3033
|
const { active: t, setActive: e } = Pn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: l } = ve(), { localeMessages: c } = se(), d = N(() => {
|
|
3034
|
-
e((
|
|
3034
|
+
e((f) => !f);
|
|
3035
3035
|
}, []), p = W(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: t }) : a ? /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
3036
3036
|
re,
|
|
3037
3037
|
{
|
|
@@ -3041,7 +3041,7 @@ const xe = {
|
|
|
3041
3041
|
children: /* @__PURE__ */ i(Xi, {})
|
|
3042
3042
|
}
|
|
3043
3043
|
) }) : null, [a, t, d, c]);
|
|
3044
|
-
return /* @__PURE__ */ i(
|
|
3044
|
+
return /* @__PURE__ */ i(fe, { children: l && /* @__PURE__ */ F(
|
|
3045
3045
|
"div",
|
|
3046
3046
|
{
|
|
3047
3047
|
style: { "--rp-thumbnail-width": `${n}px` },
|
|
@@ -3105,14 +3105,14 @@ const xe = {
|
|
|
3105
3105
|
mobileWidth: c,
|
|
3106
3106
|
onLoaded: d,
|
|
3107
3107
|
cleanupOnLoaded: p,
|
|
3108
|
-
onLayoutWidthChange:
|
|
3108
|
+
onLayoutWidthChange: f
|
|
3109
3109
|
} = t, [_, h] = $(null), { setContainer: v, setContentRef: w } = ge(), { loading: T } = Q(), { LoaderImageComponent: P } = hn();
|
|
3110
3110
|
return k(() => (d && d(), () => {
|
|
3111
3111
|
p && p();
|
|
3112
|
-
}), [d, p]), /* @__PURE__ */ i(Ji, { toolbarRef: _, ref: e, children: /* @__PURE__ */ i(Pr, { mobileWidth: c, onLayoutWidthChange:
|
|
3112
|
+
}), [d, p]), /* @__PURE__ */ i(Ji, { toolbarRef: _, ref: e, children: /* @__PURE__ */ i(Pr, { mobileWidth: c, onLayoutWidthChange: f, children: /* @__PURE__ */ i(vr, { slots: o, children: /* @__PURE__ */ i(wr, { icons: r, children: /* @__PURE__ */ F(_r, { getContainerRef: v, style: a, className: l, children: [
|
|
3113
3113
|
/* @__PURE__ */ F(br, { children: [
|
|
3114
3114
|
/* @__PURE__ */ F("div", { className: _e["rp-layout"], children: [
|
|
3115
|
-
/* @__PURE__ */ i(
|
|
3115
|
+
/* @__PURE__ */ i(qi, { ref: h }),
|
|
3116
3116
|
/* @__PURE__ */ F("div", { className: _e["rp-content"], children: [
|
|
3117
3117
|
/* @__PURE__ */ i("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ i(Yi, {}) }),
|
|
3118
3118
|
/* @__PURE__ */ i("div", { ref: w, className: _e["rp-pages"], children: n })
|
|
@@ -3156,17 +3156,17 @@ export {
|
|
|
3156
3156
|
Io as C,
|
|
3157
3157
|
ei as D,
|
|
3158
3158
|
Gi as E,
|
|
3159
|
-
|
|
3160
|
-
|
|
3159
|
+
Vn as F,
|
|
3160
|
+
qi as G,
|
|
3161
3161
|
Bi as H,
|
|
3162
3162
|
Ki as I,
|
|
3163
3163
|
Yi as J,
|
|
3164
3164
|
Ji as K,
|
|
3165
|
-
|
|
3165
|
+
Vi as L,
|
|
3166
3166
|
Ai as M,
|
|
3167
3167
|
zi as O,
|
|
3168
3168
|
Ms as P,
|
|
3169
|
-
|
|
3169
|
+
Us as R,
|
|
3170
3170
|
Gs as S,
|
|
3171
3171
|
$s as T,
|
|
3172
3172
|
$i as Z,
|