@pdf-viewer/react 0.9.0-beta.6 → 0.9.0-beta.8
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-1a423868.js → RPDefaultLayout-ae8b7de8.js} +481 -494
- package/dist/components/RPController.js +19 -19
- 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 +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +3 -2
- 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/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/RotationContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/contexts/ZoomContext.js +9 -9
- package/dist/main.js +1 -1
- package/dist/types/utils/getZoomLevel.d.ts +1 -1
- package/dist/types/utils/types.d.ts +1 -1
- package/dist/utils/getZoomLevel.js +10 -8
- 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,18 +1,18 @@
|
|
|
1
|
-
import { jsx as s, jsxs as O, Fragment as
|
|
1
|
+
import { jsx as s, jsxs as O, Fragment as Ae } from "react/jsx-runtime";
|
|
2
2
|
import * as V from "react";
|
|
3
|
-
import { useRef as $, useEffect as F, useCallback as
|
|
4
|
-
import { ChevronUpIcon as
|
|
3
|
+
import { useRef as $, useEffect as F, useCallback as N, useState as W, createContext as We, useContext as He, useMemo as A, forwardRef as $e, useImperativeHandle as Zt, createElement as Me, PureComponent as kn, Component as Wn, memo as Hn } from "react";
|
|
4
|
+
import { ChevronUpIcon as Re } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as X } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as jt } from "./components/ui/Input.js";
|
|
7
|
-
import { useScrollModeContext as
|
|
7
|
+
import { useScrollModeContext as Pe } from "./contexts/ScrollModeContext.js";
|
|
8
8
|
import { useDocumentContext as ne } from "./contexts/RPDocumentContext.js";
|
|
9
9
|
import "./contexts/DarkModeContext.js";
|
|
10
|
-
import { ViewMode as
|
|
11
|
-
import { useRotationContext as
|
|
10
|
+
import { ViewMode as ze, ScrollMode as J, AnnotationSubType as at, SelectionMode as $n, ZoomLevel as Be } from "./utils/types.js";
|
|
11
|
+
import { useRotationContext as Ge } from "./contexts/RotationContext.js";
|
|
12
12
|
import { useLayerContext as Gn } from "./contexts/LayerContext.js";
|
|
13
|
-
import { useZoomContext as
|
|
14
|
-
import { useViewModeContext as
|
|
15
|
-
import { useVirtualScrollContext as
|
|
13
|
+
import { useZoomContext as Ve } from "./contexts/ZoomContext.js";
|
|
14
|
+
import { useViewModeContext as Ue } from "./contexts/ViewModeContext.js";
|
|
15
|
+
import { useVirtualScrollContext as qe } from "./contexts/VirtualScrollContext.js";
|
|
16
16
|
import { useVirtualGridContext as Bt } from "./contexts/VirtualGridContext.js";
|
|
17
17
|
import { useScrollStateContext as Kt } from "./contexts/ScrollStateContext.js";
|
|
18
18
|
import { useViewportContext as _e } from "./contexts/ViewportContext.js";
|
|
@@ -36,7 +36,7 @@ import { RPSplitter as er } from "./components/layout/sidebar/RPSplitter.js";
|
|
|
36
36
|
import { useToolbarComponentContext as de, ToolbarComponentProvider as tr } from "./contexts/ToolbarComponentContext.js";
|
|
37
37
|
import { useIconContext as ce, IconProvider as nr } from "./contexts/IconContext.js";
|
|
38
38
|
import ee from "./components/ui/RPTooltip.js";
|
|
39
|
-
import { c as
|
|
39
|
+
import { c as we, C as rr } from "./Container-fdb0a71f.js";
|
|
40
40
|
import { WrapperLayout as or } from "./components/layout/WrapperLayout.js";
|
|
41
41
|
import { RPDropFileZone as ar } from "./components/RPDropFileZone.js";
|
|
42
42
|
import "./contexts/ThemeContext.js";
|
|
@@ -54,15 +54,15 @@ import { FileUploadTool as Yt } from "./components/layout/toolbar/FileUploadTool
|
|
|
54
54
|
import { DarkModeTool as mr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
55
55
|
import { ThreeDotIcon as fr } from "./components/icons/ThreeDotIcon.js";
|
|
56
56
|
import { UIDropDown as ft } from "./components/ui/DropDown.js";
|
|
57
|
-
import { u as gt, a as Le, c as
|
|
58
|
-
import { c as
|
|
57
|
+
import { u as gt, a as Le, c as xe, b as vt, d as gr, e as vr, h as _r, f as wr, F as br, D as Cr, g as Pr, G as Fe } from "./index-316854c1.js";
|
|
58
|
+
import { c as Sr, e as Tr, b as yr } from "./index-71898eb9.js";
|
|
59
59
|
import { e as Ke } from "./floating-ui.react-dom-e6d5fe8f.js";
|
|
60
60
|
import { CloseIcon as Qt } from "./components/icons/CloseIcon.js";
|
|
61
61
|
import { PropertyItem as Ir } from "./components/layout/toolbar/PropertyItem.js";
|
|
62
62
|
import { useOtherToolContext as xr, OtherToolProvider as Rr } from "./contexts/OtherToolContext.js";
|
|
63
|
-
import { DocumentProperties as
|
|
64
|
-
import { RotateTool as
|
|
65
|
-
import { ScrollModeTool as
|
|
63
|
+
import { DocumentProperties as Nr } from "./components/layout/toolbar/DocumentProperties.js";
|
|
64
|
+
import { RotateTool as Lr } from "./components/layout/toolbar/RotateTool.js";
|
|
65
|
+
import { ScrollModeTool as Mr } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
66
66
|
import { MenuSeparator as _t } from "./components/layout/toolbar/MenuSeparator.js";
|
|
67
67
|
import { FileDownloadDefaultIcon as Er } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
68
68
|
import { MenuItem as he } from "./components/layout/toolbar/MenuItem.js";
|
|
@@ -73,15 +73,16 @@ import { SelectionModeTool as Dr } from "./components/layout/toolbar/SelectionMo
|
|
|
73
73
|
import { ZoomInIcon as Ar } from "./components/icons/ZoomInIcon.js";
|
|
74
74
|
import { ZoomOutIcon as zr } from "./components/icons/ZoomOutIcon.js";
|
|
75
75
|
import { PAGE_PADDING as It } from "./utils/constants.js";
|
|
76
|
-
import {
|
|
76
|
+
import { getZoomLevel as Fr } from "./utils/getZoomLevel.js";
|
|
77
|
+
import { SearchIcon as kr } from "./components/icons/SearchIcon.js";
|
|
77
78
|
import { UICheckbox as xt } from "./components/ui/Checkbox.js";
|
|
78
|
-
import { ClearIcon as
|
|
79
|
+
import { ClearIcon as Wr } from "./components/icons/ClearIcon.js";
|
|
79
80
|
import './assets/RPDefaultLayout.css';const nn = () => {
|
|
80
|
-
const { viewMode: e } =
|
|
81
|
+
const { viewMode: e } = Ue(), { scrollMode: t } = Pe(), { virtualScrollRef: n, pageScrollElementRef: r } = qe(), { setFocusedPage: o } = oe(), a = $(), { columnCount: c } = Bt(), i = ht(), l = $(t), p = $(e);
|
|
81
82
|
F(() => {
|
|
82
83
|
n != null && n.scrollToItem && (a.current = n);
|
|
83
84
|
}, [n]);
|
|
84
|
-
const h =
|
|
85
|
+
const h = N(
|
|
85
86
|
(u) => {
|
|
86
87
|
if (!r)
|
|
87
88
|
return;
|
|
@@ -92,11 +93,11 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
92
93
|
);
|
|
93
94
|
return F(() => {
|
|
94
95
|
l.current = t, p.current = e;
|
|
95
|
-
}, [t, e]), { scrollToPage:
|
|
96
|
+
}, [t, e]), { scrollToPage: N(
|
|
96
97
|
(u, m = "start") => {
|
|
97
98
|
const g = u - 1;
|
|
98
99
|
let _ = g, v = 0;
|
|
99
|
-
if (p.current ===
|
|
100
|
+
if (p.current === ze.DUAL_PAGE && l.current === J.PAGE_SCROLLING) {
|
|
100
101
|
h(u);
|
|
101
102
|
return;
|
|
102
103
|
}
|
|
@@ -104,29 +105,29 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
104
105
|
o(u);
|
|
105
106
|
return;
|
|
106
107
|
}
|
|
107
|
-
a.current && (l.current === J.HORIZONTAL_SCROLLING ? v = g : p.current ===
|
|
108
|
+
a.current && (l.current === J.HORIZONTAL_SCROLLING ? v = g : p.current === ze.DUAL_PAGE && (v = g % 2, _ = Math.floor(g / 2)), a.current.scrollToItem({ rowIndex: _, columnIndex: v, align: m }));
|
|
108
109
|
},
|
|
109
110
|
[c, h, o]
|
|
110
111
|
) };
|
|
111
|
-
},
|
|
112
|
-
const [t, n] = W(e), [r, o] = W(0), { scrollToPage: a } = nn(), c = $(1), { isScrolling: i } = Kt(), { viewMode: l } =
|
|
112
|
+
}, Hr = (e = 1) => {
|
|
113
|
+
const [t, n] = W(e), [r, o] = W(0), { scrollToPage: a } = nn(), c = $(1), { isScrolling: i } = Kt(), { viewMode: l } = Ue(), { scrollMode: p } = Pe(), h = pr(t, 100), f = N(
|
|
113
114
|
(v) => {
|
|
114
115
|
if (!/^[0-9]*$/g.test(v.toString()) || !v)
|
|
115
116
|
return { success: !1, currentPage: c.current };
|
|
116
|
-
const
|
|
117
|
-
return
|
|
117
|
+
const y = +v;
|
|
118
|
+
return y < 0 || y > r ? { success: !1, currentPage: c.current } : (n(y), c.current = y, { success: !0, currentPage: +v });
|
|
118
119
|
},
|
|
119
120
|
[r]
|
|
120
|
-
), u =
|
|
121
|
+
), u = N(f, [f]), m = N(
|
|
121
122
|
(v) => {
|
|
122
123
|
const C = f(v);
|
|
123
124
|
return C.success && (i.current = !0, a(C.currentPage)), C;
|
|
124
125
|
},
|
|
125
126
|
[f, a]
|
|
126
|
-
), g =
|
|
127
|
+
), g = N(() => {
|
|
127
128
|
let v = t - 1;
|
|
128
129
|
m(v);
|
|
129
|
-
}, [m, t, l, p]), _ =
|
|
130
|
+
}, [m, t, l, p]), _ = N(() => {
|
|
130
131
|
let v = t + 1;
|
|
131
132
|
m(v);
|
|
132
133
|
}, [m, t, l, p]);
|
|
@@ -139,7 +140,7 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
139
140
|
prevPage: g,
|
|
140
141
|
goToPage: m
|
|
141
142
|
};
|
|
142
|
-
}, rn =
|
|
143
|
+
}, rn = We({
|
|
143
144
|
focusedPage: 0,
|
|
144
145
|
setFocusedPage: (e) => {
|
|
145
146
|
},
|
|
@@ -152,10 +153,10 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
152
153
|
nextPage: () => {
|
|
153
154
|
}
|
|
154
155
|
}), oe = () => {
|
|
155
|
-
const e =
|
|
156
|
+
const e = He(rn);
|
|
156
157
|
return typeof (e == null ? void 0 : e.focusedPage) > "u" && hr.error("Please use this hooks inside children component of RPController or RPLayout"), e;
|
|
157
|
-
},
|
|
158
|
-
const { initialPage: t = 1 } = Un(), { pdf: n } = ne(), { focusedPage: r, totalPages: o, setFocusedPage: a, setTotalPages: c, goToPage: i, nextPage: l, prevPage: p } =
|
|
158
|
+
}, Ws = ({ children: e }) => {
|
|
159
|
+
const { initialPage: t = 1 } = Un(), { pdf: n } = ne(), { focusedPage: r, totalPages: o, setFocusedPage: a, setTotalPages: c, goToPage: i, nextPage: l, prevPage: p } = Hr(t);
|
|
159
160
|
return F(() => {
|
|
160
161
|
n != null && n.numPages && c(n.numPages);
|
|
161
162
|
}, [n, c, o, t]), F(() => {
|
|
@@ -178,7 +179,7 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
178
179
|
}
|
|
179
180
|
);
|
|
180
181
|
};
|
|
181
|
-
const
|
|
182
|
+
const $r = () => {
|
|
182
183
|
const { pdf: e, pages: t } = ne(), [n, r] = W({
|
|
183
184
|
loadedPages: 0,
|
|
184
185
|
totalPages: 0,
|
|
@@ -187,11 +188,11 @@ const Hr = () => {
|
|
|
187
188
|
F(() => {
|
|
188
189
|
h.current;
|
|
189
190
|
}, [h]);
|
|
190
|
-
const f =
|
|
191
|
+
const f = N(() => {
|
|
191
192
|
document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
|
|
192
193
|
const P = document.querySelector(".rp-print-zone");
|
|
193
194
|
P && P.remove();
|
|
194
|
-
}, []), u =
|
|
195
|
+
}, []), u = N(() => {
|
|
195
196
|
h.current = !1, a(!1), i(!1), p(null), r({
|
|
196
197
|
loadedPages: 0,
|
|
197
198
|
totalPages: 0,
|
|
@@ -205,7 +206,7 @@ const Hr = () => {
|
|
|
205
206
|
pageNumber: d,
|
|
206
207
|
viewerPdfPage: b,
|
|
207
208
|
printResolution: w,
|
|
208
|
-
optionalContentConfigPromise:
|
|
209
|
+
optionalContentConfigPromise: S,
|
|
209
210
|
printAnnotationStoragePromise: D
|
|
210
211
|
}) => {
|
|
211
212
|
if (h.current) {
|
|
@@ -214,8 +215,8 @@ const Hr = () => {
|
|
|
214
215
|
}
|
|
215
216
|
const I = w / Bn.PDF;
|
|
216
217
|
P.width = Math.floor(b.width * I), P.height = Math.floor(b.height * I);
|
|
217
|
-
const
|
|
218
|
-
|
|
218
|
+
const T = P.getContext("2d");
|
|
219
|
+
T.save(), T.fillStyle = "rgb(255, 255, 255)", T.fillRect(0, 0, P.width, P.height), T.restore();
|
|
219
220
|
const [E, x] = await Promise.all([
|
|
220
221
|
R.getPage(d),
|
|
221
222
|
D
|
|
@@ -224,26 +225,26 @@ const Hr = () => {
|
|
|
224
225
|
u();
|
|
225
226
|
return;
|
|
226
227
|
}
|
|
227
|
-
const
|
|
228
|
-
canvasContext:
|
|
228
|
+
const L = {
|
|
229
|
+
canvasContext: T,
|
|
229
230
|
transform: [I, 0, 0, I, 0, 0],
|
|
230
231
|
viewport: E.getViewport({ scale: 1, rotation: b.rotation }),
|
|
231
232
|
intent: "print",
|
|
232
233
|
annotationMode: Kn.ENABLE_STORAGE,
|
|
233
|
-
optionalContentConfigPromise:
|
|
234
|
+
optionalContentConfigPromise: S,
|
|
234
235
|
printAnnotationStorage: x
|
|
235
236
|
};
|
|
236
237
|
try {
|
|
237
|
-
return E.render(
|
|
238
|
-
} catch (
|
|
239
|
-
throw
|
|
238
|
+
return E.render(L).promise;
|
|
239
|
+
} catch (M) {
|
|
240
|
+
throw M instanceof Xn || console.error(M), M;
|
|
240
241
|
}
|
|
241
|
-
}, _ =
|
|
242
|
+
}, _ = N(() => {
|
|
242
243
|
const P = window.print;
|
|
243
244
|
return new Promise((R) => {
|
|
244
|
-
const d = (
|
|
245
|
+
const d = (S) => {
|
|
245
246
|
setTimeout(() => {
|
|
246
|
-
P.call(window), setTimeout(() =>
|
|
247
|
+
P.call(window), setTimeout(() => S(), 20);
|
|
247
248
|
}, 0);
|
|
248
249
|
};
|
|
249
250
|
if (document.querySelector(".rp-print-zone")) {
|
|
@@ -258,8 +259,8 @@ const Hr = () => {
|
|
|
258
259
|
}, []), v = async (P) => {
|
|
259
260
|
const R = document.createElement("img"), d = document.createElement("div");
|
|
260
261
|
return d.classList.add("rp-print-page"), await new Promise((b, w) => {
|
|
261
|
-
P.toBlob((
|
|
262
|
-
|
|
262
|
+
P.toBlob((S) => {
|
|
263
|
+
S ? (R.src = URL.createObjectURL(S), R.onload = () => {
|
|
263
264
|
URL.revokeObjectURL(R.src), b();
|
|
264
265
|
}, R.onerror = w) : w(new Error("Failed to create blob"));
|
|
265
266
|
});
|
|
@@ -270,11 +271,11 @@ const Hr = () => {
|
|
|
270
271
|
d.classList.add("rp-print-zone");
|
|
271
272
|
const b = document.createElement("style"), w = R.get(1);
|
|
272
273
|
if (w) {
|
|
273
|
-
const { width:
|
|
274
|
-
b.innerHTML = `@page { size: ${
|
|
274
|
+
const { width: S, height: D } = w == null ? void 0 : w.page.getViewport({ scale: 1 });
|
|
275
|
+
b.innerHTML = `@page { size: ${S}px ${D}px }`;
|
|
275
276
|
}
|
|
276
277
|
return d.appendChild(b), d.append(...P), d;
|
|
277
|
-
},
|
|
278
|
+
}, y = N(async () => {
|
|
278
279
|
if (!e)
|
|
279
280
|
return;
|
|
280
281
|
u();
|
|
@@ -283,13 +284,13 @@ const Hr = () => {
|
|
|
283
284
|
e.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
284
285
|
const b = e.getOptionalContentConfig({ intent: "print" }), w = Promise.resolve(
|
|
285
286
|
e.annotationStorage.print ?? void 0
|
|
286
|
-
),
|
|
287
|
-
for (const [I,
|
|
287
|
+
), S = t.size;
|
|
288
|
+
for (const [I, T] of t) {
|
|
288
289
|
if (h.current) {
|
|
289
290
|
u();
|
|
290
291
|
return;
|
|
291
292
|
}
|
|
292
|
-
const E =
|
|
293
|
+
const E = T.page.getViewport({ scale: 1 });
|
|
293
294
|
if (await g({
|
|
294
295
|
scratchCanvas: P,
|
|
295
296
|
pdfDocument: e,
|
|
@@ -304,11 +305,11 @@ const Hr = () => {
|
|
|
304
305
|
}
|
|
305
306
|
const x = await v(P);
|
|
306
307
|
R.push(x);
|
|
307
|
-
const
|
|
308
|
+
const L = parseFloat((R.length / S * 100).toFixed(2));
|
|
308
309
|
r({
|
|
309
310
|
loadedPages: I,
|
|
310
|
-
totalPages:
|
|
311
|
-
percentage:
|
|
311
|
+
totalPages: S,
|
|
312
|
+
percentage: L
|
|
312
313
|
});
|
|
313
314
|
}
|
|
314
315
|
if (h.current) {
|
|
@@ -331,14 +332,14 @@ const Hr = () => {
|
|
|
331
332
|
window.removeEventListener("afterprint", P, !0);
|
|
332
333
|
};
|
|
333
334
|
}, [f, u]), {
|
|
334
|
-
print:
|
|
335
|
+
print: y,
|
|
335
336
|
cancel: m,
|
|
336
337
|
progress: n,
|
|
337
338
|
isComplete: o,
|
|
338
339
|
isError: c,
|
|
339
340
|
error: l
|
|
340
341
|
};
|
|
341
|
-
}, on =
|
|
342
|
+
}, on = We({
|
|
342
343
|
print: () => {
|
|
343
344
|
},
|
|
344
345
|
cancel: () => {
|
|
@@ -355,12 +356,12 @@ const Hr = () => {
|
|
|
355
356
|
console.error("Error in setOnError callback:", t);
|
|
356
357
|
}
|
|
357
358
|
}
|
|
358
|
-
}),
|
|
359
|
-
const [t, n] = W(null), [r, o] = W(null), { print: a, cancel: c, progress: i, isComplete: l, isError: p, error: h } =
|
|
359
|
+
}), Hs = ({ children: e }) => {
|
|
360
|
+
const [t, n] = W(null), [r, o] = W(null), { print: a, cancel: c, progress: i, isComplete: l, isError: p, error: h } = $r(), f = N((v) => {
|
|
360
361
|
v && typeof v == "function" && o(() => v);
|
|
361
362
|
}, []), u = (v) => {
|
|
362
363
|
h && v(h);
|
|
363
|
-
}, m =
|
|
364
|
+
}, m = N(
|
|
364
365
|
(v) => {
|
|
365
366
|
n(() => v);
|
|
366
367
|
},
|
|
@@ -387,12 +388,12 @@ const Hr = () => {
|
|
|
387
388
|
};
|
|
388
389
|
return /* @__PURE__ */ s(on.Provider, { value: _, children: e });
|
|
389
390
|
}, wt = () => {
|
|
390
|
-
const e =
|
|
391
|
+
const e = He(on);
|
|
391
392
|
if (!e)
|
|
392
393
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
393
394
|
return e;
|
|
394
|
-
},
|
|
395
|
-
const [e, t] = W({}), { pages: n } = ne(), { rotate: r } =
|
|
395
|
+
}, Gr = () => {
|
|
396
|
+
const [e, t] = W({}), { pages: n } = ne(), { rotate: r } = Ge(), o = A(() => Object.keys(e).length, [e]), a = N(
|
|
396
397
|
(i) => {
|
|
397
398
|
if (!n.size)
|
|
398
399
|
return;
|
|
@@ -436,7 +437,7 @@ const Hr = () => {
|
|
|
436
437
|
F(() => {
|
|
437
438
|
a(10);
|
|
438
439
|
}, [a]);
|
|
439
|
-
const c =
|
|
440
|
+
const c = N(
|
|
440
441
|
(i) => {
|
|
441
442
|
if (!n)
|
|
442
443
|
return;
|
|
@@ -469,7 +470,7 @@ const Hr = () => {
|
|
|
469
470
|
[n, r]
|
|
470
471
|
);
|
|
471
472
|
return { thumbnailPages: e, addPage: c, addToPage: a, thumbnailLength: o };
|
|
472
|
-
}, an =
|
|
473
|
+
}, an = We({
|
|
473
474
|
thumbnailPages: {},
|
|
474
475
|
addPage: (e) => {
|
|
475
476
|
},
|
|
@@ -479,11 +480,11 @@ const Hr = () => {
|
|
|
479
480
|
setActive: (e) => {
|
|
480
481
|
},
|
|
481
482
|
active: !1
|
|
482
|
-
}), sn = () =>
|
|
483
|
+
}), sn = () => He(an), $s = ({
|
|
483
484
|
children: e,
|
|
484
485
|
initialThumbnailsVisible: t
|
|
485
486
|
}) => {
|
|
486
|
-
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a } =
|
|
487
|
+
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a } = Gr(), [c, i] = W(t);
|
|
487
488
|
return /* @__PURE__ */ s(
|
|
488
489
|
an.Provider,
|
|
489
490
|
{
|
|
@@ -491,17 +492,17 @@ const Hr = () => {
|
|
|
491
492
|
children: e
|
|
492
493
|
}
|
|
493
494
|
);
|
|
494
|
-
},
|
|
495
|
-
const [n, r] = W(t), [o, a] = W(!1), { pdf: c, pages: i } = ne(), l = ht(), p = $(!n), { currentZoom: h } =
|
|
495
|
+
}, Vr = (e = {}, t = "") => {
|
|
496
|
+
const [n, r] = W(t), [o, a] = W(!1), { pdf: c, pages: i } = ne(), l = ht(), p = $(!n), { currentZoom: h } = Ve(), [f, u] = W([]), { setFocusedPage: m } = oe(), [g, _] = W(0), { pageScrollElementRef: v, virtualScrollableElementRef: C } = qe(), { scrollMode: y } = Pe(), [P, R] = W(null), d = $({}), b = A(() => g === 0 ? null : f[g - 1], [g, f]), w = A(() => f.length, [f]);
|
|
496
497
|
F(() => {
|
|
497
498
|
if (!b || !i)
|
|
498
499
|
return;
|
|
499
|
-
const
|
|
500
|
-
if (!
|
|
500
|
+
const T = C || v;
|
|
501
|
+
if (!T)
|
|
501
502
|
return;
|
|
502
|
-
const E = i.get(b.page), x =
|
|
503
|
-
let
|
|
504
|
-
|
|
503
|
+
const E = i.get(b.page), x = T.clientHeight / 2, L = T.clientWidth / 2;
|
|
504
|
+
let M = 0, k = 0;
|
|
505
|
+
y === J.PAGE_SCROLLING && m(b.page), y === J.VERTICAL_SCROLLING && (M = l.heights.slice(0, b.page - 1).reduce((U, B) => U + B, 0)), y === J.HORIZONTAL_SCROLLING && (k = l.widths.slice(0, b.page - 1).reduce((U, B) => U + B, 0));
|
|
505
506
|
let G;
|
|
506
507
|
if (!E)
|
|
507
508
|
return;
|
|
@@ -513,11 +514,11 @@ const Hr = () => {
|
|
|
513
514
|
}), G.render().then(() => {
|
|
514
515
|
const U = G.textDivs[b.start.idx], [B] = Xt([b], q, G.textDivs), re = l.widths[b.page - 1], pe = l.heights[b.page - 1], K = document.createElement("div"), Y = document.createElement("div");
|
|
515
516
|
U.style.position = "absolute", U.style.color = "transparent", Y.style.position = "absolute", Y.style.top = "0", Y.style.setProperty("--scale-factor", `${h}`), K.style.position = "relative", K.style.width = `${re}px`, K.style.height = `${pe}px`, K.style.zIndex = "-1", K.appendChild(U), Y.appendChild(K), document.body.prepend(Y);
|
|
516
|
-
const z = B.element.getBoundingClientRect(), H =
|
|
517
|
-
left: k + +z.left -
|
|
517
|
+
const z = B.element.getBoundingClientRect(), H = M + +z.top - x + z.height / 2, se = {
|
|
518
|
+
left: k + +z.left - L + z.width / 2,
|
|
518
519
|
top: H
|
|
519
520
|
};
|
|
520
|
-
document.body.removeChild(Y),
|
|
521
|
+
document.body.removeChild(Y), T.scrollTo({
|
|
521
522
|
...se
|
|
522
523
|
});
|
|
523
524
|
});
|
|
@@ -526,23 +527,23 @@ const Hr = () => {
|
|
|
526
527
|
m,
|
|
527
528
|
l,
|
|
528
529
|
b,
|
|
529
|
-
|
|
530
|
+
y,
|
|
530
531
|
C,
|
|
531
532
|
v
|
|
532
533
|
]);
|
|
533
|
-
const
|
|
534
|
-
_((
|
|
535
|
-
}, [w]), D =
|
|
536
|
-
_((
|
|
537
|
-
}, [w]), I =
|
|
538
|
-
if (!
|
|
534
|
+
const S = N(() => {
|
|
535
|
+
_((T) => w ? T + 1 > w ? 1 : T + 1 : 0);
|
|
536
|
+
}, [w]), D = N(() => {
|
|
537
|
+
_((T) => w ? T - 1 <= 0 ? w : T - 1 : 0);
|
|
538
|
+
}, [w]), I = N(async (T) => {
|
|
539
|
+
if (!T)
|
|
539
540
|
return {};
|
|
540
|
-
const E =
|
|
541
|
-
for (let
|
|
541
|
+
const E = T.numPages, x = {};
|
|
542
|
+
for (let L = 1; L <= E; L++) {
|
|
542
543
|
if (p.current)
|
|
543
544
|
throw "close pop over";
|
|
544
|
-
const
|
|
545
|
-
x[
|
|
545
|
+
const M = await T.getPage(L);
|
|
546
|
+
x[L.toString()] = await M.getTextContent();
|
|
546
547
|
}
|
|
547
548
|
return x;
|
|
548
549
|
}, []);
|
|
@@ -551,16 +552,16 @@ const Hr = () => {
|
|
|
551
552
|
p.current = !0, u([]), _(0);
|
|
552
553
|
return;
|
|
553
554
|
}
|
|
554
|
-
p.current = !1, a(!0), u([]), _(0), I(c).then((
|
|
555
|
-
d.current =
|
|
556
|
-
const x = Object.keys(
|
|
555
|
+
p.current = !1, a(!0), u([]), _(0), I(c).then((T) => {
|
|
556
|
+
d.current = T;
|
|
557
|
+
const x = Object.keys(T).reduce((L, M) => {
|
|
557
558
|
const k = Zn(
|
|
558
559
|
[n],
|
|
559
|
-
|
|
560
|
-
Number(
|
|
560
|
+
T[M],
|
|
561
|
+
Number(M) - 1,
|
|
561
562
|
e
|
|
562
|
-
).map((G, q) => ({ ...G, page: Number(
|
|
563
|
-
return [...
|
|
563
|
+
).map((G, q) => ({ ...G, page: Number(M), pageMatchIdx: q }));
|
|
564
|
+
return [...L, ...k];
|
|
564
565
|
}, []);
|
|
565
566
|
u(x), _(x.length ? 1 : 0);
|
|
566
567
|
}).catch(() => {
|
|
@@ -574,12 +575,12 @@ const Hr = () => {
|
|
|
574
575
|
totalMatches: w,
|
|
575
576
|
currentMatchPosition: g,
|
|
576
577
|
currentMatch: b,
|
|
577
|
-
nextMatch:
|
|
578
|
+
nextMatch: S,
|
|
578
579
|
prevMatch: D,
|
|
579
580
|
currentMatchElement: P,
|
|
580
581
|
setCurrentMatchElement: R
|
|
581
582
|
};
|
|
582
|
-
}, cn =
|
|
583
|
+
}, cn = We({
|
|
583
584
|
search: "",
|
|
584
585
|
setSearch: (e) => {
|
|
585
586
|
},
|
|
@@ -597,7 +598,7 @@ const Hr = () => {
|
|
|
597
598
|
currentMatchElement: null,
|
|
598
599
|
setCurrentMatchElement: (e) => {
|
|
599
600
|
}
|
|
600
|
-
}),
|
|
601
|
+
}), Gs = ({
|
|
601
602
|
children: e,
|
|
602
603
|
initialSearch: t
|
|
603
604
|
}) => {
|
|
@@ -613,7 +614,7 @@ const Hr = () => {
|
|
|
613
614
|
prevMatch: u,
|
|
614
615
|
currentMatchElement: m,
|
|
615
616
|
setCurrentMatchElement: g
|
|
616
|
-
} =
|
|
617
|
+
} = Vr(n, t);
|
|
617
618
|
return /* @__PURE__ */ s(
|
|
618
619
|
cn.Provider,
|
|
619
620
|
{
|
|
@@ -635,7 +636,7 @@ const Hr = () => {
|
|
|
635
636
|
children: e
|
|
636
637
|
}
|
|
637
638
|
);
|
|
638
|
-
}, ln = () =>
|
|
639
|
+
}, ln = () => He(cn), le = {
|
|
639
640
|
"rp-pages": "_rp-pages_34orh_1",
|
|
640
641
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_34orh_7",
|
|
641
642
|
"rp-pages-container": "_rp-pages-container_34orh_11",
|
|
@@ -647,8 +648,8 @@ const Hr = () => {
|
|
|
647
648
|
"rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
|
|
648
649
|
"rp-page": "_rp-page_h7a2q_1",
|
|
649
650
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
650
|
-
},
|
|
651
|
-
const { pageNumber: t, onLoaded: n, onLoading: r } = e, o = $(null), { pages: a } = ne(), { rotate: c } =
|
|
651
|
+
}, Ur = (e) => {
|
|
652
|
+
const { pageNumber: t, onLoaded: n, onLoading: r } = e, o = $(null), { pages: a } = ne(), { rotate: c } = Ge(), i = $(), { currentZoom: l } = Ve();
|
|
652
653
|
return F(() => {
|
|
653
654
|
if (!a || l === 0)
|
|
654
655
|
return;
|
|
@@ -668,10 +669,10 @@ const Hr = () => {
|
|
|
668
669
|
}, Je = {
|
|
669
670
|
"rp-text-layer": "_rp-text-layer_1mgyz_1",
|
|
670
671
|
"rp-text-layer-text": "_rp-text-layer-text_1mgyz_9"
|
|
671
|
-
},
|
|
672
|
+
}, qr = (e) => {
|
|
672
673
|
const { pageNumber: t } = e, { pages: n } = ne(), r = $(null), { matches: o, currentMatch: a, setCurrentMatchElement: c } = ln(), [i, l] = W(
|
|
673
674
|
[]
|
|
674
|
-
), p = $(), h = $(), f = $(), u = A(() => o.filter((g) => g.pageIndex === t - 1), [o, t]), m =
|
|
675
|
+
), p = $(), h = $(), f = $(), u = A(() => o.filter((g) => g.pageIndex === t - 1), [o, t]), m = N(
|
|
675
676
|
(g, _, v = !1) => {
|
|
676
677
|
if (v && jn(g, _), !u.length) {
|
|
677
678
|
f.current = void 0, l([]);
|
|
@@ -705,8 +706,8 @@ const Hr = () => {
|
|
|
705
706
|
}), h.current = _, r.current && (r.current.innerText = ""), p.current.render();
|
|
706
707
|
}).then(() => {
|
|
707
708
|
var C;
|
|
708
|
-
[].slice.call(r.current.children).forEach((
|
|
709
|
-
|
|
709
|
+
[].slice.call(r.current.children).forEach((y) => {
|
|
710
|
+
y.classList.add(Je["rp-text-layer-text"]);
|
|
710
711
|
});
|
|
711
712
|
const v = (C = p.current) == null ? void 0 : C.textDivs;
|
|
712
713
|
v && h.current && m(h.current, v);
|
|
@@ -730,16 +731,16 @@ const Hr = () => {
|
|
|
730
731
|
ref: r
|
|
731
732
|
}
|
|
732
733
|
);
|
|
733
|
-
},
|
|
734
|
+
}, Zr = {
|
|
734
735
|
"rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
|
|
735
736
|
}, un = ["click", "dblclick", "mouseover", "input", "change"];
|
|
736
|
-
let
|
|
737
|
+
let jr = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
737
738
|
const ct = /* @__PURE__ */ new Map(), dn = (e, t) => `${e.loadingTask.docId}___${t.num}R${t.gen === 0 ? "" : t.gen}`;
|
|
738
|
-
function
|
|
739
|
+
function Br(e, t) {
|
|
739
740
|
const n = dn(e, t);
|
|
740
741
|
return ct.has(n) ? ct.get(n) ?? null : null;
|
|
741
742
|
}
|
|
742
|
-
const
|
|
743
|
+
const Kr = (e, t, n) => {
|
|
743
744
|
ct.set(dn(e, t), n);
|
|
744
745
|
}, Rt = (e, t) => {
|
|
745
746
|
switch (t[1].name) {
|
|
@@ -778,16 +779,16 @@ const Br = (e, t, n) => {
|
|
|
778
779
|
async function pn(e, t) {
|
|
779
780
|
let n;
|
|
780
781
|
if (typeof t == "string" ? n = await e.getDestination(t) : n = t, n && typeof n[0] == "object" && n[0] !== null) {
|
|
781
|
-
const r = n[0], o =
|
|
782
|
+
const r = n[0], o = Br(e, r);
|
|
782
783
|
if (o === null) {
|
|
783
784
|
const a = await e.getPageIndex(r);
|
|
784
|
-
return
|
|
785
|
+
return Kr(e, r, a), await pn(e, n);
|
|
785
786
|
} else
|
|
786
787
|
return Rt(o, n);
|
|
787
788
|
} else
|
|
788
789
|
return Rt(n[0], n);
|
|
789
790
|
}
|
|
790
|
-
function
|
|
791
|
+
function Xr(e) {
|
|
791
792
|
const { id: t, url: n, unsafeUrl: r } = e;
|
|
792
793
|
new MutationObserver((a, c) => {
|
|
793
794
|
const i = document.querySelector(`[data-annotation-id="${t}"]`);
|
|
@@ -797,7 +798,7 @@ function Kr(e) {
|
|
|
797
798
|
}
|
|
798
799
|
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
799
800
|
}
|
|
800
|
-
const
|
|
801
|
+
const Jr = (e) => {
|
|
801
802
|
const n = e.target.parentNode;
|
|
802
803
|
if (!n)
|
|
803
804
|
return;
|
|
@@ -824,7 +825,7 @@ const Xr = (e) => {
|
|
|
824
825
|
attributes: !0
|
|
825
826
|
// Watch for changes to attributes
|
|
826
827
|
}), () => r.disconnect();
|
|
827
|
-
},
|
|
828
|
+
}, Nt = (e, t, n, r) => {
|
|
828
829
|
if (e.type !== "click")
|
|
829
830
|
return;
|
|
830
831
|
const o = e.target, a = o.getAttribute("data-element-id"), c = o.getAttribute("href");
|
|
@@ -835,16 +836,16 @@ const Xr = (e) => {
|
|
|
835
836
|
r(l);
|
|
836
837
|
});
|
|
837
838
|
};
|
|
838
|
-
function
|
|
839
|
+
function Yr(e, t) {
|
|
839
840
|
for (const n of un)
|
|
840
841
|
e.addEventListener(n, t);
|
|
841
842
|
}
|
|
842
|
-
function
|
|
843
|
+
function Lt(e, t) {
|
|
843
844
|
for (const n of un)
|
|
844
845
|
e.removeEventListener(n, t);
|
|
845
846
|
}
|
|
846
|
-
const
|
|
847
|
-
const { pageNumber: t } = e, n = $(null), { pages: r, pdf: o } = ne(), a = $(), [c, i] = W(), { setFocusedPage: l, goToPage: p } = oe(), { scrollMode: h } =
|
|
847
|
+
const Qr = (e) => {
|
|
848
|
+
const { pageNumber: t } = e, n = $(null), { pages: r, pdf: o } = ne(), a = $(), [c, i] = W(), { setFocusedPage: l, goToPage: p } = oe(), { scrollMode: h } = Pe(), f = A(() => r.get(t), [r, t]), u = A(() => f == null ? void 0 : f.page.getViewport(), [f]);
|
|
848
849
|
F(() => {
|
|
849
850
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
850
851
|
}, [o]);
|
|
@@ -854,9 +855,9 @@ const Yr = (e) => {
|
|
|
854
855
|
a.current = void 0, i(_), n.current && (n.current.innerText = "");
|
|
855
856
|
});
|
|
856
857
|
}, [f]);
|
|
857
|
-
const g =
|
|
858
|
+
const g = N(
|
|
858
859
|
(_) => {
|
|
859
|
-
|
|
860
|
+
Jr(_), !(!c || !o) && (h === J.PAGE_SCROLLING ? Nt(_, c, o, (v) => l(v.pageIndex + 1)) : Nt(_, c, o, (v) => p(v.pageIndex + 1)));
|
|
860
861
|
},
|
|
861
862
|
[o, c, p, l, h]
|
|
862
863
|
);
|
|
@@ -871,10 +872,10 @@ const Yr = (e) => {
|
|
|
871
872
|
return;
|
|
872
873
|
}
|
|
873
874
|
for (const C of c) {
|
|
874
|
-
const { annotationType:
|
|
875
|
-
switch (
|
|
875
|
+
const { annotationType: y } = C;
|
|
876
|
+
switch (y) {
|
|
876
877
|
case at.Link:
|
|
877
|
-
|
|
878
|
+
Xr(C);
|
|
878
879
|
break;
|
|
879
880
|
case at.Widget:
|
|
880
881
|
break;
|
|
@@ -889,38 +890,38 @@ const Yr = (e) => {
|
|
|
889
890
|
structTreeLayer: void 0,
|
|
890
891
|
page: f.page,
|
|
891
892
|
viewport: _.clone({ dontFlip: !0 })
|
|
892
|
-
}), n.current &&
|
|
893
|
-
const C = await (o == null ? void 0 : o.hasJSActions()),
|
|
893
|
+
}), n.current && Lt(n.current, g);
|
|
894
|
+
const C = await (o == null ? void 0 : o.hasJSActions()), y = await (o == null ? void 0 : o.getFieldObjects());
|
|
894
895
|
return a.current.render({
|
|
895
896
|
annotations: c,
|
|
896
897
|
annotationStorage: m,
|
|
897
898
|
hasJSActions: C,
|
|
898
|
-
fieldObjects:
|
|
899
|
+
fieldObjects: y,
|
|
899
900
|
div: n.current,
|
|
900
901
|
viewport: _.clone({ dontFlip: !0 }),
|
|
901
902
|
page: f.page,
|
|
902
|
-
imageResourcesPath:
|
|
903
|
+
imageResourcesPath: jr,
|
|
903
904
|
renderForms: !1,
|
|
904
905
|
linkService: new sr(),
|
|
905
906
|
downloadManager: null,
|
|
906
907
|
enableScripting: !1
|
|
907
908
|
});
|
|
908
909
|
})().then(() => {
|
|
909
|
-
n.current &&
|
|
910
|
+
n.current && Yr(n.current, g);
|
|
910
911
|
}), () => {
|
|
911
|
-
n.current &&
|
|
912
|
+
n.current && Lt(n.current, g);
|
|
912
913
|
};
|
|
913
914
|
}, [o, c, g]), /* @__PURE__ */ s(
|
|
914
915
|
"div",
|
|
915
916
|
{
|
|
916
917
|
"data-rp": `page-${t}-annotationLayer`,
|
|
917
918
|
style: { width: `${u == null ? void 0 : u.width}px`, height: `${u == null ? void 0 : u.height}px` },
|
|
918
|
-
className:
|
|
919
|
+
className: Zr["rp-annotation-layer"],
|
|
919
920
|
ref: n
|
|
920
921
|
}
|
|
921
922
|
);
|
|
922
|
-
},
|
|
923
|
-
const { pageNumber: n, style: r, onIntersectRatioChange: o, ...a } = e, { pages: c } = ne(), { rotate: i } =
|
|
923
|
+
}, eo = Array.from({ length: 21 }, (e, t) => Number((t * 0.05).toFixed(2))), bt = $e((e, t) => {
|
|
924
|
+
const { pageNumber: n, style: r, onIntersectRatioChange: o, ...a } = e, { pages: c } = ne(), { rotate: i } = Ge(), { textLayer: l } = Gn(), { currentZoom: p } = Ve(), h = $(c.get(n)), [f, u] = W(!1), m = $(null), [g, _] = W({
|
|
924
925
|
width: 0,
|
|
925
926
|
height: 0
|
|
926
927
|
});
|
|
@@ -940,9 +941,9 @@ const Yr = (e) => {
|
|
|
940
941
|
default:
|
|
941
942
|
return "center";
|
|
942
943
|
}
|
|
943
|
-
}, [i, g]), C =
|
|
944
|
+
}, [i, g]), C = N(() => {
|
|
944
945
|
u(!0);
|
|
945
|
-
}, []),
|
|
946
|
+
}, []), y = N(() => {
|
|
946
947
|
u(!1);
|
|
947
948
|
}, []);
|
|
948
949
|
return F(() => {
|
|
@@ -950,7 +951,7 @@ const Yr = (e) => {
|
|
|
950
951
|
(R) => {
|
|
951
952
|
o && o(n, R[0].intersectionRatio);
|
|
952
953
|
},
|
|
953
|
-
{ threshold:
|
|
954
|
+
{ threshold: eo }
|
|
954
955
|
);
|
|
955
956
|
return m.current && P.observe(m.current), () => {
|
|
956
957
|
P.disconnect(), o && o(n, -1);
|
|
@@ -978,10 +979,10 @@ const Yr = (e) => {
|
|
|
978
979
|
},
|
|
979
980
|
className: Xe["rp-page"],
|
|
980
981
|
children: [
|
|
981
|
-
/* @__PURE__ */ s(
|
|
982
|
+
/* @__PURE__ */ s(Ur, { onLoading: C, onLoaded: y, pageNumber: n }),
|
|
982
983
|
f && /* @__PURE__ */ s("div", { className: Xe["rp-loader-wrapper"], children: /* @__PURE__ */ s(mt, {}) }),
|
|
983
|
-
l && /* @__PURE__ */ s(
|
|
984
|
-
/* @__PURE__ */ s(
|
|
984
|
+
l && /* @__PURE__ */ s(qr, { pageNumber: n }),
|
|
985
|
+
/* @__PURE__ */ s(Qr, { pageNumber: n })
|
|
985
986
|
]
|
|
986
987
|
}
|
|
987
988
|
)
|
|
@@ -998,7 +999,7 @@ function lt() {
|
|
|
998
999
|
return e;
|
|
999
1000
|
}, lt.apply(null, arguments);
|
|
1000
1001
|
}
|
|
1001
|
-
function
|
|
1002
|
+
function Mt(e) {
|
|
1002
1003
|
if (e === void 0)
|
|
1003
1004
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1004
1005
|
return e;
|
|
@@ -1008,25 +1009,25 @@ function ut(e, t) {
|
|
|
1008
1009
|
return n.__proto__ = r, n;
|
|
1009
1010
|
}, ut(e, t);
|
|
1010
1011
|
}
|
|
1011
|
-
function
|
|
1012
|
+
function to(e, t) {
|
|
1012
1013
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ut(e, t);
|
|
1013
1014
|
}
|
|
1014
1015
|
var Et = Number.isNaN || function(t) {
|
|
1015
1016
|
return typeof t == "number" && t !== t;
|
|
1016
1017
|
};
|
|
1017
|
-
function
|
|
1018
|
+
function no(e, t) {
|
|
1018
1019
|
return !!(e === t || Et(e) && Et(t));
|
|
1019
1020
|
}
|
|
1020
|
-
function
|
|
1021
|
+
function ro(e, t) {
|
|
1021
1022
|
if (e.length !== t.length)
|
|
1022
1023
|
return !1;
|
|
1023
1024
|
for (var n = 0; n < e.length; n++)
|
|
1024
|
-
if (!
|
|
1025
|
+
if (!no(e[n], t[n]))
|
|
1025
1026
|
return !1;
|
|
1026
1027
|
return !0;
|
|
1027
1028
|
}
|
|
1028
1029
|
function Ye(e, t) {
|
|
1029
|
-
t === void 0 && (t =
|
|
1030
|
+
t === void 0 && (t = ro);
|
|
1030
1031
|
var n, r = [], o, a = !1;
|
|
1031
1032
|
function c() {
|
|
1032
1033
|
for (var i = [], l = 0; l < arguments.length; l++)
|
|
@@ -1047,7 +1048,7 @@ function Ot(e, t) {
|
|
|
1047
1048
|
}
|
|
1048
1049
|
return n;
|
|
1049
1050
|
}
|
|
1050
|
-
var
|
|
1051
|
+
var oo = typeof performance == "object" && typeof performance.now == "function", Dt = oo ? function() {
|
|
1051
1052
|
return performance.now();
|
|
1052
1053
|
} : function() {
|
|
1053
1054
|
return Date.now();
|
|
@@ -1055,7 +1056,7 @@ var ro = typeof performance == "object" && typeof performance.now == "function",
|
|
|
1055
1056
|
function At(e) {
|
|
1056
1057
|
cancelAnimationFrame(e.id);
|
|
1057
1058
|
}
|
|
1058
|
-
function
|
|
1059
|
+
function ao(e, t) {
|
|
1059
1060
|
var n = Dt();
|
|
1060
1061
|
function r() {
|
|
1061
1062
|
Dt() - n >= t ? e.call(null) : o.id = requestAnimationFrame(r);
|
|
@@ -1066,88 +1067,88 @@ function oo(e, t) {
|
|
|
1066
1067
|
return o;
|
|
1067
1068
|
}
|
|
1068
1069
|
var Qe = -1;
|
|
1069
|
-
function
|
|
1070
|
+
function so(e) {
|
|
1070
1071
|
if (e === void 0 && (e = !1), Qe === -1 || e) {
|
|
1071
1072
|
var t = document.createElement("div"), n = t.style;
|
|
1072
1073
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), Qe = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
1073
1074
|
}
|
|
1074
1075
|
return Qe;
|
|
1075
1076
|
}
|
|
1076
|
-
var
|
|
1077
|
+
var be = null;
|
|
1077
1078
|
function zt(e) {
|
|
1078
|
-
if (e === void 0 && (e = !1),
|
|
1079
|
+
if (e === void 0 && (e = !1), be === null || e) {
|
|
1079
1080
|
var t = document.createElement("div"), n = t.style;
|
|
1080
1081
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
1081
1082
|
var r = document.createElement("div"), o = r.style;
|
|
1082
|
-
return o.width = "100px", o.height = "100px", t.appendChild(r), document.body.appendChild(t), t.scrollLeft > 0 ?
|
|
1083
|
+
return o.width = "100px", o.height = "100px", t.appendChild(r), document.body.appendChild(t), t.scrollLeft > 0 ? be = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? be = "negative" : be = "positive-ascending"), document.body.removeChild(t), be;
|
|
1083
1084
|
}
|
|
1084
|
-
return
|
|
1085
|
+
return be;
|
|
1085
1086
|
}
|
|
1086
|
-
var
|
|
1087
|
+
var io = 150, co = function(t) {
|
|
1087
1088
|
var n = t.columnIndex;
|
|
1088
1089
|
t.data;
|
|
1089
1090
|
var r = t.rowIndex;
|
|
1090
1091
|
return r + ":" + n;
|
|
1091
|
-
},
|
|
1092
|
-
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (
|
|
1093
|
-
function
|
|
1092
|
+
}, Ee = null, Oe = null, De = null;
|
|
1093
|
+
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ee = /* @__PURE__ */ new WeakSet(), Oe = /* @__PURE__ */ new WeakSet(), De = /* @__PURE__ */ new WeakSet());
|
|
1094
|
+
function lo(e) {
|
|
1094
1095
|
var t, n = e.getColumnOffset, r = e.getColumnStartIndexForOffset, o = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, i = e.getEstimatedTotalWidth, l = e.getOffsetForColumnAndAlignment, p = e.getOffsetForRowAndAlignment, h = e.getRowHeight, f = e.getRowOffset, u = e.getRowStartIndexForOffset, m = e.getRowStopIndexForStartIndex, g = e.initInstanceProps, _ = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
|
|
1095
1096
|
return t = /* @__PURE__ */ function(C) {
|
|
1096
|
-
|
|
1097
|
-
function
|
|
1097
|
+
to(y, C);
|
|
1098
|
+
function y(R) {
|
|
1098
1099
|
var d;
|
|
1099
|
-
return d = C.call(this, R) || this, d._instanceProps = g(d.props,
|
|
1100
|
-
instance:
|
|
1100
|
+
return d = C.call(this, R) || this, d._instanceProps = g(d.props, Mt(d)), d._resetIsScrollingTimeoutId = null, d._outerRef = void 0, d.state = {
|
|
1101
|
+
instance: Mt(d),
|
|
1101
1102
|
isScrolling: !1,
|
|
1102
1103
|
horizontalScrollDirection: "forward",
|
|
1103
1104
|
scrollLeft: typeof d.props.initialScrollLeft == "number" ? d.props.initialScrollLeft : 0,
|
|
1104
1105
|
scrollTop: typeof d.props.initialScrollTop == "number" ? d.props.initialScrollTop : 0,
|
|
1105
1106
|
scrollUpdateWasRequested: !1,
|
|
1106
1107
|
verticalScrollDirection: "forward"
|
|
1107
|
-
}, d._callOnItemsRendered = void 0, d._callOnItemsRendered = Ye(function(b, w,
|
|
1108
|
+
}, d._callOnItemsRendered = void 0, d._callOnItemsRendered = Ye(function(b, w, S, D, I, T, E, x) {
|
|
1108
1109
|
return d.props.onItemsRendered({
|
|
1109
1110
|
overscanColumnStartIndex: b,
|
|
1110
1111
|
overscanColumnStopIndex: w,
|
|
1111
|
-
overscanRowStartIndex:
|
|
1112
|
+
overscanRowStartIndex: S,
|
|
1112
1113
|
overscanRowStopIndex: D,
|
|
1113
1114
|
visibleColumnStartIndex: I,
|
|
1114
|
-
visibleColumnStopIndex:
|
|
1115
|
+
visibleColumnStopIndex: T,
|
|
1115
1116
|
visibleRowStartIndex: E,
|
|
1116
1117
|
visibleRowStopIndex: x
|
|
1117
1118
|
});
|
|
1118
|
-
}), d._callOnScroll = void 0, d._callOnScroll = Ye(function(b, w,
|
|
1119
|
+
}), d._callOnScroll = void 0, d._callOnScroll = Ye(function(b, w, S, D, I) {
|
|
1119
1120
|
return d.props.onScroll({
|
|
1120
|
-
horizontalScrollDirection:
|
|
1121
|
+
horizontalScrollDirection: S,
|
|
1121
1122
|
scrollLeft: b,
|
|
1122
1123
|
scrollTop: w,
|
|
1123
1124
|
verticalScrollDirection: D,
|
|
1124
1125
|
scrollUpdateWasRequested: I
|
|
1125
1126
|
});
|
|
1126
1127
|
}), d._getItemStyle = void 0, d._getItemStyle = function(b, w) {
|
|
1127
|
-
var
|
|
1128
|
+
var S = d.props, D = S.columnWidth, I = S.direction, T = S.rowHeight, E = d._getItemStyleCache(_ && D, _ && I, _ && T), x = b + ":" + w, L;
|
|
1128
1129
|
if (E.hasOwnProperty(x))
|
|
1129
|
-
|
|
1130
|
+
L = E[x];
|
|
1130
1131
|
else {
|
|
1131
|
-
var
|
|
1132
|
-
E[x] =
|
|
1132
|
+
var M = n(d.props, w, d._instanceProps), k = I === "rtl";
|
|
1133
|
+
E[x] = L = {
|
|
1133
1134
|
position: "absolute",
|
|
1134
|
-
left: k ? void 0 :
|
|
1135
|
-
right: k ?
|
|
1135
|
+
left: k ? void 0 : M,
|
|
1136
|
+
right: k ? M : void 0,
|
|
1136
1137
|
top: f(d.props, b, d._instanceProps),
|
|
1137
1138
|
height: h(d.props, b, d._instanceProps),
|
|
1138
1139
|
width: a(d.props, w, d._instanceProps)
|
|
1139
1140
|
};
|
|
1140
1141
|
}
|
|
1141
|
-
return
|
|
1142
|
-
}, d._getItemStyleCache = void 0, d._getItemStyleCache = Ye(function(b, w,
|
|
1142
|
+
return L;
|
|
1143
|
+
}, d._getItemStyleCache = void 0, d._getItemStyleCache = Ye(function(b, w, S) {
|
|
1143
1144
|
return {};
|
|
1144
1145
|
}), d._onScroll = function(b) {
|
|
1145
|
-
var w = b.currentTarget,
|
|
1146
|
-
d.setState(function(
|
|
1147
|
-
if (
|
|
1146
|
+
var w = b.currentTarget, S = w.clientHeight, D = w.clientWidth, I = w.scrollLeft, T = w.scrollTop, E = w.scrollHeight, x = w.scrollWidth;
|
|
1147
|
+
d.setState(function(L) {
|
|
1148
|
+
if (L.scrollLeft === I && L.scrollTop === T)
|
|
1148
1149
|
return null;
|
|
1149
|
-
var
|
|
1150
|
-
if (
|
|
1150
|
+
var M = d.props.direction, k = I;
|
|
1151
|
+
if (M === "rtl")
|
|
1151
1152
|
switch (zt()) {
|
|
1152
1153
|
case "negative":
|
|
1153
1154
|
k = -I;
|
|
@@ -1157,13 +1158,13 @@ function co(e) {
|
|
|
1157
1158
|
break;
|
|
1158
1159
|
}
|
|
1159
1160
|
k = Math.max(0, Math.min(k, x - D));
|
|
1160
|
-
var G = Math.max(0, Math.min(
|
|
1161
|
+
var G = Math.max(0, Math.min(T, E - S));
|
|
1161
1162
|
return {
|
|
1162
1163
|
isScrolling: !0,
|
|
1163
|
-
horizontalScrollDirection:
|
|
1164
|
+
horizontalScrollDirection: L.scrollLeft < I ? "forward" : "backward",
|
|
1164
1165
|
scrollLeft: k,
|
|
1165
1166
|
scrollTop: G,
|
|
1166
|
-
verticalScrollDirection:
|
|
1167
|
+
verticalScrollDirection: L.scrollTop < T ? "forward" : "backward",
|
|
1167
1168
|
scrollUpdateWasRequested: !1
|
|
1168
1169
|
};
|
|
1169
1170
|
}, d._resetIsScrollingDebounced);
|
|
@@ -1171,7 +1172,7 @@ function co(e) {
|
|
|
1171
1172
|
var w = d.props.outerRef;
|
|
1172
1173
|
d._outerRef = b, typeof w == "function" ? w(b) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = b);
|
|
1173
1174
|
}, d._resetIsScrollingDebounced = function() {
|
|
1174
|
-
d._resetIsScrollingTimeoutId !== null && At(d._resetIsScrollingTimeoutId), d._resetIsScrollingTimeoutId =
|
|
1175
|
+
d._resetIsScrollingTimeoutId !== null && At(d._resetIsScrollingTimeoutId), d._resetIsScrollingTimeoutId = ao(d._resetIsScrolling, io);
|
|
1175
1176
|
}, d._resetIsScrolling = function() {
|
|
1176
1177
|
d._resetIsScrollingTimeoutId = null, d.setState({
|
|
1177
1178
|
isScrolling: !1
|
|
@@ -1180,38 +1181,38 @@ function co(e) {
|
|
|
1180
1181
|
});
|
|
1181
1182
|
}, d;
|
|
1182
1183
|
}
|
|
1183
|
-
|
|
1184
|
-
return
|
|
1184
|
+
y.getDerivedStateFromProps = function(d, b) {
|
|
1185
|
+
return uo(d, b), v(d), null;
|
|
1185
1186
|
};
|
|
1186
|
-
var P =
|
|
1187
|
+
var P = y.prototype;
|
|
1187
1188
|
return P.scrollTo = function(d) {
|
|
1188
1189
|
var b = d.scrollLeft, w = d.scrollTop;
|
|
1189
|
-
b !== void 0 && (b = Math.max(0, b)), w !== void 0 && (w = Math.max(0, w)), this.setState(function(
|
|
1190
|
-
return b === void 0 && (b =
|
|
1191
|
-
horizontalScrollDirection:
|
|
1190
|
+
b !== void 0 && (b = Math.max(0, b)), w !== void 0 && (w = Math.max(0, w)), this.setState(function(S) {
|
|
1191
|
+
return b === void 0 && (b = S.scrollLeft), w === void 0 && (w = S.scrollTop), S.scrollLeft === b && S.scrollTop === w ? null : {
|
|
1192
|
+
horizontalScrollDirection: S.scrollLeft < b ? "forward" : "backward",
|
|
1192
1193
|
scrollLeft: b,
|
|
1193
1194
|
scrollTop: w,
|
|
1194
1195
|
scrollUpdateWasRequested: !0,
|
|
1195
|
-
verticalScrollDirection:
|
|
1196
|
+
verticalScrollDirection: S.scrollTop < w ? "forward" : "backward"
|
|
1196
1197
|
};
|
|
1197
1198
|
}, this._resetIsScrollingDebounced);
|
|
1198
1199
|
}, P.scrollToItem = function(d) {
|
|
1199
|
-
var b = d.align, w = b === void 0 ? "auto" : b,
|
|
1200
|
-
|
|
1201
|
-
var Z = c(this.props, this._instanceProps), U = i(this.props, this._instanceProps), B = U >
|
|
1200
|
+
var b = d.align, w = b === void 0 ? "auto" : b, S = d.columnIndex, D = d.rowIndex, I = this.props, T = I.columnCount, E = I.height, x = I.rowCount, L = I.width, M = this.state, k = M.scrollLeft, G = M.scrollTop, q = so();
|
|
1201
|
+
S !== void 0 && (S = Math.max(0, Math.min(S, T - 1))), D !== void 0 && (D = Math.max(0, Math.min(D, x - 1)));
|
|
1202
|
+
var Z = c(this.props, this._instanceProps), U = i(this.props, this._instanceProps), B = U > L ? q : 0, re = Z > E ? q : 0;
|
|
1202
1203
|
this.scrollTo({
|
|
1203
|
-
scrollLeft:
|
|
1204
|
+
scrollLeft: S !== void 0 ? l(this.props, S, w, k, this._instanceProps, re) : k,
|
|
1204
1205
|
scrollTop: D !== void 0 ? p(this.props, D, w, G, this._instanceProps, B) : G
|
|
1205
1206
|
});
|
|
1206
1207
|
}, P.componentDidMount = function() {
|
|
1207
1208
|
var d = this.props, b = d.initialScrollLeft, w = d.initialScrollTop;
|
|
1208
1209
|
if (this._outerRef != null) {
|
|
1209
|
-
var
|
|
1210
|
-
typeof b == "number" && (
|
|
1210
|
+
var S = this._outerRef;
|
|
1211
|
+
typeof b == "number" && (S.scrollLeft = b), typeof w == "number" && (S.scrollTop = w);
|
|
1211
1212
|
}
|
|
1212
1213
|
this._callPropsCallbacks();
|
|
1213
1214
|
}, P.componentDidUpdate = function() {
|
|
1214
|
-
var d = this.props.direction, b = this.state, w = b.scrollLeft,
|
|
1215
|
+
var d = this.props.direction, b = this.state, w = b.scrollLeft, S = b.scrollTop, D = b.scrollUpdateWasRequested;
|
|
1215
1216
|
if (D && this._outerRef != null) {
|
|
1216
1217
|
var I = this._outerRef;
|
|
1217
1218
|
if (d === "rtl")
|
|
@@ -1223,36 +1224,36 @@ function co(e) {
|
|
|
1223
1224
|
I.scrollLeft = w;
|
|
1224
1225
|
break;
|
|
1225
1226
|
default:
|
|
1226
|
-
var
|
|
1227
|
-
I.scrollLeft = E -
|
|
1227
|
+
var T = I.clientWidth, E = I.scrollWidth;
|
|
1228
|
+
I.scrollLeft = E - T - w;
|
|
1228
1229
|
break;
|
|
1229
1230
|
}
|
|
1230
1231
|
else
|
|
1231
1232
|
I.scrollLeft = Math.max(0, w);
|
|
1232
|
-
I.scrollTop = Math.max(0,
|
|
1233
|
+
I.scrollTop = Math.max(0, S);
|
|
1233
1234
|
}
|
|
1234
1235
|
this._callPropsCallbacks();
|
|
1235
1236
|
}, P.componentWillUnmount = function() {
|
|
1236
1237
|
this._resetIsScrollingTimeoutId !== null && At(this._resetIsScrollingTimeoutId);
|
|
1237
1238
|
}, P.render = function() {
|
|
1238
|
-
var d = this.props, b = d.children, w = d.className,
|
|
1239
|
-
if (
|
|
1239
|
+
var d = this.props, b = d.children, w = d.className, S = d.columnCount, D = d.direction, I = d.height, T = d.innerRef, E = d.innerElementType, x = d.innerTagName, L = d.itemData, M = d.itemKey, k = M === void 0 ? co : M, G = d.outerElementType, q = d.outerTagName, Z = d.rowCount, U = d.style, B = d.useIsScrolling, re = d.width, pe = this.state.isScrolling, K = this._getHorizontalRangeToRender(), Y = K[0], z = K[1], H = this._getVerticalRangeToRender(), j = H[0], se = H[1], Se = [];
|
|
1240
|
+
if (S > 0 && Z)
|
|
1240
1241
|
for (var me = j; me <= se; me++)
|
|
1241
1242
|
for (var fe = Y; fe <= z; fe++)
|
|
1242
|
-
Se.push(
|
|
1243
|
+
Se.push(Me(b, {
|
|
1243
1244
|
columnIndex: fe,
|
|
1244
|
-
data:
|
|
1245
|
+
data: L,
|
|
1245
1246
|
isScrolling: B ? pe : void 0,
|
|
1246
1247
|
key: k({
|
|
1247
1248
|
columnIndex: fe,
|
|
1248
|
-
data:
|
|
1249
|
+
data: L,
|
|
1249
1250
|
rowIndex: me
|
|
1250
1251
|
}),
|
|
1251
1252
|
rowIndex: me,
|
|
1252
1253
|
style: this._getItemStyle(me, fe)
|
|
1253
1254
|
}));
|
|
1254
|
-
var
|
|
1255
|
-
return
|
|
1255
|
+
var Ze = c(this.props, this._instanceProps), je = i(this.props, this._instanceProps);
|
|
1256
|
+
return Me(G || q || "div", {
|
|
1256
1257
|
className: w,
|
|
1257
1258
|
onScroll: this._onScroll,
|
|
1258
1259
|
ref: this._outerRefSetter,
|
|
@@ -1265,48 +1266,48 @@ function co(e) {
|
|
|
1265
1266
|
willChange: "transform",
|
|
1266
1267
|
direction: D
|
|
1267
1268
|
}, U)
|
|
1268
|
-
},
|
|
1269
|
+
}, Me(E || x || "div", {
|
|
1269
1270
|
children: Se,
|
|
1270
|
-
ref:
|
|
1271
|
+
ref: T,
|
|
1271
1272
|
style: {
|
|
1272
|
-
height:
|
|
1273
|
+
height: Ze,
|
|
1273
1274
|
pointerEvents: pe ? "none" : void 0,
|
|
1274
|
-
width:
|
|
1275
|
+
width: je
|
|
1275
1276
|
}
|
|
1276
1277
|
}));
|
|
1277
1278
|
}, P._callPropsCallbacks = function() {
|
|
1278
|
-
var d = this.props, b = d.columnCount, w = d.onItemsRendered,
|
|
1279
|
+
var d = this.props, b = d.columnCount, w = d.onItemsRendered, S = d.onScroll, D = d.rowCount;
|
|
1279
1280
|
if (typeof w == "function" && b > 0 && D > 0) {
|
|
1280
|
-
var I = this._getHorizontalRangeToRender(),
|
|
1281
|
-
this._callOnItemsRendered(
|
|
1281
|
+
var I = this._getHorizontalRangeToRender(), T = I[0], E = I[1], x = I[2], L = I[3], M = this._getVerticalRangeToRender(), k = M[0], G = M[1], q = M[2], Z = M[3];
|
|
1282
|
+
this._callOnItemsRendered(T, E, k, G, x, L, q, Z);
|
|
1282
1283
|
}
|
|
1283
|
-
if (typeof
|
|
1284
|
+
if (typeof S == "function") {
|
|
1284
1285
|
var U = this.state, B = U.horizontalScrollDirection, re = U.scrollLeft, pe = U.scrollTop, K = U.scrollUpdateWasRequested, Y = U.verticalScrollDirection;
|
|
1285
1286
|
this._callOnScroll(re, pe, B, Y, K);
|
|
1286
1287
|
}
|
|
1287
1288
|
}, P._getHorizontalRangeToRender = function() {
|
|
1288
|
-
var d = this.props, b = d.columnCount, w = d.overscanColumnCount,
|
|
1289
|
+
var d = this.props, b = d.columnCount, w = d.overscanColumnCount, S = d.overscanColumnsCount, D = d.overscanCount, I = d.rowCount, T = this.state, E = T.horizontalScrollDirection, x = T.isScrolling, L = T.scrollLeft, M = w || S || D || 1;
|
|
1289
1290
|
if (b === 0 || I === 0)
|
|
1290
1291
|
return [0, 0, 0, 0];
|
|
1291
|
-
var k = r(this.props,
|
|
1292
|
+
var k = r(this.props, L, this._instanceProps), G = o(this.props, k, L, this._instanceProps), q = !x || E === "backward" ? Math.max(1, M) : 1, Z = !x || E === "forward" ? Math.max(1, M) : 1;
|
|
1292
1293
|
return [Math.max(0, k - q), Math.max(0, Math.min(b - 1, G + Z)), k, G];
|
|
1293
1294
|
}, P._getVerticalRangeToRender = function() {
|
|
1294
|
-
var d = this.props, b = d.columnCount, w = d.overscanCount,
|
|
1295
|
+
var d = this.props, b = d.columnCount, w = d.overscanCount, S = d.overscanRowCount, D = d.overscanRowsCount, I = d.rowCount, T = this.state, E = T.isScrolling, x = T.verticalScrollDirection, L = T.scrollTop, M = S || D || w || 1;
|
|
1295
1296
|
if (b === 0 || I === 0)
|
|
1296
1297
|
return [0, 0, 0, 0];
|
|
1297
|
-
var k = u(this.props,
|
|
1298
|
+
var k = u(this.props, L, this._instanceProps), G = m(this.props, k, L, this._instanceProps), q = !E || x === "backward" ? Math.max(1, M) : 1, Z = !E || x === "forward" ? Math.max(1, M) : 1;
|
|
1298
1299
|
return [Math.max(0, k - q), Math.max(0, Math.min(I - 1, G + Z)), k, G];
|
|
1299
|
-
},
|
|
1300
|
+
}, y;
|
|
1300
1301
|
}(kn), t.defaultProps = {
|
|
1301
1302
|
direction: "ltr",
|
|
1302
1303
|
itemData: void 0,
|
|
1303
1304
|
useIsScrolling: !1
|
|
1304
1305
|
}, t;
|
|
1305
1306
|
}
|
|
1306
|
-
var
|
|
1307
|
+
var uo = function(t, n) {
|
|
1307
1308
|
var r = t.children, o = t.direction, a = t.height, c = t.innerTagName, i = t.outerTagName, l = t.overscanColumnsCount, p = t.overscanCount, h = t.overscanRowsCount, f = t.width, u = n.instance;
|
|
1308
1309
|
if (process.env.NODE_ENV !== "production") {
|
|
1309
|
-
if (typeof p == "number" &&
|
|
1310
|
+
if (typeof p == "number" && Ee && !Ee.has(u) && (Ee.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof l == "number" || typeof h == "number") && Oe && !Oe.has(u) && (Oe.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || i != null) && De && !De.has(u) && (De.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
|
|
1310
1311
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
|
|
1311
1312
|
switch (o) {
|
|
1312
1313
|
case "ltr":
|
|
@@ -1358,7 +1359,7 @@ var lo = function(t, n) {
|
|
|
1358
1359
|
var a, c;
|
|
1359
1360
|
t === "column" ? (a = r.columnMetadataMap, c = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, c = r.lastMeasuredRowIndex);
|
|
1360
1361
|
var i = c > 0 ? a[c].offset : 0;
|
|
1361
|
-
return i >= o ? fn(t, n, r, c, 0, o) :
|
|
1362
|
+
return i >= o ? fn(t, n, r, c, 0, o) : po(t, n, r, Math.max(0, c), o);
|
|
1362
1363
|
}, fn = function(t, n, r, o, a, c) {
|
|
1363
1364
|
for (; a <= o; ) {
|
|
1364
1365
|
var i = a + Math.floor((o - a) / 2), l = ue(t, n, i, r).offset;
|
|
@@ -1367,7 +1368,7 @@ var lo = function(t, n) {
|
|
|
1367
1368
|
l < c ? a = i + 1 : l > c && (o = i - 1);
|
|
1368
1369
|
}
|
|
1369
1370
|
return a > 0 ? a - 1 : 0;
|
|
1370
|
-
},
|
|
1371
|
+
}, po = function(t, n, r, o, a) {
|
|
1371
1372
|
for (var c = t === "column" ? n.columnCount : n.rowCount, i = 1; o < c && ue(t, n, o, r).offset < a; )
|
|
1372
1373
|
o += i, i *= 2;
|
|
1373
1374
|
return fn(t, n, r, Math.min(o, c - 1), Math.floor(o / 2), a);
|
|
@@ -1384,7 +1385,7 @@ var lo = function(t, n) {
|
|
|
1384
1385
|
default:
|
|
1385
1386
|
return a >= u && a <= f ? a : u > f || a < u ? u : f;
|
|
1386
1387
|
}
|
|
1387
|
-
},
|
|
1388
|
+
}, ho = /* @__PURE__ */ lo({
|
|
1388
1389
|
getColumnOffset: function(t, n, r) {
|
|
1389
1390
|
return ue("column", t, n, r).offset;
|
|
1390
1391
|
},
|
|
@@ -1466,19 +1467,19 @@ function Ht(e, t) {
|
|
|
1466
1467
|
return !0;
|
|
1467
1468
|
return !1;
|
|
1468
1469
|
}
|
|
1469
|
-
var
|
|
1470
|
-
function
|
|
1471
|
-
var n = e.style, r = Ot(e,
|
|
1470
|
+
var mo = ["style"], fo = ["style"];
|
|
1471
|
+
function go(e, t) {
|
|
1472
|
+
var n = e.style, r = Ot(e, mo), o = t.style, a = Ot(t, fo);
|
|
1472
1473
|
return !Ht(n, o) && !Ht(r, a);
|
|
1473
1474
|
}
|
|
1474
|
-
const
|
|
1475
|
-
const { viewMode: e } =
|
|
1475
|
+
const vo = () => {
|
|
1476
|
+
const { viewMode: e } = Ue(), { scrollMode: t } = Pe(), { setColumnCount: n } = Bt(), { virtualScrollableElementRef: r } = qe(), o = ht(), a = N(
|
|
1476
1477
|
(m) => o.widths[m] || 0,
|
|
1477
1478
|
[o]
|
|
1478
|
-
), c =
|
|
1479
|
+
), c = N(
|
|
1479
1480
|
(m) => o.heights[m] || 0,
|
|
1480
1481
|
[o]
|
|
1481
|
-
), i = A(() => o.heights.length, [o]), l = A(() => Math.max(...o.widths), [o]), p = A(() => t === J.HORIZONTAL_SCROLLING ? i : e ===
|
|
1482
|
+
), i = A(() => o.heights.length, [o]), l = A(() => Math.max(...o.widths), [o]), p = A(() => t === J.HORIZONTAL_SCROLLING ? i : e === ze.DUAL_PAGE ? 2 : 1, [e, t, t, i, r, l]);
|
|
1482
1483
|
F(() => {
|
|
1483
1484
|
n(p);
|
|
1484
1485
|
}, [p, n]);
|
|
@@ -1509,22 +1510,22 @@ tt == null || Vt == null ? (dt = et, pt = function(t) {
|
|
|
1509
1510
|
}, $t);
|
|
1510
1511
|
return [n, r];
|
|
1511
1512
|
});
|
|
1512
|
-
function
|
|
1513
|
+
function _o(e) {
|
|
1513
1514
|
let t, n, r, o, a, c, i;
|
|
1514
1515
|
const l = typeof document < "u" && document.attachEvent;
|
|
1515
1516
|
if (!l) {
|
|
1516
1517
|
c = function(C) {
|
|
1517
|
-
const
|
|
1518
|
+
const y = C.__resizeTriggers__, P = y.firstElementChild, R = y.lastElementChild, d = P.firstElementChild;
|
|
1518
1519
|
R.scrollLeft = R.scrollWidth, R.scrollTop = R.scrollHeight, d.style.width = P.offsetWidth + 1 + "px", d.style.height = P.offsetHeight + 1 + "px", P.scrollLeft = P.scrollWidth, P.scrollTop = P.scrollHeight;
|
|
1519
1520
|
}, a = function(C) {
|
|
1520
1521
|
return C.offsetWidth !== C.__resizeLast__.width || C.offsetHeight !== C.__resizeLast__.height;
|
|
1521
1522
|
}, i = function(C) {
|
|
1522
1523
|
if (C.target.className && typeof C.target.className.indexOf == "function" && C.target.className.indexOf("contract-trigger") < 0 && C.target.className.indexOf("expand-trigger") < 0)
|
|
1523
1524
|
return;
|
|
1524
|
-
const
|
|
1525
|
+
const y = this;
|
|
1525
1526
|
c(this), this.__resizeRAF__ && dt(this.__resizeRAF__), this.__resizeRAF__ = pt(function() {
|
|
1526
|
-
a(
|
|
1527
|
-
d.call(
|
|
1527
|
+
a(y) && (y.__resizeLast__.width = y.offsetWidth, y.__resizeLast__.height = y.offsetHeight, y.__resizeListeners__.forEach(function(d) {
|
|
1528
|
+
d.call(y, C);
|
|
1528
1529
|
}));
|
|
1529
1530
|
});
|
|
1530
1531
|
};
|
|
@@ -1535,9 +1536,9 @@ function vo(e) {
|
|
|
1535
1536
|
{
|
|
1536
1537
|
const C = document.createElement("fakeelement");
|
|
1537
1538
|
if (C.style.animationName !== void 0 && (u = !0), u === !1) {
|
|
1538
|
-
for (let
|
|
1539
|
-
if (C.style[g[
|
|
1540
|
-
v = g[
|
|
1539
|
+
for (let y = 0; y < g.length; y++)
|
|
1540
|
+
if (C.style[g[y] + "AnimationName"] !== void 0) {
|
|
1541
|
+
v = g[y], m = "-" + v.toLowerCase() + "-", r = _[y], u = !0;
|
|
1541
1542
|
break;
|
|
1542
1543
|
}
|
|
1543
1544
|
}
|
|
@@ -1581,7 +1582,7 @@ function vo(e) {
|
|
|
1581
1582
|
}
|
|
1582
1583
|
};
|
|
1583
1584
|
}
|
|
1584
|
-
class
|
|
1585
|
+
class wo extends Wn {
|
|
1585
1586
|
constructor(...t) {
|
|
1586
1587
|
super(...t), this.state = {
|
|
1587
1588
|
height: this.props.defaultHeight || 0,
|
|
@@ -1622,7 +1623,7 @@ class _o extends Wn {
|
|
|
1622
1623
|
const r = n.ownerDocument.defaultView.ResizeObserver;
|
|
1623
1624
|
r != null ? (this._resizeObserver = new r(() => {
|
|
1624
1625
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1625
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1626
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = _o(t), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1626
1627
|
}
|
|
1627
1628
|
}
|
|
1628
1629
|
componentWillUnmount() {
|
|
@@ -1649,18 +1650,18 @@ class _o extends Wn {
|
|
|
1649
1650
|
} = this.state, v = {
|
|
1650
1651
|
overflow: "visible"
|
|
1651
1652
|
}, C = {};
|
|
1652
|
-
let
|
|
1653
|
-
return o || (u === 0 && (
|
|
1653
|
+
let y = !1;
|
|
1654
|
+
return o || (u === 0 && (y = !0), v.height = 0, C.height = u, C.scaledHeight = m), a || (_ === 0 && (y = !0), v.width = 0, C.width = _, C.scaledWidth = g), c && (y = !1), Me(h, {
|
|
1654
1655
|
ref: this._setRef,
|
|
1655
1656
|
style: {
|
|
1656
1657
|
...v,
|
|
1657
1658
|
...p
|
|
1658
1659
|
},
|
|
1659
1660
|
...f
|
|
1660
|
-
}, !
|
|
1661
|
+
}, !y && t(C));
|
|
1661
1662
|
}
|
|
1662
1663
|
}
|
|
1663
|
-
const
|
|
1664
|
+
const bo = ({ widths: e, heights: t }) => {
|
|
1664
1665
|
const { focusedPage: n, totalPages: r } = oe(), o = A(() => {
|
|
1665
1666
|
const i = [], l = Math.ceil(n / 2) * 2 - 1;
|
|
1666
1667
|
if (i.push(l), l + 1 < r) {
|
|
@@ -1684,7 +1685,7 @@ const wo = ({ widths: e, heights: t }) => {
|
|
|
1684
1685
|
}
|
|
1685
1686
|
], [e, t, o]), c = A(() => a.reduce((i, l) => i + Number(l.width || 0), 0), [a]);
|
|
1686
1687
|
return /* @__PURE__ */ s("div", { style: { width: c, position: "relative" }, children: o.map((i, l) => /* @__PURE__ */ s(bt, { style: a[l], pageNumber: i }, i)) });
|
|
1687
|
-
},
|
|
1688
|
+
}, Co = ({ widths: e, heights: t }) => {
|
|
1688
1689
|
const { focusedPage: n } = oe(), r = A(() => ({
|
|
1689
1690
|
position: "absolute",
|
|
1690
1691
|
width: e(n - 1),
|
|
@@ -1700,7 +1701,7 @@ const wo = ({ widths: e, heights: t }) => {
|
|
|
1700
1701
|
children: /* @__PURE__ */ s(bt, { style: r, pageNumber: n }, n)
|
|
1701
1702
|
}
|
|
1702
1703
|
);
|
|
1703
|
-
},
|
|
1704
|
+
}, Po = Hn(({ columnIndex: e, rowIndex: t, data: n, style: r }) => {
|
|
1704
1705
|
const o = A(() => e + 1 + t * n.columnCount, [e, t, n]);
|
|
1705
1706
|
return /* @__PURE__ */ s(
|
|
1706
1707
|
bt,
|
|
@@ -1711,7 +1712,7 @@ const wo = ({ widths: e, heights: t }) => {
|
|
|
1711
1712
|
},
|
|
1712
1713
|
o
|
|
1713
1714
|
);
|
|
1714
|
-
},
|
|
1715
|
+
}, go), Vs = () => {
|
|
1715
1716
|
const { getContainer: e, container: t } = cr(), { scrollToPage: n } = nn(), {
|
|
1716
1717
|
virtualScrollRef: r,
|
|
1717
1718
|
getVirtualScrollRef: o,
|
|
@@ -1719,40 +1720,40 @@ const wo = ({ widths: e, heights: t }) => {
|
|
|
1719
1720
|
getVirtualScrollableElementRef: c,
|
|
1720
1721
|
setTotalInnerDimensions: i,
|
|
1721
1722
|
totalInnerDimensions: l
|
|
1722
|
-
} =
|
|
1723
|
+
} = qe(), { nextPage: p, prevPage: h, setFocusedPage: f, focusedPage: u } = oe(), { scrollMode: m } = Pe(), { viewMode: g } = Ue(), _ = $(null), v = $({
|
|
1723
1724
|
height: 0,
|
|
1724
1725
|
width: 0
|
|
1725
1726
|
}), C = $({
|
|
1726
1727
|
viewMode: g,
|
|
1727
1728
|
scrollMode: m
|
|
1728
|
-
}), { isFullScreen:
|
|
1729
|
+
}), { isFullScreen: y } = qn(), {
|
|
1729
1730
|
pageDimension: P,
|
|
1730
1731
|
rowCount: R,
|
|
1731
1732
|
rowHeight: d,
|
|
1732
1733
|
columnCount: b,
|
|
1733
1734
|
columnWidth: w,
|
|
1734
|
-
estimatedColumnWidth:
|
|
1735
|
+
estimatedColumnWidth: S,
|
|
1735
1736
|
estimatedRowHeight: D
|
|
1736
|
-
} =
|
|
1737
|
+
} = vo(), [I, T] = W({}), { isScrolling: E } = Kt(), x = $(), L = $({
|
|
1737
1738
|
scrollTop: 0,
|
|
1738
1739
|
scrollLeft: 0
|
|
1739
1740
|
});
|
|
1740
1741
|
dr(t);
|
|
1741
|
-
const { isPressed:
|
|
1742
|
-
isPressed:
|
|
1743
|
-
}), Z = A(() => k === $n.HAND, [k]), U =
|
|
1744
|
-
|
|
1742
|
+
const { isPressed: M } = lr(), { selectionMode: k } = Vn(), { initializeGrabScroll: G, scrollBehavior: q } = ur({
|
|
1743
|
+
isPressed: M
|
|
1744
|
+
}), Z = A(() => k === $n.HAND, [k]), U = N((z, H) => {
|
|
1745
|
+
T((j) => ({ ...j, [z]: Math.round(H * 100) }));
|
|
1745
1746
|
}, []), B = A(() => ({
|
|
1746
1747
|
columnCount: b,
|
|
1747
1748
|
handleIntersectRatioChange: U
|
|
1748
|
-
}), [b, U]), re =
|
|
1749
|
+
}), [b, U]), re = N(
|
|
1749
1750
|
(z) => {
|
|
1750
1751
|
const H = document.activeElement !== t;
|
|
1751
|
-
!
|
|
1752
|
+
!y && H || (["ArrowUp", "ArrowLeft"].includes(z.key) ? (z.preventDefault(), h()) : ["ArrowDown", "ArrowRight"].includes(z.key) && (z.preventDefault(), p()));
|
|
1752
1753
|
},
|
|
1753
|
-
[p, h,
|
|
1754
|
-
), pe =
|
|
1755
|
-
|
|
1754
|
+
[p, h, y, m]
|
|
1755
|
+
), pe = N((z) => {
|
|
1756
|
+
L.current = {
|
|
1756
1757
|
scrollTop: z.scrollTop,
|
|
1757
1758
|
scrollLeft: z.scrollLeft
|
|
1758
1759
|
};
|
|
@@ -1783,7 +1784,7 @@ const wo = ({ widths: e, heights: t }) => {
|
|
|
1783
1784
|
if (E.current)
|
|
1784
1785
|
return;
|
|
1785
1786
|
if (C.current.viewMode !== g || C.current.scrollMode !== m) {
|
|
1786
|
-
x.current && clearTimeout(x.current),
|
|
1787
|
+
x.current && clearTimeout(x.current), T({}), n(u), m === J.HORIZONTAL_SCROLLING && (r == null || r.scrollTo({
|
|
1787
1788
|
scrollTop: 0
|
|
1788
1789
|
})), x.current = setTimeout(() => {
|
|
1789
1790
|
requestAnimationFrame(() => {
|
|
@@ -1792,9 +1793,9 @@ const wo = ({ widths: e, heights: t }) => {
|
|
|
1792
1793
|
}, 100);
|
|
1793
1794
|
return;
|
|
1794
1795
|
}
|
|
1795
|
-
const H =
|
|
1796
|
+
const H = L.current.scrollTop, j = L.current.scrollLeft;
|
|
1796
1797
|
if (l.height !== 0 && l.width !== 0) {
|
|
1797
|
-
const { height: se, width: Se } = l, { height: me, width: fe } = v.current,
|
|
1798
|
+
const { height: se, width: Se } = l, { height: me, width: fe } = v.current, Ze = H / me * se, je = j / fe * Se, zn = Math.min(Ze, se) || 0, Fn = Math.min(je, Se) || 0;
|
|
1798
1799
|
r == null || r.scrollTo({
|
|
1799
1800
|
scrollTop: zn,
|
|
1800
1801
|
scrollLeft: Fn
|
|
@@ -1814,9 +1815,9 @@ const wo = ({ widths: e, heights: t }) => {
|
|
|
1814
1815
|
x.current && clearTimeout(x.current);
|
|
1815
1816
|
}, []);
|
|
1816
1817
|
const K = A(() => Q(le["rp-pages-container"], {
|
|
1817
|
-
[le["rp-cursor-grab"]]: Z && !
|
|
1818
|
-
[le["rp-cursor-grabbing"]]: Z &&
|
|
1819
|
-
}), [Z,
|
|
1818
|
+
[le["rp-cursor-grab"]]: Z && !M,
|
|
1819
|
+
[le["rp-cursor-grabbing"]]: Z && M
|
|
1820
|
+
}), [Z, M]), Y = N(
|
|
1820
1821
|
(z) => {
|
|
1821
1822
|
if (Z && z) {
|
|
1822
1823
|
const H = Q(le["rp-pages"]), j = document.querySelector(`.${H}`);
|
|
@@ -1825,16 +1826,16 @@ const wo = ({ widths: e, heights: t }) => {
|
|
|
1825
1826
|
},
|
|
1826
1827
|
[Z, G, le]
|
|
1827
1828
|
);
|
|
1828
|
-
return /* @__PURE__ */ s("div", { ref: e, tabIndex: -1, className: K, children: /* @__PURE__ */ s(
|
|
1829
|
+
return /* @__PURE__ */ s("div", { ref: e, tabIndex: -1, className: K, children: /* @__PURE__ */ s(wo, { children: ({ width: z, height: H }) => /* @__PURE__ */ s("div", { "data-rp": "pages", ref: Y, style: { width: z, height: H, scrollBehavior: q }, children: m === J.PAGE_SCROLLING ? /* @__PURE__ */ s(
|
|
1829
1830
|
"div",
|
|
1830
1831
|
{
|
|
1831
1832
|
ref: a,
|
|
1832
1833
|
style: { width: z, height: H },
|
|
1833
1834
|
className: Q(le["rp-pages"], le["rp-page-scrolling-wrapper"]),
|
|
1834
|
-
children: g ===
|
|
1835
|
+
children: g === ze.DUAL_PAGE ? /* @__PURE__ */ s(bo, { widths: w, heights: d }) : /* @__PURE__ */ s(Co, { widths: w, heights: d })
|
|
1835
1836
|
}
|
|
1836
|
-
) :
|
|
1837
|
-
|
|
1837
|
+
) : S ? /* @__PURE__ */ s(
|
|
1838
|
+
ho,
|
|
1838
1839
|
{
|
|
1839
1840
|
ref: o,
|
|
1840
1841
|
itemData: B,
|
|
@@ -1846,7 +1847,7 @@ const wo = ({ widths: e, heights: t }) => {
|
|
|
1846
1847
|
rowHeight: d,
|
|
1847
1848
|
height: H,
|
|
1848
1849
|
width: z,
|
|
1849
|
-
estimatedColumnWidth:
|
|
1850
|
+
estimatedColumnWidth: S,
|
|
1850
1851
|
estimatedRowHeight: D,
|
|
1851
1852
|
rowCount: R,
|
|
1852
1853
|
className: Q(
|
|
@@ -1854,10 +1855,10 @@ const wo = ({ widths: e, heights: t }) => {
|
|
|
1854
1855
|
m === J.HORIZONTAL_SCROLLING ? le["rp-pages-horizontal-scroll"] : ""
|
|
1855
1856
|
),
|
|
1856
1857
|
style: { scrollBehavior: q },
|
|
1857
|
-
children:
|
|
1858
|
+
children: Po
|
|
1858
1859
|
}
|
|
1859
1860
|
) : null }) }) });
|
|
1860
|
-
},
|
|
1861
|
+
}, Te = {
|
|
1861
1862
|
"rp-toolbar-content": "_rp-toolbar-content_fw3uq_1",
|
|
1862
1863
|
"rp-toolbar-wrapper": "_rp-toolbar-wrapper_fw3uq_10",
|
|
1863
1864
|
"rp-toolbar-start": "_rp-toolbar-start_fw3uq_18",
|
|
@@ -1867,26 +1868,26 @@ const wo = ({ widths: e, heights: t }) => {
|
|
|
1867
1868
|
"rp-paginate": "_rp-paginate_1vu6o_1",
|
|
1868
1869
|
"rp-page-input": "_rp-page-input_1vu6o_6",
|
|
1869
1870
|
"rp-total-page": "_rp-total-page_1vu6o_12"
|
|
1870
|
-
},
|
|
1871
|
+
}, So = () => {
|
|
1871
1872
|
const { prevIcon: e } = ce();
|
|
1872
|
-
return e || /* @__PURE__ */ s(
|
|
1873
|
+
return e || /* @__PURE__ */ s(Re, {});
|
|
1873
1874
|
}, To = () => {
|
|
1874
1875
|
const { nextIcon: e } = ce();
|
|
1875
|
-
return e || /* @__PURE__ */ s(
|
|
1876
|
-
},
|
|
1876
|
+
return e || /* @__PURE__ */ s(Re, { style: { transform: "rotate(180deg" } });
|
|
1877
|
+
}, yo = () => {
|
|
1877
1878
|
const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: a } = oe(), [c, i] = W(e.toString()), { pageNavigationTool: l = !0 } = de(), { isSmallScreen: p } = _e();
|
|
1878
1879
|
F(() => {
|
|
1879
1880
|
i(e.toString());
|
|
1880
1881
|
}, [e]);
|
|
1881
|
-
const h =
|
|
1882
|
+
const h = N((g) => {
|
|
1882
1883
|
const _ = g.target.value;
|
|
1883
1884
|
i(_);
|
|
1884
|
-
}, []), f =
|
|
1885
|
+
}, []), f = N(() => {
|
|
1885
1886
|
const g = a(c);
|
|
1886
1887
|
g.success || i(g.currentPage.toString());
|
|
1887
|
-
}, [a, c, t]), u =
|
|
1888
|
+
}, [a, c, t]), u = N(() => {
|
|
1888
1889
|
i(e.toString());
|
|
1889
|
-
}, [e]), m =
|
|
1890
|
+
}, [e]), m = N(
|
|
1890
1891
|
(g) => {
|
|
1891
1892
|
g.key === "Enter" && f();
|
|
1892
1893
|
},
|
|
@@ -1903,7 +1904,7 @@ const wo = ({ widths: e, heights: t }) => {
|
|
|
1903
1904
|
changePage: n
|
|
1904
1905
|
}
|
|
1905
1906
|
) : l ? /* @__PURE__ */ O("div", { className: nt["rp-paginate"], children: [
|
|
1906
|
-
!p && /* @__PURE__ */ s(ee, { content: "Previous page", children: /* @__PURE__ */ s(X, { onClick: o, disabled: e === 1, children: /* @__PURE__ */ s(
|
|
1907
|
+
!p && /* @__PURE__ */ s(ee, { content: "Previous page", children: /* @__PURE__ */ s(X, { onClick: o, disabled: e === 1, children: /* @__PURE__ */ s(So, {}) }) }),
|
|
1907
1908
|
/* @__PURE__ */ s(
|
|
1908
1909
|
jt,
|
|
1909
1910
|
{
|
|
@@ -1921,7 +1922,7 @@ const wo = ({ widths: e, heights: t }) => {
|
|
|
1921
1922
|
!p && /* @__PURE__ */ s(ee, { content: "Next page", children: /* @__PURE__ */ s(X, { onClick: r, disabled: e === t, children: /* @__PURE__ */ s(To, {}) }) })
|
|
1922
1923
|
] }) : null;
|
|
1923
1924
|
};
|
|
1924
|
-
var Ct = "Dialog", [gn,
|
|
1925
|
+
var Ct = "Dialog", [gn, Us] = Sr(Ct), [Io, ae] = gn(Ct), vn = (e) => {
|
|
1925
1926
|
const {
|
|
1926
1927
|
__scopeDialog: t,
|
|
1927
1928
|
children: n,
|
|
@@ -1935,7 +1936,7 @@ var Ct = "Dialog", [gn, Gs] = Tr(Ct), [yo, ae] = gn(Ct), vn = (e) => {
|
|
|
1935
1936
|
onChange: a
|
|
1936
1937
|
});
|
|
1937
1938
|
return /* @__PURE__ */ s(
|
|
1938
|
-
|
|
1939
|
+
Io,
|
|
1939
1940
|
{
|
|
1940
1941
|
scope: t,
|
|
1941
1942
|
triggerRef: i,
|
|
@@ -1952,7 +1953,7 @@ var Ct = "Dialog", [gn, Gs] = Tr(Ct), [yo, ae] = gn(Ct), vn = (e) => {
|
|
|
1952
1953
|
);
|
|
1953
1954
|
};
|
|
1954
1955
|
vn.displayName = Ct;
|
|
1955
|
-
var _n = "DialogTrigger",
|
|
1956
|
+
var _n = "DialogTrigger", xo = V.forwardRef(
|
|
1956
1957
|
(e, t) => {
|
|
1957
1958
|
const { __scopeDialog: n, ...r } = e, o = ae(_n, n), a = gt(t, o.triggerRef);
|
|
1958
1959
|
return /* @__PURE__ */ s(
|
|
@@ -1962,39 +1963,39 @@ var _n = "DialogTrigger", Io = V.forwardRef(
|
|
|
1962
1963
|
"aria-haspopup": "dialog",
|
|
1963
1964
|
"aria-expanded": o.open,
|
|
1964
1965
|
"aria-controls": o.contentId,
|
|
1965
|
-
"data-state":
|
|
1966
|
+
"data-state": Tt(o.open),
|
|
1966
1967
|
...r,
|
|
1967
1968
|
ref: a,
|
|
1968
|
-
onClick:
|
|
1969
|
+
onClick: xe(e.onClick, o.onOpenToggle)
|
|
1969
1970
|
}
|
|
1970
1971
|
);
|
|
1971
1972
|
}
|
|
1972
1973
|
);
|
|
1973
|
-
|
|
1974
|
-
var Pt = "DialogPortal", [
|
|
1974
|
+
xo.displayName = _n;
|
|
1975
|
+
var Pt = "DialogPortal", [Ro, wn] = gn(Pt, {
|
|
1975
1976
|
forceMount: void 0
|
|
1976
1977
|
}), bn = (e) => {
|
|
1977
1978
|
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = ae(Pt, t);
|
|
1978
|
-
return /* @__PURE__ */ s(
|
|
1979
|
+
return /* @__PURE__ */ s(Ro, { scope: t, forceMount: n, children: V.Children.map(r, (c) => /* @__PURE__ */ s(vt, { present: n || a.open, children: /* @__PURE__ */ s(Pr, { asChild: !0, container: o, children: c }) })) });
|
|
1979
1980
|
};
|
|
1980
1981
|
bn.displayName = Pt;
|
|
1981
|
-
var
|
|
1982
|
+
var ke = "DialogOverlay", Cn = V.forwardRef(
|
|
1982
1983
|
(e, t) => {
|
|
1983
|
-
const n = wn(
|
|
1984
|
-
return a.modal ? /* @__PURE__ */ s(vt, { present: r || a.open, children: /* @__PURE__ */ s(
|
|
1984
|
+
const n = wn(ke, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = ae(ke, e.__scopeDialog);
|
|
1985
|
+
return a.modal ? /* @__PURE__ */ s(vt, { present: r || a.open, children: /* @__PURE__ */ s(No, { ...o, ref: t }) }) : null;
|
|
1985
1986
|
}
|
|
1986
1987
|
);
|
|
1987
|
-
Cn.displayName =
|
|
1988
|
-
var
|
|
1988
|
+
Cn.displayName = ke;
|
|
1989
|
+
var No = V.forwardRef(
|
|
1989
1990
|
(e, t) => {
|
|
1990
|
-
const { __scopeDialog: n, ...r } = e, o = ae(
|
|
1991
|
+
const { __scopeDialog: n, ...r } = e, o = ae(ke, n);
|
|
1991
1992
|
return (
|
|
1992
1993
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1993
1994
|
// ie. when `Overlay` and `Content` are siblings
|
|
1994
1995
|
/* @__PURE__ */ s(gr, { as: vr, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ s(
|
|
1995
1996
|
Le.div,
|
|
1996
1997
|
{
|
|
1997
|
-
"data-state":
|
|
1998
|
+
"data-state": Tt(o.open),
|
|
1998
1999
|
...r,
|
|
1999
2000
|
ref: t,
|
|
2000
2001
|
style: { pointerEvents: "auto", ...r.style }
|
|
@@ -2005,11 +2006,11 @@ var Ro = V.forwardRef(
|
|
|
2005
2006
|
), ve = "DialogContent", Pn = V.forwardRef(
|
|
2006
2007
|
(e, t) => {
|
|
2007
2008
|
const n = wn(ve, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = ae(ve, e.__scopeDialog);
|
|
2008
|
-
return /* @__PURE__ */ s(vt, { present: r || a.open, children: a.modal ? /* @__PURE__ */ s(
|
|
2009
|
+
return /* @__PURE__ */ s(vt, { present: r || a.open, children: a.modal ? /* @__PURE__ */ s(Lo, { ...o, ref: t }) : /* @__PURE__ */ s(Mo, { ...o, ref: t }) });
|
|
2009
2010
|
}
|
|
2010
2011
|
);
|
|
2011
2012
|
Pn.displayName = ve;
|
|
2012
|
-
var
|
|
2013
|
+
var Lo = V.forwardRef(
|
|
2013
2014
|
(e, t) => {
|
|
2014
2015
|
const n = ae(ve, e.__scopeDialog), r = V.useRef(null), o = gt(t, n.contentRef, r);
|
|
2015
2016
|
return V.useEffect(() => {
|
|
@@ -2017,32 +2018,32 @@ var Mo = V.forwardRef(
|
|
|
2017
2018
|
if (a)
|
|
2018
2019
|
return _r(a);
|
|
2019
2020
|
}, []), /* @__PURE__ */ s(
|
|
2020
|
-
|
|
2021
|
+
Sn,
|
|
2021
2022
|
{
|
|
2022
2023
|
...e,
|
|
2023
2024
|
ref: o,
|
|
2024
2025
|
trapFocus: n.open,
|
|
2025
2026
|
disableOutsidePointerEvents: !0,
|
|
2026
|
-
onCloseAutoFocus:
|
|
2027
|
+
onCloseAutoFocus: xe(e.onCloseAutoFocus, (a) => {
|
|
2027
2028
|
var c;
|
|
2028
2029
|
a.preventDefault(), (c = n.triggerRef.current) == null || c.focus();
|
|
2029
2030
|
}),
|
|
2030
|
-
onPointerDownOutside:
|
|
2031
|
+
onPointerDownOutside: xe(e.onPointerDownOutside, (a) => {
|
|
2031
2032
|
const c = a.detail.originalEvent, i = c.button === 0 && c.ctrlKey === !0;
|
|
2032
2033
|
(c.button === 2 || i) && a.preventDefault();
|
|
2033
2034
|
}),
|
|
2034
|
-
onFocusOutside:
|
|
2035
|
+
onFocusOutside: xe(
|
|
2035
2036
|
e.onFocusOutside,
|
|
2036
2037
|
(a) => a.preventDefault()
|
|
2037
2038
|
)
|
|
2038
2039
|
}
|
|
2039
2040
|
);
|
|
2040
2041
|
}
|
|
2041
|
-
),
|
|
2042
|
+
), Mo = V.forwardRef(
|
|
2042
2043
|
(e, t) => {
|
|
2043
2044
|
const n = ae(ve, e.__scopeDialog), r = V.useRef(!1), o = V.useRef(!1);
|
|
2044
2045
|
return /* @__PURE__ */ s(
|
|
2045
|
-
|
|
2046
|
+
Sn,
|
|
2046
2047
|
{
|
|
2047
2048
|
...e,
|
|
2048
2049
|
ref: t,
|
|
@@ -2061,10 +2062,10 @@ var Mo = V.forwardRef(
|
|
|
2061
2062
|
}
|
|
2062
2063
|
);
|
|
2063
2064
|
}
|
|
2064
|
-
),
|
|
2065
|
+
), Sn = V.forwardRef(
|
|
2065
2066
|
(e, t) => {
|
|
2066
2067
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = e, i = ae(ve, n), l = V.useRef(null), p = gt(t, l);
|
|
2067
|
-
return wr(), /* @__PURE__ */ O(
|
|
2068
|
+
return wr(), /* @__PURE__ */ O(Ae, { children: [
|
|
2068
2069
|
/* @__PURE__ */ s(
|
|
2069
2070
|
br,
|
|
2070
2071
|
{
|
|
@@ -2080,7 +2081,7 @@ var Mo = V.forwardRef(
|
|
|
2080
2081
|
id: i.contentId,
|
|
2081
2082
|
"aria-describedby": i.descriptionId,
|
|
2082
2083
|
"aria-labelledby": i.titleId,
|
|
2083
|
-
"data-state":
|
|
2084
|
+
"data-state": Tt(i.open),
|
|
2084
2085
|
...c,
|
|
2085
2086
|
ref: p,
|
|
2086
2087
|
onDismiss: () => i.onOpenChange(!1)
|
|
@@ -2088,26 +2089,26 @@ var Mo = V.forwardRef(
|
|
|
2088
2089
|
)
|
|
2089
2090
|
}
|
|
2090
2091
|
),
|
|
2091
|
-
/* @__PURE__ */ O(
|
|
2092
|
-
/* @__PURE__ */ s(
|
|
2093
|
-
/* @__PURE__ */ s(
|
|
2092
|
+
/* @__PURE__ */ O(Ae, { children: [
|
|
2093
|
+
/* @__PURE__ */ s(Oo, { titleId: i.titleId }),
|
|
2094
|
+
/* @__PURE__ */ s(Ao, { contentRef: l, descriptionId: i.descriptionId })
|
|
2094
2095
|
] })
|
|
2095
2096
|
] });
|
|
2096
2097
|
}
|
|
2097
|
-
),
|
|
2098
|
+
), St = "DialogTitle", Tn = V.forwardRef(
|
|
2098
2099
|
(e, t) => {
|
|
2099
|
-
const { __scopeDialog: n, ...r } = e, o = ae(
|
|
2100
|
+
const { __scopeDialog: n, ...r } = e, o = ae(St, n);
|
|
2100
2101
|
return /* @__PURE__ */ s(Le.h2, { id: o.titleId, ...r, ref: t });
|
|
2101
2102
|
}
|
|
2102
2103
|
);
|
|
2103
|
-
|
|
2104
|
-
var yn = "DialogDescription",
|
|
2104
|
+
Tn.displayName = St;
|
|
2105
|
+
var yn = "DialogDescription", Eo = V.forwardRef(
|
|
2105
2106
|
(e, t) => {
|
|
2106
2107
|
const { __scopeDialog: n, ...r } = e, o = ae(yn, n);
|
|
2107
2108
|
return /* @__PURE__ */ s(Le.p, { id: o.descriptionId, ...r, ref: t });
|
|
2108
2109
|
}
|
|
2109
2110
|
);
|
|
2110
|
-
|
|
2111
|
+
Eo.displayName = yn;
|
|
2111
2112
|
var In = "DialogClose", xn = V.forwardRef(
|
|
2112
2113
|
(e, t) => {
|
|
2113
2114
|
const { __scopeDialog: n, ...r } = e, o = ae(In, n);
|
|
@@ -2117,21 +2118,21 @@ var In = "DialogClose", xn = V.forwardRef(
|
|
|
2117
2118
|
type: "button",
|
|
2118
2119
|
...r,
|
|
2119
2120
|
ref: t,
|
|
2120
|
-
onClick:
|
|
2121
|
+
onClick: xe(e.onClick, () => o.onOpenChange(!1))
|
|
2121
2122
|
}
|
|
2122
2123
|
);
|
|
2123
2124
|
}
|
|
2124
2125
|
);
|
|
2125
2126
|
xn.displayName = In;
|
|
2126
|
-
function
|
|
2127
|
+
function Tt(e) {
|
|
2127
2128
|
return e ? "open" : "closed";
|
|
2128
2129
|
}
|
|
2129
|
-
var Rn = "DialogTitleWarning", [
|
|
2130
|
+
var Rn = "DialogTitleWarning", [qs, Nn] = Tr(Rn, {
|
|
2130
2131
|
contentName: ve,
|
|
2131
|
-
titleName:
|
|
2132
|
+
titleName: St,
|
|
2132
2133
|
docsSlug: "dialog"
|
|
2133
|
-
}),
|
|
2134
|
-
const t =
|
|
2134
|
+
}), Oo = ({ titleId: e }) => {
|
|
2135
|
+
const t = Nn(Rn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2135
2136
|
|
|
2136
2137
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2137
2138
|
|
|
@@ -2139,14 +2140,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2139
2140
|
return V.useEffect(() => {
|
|
2140
2141
|
e && (document.getElementById(e) || console.error(n));
|
|
2141
2142
|
}, [n, e]), null;
|
|
2142
|
-
},
|
|
2143
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
2143
|
+
}, Do = "DialogDescriptionWarning", Ao = ({ contentRef: e, descriptionId: t }) => {
|
|
2144
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Nn(Do).contentName}}.`;
|
|
2144
2145
|
return V.useEffect(() => {
|
|
2145
2146
|
var a;
|
|
2146
2147
|
const o = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2147
2148
|
t && o && (document.getElementById(t) || console.warn(r));
|
|
2148
2149
|
}, [r, e, t]), null;
|
|
2149
|
-
},
|
|
2150
|
+
}, zo = vn, Fo = bn, ko = Cn, Wo = Pn, Ho = Tn, $o = xn;
|
|
2150
2151
|
const ge = {
|
|
2151
2152
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2152
2153
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2155,7 +2156,7 @@ const ge = {
|
|
|
2155
2156
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2156
2157
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2157
2158
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2158
|
-
},
|
|
2159
|
+
}, Go = () => {
|
|
2159
2160
|
const { pdfProperties: e } = ne(), { container: t } = Ne(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = xr(), o = A(() => {
|
|
2160
2161
|
if (!e)
|
|
2161
2162
|
return [];
|
|
@@ -2196,17 +2197,17 @@ const ge = {
|
|
|
2196
2197
|
{ label: "Page count", value: v }
|
|
2197
2198
|
];
|
|
2198
2199
|
}, [e]);
|
|
2199
|
-
return /* @__PURE__ */ s(
|
|
2200
|
-
/* @__PURE__ */ s(
|
|
2201
|
-
/* @__PURE__ */ O(
|
|
2202
|
-
/* @__PURE__ */ s(
|
|
2200
|
+
return /* @__PURE__ */ s(zo, { open: n, onOpenChange: r, children: /* @__PURE__ */ s(Fo, { container: t, children: /* @__PURE__ */ O("div", { className: ge["rp-dialog-wrapper"], children: [
|
|
2201
|
+
/* @__PURE__ */ s(ko, { className: ge["rp-dialog-overlay"] }),
|
|
2202
|
+
/* @__PURE__ */ O(Wo, { className: ge["rp-document-dialog"], children: [
|
|
2203
|
+
/* @__PURE__ */ s(Ho, { className: ge["rp-dialog-title"], children: "Document Properties" }),
|
|
2203
2204
|
/* @__PURE__ */ s("div", { className: ge["rp-document-properties"], children: o.map((a, c) => /* @__PURE__ */ s("div", { children: a.separate ? /* @__PURE__ */ s("div", { className: ge["rp-properties-divider"] }) : /* @__PURE__ */ s(Ir, { label: a.label, value: a.value }) }, c)) }),
|
|
2204
|
-
/* @__PURE__ */ s(
|
|
2205
|
+
/* @__PURE__ */ s($o, { asChild: !0, className: ge["rp-dialog-close"], children: /* @__PURE__ */ s(Qt, {}) })
|
|
2205
2206
|
] })
|
|
2206
2207
|
] }) }) });
|
|
2207
|
-
},
|
|
2208
|
+
}, Vo = {
|
|
2208
2209
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2209
|
-
},
|
|
2210
|
+
}, Uo = () => {
|
|
2210
2211
|
const { filename: e, pdfSrc: t } = ne();
|
|
2211
2212
|
return { download: () => {
|
|
2212
2213
|
if (!e)
|
|
@@ -2214,24 +2215,24 @@ const ge = {
|
|
|
2214
2215
|
const r = document.createElement("a");
|
|
2215
2216
|
r.href = t, r.download = e, document.body.appendChild(r), r.click(), document.body.removeChild(r);
|
|
2216
2217
|
} };
|
|
2217
|
-
},
|
|
2218
|
+
}, Ln = () => {
|
|
2218
2219
|
const { downloadIcon: e } = ce();
|
|
2219
2220
|
return e || /* @__PURE__ */ s(Er, {});
|
|
2220
|
-
},
|
|
2221
|
-
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(
|
|
2221
|
+
}, Mn = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Download file", children: e }), qo = ({ download: e }) => /* @__PURE__ */ s(Mn, { children: /* @__PURE__ */ s(X, { onClick: e, children: /* @__PURE__ */ s(Ln, {}) }) }), Zo = ({ download: e }) => /* @__PURE__ */ s(he, { onClick: e, children: /* @__PURE__ */ O(Mn, { className: "rp-menu-item", children: [
|
|
2222
|
+
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Ln, {}) }),
|
|
2222
2223
|
"Download file"
|
|
2223
2224
|
] }) }), En = () => {
|
|
2224
|
-
const { download: e } =
|
|
2225
|
-
return t ? n ? /* @__PURE__ */ s(
|
|
2225
|
+
const { download: e } = Uo(), { downloadTool: t = !0 } = de(), { isSmallScreen: n } = _e();
|
|
2226
|
+
return t ? n ? /* @__PURE__ */ s(Zo, { download: e }) : typeof t == "function" ? /* @__PURE__ */ s(t, { download: e }) : t ? /* @__PURE__ */ s(qo, { download: e }) : null : null;
|
|
2226
2227
|
}, On = () => {
|
|
2227
2228
|
const { printIcon: e } = ce();
|
|
2228
2229
|
return e || /* @__PURE__ */ s(Or, {});
|
|
2229
|
-
}, Dn = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Print", children: e }),
|
|
2230
|
+
}, Dn = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Print", children: e }), jo = ({ print: e }) => /* @__PURE__ */ s(Dn, { children: /* @__PURE__ */ s(X, { onClick: e, children: /* @__PURE__ */ s(On, {}) }) }), Bo = ({ print: e }) => /* @__PURE__ */ s(he, { onClick: e, children: /* @__PURE__ */ O(Dn, { className: "rp-menu-item", children: [
|
|
2230
2231
|
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(On, {}) }),
|
|
2231
2232
|
"Print"
|
|
2232
2233
|
] }) }), An = () => {
|
|
2233
2234
|
const { print: e, cancel: t, setOnProgress: n, setOnComplete: r, setOnError: o, progress: a } = wt(), { printTool: c = !0 } = de(), { isSmallScreen: i } = _e();
|
|
2234
|
-
return c ? i ? /* @__PURE__ */ s(
|
|
2235
|
+
return c ? i ? /* @__PURE__ */ s(Bo, { print: e }) : typeof c == "function" ? /* @__PURE__ */ s(
|
|
2235
2236
|
c,
|
|
2236
2237
|
{
|
|
2237
2238
|
print: e,
|
|
@@ -2241,33 +2242,33 @@ const ge = {
|
|
|
2241
2242
|
setOnComplete: r,
|
|
2242
2243
|
progress: a
|
|
2243
2244
|
}
|
|
2244
|
-
) : c ? /* @__PURE__ */ s(
|
|
2245
|
-
},
|
|
2245
|
+
) : c ? /* @__PURE__ */ s(jo, { print: e }) : null : null;
|
|
2246
|
+
}, Ko = {
|
|
2246
2247
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2247
|
-
}, Ko = () => {
|
|
2248
|
-
const { goToFirstPageIcon: e } = ce();
|
|
2249
|
-
return e || /* @__PURE__ */ s(tn, { className: Bo["rp-go-to-Top"] });
|
|
2250
2248
|
}, Xo = () => {
|
|
2249
|
+
const { goToFirstPageIcon: e } = ce();
|
|
2250
|
+
return e || /* @__PURE__ */ s(tn, { className: Ko["rp-go-to-Top"] });
|
|
2251
|
+
}, Jo = () => {
|
|
2251
2252
|
const { goToLastPageIcon: e } = ce();
|
|
2252
2253
|
return e || /* @__PURE__ */ s(tn, {});
|
|
2253
|
-
},
|
|
2254
|
-
const { goToPage: e, totalPages: t, focusedPage: n } = oe(), { jumpNavigationTool: r = !0 } = de(), o = A(() => n === 1, [n]), a = A(() => n === t, [n, t]), c =
|
|
2254
|
+
}, Yo = () => {
|
|
2255
|
+
const { goToPage: e, totalPages: t, focusedPage: n } = oe(), { jumpNavigationTool: r = !0 } = de(), o = A(() => n === 1, [n]), a = A(() => n === t, [n, t]), c = N(() => {
|
|
2255
2256
|
e(1);
|
|
2256
|
-
}, [e]), i =
|
|
2257
|
+
}, [e]), i = N(() => {
|
|
2257
2258
|
e(t);
|
|
2258
2259
|
}, [e, t]);
|
|
2259
|
-
return r ? /* @__PURE__ */ O(
|
|
2260
|
+
return r ? /* @__PURE__ */ O(Fe, { children: [
|
|
2260
2261
|
/* @__PURE__ */ s(he, { disabled: o, onClick: c, children: /* @__PURE__ */ O(ee, { className: "rp-menu-item", content: "Go to first page", children: [
|
|
2261
|
-
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(
|
|
2262
|
+
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Xo, {}) }),
|
|
2262
2263
|
"First page"
|
|
2263
2264
|
] }) }),
|
|
2264
2265
|
/* @__PURE__ */ s(he, { disabled: a, onClick: i, children: /* @__PURE__ */ O(ee, { className: "rp-menu-item", content: "Go to last page", children: [
|
|
2265
|
-
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(
|
|
2266
|
+
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Jo, {}) }),
|
|
2266
2267
|
"Last page"
|
|
2267
2268
|
] }) }),
|
|
2268
2269
|
/* @__PURE__ */ s(_t, {})
|
|
2269
2270
|
] }) : null;
|
|
2270
|
-
},
|
|
2271
|
+
}, Qo = () => {
|
|
2271
2272
|
const { container: e } = Ne(), { isSmallScreen: t } = _e(), {
|
|
2272
2273
|
openFileTool: n,
|
|
2273
2274
|
downloadTool: r,
|
|
@@ -2298,118 +2299,104 @@ const ge = {
|
|
|
2298
2299
|
{
|
|
2299
2300
|
container: e,
|
|
2300
2301
|
triggerComponent: /* @__PURE__ */ s("div", { role: "button", children: /* @__PURE__ */ s(ee, { content: "More options", children: /* @__PURE__ */ s(X, { children: /* @__PURE__ */ s(fr, {}) }) }) }),
|
|
2301
|
-
children: /* @__PURE__ */ O("div", { className:
|
|
2302
|
-
t && /* @__PURE__ */ O(
|
|
2302
|
+
children: /* @__PURE__ */ O("div", { className: Vo["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2303
|
+
t && /* @__PURE__ */ O(Fe, { children: [
|
|
2303
2304
|
/* @__PURE__ */ s(Yt, {}),
|
|
2304
2305
|
/* @__PURE__ */ s(En, {}),
|
|
2305
2306
|
/* @__PURE__ */ s(An, {}),
|
|
2306
2307
|
/* @__PURE__ */ s(en, {}),
|
|
2307
2308
|
/* @__PURE__ */ s(_t, {})
|
|
2308
2309
|
] }),
|
|
2309
|
-
/* @__PURE__ */ s(
|
|
2310
|
-
/* @__PURE__ */ s(Nr, {}),
|
|
2311
|
-
/* @__PURE__ */ s(Dr, {}),
|
|
2310
|
+
/* @__PURE__ */ s(Yo, {}),
|
|
2312
2311
|
/* @__PURE__ */ s(Lr, {}),
|
|
2313
|
-
/* @__PURE__ */ s(
|
|
2312
|
+
/* @__PURE__ */ s(Dr, {}),
|
|
2313
|
+
/* @__PURE__ */ s(Mr, {}),
|
|
2314
|
+
/* @__PURE__ */ s(Nr, {})
|
|
2314
2315
|
] })
|
|
2315
2316
|
}
|
|
2316
2317
|
),
|
|
2317
|
-
/* @__PURE__ */ s(
|
|
2318
|
+
/* @__PURE__ */ s(Go, {})
|
|
2318
2319
|
] }) : null;
|
|
2319
|
-
},
|
|
2320
|
+
}, ea = () => {
|
|
2320
2321
|
const { isSmallScreen: e } = _e();
|
|
2321
|
-
return /* @__PURE__ */ O(
|
|
2322
|
+
return /* @__PURE__ */ O(Ae, { children: [
|
|
2322
2323
|
/* @__PURE__ */ s(mr, {}),
|
|
2323
|
-
!e && /* @__PURE__ */ O(
|
|
2324
|
+
!e && /* @__PURE__ */ O(Ae, { children: [
|
|
2324
2325
|
/* @__PURE__ */ s(Yt, {}),
|
|
2325
2326
|
/* @__PURE__ */ s(En, {}),
|
|
2326
2327
|
/* @__PURE__ */ s(An, {}),
|
|
2327
2328
|
/* @__PURE__ */ s(en, {})
|
|
2328
2329
|
] }),
|
|
2329
|
-
/* @__PURE__ */ s(
|
|
2330
|
+
/* @__PURE__ */ s(Qo, {})
|
|
2330
2331
|
] });
|
|
2331
|
-
},
|
|
2332
|
+
}, ye = {
|
|
2332
2333
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_163s9_1",
|
|
2333
2334
|
"rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_163s9_6",
|
|
2334
2335
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_163s9_11",
|
|
2335
2336
|
"rp-current-zoom": "_rp-current-zoom_163s9_6",
|
|
2336
2337
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_163s9_20"
|
|
2337
|
-
},
|
|
2338
|
+
}, ta = 25, rt = 1e3, na = [50, 75, 100, 125, 150, 200, 300, 400], ra = () => {
|
|
2338
2339
|
const { zoomInIcon: e } = ce();
|
|
2339
2340
|
return e || /* @__PURE__ */ s(Ar, {});
|
|
2340
|
-
},
|
|
2341
|
+
}, oa = () => {
|
|
2341
2342
|
const { zoomOutIcon: e } = ce();
|
|
2342
2343
|
return e || /* @__PURE__ */ s(zr, {});
|
|
2343
|
-
},
|
|
2344
|
-
const { zoomLevel: e, setZoomLevel: t } =
|
|
2344
|
+
}, aa = () => {
|
|
2345
|
+
const { zoomLevel: e, setZoomLevel: t } = Ve(), { container: n, contentRef: r } = Ne(), { zoomTool: o = !0 } = de(), { focusedPage: a } = oe(), { rotate: c } = Ge(), { pages: i } = ne(), { isSmallScreen: l } = _e(), p = N(() => {
|
|
2345
2346
|
t((v) => {
|
|
2346
2347
|
const C = Math.floor(v / 25) * 25;
|
|
2347
2348
|
return Math.min(C + 25, rt);
|
|
2348
2349
|
});
|
|
2349
|
-
}, [t]), h =
|
|
2350
|
+
}, [t]), h = N(() => {
|
|
2350
2351
|
t((v) => {
|
|
2351
2352
|
const C = Math.ceil(v / 25) * 25;
|
|
2352
2353
|
return Math.min(C - 25, rt);
|
|
2353
2354
|
});
|
|
2354
|
-
}, [t]), f = A(() => e ===
|
|
2355
|
+
}, [t]), f = A(() => e === ta, [e]), u = A(() => e === rt, [e]), m = A(() => {
|
|
2355
2356
|
var v;
|
|
2356
2357
|
return (v = i.get(a)) == null ? void 0 : v.page.getViewport({ scale: 1, rotation: c });
|
|
2357
|
-
}, [i, a, c]), g =
|
|
2358
|
+
}, [i, a, c]), g = N(
|
|
2358
2359
|
(v) => {
|
|
2359
|
-
const C = ((m == null ? void 0 : m.width) || 0) + 2 * It,
|
|
2360
|
-
|
|
2361
|
-
case we.ACTUAL:
|
|
2362
|
-
t(100);
|
|
2363
|
-
break;
|
|
2364
|
-
case we.PAGE_FIT:
|
|
2365
|
-
let d = 0;
|
|
2366
|
-
const b = P > R;
|
|
2367
|
-
S > C && b ? d = R / S : d = P / C;
|
|
2368
|
-
const w = Math.floor(d * 100);
|
|
2369
|
-
t(w);
|
|
2370
|
-
break;
|
|
2371
|
-
case we.PAGE_WIDTH:
|
|
2372
|
-
t(Math.floor(P / C * 100));
|
|
2373
|
-
break;
|
|
2374
|
-
}
|
|
2360
|
+
const C = ((m == null ? void 0 : m.width) || 0) + 2 * It, y = ((m == null ? void 0 : m.height) || 0) + 2 * It, P = (r == null ? void 0 : r.clientWidth) || 0, R = (r == null ? void 0 : r.clientHeight) || 0, d = Fr(v, P, R, C, y);
|
|
2361
|
+
t(d);
|
|
2375
2362
|
},
|
|
2376
2363
|
[t, m]
|
|
2377
|
-
), _ =
|
|
2364
|
+
), _ = N(
|
|
2378
2365
|
(v) => {
|
|
2379
2366
|
typeof v == "number" ? t(v) : g(v);
|
|
2380
2367
|
},
|
|
2381
2368
|
[t, g]
|
|
2382
2369
|
);
|
|
2383
|
-
return typeof o != "boolean" ? /* @__PURE__ */ s(o, { zoomLevel: e, setZoomLevel: t }) : o ? /* @__PURE__ */ O("div", { className:
|
|
2384
|
-
/* @__PURE__ */ s(ee, { content: "Zoom out", children: /* @__PURE__ */ s(X, { disabled: f, onClick: h, children: /* @__PURE__ */ s(
|
|
2370
|
+
return typeof o != "boolean" ? /* @__PURE__ */ s(o, { zoomLevel: e, setZoomLevel: t }) : o ? /* @__PURE__ */ O("div", { className: ye["rp-zoom-wrapper"], children: [
|
|
2371
|
+
/* @__PURE__ */ s(ee, { content: "Zoom out", children: /* @__PURE__ */ s(X, { disabled: f, onClick: h, children: /* @__PURE__ */ s(oa, {}) }) }),
|
|
2385
2372
|
!l && /* @__PURE__ */ s(
|
|
2386
2373
|
ft,
|
|
2387
2374
|
{
|
|
2388
2375
|
container: n,
|
|
2389
|
-
triggerComponent: /* @__PURE__ */ s("div", { role: "button", children: /* @__PURE__ */ s(ee, { content: "Select zoom level", children: /* @__PURE__ */ O(X, { className:
|
|
2390
|
-
/* @__PURE__ */ O("span", { className:
|
|
2376
|
+
triggerComponent: /* @__PURE__ */ s("div", { role: "button", children: /* @__PURE__ */ s(ee, { content: "Select zoom level", children: /* @__PURE__ */ O(X, { className: ye["rp-current-zoom-wrapper"], children: [
|
|
2377
|
+
/* @__PURE__ */ O("span", { className: ye["rp-current-zoom"], children: [
|
|
2391
2378
|
e,
|
|
2392
2379
|
" %"
|
|
2393
2380
|
] }),
|
|
2394
|
-
/* @__PURE__ */ s(
|
|
2381
|
+
/* @__PURE__ */ s(Re, { className: ye["rp-current-zoom-icon"] })
|
|
2395
2382
|
] }) }) }),
|
|
2396
2383
|
style: { minWidth: "200px" },
|
|
2397
2384
|
align: "center",
|
|
2398
|
-
children: /* @__PURE__ */ O("div", { className:
|
|
2399
|
-
/* @__PURE__ */ O(
|
|
2400
|
-
/* @__PURE__ */ s(he, { onClick: () => _(
|
|
2401
|
-
/* @__PURE__ */ s(he, { onClick: () => _(
|
|
2402
|
-
/* @__PURE__ */ s(he, { onClick: () => _(
|
|
2385
|
+
children: /* @__PURE__ */ O("div", { className: ye["rp-zoom-dropdown-content"], children: [
|
|
2386
|
+
/* @__PURE__ */ O(Fe, { children: [
|
|
2387
|
+
/* @__PURE__ */ s(he, { onClick: () => _(Be.ACTUAL), children: "Actual size" }),
|
|
2388
|
+
/* @__PURE__ */ s(he, { onClick: () => _(Be.PAGE_FIT), children: "Page fit" }),
|
|
2389
|
+
/* @__PURE__ */ s(he, { onClick: () => _(Be.PAGE_WIDTH), children: "Page width" })
|
|
2403
2390
|
] }),
|
|
2404
2391
|
/* @__PURE__ */ s(_t, {}),
|
|
2405
|
-
/* @__PURE__ */ s(
|
|
2392
|
+
/* @__PURE__ */ s(Fe, { children: na.map((v) => /* @__PURE__ */ O(he, { onClick: () => _(v), children: [
|
|
2406
2393
|
v,
|
|
2407
2394
|
" %"
|
|
2408
2395
|
] }, v)) })
|
|
2409
2396
|
] })
|
|
2410
2397
|
}
|
|
2411
2398
|
),
|
|
2412
|
-
/* @__PURE__ */ s(ee, { content: "Zoom in", children: /* @__PURE__ */ s(X, { disabled: u, onClick: p, children: /* @__PURE__ */ s(
|
|
2399
|
+
/* @__PURE__ */ s(ee, { content: "Zoom in", children: /* @__PURE__ */ s(X, { disabled: u, onClick: p, children: /* @__PURE__ */ s(ra, {}) }) })
|
|
2413
2400
|
] }) : null;
|
|
2414
2401
|
}, ie = {
|
|
2415
2402
|
"rp-search-tool-content": "_rp-search-tool-content_1vxow_1",
|
|
@@ -2422,8 +2409,8 @@ const ge = {
|
|
|
2422
2409
|
"rp-search-input": "_rp-search-input_1vxow_49"
|
|
2423
2410
|
}, Ut = () => {
|
|
2424
2411
|
const { searchIcon: e } = ce();
|
|
2425
|
-
return e || /* @__PURE__ */ s(
|
|
2426
|
-
},
|
|
2412
|
+
return e || /* @__PURE__ */ s(kr, {});
|
|
2413
|
+
}, sa = () => {
|
|
2427
2414
|
const { container: e } = Ne(), [t, n] = W(!1), { pdf: r } = ne(), [o, a] = W(null), {
|
|
2428
2415
|
searchOptions: c,
|
|
2429
2416
|
setSearchOptions: i,
|
|
@@ -2434,16 +2421,16 @@ const ge = {
|
|
|
2434
2421
|
nextMatch: u,
|
|
2435
2422
|
prevMatch: m,
|
|
2436
2423
|
search: g
|
|
2437
|
-
} = ln(), { searchTool: _ = !0 } = de(), [v, C] = W(g),
|
|
2424
|
+
} = ln(), { searchTool: _ = !0 } = de(), [v, C] = W(g), y = N(() => {
|
|
2438
2425
|
n(!0);
|
|
2439
|
-
}, []), P =
|
|
2426
|
+
}, []), P = N(() => {
|
|
2440
2427
|
p(""), C(""), n(!1);
|
|
2441
|
-
}, [p]), R =
|
|
2428
|
+
}, [p]), R = N(
|
|
2442
2429
|
(x) => {
|
|
2443
2430
|
x.key === "Escape" && t && P();
|
|
2444
2431
|
},
|
|
2445
2432
|
[t]
|
|
2446
|
-
), d =
|
|
2433
|
+
), d = N(
|
|
2447
2434
|
(x) => {
|
|
2448
2435
|
x.shiftKey && x.key === "Enter" ? m() : x.key === "Enter" && g !== v ? p(v) : x.key === "Enter" && u();
|
|
2449
2436
|
},
|
|
@@ -2454,18 +2441,18 @@ const ge = {
|
|
|
2454
2441
|
}), [R]), F(() => {
|
|
2455
2442
|
o && o.focus();
|
|
2456
2443
|
}, [o]);
|
|
2457
|
-
const b =
|
|
2444
|
+
const b = N((x) => {
|
|
2458
2445
|
C(x.target.value);
|
|
2459
|
-
}, []), w =
|
|
2446
|
+
}, []), w = N(() => {
|
|
2460
2447
|
C(""), p("");
|
|
2461
|
-
}, [p]),
|
|
2448
|
+
}, [p]), S = A(() => `${f} / ${h}`, [f, h]), { wholeWords: D, matchCase: I } = A(() => c, [c]), T = N(
|
|
2462
2449
|
(x) => {
|
|
2463
|
-
i((
|
|
2450
|
+
i((L) => ({ ...L, matchCase: x }));
|
|
2464
2451
|
},
|
|
2465
2452
|
[i]
|
|
2466
|
-
), E =
|
|
2453
|
+
), E = N(
|
|
2467
2454
|
(x) => {
|
|
2468
|
-
i((
|
|
2455
|
+
i((L) => ({ ...L, wholeWords: x }));
|
|
2469
2456
|
},
|
|
2470
2457
|
[i]
|
|
2471
2458
|
);
|
|
@@ -2477,7 +2464,7 @@ const ge = {
|
|
|
2477
2464
|
open: t,
|
|
2478
2465
|
container: e,
|
|
2479
2466
|
align: "start",
|
|
2480
|
-
triggerComponent: /* @__PURE__ */ s(ee, { content: "Search in document", children: /* @__PURE__ */ s(X, { onClick:
|
|
2467
|
+
triggerComponent: /* @__PURE__ */ s(ee, { content: "Search in document", children: /* @__PURE__ */ s(X, { onClick: y, children: /* @__PURE__ */ s(Ut, {}) }) }),
|
|
2481
2468
|
children: /* @__PURE__ */ O("div", { className: ie["rp-search-tool-content"], children: [
|
|
2482
2469
|
/* @__PURE__ */ O("div", { className: ie["rp-search-tool-input-wrapper"], children: [
|
|
2483
2470
|
/* @__PURE__ */ O("div", { className: ie["rp-search-tool-input"], children: [
|
|
@@ -2491,20 +2478,20 @@ const ge = {
|
|
|
2491
2478
|
placeholder: "Enter to Search",
|
|
2492
2479
|
className: ie["rp-search-input"],
|
|
2493
2480
|
ref: a,
|
|
2494
|
-
children: !!v && /* @__PURE__ */ s("span", { className: ie["rp-search-tool-input-clear"], onClick: w, children: /* @__PURE__ */ s(
|
|
2481
|
+
children: !!v && /* @__PURE__ */ s("span", { className: ie["rp-search-tool-input-clear"], onClick: w, children: /* @__PURE__ */ s(Wr, {}) })
|
|
2495
2482
|
}
|
|
2496
2483
|
),
|
|
2497
|
-
l ? /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(mt, {}) }) : /* @__PURE__ */ s("span", { children:
|
|
2484
|
+
l ? /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(mt, {}) }) : /* @__PURE__ */ s("span", { children: S })
|
|
2498
2485
|
] }),
|
|
2499
2486
|
/* @__PURE__ */ O("div", { className: ie["rp-search-tool-input-checkboxes"], children: [
|
|
2500
|
-
/* @__PURE__ */ s(xt, { name: "matchCase", value: I, onChange:
|
|
2487
|
+
/* @__PURE__ */ s(xt, { name: "matchCase", value: I, onChange: T, children: "Match Case" }),
|
|
2501
2488
|
/* @__PURE__ */ s(xt, { name: "wholeWord", value: D, onChange: E, children: "Whole Word" })
|
|
2502
2489
|
] })
|
|
2503
2490
|
] }),
|
|
2504
2491
|
/* @__PURE__ */ O("div", { className: ie["rp-search-tool-controls"], children: [
|
|
2505
|
-
/* @__PURE__ */ s(X, { onClick: m, children: /* @__PURE__ */ s(
|
|
2492
|
+
/* @__PURE__ */ s(X, { onClick: m, children: /* @__PURE__ */ s(Re, { className: ie["rp-search-tool-input-icon"] }) }),
|
|
2506
2493
|
/* @__PURE__ */ s(X, { onClick: u, children: /* @__PURE__ */ s(
|
|
2507
|
-
|
|
2494
|
+
Re,
|
|
2508
2495
|
{
|
|
2509
2496
|
style: { transform: "rotate(180deg" },
|
|
2510
2497
|
className: ie["rp-search-tool-input-icon"]
|
|
@@ -2515,56 +2502,56 @@ const ge = {
|
|
|
2515
2502
|
] })
|
|
2516
2503
|
}
|
|
2517
2504
|
) : null;
|
|
2518
|
-
},
|
|
2505
|
+
}, ia = "_loading_1snj5_1", Ce = {
|
|
2519
2506
|
"rp-loading-overlay": "_rp-loading-overlay_1snj5_1",
|
|
2520
2507
|
"rp-loading-modal": "_rp-loading-modal_1snj5_14",
|
|
2521
2508
|
"rp-loading-title": "_rp-loading-title_1snj5_27",
|
|
2522
2509
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_1snj5_35",
|
|
2523
2510
|
"rp-loading-progress": "_rp-loading-progress_1snj5_35",
|
|
2524
2511
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_1snj5_52",
|
|
2525
|
-
loading:
|
|
2526
|
-
},
|
|
2512
|
+
loading: ia
|
|
2513
|
+
}, ca = ({ percentage: e }) => {
|
|
2527
2514
|
const { cancel: t } = wt();
|
|
2528
|
-
return e < 1 ? null : /* @__PURE__ */ s("div", { className: Q(
|
|
2529
|
-
/* @__PURE__ */ s("div", { className: Q(
|
|
2530
|
-
/* @__PURE__ */ s("div", { className: Q(
|
|
2515
|
+
return e < 1 ? null : /* @__PURE__ */ s("div", { className: Q(Ce["rp-loading-overlay"]), children: /* @__PURE__ */ O("div", { className: Q(Ce["rp-loading-modal"]), children: [
|
|
2516
|
+
/* @__PURE__ */ s("div", { className: Q(Ce["rp-loading-title"]), children: "Preparing document..." }),
|
|
2517
|
+
/* @__PURE__ */ s("div", { className: Q(Ce["rp-loading-progress-bar"]), children: /* @__PURE__ */ s(
|
|
2531
2518
|
"div",
|
|
2532
2519
|
{
|
|
2533
|
-
className: Q(
|
|
2520
|
+
className: Q(Ce["rp-loading-progress"]),
|
|
2534
2521
|
style: { width: `${e}%` }
|
|
2535
2522
|
}
|
|
2536
2523
|
) }),
|
|
2537
|
-
/* @__PURE__ */ s("button", { className: Q(
|
|
2524
|
+
/* @__PURE__ */ s("button", { className: Q(Ce["rp-loading-cancel-button"]), onClick: t, children: "Cancel" })
|
|
2538
2525
|
] }) });
|
|
2539
|
-
},
|
|
2526
|
+
}, la = $e((e, t) => {
|
|
2540
2527
|
const { showPrintProgress: n } = de(), { progress: r } = wt(), { isSmallScreen: o } = _e(), { percentage: a } = r || {}, c = () => o ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2541
2528
|
return /* @__PURE__ */ O("div", { children: [
|
|
2542
|
-
/* @__PURE__ */ s("div", { "data-rp": "topBar", ref: t, className:
|
|
2543
|
-
/* @__PURE__ */ O("div", { "data-rp": "topBarLeft", className:
|
|
2544
|
-
/* @__PURE__ */ s(
|
|
2545
|
-
/* @__PURE__ */ s(
|
|
2529
|
+
/* @__PURE__ */ s("div", { "data-rp": "topBar", ref: t, className: Te["rp-toolbar-content"], children: /* @__PURE__ */ O("div", { className: Te["rp-toolbar-wrapper"], style: c(), children: [
|
|
2530
|
+
/* @__PURE__ */ O("div", { "data-rp": "topBarLeft", className: Te["rp-toolbar-start"], children: [
|
|
2531
|
+
/* @__PURE__ */ s(sa, {}),
|
|
2532
|
+
/* @__PURE__ */ s(yo, {})
|
|
2546
2533
|
] }),
|
|
2547
|
-
/* @__PURE__ */ s("div", { "data-rp": "topBarCenter", className:
|
|
2548
|
-
/* @__PURE__ */ s("div", { "data-rp": "topBarRight", className:
|
|
2534
|
+
/* @__PURE__ */ s("div", { "data-rp": "topBarCenter", className: Te["rp-toolbar-middle"], children: /* @__PURE__ */ s(aa, {}) }),
|
|
2535
|
+
/* @__PURE__ */ s("div", { "data-rp": "topBarRight", className: Te["rp-toolbar-end"], children: /* @__PURE__ */ s(ea, {}) })
|
|
2549
2536
|
] }) }),
|
|
2550
|
-
n && a ? /* @__PURE__ */ s(
|
|
2537
|
+
n && a ? /* @__PURE__ */ s(ca, { percentage: a }) : null
|
|
2551
2538
|
] });
|
|
2552
2539
|
}), ot = {
|
|
2553
2540
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_4wlw3_1",
|
|
2554
2541
|
"rp-sidebar-content": "_rp-sidebar-content_4wlw3_1",
|
|
2555
2542
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_4wlw3_16",
|
|
2556
2543
|
"rp-thumbnail-dragging": "_rp-thumbnail-dragging_4wlw3_21"
|
|
2557
|
-
},
|
|
2544
|
+
}, Ie = {
|
|
2558
2545
|
"rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
|
|
2559
2546
|
"rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
|
|
2560
2547
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2561
2548
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2562
2549
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2563
|
-
},
|
|
2564
|
-
const { thumbnailSrc: t, pageNumber: n, isFocused: r, viewport: o } = e, { goToPage: a } = oe(), c = A(() => r ?
|
|
2550
|
+
}, ua = (e) => {
|
|
2551
|
+
const { thumbnailSrc: t, pageNumber: n, isFocused: r, viewport: o } = e, { goToPage: a } = oe(), c = A(() => r ? Ie["rp-thumbnail-active"] : "", [r]), i = A(() => ({
|
|
2565
2552
|
width: Math.round(o.width),
|
|
2566
2553
|
height: Math.round(o.height)
|
|
2567
|
-
}), [o]), l =
|
|
2554
|
+
}), [o]), l = N(() => {
|
|
2568
2555
|
n && a(n);
|
|
2569
2556
|
}, [a, n]);
|
|
2570
2557
|
return /* @__PURE__ */ O(
|
|
@@ -2572,9 +2559,9 @@ const ge = {
|
|
|
2572
2559
|
{
|
|
2573
2560
|
onClick: l,
|
|
2574
2561
|
id: `page-${n}`,
|
|
2575
|
-
className:
|
|
2562
|
+
className: Ie["rp-thumbnail-wrapper"],
|
|
2576
2563
|
children: [
|
|
2577
|
-
/* @__PURE__ */ s("div", { className: Q(c,
|
|
2564
|
+
/* @__PURE__ */ s("div", { className: Q(c, Ie["rp-thumbnail"]), children: t ? /* @__PURE__ */ s(
|
|
2578
2565
|
"img",
|
|
2579
2566
|
{
|
|
2580
2567
|
src: t,
|
|
@@ -2585,7 +2572,7 @@ const ge = {
|
|
|
2585
2572
|
) : /* @__PURE__ */ s(
|
|
2586
2573
|
"div",
|
|
2587
2574
|
{
|
|
2588
|
-
className:
|
|
2575
|
+
className: Ie["rp-thumbnail-loader"],
|
|
2589
2576
|
style: {
|
|
2590
2577
|
width: `${i.width}px`,
|
|
2591
2578
|
height: `${i.height}px`
|
|
@@ -2593,29 +2580,29 @@ const ge = {
|
|
|
2593
2580
|
children: /* @__PURE__ */ s(mt, {})
|
|
2594
2581
|
}
|
|
2595
2582
|
) }),
|
|
2596
|
-
/* @__PURE__ */ s("div", { className:
|
|
2583
|
+
/* @__PURE__ */ s("div", { className: Ie["rp-thumbnail-text"], children: n })
|
|
2597
2584
|
]
|
|
2598
2585
|
}
|
|
2599
2586
|
);
|
|
2600
2587
|
}, qt = {
|
|
2601
2588
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2602
2589
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2603
|
-
},
|
|
2590
|
+
}, da = 16, pa = (e, t) => {
|
|
2604
2591
|
const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
|
|
2605
|
-
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
2606
|
-
},
|
|
2592
|
+
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - da);
|
|
2593
|
+
}, ha = $e((e, t) => {
|
|
2607
2594
|
const { show: n } = e, { focusedPage: r, totalPages: o } = oe(), { thumbnailPages: a, addPage: c, thumbnailLength: i, addToPage: l } = sn(), p = $(null), h = $(1);
|
|
2608
2595
|
Zt(t, () => p.current);
|
|
2609
|
-
const f = A(() => Object.values(a), [a]), u =
|
|
2596
|
+
const f = A(() => Object.values(a), [a]), u = N(() => {
|
|
2610
2597
|
const m = i + 1;
|
|
2611
2598
|
m <= o && c(m);
|
|
2612
2599
|
}, [c, o, i]);
|
|
2613
2600
|
return F(() => {
|
|
2614
|
-
r > i ? l(r) : n && h.current !== r && (
|
|
2601
|
+
r > i ? l(r) : n && h.current !== r && (pa(p.current, r), h.current = r);
|
|
2615
2602
|
}, [r, i, l, n, f]), Qn(p.current, u), /* @__PURE__ */ s("div", { ref: p, className: qt["rp-thumbnails-container"], children: /* @__PURE__ */ s("div", { className: qt["rp-thumbnails"], children: n ? f.map((m, g) => {
|
|
2616
2603
|
var _, v;
|
|
2617
2604
|
return /* @__PURE__ */ s(
|
|
2618
|
-
|
|
2605
|
+
ua,
|
|
2619
2606
|
{
|
|
2620
2607
|
isFocused: r === ((_ = m.page) == null ? void 0 : _.pageNumber),
|
|
2621
2608
|
pageNumber: (v = m.page) == null ? void 0 : v.pageNumber,
|
|
@@ -2626,13 +2613,13 @@ const ge = {
|
|
|
2626
2613
|
g
|
|
2627
2614
|
);
|
|
2628
2615
|
}) : null }) });
|
|
2629
|
-
}),
|
|
2616
|
+
}), ma = () => {
|
|
2630
2617
|
const { thumbnailIcon: e } = ce();
|
|
2631
2618
|
return e || /* @__PURE__ */ s(Yn, {});
|
|
2632
|
-
},
|
|
2633
|
-
const { active: e, setActive: t } = sn(), [n, r] = W(200), o = $(null), { thumbnailTool: a } = de(), c =
|
|
2619
|
+
}, fa = () => {
|
|
2620
|
+
const { active: e, setActive: t } = sn(), [n, r] = W(200), o = $(null), { thumbnailTool: a } = de(), c = N(() => {
|
|
2634
2621
|
t((l) => !l);
|
|
2635
|
-
}, []), i = A(() => typeof a != "boolean" && a ? /* @__PURE__ */ s(a, { onClick: c, active: e }) : a ? /* @__PURE__ */ s(ee, { content: "Thumbnail", children: /* @__PURE__ */ s(X, { onClick: c, active: e, children: /* @__PURE__ */ s(
|
|
2622
|
+
}, []), i = A(() => typeof a != "boolean" && a ? /* @__PURE__ */ s(a, { onClick: c, active: e }) : a ? /* @__PURE__ */ s(ee, { content: "Thumbnail", children: /* @__PURE__ */ s(X, { onClick: c, active: e, children: /* @__PURE__ */ s(ma, {}) }) }) : null, [a, e, c]);
|
|
2636
2623
|
return /* @__PURE__ */ O(
|
|
2637
2624
|
"div",
|
|
2638
2625
|
{
|
|
@@ -2642,17 +2629,17 @@ const ge = {
|
|
|
2642
2629
|
children: [
|
|
2643
2630
|
/* @__PURE__ */ s("div", { className: ot["rp-sidebar-content"], children: i }),
|
|
2644
2631
|
/* @__PURE__ */ O("div", { "data-rp": "thumbnailSidebar", hidden: !e, className: ot["rp-thumbnails-wrapper"], children: [
|
|
2645
|
-
/* @__PURE__ */ s(
|
|
2632
|
+
/* @__PURE__ */ s(ha, { show: e, ref: o }),
|
|
2646
2633
|
/* @__PURE__ */ s(er, { onWidthChange: r, thumbnailRef: o })
|
|
2647
2634
|
] })
|
|
2648
2635
|
]
|
|
2649
2636
|
}
|
|
2650
2637
|
);
|
|
2651
|
-
},
|
|
2638
|
+
}, Zs = $e((e, t) => {
|
|
2652
2639
|
const { children: n, slots: r, icons: o, style: a, className: c, onLoaded: i, cleanupOnLoaded: l } = e, [p, h] = W(null), { setContainer: f, setContentRef: u } = Ne();
|
|
2653
2640
|
return F(() => (i && i(), () => {
|
|
2654
2641
|
l && l();
|
|
2655
|
-
}), [i, l]), /* @__PURE__ */ s("div", { ref: t, className: Q(
|
|
2642
|
+
}), [i, l]), /* @__PURE__ */ s("div", { ref: t, className: Q(we["rp-theme-variables"], we["rp-container"]), children: /* @__PURE__ */ s(tr, { slots: r, children: /* @__PURE__ */ s(nr, { icons: o, children: /* @__PURE__ */ s(
|
|
2656
2643
|
rr,
|
|
2657
2644
|
{
|
|
2658
2645
|
getContainerRef: f,
|
|
@@ -2660,11 +2647,11 @@ const ge = {
|
|
|
2660
2647
|
style: a,
|
|
2661
2648
|
className: c,
|
|
2662
2649
|
children: /* @__PURE__ */ O(or, { children: [
|
|
2663
|
-
/* @__PURE__ */ O("div", { className:
|
|
2664
|
-
/* @__PURE__ */ s(
|
|
2665
|
-
/* @__PURE__ */ O("div", { className:
|
|
2666
|
-
/* @__PURE__ */ s("div", { className:
|
|
2667
|
-
/* @__PURE__ */ s("div", { ref: u, className:
|
|
2650
|
+
/* @__PURE__ */ O("div", { className: we["rp-layout"], children: [
|
|
2651
|
+
/* @__PURE__ */ s(la, { ref: h }),
|
|
2652
|
+
/* @__PURE__ */ O("div", { className: we["rp-content"], children: [
|
|
2653
|
+
/* @__PURE__ */ s("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ s(fa, {}) }),
|
|
2654
|
+
/* @__PURE__ */ s("div", { ref: u, className: we["rp-pages"], children: n })
|
|
2668
2655
|
] })
|
|
2669
2656
|
] }),
|
|
2670
2657
|
/* @__PURE__ */ s(ar, {})
|
|
@@ -2673,45 +2660,45 @@ const ge = {
|
|
|
2673
2660
|
) }) }) });
|
|
2674
2661
|
});
|
|
2675
2662
|
export {
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2663
|
+
Qr as A,
|
|
2664
|
+
ua as B,
|
|
2665
|
+
Ur as C,
|
|
2666
|
+
bo as D,
|
|
2667
|
+
ha as E,
|
|
2681
2668
|
En as F,
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2669
|
+
fa as G,
|
|
2670
|
+
ca as L,
|
|
2671
|
+
Yo as M,
|
|
2672
|
+
Qo as O,
|
|
2673
|
+
Ws as P,
|
|
2674
|
+
Vs as R,
|
|
2675
|
+
Gs as S,
|
|
2676
|
+
$s as T,
|
|
2677
|
+
aa as Z,
|
|
2678
|
+
Hs as a,
|
|
2679
|
+
Zs as b,
|
|
2680
|
+
Uo as c,
|
|
2694
2681
|
wt as d,
|
|
2695
2682
|
ln as e,
|
|
2696
2683
|
nn as f,
|
|
2697
|
-
|
|
2684
|
+
Hr as g,
|
|
2698
2685
|
rn as h,
|
|
2699
|
-
|
|
2686
|
+
$r as i,
|
|
2700
2687
|
on as j,
|
|
2701
|
-
|
|
2688
|
+
Gr as k,
|
|
2702
2689
|
an as l,
|
|
2703
2690
|
sn as m,
|
|
2704
|
-
|
|
2691
|
+
Vr as n,
|
|
2705
2692
|
cn as o,
|
|
2706
|
-
|
|
2693
|
+
qr as p,
|
|
2707
2694
|
bt as q,
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2695
|
+
vo as r,
|
|
2696
|
+
Co as s,
|
|
2697
|
+
yo as t,
|
|
2711
2698
|
oe as u,
|
|
2712
|
-
|
|
2699
|
+
Go as v,
|
|
2713
2700
|
An as w,
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2701
|
+
ea as x,
|
|
2702
|
+
sa as y,
|
|
2703
|
+
la as z
|
|
2717
2704
|
};
|