@pdf-viewer/react 1.8.0-rc.2 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Popover-1faa77f6.js → Popover-48c8394c.js} +2 -2
- package/dist/{RPDefaultLayout-2cca5d34.js → RPDefaultLayout-4b330ca1.js} +571 -565
- package/dist/{component-1da194e8.js → component-2aa6e53b.js} +1 -1
- package/dist/components/RPConfig.js +691 -673
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +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/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +2 -2
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- 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/RotateTool.js +1 -1
- package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +2 -2
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +2 -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/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/Checkbox.js +228 -116
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/Popover.js +1 -1
- package/dist/components/ui/RPTooltip.js +207 -207
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/{floating-ui.react-dom-15b9b819.js → floating-ui.react-dom-4b1e2e46.js} +394 -380
- package/dist/index-6e0e48fa.js +332 -0
- package/dist/{index-7279fb4e.js → index-951f0f1f.js} +464 -456
- package/dist/index-e3a67935.js +150 -0
- package/dist/main.js +1 -1
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/package.json +1 -1
- package/dist/index-1cb41342.js +0 -307
- package/dist/index-aa2d3884.js +0 -140
|
@@ -4,7 +4,7 @@ import { useRef as H, useEffect as F, useCallback as N, useState as $, useMemo a
|
|
|
4
4
|
import { ChevronUpIcon as He } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as re } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as dn } from "./components/ui/Input.js";
|
|
7
|
-
import { ViewMode as Re, ScrollMode as Q, AnnotationSubType as
|
|
7
|
+
import { ViewMode as Re, ScrollMode as Q, AnnotationSubType as zt, SelectionMode as nr, ZoomLevel as st } from "./utils/types.js";
|
|
8
8
|
import { useScrollModeContext as Ee } from "./contexts/ScrollModeContext.js";
|
|
9
9
|
import { useDocumentContext as ee } from "./contexts/RPDocumentContext.js";
|
|
10
10
|
import { useDocumentPasswordContext as rr } from "./contexts/DocumentPasswordContext.js";
|
|
@@ -20,7 +20,7 @@ import { useInitialStateContext as sr } from "./contexts/InitialStateContext.js"
|
|
|
20
20
|
import { useFullScreenContext as cr } from "./contexts/FullScreenContext.js";
|
|
21
21
|
import "./contexts/FileInputContext.js";
|
|
22
22
|
import "./contexts/DropFileZoneContext.js";
|
|
23
|
-
import { renderPage as
|
|
23
|
+
import { renderPage as wt } from "./utils/renderPage.js";
|
|
24
24
|
import { findMatches as lr, resetDivs as dr, highlightMatches as ur, isMatchEntireWord as pr } from "./utils/highlight.js";
|
|
25
25
|
import { useLayoutContainer as me } from "./contexts/LayoutContainerContext.js";
|
|
26
26
|
import { useDimensionPagesContext as Ge } from "./contexts/DimensionPagesContext.js";
|
|
@@ -35,7 +35,7 @@ import { useLoaderContext as hn } from "./contexts/LoaderContext.js";
|
|
|
35
35
|
import "./components/RPConfig.js";
|
|
36
36
|
import { ThumbnailIcon as mr } from "./components/icons/Thumbnail.js";
|
|
37
37
|
import { c as ne } from "./clsx-0c6e471a.js";
|
|
38
|
-
import { LoaderIcon as
|
|
38
|
+
import { LoaderIcon as Pt } from "./components/icons/LoaderIcon.js";
|
|
39
39
|
import { useInfiniteScroll as gr } from "./utils/hooks/useInfiniteScroll.js";
|
|
40
40
|
import { RPSplitter as vr } from "./components/layout/sidebar/RPSplitter.js";
|
|
41
41
|
import { useToolbarComponentContext as ge, ToolbarComponentProvider as wr } from "./contexts/ToolbarComponentContext.js";
|
|
@@ -49,29 +49,29 @@ import { useThemeContext as Sr } from "./contexts/ThemeContext.js";
|
|
|
49
49
|
import * as yr from "pdfjs-dist";
|
|
50
50
|
import { PixelsPerInch as xr, AnnotationMode as Ir, RenderingCancelledException as Rr, AnnotationLayer as Lr } from "pdfjs-dist";
|
|
51
51
|
import { SimpleLinkService as Er } from "./utils/link_service.js";
|
|
52
|
-
import { annotationsEvents as Nr, annotationEventsHandler as Or, handleClick as At, handleAnnotationWidget as
|
|
52
|
+
import { annotationsEvents as Nr, annotationEventsHandler as Or, handleClick as At, handleAnnotationWidget as Dr, handleAnnotationLink as zr, bindLayerEvents as Ar, unbindLayerEvents as Ft } from "./utils/annotations.js";
|
|
53
53
|
import { normalizeSingleKeyword as Fr, sortHighlightPosition as Wr, unwrap as kr } from "./components/page/searchHighlight.js";
|
|
54
54
|
import { CustomElement as Mr } from "./components/page/CustomElement.js";
|
|
55
|
-
import { _ as Hr, U as $r } from "./Popover-
|
|
55
|
+
import { _ as Hr, U as $r } from "./Popover-48c8394c.js";
|
|
56
56
|
import { useMousePressed as Gr } from "./utils/hooks/useMousePressed.js";
|
|
57
57
|
import { useGrabScroll as Ur } from "./utils/hooks/useGrabScroll.js";
|
|
58
58
|
import { usePinch as Vr } from "./utils/hooks/usePinch.js";
|
|
59
|
-
import { useDebounce as
|
|
59
|
+
import { useDebounce as Tt } from "./utils/hooks/useDebounce.js";
|
|
60
60
|
import qr from "./components/ui/PasswordModal.js";
|
|
61
61
|
import { getPositionFromPage as Br, getPageFromPosition as Zr } from "./utils/calculatePage.js";
|
|
62
62
|
import { getScrollDistance as Ae } from "./utils/getScrollDistance.js";
|
|
63
63
|
import { getWordPositionInPage as jr } from "./utils/getWordPositionInPage.js";
|
|
64
64
|
import { getThumbnailViewport as Wt } from "./utils/getThumbnailViewport.js";
|
|
65
|
-
import { smoothScrollTo as
|
|
65
|
+
import { smoothScrollTo as ct } from "./utils/smoothScrollTo.js";
|
|
66
66
|
import { appConsole as Kr } from "./utils/appConsole.js";
|
|
67
67
|
import { FileUploadTool as fn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
68
68
|
import { DarkModeTool as Xr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
69
69
|
import { ThreeDotIcon as Yr } from "./components/icons/ThreeDotIcon.js";
|
|
70
70
|
import { UIDropDown as mn } from "./components/ui/DropDown.js";
|
|
71
|
-
import {
|
|
72
|
-
import { D as no,
|
|
73
|
-
import { a as ro, u as oo, F as io, b as ao, G as Ke } from "./index-
|
|
74
|
-
import { h as so } from "./component-
|
|
71
|
+
import { c as Jr, u as St, P as Ve, a as Me, b as yt, k as Qr, e as eo, i as to } from "./index-6e0e48fa.js";
|
|
72
|
+
import { D as no, a as lt } from "./index-e3a67935.js";
|
|
73
|
+
import { a as ro, u as oo, F as io, b as ao, G as Ke } from "./index-951f0f1f.js";
|
|
74
|
+
import { h as so } from "./component-2aa6e53b.js";
|
|
75
75
|
import { CloseIcon as co } from "./components/icons/CloseIcon.js";
|
|
76
76
|
import { dateFormatter as kt } from "./utils/dateFormatter.js";
|
|
77
77
|
import { PropertyItem as lo } from "./components/layout/toolbar/PropertyItem.js";
|
|
@@ -80,7 +80,7 @@ import { DocumentProperties as ho } from "./components/layout/toolbar/DocumentPr
|
|
|
80
80
|
import { RotateTool as fo } from "./components/layout/toolbar/RotateTool.js";
|
|
81
81
|
import { ViewModeTool as mo } from "./components/layout/toolbar/ViewModeTool.js";
|
|
82
82
|
import { ScrollModeTool as go } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
83
|
-
import { MenuSeparator as
|
|
83
|
+
import { MenuSeparator as xt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
84
84
|
import { FileDownloadDefaultIcon as vo } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
85
85
|
import { MenuItem as Ce } from "./components/layout/toolbar/MenuItem.js";
|
|
86
86
|
import { PrintDefaultTool as wo } from "./components/icons/PrintDefaultIcon.js";
|
|
@@ -104,17 +104,17 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
104
104
|
m.current = e, v.current = t;
|
|
105
105
|
}, [e, t]);
|
|
106
106
|
const P = N(
|
|
107
|
-
(
|
|
107
|
+
(_, y) => {
|
|
108
108
|
if (!r)
|
|
109
109
|
return;
|
|
110
|
-
const h = Math.ceil(
|
|
111
|
-
if (
|
|
110
|
+
const h = Math.ceil(_ / 2) * 2 - 1;
|
|
111
|
+
if (_ === h + 1) {
|
|
112
112
|
const g = {
|
|
113
113
|
left: u[h],
|
|
114
114
|
top: 0
|
|
115
115
|
};
|
|
116
116
|
return new Promise(
|
|
117
|
-
(s) =>
|
|
117
|
+
(s) => ct(r, g, s)
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
120
|
const f = {
|
|
@@ -123,51 +123,51 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
123
123
|
};
|
|
124
124
|
return r == null ? void 0 : r.scrollTo({
|
|
125
125
|
...f,
|
|
126
|
-
behavior:
|
|
126
|
+
behavior: y
|
|
127
127
|
});
|
|
128
128
|
},
|
|
129
|
-
[r, u,
|
|
129
|
+
[r, u, ct]
|
|
130
130
|
);
|
|
131
131
|
return F(() => {
|
|
132
132
|
m.current = e, v.current = t;
|
|
133
133
|
}, [e, t]), F(() => {
|
|
134
134
|
p.current = c;
|
|
135
135
|
}, [c]), { scrollToPage: N(
|
|
136
|
-
(
|
|
137
|
-
a(
|
|
138
|
-
const h =
|
|
136
|
+
(_, y = "smooth") => {
|
|
137
|
+
a(_);
|
|
138
|
+
const h = _ - 1;
|
|
139
139
|
let f = h, g = 0;
|
|
140
140
|
if (v.current === Re.DUAL_PAGE && m.current === Q.PAGE_SCROLLING) {
|
|
141
|
-
P(
|
|
141
|
+
P(_, y);
|
|
142
142
|
return;
|
|
143
143
|
}
|
|
144
144
|
if (m.current === Q.PAGE_SCROLLING) {
|
|
145
|
-
a(
|
|
145
|
+
a(_);
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
148
|
if (!l.current || !o)
|
|
149
149
|
return;
|
|
150
150
|
const s = o;
|
|
151
|
-
if (w.current =
|
|
151
|
+
if (w.current = _, m.current === Q.HORIZONTAL_SCROLLING) {
|
|
152
152
|
g = h;
|
|
153
|
-
const
|
|
153
|
+
const T = {
|
|
154
154
|
left: Ae(u, g),
|
|
155
155
|
top: 0
|
|
156
156
|
};
|
|
157
157
|
return s.scrollTo({
|
|
158
|
-
...
|
|
159
|
-
behavior:
|
|
158
|
+
...T,
|
|
159
|
+
behavior: y
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
162
|
if (v.current === Re.DUAL_PAGE) {
|
|
163
163
|
g = h % 2, f = Math.floor(h / 2);
|
|
164
|
-
const
|
|
164
|
+
const T = {
|
|
165
165
|
left: Ae(u, g),
|
|
166
166
|
top: Ae(d, f)
|
|
167
167
|
};
|
|
168
168
|
return s.scrollTo({
|
|
169
|
-
...
|
|
170
|
-
behavior:
|
|
169
|
+
...T,
|
|
170
|
+
behavior: y
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
const C = {
|
|
@@ -176,7 +176,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
176
176
|
};
|
|
177
177
|
return s.scrollTo({
|
|
178
178
|
...C,
|
|
179
|
-
behavior:
|
|
179
|
+
behavior: y
|
|
180
180
|
});
|
|
181
181
|
},
|
|
182
182
|
[
|
|
@@ -184,13 +184,13 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
184
184
|
c,
|
|
185
185
|
P,
|
|
186
186
|
a,
|
|
187
|
-
|
|
187
|
+
ct,
|
|
188
188
|
d,
|
|
189
189
|
u
|
|
190
190
|
]
|
|
191
191
|
) };
|
|
192
192
|
}, yo = (t = 1) => {
|
|
193
|
-
const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ne(), { scrollMode: u } = Ee(), { widths: d } = Ge(), { pagesRef: m } = me(), v =
|
|
193
|
+
const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ne(), { scrollMode: u } = Ee(), { widths: d } = Ge(), { pagesRef: m } = me(), v = Tt(e, 100), p = N(
|
|
194
194
|
(f) => {
|
|
195
195
|
if (!/^[0-9]*$/g.test(f.toString()) || !f)
|
|
196
196
|
return { success: !1, currentPage: l.current };
|
|
@@ -204,28 +204,28 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
204
204
|
return g.success && a(g.currentPage), g;
|
|
205
205
|
},
|
|
206
206
|
[p, a]
|
|
207
|
-
),
|
|
207
|
+
), S = N((f) => {
|
|
208
208
|
const g = f % 2 === 1;
|
|
209
209
|
if (!m || g)
|
|
210
210
|
return !1;
|
|
211
211
|
const s = g ? d[f] : d[f - 1], C = g ? d[f + 1] : d[f];
|
|
212
212
|
return c === Re.DUAL_PAGE && s + C < m.clientWidth;
|
|
213
|
-
}, [c, d, m, o]),
|
|
213
|
+
}, [c, d, m, o]), _ = N(() => {
|
|
214
214
|
let f = e - 1;
|
|
215
|
-
|
|
216
|
-
}, [P, e, c, u,
|
|
217
|
-
if (
|
|
215
|
+
S(f) && (f = e - 2), P(f);
|
|
216
|
+
}, [P, e, c, u, S]), y = k(() => c === Re.DUAL_PAGE && u === Q.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, c, u]), h = N(() => {
|
|
217
|
+
if (y)
|
|
218
218
|
return;
|
|
219
219
|
let f = e + 1;
|
|
220
|
-
|
|
221
|
-
}, [P, e,
|
|
220
|
+
S(f) && (f = e + 2), P(f);
|
|
221
|
+
}, [P, e, S, c, u, y]);
|
|
222
222
|
return {
|
|
223
223
|
focusedPage: v,
|
|
224
224
|
totalPages: o,
|
|
225
225
|
setFocusedPage: w,
|
|
226
226
|
setTotalPages: r,
|
|
227
227
|
nextPage: h,
|
|
228
|
-
prevPage:
|
|
228
|
+
prevPage: _,
|
|
229
229
|
goToPage: P
|
|
230
230
|
};
|
|
231
231
|
}, _n = Ye({
|
|
@@ -243,7 +243,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
243
243
|
}), ie = () => {
|
|
244
244
|
const t = Je(_n);
|
|
245
245
|
return typeof (t == null ? void 0 : t.focusedPage) > "u" && Kr.error("Please use this hooks inside children component of RPProvider"), t;
|
|
246
|
-
},
|
|
246
|
+
}, Us = ({ children: t }) => {
|
|
247
247
|
const { pdf: e } = ee(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: l, nextPage: c, prevPage: u } = yo();
|
|
248
248
|
return F(() => {
|
|
249
249
|
e != null && e.numPages && (a(e.numPages), r(1));
|
|
@@ -289,19 +289,19 @@ const xo = () => {
|
|
|
289
289
|
pdfDocument: g,
|
|
290
290
|
pageNumber: s,
|
|
291
291
|
viewerPdfPage: C,
|
|
292
|
-
printResolution:
|
|
293
|
-
optionalContentConfigPromise:
|
|
292
|
+
printResolution: b,
|
|
293
|
+
optionalContentConfigPromise: T,
|
|
294
294
|
printAnnotationStoragePromise: E
|
|
295
295
|
}) => {
|
|
296
296
|
if (m.current) {
|
|
297
297
|
p();
|
|
298
298
|
return;
|
|
299
299
|
}
|
|
300
|
-
const x =
|
|
300
|
+
const x = b / xr.PDF;
|
|
301
301
|
f.width = Math.floor(C.width * x), f.height = Math.floor(C.height * x);
|
|
302
302
|
const R = f.getContext("2d");
|
|
303
303
|
R.save(), R.fillStyle = "rgb(255, 255, 255)", R.fillRect(0, 0, f.width, f.height), R.restore();
|
|
304
|
-
const [
|
|
304
|
+
const [D, z] = await Promise.all([
|
|
305
305
|
g.getPage(s),
|
|
306
306
|
E
|
|
307
307
|
]);
|
|
@@ -312,51 +312,51 @@ const xo = () => {
|
|
|
312
312
|
const A = {
|
|
313
313
|
canvasContext: R,
|
|
314
314
|
transform: [x, 0, 0, x, 0, 0],
|
|
315
|
-
viewport:
|
|
315
|
+
viewport: D.getViewport({ scale: 1, rotation: C.rotation }),
|
|
316
316
|
intent: "print",
|
|
317
317
|
annotationMode: Ir.ENABLE_STORAGE,
|
|
318
|
-
optionalContentConfigPromise:
|
|
319
|
-
printAnnotationStorage:
|
|
318
|
+
optionalContentConfigPromise: T,
|
|
319
|
+
printAnnotationStorage: z
|
|
320
320
|
};
|
|
321
321
|
try {
|
|
322
|
-
return
|
|
322
|
+
return D.render(A).promise;
|
|
323
323
|
} catch (L) {
|
|
324
324
|
throw L instanceof Rr || console.error(L), L;
|
|
325
325
|
}
|
|
326
|
-
},
|
|
326
|
+
}, S = N(() => {
|
|
327
327
|
const f = window.print;
|
|
328
328
|
return new Promise((g) => {
|
|
329
|
-
const s = (
|
|
329
|
+
const s = (T) => {
|
|
330
330
|
setTimeout(() => {
|
|
331
|
-
f.call(window), setTimeout(() =>
|
|
331
|
+
f.call(window), setTimeout(() => T(), 20);
|
|
332
332
|
}, 0);
|
|
333
333
|
};
|
|
334
334
|
if (document.querySelector(".rp-print-zone")) {
|
|
335
335
|
s(g);
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
|
-
const
|
|
339
|
-
document.querySelector(".rp-print-zone") && (s(g),
|
|
338
|
+
const b = new MutationObserver(() => {
|
|
339
|
+
document.querySelector(".rp-print-zone") && (s(g), b.disconnect());
|
|
340
340
|
});
|
|
341
|
-
|
|
341
|
+
b.observe(document.body, { childList: !0, subtree: !0 });
|
|
342
342
|
});
|
|
343
|
-
}, []),
|
|
343
|
+
}, []), _ = async (f) => {
|
|
344
344
|
const g = document.createElement("img"), s = document.createElement("div");
|
|
345
|
-
return s.classList.add("rp-print-page"), await new Promise((C,
|
|
346
|
-
f.toBlob((
|
|
347
|
-
|
|
345
|
+
return s.classList.add("rp-print-page"), await new Promise((C, b) => {
|
|
346
|
+
f.toBlob((T) => {
|
|
347
|
+
T ? (g.src = URL.createObjectURL(T), g.onload = () => {
|
|
348
348
|
URL.revokeObjectURL(g.src), C();
|
|
349
|
-
}, g.onerror =
|
|
349
|
+
}, g.onerror = b) : b(new Error("Failed to create blob"));
|
|
350
350
|
});
|
|
351
351
|
}).catch(() => {
|
|
352
352
|
}), s.appendChild(g), s;
|
|
353
|
-
},
|
|
353
|
+
}, y = (f, g) => {
|
|
354
354
|
const s = document.createElement("div");
|
|
355
355
|
s.classList.add("rp-print-zone");
|
|
356
|
-
const C = document.createElement("style"),
|
|
357
|
-
if (
|
|
358
|
-
const { width:
|
|
359
|
-
C.innerHTML = `@page { size: ${
|
|
356
|
+
const C = document.createElement("style"), b = g.get(1);
|
|
357
|
+
if (b) {
|
|
358
|
+
const { width: T, height: E } = b == null ? void 0 : b.page.getViewport({ scale: 1 });
|
|
359
|
+
C.innerHTML = `@page { size: ${T}px ${E}px }`;
|
|
360
360
|
}
|
|
361
361
|
return s.appendChild(C), s.append(...f), s;
|
|
362
362
|
}, h = N(async () => {
|
|
@@ -366,33 +366,33 @@ const xo = () => {
|
|
|
366
366
|
const f = document.createElement("canvas"), g = [];
|
|
367
367
|
try {
|
|
368
368
|
t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
369
|
-
const C = t.getOptionalContentConfig({ intent: "print" }),
|
|
369
|
+
const C = t.getOptionalContentConfig({ intent: "print" }), b = Promise.resolve(
|
|
370
370
|
t.annotationStorage.print ?? void 0
|
|
371
|
-
),
|
|
371
|
+
), T = e.size;
|
|
372
372
|
for (const [x, R] of e) {
|
|
373
373
|
if (m.current) {
|
|
374
374
|
p();
|
|
375
375
|
return;
|
|
376
376
|
}
|
|
377
|
-
const
|
|
377
|
+
const D = R.page.getViewport({ scale: 1 });
|
|
378
378
|
if (await P({
|
|
379
379
|
scratchCanvas: f,
|
|
380
380
|
pdfDocument: t,
|
|
381
381
|
pageNumber: x,
|
|
382
|
-
viewerPdfPage:
|
|
382
|
+
viewerPdfPage: D,
|
|
383
383
|
printResolution: 150,
|
|
384
384
|
optionalContentConfigPromise: C,
|
|
385
|
-
printAnnotationStoragePromise:
|
|
385
|
+
printAnnotationStoragePromise: b
|
|
386
386
|
}), m.current) {
|
|
387
387
|
p();
|
|
388
388
|
return;
|
|
389
389
|
}
|
|
390
|
-
const
|
|
391
|
-
g.push(
|
|
392
|
-
const A = parseFloat((g.length /
|
|
390
|
+
const z = await _(f);
|
|
391
|
+
g.push(z);
|
|
392
|
+
const A = parseFloat((g.length / T * 100).toFixed(2));
|
|
393
393
|
o({
|
|
394
394
|
loadedPages: x,
|
|
395
|
-
totalPages:
|
|
395
|
+
totalPages: T,
|
|
396
396
|
percentage: A
|
|
397
397
|
});
|
|
398
398
|
}
|
|
@@ -400,8 +400,8 @@ const xo = () => {
|
|
|
400
400
|
p();
|
|
401
401
|
return;
|
|
402
402
|
}
|
|
403
|
-
const E =
|
|
404
|
-
document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await
|
|
403
|
+
const E = y(g, e);
|
|
404
|
+
document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await S();
|
|
405
405
|
} catch (s) {
|
|
406
406
|
c(!0), s instanceof Error && d(s);
|
|
407
407
|
} finally {
|
|
@@ -440,29 +440,29 @@ const xo = () => {
|
|
|
440
440
|
console.error("Error in setOnError callback:", e);
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
}),
|
|
444
|
-
const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: u, isError: d, error: m } = xo(), v = N((
|
|
445
|
-
|
|
446
|
-
}, []), p = (
|
|
447
|
-
m &&
|
|
443
|
+
}), Vs = ({ children: t }) => {
|
|
444
|
+
const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: u, isError: d, error: m } = xo(), v = N((_) => {
|
|
445
|
+
_ && typeof _ == "function" && r(() => _);
|
|
446
|
+
}, []), p = (_) => {
|
|
447
|
+
m && _(m);
|
|
448
448
|
}, w = N(
|
|
449
|
-
(
|
|
450
|
-
n(() =>
|
|
449
|
+
(_) => {
|
|
450
|
+
n(() => _);
|
|
451
451
|
},
|
|
452
452
|
[c, e]
|
|
453
453
|
);
|
|
454
454
|
F(() => {
|
|
455
455
|
u && o && P();
|
|
456
456
|
}, [u, o]), F(() => {
|
|
457
|
-
d && p((
|
|
458
|
-
console.error(
|
|
457
|
+
d && p((_) => {
|
|
458
|
+
console.error(_);
|
|
459
459
|
});
|
|
460
460
|
}, [d]), F(() => {
|
|
461
461
|
c && e && e(c);
|
|
462
462
|
}, [c, e]);
|
|
463
463
|
const P = () => {
|
|
464
464
|
o && (o(), r(null));
|
|
465
|
-
},
|
|
465
|
+
}, S = {
|
|
466
466
|
print: a,
|
|
467
467
|
cancel: l,
|
|
468
468
|
setOnProgress: w,
|
|
@@ -470,7 +470,7 @@ const xo = () => {
|
|
|
470
470
|
setOnError: p,
|
|
471
471
|
progress: c
|
|
472
472
|
};
|
|
473
|
-
return /* @__PURE__ */ i(bn.Provider, { value:
|
|
473
|
+
return /* @__PURE__ */ i(bn.Provider, { value: S, children: t });
|
|
474
474
|
}, tt = () => {
|
|
475
475
|
const t = Je(bn);
|
|
476
476
|
if (!t)
|
|
@@ -494,7 +494,7 @@ const xo = () => {
|
|
|
494
494
|
e(d);
|
|
495
495
|
const m = [];
|
|
496
496
|
for (const v of u) {
|
|
497
|
-
const p = document.createElement("canvas"), w =
|
|
497
|
+
const p = document.createElement("canvas"), w = wt(v.page, p, {
|
|
498
498
|
scale: v.scale,
|
|
499
499
|
rotate: v.defaultRotation
|
|
500
500
|
}).promise.then(() => {
|
|
@@ -540,7 +540,7 @@ const xo = () => {
|
|
|
540
540
|
}
|
|
541
541
|
}));
|
|
542
542
|
const u = document.createElement("canvas");
|
|
543
|
-
|
|
543
|
+
wt(c.page, u, {
|
|
544
544
|
scale: c.thumbnailScale,
|
|
545
545
|
rotate: c.defaultRotation
|
|
546
546
|
}).promise.then(() => {
|
|
@@ -570,7 +570,7 @@ const xo = () => {
|
|
|
570
570
|
setActive: (t) => {
|
|
571
571
|
},
|
|
572
572
|
active: !1
|
|
573
|
-
}), Pn = () => Je(Cn),
|
|
573
|
+
}), Pn = () => Je(Cn), qs = ({
|
|
574
574
|
children: t,
|
|
575
575
|
initialThumbnailsVisible: e
|
|
576
576
|
}) => {
|
|
@@ -583,7 +583,7 @@ const xo = () => {
|
|
|
583
583
|
}
|
|
584
584
|
);
|
|
585
585
|
}, Ro = (t = {}, e = "") => {
|
|
586
|
-
const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = ee(), { widths: u, heights: d } = Ge(), m = H(!n), { currentZoom: v } = Qe(), [p, w] = $([]), { setFocusedPage: P } = ie(), { columnCount:
|
|
586
|
+
const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = ee(), { widths: u, heights: d } = Ge(), m = H(!n), { currentZoom: v } = Qe(), [p, w] = $([]), { setFocusedPage: P } = ie(), { columnCount: S } = Ne(), { pageRotate: _ } = Ue(), [y, h] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Ee(), { pagesRef: C } = me(), [b, T] = $(null), E = H({}), x = k(() => y === 0 ? null : p[y - 1], [y, p]), R = k(() => p.length, [p]);
|
|
587
587
|
F(() => {
|
|
588
588
|
if (!x || !c)
|
|
589
589
|
return;
|
|
@@ -595,7 +595,7 @@ const xo = () => {
|
|
|
595
595
|
return;
|
|
596
596
|
let O = 0, M = 0;
|
|
597
597
|
if (s === Q.VERTICAL_SCROLLING) {
|
|
598
|
-
const le = x.page - 1, Y =
|
|
598
|
+
const le = x.page - 1, Y = S, Fe = le % Y, we = Math.floor(le / Y);
|
|
599
599
|
O = Ae(d, we), M = Ae(u, Fe);
|
|
600
600
|
}
|
|
601
601
|
s === Q.HORIZONTAL_SCROLLING && (M = u.slice(0, x.page - 1).reduce((le, Y) => le + Y, 0));
|
|
@@ -605,7 +605,7 @@ const xo = () => {
|
|
|
605
605
|
}, Z = {
|
|
606
606
|
top: G.height / 2,
|
|
607
607
|
left: G.width / 2
|
|
608
|
-
}, j =
|
|
608
|
+
}, j = _[x.page], { leftInPage: q, topInPage: te } = jr(
|
|
609
609
|
G,
|
|
610
610
|
Z,
|
|
611
611
|
x.rect,
|
|
@@ -630,9 +630,9 @@ const xo = () => {
|
|
|
630
630
|
f,
|
|
631
631
|
C
|
|
632
632
|
]);
|
|
633
|
-
const
|
|
633
|
+
const D = N(() => {
|
|
634
634
|
h((L) => R ? L + 1 > R ? 1 : L + 1 : 0);
|
|
635
|
-
}, [R]),
|
|
635
|
+
}, [R]), z = N(() => {
|
|
636
636
|
h((L) => R ? L - 1 <= 0 ? R : L - 1 : 0);
|
|
637
637
|
}, [R]), A = N(async (L) => {
|
|
638
638
|
if (!L)
|
|
@@ -672,12 +672,12 @@ const xo = () => {
|
|
|
672
672
|
loading: r,
|
|
673
673
|
matches: p,
|
|
674
674
|
totalMatches: R,
|
|
675
|
-
currentMatchPosition:
|
|
675
|
+
currentMatchPosition: y,
|
|
676
676
|
currentMatch: x,
|
|
677
|
-
nextMatch:
|
|
678
|
-
prevMatch:
|
|
679
|
-
currentMatchElement:
|
|
680
|
-
setCurrentMatchElement:
|
|
677
|
+
nextMatch: D,
|
|
678
|
+
prevMatch: z,
|
|
679
|
+
currentMatchElement: b,
|
|
680
|
+
setCurrentMatchElement: T
|
|
681
681
|
};
|
|
682
682
|
}, Tn = Ye({
|
|
683
683
|
search: "",
|
|
@@ -697,7 +697,7 @@ const xo = () => {
|
|
|
697
697
|
currentMatchElement: null,
|
|
698
698
|
setCurrentMatchElement: (t) => {
|
|
699
699
|
}
|
|
700
|
-
}),
|
|
700
|
+
}), Bs = ({
|
|
701
701
|
children: t,
|
|
702
702
|
initialSearch: e
|
|
703
703
|
}) => {
|
|
@@ -735,7 +735,7 @@ const xo = () => {
|
|
|
735
735
|
children: t
|
|
736
736
|
}
|
|
737
737
|
);
|
|
738
|
-
},
|
|
738
|
+
}, It = () => Je(Tn), de = {
|
|
739
739
|
"rp-pages": "_rp-pages_17t6t_1",
|
|
740
740
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_17t6t_7",
|
|
741
741
|
"rp-pages-container": "_rp-pages-container_17t6t_11",
|
|
@@ -744,7 +744,7 @@ const xo = () => {
|
|
|
744
744
|
"rp-cursor-grab": "_rp-cursor-grab_17t6t_58",
|
|
745
745
|
"rp-cursor-grabbing": "_rp-cursor-grabbing_17t6t_66",
|
|
746
746
|
"rp-loader": "_rp-loader_17t6t_74"
|
|
747
|
-
},
|
|
747
|
+
}, dt = {
|
|
748
748
|
"rp-page-wrapper": "_rp-page-wrapper_14ohm_1",
|
|
749
749
|
"rp-page": "_rp-page_14ohm_1",
|
|
750
750
|
"rp-loader-wrapper": "_rp-loader-wrapper_14ohm_15"
|
|
@@ -758,7 +758,7 @@ const xo = () => {
|
|
|
758
758
|
const m = r.current;
|
|
759
759
|
m.hidden = !0;
|
|
760
760
|
const v = c.current;
|
|
761
|
-
v && v.cancel(), o && o(), c.current =
|
|
761
|
+
v && v.cancel(), o && o(), c.current = wt(d.page, m, {
|
|
762
762
|
scale: u,
|
|
763
763
|
rotate: l[e],
|
|
764
764
|
renderForms: !0
|
|
@@ -779,7 +779,7 @@ const xo = () => {
|
|
|
779
779
|
selecting: Eo,
|
|
780
780
|
"rp-text-layer-text": "_rp-text-layer-text_usdup_39"
|
|
781
781
|
}, No = (t) => {
|
|
782
|
-
const { pageNumber: e } = t, { pages: n } = ee(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } =
|
|
782
|
+
const { pageNumber: e } = t, { pages: n } = ee(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = It(), [c, u] = $(
|
|
783
783
|
[]
|
|
784
784
|
), d = H(), m = H(), v = H([]), p = k(() => r.filter((f) => f.pageIndex === e - 1), [r, e]), w = N(
|
|
785
785
|
(f, g, s = !1) => {
|
|
@@ -791,39 +791,39 @@ const xo = () => {
|
|
|
791
791
|
u(C);
|
|
792
792
|
},
|
|
793
793
|
[p]
|
|
794
|
-
), P = H(),
|
|
794
|
+
), P = H(), S = H(!1), _ = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
795
795
|
F(() => ((() => {
|
|
796
796
|
if (P.current)
|
|
797
797
|
return;
|
|
798
798
|
P.current = new AbortController();
|
|
799
799
|
const { signal: g } = P.current, s = () => {
|
|
800
|
-
|
|
801
|
-
const
|
|
802
|
-
|
|
800
|
+
_().forEach((b) => {
|
|
801
|
+
const T = b.querySelector(".endOfContent");
|
|
802
|
+
T && (b.appendChild(T), T.style.width = "", T.style.height = "", b.classList.remove(pe.selecting));
|
|
803
803
|
});
|
|
804
804
|
};
|
|
805
805
|
document.addEventListener(
|
|
806
806
|
"pointerdown",
|
|
807
807
|
() => {
|
|
808
|
-
|
|
808
|
+
S.current = !0;
|
|
809
809
|
},
|
|
810
810
|
{ signal: g }
|
|
811
811
|
), document.addEventListener(
|
|
812
812
|
"pointerup",
|
|
813
813
|
() => {
|
|
814
|
-
|
|
814
|
+
S.current = !1, s();
|
|
815
815
|
},
|
|
816
816
|
{ signal: g }
|
|
817
817
|
), window.addEventListener(
|
|
818
818
|
"blur",
|
|
819
819
|
() => {
|
|
820
|
-
|
|
820
|
+
S.current = !1, s();
|
|
821
821
|
},
|
|
822
822
|
{ signal: g }
|
|
823
823
|
), document.addEventListener(
|
|
824
824
|
"keyup",
|
|
825
825
|
() => {
|
|
826
|
-
|
|
826
|
+
S.current || s();
|
|
827
827
|
},
|
|
828
828
|
{ signal: g }
|
|
829
829
|
);
|
|
@@ -832,43 +832,43 @@ const xo = () => {
|
|
|
832
832
|
"selectionchange",
|
|
833
833
|
() => {
|
|
834
834
|
var A, L;
|
|
835
|
-
const
|
|
836
|
-
if (!
|
|
835
|
+
const b = document.getSelection();
|
|
836
|
+
if (!b)
|
|
837
837
|
return;
|
|
838
|
-
if (
|
|
838
|
+
if (b.rangeCount === 0) {
|
|
839
839
|
s();
|
|
840
840
|
return;
|
|
841
841
|
}
|
|
842
|
-
const
|
|
843
|
-
for (let I = 0; I <
|
|
844
|
-
const O =
|
|
845
|
-
|
|
846
|
-
O.intersectsNode(M) && !
|
|
842
|
+
const T = /* @__PURE__ */ new Set();
|
|
843
|
+
for (let I = 0; I < b.rangeCount; I++) {
|
|
844
|
+
const O = b.getRangeAt(I);
|
|
845
|
+
_().forEach((M) => {
|
|
846
|
+
O.intersectsNode(M) && !T.has(M) && T.add(M);
|
|
847
847
|
});
|
|
848
848
|
}
|
|
849
|
-
|
|
850
|
-
if (
|
|
849
|
+
_().forEach((I) => {
|
|
850
|
+
if (T.has(I))
|
|
851
851
|
I.classList.add(pe.selecting);
|
|
852
852
|
else {
|
|
853
853
|
const O = I.querySelector(".endOfContent");
|
|
854
854
|
O && (I.appendChild(O), O.style.width = "", O.style.height = "", I.classList.remove(pe.selecting));
|
|
855
855
|
}
|
|
856
856
|
});
|
|
857
|
-
const E =
|
|
857
|
+
const E = b.getRangeAt(0);
|
|
858
858
|
let R = C && (E.compareBoundaryPoints(Range.END_TO_END, C) === 0 || E.compareBoundaryPoints(Range.START_TO_END, C) === 0) ? E.startContainer : E.endContainer;
|
|
859
859
|
R.nodeType === Node.TEXT_NODE && (R = R.parentNode);
|
|
860
|
-
const
|
|
860
|
+
const D = (A = R.parentElement) == null ? void 0 : A.closest(
|
|
861
861
|
pe["rp-text-layer"]
|
|
862
|
-
),
|
|
863
|
-
|
|
862
|
+
), z = D == null ? void 0 : D.querySelector(".endOfContent");
|
|
863
|
+
z && D && (z.style.width = D.style.width, z.style.height = D.style.height, (L = R.parentElement) == null || L.insertBefore(z, R.nextSibling)), C = E.cloneRange();
|
|
864
864
|
},
|
|
865
865
|
{ signal: g }
|
|
866
866
|
);
|
|
867
867
|
})(), () => {
|
|
868
868
|
var g;
|
|
869
869
|
(g = P.current) == null || g.abort(), P.current = void 0;
|
|
870
|
-
}), [
|
|
871
|
-
const
|
|
870
|
+
}), [_]);
|
|
871
|
+
const y = N(() => {
|
|
872
872
|
o.current && o.current.classList.add(pe.selecting);
|
|
873
873
|
}, []), h = N(() => {
|
|
874
874
|
o.current && o.current.classList.remove(pe.selecting);
|
|
@@ -900,14 +900,14 @@ const xo = () => {
|
|
|
900
900
|
container: g
|
|
901
901
|
}), m.current = s, g && (g.innerText = ""), d.current.render();
|
|
902
902
|
}).then(() => {
|
|
903
|
-
var
|
|
903
|
+
var T, E;
|
|
904
904
|
[].slice.call(g.children).forEach((x) => {
|
|
905
905
|
x.classList.add(pe["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
|
|
906
906
|
});
|
|
907
|
-
const C = (
|
|
907
|
+
const C = (T = d.current) == null ? void 0 : T.textDivs;
|
|
908
908
|
C && m.current && w(m.current, C);
|
|
909
|
-
const
|
|
910
|
-
|
|
909
|
+
const b = document.createElement("div");
|
|
910
|
+
b.className = "endOfContent", (E = o.current) == null || E.appendChild(b);
|
|
911
911
|
}).catch(() => {
|
|
912
912
|
}), () => {
|
|
913
913
|
var s;
|
|
@@ -926,51 +926,51 @@ const xo = () => {
|
|
|
926
926
|
"data-rp": `page-${e}-textLayer`,
|
|
927
927
|
className: pe["rp-text-layer"],
|
|
928
928
|
ref: o,
|
|
929
|
-
onMouseDown:
|
|
929
|
+
onMouseDown: y,
|
|
930
930
|
onMouseUp: h
|
|
931
931
|
}
|
|
932
932
|
);
|
|
933
933
|
}, Oo = {
|
|
934
934
|
"rp-annotation-layer": "_rp-annotation-layer_1udza_1"
|
|
935
935
|
};
|
|
936
|
-
let
|
|
937
|
-
const
|
|
936
|
+
let Do = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
937
|
+
const zo = (t) => {
|
|
938
938
|
const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = ee(), a = H(), [l, c] = $(), { setFocusedPage: u, goToPage: d } = ie(), { scrollMode: m } = Ee(), { print: v } = tt(), { download: p } = Gn(), w = k(() => o.get(e), [o, e]), P = k(() => w == null ? void 0 : w.page.getViewport(), [w]);
|
|
939
939
|
F(() => {
|
|
940
940
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
941
941
|
}, [r]), F(() => {
|
|
942
|
-
w && w.page.getAnnotations().then((
|
|
943
|
-
a.current = void 0, c(
|
|
942
|
+
w && w.page.getAnnotations().then((_) => {
|
|
943
|
+
a.current = void 0, c(_), n.current && (n.current.innerText = "");
|
|
944
944
|
});
|
|
945
945
|
}, [w]);
|
|
946
|
-
const
|
|
947
|
-
(
|
|
948
|
-
!l || !r || (Nr(
|
|
946
|
+
const S = N(
|
|
947
|
+
(_) => {
|
|
948
|
+
!l || !r || (Nr(_), Or(_, r, l).then((y) => {
|
|
949
949
|
var h, f;
|
|
950
|
-
((h =
|
|
951
|
-
}), m === Q.PAGE_SCROLLING ? At(
|
|
950
|
+
((h = y == null ? void 0 : y.data) == null ? void 0 : h.action) === "Print" ? v() : ((f = y == null ? void 0 : y.data) == null ? void 0 : f.action) === "SaveAs" && p();
|
|
951
|
+
}), m === Q.PAGE_SCROLLING ? At(_, l, r, (y) => u(y.pageIndex + 1)) : At(_, l, r, (y) => d(y.pageIndex + 1)));
|
|
952
952
|
},
|
|
953
953
|
[r, l, d, u, m, v, p]
|
|
954
954
|
);
|
|
955
955
|
return F(() => {
|
|
956
956
|
if (!w || !l)
|
|
957
957
|
return;
|
|
958
|
-
const
|
|
958
|
+
const _ = w.page.getViewport();
|
|
959
959
|
if (a.current) {
|
|
960
960
|
a.current.update({
|
|
961
|
-
viewport:
|
|
961
|
+
viewport: _.clone({ dontFlip: !0 })
|
|
962
962
|
});
|
|
963
963
|
return;
|
|
964
964
|
}
|
|
965
|
-
const
|
|
965
|
+
const y = /* @__PURE__ */ new Map([]);
|
|
966
966
|
for (const g of l) {
|
|
967
967
|
const { annotationType: s } = g;
|
|
968
968
|
switch (s) {
|
|
969
|
-
case
|
|
970
|
-
|
|
969
|
+
case zt.Link:
|
|
970
|
+
zr(g);
|
|
971
971
|
break;
|
|
972
|
-
case
|
|
973
|
-
|
|
972
|
+
case zt.Widget:
|
|
973
|
+
Dr(g, _, y);
|
|
974
974
|
break;
|
|
975
975
|
}
|
|
976
976
|
}
|
|
@@ -984,8 +984,8 @@ const Do = (t) => {
|
|
|
984
984
|
annotationEditorUIManager: void 0,
|
|
985
985
|
structTreeLayer: null,
|
|
986
986
|
page: w.page,
|
|
987
|
-
viewport:
|
|
988
|
-
}), n.current && Ft(n.current,
|
|
987
|
+
viewport: _.clone({ dontFlip: !0 })
|
|
988
|
+
}), n.current && Ft(n.current, S);
|
|
989
989
|
const g = await (r == null ? void 0 : r.hasJSActions()), s = await (r == null ? void 0 : r.getFieldObjects());
|
|
990
990
|
if (h.signal.aborted)
|
|
991
991
|
throw "abort";
|
|
@@ -995,23 +995,23 @@ const Do = (t) => {
|
|
|
995
995
|
hasJSActions: g,
|
|
996
996
|
fieldObjects: s,
|
|
997
997
|
div: n.current,
|
|
998
|
-
viewport:
|
|
998
|
+
viewport: _.clone({ dontFlip: !0 }),
|
|
999
999
|
page: w.page,
|
|
1000
|
-
imageResourcesPath:
|
|
1000
|
+
imageResourcesPath: Do,
|
|
1001
1001
|
renderForms: !0,
|
|
1002
1002
|
linkService: new Er(),
|
|
1003
1003
|
downloadManager: null,
|
|
1004
1004
|
enableScripting: !1
|
|
1005
1005
|
});
|
|
1006
1006
|
})().then(() => {
|
|
1007
|
-
n.current && Ar(n.current,
|
|
1007
|
+
n.current && Ar(n.current, S);
|
|
1008
1008
|
}).catch((g) => {
|
|
1009
1009
|
if (g !== "abort")
|
|
1010
1010
|
throw g;
|
|
1011
1011
|
}), () => {
|
|
1012
|
-
h.abort("clear"), n.current && Ft(n.current,
|
|
1012
|
+
h.abort("clear"), n.current && Ft(n.current, S);
|
|
1013
1013
|
};
|
|
1014
|
-
}, [r, l,
|
|
1014
|
+
}, [r, l, S]), /* @__PURE__ */ i(
|
|
1015
1015
|
"div",
|
|
1016
1016
|
{
|
|
1017
1017
|
"data-rp": `page-${e}-annotationLayer`,
|
|
@@ -1052,7 +1052,7 @@ const Do = (t) => {
|
|
|
1052
1052
|
s(C);
|
|
1053
1053
|
return;
|
|
1054
1054
|
}
|
|
1055
|
-
new MutationObserver((
|
|
1055
|
+
new MutationObserver((T, E) => {
|
|
1056
1056
|
const x = h.querySelector(g);
|
|
1057
1057
|
x && (s(x), E.disconnect());
|
|
1058
1058
|
}).observe(h, { childList: !0, subtree: !0 });
|
|
@@ -1067,26 +1067,26 @@ const Do = (t) => {
|
|
|
1067
1067
|
f(Array.from(g));
|
|
1068
1068
|
return;
|
|
1069
1069
|
}
|
|
1070
|
-
new MutationObserver((C,
|
|
1071
|
-
const
|
|
1070
|
+
new MutationObserver((C, b) => {
|
|
1071
|
+
const T = h.querySelectorAll(
|
|
1072
1072
|
".rp-text-layer-text"
|
|
1073
1073
|
);
|
|
1074
|
-
|
|
1074
|
+
T.length && (f(Array.from(T)), b.disconnect());
|
|
1075
1075
|
}).observe(h, { childList: !0, subtree: !0 });
|
|
1076
1076
|
});
|
|
1077
1077
|
}
|
|
1078
|
-
const
|
|
1078
|
+
const S = (h, f, g, s) => {
|
|
1079
1079
|
var Z;
|
|
1080
|
-
const C = document.createRange(),
|
|
1081
|
-
if (!
|
|
1080
|
+
const C = document.createRange(), b = g.firstChild;
|
|
1081
|
+
if (!b || b.nodeType !== Node.TEXT_NODE)
|
|
1082
1082
|
return null;
|
|
1083
|
-
const
|
|
1084
|
-
if (E >
|
|
1083
|
+
const T = ((Z = b.textContent) == null ? void 0 : Z.length) ?? 0, E = s[0].charIdxInSpan, x = s.length === 1 ? E : s[s.length - 1].charIdxInSpan;
|
|
1084
|
+
if (E > T || x + 1 > T)
|
|
1085
1085
|
return null;
|
|
1086
|
-
C.setStart(
|
|
1086
|
+
C.setStart(b, E), C.setEnd(b, x + 1);
|
|
1087
1087
|
const R = document.createElement("span");
|
|
1088
1088
|
R.style.width = "auto", C.surroundContents(R);
|
|
1089
|
-
const
|
|
1089
|
+
const D = R.getBoundingClientRect(), z = h.getBoundingClientRect(), A = z.height, L = z.width, I = 100 * (D.left - z.left) / L, O = 100 * (D.top - z.top) / A, M = 100 * D.height / A, G = 100 * D.width / L;
|
|
1090
1090
|
return kr(R), {
|
|
1091
1091
|
keywordStr: f,
|
|
1092
1092
|
left: I,
|
|
@@ -1097,17 +1097,17 @@ const Do = (t) => {
|
|
|
1097
1097
|
pageWidth: L
|
|
1098
1098
|
};
|
|
1099
1099
|
};
|
|
1100
|
-
async function
|
|
1100
|
+
async function _(h, f) {
|
|
1101
1101
|
const g = await w(u, h);
|
|
1102
1102
|
if (!g)
|
|
1103
1103
|
return;
|
|
1104
1104
|
const s = await P(g);
|
|
1105
1105
|
if (s.length) {
|
|
1106
|
-
const C = s.map((
|
|
1107
|
-
(
|
|
1108
|
-
E.split("").map((R,
|
|
1106
|
+
const C = s.map((T) => T.tagName === "BR" ? " " : T.textContent).reduce(
|
|
1107
|
+
(T, E, x) => T.concat(
|
|
1108
|
+
E.split("").map((R, D) => ({
|
|
1109
1109
|
char: R,
|
|
1110
|
-
charIdxInSpan:
|
|
1110
|
+
charIdxInSpan: D,
|
|
1111
1111
|
spanIdx: x
|
|
1112
1112
|
}))
|
|
1113
1113
|
),
|
|
@@ -1118,24 +1118,24 @@ const Do = (t) => {
|
|
|
1118
1118
|
spanIdx: 0
|
|
1119
1119
|
}
|
|
1120
1120
|
]
|
|
1121
|
-
).slice(1),
|
|
1122
|
-
v(
|
|
1121
|
+
).slice(1), b = y(g, f, s, C);
|
|
1122
|
+
v(b);
|
|
1123
1123
|
}
|
|
1124
1124
|
}
|
|
1125
|
-
const
|
|
1125
|
+
const y = (h, f, g, s) => {
|
|
1126
1126
|
const C = f.length;
|
|
1127
1127
|
if (!s.length || !C)
|
|
1128
1128
|
return [];
|
|
1129
|
-
const
|
|
1129
|
+
const b = [], T = s.map((E) => E.char).join("");
|
|
1130
1130
|
return p.forEach((E) => {
|
|
1131
|
-
const { keyword: x, regExp: R, wholeWords:
|
|
1131
|
+
const { keyword: x, regExp: R, wholeWords: D, color: z } = E, A = x;
|
|
1132
1132
|
if (!A.trim())
|
|
1133
1133
|
return;
|
|
1134
1134
|
const L = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
|
|
1135
1135
|
let I;
|
|
1136
1136
|
const O = [];
|
|
1137
|
-
for (; (I = L.exec(
|
|
1138
|
-
|
|
1137
|
+
for (; (I = L.exec(T)) !== null; )
|
|
1138
|
+
D && !pr(T, I.index, I[0].length) || O.push({
|
|
1139
1139
|
keyword: L,
|
|
1140
1140
|
startIndex: I.index,
|
|
1141
1141
|
endIndex: L.lastIndex
|
|
@@ -1143,7 +1143,7 @@ const Do = (t) => {
|
|
|
1143
1143
|
const M = O.map((G) => ({
|
|
1144
1144
|
keyword: G.keyword,
|
|
1145
1145
|
indexes: s.slice(G.startIndex, G.endIndex),
|
|
1146
|
-
color:
|
|
1146
|
+
color: z
|
|
1147
1147
|
}));
|
|
1148
1148
|
for (const G of M) {
|
|
1149
1149
|
const Z = G.indexes.reduce(
|
|
@@ -1152,7 +1152,7 @@ const Do = (t) => {
|
|
|
1152
1152
|
);
|
|
1153
1153
|
for (const j of Object.values(Z))
|
|
1154
1154
|
if (j.length !== 1 || j[0].char.trim() !== "") {
|
|
1155
|
-
const q = j, te = g[q[0].spanIdx], X =
|
|
1155
|
+
const q = j, te = g[q[0].spanIdx], X = S(
|
|
1156
1156
|
h,
|
|
1157
1157
|
A,
|
|
1158
1158
|
te,
|
|
@@ -1160,19 +1160,19 @@ const Do = (t) => {
|
|
|
1160
1160
|
);
|
|
1161
1161
|
if (X) {
|
|
1162
1162
|
const { left: ce, top: ve } = X;
|
|
1163
|
-
if (
|
|
1163
|
+
if (b.find((Y) => Y.left === ce && Y.top === ve))
|
|
1164
1164
|
continue;
|
|
1165
|
-
|
|
1165
|
+
b.push({ ...X, highlightColor: G.color });
|
|
1166
1166
|
}
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
}),
|
|
1169
|
+
}), b.sort(Wr), b;
|
|
1170
1170
|
};
|
|
1171
1171
|
return F(() => {
|
|
1172
1172
|
(async () => {
|
|
1173
1173
|
if (!(!a || a.length === 0))
|
|
1174
1174
|
try {
|
|
1175
|
-
await
|
|
1175
|
+
await _(t, a);
|
|
1176
1176
|
} catch (f) {
|
|
1177
1177
|
console.error(f);
|
|
1178
1178
|
}
|
|
@@ -1191,24 +1191,24 @@ const Do = (t) => {
|
|
|
1191
1191
|
},
|
|
1192
1192
|
f
|
|
1193
1193
|
)) }) });
|
|
1194
|
-
},
|
|
1194
|
+
}, Rt = $e((t, e) => {
|
|
1195
1195
|
const { pageNumber: n, style: o, ...r } = t, { pages: a } = ee(), { pageRotate: l } = Ue(), { textLayer: c } = ir(), { currentZoom: u } = Qe(), d = H(a.get(n)), [m, v] = $(!1), p = H(null), [w, P] = $({
|
|
1196
1196
|
width: 0,
|
|
1197
1197
|
height: 0
|
|
1198
1198
|
});
|
|
1199
1199
|
cn(e, () => p.current);
|
|
1200
|
-
const
|
|
1200
|
+
const S = k(() => d.current ? l[n] : 0, [n, l]);
|
|
1201
1201
|
F(() => {
|
|
1202
1202
|
if (a && (d.current = a.get(n), d.current)) {
|
|
1203
1203
|
const f = d.current.page.getViewport({
|
|
1204
1204
|
scale: u,
|
|
1205
|
-
rotation:
|
|
1205
|
+
rotation: S
|
|
1206
1206
|
});
|
|
1207
1207
|
P(f);
|
|
1208
1208
|
}
|
|
1209
|
-
}, [a, n,
|
|
1210
|
-
const
|
|
1211
|
-
switch (
|
|
1209
|
+
}, [a, n, S, u]);
|
|
1210
|
+
const _ = k(() => {
|
|
1211
|
+
switch (S) {
|
|
1212
1212
|
case 90:
|
|
1213
1213
|
return `${w.width / 2}px ${w.width / 2}px`;
|
|
1214
1214
|
case -90:
|
|
@@ -1217,7 +1217,7 @@ const Do = (t) => {
|
|
|
1217
1217
|
default:
|
|
1218
1218
|
return "center";
|
|
1219
1219
|
}
|
|
1220
|
-
}, [
|
|
1220
|
+
}, [S, w]), y = N(() => {
|
|
1221
1221
|
v(!0);
|
|
1222
1222
|
}, []), h = N(() => {
|
|
1223
1223
|
v(!1);
|
|
@@ -1231,11 +1231,11 @@ const Do = (t) => {
|
|
|
1231
1231
|
...r,
|
|
1232
1232
|
style: {
|
|
1233
1233
|
...o,
|
|
1234
|
-
"--rp-rotate": `${
|
|
1235
|
-
"--rp-page-rotate-translate": `${
|
|
1234
|
+
"--rp-rotate": `${S}deg`,
|
|
1235
|
+
"--rp-page-rotate-translate": `${_}`,
|
|
1236
1236
|
"--scale-factor": u
|
|
1237
1237
|
},
|
|
1238
|
-
className:
|
|
1238
|
+
className: dt["rp-page-wrapper"],
|
|
1239
1239
|
children: /* @__PURE__ */ W(
|
|
1240
1240
|
"div",
|
|
1241
1241
|
{
|
|
@@ -1243,14 +1243,14 @@ const Do = (t) => {
|
|
|
1243
1243
|
width: `${w.width}px`,
|
|
1244
1244
|
height: `${w.height}px`
|
|
1245
1245
|
},
|
|
1246
|
-
className:
|
|
1246
|
+
className: dt["rp-page"],
|
|
1247
1247
|
children: [
|
|
1248
|
-
/* @__PURE__ */ i(Lo, { onLoading:
|
|
1249
|
-
m && /* @__PURE__ */ i("div", { className:
|
|
1248
|
+
/* @__PURE__ */ i(Lo, { onLoading: y, onLoaded: h, pageNumber: n }),
|
|
1249
|
+
m && /* @__PURE__ */ i("div", { className: dt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Pt, {}) }),
|
|
1250
1250
|
/* @__PURE__ */ i(Mr, { pageNumber: n }),
|
|
1251
1251
|
c && /* @__PURE__ */ i(No, { pageNumber: n }),
|
|
1252
1252
|
/* @__PURE__ */ i(Fo, { pageNumber: n, viewport: w }),
|
|
1253
|
-
/* @__PURE__ */ i(
|
|
1253
|
+
/* @__PURE__ */ i(zo, { pageNumber: n })
|
|
1254
1254
|
]
|
|
1255
1255
|
}
|
|
1256
1256
|
)
|
|
@@ -1262,13 +1262,13 @@ function Ut(t) {
|
|
|
1262
1262
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1263
1263
|
return t;
|
|
1264
1264
|
}
|
|
1265
|
-
function
|
|
1266
|
-
return
|
|
1265
|
+
function _t(t, e) {
|
|
1266
|
+
return _t = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, o) {
|
|
1267
1267
|
return n.__proto__ = o, n;
|
|
1268
|
-
},
|
|
1268
|
+
}, _t(t, e);
|
|
1269
1269
|
}
|
|
1270
1270
|
function Wo(t, e) {
|
|
1271
|
-
t.prototype = Object.create(e.prototype), t.prototype.constructor = t,
|
|
1271
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, _t(t, e);
|
|
1272
1272
|
}
|
|
1273
1273
|
var Vt = Number.isNaN || function(e) {
|
|
1274
1274
|
return typeof e == "number" && e !== e;
|
|
@@ -1284,7 +1284,7 @@ function Mo(t, e) {
|
|
|
1284
1284
|
return !1;
|
|
1285
1285
|
return !0;
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1287
|
+
function ut(t, e) {
|
|
1288
1288
|
e === void 0 && (e = Mo);
|
|
1289
1289
|
var n, o = [], r, a = !1;
|
|
1290
1290
|
function l() {
|
|
@@ -1324,13 +1324,13 @@ function $o(t, e) {
|
|
|
1324
1324
|
};
|
|
1325
1325
|
return r;
|
|
1326
1326
|
}
|
|
1327
|
-
var
|
|
1327
|
+
var pt = -1;
|
|
1328
1328
|
function Go(t) {
|
|
1329
|
-
if (t === void 0 && (t = !1),
|
|
1329
|
+
if (t === void 0 && (t = !1), pt === -1 || t) {
|
|
1330
1330
|
var e = document.createElement("div"), n = e.style;
|
|
1331
|
-
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e),
|
|
1331
|
+
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e), pt = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
1332
1332
|
}
|
|
1333
|
-
return
|
|
1333
|
+
return pt;
|
|
1334
1334
|
}
|
|
1335
1335
|
var Oe = null;
|
|
1336
1336
|
function jt(t) {
|
|
@@ -1350,12 +1350,12 @@ var Uo = 150, Vo = function(e) {
|
|
|
1350
1350
|
}, Be = null, Ze = null, je = null;
|
|
1351
1351
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet());
|
|
1352
1352
|
function qo(t) {
|
|
1353
|
-
var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, u = t.getOffsetForColumnAndAlignment, d = t.getOffsetForRowAndAlignment, m = t.getRowHeight, v = t.getRowOffset, p = t.getRowStartIndexForOffset, w = t.getRowStopIndexForStartIndex, P = t.initInstanceProps,
|
|
1354
|
-
return e = /* @__PURE__ */ function(
|
|
1355
|
-
Wo(h,
|
|
1353
|
+
var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, u = t.getOffsetForColumnAndAlignment, d = t.getOffsetForRowAndAlignment, m = t.getRowHeight, v = t.getRowOffset, p = t.getRowStartIndexForOffset, w = t.getRowStopIndexForStartIndex, P = t.initInstanceProps, S = t.shouldResetStyleCacheOnItemSizeChange, _ = t.validateProps;
|
|
1354
|
+
return e = /* @__PURE__ */ function(y) {
|
|
1355
|
+
Wo(h, y);
|
|
1356
1356
|
function h(g) {
|
|
1357
1357
|
var s;
|
|
1358
|
-
return s =
|
|
1358
|
+
return s = y.call(this, g) || this, s._instanceProps = P(s.props, Ut(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
|
|
1359
1359
|
instance: Ut(s),
|
|
1360
1360
|
isScrolling: !1,
|
|
1361
1361
|
horizontalScrollDirection: "forward",
|
|
@@ -1363,45 +1363,45 @@ function qo(t) {
|
|
|
1363
1363
|
scrollTop: typeof s.props.initialScrollTop == "number" ? s.props.initialScrollTop : 0,
|
|
1364
1364
|
scrollUpdateWasRequested: !1,
|
|
1365
1365
|
verticalScrollDirection: "forward"
|
|
1366
|
-
}, s._callOnItemsRendered = void 0, s._callOnItemsRendered =
|
|
1366
|
+
}, s._callOnItemsRendered = void 0, s._callOnItemsRendered = ut(function(C, b, T, E, x, R, D, z) {
|
|
1367
1367
|
return s.props.onItemsRendered({
|
|
1368
1368
|
overscanColumnStartIndex: C,
|
|
1369
|
-
overscanColumnStopIndex:
|
|
1370
|
-
overscanRowStartIndex:
|
|
1369
|
+
overscanColumnStopIndex: b,
|
|
1370
|
+
overscanRowStartIndex: T,
|
|
1371
1371
|
overscanRowStopIndex: E,
|
|
1372
1372
|
visibleColumnStartIndex: x,
|
|
1373
1373
|
visibleColumnStopIndex: R,
|
|
1374
|
-
visibleRowStartIndex:
|
|
1375
|
-
visibleRowStopIndex:
|
|
1374
|
+
visibleRowStartIndex: D,
|
|
1375
|
+
visibleRowStopIndex: z
|
|
1376
1376
|
});
|
|
1377
|
-
}), s._callOnScroll = void 0, s._callOnScroll =
|
|
1377
|
+
}), s._callOnScroll = void 0, s._callOnScroll = ut(function(C, b, T, E, x) {
|
|
1378
1378
|
return s.props.onScroll({
|
|
1379
|
-
horizontalScrollDirection:
|
|
1379
|
+
horizontalScrollDirection: T,
|
|
1380
1380
|
scrollLeft: C,
|
|
1381
|
-
scrollTop:
|
|
1381
|
+
scrollTop: b,
|
|
1382
1382
|
verticalScrollDirection: E,
|
|
1383
1383
|
scrollUpdateWasRequested: x
|
|
1384
1384
|
});
|
|
1385
|
-
}), s._getItemStyle = void 0, s._getItemStyle = function(C,
|
|
1386
|
-
var
|
|
1387
|
-
if (
|
|
1388
|
-
A = z
|
|
1385
|
+
}), s._getItemStyle = void 0, s._getItemStyle = function(C, b) {
|
|
1386
|
+
var T = s.props, E = T.columnWidth, x = T.direction, R = T.rowHeight, D = s._getItemStyleCache(S && E, S && x, S && R), z = C + ":" + b, A;
|
|
1387
|
+
if (D.hasOwnProperty(z))
|
|
1388
|
+
A = D[z];
|
|
1389
1389
|
else {
|
|
1390
|
-
var L = n(s.props,
|
|
1391
|
-
z
|
|
1390
|
+
var L = n(s.props, b, s._instanceProps), I = x === "rtl";
|
|
1391
|
+
D[z] = A = {
|
|
1392
1392
|
position: "absolute",
|
|
1393
1393
|
left: I ? void 0 : L,
|
|
1394
1394
|
right: I ? L : void 0,
|
|
1395
1395
|
top: v(s.props, C, s._instanceProps),
|
|
1396
1396
|
height: m(s.props, C, s._instanceProps),
|
|
1397
|
-
width: a(s.props,
|
|
1397
|
+
width: a(s.props, b, s._instanceProps)
|
|
1398
1398
|
};
|
|
1399
1399
|
}
|
|
1400
1400
|
return A;
|
|
1401
|
-
}, s._getItemStyleCache = void 0, s._getItemStyleCache =
|
|
1401
|
+
}, s._getItemStyleCache = void 0, s._getItemStyleCache = ut(function(C, b, T) {
|
|
1402
1402
|
return {};
|
|
1403
1403
|
}), s._onScroll = function(C) {
|
|
1404
|
-
var
|
|
1404
|
+
var b = C.currentTarget, T = b.clientHeight, E = b.clientWidth, x = b.scrollLeft, R = b.scrollTop, D = b.scrollHeight, z = b.scrollWidth;
|
|
1405
1405
|
s.setState(function(A) {
|
|
1406
1406
|
if (A.scrollLeft === x && A.scrollTop === R)
|
|
1407
1407
|
return null;
|
|
@@ -1412,11 +1412,11 @@ function qo(t) {
|
|
|
1412
1412
|
I = -x;
|
|
1413
1413
|
break;
|
|
1414
1414
|
case "positive-descending":
|
|
1415
|
-
I =
|
|
1415
|
+
I = z - E - x;
|
|
1416
1416
|
break;
|
|
1417
1417
|
}
|
|
1418
|
-
I = Math.max(0, Math.min(I,
|
|
1419
|
-
var O = Math.max(0, Math.min(R,
|
|
1418
|
+
I = Math.max(0, Math.min(I, z - E));
|
|
1419
|
+
var O = Math.max(0, Math.min(R, D - T));
|
|
1420
1420
|
return {
|
|
1421
1421
|
isScrolling: !0,
|
|
1422
1422
|
horizontalScrollDirection: A.scrollLeft < x ? "forward" : "backward",
|
|
@@ -1427,8 +1427,8 @@ function qo(t) {
|
|
|
1427
1427
|
};
|
|
1428
1428
|
}, s._resetIsScrollingDebounced);
|
|
1429
1429
|
}, s._outerRefSetter = function(C) {
|
|
1430
|
-
var
|
|
1431
|
-
s._outerRef = C, typeof
|
|
1430
|
+
var b = s.props.outerRef;
|
|
1431
|
+
s._outerRef = C, typeof b == "function" ? b(C) : b != null && typeof b == "object" && b.hasOwnProperty("current") && (b.current = C);
|
|
1432
1432
|
}, s._resetIsScrollingDebounced = function() {
|
|
1433
1433
|
s._resetIsScrollingTimeoutId !== null && Zt(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId = $o(s._resetIsScrolling, Uo);
|
|
1434
1434
|
}, s._resetIsScrolling = function() {
|
|
@@ -1440,62 +1440,62 @@ function qo(t) {
|
|
|
1440
1440
|
}, s;
|
|
1441
1441
|
}
|
|
1442
1442
|
h.getDerivedStateFromProps = function(s, C) {
|
|
1443
|
-
return Bo(s, C),
|
|
1443
|
+
return Bo(s, C), _(s), null;
|
|
1444
1444
|
};
|
|
1445
1445
|
var f = h.prototype;
|
|
1446
1446
|
return f.scrollTo = function(s) {
|
|
1447
|
-
var C = s.scrollLeft,
|
|
1448
|
-
C !== void 0 && (C = Math.max(0, C)),
|
|
1449
|
-
return C === void 0 && (C =
|
|
1450
|
-
horizontalScrollDirection:
|
|
1447
|
+
var C = s.scrollLeft, b = s.scrollTop;
|
|
1448
|
+
C !== void 0 && (C = Math.max(0, C)), b !== void 0 && (b = Math.max(0, b)), this.setState(function(T) {
|
|
1449
|
+
return C === void 0 && (C = T.scrollLeft), b === void 0 && (b = T.scrollTop), T.scrollLeft === C && T.scrollTop === b ? null : {
|
|
1450
|
+
horizontalScrollDirection: T.scrollLeft < C ? "forward" : "backward",
|
|
1451
1451
|
scrollLeft: C,
|
|
1452
|
-
scrollTop:
|
|
1452
|
+
scrollTop: b,
|
|
1453
1453
|
scrollUpdateWasRequested: !0,
|
|
1454
|
-
verticalScrollDirection:
|
|
1454
|
+
verticalScrollDirection: T.scrollTop < b ? "forward" : "backward"
|
|
1455
1455
|
};
|
|
1456
1456
|
}, this._resetIsScrollingDebounced);
|
|
1457
1457
|
}, f.scrollToItem = function(s) {
|
|
1458
|
-
var C = s.align,
|
|
1459
|
-
|
|
1460
|
-
var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > A ? M : 0, q = G >
|
|
1458
|
+
var C = s.align, b = C === void 0 ? "auto" : C, T = s.columnIndex, E = s.rowIndex, x = this.props, R = x.columnCount, D = x.height, z = x.rowCount, A = x.width, L = this.state, I = L.scrollLeft, O = L.scrollTop, M = Go();
|
|
1459
|
+
T !== void 0 && (T = Math.max(0, Math.min(T, R - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, z - 1)));
|
|
1460
|
+
var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > A ? M : 0, q = G > D ? M : 0;
|
|
1461
1461
|
this.scrollTo({
|
|
1462
|
-
scrollLeft:
|
|
1463
|
-
scrollTop: E !== void 0 ? d(this.props, E,
|
|
1462
|
+
scrollLeft: T !== void 0 ? u(this.props, T, b, I, this._instanceProps, q) : I,
|
|
1463
|
+
scrollTop: E !== void 0 ? d(this.props, E, b, O, this._instanceProps, j) : O
|
|
1464
1464
|
});
|
|
1465
1465
|
}, f.componentDidMount = function() {
|
|
1466
|
-
var s = this.props, C = s.initialScrollLeft,
|
|
1466
|
+
var s = this.props, C = s.initialScrollLeft, b = s.initialScrollTop;
|
|
1467
1467
|
if (this._outerRef != null) {
|
|
1468
|
-
var
|
|
1469
|
-
typeof C == "number" && (
|
|
1468
|
+
var T = this._outerRef;
|
|
1469
|
+
typeof C == "number" && (T.scrollLeft = C), typeof b == "number" && (T.scrollTop = b);
|
|
1470
1470
|
}
|
|
1471
1471
|
this._callPropsCallbacks();
|
|
1472
1472
|
}, f.componentDidUpdate = function() {
|
|
1473
|
-
var s = this.props.direction, C = this.state,
|
|
1473
|
+
var s = this.props.direction, C = this.state, b = C.scrollLeft, T = C.scrollTop, E = C.scrollUpdateWasRequested;
|
|
1474
1474
|
if (E && this._outerRef != null) {
|
|
1475
1475
|
var x = this._outerRef;
|
|
1476
1476
|
if (s === "rtl")
|
|
1477
1477
|
switch (jt()) {
|
|
1478
1478
|
case "negative":
|
|
1479
|
-
x.scrollLeft = -
|
|
1479
|
+
x.scrollLeft = -b;
|
|
1480
1480
|
break;
|
|
1481
1481
|
case "positive-ascending":
|
|
1482
|
-
x.scrollLeft =
|
|
1482
|
+
x.scrollLeft = b;
|
|
1483
1483
|
break;
|
|
1484
1484
|
default:
|
|
1485
|
-
var R = x.clientWidth,
|
|
1486
|
-
x.scrollLeft =
|
|
1485
|
+
var R = x.clientWidth, D = x.scrollWidth;
|
|
1486
|
+
x.scrollLeft = D - R - b;
|
|
1487
1487
|
break;
|
|
1488
1488
|
}
|
|
1489
1489
|
else
|
|
1490
|
-
x.scrollLeft = Math.max(0,
|
|
1491
|
-
x.scrollTop = Math.max(0,
|
|
1490
|
+
x.scrollLeft = Math.max(0, b);
|
|
1491
|
+
x.scrollTop = Math.max(0, T);
|
|
1492
1492
|
}
|
|
1493
1493
|
this._callPropsCallbacks();
|
|
1494
1494
|
}, f.componentWillUnmount = function() {
|
|
1495
1495
|
this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
|
|
1496
1496
|
}, f.render = function() {
|
|
1497
|
-
var s = this.props, C = s.children,
|
|
1498
|
-
if (
|
|
1497
|
+
var s = this.props, C = s.children, b = s.className, T = s.columnCount, E = s.direction, x = s.height, R = s.innerRef, D = s.innerElementType, z = s.innerTagName, A = s.itemData, L = s.itemKey, I = L === void 0 ? Vo : L, O = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, q = s.width, te = this.state.isScrolling, X = this._getHorizontalRangeToRender(), ce = X[0], ve = X[1], le = this._getVerticalRangeToRender(), Y = le[0], Fe = le[1], we = [];
|
|
1498
|
+
if (T > 0 && G)
|
|
1499
1499
|
for (var Te = Y; Te <= Fe; Te++)
|
|
1500
1500
|
for (var _e = ce; _e <= ve; _e++)
|
|
1501
1501
|
we.push(qe(C, {
|
|
@@ -1510,9 +1510,9 @@ function qo(t) {
|
|
|
1510
1510
|
rowIndex: Te,
|
|
1511
1511
|
style: this._getItemStyle(Te, _e)
|
|
1512
1512
|
}));
|
|
1513
|
-
var
|
|
1513
|
+
var rt = l(this.props, this._instanceProps), ot = c(this.props, this._instanceProps);
|
|
1514
1514
|
return qe(O || M || "div", {
|
|
1515
|
-
className:
|
|
1515
|
+
className: b,
|
|
1516
1516
|
onScroll: this._onScroll,
|
|
1517
1517
|
ref: this._outerRefSetter,
|
|
1518
1518
|
style: Hr({
|
|
@@ -1524,36 +1524,36 @@ function qo(t) {
|
|
|
1524
1524
|
willChange: "transform",
|
|
1525
1525
|
direction: E
|
|
1526
1526
|
}, Z)
|
|
1527
|
-
}, qe(
|
|
1527
|
+
}, qe(D || z || "div", {
|
|
1528
1528
|
children: we,
|
|
1529
1529
|
ref: R,
|
|
1530
1530
|
style: {
|
|
1531
|
-
height:
|
|
1531
|
+
height: rt,
|
|
1532
1532
|
pointerEvents: te ? "none" : void 0,
|
|
1533
|
-
width:
|
|
1533
|
+
width: ot
|
|
1534
1534
|
}
|
|
1535
1535
|
}));
|
|
1536
1536
|
}, f._callPropsCallbacks = function() {
|
|
1537
|
-
var s = this.props, C = s.columnCount,
|
|
1538
|
-
if (typeof
|
|
1539
|
-
var x = this._getHorizontalRangeToRender(), R = x[0],
|
|
1540
|
-
this._callOnItemsRendered(R,
|
|
1537
|
+
var s = this.props, C = s.columnCount, b = s.onItemsRendered, T = s.onScroll, E = s.rowCount;
|
|
1538
|
+
if (typeof b == "function" && C > 0 && E > 0) {
|
|
1539
|
+
var x = this._getHorizontalRangeToRender(), R = x[0], D = x[1], z = x[2], A = x[3], L = this._getVerticalRangeToRender(), I = L[0], O = L[1], M = L[2], G = L[3];
|
|
1540
|
+
this._callOnItemsRendered(R, D, I, O, z, A, M, G);
|
|
1541
1541
|
}
|
|
1542
|
-
if (typeof
|
|
1542
|
+
if (typeof T == "function") {
|
|
1543
1543
|
var Z = this.state, j = Z.horizontalScrollDirection, q = Z.scrollLeft, te = Z.scrollTop, X = Z.scrollUpdateWasRequested, ce = Z.verticalScrollDirection;
|
|
1544
1544
|
this._callOnScroll(q, te, j, ce, X);
|
|
1545
1545
|
}
|
|
1546
1546
|
}, f._getHorizontalRangeToRender = function() {
|
|
1547
|
-
var s = this.props, C = s.columnCount,
|
|
1547
|
+
var s = this.props, C = s.columnCount, b = s.overscanColumnCount, T = s.overscanColumnsCount, E = s.overscanCount, x = s.rowCount, R = this.state, D = R.horizontalScrollDirection, z = R.isScrolling, A = R.scrollLeft, L = b || T || E || 1;
|
|
1548
1548
|
if (C === 0 || x === 0)
|
|
1549
1549
|
return [0, 0, 0, 0];
|
|
1550
|
-
var I = o(this.props, A, this._instanceProps), O = r(this.props, I, A, this._instanceProps), M = !
|
|
1550
|
+
var I = o(this.props, A, this._instanceProps), O = r(this.props, I, A, this._instanceProps), M = !z || D === "backward" ? Math.max(1, L) : 1, G = !z || D === "forward" ? Math.max(1, L) : 1;
|
|
1551
1551
|
return [Math.max(0, I - M), Math.max(0, Math.min(C - 1, O + G)), I, O];
|
|
1552
1552
|
}, f._getVerticalRangeToRender = function() {
|
|
1553
|
-
var s = this.props, C = s.columnCount,
|
|
1553
|
+
var s = this.props, C = s.columnCount, b = s.overscanCount, T = s.overscanRowCount, E = s.overscanRowsCount, x = s.rowCount, R = this.state, D = R.isScrolling, z = R.verticalScrollDirection, A = R.scrollTop, L = T || E || b || 1;
|
|
1554
1554
|
if (C === 0 || x === 0)
|
|
1555
1555
|
return [0, 0, 0, 0];
|
|
1556
|
-
var I = p(this.props, A, this._instanceProps), O = w(this.props, I, A, this._instanceProps), M = !
|
|
1556
|
+
var I = p(this.props, A, this._instanceProps), O = w(this.props, I, A, this._instanceProps), M = !D || z === "backward" ? Math.max(1, L) : 1, G = !D || z === "forward" ? Math.max(1, L) : 1;
|
|
1557
1557
|
return [Math.max(0, I - M), Math.max(0, Math.min(x - 1, O + G)), I, O];
|
|
1558
1558
|
}, h;
|
|
1559
1559
|
}(er), e.defaultProps = {
|
|
@@ -1731,9 +1731,9 @@ function Yo(t, e) {
|
|
|
1731
1731
|
return !Jt(n, r) && !Jt(o, a);
|
|
1732
1732
|
}
|
|
1733
1733
|
const Jo = () => {
|
|
1734
|
-
const { viewMode: t } = Ne(), { scrollMode: e } = Ee(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ge(), a = k(() => r.heights.length, [r.heights]), l = k(() => e === Q.HORIZONTAL_SCROLLING ? a : t === Re.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = k(() => r.widths.reduce((P,
|
|
1735
|
-
const
|
|
1736
|
-
return (!P[
|
|
1734
|
+
const { viewMode: t } = Ne(), { scrollMode: e } = Ee(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ge(), a = k(() => r.heights.length, [r.heights]), l = k(() => e === Q.HORIZONTAL_SCROLLING ? a : t === Re.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = k(() => r.widths.reduce((P, S, _) => {
|
|
1735
|
+
const y = _ % l;
|
|
1736
|
+
return (!P[y] || S > P[y]) && (P[y] = S), P;
|
|
1737
1737
|
}, []), [r.widths, l]), u = N(
|
|
1738
1738
|
(w) => {
|
|
1739
1739
|
const P = w % c.length;
|
|
@@ -1742,9 +1742,9 @@ const Jo = () => {
|
|
|
1742
1742
|
[c]
|
|
1743
1743
|
), d = N(
|
|
1744
1744
|
(w) => {
|
|
1745
|
-
const P = Array.from({ length: l }, (
|
|
1746
|
-
const
|
|
1747
|
-
return r.heights[
|
|
1745
|
+
const P = Array.from({ length: l }, (S, _) => {
|
|
1746
|
+
const y = w * l + _;
|
|
1747
|
+
return r.heights[y] || 0;
|
|
1748
1748
|
});
|
|
1749
1749
|
return Math.max(...P);
|
|
1750
1750
|
},
|
|
@@ -1766,17 +1766,17 @@ const Jo = () => {
|
|
|
1766
1766
|
};
|
|
1767
1767
|
let oe;
|
|
1768
1768
|
typeof window < "u" ? oe = window : typeof self < "u" ? oe = self : oe = global;
|
|
1769
|
-
let
|
|
1770
|
-
const Qt = 20,
|
|
1771
|
-
|
|
1769
|
+
let bt = null, Ct = null;
|
|
1770
|
+
const Qt = 20, ht = oe.clearTimeout, en = oe.setTimeout, ft = oe.cancelAnimationFrame || oe.mozCancelAnimationFrame || oe.webkitCancelAnimationFrame, tn = oe.requestAnimationFrame || oe.mozRequestAnimationFrame || oe.webkitRequestAnimationFrame;
|
|
1771
|
+
ft == null || tn == null ? (bt = ht, Ct = function(e) {
|
|
1772
1772
|
return en(e, Qt);
|
|
1773
|
-
}) : (
|
|
1774
|
-
|
|
1775
|
-
},
|
|
1773
|
+
}) : (bt = function([e, n]) {
|
|
1774
|
+
ft(e), ht(n);
|
|
1775
|
+
}, Ct = function(e) {
|
|
1776
1776
|
const n = tn(function() {
|
|
1777
|
-
|
|
1777
|
+
ht(o), e();
|
|
1778
1778
|
}), o = en(function() {
|
|
1779
|
-
|
|
1779
|
+
ft(n), e();
|
|
1780
1780
|
}, Qt);
|
|
1781
1781
|
return [n, o];
|
|
1782
1782
|
});
|
|
@@ -1784,31 +1784,31 @@ function Qo(t) {
|
|
|
1784
1784
|
let e, n, o, r, a, l, c;
|
|
1785
1785
|
const u = typeof document < "u" && document.attachEvent;
|
|
1786
1786
|
if (!u) {
|
|
1787
|
-
l = function(
|
|
1788
|
-
const h =
|
|
1787
|
+
l = function(y) {
|
|
1788
|
+
const h = y.__resizeTriggers__, f = h.firstElementChild, g = h.lastElementChild, s = f.firstElementChild;
|
|
1789
1789
|
g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, s.style.width = f.offsetWidth + 1 + "px", s.style.height = f.offsetHeight + 1 + "px", f.scrollLeft = f.scrollWidth, f.scrollTop = f.scrollHeight;
|
|
1790
|
-
}, a = function(
|
|
1791
|
-
return
|
|
1792
|
-
}, c = function(
|
|
1793
|
-
if (
|
|
1790
|
+
}, a = function(y) {
|
|
1791
|
+
return y.offsetWidth !== y.__resizeLast__.width || y.offsetHeight !== y.__resizeLast__.height;
|
|
1792
|
+
}, c = function(y) {
|
|
1793
|
+
if (y.target.className && typeof y.target.className.indexOf == "function" && y.target.className.indexOf("contract-trigger") < 0 && y.target.className.indexOf("expand-trigger") < 0)
|
|
1794
1794
|
return;
|
|
1795
1795
|
const h = this;
|
|
1796
|
-
l(this), this.__resizeRAF__ &&
|
|
1796
|
+
l(this), this.__resizeRAF__ && bt(this.__resizeRAF__), this.__resizeRAF__ = Ct(function() {
|
|
1797
1797
|
a(h) && (h.__resizeLast__.width = h.offsetWidth, h.__resizeLast__.height = h.offsetHeight, h.__resizeListeners__.forEach(function(s) {
|
|
1798
|
-
s.call(h,
|
|
1798
|
+
s.call(h, y);
|
|
1799
1799
|
}));
|
|
1800
1800
|
});
|
|
1801
1801
|
};
|
|
1802
1802
|
let p = !1, w = "";
|
|
1803
1803
|
o = "animationstart";
|
|
1804
1804
|
const P = "Webkit Moz O ms".split(" ");
|
|
1805
|
-
let
|
|
1805
|
+
let S = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), _ = "";
|
|
1806
1806
|
{
|
|
1807
|
-
const
|
|
1808
|
-
if (
|
|
1807
|
+
const y = document.createElement("fakeelement");
|
|
1808
|
+
if (y.style.animationName !== void 0 && (p = !0), p === !1) {
|
|
1809
1809
|
for (let h = 0; h < P.length; h++)
|
|
1810
|
-
if (
|
|
1811
|
-
|
|
1810
|
+
if (y.style[P[h] + "AnimationName"] !== void 0) {
|
|
1811
|
+
_ = P[h], w = "-" + _.toLowerCase() + "-", o = S[h], p = !0;
|
|
1812
1812
|
break;
|
|
1813
1813
|
}
|
|
1814
1814
|
}
|
|
@@ -1817,8 +1817,8 @@ function Qo(t) {
|
|
|
1817
1817
|
}
|
|
1818
1818
|
const d = function(p) {
|
|
1819
1819
|
if (!p.getElementById("detectElementResize")) {
|
|
1820
|
-
const w = (e || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', P = p.head || p.getElementsByTagName("head")[0],
|
|
1821
|
-
|
|
1820
|
+
const w = (e || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', P = p.head || p.getElementsByTagName("head")[0], S = p.createElement("style");
|
|
1821
|
+
S.id = "detectElementResize", S.type = "text/css", t != null && S.setAttribute("nonce", t), S.styleSheet ? S.styleSheet.cssText = w : S.appendChild(p.createTextNode(w)), P.appendChild(S);
|
|
1822
1822
|
}
|
|
1823
1823
|
};
|
|
1824
1824
|
return {
|
|
@@ -1827,12 +1827,12 @@ function Qo(t) {
|
|
|
1827
1827
|
p.attachEvent("onresize", w);
|
|
1828
1828
|
else {
|
|
1829
1829
|
if (!p.__resizeTriggers__) {
|
|
1830
|
-
const P = p.ownerDocument,
|
|
1831
|
-
|
|
1832
|
-
const
|
|
1833
|
-
|
|
1834
|
-
const
|
|
1835
|
-
|
|
1830
|
+
const P = p.ownerDocument, S = oe.getComputedStyle(p);
|
|
1831
|
+
S && S.position === "static" && (p.style.position = "relative"), d(P), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = P.createElement("div")).className = "resize-triggers";
|
|
1832
|
+
const _ = P.createElement("div");
|
|
1833
|
+
_.className = "expand-trigger", _.appendChild(P.createElement("div"));
|
|
1834
|
+
const y = P.createElement("div");
|
|
1835
|
+
y.className = "contract-trigger", p.__resizeTriggers__.appendChild(_), p.__resizeTriggers__.appendChild(y), p.appendChild(p.__resizeTriggers__), l(p), p.addEventListener("scroll", c, !0), o && (p.__resizeTriggers__.__animationListener__ = function(f) {
|
|
1836
1836
|
f.animationName === n && l(p);
|
|
1837
1837
|
}, p.__resizeTriggers__.addEventListener(o, p.__resizeTriggers__.__animationListener__));
|
|
1838
1838
|
}
|
|
@@ -1856,10 +1856,8 @@ class ei extends tr {
|
|
|
1856
1856
|
constructor(...e) {
|
|
1857
1857
|
super(...e), this.state = {
|
|
1858
1858
|
height: this.props.defaultHeight || 0,
|
|
1859
|
-
scaledHeight: this.props.defaultHeight || 0,
|
|
1860
|
-
scaledWidth: this.props.defaultWidth || 0,
|
|
1861
1859
|
width: this.props.defaultWidth || 0
|
|
1862
|
-
}, this._autoSizer = null, this._detectElementResize = null, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
|
|
1860
|
+
}, this._autoSizer = null, this._detectElementResize = null, this._didLogDeprecationWarning = !1, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
|
|
1863
1861
|
this._timeoutId = null;
|
|
1864
1862
|
const {
|
|
1865
1863
|
disableHeight: n,
|
|
@@ -1867,18 +1865,27 @@ class ei extends tr {
|
|
|
1867
1865
|
onResize: r
|
|
1868
1866
|
} = this.props;
|
|
1869
1867
|
if (this._parentNode) {
|
|
1870
|
-
const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), u = parseFloat(a.paddingTop || "0"), d = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), v = m.height - u - d, p = m.width - l - c
|
|
1871
|
-
(!n &&
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1868
|
+
const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), u = parseFloat(a.paddingTop || "0"), d = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), v = m.height - u - d, p = m.width - l - c;
|
|
1869
|
+
if (!n && this.state.height !== v || !o && this.state.width !== p) {
|
|
1870
|
+
this.setState({
|
|
1871
|
+
height: v,
|
|
1872
|
+
width: p
|
|
1873
|
+
});
|
|
1874
|
+
const w = () => {
|
|
1875
|
+
this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
|
|
1876
|
+
};
|
|
1877
|
+
typeof r == "function" && r({
|
|
1878
|
+
height: v,
|
|
1879
|
+
width: p,
|
|
1880
|
+
// TODO Remove these params in the next major release
|
|
1881
|
+
get scaledHeight() {
|
|
1882
|
+
return w(), v;
|
|
1883
|
+
},
|
|
1884
|
+
get scaledWidth() {
|
|
1885
|
+
return w(), p;
|
|
1886
|
+
}
|
|
1887
|
+
});
|
|
1888
|
+
}
|
|
1882
1889
|
}
|
|
1883
1890
|
}, this._setRef = (n) => {
|
|
1884
1891
|
this._autoSizer = n;
|
|
@@ -1914,21 +1921,19 @@ class ei extends tr {
|
|
|
1914
1921
|
...v
|
|
1915
1922
|
} = this.props, {
|
|
1916
1923
|
height: p,
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
width: y
|
|
1920
|
-
} = this.state, b = {
|
|
1924
|
+
width: w
|
|
1925
|
+
} = this.state, P = {
|
|
1921
1926
|
overflow: "visible"
|
|
1922
|
-
},
|
|
1923
|
-
let
|
|
1924
|
-
return r || (p === 0 && (
|
|
1927
|
+
}, S = {};
|
|
1928
|
+
let _ = !1;
|
|
1929
|
+
return r || (p === 0 && (_ = !0), P.height = 0, S.height = p, S.scaledHeight = p), a || (w === 0 && (_ = !0), P.width = 0, S.width = w, S.scaledWidth = w), l && (_ = !1), qe(m, {
|
|
1925
1930
|
ref: this._setRef,
|
|
1926
1931
|
style: {
|
|
1927
|
-
...
|
|
1932
|
+
...P,
|
|
1928
1933
|
...d
|
|
1929
1934
|
},
|
|
1930
1935
|
...v
|
|
1931
|
-
}, !
|
|
1936
|
+
}, !_ && e(S));
|
|
1932
1937
|
}
|
|
1933
1938
|
}
|
|
1934
1939
|
const ti = ln(({ widths: t, heights: e }) => {
|
|
@@ -1958,7 +1963,7 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
1958
1963
|
}
|
|
1959
1964
|
];
|
|
1960
1965
|
}, [t, e, r]), l = k(() => a.reduce((c, u) => c + Number(u.width || 0), 0), [a]);
|
|
1961
|
-
return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((c, u) => /* @__PURE__ */ i(
|
|
1966
|
+
return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((c, u) => /* @__PURE__ */ i(Rt, { style: a[u], pageNumber: c }, c)) });
|
|
1962
1967
|
}), ni = ({ widths: t, heights: e }) => {
|
|
1963
1968
|
const { focusedPage: n } = ie(), o = k(() => ({
|
|
1964
1969
|
position: "absolute",
|
|
@@ -1972,16 +1977,16 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
1972
1977
|
width: r,
|
|
1973
1978
|
position: "relative"
|
|
1974
1979
|
},
|
|
1975
|
-
children: /* @__PURE__ */ i(
|
|
1980
|
+
children: /* @__PURE__ */ i(Rt, { style: o, pageNumber: n }, n)
|
|
1976
1981
|
}
|
|
1977
1982
|
);
|
|
1978
1983
|
}, ri = (t, e, n) => {
|
|
1979
|
-
const o = H(), { contentRef: r } = me(), { heights: a, widths: l } = Ge(), { setFocusedPage: c } = ie(), [u, d] = $([]), { targetScrollPage: m } = pn(), v =
|
|
1980
|
-
const
|
|
1984
|
+
const o = H(), { contentRef: r } = me(), { heights: a, widths: l } = Ge(), { setFocusedPage: c } = ie(), [u, d] = $([]), { targetScrollPage: m } = pn(), v = Tt(u, 0, 500), p = k(() => a.map((P, S) => {
|
|
1985
|
+
const _ = l[S], y = Br(S + 1, t), h = _ * y.columnIndex, f = P * y.rowIndex, g = h + _, s = f + P;
|
|
1981
1986
|
return {
|
|
1982
|
-
pageNumber:
|
|
1983
|
-
...
|
|
1984
|
-
width:
|
|
1987
|
+
pageNumber: S + 1,
|
|
1988
|
+
...y,
|
|
1989
|
+
width: _,
|
|
1985
1990
|
height: P,
|
|
1986
1991
|
startX: h,
|
|
1987
1992
|
startY: f,
|
|
@@ -1990,32 +1995,32 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
1990
1995
|
};
|
|
1991
1996
|
}), [a, l, t, e]);
|
|
1992
1997
|
F(() => {
|
|
1993
|
-
var
|
|
1998
|
+
var S;
|
|
1994
1999
|
v.length > 0 && !m.current && c(v[0].pageNumber);
|
|
1995
|
-
let P = (
|
|
1996
|
-
P && v.filter((
|
|
2000
|
+
let P = (S = v[0]) == null ? void 0 : S.ratio;
|
|
2001
|
+
P && v.filter((_) => Math.round(_.ratio) === Math.round(P)).some((_) => _.pageNumber === m.current) && setTimeout(() => {
|
|
1997
2002
|
m.current = void 0;
|
|
1998
2003
|
}, 500);
|
|
1999
2004
|
}, [v, c]);
|
|
2000
2005
|
const w = N(
|
|
2001
2006
|
(P) => {
|
|
2002
2007
|
o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
|
|
2003
|
-
const
|
|
2004
|
-
startTop:
|
|
2005
|
-
startLeft:
|
|
2006
|
-
endTop:
|
|
2007
|
-
endLeft:
|
|
2008
|
-
},
|
|
2009
|
-
const f = h.endX >=
|
|
2008
|
+
const S = P.target, _ = {
|
|
2009
|
+
startTop: S.scrollTop,
|
|
2010
|
+
startLeft: S.scrollLeft,
|
|
2011
|
+
endTop: S.scrollTop + S.clientHeight,
|
|
2012
|
+
endLeft: S.scrollLeft + S.clientWidth
|
|
2013
|
+
}, y = p.filter((h) => {
|
|
2014
|
+
const f = h.endX >= _.startLeft && h.endY >= _.startTop, g = h.startX <= _.endLeft && h.startY <= _.endTop;
|
|
2010
2015
|
return f && g;
|
|
2011
2016
|
}).map((h) => {
|
|
2012
|
-
const f =
|
|
2017
|
+
const f = _.startLeft > h.startX ? _.startLeft : h.startX, g = _.startTop > h.startY ? _.startTop : h.startY, s = _.endLeft < h.endX ? _.endLeft : h.endX, C = _.endTop < h.endY ? _.endTop : h.endY, b = s - f, T = C - g, x = +(b * T / (h.width * h.height) * 100).toFixed(2);
|
|
2013
2018
|
return {
|
|
2014
2019
|
pageNumber: h.pageNumber,
|
|
2015
2020
|
ratio: x
|
|
2016
2021
|
};
|
|
2017
2022
|
}).sort((h, f) => f.ratio - h.ratio);
|
|
2018
|
-
d(
|
|
2023
|
+
d(y);
|
|
2019
2024
|
});
|
|
2020
2025
|
},
|
|
2021
2026
|
[r, p]
|
|
@@ -2060,8 +2065,8 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2060
2065
|
}
|
|
2061
2066
|
), oi = ln(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
|
|
2062
2067
|
const r = Zr(e, t, n.columnCount);
|
|
2063
|
-
return /* @__PURE__ */ i(
|
|
2064
|
-
}, Yo),
|
|
2068
|
+
return /* @__PURE__ */ i(Rt, { style: o, pageNumber: r }, r);
|
|
2069
|
+
}, Yo), Zs = () => {
|
|
2065
2070
|
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = sr(), { pagesRef: o, setPagesRef: r } = me(), { scrollToPage: a } = wn(), {
|
|
2066
2071
|
virtualScrollRef: l,
|
|
2067
2072
|
getVirtualScrollRef: c,
|
|
@@ -2071,12 +2076,12 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2071
2076
|
virtualScrollableElementRef: v,
|
|
2072
2077
|
totalInnerDimensions: p,
|
|
2073
2078
|
pageScrollElementRef: w
|
|
2074
|
-
} = et(), P = H(!0), { nextPage:
|
|
2079
|
+
} = et(), P = H(!0), { nextPage: S, prevPage: _, setFocusedPage: y, focusedPage: h } = ie(), { scrollMode: f } = Ee(), { viewMode: g } = Ne(), s = H(null), { loading: C } = ee(), { passwordRequired: b } = rr(), { LoaderImageComponent: T } = hn(), E = H(
|
|
2075
2080
|
p
|
|
2076
2081
|
), x = H({
|
|
2077
2082
|
viewMode: g,
|
|
2078
2083
|
scrollMode: f
|
|
2079
|
-
}), R = H(!1),
|
|
2084
|
+
}), R = H(!1), D = H(), { isFullScreen: z } = cr(), {
|
|
2080
2085
|
pageDimension: A,
|
|
2081
2086
|
rowCount: L,
|
|
2082
2087
|
rowHeight: I,
|
|
@@ -2084,7 +2089,7 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2084
2089
|
columnWidth: M,
|
|
2085
2090
|
estimatedColumnWidth: G,
|
|
2086
2091
|
estimatedRowHeight: Z
|
|
2087
|
-
} = Jo(), j =
|
|
2092
|
+
} = Jo(), j = Tt(p, 100), q = H();
|
|
2088
2093
|
ri(O, L, v);
|
|
2089
2094
|
const te = H({
|
|
2090
2095
|
scrollTop: 0,
|
|
@@ -2098,9 +2103,9 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2098
2103
|
}), [O]), we = N(
|
|
2099
2104
|
(U) => {
|
|
2100
2105
|
const V = document.activeElement !== o;
|
|
2101
|
-
!
|
|
2106
|
+
!z && V || (["ArrowUp", "ArrowLeft"].includes(U.key) ? (U.preventDefault(), _()) : ["ArrowDown", "ArrowRight"].includes(U.key) && (U.preventDefault(), S()));
|
|
2102
2107
|
},
|
|
2103
|
-
[
|
|
2108
|
+
[S, _, z, f]
|
|
2104
2109
|
);
|
|
2105
2110
|
F(() => (window.addEventListener("keydown", we), () => {
|
|
2106
2111
|
window.removeEventListener("keydown", we);
|
|
@@ -2135,15 +2140,15 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2135
2140
|
}, 100);
|
|
2136
2141
|
return;
|
|
2137
2142
|
}
|
|
2138
|
-
const ye = U.scrollTop,
|
|
2143
|
+
const ye = U.scrollTop, it = U.scrollLeft;
|
|
2139
2144
|
if (!V.height || !V.width)
|
|
2140
2145
|
return;
|
|
2141
2146
|
R.current = !0;
|
|
2142
|
-
const { height: xe, width:
|
|
2143
|
-
if (Ot === xe &&
|
|
2147
|
+
const { height: xe, width: at } = V, { height: Ot, width: Dt } = E.current;
|
|
2148
|
+
if (Ot === xe && Dt === at)
|
|
2144
2149
|
return;
|
|
2145
|
-
const Xn = ye / Ot * xe, Yn =
|
|
2146
|
-
|
|
2150
|
+
const Xn = ye / Ot * xe, Yn = it / Dt * at, Jn = Math.round(Math.min(Xn, xe)) || 0, Qn = Math.round(Math.min(Yn, at)) || 0;
|
|
2151
|
+
D.current = setTimeout(() => {
|
|
2147
2152
|
requestAnimationFrame(() => {
|
|
2148
2153
|
l == null || l.scrollTo({
|
|
2149
2154
|
scrollTop: Jn,
|
|
@@ -2158,12 +2163,12 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2158
2163
|
[l, g, f, a]
|
|
2159
2164
|
);
|
|
2160
2165
|
F(() => {
|
|
2161
|
-
clearTimeout(
|
|
2166
|
+
clearTimeout(D.current);
|
|
2162
2167
|
const U = Array.from({ length: L }).reduce(
|
|
2163
|
-
(ye,
|
|
2168
|
+
(ye, it, xe) => ye + I(xe),
|
|
2164
2169
|
0
|
|
2165
2170
|
), V = Array.from({ length: O }).reduce(
|
|
2166
|
-
(ye,
|
|
2171
|
+
(ye, it, xe) => ye + M(xe),
|
|
2167
2172
|
0
|
|
2168
2173
|
), Se = Te(V, U);
|
|
2169
2174
|
te.current = Se, _e(Se, { height: U, width: V }), m({
|
|
@@ -2171,7 +2176,7 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2171
2176
|
width: V
|
|
2172
2177
|
});
|
|
2173
2178
|
}, [A, L, O, _e]);
|
|
2174
|
-
const
|
|
2179
|
+
const rt = N(
|
|
2175
2180
|
(U) => {
|
|
2176
2181
|
te.current = {
|
|
2177
2182
|
scrollTop: U.scrollTop,
|
|
@@ -2183,7 +2188,7 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2183
2188
|
F(() => () => {
|
|
2184
2189
|
q.current && clearTimeout(q.current);
|
|
2185
2190
|
}, []);
|
|
2186
|
-
const
|
|
2191
|
+
const ot = k(() => ne(de["rp-pages-container"], {
|
|
2187
2192
|
[de["rp-cursor-grab"]]: Y && !X,
|
|
2188
2193
|
[de["rp-cursor-grabbing"]]: Y && X
|
|
2189
2194
|
}), [Y, X]), Kn = N(
|
|
@@ -2200,19 +2205,19 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2200
2205
|
}, [C]), F(() => {
|
|
2201
2206
|
if (!(j.height === 0 || !P.current)) {
|
|
2202
2207
|
if (e === Q.PAGE_SCROLLING) {
|
|
2203
|
-
t !== h && w &&
|
|
2208
|
+
t !== h && w && y(t), P.current = !1;
|
|
2204
2209
|
return;
|
|
2205
2210
|
}
|
|
2206
|
-
a(t, "auto"),
|
|
2211
|
+
a(t, "auto"), y(t), P.current = !1;
|
|
2207
2212
|
}
|
|
2208
2213
|
}, [
|
|
2209
2214
|
a,
|
|
2210
2215
|
e,
|
|
2211
2216
|
w,
|
|
2212
|
-
|
|
2217
|
+
y,
|
|
2213
2218
|
j
|
|
2214
2219
|
]), /* @__PURE__ */ W(fe, { children: [
|
|
2215
|
-
/* @__PURE__ */ i(In, { id: n, ref: r, tabIndex: -1, className:
|
|
2220
|
+
/* @__PURE__ */ i(In, { id: n, ref: r, tabIndex: -1, className: ot, children: /* @__PURE__ */ i(ei, { style: { minHeight: "50px" }, children: ({ width: U, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Kn, style: { width: U, height: V }, children: f === Q.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2216
2221
|
"div",
|
|
2217
2222
|
{
|
|
2218
2223
|
ref: u,
|
|
@@ -2227,7 +2232,7 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2227
2232
|
itemData: Fe,
|
|
2228
2233
|
outerRef: d,
|
|
2229
2234
|
innerRef: s,
|
|
2230
|
-
onScroll:
|
|
2235
|
+
onScroll: rt,
|
|
2231
2236
|
columnCount: O,
|
|
2232
2237
|
columnWidth: M,
|
|
2233
2238
|
rowHeight: I,
|
|
@@ -2253,10 +2258,10 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2253
2258
|
height: "100%",
|
|
2254
2259
|
width: "100%"
|
|
2255
2260
|
},
|
|
2256
|
-
children:
|
|
2261
|
+
children: T && /* @__PURE__ */ i(T, {})
|
|
2257
2262
|
}
|
|
2258
2263
|
) }) }) }),
|
|
2259
|
-
|
|
2264
|
+
b && /* @__PURE__ */ i(qr, {})
|
|
2260
2265
|
] });
|
|
2261
2266
|
}, We = {
|
|
2262
2267
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
@@ -2264,7 +2269,7 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2264
2269
|
"rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
|
|
2265
2270
|
"rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
|
|
2266
2271
|
"rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
|
|
2267
|
-
},
|
|
2272
|
+
}, mt = {
|
|
2268
2273
|
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
2269
2274
|
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
2270
2275
|
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
@@ -2285,14 +2290,14 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2285
2290
|
}, []), P = N(async () => {
|
|
2286
2291
|
const h = a(l);
|
|
2287
2292
|
h.success || c(h.currentPage.toString());
|
|
2288
|
-
}, [a, l, e]),
|
|
2293
|
+
}, [a, l, e]), S = N(() => {
|
|
2289
2294
|
c(t.toString());
|
|
2290
|
-
}, [t]),
|
|
2295
|
+
}, [t]), _ = N(
|
|
2291
2296
|
(h) => {
|
|
2292
2297
|
h.key === "Enter" && P();
|
|
2293
2298
|
},
|
|
2294
2299
|
[P]
|
|
2295
|
-
),
|
|
2300
|
+
), y = k(() => v === Re.DUAL_PAGE && p === Q.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, v, p]);
|
|
2296
2301
|
return typeof u != "boolean" ? /* @__PURE__ */ i(
|
|
2297
2302
|
u,
|
|
2298
2303
|
{
|
|
@@ -2303,7 +2308,7 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2303
2308
|
goToPage: a,
|
|
2304
2309
|
changePage: n
|
|
2305
2310
|
}
|
|
2306
|
-
) : u ? /* @__PURE__ */ W("div", { className:
|
|
2311
|
+
) : u ? /* @__PURE__ */ W("div", { className: mt["rp-paginate"], children: [
|
|
2307
2312
|
!d && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2308
2313
|
re,
|
|
2309
2314
|
{
|
|
@@ -2316,14 +2321,14 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2316
2321
|
/* @__PURE__ */ i(K, { content: m == null ? void 0 : m.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2317
2322
|
dn,
|
|
2318
2323
|
{
|
|
2319
|
-
onKeyDown:
|
|
2320
|
-
onBlur:
|
|
2324
|
+
onKeyDown: _,
|
|
2325
|
+
onBlur: S,
|
|
2321
2326
|
onChange: w,
|
|
2322
2327
|
value: l,
|
|
2323
|
-
className:
|
|
2328
|
+
className: mt["rp-page-input"]
|
|
2324
2329
|
}
|
|
2325
2330
|
) }),
|
|
2326
|
-
/* @__PURE__ */ W("span", { className:
|
|
2331
|
+
/* @__PURE__ */ W("span", { className: mt["rp-total-page"], children: [
|
|
2327
2332
|
"/",
|
|
2328
2333
|
e
|
|
2329
2334
|
] }),
|
|
@@ -2332,13 +2337,13 @@ const ti = ln(({ widths: t, heights: e }) => {
|
|
|
2332
2337
|
{
|
|
2333
2338
|
onClick: o,
|
|
2334
2339
|
"aria-label": m == null ? void 0 : m.nextPageTooltip,
|
|
2335
|
-
"aria-disabled":
|
|
2340
|
+
"aria-disabled": y,
|
|
2336
2341
|
children: /* @__PURE__ */ i(ai, {})
|
|
2337
2342
|
}
|
|
2338
2343
|
) })
|
|
2339
2344
|
] }) : null;
|
|
2340
2345
|
};
|
|
2341
|
-
var
|
|
2346
|
+
var nt = "Dialog", [Rn, js] = Jr(nt), [ci, se] = Rn(nt), Ln = (t) => {
|
|
2342
2347
|
const {
|
|
2343
2348
|
__scopeDialog: e,
|
|
2344
2349
|
children: n,
|
|
@@ -2346,10 +2351,11 @@ var Rt = "Dialog", [Rn, Zs] = Jr(Rt), [ci, se] = Rn(Rt), Ln = (t) => {
|
|
|
2346
2351
|
defaultOpen: r,
|
|
2347
2352
|
onOpenChange: a,
|
|
2348
2353
|
modal: l = !0
|
|
2349
|
-
} = t, c = B.useRef(null), u = B.useRef(null), [d
|
|
2354
|
+
} = t, c = B.useRef(null), u = B.useRef(null), [d, m] = eo({
|
|
2350
2355
|
prop: o,
|
|
2351
|
-
defaultProp: r,
|
|
2352
|
-
onChange: a
|
|
2356
|
+
defaultProp: r ?? !1,
|
|
2357
|
+
onChange: a,
|
|
2358
|
+
caller: nt
|
|
2353
2359
|
});
|
|
2354
2360
|
return /* @__PURE__ */ i(
|
|
2355
2361
|
ci,
|
|
@@ -2357,9 +2363,9 @@ var Rt = "Dialog", [Rn, Zs] = Jr(Rt), [ci, se] = Rn(Rt), Ln = (t) => {
|
|
|
2357
2363
|
scope: e,
|
|
2358
2364
|
triggerRef: c,
|
|
2359
2365
|
contentRef: u,
|
|
2360
|
-
contentId:
|
|
2361
|
-
titleId:
|
|
2362
|
-
descriptionId:
|
|
2366
|
+
contentId: lt(),
|
|
2367
|
+
titleId: lt(),
|
|
2368
|
+
descriptionId: lt(),
|
|
2363
2369
|
open: d,
|
|
2364
2370
|
onOpenChange: m,
|
|
2365
2371
|
onOpenToggle: B.useCallback(() => m((v) => !v), [m]),
|
|
@@ -2368,10 +2374,10 @@ var Rt = "Dialog", [Rn, Zs] = Jr(Rt), [ci, se] = Rn(Rt), Ln = (t) => {
|
|
|
2368
2374
|
}
|
|
2369
2375
|
);
|
|
2370
2376
|
};
|
|
2371
|
-
Ln.displayName =
|
|
2377
|
+
Ln.displayName = nt;
|
|
2372
2378
|
var En = "DialogTrigger", li = B.forwardRef(
|
|
2373
2379
|
(t, e) => {
|
|
2374
|
-
const { __scopeDialog: n, ...o } = t, r = se(En, n), a =
|
|
2380
|
+
const { __scopeDialog: n, ...o } = t, r = se(En, n), a = St(e, r.triggerRef);
|
|
2375
2381
|
return /* @__PURE__ */ i(
|
|
2376
2382
|
Ve.button,
|
|
2377
2383
|
{
|
|
@@ -2392,23 +2398,23 @@ var Lt = "DialogPortal", [di, Nn] = Rn(Lt, {
|
|
|
2392
2398
|
forceMount: void 0
|
|
2393
2399
|
}), On = (t) => {
|
|
2394
2400
|
const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = se(Lt, e);
|
|
2395
|
-
return /* @__PURE__ */ i(di, { scope: e, forceMount: n, children: B.Children.map(o, (l) => /* @__PURE__ */ i(
|
|
2401
|
+
return /* @__PURE__ */ i(di, { scope: e, forceMount: n, children: B.Children.map(o, (l) => /* @__PURE__ */ i(yt, { present: n || a.open, children: /* @__PURE__ */ i(ao, { asChild: !0, container: r, children: l }) })) });
|
|
2396
2402
|
};
|
|
2397
2403
|
On.displayName = Lt;
|
|
2398
|
-
var Xe = "DialogOverlay",
|
|
2404
|
+
var Xe = "DialogOverlay", Dn = B.forwardRef(
|
|
2399
2405
|
(t, e) => {
|
|
2400
2406
|
const n = Nn(Xe, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = se(Xe, t.__scopeDialog);
|
|
2401
|
-
return a.modal ? /* @__PURE__ */ i(
|
|
2407
|
+
return a.modal ? /* @__PURE__ */ i(yt, { present: o || a.open, children: /* @__PURE__ */ i(pi, { ...r, ref: e }) }) : null;
|
|
2402
2408
|
}
|
|
2403
2409
|
);
|
|
2404
|
-
|
|
2405
|
-
var ui = B.forwardRef(
|
|
2410
|
+
Dn.displayName = Xe;
|
|
2411
|
+
var ui = to("DialogOverlay.RemoveScroll"), pi = B.forwardRef(
|
|
2406
2412
|
(t, e) => {
|
|
2407
2413
|
const { __scopeDialog: n, ...o } = t, r = se(Xe, n);
|
|
2408
2414
|
return (
|
|
2409
2415
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2410
2416
|
// ie. when `Overlay` and `Content` are siblings
|
|
2411
|
-
/* @__PURE__ */ i(ro, { as:
|
|
2417
|
+
/* @__PURE__ */ i(ro, { as: ui, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
|
|
2412
2418
|
Ve.div,
|
|
2413
2419
|
{
|
|
2414
2420
|
"data-state": Nt(r.open),
|
|
@@ -2419,16 +2425,16 @@ var ui = B.forwardRef(
|
|
|
2419
2425
|
) })
|
|
2420
2426
|
);
|
|
2421
2427
|
}
|
|
2422
|
-
), Le = "DialogContent",
|
|
2428
|
+
), Le = "DialogContent", zn = B.forwardRef(
|
|
2423
2429
|
(t, e) => {
|
|
2424
2430
|
const n = Nn(Le, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = se(Le, t.__scopeDialog);
|
|
2425
|
-
return /* @__PURE__ */ i(
|
|
2431
|
+
return /* @__PURE__ */ i(yt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(hi, { ...r, ref: e }) : /* @__PURE__ */ i(fi, { ...r, ref: e }) });
|
|
2426
2432
|
}
|
|
2427
2433
|
);
|
|
2428
|
-
|
|
2429
|
-
var
|
|
2434
|
+
zn.displayName = Le;
|
|
2435
|
+
var hi = B.forwardRef(
|
|
2430
2436
|
(t, e) => {
|
|
2431
|
-
const n = se(Le, t.__scopeDialog), o = B.useRef(null), r =
|
|
2437
|
+
const n = se(Le, t.__scopeDialog), o = B.useRef(null), r = St(e, n.contentRef, o);
|
|
2432
2438
|
return B.useEffect(() => {
|
|
2433
2439
|
const a = o.current;
|
|
2434
2440
|
if (a)
|
|
@@ -2455,7 +2461,7 @@ var pi = B.forwardRef(
|
|
|
2455
2461
|
}
|
|
2456
2462
|
);
|
|
2457
2463
|
}
|
|
2458
|
-
),
|
|
2464
|
+
), fi = B.forwardRef(
|
|
2459
2465
|
(t, e) => {
|
|
2460
2466
|
const n = se(Le, t.__scopeDialog), o = B.useRef(!1), r = B.useRef(!1);
|
|
2461
2467
|
return /* @__PURE__ */ i(
|
|
@@ -2480,7 +2486,7 @@ var pi = B.forwardRef(
|
|
|
2480
2486
|
}
|
|
2481
2487
|
), An = B.forwardRef(
|
|
2482
2488
|
(t, e) => {
|
|
2483
|
-
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = se(Le, n), u = B.useRef(null), d =
|
|
2489
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = se(Le, n), u = B.useRef(null), d = St(e, u);
|
|
2484
2490
|
return oo(), /* @__PURE__ */ W(fe, { children: [
|
|
2485
2491
|
/* @__PURE__ */ i(
|
|
2486
2492
|
io,
|
|
@@ -2506,8 +2512,8 @@ var pi = B.forwardRef(
|
|
|
2506
2512
|
}
|
|
2507
2513
|
),
|
|
2508
2514
|
/* @__PURE__ */ W(fe, { children: [
|
|
2509
|
-
/* @__PURE__ */ i(
|
|
2510
|
-
/* @__PURE__ */ i(
|
|
2515
|
+
/* @__PURE__ */ i(gi, { titleId: c.titleId }),
|
|
2516
|
+
/* @__PURE__ */ i(wi, { contentRef: u, descriptionId: c.descriptionId })
|
|
2511
2517
|
] })
|
|
2512
2518
|
] });
|
|
2513
2519
|
}
|
|
@@ -2518,13 +2524,13 @@ var pi = B.forwardRef(
|
|
|
2518
2524
|
}
|
|
2519
2525
|
);
|
|
2520
2526
|
Fn.displayName = Et;
|
|
2521
|
-
var Wn = "DialogDescription",
|
|
2527
|
+
var Wn = "DialogDescription", mi = B.forwardRef(
|
|
2522
2528
|
(t, e) => {
|
|
2523
2529
|
const { __scopeDialog: n, ...o } = t, r = se(Wn, n);
|
|
2524
2530
|
return /* @__PURE__ */ i(Ve.p, { id: r.descriptionId, ...o, ref: e });
|
|
2525
2531
|
}
|
|
2526
2532
|
);
|
|
2527
|
-
|
|
2533
|
+
mi.displayName = Wn;
|
|
2528
2534
|
var kn = "DialogClose", Mn = B.forwardRef(
|
|
2529
2535
|
(t, e) => {
|
|
2530
2536
|
const { __scopeDialog: n, ...o } = t, r = se(kn, n);
|
|
@@ -2543,11 +2549,11 @@ Mn.displayName = kn;
|
|
|
2543
2549
|
function Nt(t) {
|
|
2544
2550
|
return t ? "open" : "closed";
|
|
2545
2551
|
}
|
|
2546
|
-
var Hn = "DialogTitleWarning", [
|
|
2552
|
+
var Hn = "DialogTitleWarning", [Ks, $n] = Qr(Hn, {
|
|
2547
2553
|
contentName: Le,
|
|
2548
2554
|
titleName: Et,
|
|
2549
2555
|
docsSlug: "dialog"
|
|
2550
|
-
}),
|
|
2556
|
+
}), gi = ({ titleId: t }) => {
|
|
2551
2557
|
const e = $n(Hn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2552
2558
|
|
|
2553
2559
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -2556,14 +2562,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2556
2562
|
return B.useEffect(() => {
|
|
2557
2563
|
t && (document.getElementById(t) || console.error(n));
|
|
2558
2564
|
}, [n, t]), null;
|
|
2559
|
-
},
|
|
2560
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$n(
|
|
2565
|
+
}, vi = "DialogDescriptionWarning", wi = ({ contentRef: t, descriptionId: e }) => {
|
|
2566
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$n(vi).contentName}}.`;
|
|
2561
2567
|
return B.useEffect(() => {
|
|
2562
2568
|
var a;
|
|
2563
2569
|
const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2564
2570
|
e && r && (document.getElementById(e) || console.warn(o));
|
|
2565
2571
|
}, [o, t, e]), null;
|
|
2566
|
-
},
|
|
2572
|
+
}, _i = Ln, bi = On, Ci = Dn, Pi = zn, Ti = Fn, Si = Mn;
|
|
2567
2573
|
const Ie = {
|
|
2568
2574
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2569
2575
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2572,7 +2578,7 @@ const Ie = {
|
|
|
2572
2578
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2573
2579
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2574
2580
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2575
|
-
},
|
|
2581
|
+
}, yi = () => {
|
|
2576
2582
|
const { pdfProperties: t } = ee(), { container: e } = me(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = uo(), { localeMessages: r } = ae(), a = k(() => {
|
|
2577
2583
|
if (!t)
|
|
2578
2584
|
return [];
|
|
@@ -2586,9 +2592,9 @@ const Ie = {
|
|
|
2586
2592
|
creator: p,
|
|
2587
2593
|
keywords: w,
|
|
2588
2594
|
modifiedOn: P,
|
|
2589
|
-
pdfProducer:
|
|
2590
|
-
pdfVersion:
|
|
2591
|
-
pageCount:
|
|
2595
|
+
pdfProducer: S,
|
|
2596
|
+
pdfVersion: _,
|
|
2597
|
+
pageCount: y
|
|
2592
2598
|
} = t;
|
|
2593
2599
|
return [
|
|
2594
2600
|
{ label: r == null ? void 0 : r.propertiesFilenameLabel, value: c },
|
|
@@ -2608,24 +2614,24 @@ const Ie = {
|
|
|
2608
2614
|
value: P ? kt(P) : ""
|
|
2609
2615
|
},
|
|
2610
2616
|
{ separate: !0 },
|
|
2611
|
-
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value:
|
|
2612
|
-
{ label: r == null ? void 0 : r.propertiesPDFVersionLabel, value:
|
|
2613
|
-
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value:
|
|
2617
|
+
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: S },
|
|
2618
|
+
{ label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: _ },
|
|
2619
|
+
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value: y }
|
|
2614
2620
|
];
|
|
2615
2621
|
}, [t, r]);
|
|
2616
|
-
return /* @__PURE__ */ i(
|
|
2617
|
-
/* @__PURE__ */ i(
|
|
2618
|
-
/* @__PURE__ */ W(
|
|
2619
|
-
/* @__PURE__ */ i(
|
|
2622
|
+
return /* @__PURE__ */ i(_i, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(bi, { container: e, children: /* @__PURE__ */ W("div", { className: Ie["rp-dialog-wrapper"], children: [
|
|
2623
|
+
/* @__PURE__ */ i(Ci, { className: Ie["rp-dialog-overlay"] }),
|
|
2624
|
+
/* @__PURE__ */ W(Pi, { className: Ie["rp-document-dialog"], children: [
|
|
2625
|
+
/* @__PURE__ */ i(Ti, { className: Ie["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2620
2626
|
/* @__PURE__ */ i("div", { className: Ie["rp-document-properties"], children: a.map((l, c) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: Ie["rp-properties-divider"] }) : /* @__PURE__ */ i(lo, { label: l.label, value: l.value }) }, c)) }),
|
|
2621
|
-
/* @__PURE__ */ i(
|
|
2627
|
+
/* @__PURE__ */ i(Si, { asChild: !0, className: Ie["rp-dialog-close"], children: /* @__PURE__ */ i(co, {}) })
|
|
2622
2628
|
] })
|
|
2623
2629
|
] }) }) });
|
|
2624
|
-
},
|
|
2630
|
+
}, xi = {
|
|
2625
2631
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2626
|
-
}, nn = ".pdf",
|
|
2632
|
+
}, nn = ".pdf", Ii = (t) => URL.createObjectURL(t), Ri = async (t) => {
|
|
2627
2633
|
const n = await (await fetch(t)).blob();
|
|
2628
|
-
return
|
|
2634
|
+
return Ii(n);
|
|
2629
2635
|
}, Gn = () => {
|
|
2630
2636
|
const { filename: t, pdfSrc: e } = ee(), { downloadFilename: n } = fr(), o = (a) => {
|
|
2631
2637
|
const l = n || a;
|
|
@@ -2635,26 +2641,26 @@ const Ie = {
|
|
|
2635
2641
|
if (!t || !e)
|
|
2636
2642
|
throw new Error("There is no PDF source to download");
|
|
2637
2643
|
const a = document.createElement("a");
|
|
2638
|
-
a.href = await
|
|
2644
|
+
a.href = await Ri(e), a.download = o(t), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2639
2645
|
}, [t, e]) };
|
|
2640
2646
|
}, Un = () => {
|
|
2641
2647
|
const { downloadIcon: t } = ue();
|
|
2642
2648
|
return t || /* @__PURE__ */ i(vo, {});
|
|
2643
|
-
}, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }),
|
|
2649
|
+
}, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Li = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Vn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Un, {}) }) }), Ei = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Ce, { onClick: t, children: /* @__PURE__ */ W(Vn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2644
2650
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Un, {}) }),
|
|
2645
2651
|
e == null ? void 0 : e.downloadFileLabel
|
|
2646
2652
|
] }) }), qn = () => {
|
|
2647
2653
|
const { download: t } = Gn(), { downloadTool: e = !0 } = ge(), { isSmallScreen: n } = Pe(), { localeMessages: o } = ae();
|
|
2648
|
-
return e ? n ? /* @__PURE__ */ i(
|
|
2654
|
+
return e ? n ? /* @__PURE__ */ i(Ei, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(Li, { download: t, localeMessages: o }) : null : null;
|
|
2649
2655
|
}, Bn = () => {
|
|
2650
2656
|
const { printIcon: t } = ue();
|
|
2651
2657
|
return t || /* @__PURE__ */ i(wo, {});
|
|
2652
|
-
}, Zn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }),
|
|
2658
|
+
}, Zn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Ni = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Zn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Bn, {}) }) }), Oi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Ce, { onClick: t, children: /* @__PURE__ */ W(Zn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2653
2659
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Bn, {}) }),
|
|
2654
2660
|
e == null ? void 0 : e.printLabel
|
|
2655
2661
|
] }) }), jn = () => {
|
|
2656
2662
|
const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: l = !0 } = ge(), { isSmallScreen: c } = Pe(), { localeMessages: u } = ae();
|
|
2657
|
-
return l ? c ? /* @__PURE__ */ i(
|
|
2663
|
+
return l ? c ? /* @__PURE__ */ i(Oi, { print: t, localeMessages: u }) : typeof l == "function" ? /* @__PURE__ */ i(
|
|
2658
2664
|
l,
|
|
2659
2665
|
{
|
|
2660
2666
|
print: t,
|
|
@@ -2664,16 +2670,16 @@ const Ie = {
|
|
|
2664
2670
|
setOnComplete: o,
|
|
2665
2671
|
progress: a
|
|
2666
2672
|
}
|
|
2667
|
-
) : l ? /* @__PURE__ */ i(
|
|
2668
|
-
},
|
|
2673
|
+
) : l ? /* @__PURE__ */ i(Ni, { print: t, localeMessages: u }) : null : null;
|
|
2674
|
+
}, Di = {
|
|
2669
2675
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2670
2676
|
}, zi = () => {
|
|
2671
2677
|
const { goToFirstPageIcon: t } = ue();
|
|
2672
|
-
return t || /* @__PURE__ */ i(vn, { className:
|
|
2673
|
-
},
|
|
2678
|
+
return t || /* @__PURE__ */ i(vn, { className: Di["rp-go-to-Top"] });
|
|
2679
|
+
}, Ai = () => {
|
|
2674
2680
|
const { goToLastPageIcon: t } = ue();
|
|
2675
2681
|
return t || /* @__PURE__ */ i(vn, {});
|
|
2676
|
-
}, rn = { width: "100%" },
|
|
2682
|
+
}, rn = { width: "100%" }, Fi = () => {
|
|
2677
2683
|
const { goToPage: t, totalPages: e, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ge(), { localeMessages: r } = ae(), a = k(() => n === 1, [n]), l = k(() => n === e, [n, e]), c = N(() => {
|
|
2678
2684
|
t(1);
|
|
2679
2685
|
}, [t]), u = N(() => {
|
|
@@ -2685,12 +2691,12 @@ const Ie = {
|
|
|
2685
2691
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
|
|
2686
2692
|
] }) }) }),
|
|
2687
2693
|
/* @__PURE__ */ i(Ce, { onClick: u, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ W("div", { className: "rp-menu-item", "aria-disabled": l, children: [
|
|
2688
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2694
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Ai, {}) }),
|
|
2689
2695
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
|
|
2690
2696
|
] }) }) }),
|
|
2691
|
-
/* @__PURE__ */ i(
|
|
2697
|
+
/* @__PURE__ */ i(xt, {})
|
|
2692
2698
|
] }) : null;
|
|
2693
|
-
},
|
|
2699
|
+
}, Wi = () => {
|
|
2694
2700
|
const { container: t, pagesRef: e } = me(), { isSmallScreen: n } = Pe(), {
|
|
2695
2701
|
openFileTool: o,
|
|
2696
2702
|
downloadTool: r,
|
|
@@ -2701,14 +2707,14 @@ const Ie = {
|
|
|
2701
2707
|
jumpNavigationTool: d,
|
|
2702
2708
|
printTool: m,
|
|
2703
2709
|
fullscreenTool: v
|
|
2704
|
-
} = ge(), { localeMessages: p } = ae(), [w, P] = $(0),
|
|
2705
|
-
new ResizeObserver((
|
|
2706
|
-
P(
|
|
2710
|
+
} = ge(), { localeMessages: p } = ae(), [w, P] = $(0), S = H(
|
|
2711
|
+
new ResizeObserver((y) => {
|
|
2712
|
+
P(y[0].contentRect.height);
|
|
2707
2713
|
})
|
|
2708
|
-
),
|
|
2709
|
-
const
|
|
2714
|
+
), _ = k(() => {
|
|
2715
|
+
const y = d || c || u || l || a;
|
|
2710
2716
|
let h = !1;
|
|
2711
|
-
return n && (h = !(!o && !r && !m && !v)),
|
|
2717
|
+
return n && (h = !(!o && !r && !m && !v)), y || h;
|
|
2712
2718
|
}, [
|
|
2713
2719
|
o,
|
|
2714
2720
|
r,
|
|
@@ -2719,9 +2725,9 @@ const Ie = {
|
|
|
2719
2725
|
d,
|
|
2720
2726
|
n
|
|
2721
2727
|
]);
|
|
2722
|
-
return F(() => (e &&
|
|
2723
|
-
|
|
2724
|
-
}), [e]),
|
|
2728
|
+
return F(() => (e && S.current.observe(e), () => {
|
|
2729
|
+
S.current.disconnect();
|
|
2730
|
+
}), [e]), _ ? /* @__PURE__ */ W(po, { children: [
|
|
2725
2731
|
/* @__PURE__ */ i(
|
|
2726
2732
|
mn,
|
|
2727
2733
|
{
|
|
@@ -2733,7 +2739,7 @@ const Ie = {
|
|
|
2733
2739
|
"div",
|
|
2734
2740
|
{
|
|
2735
2741
|
style: { maxHeight: `${w}px`, overflow: "auto" },
|
|
2736
|
-
className:
|
|
2742
|
+
className: xi["rp-other-tool-content"],
|
|
2737
2743
|
"data-rp": "moreOptionsDropdown",
|
|
2738
2744
|
children: [
|
|
2739
2745
|
n && /* @__PURE__ */ W(Ke, { children: [
|
|
@@ -2741,9 +2747,9 @@ const Ie = {
|
|
|
2741
2747
|
/* @__PURE__ */ i(qn, {}),
|
|
2742
2748
|
/* @__PURE__ */ i(jn, {}),
|
|
2743
2749
|
/* @__PURE__ */ i(gn, {}),
|
|
2744
|
-
/* @__PURE__ */ i(
|
|
2750
|
+
/* @__PURE__ */ i(xt, {})
|
|
2745
2751
|
] }),
|
|
2746
|
-
/* @__PURE__ */ i(
|
|
2752
|
+
/* @__PURE__ */ i(Fi, {}),
|
|
2747
2753
|
/* @__PURE__ */ i(fo, {}),
|
|
2748
2754
|
/* @__PURE__ */ i(_o, {}),
|
|
2749
2755
|
/* @__PURE__ */ i(mo, {}),
|
|
@@ -2754,9 +2760,9 @@ const Ie = {
|
|
|
2754
2760
|
)
|
|
2755
2761
|
}
|
|
2756
2762
|
),
|
|
2757
|
-
/* @__PURE__ */ i(
|
|
2763
|
+
/* @__PURE__ */ i(yi, {})
|
|
2758
2764
|
] }) : null;
|
|
2759
|
-
},
|
|
2765
|
+
}, ki = () => {
|
|
2760
2766
|
const { isSmallScreen: t } = Pe();
|
|
2761
2767
|
return /* @__PURE__ */ W(fe, { children: [
|
|
2762
2768
|
/* @__PURE__ */ i(Xr, {}),
|
|
@@ -2766,21 +2772,21 @@ const Ie = {
|
|
|
2766
2772
|
/* @__PURE__ */ i(jn, {}),
|
|
2767
2773
|
/* @__PURE__ */ i(gn, {})
|
|
2768
2774
|
] }),
|
|
2769
|
-
/* @__PURE__ */ i(
|
|
2775
|
+
/* @__PURE__ */ i(Wi, {})
|
|
2770
2776
|
] });
|
|
2771
|
-
},
|
|
2777
|
+
}, De = {
|
|
2772
2778
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
|
|
2773
2779
|
"rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_cocqs_6",
|
|
2774
2780
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2775
2781
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2776
2782
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2777
|
-
},
|
|
2783
|
+
}, Mi = 25, gt = 1e3, Hi = [50, 75, 100, 125, 150, 200, 300, 400], $i = () => {
|
|
2778
2784
|
const { zoomInIcon: t } = ue();
|
|
2779
2785
|
return t || /* @__PURE__ */ i(bo, {});
|
|
2780
|
-
},
|
|
2786
|
+
}, Gi = () => {
|
|
2781
2787
|
const { zoomOutIcon: t } = ue();
|
|
2782
2788
|
return t || /* @__PURE__ */ i(Co, {});
|
|
2783
|
-
},
|
|
2789
|
+
}, Ui = () => {
|
|
2784
2790
|
const { zoomLevel: t, setZoomLevel: e } = Qe(), { container: n, pagesRef: o } = me(), { zoomTool: r = !0 } = ge(), { focusedPage: a } = ie(), { pageRotate: l } = Ue(), { pages: c } = ee(), { isSmallScreen: u } = Pe(), { localeMessages: d } = ae(), { viewMode: m } = Ne(), [v, p] = $(0), w = H(
|
|
2785
2791
|
new ResizeObserver((s) => {
|
|
2786
2792
|
p(s[0].contentRect.height);
|
|
@@ -2788,24 +2794,24 @@ const Ie = {
|
|
|
2788
2794
|
), P = N(() => {
|
|
2789
2795
|
e((s) => {
|
|
2790
2796
|
const C = Math.floor(s / 25) * 25;
|
|
2791
|
-
return Math.min(C + 25,
|
|
2797
|
+
return Math.min(C + 25, gt);
|
|
2792
2798
|
});
|
|
2793
|
-
}, [e]),
|
|
2799
|
+
}, [e]), S = N(() => {
|
|
2794
2800
|
e((s) => {
|
|
2795
2801
|
const C = Math.ceil(s / 25) * 25;
|
|
2796
|
-
return Math.min(C - 25,
|
|
2802
|
+
return Math.min(C - 25, gt);
|
|
2797
2803
|
});
|
|
2798
|
-
}, [e]),
|
|
2804
|
+
}, [e]), _ = k(() => t === Mi, [t]), y = k(() => t === gt, [t]), h = k(() => {
|
|
2799
2805
|
const s = c.get(a);
|
|
2800
2806
|
return s ? s.page.getViewport({ scale: 1, rotation: l[a] }) : null;
|
|
2801
2807
|
}, [c, a, l]), f = N(
|
|
2802
2808
|
(s) => {
|
|
2803
|
-
const C = ((h == null ? void 0 : h.width) || 0) + 2 * Mt,
|
|
2809
|
+
const C = ((h == null ? void 0 : h.width) || 0) + 2 * Mt, b = ((h == null ? void 0 : h.height) || 0) + 2 * Mt, T = (o == null ? void 0 : o.clientWidth) || 0, E = (o == null ? void 0 : o.clientHeight) || 0, x = Po(
|
|
2804
2810
|
s,
|
|
2805
|
-
|
|
2811
|
+
T,
|
|
2806
2812
|
E,
|
|
2807
2813
|
C,
|
|
2808
|
-
|
|
2814
|
+
b,
|
|
2809
2815
|
m
|
|
2810
2816
|
);
|
|
2811
2817
|
e(x);
|
|
@@ -2819,14 +2825,14 @@ const Ie = {
|
|
|
2819
2825
|
);
|
|
2820
2826
|
return F(() => (o && w.current.observe(o), () => {
|
|
2821
2827
|
w.current.disconnect();
|
|
2822
|
-
}), [o]), typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ W("div", { className:
|
|
2828
|
+
}), [o]), typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ W("div", { className: De["rp-zoom-wrapper"], children: [
|
|
2823
2829
|
/* @__PURE__ */ i(K, { content: d == null ? void 0 : d.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2824
2830
|
re,
|
|
2825
2831
|
{
|
|
2826
|
-
disabled:
|
|
2827
|
-
onClick:
|
|
2832
|
+
disabled: _,
|
|
2833
|
+
onClick: S,
|
|
2828
2834
|
"aria-label": d == null ? void 0 : d.zoomOutTooltip,
|
|
2829
|
-
children: /* @__PURE__ */ i(
|
|
2835
|
+
children: /* @__PURE__ */ i(Gi, {})
|
|
2830
2836
|
}
|
|
2831
2837
|
) }),
|
|
2832
2838
|
!u && /* @__PURE__ */ i(
|
|
@@ -2836,12 +2842,12 @@ const Ie = {
|
|
|
2836
2842
|
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: d == null ? void 0 : d.zoomSelectTooltip, children: /* @__PURE__ */ W(
|
|
2837
2843
|
re,
|
|
2838
2844
|
{
|
|
2839
|
-
className:
|
|
2845
|
+
className: De["rp-current-zoom-wrapper"],
|
|
2840
2846
|
"aria-label": d == null ? void 0 : d.zoomSelectTooltip,
|
|
2841
2847
|
children: [
|
|
2842
|
-
/* @__PURE__ */ i("span", { className:
|
|
2843
|
-
/* @__PURE__ */ i("span", { className:
|
|
2844
|
-
/* @__PURE__ */ i(He, { className:
|
|
2848
|
+
/* @__PURE__ */ i("span", { className: De["rp-current-zoom-text"], children: t }),
|
|
2849
|
+
/* @__PURE__ */ i("span", { className: De["rp-current-zoom-text"], children: "%" }),
|
|
2850
|
+
/* @__PURE__ */ i(He, { className: De["rp-current-zoom-icon"] })
|
|
2845
2851
|
]
|
|
2846
2852
|
}
|
|
2847
2853
|
) }) }),
|
|
@@ -2853,15 +2859,15 @@ const Ie = {
|
|
|
2853
2859
|
"div",
|
|
2854
2860
|
{
|
|
2855
2861
|
style: { maxHeight: `${v}px`, overflow: "auto" },
|
|
2856
|
-
className:
|
|
2862
|
+
className: De["rp-zoom-dropdown-content"],
|
|
2857
2863
|
children: [
|
|
2858
2864
|
/* @__PURE__ */ W(Ke, { children: [
|
|
2859
|
-
/* @__PURE__ */ i(Ce, { onClick: () => g(
|
|
2860
|
-
/* @__PURE__ */ i(Ce, { onClick: () => g(
|
|
2861
|
-
/* @__PURE__ */ i(Ce, { onClick: () => g(
|
|
2865
|
+
/* @__PURE__ */ i(Ce, { onClick: () => g(st.ACTUAL), children: d == null ? void 0 : d.zoomActualSize }),
|
|
2866
|
+
/* @__PURE__ */ i(Ce, { onClick: () => g(st.PAGE_FIT), children: d == null ? void 0 : d.zoomPageFit }),
|
|
2867
|
+
/* @__PURE__ */ i(Ce, { onClick: () => g(st.PAGE_WIDTH), children: d == null ? void 0 : d.zoomPageWidth })
|
|
2862
2868
|
] }),
|
|
2863
|
-
/* @__PURE__ */ i(
|
|
2864
|
-
/* @__PURE__ */ i(Ke, { children:
|
|
2869
|
+
/* @__PURE__ */ i(xt, {}),
|
|
2870
|
+
/* @__PURE__ */ i(Ke, { children: Hi.map((s) => /* @__PURE__ */ W(Ce, { onClick: () => g(s), children: [
|
|
2865
2871
|
s,
|
|
2866
2872
|
" %"
|
|
2867
2873
|
] }, s)) })
|
|
@@ -2873,10 +2879,10 @@ const Ie = {
|
|
|
2873
2879
|
/* @__PURE__ */ i(K, { content: d == null ? void 0 : d.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
2874
2880
|
re,
|
|
2875
2881
|
{
|
|
2876
|
-
disabled:
|
|
2882
|
+
disabled: y,
|
|
2877
2883
|
onClick: P,
|
|
2878
2884
|
"aria-label": d == null ? void 0 : d.zoomInTooltip,
|
|
2879
|
-
children: /* @__PURE__ */ i(
|
|
2885
|
+
children: /* @__PURE__ */ i($i, {})
|
|
2880
2886
|
}
|
|
2881
2887
|
) })
|
|
2882
2888
|
] }) : null;
|
|
@@ -2885,7 +2891,7 @@ const Ie = {
|
|
|
2885
2891
|
totalMatches: t,
|
|
2886
2892
|
nextMatch: e,
|
|
2887
2893
|
prevMatch: n
|
|
2888
|
-
} =
|
|
2894
|
+
} = It(), { localeMessages: o } = ae();
|
|
2889
2895
|
return /* @__PURE__ */ W(fe, { children: [
|
|
2890
2896
|
/* @__PURE__ */ i(K, { content: o == null ? void 0 : o.searchPrevTooltip, className: J["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(re, { onClick: n, "aria-label": o == null ? void 0 : o.searchPrevTooltip, children: /* @__PURE__ */ i(
|
|
2891
2897
|
He,
|
|
@@ -2906,7 +2912,7 @@ const Ie = {
|
|
|
2906
2912
|
}, an = () => {
|
|
2907
2913
|
const { searchIcon: t } = ue();
|
|
2908
2914
|
return t || /* @__PURE__ */ i(To, {});
|
|
2909
|
-
},
|
|
2915
|
+
}, Vi = () => {
|
|
2910
2916
|
const { container: t } = me(), [e, n] = $(!1), { pdf: o } = ee(), [r, a] = $(null), {
|
|
2911
2917
|
searchOptions: l,
|
|
2912
2918
|
setSearchOptions: c,
|
|
@@ -2917,34 +2923,34 @@ const Ie = {
|
|
|
2917
2923
|
nextMatch: p,
|
|
2918
2924
|
prevMatch: w,
|
|
2919
2925
|
search: P
|
|
2920
|
-
} =
|
|
2926
|
+
} = It(), { searchTool: S = !0 } = ge(), [_, y] = $(P), { localeMessages: h } = ae(), { isSmallScreen: f } = Pe(), g = N(() => {
|
|
2921
2927
|
n(!0);
|
|
2922
2928
|
}, []), s = N(() => {
|
|
2923
|
-
d(""),
|
|
2929
|
+
d(""), y(""), n(!1);
|
|
2924
2930
|
}, [d]), C = (I) => {
|
|
2925
2931
|
const O = I.key === "Enter", M = I.key === " ";
|
|
2926
2932
|
(O || M) && s();
|
|
2927
|
-
},
|
|
2933
|
+
}, b = N(
|
|
2928
2934
|
(I) => {
|
|
2929
2935
|
I.key === "Escape" && e && s();
|
|
2930
2936
|
},
|
|
2931
2937
|
[e]
|
|
2932
|
-
),
|
|
2938
|
+
), T = N(
|
|
2933
2939
|
(I) => {
|
|
2934
|
-
I.shiftKey && I.key === "Enter" ? w() : I.key === "Enter" && P !==
|
|
2940
|
+
I.shiftKey && I.key === "Enter" ? w() : I.key === "Enter" && P !== _ ? d(_) : I.key === "Enter" && p();
|
|
2935
2941
|
},
|
|
2936
|
-
[
|
|
2942
|
+
[_, w, p, d, P]
|
|
2937
2943
|
);
|
|
2938
|
-
F(() => (window.addEventListener("keydown",
|
|
2939
|
-
window.removeEventListener("keydown",
|
|
2940
|
-
}), [
|
|
2944
|
+
F(() => (window.addEventListener("keydown", b), () => {
|
|
2945
|
+
window.removeEventListener("keydown", b);
|
|
2946
|
+
}), [b]), F(() => {
|
|
2941
2947
|
r && r.focus();
|
|
2942
2948
|
}, [r]);
|
|
2943
2949
|
const E = N((I) => {
|
|
2944
|
-
|
|
2950
|
+
y(I.target.value);
|
|
2945
2951
|
}, []), x = N(() => {
|
|
2946
|
-
|
|
2947
|
-
}, [d]), R = k(() => `${v} / ${m}`, [v, m]), { wholeWords:
|
|
2952
|
+
y(""), d("");
|
|
2953
|
+
}, [d]), R = k(() => `${v} / ${m}`, [v, m]), { wholeWords: D, matchCase: z } = k(() => l, [l]), A = N(
|
|
2948
2954
|
(I) => {
|
|
2949
2955
|
c((O) => ({ ...O, matchCase: I }));
|
|
2950
2956
|
},
|
|
@@ -2957,7 +2963,7 @@ const Ie = {
|
|
|
2957
2963
|
);
|
|
2958
2964
|
return F(() => {
|
|
2959
2965
|
s();
|
|
2960
|
-
}, [o, s]),
|
|
2966
|
+
}, [o, s]), S ? /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
|
|
2961
2967
|
$r,
|
|
2962
2968
|
{
|
|
2963
2969
|
open: e,
|
|
@@ -2969,24 +2975,24 @@ const Ie = {
|
|
|
2969
2975
|
/* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
2970
2976
|
dn,
|
|
2971
2977
|
{
|
|
2972
|
-
value:
|
|
2973
|
-
onKeyDown:
|
|
2978
|
+
value: _,
|
|
2979
|
+
onKeyDown: T,
|
|
2974
2980
|
onChange: E,
|
|
2975
2981
|
icon: /* @__PURE__ */ i(an, {}),
|
|
2976
2982
|
placeholder: h == null ? void 0 : h.searchInputPlaceholder,
|
|
2977
2983
|
className: J["rp-search-input"],
|
|
2978
2984
|
ref: a,
|
|
2979
|
-
children: !!
|
|
2985
|
+
children: !!_ && /* @__PURE__ */ i("span", { className: J["rp-search-tool-input-clear"], onClick: x, children: /* @__PURE__ */ i(So, {}) })
|
|
2980
2986
|
}
|
|
2981
2987
|
) }),
|
|
2982
|
-
u ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
2988
|
+
u ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Pt, { className: J["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: R }),
|
|
2983
2989
|
f && /* @__PURE__ */ i("div", { className: J["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: C, handleClose: s }) })
|
|
2984
2990
|
] }),
|
|
2985
2991
|
/* @__PURE__ */ W("div", { className: J["rp-search-tool-input-checkboxes"], children: [
|
|
2986
2992
|
f && /* @__PURE__ */ i(on, {}),
|
|
2987
|
-
/* @__PURE__ */ i($t, { name: "matchCase", value:
|
|
2993
|
+
/* @__PURE__ */ i($t, { name: "matchCase", value: z, onChange: A, children: h == null ? void 0 : h.searchMatchCaseLabel }),
|
|
2988
2994
|
!f && /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: J["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) }),
|
|
2989
|
-
/* @__PURE__ */ i($t, { name: "wholeWord", value:
|
|
2995
|
+
/* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange: L, children: h == null ? void 0 : h.searchWholeWordsLabel }),
|
|
2990
2996
|
!f && /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: J["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) })
|
|
2991
2997
|
] })
|
|
2992
2998
|
] }),
|
|
@@ -2997,44 +3003,44 @@ const Ie = {
|
|
|
2997
3003
|
] })
|
|
2998
3004
|
}
|
|
2999
3005
|
) }) : null;
|
|
3000
|
-
},
|
|
3006
|
+
}, qi = "_loading_wazy2_1", ze = {
|
|
3001
3007
|
"rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
|
|
3002
3008
|
"rp-loading-modal": "_rp-loading-modal_wazy2_14",
|
|
3003
3009
|
"rp-loading-title": "_rp-loading-title_wazy2_27",
|
|
3004
3010
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_wazy2_35",
|
|
3005
3011
|
"rp-loading-progress": "_rp-loading-progress_wazy2_35",
|
|
3006
3012
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
|
|
3007
|
-
loading:
|
|
3008
|
-
},
|
|
3013
|
+
loading: qi
|
|
3014
|
+
}, Bi = ({ percentage: t }) => {
|
|
3009
3015
|
const { cancel: e } = tt(), { localeMessages: n } = ae();
|
|
3010
|
-
return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(
|
|
3011
|
-
/* @__PURE__ */ W("div", { className: ne(
|
|
3016
|
+
return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(ze["rp-loading-overlay"]), children: /* @__PURE__ */ W("div", { className: ne(ze["rp-loading-modal"]), children: [
|
|
3017
|
+
/* @__PURE__ */ W("div", { className: ne(ze["rp-loading-title"]), children: [
|
|
3012
3018
|
n == null ? void 0 : n.printLoadingMessage,
|
|
3013
3019
|
"..."
|
|
3014
3020
|
] }),
|
|
3015
|
-
/* @__PURE__ */ i("div", { className: ne(
|
|
3021
|
+
/* @__PURE__ */ i("div", { className: ne(ze["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
|
|
3016
3022
|
"div",
|
|
3017
3023
|
{
|
|
3018
|
-
className: ne(
|
|
3024
|
+
className: ne(ze["rp-loading-progress"]),
|
|
3019
3025
|
style: { width: `${t}%` }
|
|
3020
3026
|
}
|
|
3021
3027
|
) }),
|
|
3022
|
-
/* @__PURE__ */ i("button", { className: ne(
|
|
3028
|
+
/* @__PURE__ */ i("button", { className: ne(ze["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
3023
3029
|
] }) });
|
|
3024
|
-
},
|
|
3030
|
+
}, Zi = $e((t, e) => {
|
|
3025
3031
|
const { showPrintProgress: n } = ge(), { progress: o } = tt(), { isSmallScreen: r } = Pe(), { percentage: a } = o || {}, l = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
3026
3032
|
return /* @__PURE__ */ W("div", { children: [
|
|
3027
3033
|
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: We["rp-toolbar-content"], children: /* @__PURE__ */ W("div", { className: We["rp-toolbar-wrapper"], style: l(), children: [
|
|
3028
3034
|
/* @__PURE__ */ W("div", { "data-rp": "topBarLeft", className: We["rp-toolbar-start"], children: [
|
|
3029
|
-
/* @__PURE__ */ i(
|
|
3035
|
+
/* @__PURE__ */ i(Vi, {}),
|
|
3030
3036
|
/* @__PURE__ */ i(si, {})
|
|
3031
3037
|
] }),
|
|
3032
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: We["rp-toolbar-middle"], children: /* @__PURE__ */ i(
|
|
3033
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: We["rp-toolbar-end"], children: /* @__PURE__ */ i(
|
|
3038
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: We["rp-toolbar-middle"], children: /* @__PURE__ */ i(Ui, {}) }),
|
|
3039
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: We["rp-toolbar-end"], children: /* @__PURE__ */ i(ki, {}) })
|
|
3034
3040
|
] }) }),
|
|
3035
|
-
n && a ? /* @__PURE__ */ i(
|
|
3041
|
+
n && a ? /* @__PURE__ */ i(Bi, { percentage: a }) : null
|
|
3036
3042
|
] });
|
|
3037
|
-
}),
|
|
3043
|
+
}), vt = {
|
|
3038
3044
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
3039
3045
|
"rp-sidebar-content": "_rp-sidebar-content_1sdl6_1",
|
|
3040
3046
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_1sdl6_16",
|
|
@@ -3045,7 +3051,7 @@ const Ie = {
|
|
|
3045
3051
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
3046
3052
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
3047
3053
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
3048
|
-
},
|
|
3054
|
+
}, ji = (t) => {
|
|
3049
3055
|
const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = ie(), { pageRotate: l } = Ue(), c = k(() => o ? ke["rp-thumbnail-active"] : "", [o]), u = k(() => ({
|
|
3050
3056
|
width: Math.round(r.width),
|
|
3051
3057
|
height: Math.round(r.height)
|
|
@@ -3082,7 +3088,7 @@ const Ie = {
|
|
|
3082
3088
|
width: `${u.width}px`,
|
|
3083
3089
|
height: `${u.height}px`
|
|
3084
3090
|
},
|
|
3085
|
-
children: /* @__PURE__ */ i(
|
|
3091
|
+
children: /* @__PURE__ */ i(Pt, {})
|
|
3086
3092
|
}
|
|
3087
3093
|
)
|
|
3088
3094
|
}
|
|
@@ -3094,10 +3100,10 @@ const Ie = {
|
|
|
3094
3100
|
}, sn = {
|
|
3095
3101
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
3096
3102
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
3097
|
-
},
|
|
3103
|
+
}, Ki = 16, Xi = (t, e) => {
|
|
3098
3104
|
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
3099
|
-
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
3100
|
-
},
|
|
3105
|
+
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Ki);
|
|
3106
|
+
}, Yi = $e((t, e) => {
|
|
3101
3107
|
const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: u } = Pn(), d = H(null), m = H(1);
|
|
3102
3108
|
cn(e, () => d.current);
|
|
3103
3109
|
const v = k(() => Object.values(a), [a]), p = N(() => {
|
|
@@ -3105,14 +3111,14 @@ const Ie = {
|
|
|
3105
3111
|
w <= r && l(w);
|
|
3106
3112
|
}, [l, r, c]);
|
|
3107
3113
|
return F(() => {
|
|
3108
|
-
o > c ? u(o) : n && m.current !== o && (
|
|
3114
|
+
o > c ? u(o) : n && m.current !== o && (Xi(d.current, o), m.current = o);
|
|
3109
3115
|
}, [o, c, u, n, v]), gr(d.current, p), /* @__PURE__ */ i("div", { ref: d, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? v.map((w, P) => {
|
|
3110
|
-
var
|
|
3116
|
+
var S, _;
|
|
3111
3117
|
return /* @__PURE__ */ i(
|
|
3112
|
-
|
|
3118
|
+
ji,
|
|
3113
3119
|
{
|
|
3114
|
-
isFocused: o === ((
|
|
3115
|
-
pageNumber: (
|
|
3120
|
+
isFocused: o === ((S = w.page) == null ? void 0 : S.pageNumber),
|
|
3121
|
+
pageNumber: (_ = w.page) == null ? void 0 : _.pageNumber,
|
|
3116
3122
|
thumbnailSrc: w.thumbnailSrc,
|
|
3117
3123
|
loading: w.loading,
|
|
3118
3124
|
viewport: w.viewport,
|
|
@@ -3121,10 +3127,10 @@ const Ie = {
|
|
|
3121
3127
|
P
|
|
3122
3128
|
);
|
|
3123
3129
|
}) : null }) });
|
|
3124
|
-
}),
|
|
3130
|
+
}), Ji = () => {
|
|
3125
3131
|
const { thumbnailIcon: t } = ue();
|
|
3126
3132
|
return t || /* @__PURE__ */ i(mr, {});
|
|
3127
|
-
},
|
|
3133
|
+
}, Qi = () => {
|
|
3128
3134
|
const { active: t, setActive: e } = Pn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: l } = ge(), { localeMessages: c } = ae(), u = N(() => {
|
|
3129
3135
|
e((m) => !m);
|
|
3130
3136
|
}, []), d = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: u, active: t }) : a ? /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
@@ -3133,25 +3139,25 @@ const Ie = {
|
|
|
3133
3139
|
onClick: u,
|
|
3134
3140
|
active: t,
|
|
3135
3141
|
"aria-label": c == null ? void 0 : c.thumbnailTooltip,
|
|
3136
|
-
children: /* @__PURE__ */ i(
|
|
3142
|
+
children: /* @__PURE__ */ i(Ji, {})
|
|
3137
3143
|
}
|
|
3138
3144
|
) }) : null, [a, t, u, c]);
|
|
3139
3145
|
return /* @__PURE__ */ i(fe, { children: l && /* @__PURE__ */ W(
|
|
3140
3146
|
"div",
|
|
3141
3147
|
{
|
|
3142
3148
|
style: { "--rp-thumbnail-width": `${n}px` },
|
|
3143
|
-
className:
|
|
3149
|
+
className: vt["rp-sidebar-content-wrapper"],
|
|
3144
3150
|
"data-rp": "sidebar",
|
|
3145
3151
|
children: [
|
|
3146
|
-
/* @__PURE__ */ i("div", { className:
|
|
3152
|
+
/* @__PURE__ */ i("div", { className: vt["rp-sidebar-content"], children: d }),
|
|
3147
3153
|
/* @__PURE__ */ W(
|
|
3148
3154
|
"div",
|
|
3149
3155
|
{
|
|
3150
3156
|
"data-rp": "thumbnailSidebar",
|
|
3151
3157
|
hidden: !t,
|
|
3152
|
-
className:
|
|
3158
|
+
className: vt["rp-thumbnails-wrapper"],
|
|
3153
3159
|
children: [
|
|
3154
|
-
/* @__PURE__ */ i(
|
|
3160
|
+
/* @__PURE__ */ i(Yi, { show: t, ref: r }),
|
|
3155
3161
|
/* @__PURE__ */ i(vr, { onWidthChange: o, thumbnailRef: r })
|
|
3156
3162
|
]
|
|
3157
3163
|
}
|
|
@@ -3159,7 +3165,7 @@ const Ie = {
|
|
|
3159
3165
|
]
|
|
3160
3166
|
}
|
|
3161
3167
|
) });
|
|
3162
|
-
},
|
|
3168
|
+
}, Xs = $e((t, e) => {
|
|
3163
3169
|
const {
|
|
3164
3170
|
children: n,
|
|
3165
3171
|
slots: o,
|
|
@@ -3170,21 +3176,21 @@ const Ie = {
|
|
|
3170
3176
|
onLoaded: u,
|
|
3171
3177
|
cleanupOnLoaded: d,
|
|
3172
3178
|
onLayoutWidthChange: m
|
|
3173
|
-
} = t, [v, p] = $(null), { setContainer: w, setContentRef: P } = me(), { loading:
|
|
3179
|
+
} = t, [v, p] = $(null), { setContainer: w, setContentRef: P } = me(), { loading: S } = ee(), { LoaderImageComponent: _ } = hn();
|
|
3174
3180
|
return F(() => (u && u(), () => {
|
|
3175
3181
|
d && d();
|
|
3176
3182
|
}), [u, d]), /* @__PURE__ */ i(In, { toolbarRef: v, ref: e, children: /* @__PURE__ */ i(Tr, { mobileWidth: c, onLayoutWidthChange: m, children: /* @__PURE__ */ i(wr, { slots: o, children: /* @__PURE__ */ i(_r, { icons: r, children: /* @__PURE__ */ W(br, { getContainerRef: w, style: a, className: l, children: [
|
|
3177
3183
|
/* @__PURE__ */ W(Cr, { children: [
|
|
3178
3184
|
/* @__PURE__ */ W("div", { className: be["rp-layout"], children: [
|
|
3179
|
-
/* @__PURE__ */ i(
|
|
3185
|
+
/* @__PURE__ */ i(Zi, { ref: p }),
|
|
3180
3186
|
/* @__PURE__ */ W("div", { className: be["rp-content"], children: [
|
|
3181
|
-
/* @__PURE__ */ i("div", { className: be["rp-sidebar"], children: /* @__PURE__ */ i(
|
|
3187
|
+
/* @__PURE__ */ i("div", { className: be["rp-sidebar"], children: /* @__PURE__ */ i(Qi, {}) }),
|
|
3182
3188
|
/* @__PURE__ */ i("div", { ref: P, className: be["rp-pages"], children: n })
|
|
3183
3189
|
] })
|
|
3184
3190
|
] }),
|
|
3185
3191
|
/* @__PURE__ */ i(Pr, {})
|
|
3186
3192
|
] }),
|
|
3187
|
-
|
|
3193
|
+
S ? /* @__PURE__ */ i(
|
|
3188
3194
|
"div",
|
|
3189
3195
|
{
|
|
3190
3196
|
className: be["rp-loader"],
|
|
@@ -3207,7 +3213,7 @@ const Ie = {
|
|
|
3207
3213
|
height: "100%",
|
|
3208
3214
|
width: "100%"
|
|
3209
3215
|
},
|
|
3210
|
-
children:
|
|
3216
|
+
children: _ && /* @__PURE__ */ i(_, {})
|
|
3211
3217
|
}
|
|
3212
3218
|
)
|
|
3213
3219
|
}
|
|
@@ -3215,30 +3221,30 @@ const Ie = {
|
|
|
3215
3221
|
] }) }) }) }) });
|
|
3216
3222
|
});
|
|
3217
3223
|
export {
|
|
3218
|
-
|
|
3224
|
+
zo as A,
|
|
3219
3225
|
on as B,
|
|
3220
3226
|
Lo as C,
|
|
3221
3227
|
ti as D,
|
|
3222
|
-
|
|
3228
|
+
Vi as E,
|
|
3223
3229
|
qn as F,
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3230
|
+
Bi as G,
|
|
3231
|
+
Zi as H,
|
|
3232
|
+
ji as I,
|
|
3233
|
+
Yi as J,
|
|
3234
|
+
Qi as K,
|
|
3229
3235
|
In as L,
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3236
|
+
Fi as M,
|
|
3237
|
+
Wi as O,
|
|
3238
|
+
Us as P,
|
|
3239
|
+
Zs as R,
|
|
3240
|
+
Bs as S,
|
|
3241
|
+
qs as T,
|
|
3242
|
+
Ui as Z,
|
|
3243
|
+
Xs as a,
|
|
3238
3244
|
Gn as b,
|
|
3239
3245
|
tt as c,
|
|
3240
|
-
|
|
3241
|
-
|
|
3246
|
+
It as d,
|
|
3247
|
+
Vs as e,
|
|
3242
3248
|
wn as f,
|
|
3243
3249
|
yo as g,
|
|
3244
3250
|
_n as h,
|
|
@@ -3251,13 +3257,13 @@ export {
|
|
|
3251
3257
|
Tn as o,
|
|
3252
3258
|
No as p,
|
|
3253
3259
|
Fo as q,
|
|
3254
|
-
|
|
3260
|
+
Rt as r,
|
|
3255
3261
|
Jo as s,
|
|
3256
3262
|
ni as t,
|
|
3257
3263
|
ie as u,
|
|
3258
3264
|
ri as v,
|
|
3259
3265
|
si as w,
|
|
3260
|
-
|
|
3266
|
+
yi as x,
|
|
3261
3267
|
jn as y,
|
|
3262
|
-
|
|
3268
|
+
ki as z
|
|
3263
3269
|
};
|