@pdf-viewer/react 1.4.0-beta.8 → 1.4.0-beta.9
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/Popover-5281103c.js +3061 -0
- package/dist/{RPDefaultLayout-dacb44e1.js → RPDefaultLayout-ec67ce59.js} +390 -391
- 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/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/OtherTool.js +1 -1
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +2 -2
- 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/components/ui/Popover.js +4 -3058
- 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/contexts/ViewportContext.js +1 -1
- package/dist/main.js +1 -1
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/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,91 +1,91 @@
|
|
|
1
1
|
import { jsx as i, Fragment as Ie, jsxs as z } from "react/jsx-runtime";
|
|
2
2
|
import * as U from "react";
|
|
3
|
-
import { useRef as W, useEffect as D, useCallback as R, useState as G, createContext as je, useContext as Be, useMemo as k, forwardRef as Ke, useImperativeHandle as
|
|
3
|
+
import { useRef as W, useEffect as D, useCallback as R, useState as G, createContext as je, useContext as Be, useMemo as k, forwardRef as Ke, useImperativeHandle as sn, createElement as He, PureComponent as ir, Component as ar, memo as sr } from "react";
|
|
4
4
|
import { ChevronUpIcon as Me } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as re } from "./components/ui/Button.js";
|
|
6
|
-
import { UIInput as
|
|
6
|
+
import { UIInput as cn } from "./components/ui/Input.js";
|
|
7
7
|
import { useScrollModeContext as ze } from "./contexts/ScrollModeContext.js";
|
|
8
8
|
import { useDocumentContext as J } from "./contexts/RPDocumentContext.js";
|
|
9
9
|
import "./contexts/DarkModeContext.js";
|
|
10
|
-
import { ViewMode as Ue, ScrollMode as X, AnnotationSubType as
|
|
10
|
+
import { ViewMode as Ue, ScrollMode as X, AnnotationSubType as Ft, SelectionMode as cr, ZoomLevel as at } from "./utils/types.js";
|
|
11
11
|
import { useRotationContext as Xe } from "./contexts/RotationContext.js";
|
|
12
|
-
import { useLayerContext as
|
|
12
|
+
import { useLayerContext as lr } from "./contexts/LayerContext.js";
|
|
13
13
|
import { useZoomContext as Je } from "./contexts/ZoomContext.js";
|
|
14
14
|
import { useViewModeContext as Ye } from "./contexts/ViewModeContext.js";
|
|
15
15
|
import { useVirtualScrollContext as Qe } from "./contexts/VirtualScrollContext.js";
|
|
16
|
-
import { useVirtualGridContext as
|
|
16
|
+
import { useVirtualGridContext as ln } from "./contexts/VirtualGridContext.js";
|
|
17
17
|
import { useScrollStateContext as et } from "./contexts/ScrollStateContext.js";
|
|
18
|
-
import { useSelectionModeContext as
|
|
19
|
-
import { useInitialStateContext as
|
|
20
|
-
import { useFullScreenContext as
|
|
18
|
+
import { useSelectionModeContext as ur } from "./contexts/SelectionModeContext.js";
|
|
19
|
+
import { useInitialStateContext as dr } from "./contexts/InitialStateContext.js";
|
|
20
|
+
import { useFullScreenContext as pr } from "./contexts/FullScreenContext.js";
|
|
21
21
|
import "./contexts/FileInputContext.js";
|
|
22
22
|
import "./contexts/DropFileZoneContext.js";
|
|
23
23
|
import { renderPage as _t } from "./utils/renderPage.js";
|
|
24
|
-
import { highlightMatches as
|
|
25
|
-
import * as
|
|
26
|
-
import { PixelsPerInch as
|
|
27
|
-
import { useLayoutContainer as
|
|
28
|
-
import { useDimensionPagesContext as
|
|
24
|
+
import { highlightMatches as un, findMatches as hr, resetDivs as dn, highlightMultipleColorMatches as mr } from "./utils/highlight.js";
|
|
25
|
+
import * as Pt from "pdfjs-dist";
|
|
26
|
+
import { PixelsPerInch as fr, AnnotationMode as gr, RenderingCancelledException as vr, AnnotationLayer as _r } from "pdfjs-dist";
|
|
27
|
+
import { useLayoutContainer as ye } from "./contexts/LayoutContainerContext.js";
|
|
28
|
+
import { useDimensionPagesContext as St } from "./contexts/DimensionPagesContext.js";
|
|
29
29
|
import { useLocalizationContext as de } from "./contexts/LocalizationContext.js";
|
|
30
|
-
import { useHighlightContext as
|
|
31
|
-
import { useSmoothScrollContext as
|
|
32
|
-
import { useLoaderContext as
|
|
30
|
+
import { useHighlightContext as wr } from "./contexts/HighlightContext.js";
|
|
31
|
+
import { useSmoothScrollContext as pn } from "./contexts/SmoothScrollContext.js";
|
|
32
|
+
import { useLoaderContext as hn } from "./contexts/LoaderContext.js";
|
|
33
33
|
import "./components/RPConfig.js";
|
|
34
|
-
import { ThumbnailIcon as
|
|
34
|
+
import { ThumbnailIcon as br } from "./components/icons/Thumbnail.js";
|
|
35
35
|
import { c as ie } from "./clsx-0c6e471a.js";
|
|
36
|
-
import { LoaderIcon as
|
|
37
|
-
import { useInfiniteScroll as
|
|
38
|
-
import { RPSplitter as
|
|
39
|
-
import { useToolbarComponentContext as _e, ToolbarComponentProvider as
|
|
40
|
-
import { useIconContext as pe, IconProvider as
|
|
36
|
+
import { LoaderIcon as It } from "./components/icons/LoaderIcon.js";
|
|
37
|
+
import { useInfiniteScroll as Cr } from "./utils/hooks/useInfiniteScroll.js";
|
|
38
|
+
import { RPSplitter as Tr } from "./components/layout/sidebar/RPSplitter.js";
|
|
39
|
+
import { useToolbarComponentContext as _e, ToolbarComponentProvider as Pr } from "./contexts/ToolbarComponentContext.js";
|
|
40
|
+
import { useIconContext as pe, IconProvider as Sr } from "./contexts/IconContext.js";
|
|
41
41
|
import q from "./components/ui/RPTooltip.js";
|
|
42
|
-
import { c as Te, C as
|
|
42
|
+
import { c as Te, C as Ir } from "./Container-8fea0875.js";
|
|
43
43
|
import { WrapperLayout as xr } from "./components/layout/WrapperLayout.js";
|
|
44
|
-
import { RPDropFileZone as
|
|
45
|
-
import { useViewportContext as Re, ViewportProvider as
|
|
44
|
+
import { RPDropFileZone as yr } from "./components/RPDropFileZone.js";
|
|
45
|
+
import { useViewportContext as Re, ViewportProvider as Rr } from "./contexts/ViewportContext.js";
|
|
46
46
|
import "./contexts/ThemeContext.js";
|
|
47
|
-
import { SimpleLinkService as
|
|
48
|
-
import { annotationsEvents as
|
|
49
|
-
import { useWatermark as
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
47
|
+
import { SimpleLinkService as Lr } from "./utils/link_service.js";
|
|
48
|
+
import { annotationsEvents as Nr, annotationEventsHandler as Er, handleClick as kt, handleAnnotationWidget as Or, handleAnnotationLink as Dr, bindLayerEvents as zr, unbindLayerEvents as Mt } from "./utils/annotations.js";
|
|
49
|
+
import { useWatermark as Ar } from "./utils/hooks/useWatermark.js";
|
|
50
|
+
import { _ as Fr, U as kr } from "./Popover-5281103c.js";
|
|
51
|
+
import { useMousePressed as Mr } from "./utils/hooks/useMousePressed.js";
|
|
52
|
+
import { useGrabScroll as Wr } from "./utils/hooks/useGrabScroll.js";
|
|
53
|
+
import { usePinch as Hr } from "./utils/hooks/usePinch.js";
|
|
53
54
|
import { useDebounce as wt } from "./utils/hooks/useDebounce.js";
|
|
54
|
-
import { getThumbnailViewport as
|
|
55
|
+
import { getThumbnailViewport as Wt } from "./utils/getThumbnailViewport.js";
|
|
55
56
|
import { smoothScrollTo as Pe } from "./utils/smoothScrollTo.js";
|
|
56
|
-
import { appConsole as
|
|
57
|
-
import { FileUploadTool as
|
|
58
|
-
import { DarkModeTool as
|
|
59
|
-
import { ThreeDotIcon as
|
|
60
|
-
import { UIDropDown as
|
|
61
|
-
import { c as
|
|
62
|
-
import { D as
|
|
63
|
-
import { a as
|
|
64
|
-
import { CloseIcon as
|
|
65
|
-
import { dateFormatter as
|
|
66
|
-
import { PropertyItem as
|
|
67
|
-
import { useOtherToolContext as
|
|
68
|
-
import { DocumentProperties as
|
|
69
|
-
import { RotateTool as
|
|
70
|
-
import { ScrollModeTool as
|
|
71
|
-
import { MenuSeparator as
|
|
72
|
-
import { FileDownloadDefaultIcon as
|
|
57
|
+
import { appConsole as $r } from "./utils/appConsole.js";
|
|
58
|
+
import { FileUploadTool as mn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
59
|
+
import { DarkModeTool as Gr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
60
|
+
import { ThreeDotIcon as Vr } from "./components/icons/ThreeDotIcon.js";
|
|
61
|
+
import { UIDropDown as fn } from "./components/ui/DropDown.js";
|
|
62
|
+
import { c as Ur, u as xt, P as We, b as ke, d as yt, i as qr, k as Zr, a as jr } from "./index-48ca3f30.js";
|
|
63
|
+
import { D as Br, d as st } from "./floating-ui.react-dom-88a86594.js";
|
|
64
|
+
import { a as Kr, h as Xr, u as Jr, F as Yr, b as Qr, G as qe } from "./index-4ba3ab9a.js";
|
|
65
|
+
import { CloseIcon as gn } from "./components/icons/CloseIcon.js";
|
|
66
|
+
import { dateFormatter as Ht } from "./utils/dateFormatter.js";
|
|
67
|
+
import { PropertyItem as eo } from "./components/layout/toolbar/PropertyItem.js";
|
|
68
|
+
import { useOtherToolContext as to, OtherToolProvider as no } from "./contexts/OtherToolContext.js";
|
|
69
|
+
import { DocumentProperties as ro } from "./components/layout/toolbar/DocumentProperties.js";
|
|
70
|
+
import { RotateTool as oo } from "./components/layout/toolbar/RotateTool.js";
|
|
71
|
+
import { ScrollModeTool as io } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
72
|
+
import { MenuSeparator as Rt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
73
|
+
import { FileDownloadDefaultIcon as ao } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
73
74
|
import { MenuItem as we } from "./components/layout/toolbar/MenuItem.js";
|
|
74
|
-
import { PrintDefaultTool as
|
|
75
|
-
import { FullScreenTool as
|
|
76
|
-
import { GoToDownIcon as
|
|
77
|
-
import { SelectionModeTool as
|
|
78
|
-
import { ZoomInIcon as
|
|
79
|
-
import { ZoomOutIcon as
|
|
80
|
-
import { PAGE_PADDING as
|
|
81
|
-
import { getZoomLevel as
|
|
82
|
-
import { SearchIcon as
|
|
83
|
-
import { UICheckbox as
|
|
84
|
-
import { ClearIcon as
|
|
85
|
-
import { InfoIcon as
|
|
86
|
-
import
|
|
87
|
-
|
|
88
|
-
const { viewMode: t } = Ye(), { scrollMode: e } = ze(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = Qe(), { setFocusedPage: a } = ce(), c = W(), { columnCount: s } = un(), { widths: u, heights: l } = It(), d = W(e), f = W(t), h = W(s), { targetScrollPosition: g, smoothScrolling: v } = hn();
|
|
75
|
+
import { PrintDefaultTool as so } from "./components/icons/PrintDefaultIcon.js";
|
|
76
|
+
import { FullScreenTool as vn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
77
|
+
import { GoToDownIcon as _n } from "./components/icons/GoToDownIcon.js";
|
|
78
|
+
import { SelectionModeTool as co } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
79
|
+
import { ZoomInIcon as lo } from "./components/icons/ZoomInIcon.js";
|
|
80
|
+
import { ZoomOutIcon as uo } from "./components/icons/ZoomOutIcon.js";
|
|
81
|
+
import { PAGE_PADDING as $t } from "./utils/constants.js";
|
|
82
|
+
import { getZoomLevel as po } from "./utils/getZoomLevel.js";
|
|
83
|
+
import { SearchIcon as ho } from "./components/icons/SearchIcon.js";
|
|
84
|
+
import { UICheckbox as Gt } from "./components/ui/Checkbox.js";
|
|
85
|
+
import { ClearIcon as mo } from "./components/icons/ClearIcon.js";
|
|
86
|
+
import { InfoIcon as Vt } from "./components/icons/InfoIcon.js";
|
|
87
|
+
import './assets/RPDefaultLayout.css';const wn = () => {
|
|
88
|
+
const { viewMode: t } = Ye(), { scrollMode: e } = ze(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = Qe(), { setFocusedPage: a } = ce(), c = W(), { columnCount: s } = ln(), { widths: u, heights: l } = St(), d = W(e), f = W(t), h = W(s), { targetScrollPosition: g, smoothScrolling: v } = pn();
|
|
89
89
|
D(() => {
|
|
90
90
|
n != null && n.scrollToItem && (c.current = n);
|
|
91
91
|
}, [n]), D(() => {
|
|
@@ -98,7 +98,7 @@ import './assets/RPDefaultLayout.css';const bn = () => {
|
|
|
98
98
|
const m = Math.ceil(_ / 2) * 2 - 1;
|
|
99
99
|
if (_ === m + 1) {
|
|
100
100
|
const S = {
|
|
101
|
-
left:
|
|
101
|
+
left: u[m],
|
|
102
102
|
top: 0
|
|
103
103
|
};
|
|
104
104
|
return g.current = S, new Promise(
|
|
@@ -130,10 +130,10 @@ import './assets/RPDefaultLayout.css';const bn = () => {
|
|
|
130
130
|
if (!c.current || !o)
|
|
131
131
|
return Promise.resolve();
|
|
132
132
|
const p = o;
|
|
133
|
-
if (v.current = !0,
|
|
133
|
+
if (v.current = !0, d.current === X.HORIZONTAL_SCROLLING) {
|
|
134
134
|
S = m;
|
|
135
|
-
const
|
|
136
|
-
left:
|
|
135
|
+
const O = {
|
|
136
|
+
left: m * (u[m] ?? 0),
|
|
137
137
|
top: 0
|
|
138
138
|
};
|
|
139
139
|
return g.current = O, new Promise(
|
|
@@ -142,15 +142,15 @@ import './assets/RPDefaultLayout.css';const bn = () => {
|
|
|
142
142
|
}
|
|
143
143
|
if (f.current === Ue.DUAL_PAGE) {
|
|
144
144
|
S = m % 2, T = Math.floor(m / 2);
|
|
145
|
-
const O = T * (l[T] ?? 0),
|
|
146
|
-
left:
|
|
147
|
-
top:
|
|
145
|
+
const O = T * (l[T] ?? 0), E = {
|
|
146
|
+
left: S * (u[S] ?? 0),
|
|
147
|
+
top: O
|
|
148
148
|
};
|
|
149
149
|
return g.current = E, new Promise((L) => Pe(p, E, L));
|
|
150
150
|
}
|
|
151
|
-
const
|
|
151
|
+
const b = {
|
|
152
152
|
left: 0,
|
|
153
|
-
top:
|
|
153
|
+
top: T * (l[T] ?? 0)
|
|
154
154
|
};
|
|
155
155
|
return g.current = b, new Promise((I) => Pe(p, b, I));
|
|
156
156
|
},
|
|
@@ -165,7 +165,7 @@ import './assets/RPDefaultLayout.css';const bn = () => {
|
|
|
165
165
|
]
|
|
166
166
|
) };
|
|
167
167
|
}, fo = (t = 1) => {
|
|
168
|
-
const [e, n] = G(t), [o, r] = G(0), { scrollToPage: a } =
|
|
168
|
+
const [e, n] = G(t), [o, r] = G(0), { scrollToPage: a } = wn(), c = W(1), { isScrolling: s } = et(), { viewMode: u } = Ye(), { scrollMode: l } = ze(), d = wt(e, 100), f = R(
|
|
169
169
|
(w) => {
|
|
170
170
|
if (!/^[0-9]*$/g.test(w.toString()) || !w)
|
|
171
171
|
return { success: !1, currentPage: c.current };
|
|
@@ -195,7 +195,7 @@ import './assets/RPDefaultLayout.css';const bn = () => {
|
|
|
195
195
|
prevPage: v,
|
|
196
196
|
goToPage: g
|
|
197
197
|
};
|
|
198
|
-
},
|
|
198
|
+
}, bn = je({
|
|
199
199
|
focusedPage: 0,
|
|
200
200
|
setFocusedPage: (t) => {
|
|
201
201
|
},
|
|
@@ -208,14 +208,14 @@ import './assets/RPDefaultLayout.css';const bn = () => {
|
|
|
208
208
|
nextPage: () => {
|
|
209
209
|
}
|
|
210
210
|
}), ce = () => {
|
|
211
|
-
const t = Be(
|
|
212
|
-
return typeof (t == null ? void 0 : t.focusedPage) > "u" &&
|
|
211
|
+
const t = Be(bn);
|
|
212
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && $r.error("Please use this hooks inside children component of RPProvider"), t;
|
|
213
213
|
}, _s = ({ children: t }) => {
|
|
214
214
|
const { pdf: e } = J(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: u } = fo();
|
|
215
215
|
return D(() => {
|
|
216
|
-
e != null && e.numPages && a(e.numPages);
|
|
217
|
-
}, [e, a]), /* @__PURE__ */ i(
|
|
218
|
-
|
|
216
|
+
e != null && e.numPages && (a(e.numPages), r(1));
|
|
217
|
+
}, [e, a, r]), /* @__PURE__ */ i(
|
|
218
|
+
bn.Provider,
|
|
219
219
|
{
|
|
220
220
|
value: {
|
|
221
221
|
focusedPage: n,
|
|
@@ -264,7 +264,7 @@ const go = () => {
|
|
|
264
264
|
h();
|
|
265
265
|
return;
|
|
266
266
|
}
|
|
267
|
-
const y = b /
|
|
267
|
+
const y = b / fr.PDF;
|
|
268
268
|
T.width = Math.floor(P.width * y), T.height = Math.floor(P.height * y);
|
|
269
269
|
const E = T.getContext("2d");
|
|
270
270
|
E.save(), E.fillStyle = "rgb(255, 255, 255)", E.fillRect(0, 0, T.width, T.height), E.restore();
|
|
@@ -281,14 +281,14 @@ const go = () => {
|
|
|
281
281
|
transform: [y, 0, 0, y, 0, 0],
|
|
282
282
|
viewport: L.getViewport({ scale: 1, rotation: P.rotation }),
|
|
283
283
|
intent: "print",
|
|
284
|
-
annotationMode:
|
|
284
|
+
annotationMode: gr.ENABLE_STORAGE,
|
|
285
285
|
optionalContentConfigPromise: I,
|
|
286
286
|
printAnnotationStorage: F
|
|
287
287
|
};
|
|
288
288
|
try {
|
|
289
289
|
return L.render(A).promise;
|
|
290
290
|
} catch (x) {
|
|
291
|
-
throw x instanceof
|
|
291
|
+
throw x instanceof vr || console.error(x), x;
|
|
292
292
|
}
|
|
293
293
|
}, C = R(() => {
|
|
294
294
|
const T = window.print;
|
|
@@ -390,7 +390,7 @@ const go = () => {
|
|
|
390
390
|
isError: c,
|
|
391
391
|
error: u
|
|
392
392
|
};
|
|
393
|
-
},
|
|
393
|
+
}, Cn = je({
|
|
394
394
|
print: () => {
|
|
395
395
|
},
|
|
396
396
|
cancel: () => {
|
|
@@ -437,9 +437,9 @@ const go = () => {
|
|
|
437
437
|
setOnError: h,
|
|
438
438
|
progress: s
|
|
439
439
|
};
|
|
440
|
-
return /* @__PURE__ */ i(
|
|
440
|
+
return /* @__PURE__ */ i(Cn.Provider, { value: C, children: t });
|
|
441
441
|
}, tt = () => {
|
|
442
|
-
const t = Be(
|
|
442
|
+
const t = Be(Cn);
|
|
443
443
|
if (!t)
|
|
444
444
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
445
445
|
return t;
|
|
@@ -449,7 +449,7 @@ const go = () => {
|
|
|
449
449
|
if (!n.size)
|
|
450
450
|
return;
|
|
451
451
|
const u = Array.from(n.values()).slice(0, s).map((f) => {
|
|
452
|
-
const { thumbnailViewport: h, scale: g } =
|
|
452
|
+
const { thumbnailViewport: h, scale: g } = Wt(f.page, o);
|
|
453
453
|
return {
|
|
454
454
|
scale: g,
|
|
455
455
|
page: f.page,
|
|
@@ -479,6 +479,7 @@ const go = () => {
|
|
|
479
479
|
{}
|
|
480
480
|
);
|
|
481
481
|
e((g) => ({ ...g, ...h }));
|
|
482
|
+
}).catch(() => {
|
|
482
483
|
});
|
|
483
484
|
},
|
|
484
485
|
[n, o]
|
|
@@ -504,7 +505,7 @@ const go = () => {
|
|
|
504
505
|
}));
|
|
505
506
|
const l = document.createElement("canvas");
|
|
506
507
|
_t(u.page, l, { scale: u.thumbnailScale, rotate: o }).promise.then(() => {
|
|
507
|
-
const d = l.toDataURL(), { thumbnailViewport: f, scale: h } =
|
|
508
|
+
const d = l.toDataURL(), { thumbnailViewport: f, scale: h } = Wt(u.page, o);
|
|
508
509
|
return {
|
|
509
510
|
scale: h,
|
|
510
511
|
thumbnailSrc: d,
|
|
@@ -519,7 +520,7 @@ const go = () => {
|
|
|
519
520
|
[n, o]
|
|
520
521
|
);
|
|
521
522
|
return { thumbnailPages: t, addPage: c, addToPage: a, thumbnailLength: r };
|
|
522
|
-
},
|
|
523
|
+
}, Tn = je({
|
|
523
524
|
thumbnailPages: {},
|
|
524
525
|
addPage: (t) => {
|
|
525
526
|
},
|
|
@@ -529,20 +530,20 @@ const go = () => {
|
|
|
529
530
|
setActive: (t) => {
|
|
530
531
|
},
|
|
531
532
|
active: !1
|
|
532
|
-
}),
|
|
533
|
+
}), Pn = () => Be(Tn), bs = ({
|
|
533
534
|
children: t,
|
|
534
535
|
initialThumbnailsVisible: e
|
|
535
536
|
}) => {
|
|
536
537
|
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = vo(), [c, s] = G(e);
|
|
537
538
|
return /* @__PURE__ */ i(
|
|
538
|
-
|
|
539
|
+
Tn.Provider,
|
|
539
540
|
{
|
|
540
541
|
value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a, active: c, setActive: s },
|
|
541
542
|
children: t
|
|
542
543
|
}
|
|
543
544
|
);
|
|
544
545
|
}, _o = (t = {}, e = "") => {
|
|
545
|
-
const [n, o] = G(e), [r, a] = G(!1), { pdf: c, pages: s } = J(), u =
|
|
546
|
+
const [n, o] = G(e), [r, a] = G(!1), { pdf: c, pages: s } = J(), u = St(), l = W(!n), { currentZoom: d } = Je(), [f, h] = G([]), { setFocusedPage: g } = ce(), [v, C] = G(0), { pageScrollElementRef: w, virtualScrollableElementRef: _ } = Qe(), { scrollMode: m } = ze(), { pagesRef: T } = ye(), [S, p] = G(null), P = W({}), b = k(() => v === 0 ? null : f[v - 1], [v, f]), I = k(() => f.length, [f]);
|
|
546
547
|
D(() => {
|
|
547
548
|
if (!b || !s)
|
|
548
549
|
return;
|
|
@@ -556,12 +557,12 @@ const go = () => {
|
|
|
556
557
|
if (!F)
|
|
557
558
|
return;
|
|
558
559
|
const Z = P.current[b.page], Q = F.page.getViewport({ scale: 1 });
|
|
559
|
-
V = new
|
|
560
|
+
V = new Pt.TextLayer({
|
|
560
561
|
viewport: Q,
|
|
561
562
|
textContentSource: Z,
|
|
562
563
|
container: document.createElement("div")
|
|
563
564
|
}), V.render().then(() => {
|
|
564
|
-
const j = V.textDivs[b.start.idx], [ee] =
|
|
565
|
+
const j = V.textDivs[b.start.idx], [ee] = un([b], Z, V.textDivs), he = u.widths[b.page - 1], me = u.heights[b.page - 1], B = document.createElement("div"), K = document.createElement("div");
|
|
565
566
|
j.style.position = "absolute", j.style.color = "transparent", K.style.position = "absolute", K.style.top = "0", K.style.setProperty("--scale-factor", `${d}`), B.style.position = "relative", B.style.width = `${he}px`, B.style.height = `${me}px`, B.style.zIndex = "-1", B.appendChild(j), K.appendChild(B), T.prepend(K);
|
|
566
567
|
const te = ee.element.getBoundingClientRect(), fe = K.getBoundingClientRect(), Le = te.top - fe.top, be = te.left - fe.left, ge = N + Le - A + te.height / 2, ne = $ + be - x + te.width / 2, Ne = {
|
|
567
568
|
left: Math.max(ne, 0),
|
|
@@ -605,7 +606,7 @@ const go = () => {
|
|
|
605
606
|
l.current = !1, a(!0), h([]), C(0), E(c).then((L) => {
|
|
606
607
|
P.current = L;
|
|
607
608
|
const A = Object.keys(L).reduce((x, N) => {
|
|
608
|
-
const $ =
|
|
609
|
+
const $ = hr(
|
|
609
610
|
[n],
|
|
610
611
|
L[N],
|
|
611
612
|
Number(N) - 1,
|
|
@@ -630,7 +631,7 @@ const go = () => {
|
|
|
630
631
|
currentMatchElement: S,
|
|
631
632
|
setCurrentMatchElement: p
|
|
632
633
|
};
|
|
633
|
-
},
|
|
634
|
+
}, Sn = je({
|
|
634
635
|
search: "",
|
|
635
636
|
setSearch: (t) => {
|
|
636
637
|
},
|
|
@@ -666,7 +667,7 @@ const go = () => {
|
|
|
666
667
|
setCurrentMatchElement: v
|
|
667
668
|
} = _o(n, e);
|
|
668
669
|
return /* @__PURE__ */ i(
|
|
669
|
-
|
|
670
|
+
Sn.Provider,
|
|
670
671
|
{
|
|
671
672
|
value: {
|
|
672
673
|
searchOptions: n,
|
|
@@ -686,7 +687,7 @@ const go = () => {
|
|
|
686
687
|
children: t
|
|
687
688
|
}
|
|
688
689
|
);
|
|
689
|
-
},
|
|
690
|
+
}, In = () => Be(Sn), ue = {
|
|
690
691
|
"rp-pages": "_rp-pages_1776r_1",
|
|
691
692
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
|
|
692
693
|
"rp-pages-container": "_rp-pages-container_1776r_11",
|
|
@@ -715,25 +716,29 @@ const go = () => {
|
|
|
715
716
|
renderForms: !0
|
|
716
717
|
}), s.current.promise.then(() => {
|
|
717
718
|
d.hidden = !1;
|
|
718
|
-
}).catch((
|
|
719
|
+
}).catch(() => {
|
|
719
720
|
}).finally(() => {
|
|
720
721
|
n && n();
|
|
721
722
|
});
|
|
722
723
|
}
|
|
724
|
+
return () => {
|
|
725
|
+
var d;
|
|
726
|
+
(d = s.current) == null || d.cancel();
|
|
727
|
+
};
|
|
723
728
|
}, [a, e, c, u, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: r });
|
|
724
729
|
}, lt = {
|
|
725
730
|
"rp-text-layer": "_rp-text-layer_kwwfn_1",
|
|
726
731
|
"rp-text-layer-text": "_rp-text-layer-text_kwwfn_9"
|
|
727
732
|
}, bo = (t) => {
|
|
728
|
-
const { pageNumber: e } = t, { pages: n } = J(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: c } =
|
|
733
|
+
const { pageNumber: e } = t, { pages: n } = J(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: c } = In(), [s, u] = G(
|
|
729
734
|
[]
|
|
730
735
|
), l = W(), d = W(), f = W(), h = k(() => r.filter((v) => v.pageIndex === e - 1), [r, e]), g = R(
|
|
731
736
|
(v, C, w = !1) => {
|
|
732
|
-
if (w &&
|
|
737
|
+
if (w && dn(v, C), !h.length) {
|
|
733
738
|
f.current = void 0, u([]);
|
|
734
739
|
return;
|
|
735
740
|
}
|
|
736
|
-
const _ =
|
|
741
|
+
const _ = un(h, v, C);
|
|
737
742
|
u(_);
|
|
738
743
|
},
|
|
739
744
|
[h]
|
|
@@ -751,26 +756,28 @@ const go = () => {
|
|
|
751
756
|
C && (f.current = C.element, c(C.element), C.element.classList.add("selected"));
|
|
752
757
|
}, [a, s, h]), D(() => {
|
|
753
758
|
const v = n.get(e);
|
|
754
|
-
if (!
|
|
755
|
-
return
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
759
|
+
if (!v || !o.current)
|
|
760
|
+
return;
|
|
761
|
+
const C = o.current;
|
|
762
|
+
return l.current && l.current.cancel(), v.page.getTextContent().then((w) => {
|
|
763
|
+
const _ = v.page.getViewport({ scale: 1 });
|
|
764
|
+
return l.current = new Pt.TextLayer({
|
|
765
|
+
viewport: _,
|
|
766
|
+
textContentSource: w,
|
|
767
|
+
container: C
|
|
768
|
+
}), d.current = w, C && (C.innerText = ""), l.current.render();
|
|
769
|
+
}).then(() => {
|
|
770
|
+
var m;
|
|
771
|
+
[].slice.call(C.children).forEach((T) => {
|
|
772
|
+
T.classList.add(lt["rp-text-layer-text"]);
|
|
773
|
+
});
|
|
774
|
+
const _ = (m = l.current) == null ? void 0 : m.textDivs;
|
|
775
|
+
_ && d.current && g(d.current, _);
|
|
776
|
+
}).catch(() => {
|
|
777
|
+
}), () => {
|
|
778
|
+
var w;
|
|
779
|
+
(w = l.current) == null || w.cancel();
|
|
780
|
+
};
|
|
774
781
|
}, [n, e]), D(() => {
|
|
775
782
|
var w;
|
|
776
783
|
[].slice.call(o.current.children).forEach((_) => {
|
|
@@ -791,7 +798,7 @@ const go = () => {
|
|
|
791
798
|
};
|
|
792
799
|
let To = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
793
800
|
const Po = (t) => {
|
|
794
|
-
const { pageNumber: e } = t, n = W(null), { pages: o, pdf: r } = J(), a = W(), [c, s] = G(), { setFocusedPage: u, goToPage: l } = ce(), { scrollMode: d } = ze(), { print: f } = tt(), { download: h } =
|
|
801
|
+
const { pageNumber: e } = t, n = W(null), { pages: o, pdf: r } = J(), a = W(), [c, s] = G(), { setFocusedPage: u, goToPage: l } = ce(), { scrollMode: d } = ze(), { print: f } = tt(), { download: h } = Vn(), g = k(() => o.get(e), [o, e]), v = k(() => g == null ? void 0 : g.page.getViewport(), [g]);
|
|
795
802
|
D(() => {
|
|
796
803
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
797
804
|
}, [r]), D(() => {
|
|
@@ -801,10 +808,10 @@ const Po = (t) => {
|
|
|
801
808
|
}, [g]);
|
|
802
809
|
const C = R(
|
|
803
810
|
(w) => {
|
|
804
|
-
!c || !r || (
|
|
811
|
+
!c || !r || (Nr(w), Er(w, r, c).then((_) => {
|
|
805
812
|
var m, T;
|
|
806
813
|
((m = _ == null ? void 0 : _.data) == null ? void 0 : m.action) === "Print" ? f() : ((T = _ == null ? void 0 : _.data) == null ? void 0 : T.action) === "SaveAs" && h();
|
|
807
|
-
}), d === X.PAGE_SCROLLING ?
|
|
814
|
+
}), d === X.PAGE_SCROLLING ? kt(w, c, r, (_) => u(_.pageIndex + 1)) : kt(w, c, r, (_) => l(_.pageIndex + 1)));
|
|
808
815
|
},
|
|
809
816
|
[r, c, l, u, d, f, h]
|
|
810
817
|
);
|
|
@@ -822,17 +829,17 @@ const Po = (t) => {
|
|
|
822
829
|
for (const S of c) {
|
|
823
830
|
const { annotationType: p } = S;
|
|
824
831
|
switch (p) {
|
|
825
|
-
case
|
|
826
|
-
|
|
832
|
+
case Ft.Link:
|
|
833
|
+
Dr(S);
|
|
827
834
|
break;
|
|
828
|
-
case
|
|
829
|
-
|
|
835
|
+
case Ft.Widget:
|
|
836
|
+
Or(S, w, _);
|
|
830
837
|
break;
|
|
831
838
|
}
|
|
832
839
|
}
|
|
833
840
|
const m = new AbortController();
|
|
834
841
|
return (async () => {
|
|
835
|
-
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new
|
|
842
|
+
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new _r({
|
|
836
843
|
div: n.current,
|
|
837
844
|
accessibilityManager: void 0,
|
|
838
845
|
annotationCanvasMap: void 0,
|
|
@@ -840,7 +847,7 @@ const Po = (t) => {
|
|
|
840
847
|
structTreeLayer: null,
|
|
841
848
|
page: g.page,
|
|
842
849
|
viewport: w.clone({ dontFlip: !0 })
|
|
843
|
-
}), n.current &&
|
|
850
|
+
}), n.current && Mt(n.current, C);
|
|
844
851
|
const S = await (r == null ? void 0 : r.hasJSActions()), p = await (r == null ? void 0 : r.getFieldObjects());
|
|
845
852
|
if (m.signal.aborted)
|
|
846
853
|
throw "abort";
|
|
@@ -854,17 +861,17 @@ const Po = (t) => {
|
|
|
854
861
|
page: g.page,
|
|
855
862
|
imageResourcesPath: To,
|
|
856
863
|
renderForms: !0,
|
|
857
|
-
linkService: new
|
|
864
|
+
linkService: new Lr(),
|
|
858
865
|
downloadManager: null,
|
|
859
866
|
enableScripting: !1
|
|
860
867
|
});
|
|
861
868
|
})().then(() => {
|
|
862
|
-
n.current &&
|
|
869
|
+
n.current && zr(n.current, C);
|
|
863
870
|
}).catch((S) => {
|
|
864
871
|
if (S !== "abort")
|
|
865
872
|
throw S;
|
|
866
873
|
}), () => {
|
|
867
|
-
m.abort("clear"), n.current &&
|
|
874
|
+
m.abort("clear"), n.current && Mt(n.current, C);
|
|
868
875
|
};
|
|
869
876
|
}, [r, c, C]), /* @__PURE__ */ i(
|
|
870
877
|
"div",
|
|
@@ -879,34 +886,36 @@ const Po = (t) => {
|
|
|
879
886
|
"rp-text-highlight-layer": "_rp-text-highlight-layer_1470i_1",
|
|
880
887
|
"rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1470i_9"
|
|
881
888
|
}, So = ({ pageNumber: t }) => {
|
|
882
|
-
const e = W(null), n = W(), o = W(), { pages: r } = J(), { highlightMatches: a } =
|
|
889
|
+
const e = W(null), n = W(), o = W(), { pages: r } = J(), { highlightMatches: a } = wr(), c = k(() => a.filter((l) => l.pageIndex === t - 1), [a]), s = R(
|
|
883
890
|
(u, l, d = !1) => {
|
|
884
|
-
d &&
|
|
891
|
+
d && dn(u, l), mr(c, u, l);
|
|
885
892
|
},
|
|
886
893
|
[c, r, t]
|
|
887
894
|
);
|
|
888
895
|
return D(() => {
|
|
889
896
|
const u = r.get(t);
|
|
890
|
-
if (!
|
|
891
|
-
return
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
897
|
+
if (!u || !e.current)
|
|
898
|
+
return;
|
|
899
|
+
const l = e.current;
|
|
900
|
+
return n.current && n.current.cancel(), u.page.getTextContent().then((d) => {
|
|
901
|
+
const f = u.page.getViewport({ scale: 1 });
|
|
902
|
+
return n.current = new Pt.TextLayer({
|
|
903
|
+
viewport: f,
|
|
904
|
+
textContentSource: d,
|
|
905
|
+
container: l
|
|
906
|
+
}), o.current = d, l && (l.innerText = ""), n.current.render();
|
|
907
|
+
}).then(() => {
|
|
908
|
+
var h;
|
|
909
|
+
[].slice.call(l.children).forEach((g) => {
|
|
910
|
+
g.classList.add(ut["rp-text-highlight-layer-text"]);
|
|
911
|
+
});
|
|
912
|
+
const f = (h = n.current) == null ? void 0 : h.textDivs;
|
|
913
|
+
f && o.current && s(o.current, f);
|
|
914
|
+
}).catch(() => {
|
|
915
|
+
}), () => {
|
|
916
|
+
var d;
|
|
917
|
+
(d = n.current) == null || d.cancel();
|
|
918
|
+
};
|
|
910
919
|
}, [r, t]), D(() => {
|
|
911
920
|
var d;
|
|
912
921
|
[].slice.call(e.current.children).forEach((f) => {
|
|
@@ -922,12 +931,12 @@ const Po = (t) => {
|
|
|
922
931
|
ref: e
|
|
923
932
|
}
|
|
924
933
|
) });
|
|
925
|
-
}, Io = Array.from({ length: 21 }, (t, e) => Number((e * 0.05).toFixed(2))),
|
|
926
|
-
const { pageNumber: n, style: o, onIntersectRatioChange: r, ...a } = t, { pages: c } = J(), { rotate: s } = Xe(), { textLayer: u } =
|
|
934
|
+
}, Io = Array.from({ length: 21 }, (t, e) => Number((e * 0.05).toFixed(2))), Lt = Ke((t, e) => {
|
|
935
|
+
const { pageNumber: n, style: o, onIntersectRatioChange: r, ...a } = t, { pages: c } = J(), { rotate: s } = Xe(), { textLayer: u } = lr(), { currentZoom: l } = Je(), d = W(c.get(n)), [f, h] = G(!1), g = W(null), [v, C] = G({
|
|
927
936
|
width: 0,
|
|
928
937
|
height: 0
|
|
929
938
|
});
|
|
930
|
-
|
|
939
|
+
sn(e, () => g.current), D(() => {
|
|
931
940
|
if (c && (d.current = c.get(n), d.current)) {
|
|
932
941
|
const T = d.current.page.getViewport({ scale: l, rotation: s });
|
|
933
942
|
C(T);
|
|
@@ -982,7 +991,7 @@ const Po = (t) => {
|
|
|
982
991
|
className: ct["rp-page"],
|
|
983
992
|
children: [
|
|
984
993
|
/* @__PURE__ */ i(wo, { onLoading: _, onLoaded: m, pageNumber: n }),
|
|
985
|
-
f && /* @__PURE__ */ i("div", { className: ct["rp-loader-wrapper"], children: /* @__PURE__ */ i(
|
|
994
|
+
f && /* @__PURE__ */ i("div", { className: ct["rp-loader-wrapper"], children: /* @__PURE__ */ i(It, {}) }),
|
|
986
995
|
u && /* @__PURE__ */ i(bo, { pageNumber: n }),
|
|
987
996
|
/* @__PURE__ */ i(So, { pageNumber: n }),
|
|
988
997
|
/* @__PURE__ */ i(Po, { pageNumber: n })
|
|
@@ -992,40 +1001,30 @@ const Po = (t) => {
|
|
|
992
1001
|
}
|
|
993
1002
|
);
|
|
994
1003
|
});
|
|
995
|
-
function
|
|
996
|
-
return bt = Object.assign ? Object.assign.bind() : function(t) {
|
|
997
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
998
|
-
var n = arguments[e];
|
|
999
|
-
for (var o in n)
|
|
1000
|
-
({}).hasOwnProperty.call(n, o) && (t[o] = n[o]);
|
|
1001
|
-
}
|
|
1002
|
-
return t;
|
|
1003
|
-
}, bt.apply(null, arguments);
|
|
1004
|
-
}
|
|
1005
|
-
function qt(t) {
|
|
1004
|
+
function Ut(t) {
|
|
1006
1005
|
if (t === void 0)
|
|
1007
1006
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1008
1007
|
return t;
|
|
1009
1008
|
}
|
|
1010
|
-
function
|
|
1011
|
-
return
|
|
1009
|
+
function bt(t, e) {
|
|
1010
|
+
return bt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
|
|
1012
1011
|
return n.__proto__ = o, n;
|
|
1013
|
-
},
|
|
1012
|
+
}, bt(t, e);
|
|
1014
1013
|
}
|
|
1015
|
-
function
|
|
1016
|
-
t.prototype = Object.create(e.prototype), t.prototype.constructor = t,
|
|
1014
|
+
function xo(t, e) {
|
|
1015
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, bt(t, e);
|
|
1017
1016
|
}
|
|
1018
|
-
var
|
|
1017
|
+
var qt = Number.isNaN || function(e) {
|
|
1019
1018
|
return typeof e == "number" && e !== e;
|
|
1020
1019
|
};
|
|
1021
|
-
function
|
|
1022
|
-
return !!(t === e ||
|
|
1020
|
+
function yo(t, e) {
|
|
1021
|
+
return !!(t === e || qt(t) && qt(e));
|
|
1023
1022
|
}
|
|
1024
1023
|
function Ro(t, e) {
|
|
1025
1024
|
if (t.length !== e.length)
|
|
1026
1025
|
return !1;
|
|
1027
1026
|
for (var n = 0; n < t.length; n++)
|
|
1028
|
-
if (!
|
|
1027
|
+
if (!yo(t[n], e[n]))
|
|
1029
1028
|
return !1;
|
|
1030
1029
|
return !0;
|
|
1031
1030
|
}
|
|
@@ -1039,7 +1038,7 @@ function dt(t, e) {
|
|
|
1039
1038
|
}
|
|
1040
1039
|
return c;
|
|
1041
1040
|
}
|
|
1042
|
-
function
|
|
1041
|
+
function Zt(t, e) {
|
|
1043
1042
|
if (t == null)
|
|
1044
1043
|
return {};
|
|
1045
1044
|
var n = {};
|
|
@@ -1051,18 +1050,18 @@ function jt(t, e) {
|
|
|
1051
1050
|
}
|
|
1052
1051
|
return n;
|
|
1053
1052
|
}
|
|
1054
|
-
var Lo = typeof performance == "object" && typeof performance.now == "function",
|
|
1053
|
+
var Lo = typeof performance == "object" && typeof performance.now == "function", jt = Lo ? function() {
|
|
1055
1054
|
return performance.now();
|
|
1056
1055
|
} : function() {
|
|
1057
1056
|
return Date.now();
|
|
1058
1057
|
};
|
|
1059
|
-
function
|
|
1058
|
+
function Bt(t) {
|
|
1060
1059
|
cancelAnimationFrame(t.id);
|
|
1061
1060
|
}
|
|
1062
1061
|
function No(t, e) {
|
|
1063
|
-
var n =
|
|
1062
|
+
var n = jt();
|
|
1064
1063
|
function o() {
|
|
1065
|
-
|
|
1064
|
+
jt() - n >= e ? t.call(null) : r.id = requestAnimationFrame(o);
|
|
1066
1065
|
}
|
|
1067
1066
|
var r = {
|
|
1068
1067
|
id: requestAnimationFrame(o)
|
|
@@ -1078,7 +1077,7 @@ function Eo(t) {
|
|
|
1078
1077
|
return pt;
|
|
1079
1078
|
}
|
|
1080
1079
|
var Ee = null;
|
|
1081
|
-
function
|
|
1080
|
+
function Kt(t) {
|
|
1082
1081
|
if (t === void 0 && (t = !1), Ee === null || t) {
|
|
1083
1082
|
var e = document.createElement("div"), n = e.style;
|
|
1084
1083
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
@@ -1097,11 +1096,11 @@ process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.We
|
|
|
1097
1096
|
function zo(t) {
|
|
1098
1097
|
var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, c = t.getEstimatedTotalHeight, s = t.getEstimatedTotalWidth, u = t.getOffsetForColumnAndAlignment, l = t.getOffsetForRowAndAlignment, d = t.getRowHeight, f = t.getRowOffset, h = t.getRowStartIndexForOffset, g = t.getRowStopIndexForStartIndex, v = t.initInstanceProps, C = t.shouldResetStyleCacheOnItemSizeChange, w = t.validateProps;
|
|
1099
1098
|
return e = /* @__PURE__ */ function(_) {
|
|
1100
|
-
|
|
1099
|
+
xo(m, _);
|
|
1101
1100
|
function m(S) {
|
|
1102
1101
|
var p;
|
|
1103
|
-
return p = _.call(this, S) || this, p._instanceProps = v(p.props,
|
|
1104
|
-
instance:
|
|
1102
|
+
return p = _.call(this, S) || this, p._instanceProps = v(p.props, Ut(p)), p._resetIsScrollingTimeoutId = null, p._outerRef = void 0, p.state = {
|
|
1103
|
+
instance: Ut(p),
|
|
1105
1104
|
isScrolling: !1,
|
|
1106
1105
|
horizontalScrollDirection: "forward",
|
|
1107
1106
|
scrollLeft: typeof p.props.initialScrollLeft == "number" ? p.props.initialScrollLeft : 0,
|
|
@@ -1152,7 +1151,7 @@ function zo(t) {
|
|
|
1152
1151
|
return null;
|
|
1153
1152
|
var x = p.props.direction, N = y;
|
|
1154
1153
|
if (x === "rtl")
|
|
1155
|
-
switch (
|
|
1154
|
+
switch (Kt()) {
|
|
1156
1155
|
case "negative":
|
|
1157
1156
|
N = -y;
|
|
1158
1157
|
break;
|
|
@@ -1175,7 +1174,7 @@ function zo(t) {
|
|
|
1175
1174
|
var b = p.props.outerRef;
|
|
1176
1175
|
p._outerRef = P, typeof b == "function" ? b(P) : b != null && typeof b == "object" && b.hasOwnProperty("current") && (b.current = P);
|
|
1177
1176
|
}, p._resetIsScrollingDebounced = function() {
|
|
1178
|
-
p._resetIsScrollingTimeoutId !== null &&
|
|
1177
|
+
p._resetIsScrollingTimeoutId !== null && Bt(p._resetIsScrollingTimeoutId), p._resetIsScrollingTimeoutId = No(p._resetIsScrolling, Oo);
|
|
1179
1178
|
}, p._resetIsScrolling = function() {
|
|
1180
1179
|
p._resetIsScrollingTimeoutId = null, p.setState({
|
|
1181
1180
|
isScrolling: !1
|
|
@@ -1219,7 +1218,7 @@ function zo(t) {
|
|
|
1219
1218
|
if (O && this._outerRef != null) {
|
|
1220
1219
|
var y = this._outerRef;
|
|
1221
1220
|
if (p === "rtl")
|
|
1222
|
-
switch (
|
|
1221
|
+
switch (Kt()) {
|
|
1223
1222
|
case "negative":
|
|
1224
1223
|
y.scrollLeft = -b;
|
|
1225
1224
|
break;
|
|
@@ -1237,7 +1236,7 @@ function zo(t) {
|
|
|
1237
1236
|
}
|
|
1238
1237
|
this._callPropsCallbacks();
|
|
1239
1238
|
}, T.componentWillUnmount = function() {
|
|
1240
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
1239
|
+
this._resetIsScrollingTimeoutId !== null && Bt(this._resetIsScrollingTimeoutId);
|
|
1241
1240
|
}, T.render = function() {
|
|
1242
1241
|
var p = this.props, P = p.children, b = p.className, I = p.columnCount, O = p.direction, y = p.height, E = p.innerRef, L = p.innerElementType, F = p.innerTagName, A = p.itemData, x = p.itemKey, N = x === void 0 ? Do : x, $ = p.outerElementType, V = p.outerTagName, Z = p.rowCount, Q = p.style, j = p.useIsScrolling, ee = p.width, he = this.state.isScrolling, me = this._getHorizontalRangeToRender(), B = me[0], K = me[1], te = this._getVerticalRangeToRender(), fe = te[0], Le = te[1], be = [];
|
|
1243
1242
|
if (I > 0 && Z)
|
|
@@ -1260,7 +1259,7 @@ function zo(t) {
|
|
|
1260
1259
|
className: b,
|
|
1261
1260
|
onScroll: this._onScroll,
|
|
1262
1261
|
ref: this._outerRefSetter,
|
|
1263
|
-
style:
|
|
1262
|
+
style: Fr({
|
|
1264
1263
|
position: "relative",
|
|
1265
1264
|
height: y,
|
|
1266
1265
|
width: ee,
|
|
@@ -1301,7 +1300,7 @@ function zo(t) {
|
|
|
1301
1300
|
var N = h(this.props, A, this._instanceProps), $ = g(this.props, N, A, this._instanceProps), V = !L || F === "backward" ? Math.max(1, x) : 1, Z = !L || F === "forward" ? Math.max(1, x) : 1;
|
|
1302
1301
|
return [Math.max(0, N - V), Math.max(0, Math.min(y - 1, $ + Z)), N, $];
|
|
1303
1302
|
}, m;
|
|
1304
|
-
}(
|
|
1303
|
+
}(ir), e.defaultProps = {
|
|
1305
1304
|
direction: "ltr",
|
|
1306
1305
|
itemData: void 0,
|
|
1307
1306
|
useIsScrolling: !1
|
|
@@ -1324,7 +1323,7 @@ var Ao = function(e, n) {
|
|
|
1324
1323
|
if (typeof a != "number")
|
|
1325
1324
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
1326
1325
|
}
|
|
1327
|
-
},
|
|
1326
|
+
}, Xt = 50, xn = function(e, n) {
|
|
1328
1327
|
var o = e.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, c = n.lastMeasuredRowIndex, s = 0;
|
|
1329
1328
|
if (c >= o && (c = o - 1), c >= 0) {
|
|
1330
1329
|
var u = r[c];
|
|
@@ -1332,7 +1331,7 @@ var Ao = function(e, n) {
|
|
|
1332
1331
|
}
|
|
1333
1332
|
var l = o - c - 1, d = l * a;
|
|
1334
1333
|
return s + d;
|
|
1335
|
-
},
|
|
1334
|
+
}, yn = function(e, n) {
|
|
1336
1335
|
var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, c = n.lastMeasuredColumnIndex, s = 0;
|
|
1337
1336
|
if (c >= o && (c = o - 1), c >= 0) {
|
|
1338
1337
|
var u = r[c];
|
|
@@ -1358,12 +1357,12 @@ var Ao = function(e, n) {
|
|
|
1358
1357
|
e === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
|
|
1359
1358
|
}
|
|
1360
1359
|
return a[o];
|
|
1361
|
-
},
|
|
1360
|
+
}, Jt = function(e, n, o, r) {
|
|
1362
1361
|
var a, c;
|
|
1363
1362
|
e === "column" ? (a = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
|
|
1364
1363
|
var s = c > 0 ? a[c].offset : 0;
|
|
1365
|
-
return s >= r ?
|
|
1366
|
-
},
|
|
1364
|
+
return s >= r ? Rn(e, n, o, c, 0, r) : Fo(e, n, o, Math.max(0, c), r);
|
|
1365
|
+
}, Rn = function(e, n, o, r, a, c) {
|
|
1367
1366
|
for (; a <= r; ) {
|
|
1368
1367
|
var s = a + Math.floor((r - a) / 2), u = ve(e, n, s, o).offset;
|
|
1369
1368
|
if (u === c)
|
|
@@ -1374,9 +1373,9 @@ var Ao = function(e, n) {
|
|
|
1374
1373
|
}, Fo = function(e, n, o, r, a) {
|
|
1375
1374
|
for (var c = e === "column" ? n.columnCount : n.rowCount, s = 1; r < c && ve(e, n, r, o).offset < a; )
|
|
1376
1375
|
r += s, s *= 2;
|
|
1377
|
-
return
|
|
1378
|
-
},
|
|
1379
|
-
var u = e === "column" ? n.width : n.height, l = ve(e, n, o, c), d = e === "column" ?
|
|
1376
|
+
return Rn(e, n, o, Math.min(r, c - 1), Math.floor(r / 2), a);
|
|
1377
|
+
}, Yt = function(e, n, o, r, a, c, s) {
|
|
1378
|
+
var u = e === "column" ? n.width : n.height, l = ve(e, n, o, c), d = e === "column" ? yn(n, c) : xn(n, c), f = Math.max(0, Math.min(d - u, l.offset)), h = Math.max(0, l.offset - u + s + l.size);
|
|
1380
1379
|
switch (r === "smart" && (a >= h - u && a <= f + u ? r = "auto" : r = "center"), r) {
|
|
1381
1380
|
case "start":
|
|
1382
1381
|
return f;
|
|
@@ -1393,7 +1392,7 @@ var Ao = function(e, n) {
|
|
|
1393
1392
|
return ve("column", e, n, o).offset;
|
|
1394
1393
|
},
|
|
1395
1394
|
getColumnStartIndexForOffset: function(e, n, o) {
|
|
1396
|
-
return
|
|
1395
|
+
return Jt("column", e, o, n);
|
|
1397
1396
|
},
|
|
1398
1397
|
getColumnStopIndexForStartIndex: function(e, n, o, r) {
|
|
1399
1398
|
for (var a = e.columnCount, c = e.width, s = ve("column", e, n, r), u = o + c, l = s.offset + s.size, d = n; d < a - 1 && l < u; )
|
|
@@ -1404,12 +1403,12 @@ var Ao = function(e, n) {
|
|
|
1404
1403
|
return o.columnMetadataMap[n].size;
|
|
1405
1404
|
},
|
|
1406
1405
|
getEstimatedTotalHeight: xn,
|
|
1407
|
-
getEstimatedTotalWidth:
|
|
1406
|
+
getEstimatedTotalWidth: yn,
|
|
1408
1407
|
getOffsetForColumnAndAlignment: function(e, n, o, r, a, c) {
|
|
1409
|
-
return
|
|
1408
|
+
return Yt("column", e, n, o, r, a, c);
|
|
1410
1409
|
},
|
|
1411
1410
|
getOffsetForRowAndAlignment: function(e, n, o, r, a, c) {
|
|
1412
|
-
return
|
|
1411
|
+
return Yt("row", e, n, o, r, a, c);
|
|
1413
1412
|
},
|
|
1414
1413
|
getRowOffset: function(e, n, o) {
|
|
1415
1414
|
return ve("row", e, n, o).offset;
|
|
@@ -1418,7 +1417,7 @@ var Ao = function(e, n) {
|
|
|
1418
1417
|
return o.rowMetadataMap[n].size;
|
|
1419
1418
|
},
|
|
1420
1419
|
getRowStartIndexForOffset: function(e, n, o) {
|
|
1421
|
-
return
|
|
1420
|
+
return Jt("row", e, o, n);
|
|
1422
1421
|
},
|
|
1423
1422
|
getRowStopIndexForStartIndex: function(e, n, o, r) {
|
|
1424
1423
|
for (var a = e.rowCount, c = e.height, s = ve("row", e, n, r), u = o + c, l = s.offset + s.size, d = n; d < a - 1 && l < u; )
|
|
@@ -1428,8 +1427,8 @@ var Ao = function(e, n) {
|
|
|
1428
1427
|
initInstanceProps: function(e, n) {
|
|
1429
1428
|
var o = e, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, c = {
|
|
1430
1429
|
columnMetadataMap: {},
|
|
1431
|
-
estimatedColumnWidth: r ||
|
|
1432
|
-
estimatedRowHeight: a ||
|
|
1430
|
+
estimatedColumnWidth: r || Xt,
|
|
1431
|
+
estimatedRowHeight: a || Xt,
|
|
1433
1432
|
lastMeasuredColumnIndex: -1,
|
|
1434
1433
|
lastMeasuredRowIndex: -1,
|
|
1435
1434
|
rowMetadataMap: {}
|
|
@@ -1461,7 +1460,7 @@ var Ao = function(e, n) {
|
|
|
1461
1460
|
}
|
|
1462
1461
|
});
|
|
1463
1462
|
process.env.NODE_ENV;
|
|
1464
|
-
function
|
|
1463
|
+
function Qt(t, e) {
|
|
1465
1464
|
for (var n in t)
|
|
1466
1465
|
if (!(n in e))
|
|
1467
1466
|
return !0;
|
|
@@ -1472,11 +1471,11 @@ function en(t, e) {
|
|
|
1472
1471
|
}
|
|
1473
1472
|
var Mo = ["style"], Wo = ["style"];
|
|
1474
1473
|
function Ho(t, e) {
|
|
1475
|
-
var n = t.style, o =
|
|
1476
|
-
return !
|
|
1474
|
+
var n = t.style, o = Zt(t, Mo), r = e.style, a = Zt(e, Wo);
|
|
1475
|
+
return !Qt(n, r) && !Qt(o, a);
|
|
1477
1476
|
}
|
|
1478
1477
|
const $o = () => {
|
|
1479
|
-
const { viewMode: t } = Ye(), { scrollMode: e } = ze(), { setColumnCount: n } =
|
|
1478
|
+
const { viewMode: t } = Ye(), { scrollMode: e } = ze(), { setColumnCount: n } = ln(), { virtualScrollableElementRef: o } = Qe(), r = St(), a = R(
|
|
1480
1479
|
(g) => r.widths[g] || 0,
|
|
1481
1480
|
[r.widths]
|
|
1482
1481
|
), c = R(
|
|
@@ -1499,18 +1498,18 @@ const $o = () => {
|
|
|
1499
1498
|
};
|
|
1500
1499
|
let ae;
|
|
1501
1500
|
typeof window < "u" ? ae = window : typeof self < "u" ? ae = self : ae = global;
|
|
1502
|
-
let
|
|
1503
|
-
const
|
|
1504
|
-
mt == null ||
|
|
1505
|
-
return
|
|
1506
|
-
}) : (
|
|
1501
|
+
let Ct = null, Tt = null;
|
|
1502
|
+
const en = 20, ht = ae.clearTimeout, tn = ae.setTimeout, mt = ae.cancelAnimationFrame || ae.mozCancelAnimationFrame || ae.webkitCancelAnimationFrame, nn = ae.requestAnimationFrame || ae.mozRequestAnimationFrame || ae.webkitRequestAnimationFrame;
|
|
1503
|
+
mt == null || nn == null ? (Ct = ht, Tt = function(e) {
|
|
1504
|
+
return tn(e, en);
|
|
1505
|
+
}) : (Ct = function([e, n]) {
|
|
1507
1506
|
mt(e), ht(n);
|
|
1508
|
-
},
|
|
1509
|
-
const n =
|
|
1507
|
+
}, Tt = function(e) {
|
|
1508
|
+
const n = nn(function() {
|
|
1510
1509
|
ht(o), e();
|
|
1511
|
-
}), o =
|
|
1510
|
+
}), o = tn(function() {
|
|
1512
1511
|
mt(n), e();
|
|
1513
|
-
},
|
|
1512
|
+
}, en);
|
|
1514
1513
|
return [n, o];
|
|
1515
1514
|
});
|
|
1516
1515
|
function Go(t) {
|
|
@@ -1526,7 +1525,7 @@ function Go(t) {
|
|
|
1526
1525
|
if (_.target.className && typeof _.target.className.indexOf == "function" && _.target.className.indexOf("contract-trigger") < 0 && _.target.className.indexOf("expand-trigger") < 0)
|
|
1527
1526
|
return;
|
|
1528
1527
|
const m = this;
|
|
1529
|
-
c(this), this.__resizeRAF__ &&
|
|
1528
|
+
c(this), this.__resizeRAF__ && Ct(this.__resizeRAF__), this.__resizeRAF__ = Tt(function() {
|
|
1530
1529
|
a(m) && (m.__resizeLast__.width = m.offsetWidth, m.__resizeLast__.height = m.offsetHeight, m.__resizeListeners__.forEach(function(p) {
|
|
1531
1530
|
p.call(m, _);
|
|
1532
1531
|
}));
|
|
@@ -1585,7 +1584,7 @@ function Go(t) {
|
|
|
1585
1584
|
}
|
|
1586
1585
|
};
|
|
1587
1586
|
}
|
|
1588
|
-
class Vo extends
|
|
1587
|
+
class Vo extends ar {
|
|
1589
1588
|
constructor(...e) {
|
|
1590
1589
|
super(...e), this.state = {
|
|
1591
1590
|
height: this.props.defaultHeight || 0,
|
|
@@ -1691,7 +1690,7 @@ const Uo = ({ widths: t, heights: e }) => {
|
|
|
1691
1690
|
r.current = !1;
|
|
1692
1691
|
}, [n]);
|
|
1693
1692
|
const s = k(() => c.reduce((u, l) => u + Number(l.width || 0), 0), [c]);
|
|
1694
|
-
return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: a.map((u, l) => /* @__PURE__ */ i(
|
|
1693
|
+
return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: a.map((u, l) => /* @__PURE__ */ i(Lt, { onIntersectRatioChange: () => {
|
|
1695
1694
|
}, style: c[l], pageNumber: u }, u)) });
|
|
1696
1695
|
}, qo = ({ widths: t, heights: e }) => {
|
|
1697
1696
|
const { focusedPage: n } = ce(), { isScrolling: o } = et(), r = k(() => ({
|
|
@@ -1711,7 +1710,7 @@ const Uo = ({ widths: t, heights: e }) => {
|
|
|
1711
1710
|
position: "relative"
|
|
1712
1711
|
},
|
|
1713
1712
|
children: /* @__PURE__ */ i(
|
|
1714
|
-
|
|
1713
|
+
Lt,
|
|
1715
1714
|
{
|
|
1716
1715
|
style: r,
|
|
1717
1716
|
onIntersectRatioChange: () => {
|
|
@@ -1722,10 +1721,10 @@ const Uo = ({ widths: t, heights: e }) => {
|
|
|
1722
1721
|
)
|
|
1723
1722
|
}
|
|
1724
1723
|
);
|
|
1725
|
-
}, Zo =
|
|
1724
|
+
}, Zo = sr(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
|
|
1726
1725
|
const r = t + 1 + e * n.columnCount;
|
|
1727
1726
|
return /* @__PURE__ */ i(
|
|
1728
|
-
|
|
1727
|
+
Lt,
|
|
1729
1728
|
{
|
|
1730
1729
|
style: o,
|
|
1731
1730
|
onIntersectRatioChange: n.handleIntersectRatioChange,
|
|
@@ -1734,9 +1733,9 @@ const Uo = ({ widths: t, heights: e }) => {
|
|
|
1734
1733
|
r
|
|
1735
1734
|
);
|
|
1736
1735
|
}, Ho), Ts = () => {
|
|
1737
|
-
const { initialPage: t = 1, initialScrollMode: e } =
|
|
1738
|
-
|
|
1739
|
-
const { scrollToPage: r } =
|
|
1736
|
+
const { initialPage: t = 1, initialScrollMode: e } = dr(), { pagesRef: n, setPagesRef: o } = ye();
|
|
1737
|
+
Ar(n);
|
|
1738
|
+
const { scrollToPage: r } = wn(), {
|
|
1740
1739
|
virtualScrollRef: a,
|
|
1741
1740
|
getVirtualScrollRef: c,
|
|
1742
1741
|
getPageScrollElementRef: s,
|
|
@@ -1745,12 +1744,12 @@ const Uo = ({ widths: t, heights: e }) => {
|
|
|
1745
1744
|
virtualScrollableElementRef: d,
|
|
1746
1745
|
totalInnerDimensions: f,
|
|
1747
1746
|
pageScrollElementRef: h
|
|
1748
|
-
} = Qe(), g = W(!0), { nextPage: v, prevPage: C, setFocusedPage: w, focusedPage: _ } = ce(), { scrollMode: m } = ze(), { viewMode: T } = Ye(), S = W(null), { loading: p } = J(), { LoaderImageComponent: P } =
|
|
1747
|
+
} = Qe(), g = W(!0), { nextPage: v, prevPage: C, setFocusedPage: w, focusedPage: _ } = ce(), { scrollMode: m } = ze(), { viewMode: T } = Ye(), S = W(null), { loading: p } = J(), { LoaderImageComponent: P } = hn(), { smoothScrolling: b, targetScrollPosition: I } = pn(), O = W(
|
|
1749
1748
|
f
|
|
1750
1749
|
), y = W({
|
|
1751
1750
|
viewMode: T,
|
|
1752
1751
|
scrollMode: m
|
|
1753
|
-
}), E = W(!1), L = W(), { isFullScreen: F } =
|
|
1752
|
+
}), E = W(!1), L = W(), { isFullScreen: F } = pr(), {
|
|
1754
1753
|
pageDimension: A,
|
|
1755
1754
|
rowCount: x,
|
|
1756
1755
|
rowHeight: N,
|
|
@@ -1762,10 +1761,10 @@ const Uo = ({ widths: t, heights: e }) => {
|
|
|
1762
1761
|
scrollTop: 0,
|
|
1763
1762
|
scrollLeft: 0
|
|
1764
1763
|
});
|
|
1765
|
-
|
|
1766
|
-
const { isPressed: fe } =
|
|
1764
|
+
Hr(n);
|
|
1765
|
+
const { isPressed: fe } = Mr(), { selectionMode: Le } = ur(), { initializeGrabScroll: be, resetGrabState: ge } = Wr({
|
|
1767
1766
|
isPressed: fe
|
|
1768
|
-
}), ne = k(() => Le ===
|
|
1767
|
+
}), ne = k(() => Le === cr.HAND, [Le]), Ne = R((M, H) => {
|
|
1769
1768
|
he((Y) => H > -1 ? { ...Y, [M]: Math.round(H * 100) } : (delete Y[M], Y));
|
|
1770
1769
|
}, []), nt = k(() => ({
|
|
1771
1770
|
columnCount: $,
|
|
@@ -1789,7 +1788,7 @@ const Uo = ({ widths: t, heights: e }) => {
|
|
|
1789
1788
|
shouldForceUpdate: !0
|
|
1790
1789
|
});
|
|
1791
1790
|
}, [x, $, A, a]);
|
|
1792
|
-
const
|
|
1791
|
+
const Xn = R(
|
|
1793
1792
|
(M, H) => {
|
|
1794
1793
|
if (!d)
|
|
1795
1794
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
@@ -1800,7 +1799,7 @@ const Uo = ({ widths: t, heights: e }) => {
|
|
|
1800
1799
|
};
|
|
1801
1800
|
},
|
|
1802
1801
|
[d]
|
|
1803
|
-
),
|
|
1802
|
+
), Jn = R(
|
|
1804
1803
|
(M, H) => {
|
|
1805
1804
|
if (B.current)
|
|
1806
1805
|
return;
|
|
@@ -1818,15 +1817,15 @@ const Uo = ({ widths: t, heights: e }) => {
|
|
|
1818
1817
|
if (!H.height || !H.width)
|
|
1819
1818
|
return;
|
|
1820
1819
|
E.current = !0;
|
|
1821
|
-
const { height: Ce, width: it } = H, { height:
|
|
1822
|
-
if (
|
|
1820
|
+
const { height: Ce, width: it } = H, { height: zt, width: At } = O.current;
|
|
1821
|
+
if (zt === Ce && At === it)
|
|
1823
1822
|
return;
|
|
1824
|
-
const
|
|
1823
|
+
const tr = se / zt * Ce, nr = ot / At * it, rr = Math.round(Math.min(tr, Ce)) || 0, or = Math.round(Math.min(nr, it)) || 0;
|
|
1825
1824
|
L.current = setTimeout(() => {
|
|
1826
1825
|
requestAnimationFrame(() => {
|
|
1827
1826
|
a == null || a.scrollTo({
|
|
1828
|
-
scrollTop:
|
|
1829
|
-
scrollLeft:
|
|
1827
|
+
scrollTop: rr,
|
|
1828
|
+
scrollLeft: or
|
|
1830
1829
|
});
|
|
1831
1830
|
});
|
|
1832
1831
|
}, 0), O.current = {
|
|
@@ -1844,33 +1843,33 @@ const Uo = ({ widths: t, heights: e }) => {
|
|
|
1844
1843
|
), H = Array.from({ length: $ }).reduce(
|
|
1845
1844
|
(se, ot, Ce) => se + V(Ce),
|
|
1846
1845
|
0
|
|
1847
|
-
), Y =
|
|
1848
|
-
te.current = Y,
|
|
1846
|
+
), Y = Xn(H, M);
|
|
1847
|
+
te.current = Y, Jn(Y, { height: M, width: H }), l({
|
|
1849
1848
|
height: M,
|
|
1850
1849
|
width: H
|
|
1851
1850
|
});
|
|
1852
1851
|
}, [A, x, $]);
|
|
1853
|
-
const
|
|
1852
|
+
const Yn = R((M) => {
|
|
1854
1853
|
te.current = {
|
|
1855
1854
|
scrollTop: M.scrollTop,
|
|
1856
1855
|
scrollLeft: M.scrollLeft
|
|
1857
|
-
}, I.current.left === M.scrollLeft && I.current.top === M.scrollTop && (b.current = !1);
|
|
1856
|
+
}, Math.round(I.current.left) === Math.round(M.scrollLeft) && Math.round(I.current.top) === Math.round(M.scrollTop) && (b.current = !1);
|
|
1858
1857
|
}, []);
|
|
1859
1858
|
D(() => {
|
|
1860
|
-
if ((B.current || E.current) && (B.current = !1),
|
|
1859
|
+
if ((B.current || E.current) && (B.current = !1), B.current || b.current)
|
|
1861
1860
|
return;
|
|
1862
1861
|
const M = Object.entries(me);
|
|
1863
1862
|
let H = 0, Y = -1;
|
|
1864
1863
|
M.forEach((se) => {
|
|
1865
1864
|
Y < se[1] && (H = Number(se[0]), Y = se[1]);
|
|
1866
|
-
}), H &&
|
|
1865
|
+
}), H && w(H);
|
|
1867
1866
|
}, [me, w]), D(() => () => {
|
|
1868
1867
|
K.current && clearTimeout(K.current);
|
|
1869
1868
|
}, []);
|
|
1870
|
-
const
|
|
1869
|
+
const Qn = k(() => ie(ue["rp-pages-container"], {
|
|
1871
1870
|
[ue["rp-cursor-grab"]]: ne && !fe,
|
|
1872
1871
|
[ue["rp-cursor-grabbing"]]: ne && fe
|
|
1873
|
-
}), [ne, fe]),
|
|
1872
|
+
}), [ne, fe]), er = R(
|
|
1874
1873
|
(M) => {
|
|
1875
1874
|
if (ne && M) {
|
|
1876
1875
|
const H = ie(ue["rp-pages"]), Y = document.querySelector(`.${H}`);
|
|
@@ -1913,7 +1912,7 @@ const Uo = ({ widths: t, heights: e }) => {
|
|
|
1913
1912
|
h,
|
|
1914
1913
|
w,
|
|
1915
1914
|
j
|
|
1916
|
-
]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className:
|
|
1915
|
+
]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: Qn, children: /* @__PURE__ */ i(Vo, { style: { minHeight: "50px" }, children: ({ width: M, height: H }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: er, style: { width: M, height: H }, children: m === X.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
1917
1916
|
"div",
|
|
1918
1917
|
{
|
|
1919
1918
|
ref: s,
|
|
@@ -1928,7 +1927,7 @@ const Uo = ({ widths: t, heights: e }) => {
|
|
|
1928
1927
|
itemData: nt,
|
|
1929
1928
|
outerRef: u,
|
|
1930
1929
|
innerRef: S,
|
|
1931
|
-
onScroll:
|
|
1930
|
+
onScroll: Yn,
|
|
1932
1931
|
columnCount: $,
|
|
1933
1932
|
columnWidth: V,
|
|
1934
1933
|
rowHeight: N,
|
|
@@ -2013,7 +2012,7 @@ const Uo = ({ widths: t, heights: e }) => {
|
|
|
2013
2012
|
}
|
|
2014
2013
|
) }),
|
|
2015
2014
|
/* @__PURE__ */ i(q, { content: d == null ? void 0 : d.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2016
|
-
|
|
2015
|
+
cn,
|
|
2017
2016
|
{
|
|
2018
2017
|
onKeyDown: v,
|
|
2019
2018
|
onBlur: g,
|
|
@@ -2037,7 +2036,7 @@ const Uo = ({ widths: t, heights: e }) => {
|
|
|
2037
2036
|
) })
|
|
2038
2037
|
] }) : null;
|
|
2039
2038
|
};
|
|
2040
|
-
var
|
|
2039
|
+
var Nt = "Dialog", [Ln, Ps] = Ur(Nt), [Xo, le] = Ln(Nt), Nn = (t) => {
|
|
2041
2040
|
const {
|
|
2042
2041
|
__scopeDialog: e,
|
|
2043
2042
|
children: n,
|
|
@@ -2045,7 +2044,7 @@ var Et = "Dialog", [Nn, Ps] = Vr(Et), [Xo, le] = Nn(Et), En = (t) => {
|
|
|
2045
2044
|
defaultOpen: r,
|
|
2046
2045
|
onOpenChange: a,
|
|
2047
2046
|
modal: c = !0
|
|
2048
|
-
} = t, s = U.useRef(null), u = U.useRef(null), [l = !1, d] =
|
|
2047
|
+
} = t, s = U.useRef(null), u = U.useRef(null), [l = !1, d] = jr({
|
|
2049
2048
|
prop: o,
|
|
2050
2049
|
defaultProp: r,
|
|
2051
2050
|
onChange: a
|
|
@@ -2067,10 +2066,10 @@ var Et = "Dialog", [Nn, Ps] = Vr(Et), [Xo, le] = Nn(Et), En = (t) => {
|
|
|
2067
2066
|
}
|
|
2068
2067
|
);
|
|
2069
2068
|
};
|
|
2070
|
-
|
|
2071
|
-
var
|
|
2069
|
+
Nn.displayName = Nt;
|
|
2070
|
+
var En = "DialogTrigger", Jo = U.forwardRef(
|
|
2072
2071
|
(t, e) => {
|
|
2073
|
-
const { __scopeDialog: n, ...o } = t, r = le(
|
|
2072
|
+
const { __scopeDialog: n, ...o } = t, r = le(En, n), a = xt(e, r.triggerRef);
|
|
2074
2073
|
return /* @__PURE__ */ i(
|
|
2075
2074
|
We.button,
|
|
2076
2075
|
{
|
|
@@ -2078,7 +2077,7 @@ var On = "DialogTrigger", Jo = U.forwardRef(
|
|
|
2078
2077
|
"aria-haspopup": "dialog",
|
|
2079
2078
|
"aria-expanded": r.open,
|
|
2080
2079
|
"aria-controls": r.contentId,
|
|
2081
|
-
"data-state":
|
|
2080
|
+
"data-state": Dt(r.open),
|
|
2082
2081
|
...o,
|
|
2083
2082
|
ref: a,
|
|
2084
2083
|
onClick: ke(t.onClick, r.onOpenToggle)
|
|
@@ -2086,31 +2085,31 @@ var On = "DialogTrigger", Jo = U.forwardRef(
|
|
|
2086
2085
|
);
|
|
2087
2086
|
}
|
|
2088
2087
|
);
|
|
2089
|
-
Jo.displayName =
|
|
2090
|
-
var
|
|
2088
|
+
Jo.displayName = En;
|
|
2089
|
+
var Et = "DialogPortal", [Yo, On] = Ln(Et, {
|
|
2091
2090
|
forceMount: void 0
|
|
2092
|
-
}),
|
|
2093
|
-
const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = le(
|
|
2094
|
-
return /* @__PURE__ */ i(Yo, { scope: e, forceMount: n, children: U.Children.map(o, (c) => /* @__PURE__ */ i(
|
|
2091
|
+
}), Dn = (t) => {
|
|
2092
|
+
const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = le(Et, e);
|
|
2093
|
+
return /* @__PURE__ */ i(Yo, { scope: e, forceMount: n, children: U.Children.map(o, (c) => /* @__PURE__ */ i(yt, { present: n || a.open, children: /* @__PURE__ */ i(Qr, { asChild: !0, container: r, children: c }) })) });
|
|
2095
2094
|
};
|
|
2096
|
-
|
|
2097
|
-
var Ze = "DialogOverlay",
|
|
2095
|
+
Dn.displayName = Et;
|
|
2096
|
+
var Ze = "DialogOverlay", zn = U.forwardRef(
|
|
2098
2097
|
(t, e) => {
|
|
2099
|
-
const n =
|
|
2100
|
-
return a.modal ? /* @__PURE__ */ i(
|
|
2098
|
+
const n = On(Ze, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = le(Ze, t.__scopeDialog);
|
|
2099
|
+
return a.modal ? /* @__PURE__ */ i(yt, { present: o || a.open, children: /* @__PURE__ */ i(Qo, { ...r, ref: e }) }) : null;
|
|
2101
2100
|
}
|
|
2102
2101
|
);
|
|
2103
|
-
|
|
2102
|
+
zn.displayName = Ze;
|
|
2104
2103
|
var Qo = U.forwardRef(
|
|
2105
2104
|
(t, e) => {
|
|
2106
2105
|
const { __scopeDialog: n, ...o } = t, r = le(Ze, n);
|
|
2107
2106
|
return (
|
|
2108
2107
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2109
2108
|
// ie. when `Overlay` and `Content` are siblings
|
|
2110
|
-
/* @__PURE__ */ i(
|
|
2109
|
+
/* @__PURE__ */ i(Kr, { as: qr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
|
|
2111
2110
|
We.div,
|
|
2112
2111
|
{
|
|
2113
|
-
"data-state":
|
|
2112
|
+
"data-state": Dt(r.open),
|
|
2114
2113
|
...o,
|
|
2115
2114
|
ref: e,
|
|
2116
2115
|
style: { pointerEvents: "auto", ...o.style }
|
|
@@ -2118,22 +2117,22 @@ var Qo = U.forwardRef(
|
|
|
2118
2117
|
) })
|
|
2119
2118
|
);
|
|
2120
2119
|
}
|
|
2121
|
-
),
|
|
2120
|
+
), xe = "DialogContent", An = U.forwardRef(
|
|
2122
2121
|
(t, e) => {
|
|
2123
|
-
const n =
|
|
2124
|
-
return /* @__PURE__ */ i(
|
|
2122
|
+
const n = On(xe, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = le(xe, t.__scopeDialog);
|
|
2123
|
+
return /* @__PURE__ */ i(yt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(ei, { ...r, ref: e }) : /* @__PURE__ */ i(ti, { ...r, ref: e }) });
|
|
2125
2124
|
}
|
|
2126
2125
|
);
|
|
2127
|
-
|
|
2126
|
+
An.displayName = xe;
|
|
2128
2127
|
var ei = U.forwardRef(
|
|
2129
2128
|
(t, e) => {
|
|
2130
|
-
const n = le(
|
|
2129
|
+
const n = le(xe, t.__scopeDialog), o = U.useRef(null), r = xt(e, n.contentRef, o);
|
|
2131
2130
|
return U.useEffect(() => {
|
|
2132
2131
|
const a = o.current;
|
|
2133
2132
|
if (a)
|
|
2134
|
-
return
|
|
2133
|
+
return Xr(a);
|
|
2135
2134
|
}, []), /* @__PURE__ */ i(
|
|
2136
|
-
|
|
2135
|
+
Fn,
|
|
2137
2136
|
{
|
|
2138
2137
|
...t,
|
|
2139
2138
|
ref: r,
|
|
@@ -2156,9 +2155,9 @@ var ei = U.forwardRef(
|
|
|
2156
2155
|
}
|
|
2157
2156
|
), ti = U.forwardRef(
|
|
2158
2157
|
(t, e) => {
|
|
2159
|
-
const n = le(
|
|
2158
|
+
const n = le(xe, t.__scopeDialog), o = U.useRef(!1), r = U.useRef(!1);
|
|
2160
2159
|
return /* @__PURE__ */ i(
|
|
2161
|
-
|
|
2160
|
+
Fn,
|
|
2162
2161
|
{
|
|
2163
2162
|
...t,
|
|
2164
2163
|
ref: e,
|
|
@@ -2177,12 +2176,12 @@ var ei = U.forwardRef(
|
|
|
2177
2176
|
}
|
|
2178
2177
|
);
|
|
2179
2178
|
}
|
|
2180
|
-
),
|
|
2179
|
+
), Fn = U.forwardRef(
|
|
2181
2180
|
(t, e) => {
|
|
2182
|
-
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = t, s = le(
|
|
2183
|
-
return
|
|
2181
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = t, s = le(xe, n), u = U.useRef(null), l = xt(e, u);
|
|
2182
|
+
return Jr(), /* @__PURE__ */ z(Ie, { children: [
|
|
2184
2183
|
/* @__PURE__ */ i(
|
|
2185
|
-
|
|
2184
|
+
Yr,
|
|
2186
2185
|
{
|
|
2187
2186
|
asChild: !0,
|
|
2188
2187
|
loop: !0,
|
|
@@ -2190,13 +2189,13 @@ var ei = U.forwardRef(
|
|
|
2190
2189
|
onMountAutoFocus: r,
|
|
2191
2190
|
onUnmountAutoFocus: a,
|
|
2192
2191
|
children: /* @__PURE__ */ i(
|
|
2193
|
-
|
|
2192
|
+
Br,
|
|
2194
2193
|
{
|
|
2195
2194
|
role: "dialog",
|
|
2196
2195
|
id: s.contentId,
|
|
2197
2196
|
"aria-describedby": s.descriptionId,
|
|
2198
2197
|
"aria-labelledby": s.titleId,
|
|
2199
|
-
"data-state":
|
|
2198
|
+
"data-state": Dt(s.open),
|
|
2200
2199
|
...c,
|
|
2201
2200
|
ref: l,
|
|
2202
2201
|
onDismiss: () => s.onOpenChange(!1)
|
|
@@ -2210,23 +2209,23 @@ var ei = U.forwardRef(
|
|
|
2210
2209
|
] })
|
|
2211
2210
|
] });
|
|
2212
2211
|
}
|
|
2213
|
-
),
|
|
2212
|
+
), Ot = "DialogTitle", kn = U.forwardRef(
|
|
2214
2213
|
(t, e) => {
|
|
2215
|
-
const { __scopeDialog: n, ...o } = t, r = le(
|
|
2214
|
+
const { __scopeDialog: n, ...o } = t, r = le(Ot, n);
|
|
2216
2215
|
return /* @__PURE__ */ i(We.h2, { id: r.titleId, ...o, ref: e });
|
|
2217
2216
|
}
|
|
2218
2217
|
);
|
|
2219
|
-
|
|
2220
|
-
var
|
|
2218
|
+
kn.displayName = Ot;
|
|
2219
|
+
var Mn = "DialogDescription", ni = U.forwardRef(
|
|
2221
2220
|
(t, e) => {
|
|
2222
|
-
const { __scopeDialog: n, ...o } = t, r = le(
|
|
2221
|
+
const { __scopeDialog: n, ...o } = t, r = le(Mn, n);
|
|
2223
2222
|
return /* @__PURE__ */ i(We.p, { id: r.descriptionId, ...o, ref: e });
|
|
2224
2223
|
}
|
|
2225
2224
|
);
|
|
2226
|
-
ni.displayName =
|
|
2227
|
-
var
|
|
2225
|
+
ni.displayName = Mn;
|
|
2226
|
+
var Wn = "DialogClose", Hn = U.forwardRef(
|
|
2228
2227
|
(t, e) => {
|
|
2229
|
-
const { __scopeDialog: n, ...o } = t, r = le(
|
|
2228
|
+
const { __scopeDialog: n, ...o } = t, r = le(Wn, n);
|
|
2230
2229
|
return /* @__PURE__ */ i(
|
|
2231
2230
|
We.button,
|
|
2232
2231
|
{
|
|
@@ -2238,16 +2237,16 @@ var Hn = "DialogClose", $n = U.forwardRef(
|
|
|
2238
2237
|
);
|
|
2239
2238
|
}
|
|
2240
2239
|
);
|
|
2241
|
-
|
|
2242
|
-
function
|
|
2240
|
+
Hn.displayName = Wn;
|
|
2241
|
+
function Dt(t) {
|
|
2243
2242
|
return t ? "open" : "closed";
|
|
2244
2243
|
}
|
|
2245
|
-
var
|
|
2246
|
-
contentName:
|
|
2247
|
-
titleName:
|
|
2244
|
+
var $n = "DialogTitleWarning", [Ss, Gn] = Zr($n, {
|
|
2245
|
+
contentName: xe,
|
|
2246
|
+
titleName: Ot,
|
|
2248
2247
|
docsSlug: "dialog"
|
|
2249
2248
|
}), ri = ({ titleId: t }) => {
|
|
2250
|
-
const e =
|
|
2249
|
+
const e = Gn($n), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2251
2250
|
|
|
2252
2251
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2253
2252
|
|
|
@@ -2256,13 +2255,13 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2256
2255
|
t && (document.getElementById(t) || console.error(n));
|
|
2257
2256
|
}, [n, t]), null;
|
|
2258
2257
|
}, oi = "DialogDescriptionWarning", ii = ({ contentRef: t, descriptionId: e }) => {
|
|
2259
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
2258
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Gn(oi).contentName}}.`;
|
|
2260
2259
|
return U.useEffect(() => {
|
|
2261
2260
|
var a;
|
|
2262
2261
|
const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2263
2262
|
e && r && (document.getElementById(e) || console.warn(o));
|
|
2264
2263
|
}, [o, t, e]), null;
|
|
2265
|
-
}, ai =
|
|
2264
|
+
}, ai = Nn, si = Dn, ci = zn, li = An, ui = kn, di = Hn;
|
|
2266
2265
|
const Se = {
|
|
2267
2266
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2268
2267
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2272,7 +2271,7 @@ const Se = {
|
|
|
2272
2271
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2273
2272
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2274
2273
|
}, pi = () => {
|
|
2275
|
-
const { pdfProperties: t } = J(), { container: e } =
|
|
2274
|
+
const { pdfProperties: t } = J(), { container: e } = ye(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = to(), { localeMessages: r } = de(), a = k(() => {
|
|
2276
2275
|
if (!t)
|
|
2277
2276
|
return [];
|
|
2278
2277
|
const {
|
|
@@ -2300,11 +2299,11 @@ const Se = {
|
|
|
2300
2299
|
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value: h },
|
|
2301
2300
|
{
|
|
2302
2301
|
label: r == null ? void 0 : r.propertiesCreateOnLabel,
|
|
2303
|
-
value: f ?
|
|
2302
|
+
value: f ? Ht(f) : ""
|
|
2304
2303
|
},
|
|
2305
2304
|
{
|
|
2306
2305
|
label: r == null ? void 0 : r.propertiesModifiedOnLabel,
|
|
2307
|
-
value: v ?
|
|
2306
|
+
value: v ? Ht(v) : ""
|
|
2308
2307
|
},
|
|
2309
2308
|
{ separate: !0 },
|
|
2310
2309
|
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: C },
|
|
@@ -2316,8 +2315,8 @@ const Se = {
|
|
|
2316
2315
|
/* @__PURE__ */ i(ci, { className: Se["rp-dialog-overlay"] }),
|
|
2317
2316
|
/* @__PURE__ */ z(li, { className: Se["rp-document-dialog"], children: [
|
|
2318
2317
|
/* @__PURE__ */ i(ui, { className: Se["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2319
|
-
/* @__PURE__ */ i("div", { className: Se["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Se["rp-properties-divider"] }) : /* @__PURE__ */ i(
|
|
2320
|
-
/* @__PURE__ */ i(di, { asChild: !0, className: Se["rp-dialog-close"], children: /* @__PURE__ */ i(
|
|
2318
|
+
/* @__PURE__ */ i("div", { className: Se["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Se["rp-properties-divider"] }) : /* @__PURE__ */ i(eo, { label: c.label, value: c.value }) }, s)) }),
|
|
2319
|
+
/* @__PURE__ */ i(di, { asChild: !0, className: Se["rp-dialog-close"], children: /* @__PURE__ */ i(gn, {}) })
|
|
2321
2320
|
] })
|
|
2322
2321
|
] }) }) });
|
|
2323
2322
|
}, hi = {
|
|
@@ -2325,7 +2324,7 @@ const Se = {
|
|
|
2325
2324
|
}, mi = (t) => URL.createObjectURL(t), fi = async (t) => {
|
|
2326
2325
|
const n = await (await fetch(t)).blob();
|
|
2327
2326
|
return mi(n);
|
|
2328
|
-
},
|
|
2327
|
+
}, Vn = () => {
|
|
2329
2328
|
const { filename: t, pdfSrc: e } = J();
|
|
2330
2329
|
return { download: R(async () => {
|
|
2331
2330
|
if (!t || !e)
|
|
@@ -2333,22 +2332,22 @@ const Se = {
|
|
|
2333
2332
|
const o = document.createElement("a");
|
|
2334
2333
|
o.href = await fi(e), o.download = t, document.body.appendChild(o), o.click(), document.body.removeChild(o);
|
|
2335
2334
|
}, [t, e]) };
|
|
2336
|
-
},
|
|
2335
|
+
}, Un = () => {
|
|
2337
2336
|
const { downloadIcon: t } = pe();
|
|
2338
|
-
return t || /* @__PURE__ */ i(
|
|
2339
|
-
},
|
|
2340
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2337
|
+
return t || /* @__PURE__ */ i(ao, {});
|
|
2338
|
+
}, qn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(q, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), gi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(qn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Un, {}) }) }), vi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(we, { onClick: t, children: /* @__PURE__ */ z(qn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2339
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Un, {}) }),
|
|
2341
2340
|
e == null ? void 0 : e.downloadFileLabel
|
|
2342
|
-
] }) }),
|
|
2343
|
-
const { download: t } =
|
|
2341
|
+
] }) }), Zn = () => {
|
|
2342
|
+
const { download: t } = Vn(), { downloadTool: e = !0 } = _e(), { isSmallScreen: n } = Re(), { localeMessages: o } = de();
|
|
2344
2343
|
return e ? n ? /* @__PURE__ */ i(vi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(gi, { download: t, localeMessages: o }) : null : null;
|
|
2345
|
-
},
|
|
2344
|
+
}, jn = () => {
|
|
2346
2345
|
const { printIcon: t } = pe();
|
|
2347
|
-
return t || /* @__PURE__ */ i(
|
|
2348
|
-
},
|
|
2349
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2346
|
+
return t || /* @__PURE__ */ i(so, {});
|
|
2347
|
+
}, Bn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(q, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), _i = ({ 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(jn, {}) }) }), wi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(we, { onClick: t, children: /* @__PURE__ */ z(Bn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2348
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(jn, {}) }),
|
|
2350
2349
|
e == null ? void 0 : e.printLabel
|
|
2351
|
-
] }) }),
|
|
2350
|
+
] }) }), Kn = () => {
|
|
2352
2351
|
const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: c = !0 } = _e(), { isSmallScreen: s } = Re(), { localeMessages: u } = de();
|
|
2353
2352
|
return c ? s ? /* @__PURE__ */ i(wi, { print: t, localeMessages: u }) : typeof c == "function" ? /* @__PURE__ */ i(
|
|
2354
2353
|
c,
|
|
@@ -2365,29 +2364,29 @@ const Se = {
|
|
|
2365
2364
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2366
2365
|
}, Ci = () => {
|
|
2367
2366
|
const { goToFirstPageIcon: t } = pe();
|
|
2368
|
-
return t || /* @__PURE__ */ i(
|
|
2367
|
+
return t || /* @__PURE__ */ i(_n, { className: bi["rp-go-to-Top"] });
|
|
2369
2368
|
}, Ti = () => {
|
|
2370
2369
|
const { goToLastPageIcon: t } = pe();
|
|
2371
|
-
return t || /* @__PURE__ */ i(
|
|
2372
|
-
},
|
|
2370
|
+
return t || /* @__PURE__ */ i(_n, {});
|
|
2371
|
+
}, rn = { width: "100%" }, Pi = () => {
|
|
2373
2372
|
const { goToPage: t, totalPages: e, focusedPage: n } = ce(), { jumpNavigationTool: o = !0 } = _e(), { localeMessages: r } = de(), a = k(() => n === 1, [n]), c = k(() => n === e, [n, e]), s = R(() => {
|
|
2374
2373
|
t(1);
|
|
2375
2374
|
}, [t]), u = R(() => {
|
|
2376
2375
|
t(e);
|
|
2377
2376
|
}, [t, e]);
|
|
2378
2377
|
return o ? /* @__PURE__ */ z(qe, { children: [
|
|
2379
|
-
/* @__PURE__ */ i(we, { onClick: s, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.firstPageTooltip, style:
|
|
2378
|
+
/* @__PURE__ */ i(we, { onClick: s, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.firstPageTooltip, style: rn, children: /* @__PURE__ */ z("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2380
2379
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Ci, {}) }),
|
|
2381
2380
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
|
|
2382
2381
|
] }) }) }),
|
|
2383
|
-
/* @__PURE__ */ i(we, { onClick: u, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.lastPageTooltip, style:
|
|
2382
|
+
/* @__PURE__ */ i(we, { onClick: u, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ z("div", { className: "rp-menu-item", "aria-disabled": c, children: [
|
|
2384
2383
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Ti, {}) }),
|
|
2385
2384
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
|
|
2386
2385
|
] }) }) }),
|
|
2387
|
-
/* @__PURE__ */ i(
|
|
2386
|
+
/* @__PURE__ */ i(Rt, {})
|
|
2388
2387
|
] }) : null;
|
|
2389
2388
|
}, Si = () => {
|
|
2390
|
-
const { container: t } =
|
|
2389
|
+
const { container: t } = ye(), { isSmallScreen: e } = Re(), {
|
|
2391
2390
|
openFileTool: n,
|
|
2392
2391
|
downloadTool: o,
|
|
2393
2392
|
documentProperties: r,
|
|
@@ -2411,25 +2410,25 @@ const Se = {
|
|
|
2411
2410
|
s,
|
|
2412
2411
|
u,
|
|
2413
2412
|
e
|
|
2414
|
-
]) ? /* @__PURE__ */ z(
|
|
2413
|
+
]) ? /* @__PURE__ */ z(no, { children: [
|
|
2415
2414
|
/* @__PURE__ */ i(
|
|
2416
|
-
|
|
2415
|
+
fn,
|
|
2417
2416
|
{
|
|
2418
2417
|
container: t,
|
|
2419
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(q, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(
|
|
2418
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(q, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(Vr, {}) }) }) }),
|
|
2420
2419
|
children: /* @__PURE__ */ z("div", { className: hi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2421
2420
|
e && /* @__PURE__ */ z(qe, { children: [
|
|
2422
|
-
/* @__PURE__ */ i(
|
|
2423
|
-
/* @__PURE__ */ i(
|
|
2424
|
-
/* @__PURE__ */ i(
|
|
2425
|
-
/* @__PURE__ */ i(
|
|
2426
|
-
/* @__PURE__ */ i(
|
|
2421
|
+
/* @__PURE__ */ i(mn, {}),
|
|
2422
|
+
/* @__PURE__ */ i(Zn, {}),
|
|
2423
|
+
/* @__PURE__ */ i(Kn, {}),
|
|
2424
|
+
/* @__PURE__ */ i(vn, {}),
|
|
2425
|
+
/* @__PURE__ */ i(Rt, {})
|
|
2427
2426
|
] }),
|
|
2428
2427
|
/* @__PURE__ */ i(Pi, {}),
|
|
2429
|
-
/* @__PURE__ */ i(ro, {}),
|
|
2430
|
-
/* @__PURE__ */ i(so, {}),
|
|
2431
2428
|
/* @__PURE__ */ i(oo, {}),
|
|
2432
|
-
/* @__PURE__ */ i(
|
|
2429
|
+
/* @__PURE__ */ i(co, {}),
|
|
2430
|
+
/* @__PURE__ */ i(io, {}),
|
|
2431
|
+
/* @__PURE__ */ i(ro, {})
|
|
2433
2432
|
] })
|
|
2434
2433
|
}
|
|
2435
2434
|
),
|
|
@@ -2438,12 +2437,12 @@ const Se = {
|
|
|
2438
2437
|
}, Ii = () => {
|
|
2439
2438
|
const { isSmallScreen: t } = Re();
|
|
2440
2439
|
return /* @__PURE__ */ z(Ie, { children: [
|
|
2441
|
-
/* @__PURE__ */ i(
|
|
2440
|
+
/* @__PURE__ */ i(Gr, {}),
|
|
2442
2441
|
!t && /* @__PURE__ */ z(Ie, { children: [
|
|
2443
|
-
/* @__PURE__ */ i(
|
|
2444
|
-
/* @__PURE__ */ i(
|
|
2445
|
-
/* @__PURE__ */ i(
|
|
2446
|
-
/* @__PURE__ */ i(
|
|
2442
|
+
/* @__PURE__ */ i(mn, {}),
|
|
2443
|
+
/* @__PURE__ */ i(Zn, {}),
|
|
2444
|
+
/* @__PURE__ */ i(Kn, {}),
|
|
2445
|
+
/* @__PURE__ */ i(vn, {})
|
|
2447
2446
|
] }),
|
|
2448
2447
|
/* @__PURE__ */ i(Si, {})
|
|
2449
2448
|
] });
|
|
@@ -2453,14 +2452,14 @@ const Se = {
|
|
|
2453
2452
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2454
2453
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2455
2454
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2456
|
-
},
|
|
2455
|
+
}, xi = 25, gt = 1e3, yi = [50, 75, 100, 125, 150, 200, 300, 400], Ri = () => {
|
|
2457
2456
|
const { zoomInIcon: t } = pe();
|
|
2458
|
-
return t || /* @__PURE__ */ i(
|
|
2457
|
+
return t || /* @__PURE__ */ i(lo, {});
|
|
2459
2458
|
}, Li = () => {
|
|
2460
2459
|
const { zoomOutIcon: t } = pe();
|
|
2461
|
-
return t || /* @__PURE__ */ i(
|
|
2460
|
+
return t || /* @__PURE__ */ i(uo, {});
|
|
2462
2461
|
}, Ni = () => {
|
|
2463
|
-
const { zoomLevel: t, setZoomLevel: e } = Je(), { container: n, contentRef: o } =
|
|
2462
|
+
const { zoomLevel: t, setZoomLevel: e } = Je(), { container: n, contentRef: o } = ye(), { zoomTool: r = !0 } = _e(), { focusedPage: a } = ce(), { rotate: c } = Xe(), { pages: s } = J(), { isSmallScreen: u } = Re(), { localeMessages: l } = de(), d = R(() => {
|
|
2464
2463
|
e((_) => {
|
|
2465
2464
|
const m = Math.floor(_ / 25) * 25;
|
|
2466
2465
|
return Math.min(m + 25, gt);
|
|
@@ -2470,12 +2469,12 @@ const Se = {
|
|
|
2470
2469
|
const m = Math.ceil(_ / 25) * 25;
|
|
2471
2470
|
return Math.min(m - 25, gt);
|
|
2472
2471
|
});
|
|
2473
|
-
}, [e]), h = k(() => t ===
|
|
2472
|
+
}, [e]), h = k(() => t === xi, [t]), g = k(() => t === gt, [t]), v = k(() => {
|
|
2474
2473
|
var _;
|
|
2475
2474
|
return (_ = s.get(a)) == null ? void 0 : _.page.getViewport({ scale: 1, rotation: c });
|
|
2476
2475
|
}, [s, a, c]), C = R(
|
|
2477
2476
|
(_) => {
|
|
2478
|
-
const m = ((v == null ? void 0 : v.width) || 0) + 2 *
|
|
2477
|
+
const m = ((v == null ? void 0 : v.width) || 0) + 2 * $t, T = ((v == null ? void 0 : v.height) || 0) + 2 * $t, S = (o == null ? void 0 : o.clientWidth) || 0, p = (o == null ? void 0 : o.clientHeight) || 0, P = po(_, S, p, m, T);
|
|
2479
2478
|
e(P);
|
|
2480
2479
|
},
|
|
2481
2480
|
[e, v]
|
|
@@ -2496,7 +2495,7 @@ const Se = {
|
|
|
2496
2495
|
}
|
|
2497
2496
|
) }),
|
|
2498
2497
|
!u && /* @__PURE__ */ i(
|
|
2499
|
-
|
|
2498
|
+
fn,
|
|
2500
2499
|
{
|
|
2501
2500
|
container: n,
|
|
2502
2501
|
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(q, { content: l == null ? void 0 : l.zoomSelectTooltip, children: /* @__PURE__ */ z(
|
|
@@ -2519,8 +2518,8 @@ const Se = {
|
|
|
2519
2518
|
/* @__PURE__ */ i(we, { onClick: () => w(at.PAGE_FIT), children: l == null ? void 0 : l.zoomPageFit }),
|
|
2520
2519
|
/* @__PURE__ */ i(we, { onClick: () => w(at.PAGE_WIDTH), children: l == null ? void 0 : l.zoomPageWidth })
|
|
2521
2520
|
] }),
|
|
2522
|
-
/* @__PURE__ */ i(
|
|
2523
|
-
/* @__PURE__ */ i(qe, { children:
|
|
2521
|
+
/* @__PURE__ */ i(Rt, {}),
|
|
2522
|
+
/* @__PURE__ */ i(qe, { children: yi.map((_) => /* @__PURE__ */ z(we, { onClick: () => w(_), children: [
|
|
2524
2523
|
_,
|
|
2525
2524
|
" %"
|
|
2526
2525
|
] }, _)) })
|
|
@@ -2547,11 +2546,11 @@ const Se = {
|
|
|
2547
2546
|
"rp-search-tool-input-clear": "_rp-search-tool-input-clear_jvchu_43",
|
|
2548
2547
|
"rp-search-input": "_rp-search-input_jvchu_57",
|
|
2549
2548
|
"rp-search-icon-info": "_rp-search-icon-info_jvchu_62"
|
|
2550
|
-
},
|
|
2549
|
+
}, on = () => {
|
|
2551
2550
|
const { searchIcon: t } = pe();
|
|
2552
|
-
return t || /* @__PURE__ */ i(
|
|
2551
|
+
return t || /* @__PURE__ */ i(ho, {});
|
|
2553
2552
|
}, Ei = () => {
|
|
2554
|
-
const { container: t } =
|
|
2553
|
+
const { container: t } = ye(), [e, n] = G(!1), { pdf: o } = J(), [r, a] = G(null), {
|
|
2555
2554
|
searchOptions: c,
|
|
2556
2555
|
setSearchOptions: s,
|
|
2557
2556
|
loading: u,
|
|
@@ -2561,7 +2560,7 @@ const Se = {
|
|
|
2561
2560
|
nextMatch: h,
|
|
2562
2561
|
prevMatch: g,
|
|
2563
2562
|
search: v
|
|
2564
|
-
} =
|
|
2563
|
+
} = In(), { searchTool: C = !0 } = _e(), [w, _] = G(v), { localeMessages: m } = de(), T = R(() => {
|
|
2565
2564
|
n(!0);
|
|
2566
2565
|
}, []), S = R(() => {
|
|
2567
2566
|
l(""), _(""), n(!1);
|
|
@@ -2602,34 +2601,34 @@ const Se = {
|
|
|
2602
2601
|
return D(() => {
|
|
2603
2602
|
S();
|
|
2604
2603
|
}, [o, S]), C ? /* @__PURE__ */ i(Ie, { children: /* @__PURE__ */ i(
|
|
2605
|
-
|
|
2604
|
+
kr,
|
|
2606
2605
|
{
|
|
2607
2606
|
open: e,
|
|
2608
2607
|
container: t,
|
|
2609
|
-
triggerComponent: /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(re, { onClick: T, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(
|
|
2608
|
+
triggerComponent: /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(re, { onClick: T, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(on, {}) }) }),
|
|
2610
2609
|
children: /* @__PURE__ */ z("div", { className: oe["rp-search-tool-content"], children: [
|
|
2611
2610
|
/* @__PURE__ */ z("div", { className: oe["rp-search-tool-input-wrapper"], children: [
|
|
2612
2611
|
/* @__PURE__ */ z("div", { className: oe["rp-search-tool-input"], children: [
|
|
2613
2612
|
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
2614
|
-
|
|
2613
|
+
cn,
|
|
2615
2614
|
{
|
|
2616
2615
|
value: w,
|
|
2617
2616
|
onKeyDown: b,
|
|
2618
2617
|
onChange: I,
|
|
2619
|
-
icon: /* @__PURE__ */ i(
|
|
2618
|
+
icon: /* @__PURE__ */ i(on, {}),
|
|
2620
2619
|
placeholder: m == null ? void 0 : m.searchInputPlaceholder,
|
|
2621
2620
|
className: oe["rp-search-input"],
|
|
2622
2621
|
ref: a,
|
|
2623
|
-
children: !!w && /* @__PURE__ */ i("span", { className: oe["rp-search-tool-input-clear"], onClick: O, children: /* @__PURE__ */ i(
|
|
2622
|
+
children: !!w && /* @__PURE__ */ i("span", { className: oe["rp-search-tool-input-clear"], onClick: O, children: /* @__PURE__ */ i(mo, {}) })
|
|
2624
2623
|
}
|
|
2625
2624
|
) }),
|
|
2626
|
-
u ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
2625
|
+
u ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(It, {}) }) : /* @__PURE__ */ i("span", { children: y })
|
|
2627
2626
|
] }),
|
|
2628
2627
|
/* @__PURE__ */ z("div", { className: oe["rp-search-tool-input-checkboxes"], children: [
|
|
2629
|
-
/* @__PURE__ */ i(
|
|
2630
|
-
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: oe["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(
|
|
2631
|
-
/* @__PURE__ */ i(
|
|
2632
|
-
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: oe["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(
|
|
2628
|
+
/* @__PURE__ */ i(Gt, { name: "matchCase", value: L, onChange: F, children: m == null ? void 0 : m.searchMatchCaseLabel }),
|
|
2629
|
+
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: oe["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Vt, {}) }) }),
|
|
2630
|
+
/* @__PURE__ */ i(Gt, { name: "wholeWord", value: E, onChange: A, children: m == null ? void 0 : m.searchWholeWordsLabel }),
|
|
2631
|
+
/* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: oe["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Vt, {}) }) })
|
|
2633
2632
|
] })
|
|
2634
2633
|
] }),
|
|
2635
2634
|
/* @__PURE__ */ z("div", { className: oe["rp-search-tool-controls"], children: [
|
|
@@ -2653,7 +2652,7 @@ const Se = {
|
|
|
2653
2652
|
{
|
|
2654
2653
|
onKeyDown: p,
|
|
2655
2654
|
"aria-label": m == null ? void 0 : m.searchCloseButtonTooltip,
|
|
2656
|
-
children: /* @__PURE__ */ i(
|
|
2655
|
+
children: /* @__PURE__ */ i(gn, { onClick: S, className: oe["rp-search-tool-input-icon"] })
|
|
2657
2656
|
}
|
|
2658
2657
|
) })
|
|
2659
2658
|
] })
|
|
@@ -2738,29 +2737,29 @@ const Se = {
|
|
|
2738
2737
|
width: `${s.width}px`,
|
|
2739
2738
|
height: `${s.height}px`
|
|
2740
2739
|
},
|
|
2741
|
-
children: /* @__PURE__ */ i(
|
|
2740
|
+
children: /* @__PURE__ */ i(It, {})
|
|
2742
2741
|
}
|
|
2743
2742
|
) }),
|
|
2744
2743
|
/* @__PURE__ */ i("div", { className: Fe["rp-thumbnail-text"], children: n })
|
|
2745
2744
|
]
|
|
2746
2745
|
}
|
|
2747
2746
|
);
|
|
2748
|
-
},
|
|
2747
|
+
}, an = {
|
|
2749
2748
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2750
2749
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2751
2750
|
}, Fi = 16, ki = (t, e) => {
|
|
2752
2751
|
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
2753
2752
|
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Fi);
|
|
2754
2753
|
}, Mi = Ke((t, e) => {
|
|
2755
|
-
const { show: n } = t, { focusedPage: o, totalPages: r } = ce(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: u } =
|
|
2756
|
-
|
|
2754
|
+
const { show: n } = t, { focusedPage: o, totalPages: r } = ce(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: u } = Pn(), l = W(null), d = W(1);
|
|
2755
|
+
sn(e, () => l.current);
|
|
2757
2756
|
const f = k(() => Object.values(a), [a]), h = R(() => {
|
|
2758
2757
|
const g = s + 1;
|
|
2759
2758
|
g <= r && c(g);
|
|
2760
2759
|
}, [c, r, s]);
|
|
2761
2760
|
return D(() => {
|
|
2762
2761
|
o > s ? u(o) : n && d.current !== o && (ki(l.current, o), d.current = o);
|
|
2763
|
-
}, [o, s, u, n, f]),
|
|
2762
|
+
}, [o, s, u, n, f]), Cr(l.current, h), /* @__PURE__ */ i("div", { ref: l, className: an["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: an["rp-thumbnails"], children: n ? f.map((g, v) => {
|
|
2764
2763
|
var C, w;
|
|
2765
2764
|
return /* @__PURE__ */ i(
|
|
2766
2765
|
Ai,
|
|
@@ -2776,9 +2775,9 @@ const Se = {
|
|
|
2776
2775
|
}) : null }) });
|
|
2777
2776
|
}), Wi = () => {
|
|
2778
2777
|
const { thumbnailIcon: t } = pe();
|
|
2779
|
-
return t || /* @__PURE__ */ i(
|
|
2778
|
+
return t || /* @__PURE__ */ i(br, {});
|
|
2780
2779
|
}, Hi = () => {
|
|
2781
|
-
const { active: t, setActive: e } =
|
|
2780
|
+
const { active: t, setActive: e } = Pn(), [n, o] = G(200), r = W(null), { thumbnailTool: a, sidebarEnable: c } = _e(), { localeMessages: s } = de(), u = R(() => {
|
|
2782
2781
|
e((d) => !d);
|
|
2783
2782
|
}, []), l = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: u, active: t }) : a ? /* @__PURE__ */ i(q, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
2784
2783
|
re,
|
|
@@ -2805,7 +2804,7 @@ const Se = {
|
|
|
2805
2804
|
className: vt["rp-thumbnails-wrapper"],
|
|
2806
2805
|
children: [
|
|
2807
2806
|
/* @__PURE__ */ i(Mi, { show: t, ref: r }),
|
|
2808
|
-
/* @__PURE__ */ i(
|
|
2807
|
+
/* @__PURE__ */ i(Tr, { onWidthChange: o, thumbnailRef: r })
|
|
2809
2808
|
]
|
|
2810
2809
|
}
|
|
2811
2810
|
)
|
|
@@ -2813,11 +2812,11 @@ const Se = {
|
|
|
2813
2812
|
}
|
|
2814
2813
|
) });
|
|
2815
2814
|
}, Is = Ke((t, e) => {
|
|
2816
|
-
const { children: n, slots: o, icons: r, style: a, className: c, mobileWidth: s, onLoaded: u, cleanupOnLoaded: l } = t, [d, f] = G(null), { setContainer: h, setContentRef: g } =
|
|
2815
|
+
const { children: n, slots: o, icons: r, style: a, className: c, mobileWidth: s, onLoaded: u, cleanupOnLoaded: l } = t, [d, f] = G(null), { setContainer: h, setContentRef: g } = ye(), { loading: v } = J(), { LoaderImageComponent: C } = hn();
|
|
2817
2816
|
return D(() => (u && u(), () => {
|
|
2818
2817
|
l && l();
|
|
2819
|
-
}), [u, l]), /* @__PURE__ */ i("div", { ref: e, className: ie(Te["rp-theme-variables"], Te["rp-container"]), children: /* @__PURE__ */ i(
|
|
2820
|
-
|
|
2818
|
+
}), [u, l]), /* @__PURE__ */ i("div", { ref: e, className: ie(Te["rp-theme-variables"], Te["rp-container"]), children: /* @__PURE__ */ i(Rr, { mobileWidth: s, children: /* @__PURE__ */ i(Pr, { slots: o, children: /* @__PURE__ */ i(Sr, { icons: r, children: /* @__PURE__ */ z(
|
|
2819
|
+
Ir,
|
|
2821
2820
|
{
|
|
2822
2821
|
getContainerRef: h,
|
|
2823
2822
|
toolbarRef: d,
|
|
@@ -2832,7 +2831,7 @@ const Se = {
|
|
|
2832
2831
|
/* @__PURE__ */ i("div", { ref: g, className: Te["rp-pages"], children: n })
|
|
2833
2832
|
] })
|
|
2834
2833
|
] }),
|
|
2835
|
-
/* @__PURE__ */ i(
|
|
2834
|
+
/* @__PURE__ */ i(yr, {})
|
|
2836
2835
|
] }),
|
|
2837
2836
|
v ? /* @__PURE__ */ i(
|
|
2838
2837
|
"div",
|
|
@@ -2872,7 +2871,7 @@ export {
|
|
|
2872
2871
|
wo as C,
|
|
2873
2872
|
Uo as D,
|
|
2874
2873
|
Ai as E,
|
|
2875
|
-
|
|
2874
|
+
Zn as F,
|
|
2876
2875
|
Mi as G,
|
|
2877
2876
|
Hi as H,
|
|
2878
2877
|
Di as L,
|
|
@@ -2885,28 +2884,28 @@ export {
|
|
|
2885
2884
|
Ni as Z,
|
|
2886
2885
|
ws as a,
|
|
2887
2886
|
Is as b,
|
|
2888
|
-
|
|
2887
|
+
Vn as c,
|
|
2889
2888
|
tt as d,
|
|
2890
|
-
|
|
2891
|
-
|
|
2889
|
+
In as e,
|
|
2890
|
+
wn as f,
|
|
2892
2891
|
fo as g,
|
|
2893
|
-
|
|
2892
|
+
bn as h,
|
|
2894
2893
|
go as i,
|
|
2895
|
-
|
|
2894
|
+
Cn as j,
|
|
2896
2895
|
vo as k,
|
|
2897
|
-
|
|
2898
|
-
|
|
2896
|
+
Tn as l,
|
|
2897
|
+
Pn as m,
|
|
2899
2898
|
_o as n,
|
|
2900
|
-
|
|
2899
|
+
Sn as o,
|
|
2901
2900
|
bo as p,
|
|
2902
2901
|
So as q,
|
|
2903
|
-
|
|
2902
|
+
Lt as r,
|
|
2904
2903
|
$o as s,
|
|
2905
2904
|
qo as t,
|
|
2906
2905
|
ce as u,
|
|
2907
2906
|
Ko as v,
|
|
2908
2907
|
pi as w,
|
|
2909
|
-
|
|
2908
|
+
Kn as x,
|
|
2910
2909
|
Ii as y,
|
|
2911
2910
|
Ei as z
|
|
2912
2911
|
};
|