@pdf-viewer/react 1.6.0-beta.2 → 1.6.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{RPDefaultLayout-db184803.js → RPDefaultLayout-cdc3cad8.js} +760 -750
- package/dist/assets/Container.css +1 -1
- package/dist/assets/RPDefaultLayout.css +1 -1
- package/dist/components/RPController.js +52 -51
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/Container.js +7 -6
- 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 +4 -3
- 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 +1 -1
- 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 +8 -27
- 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 +14 -13
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/RPTooltip.js +689 -331
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/contexts/ZoomContext.js +17 -16
- package/dist/index-2e540713.js +23 -0
- package/dist/index-353ec0a6.js +172 -0
- package/dist/index-5ff5dbd0.js +1675 -0
- package/dist/index-71898eb9.js +139 -0
- package/dist/main.js +1 -1
- package/dist/types/utils/constants.d.ts +1 -0
- package/dist/types/utils/getZoomLevel.d.ts +2 -2
- package/dist/types/utils/types.d.ts +5 -2
- package/dist/utils/constants.js +3 -2
- package/dist/utils/getZoomLevel.js +10 -7
- 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/usePinch.js +68 -17
- 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/dist/utils/types.js +9 -9
- package/package.json +1 -1
- package/dist/index-1cb41342.js +0 -307
- package/dist/index-7279fb4e.js +0 -1557
- package/dist/index-aa2d3884.js +0 -140
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as i, Fragment as _e, jsxs as A } from "react/jsx-runtime";
|
|
2
2
|
import * as U from "react";
|
|
3
|
-
import { useRef as W, useEffect as F, useCallback as L, useState as H, createContext as
|
|
3
|
+
import { useRef as W, useEffect as F, useCallback as L, useState as H, createContext as Xe, useContext as Ye, useMemo as M, forwardRef as We, useImperativeHandle as dn, createElement as Ve, PureComponent as tr, Component as nr, memo as rr } from "react";
|
|
4
4
|
import { ChevronUpIcon as Me } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as ne } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as un } from "./components/ui/Input.js";
|
|
7
7
|
import { useScrollModeContext as Oe } from "./contexts/ScrollModeContext.js";
|
|
8
8
|
import { useDocumentContext as X } from "./contexts/RPDocumentContext.js";
|
|
9
9
|
import { useDarkModeContext as or } from "./contexts/DarkModeContext.js";
|
|
10
|
-
import { ViewMode as
|
|
11
|
-
import { useRotationContext as
|
|
10
|
+
import { ViewMode as Be, ScrollMode as ee, AnnotationSubType as Ft, SelectionMode as ir, ZoomLevel as at } from "./utils/types.js";
|
|
11
|
+
import { useRotationContext as Je } from "./contexts/RotationContext.js";
|
|
12
12
|
import { useLayerContext as ar } from "./contexts/LayerContext.js";
|
|
13
|
-
import { useZoomContext as
|
|
14
|
-
import { useViewModeContext as
|
|
13
|
+
import { useZoomContext as Qe } from "./contexts/ZoomContext.js";
|
|
14
|
+
import { useViewModeContext as He } from "./contexts/ViewModeContext.js";
|
|
15
15
|
import { useVirtualScrollContext as et } from "./contexts/VirtualScrollContext.js";
|
|
16
16
|
import { useVirtualGridContext as pn } from "./contexts/VirtualGridContext.js";
|
|
17
17
|
import { useSelectionModeContext as sr } from "./contexts/SelectionModeContext.js";
|
|
@@ -60,9 +60,10 @@ import { FileUploadTool as vn } from "./components/layout/toolbar/FileUploadTool
|
|
|
60
60
|
import { DarkModeTool as Gr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
61
61
|
import { ThreeDotIcon as Vr } from "./components/icons/ThreeDotIcon.js";
|
|
62
62
|
import { UIDropDown as _n } from "./components/ui/DropDown.js";
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import { a as
|
|
63
|
+
import { u as yt, P as $e, c as ke, a as xt, S as Ur } from "./index-353ec0a6.js";
|
|
64
|
+
import { c as qr, e as Zr, b as Br } from "./index-71898eb9.js";
|
|
65
|
+
import { a as ct } from "./index-2e540713.js";
|
|
66
|
+
import { a as jr, u as Kr, F as Xr, D as Yr, b as Jr, G as je } from "./index-5ff5dbd0.js";
|
|
66
67
|
import { h as Qr } from "./component-1da194e8.js";
|
|
67
68
|
import { CloseIcon as eo } from "./components/icons/CloseIcon.js";
|
|
68
69
|
import { dateFormatter as Ht } from "./utils/dateFormatter.js";
|
|
@@ -70,42 +71,43 @@ import { PropertyItem as to } from "./components/layout/toolbar/PropertyItem.js"
|
|
|
70
71
|
import { useOtherToolContext as no, OtherToolProvider as ro } from "./contexts/OtherToolContext.js";
|
|
71
72
|
import { DocumentProperties as oo } from "./components/layout/toolbar/DocumentProperties.js";
|
|
72
73
|
import { RotateTool as io } from "./components/layout/toolbar/RotateTool.js";
|
|
73
|
-
import {
|
|
74
|
+
import { ViewModeTool as ao } from "./components/layout/toolbar/ViewModeTool.js";
|
|
75
|
+
import { ScrollModeTool as so } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
74
76
|
import { MenuSeparator as It } from "./components/layout/toolbar/MenuSeparator.js";
|
|
75
|
-
import { FileDownloadDefaultIcon as
|
|
77
|
+
import { FileDownloadDefaultIcon as co } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
76
78
|
import { MenuItem as ve } from "./components/layout/toolbar/MenuItem.js";
|
|
77
|
-
import { PrintDefaultTool as
|
|
79
|
+
import { PrintDefaultTool as lo } from "./components/icons/PrintDefaultIcon.js";
|
|
78
80
|
import { FullScreenTool as wn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
79
81
|
import { GoToDownIcon as bn } from "./components/icons/GoToDownIcon.js";
|
|
80
|
-
import { SelectionModeTool as
|
|
81
|
-
import { ZoomInIcon as
|
|
82
|
-
import { ZoomOutIcon as
|
|
82
|
+
import { SelectionModeTool as uo } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
83
|
+
import { ZoomInIcon as po } from "./components/icons/ZoomInIcon.js";
|
|
84
|
+
import { ZoomOutIcon as ho } from "./components/icons/ZoomOutIcon.js";
|
|
83
85
|
import { PAGE_PADDING as $t } from "./utils/constants.js";
|
|
84
|
-
import { getZoomLevel as
|
|
85
|
-
import { SearchIcon as
|
|
86
|
+
import { getZoomLevel as mo } from "./utils/getZoomLevel.js";
|
|
87
|
+
import { SearchIcon as fo } from "./components/icons/SearchIcon.js";
|
|
86
88
|
import { c as K, S as Gt } from "./SearchCloseButton-959cc1ed.js";
|
|
87
89
|
import { UICheckbox as Vt } from "./components/ui/Checkbox.js";
|
|
88
|
-
import { ClearIcon as
|
|
90
|
+
import { ClearIcon as go } from "./components/icons/ClearIcon.js";
|
|
89
91
|
import { InfoIcon as Ut } from "./components/icons/InfoIcon.js";
|
|
90
|
-
import './assets/RPDefaultLayout.css';const
|
|
91
|
-
const { viewMode: e } =
|
|
92
|
+
import './assets/RPDefaultLayout.css';const Ge = (e, t) => e.reduce((n, o, r) => r < t ? n + o : n, 0), Cn = () => {
|
|
93
|
+
const { viewMode: e } = He(), { scrollMode: t } = Oe(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = oe(), c = W(), { columnCount: s } = pn(), { widths: d, heights: u } = tt(), p = W(t), f = W(e), h = W(s), { targetScrollPage: g } = fn();
|
|
92
94
|
F(() => {
|
|
93
95
|
n != null && n.scrollToItem && (c.current = n);
|
|
94
96
|
}, [n]), F(() => {
|
|
95
|
-
p.current = t,
|
|
97
|
+
p.current = t, f.current = e;
|
|
96
98
|
}, [t, e]);
|
|
97
|
-
const
|
|
98
|
-
(
|
|
99
|
+
const P = L(
|
|
100
|
+
(v, S) => {
|
|
99
101
|
if (!r)
|
|
100
102
|
return;
|
|
101
|
-
const
|
|
102
|
-
if (
|
|
103
|
-
const
|
|
104
|
-
left: d[
|
|
103
|
+
const m = Math.ceil(v / 2) * 2 - 1;
|
|
104
|
+
if (v === m + 1) {
|
|
105
|
+
const C = {
|
|
106
|
+
left: d[m],
|
|
105
107
|
top: 0
|
|
106
108
|
};
|
|
107
109
|
return new Promise(
|
|
108
|
-
(l) => st(r,
|
|
110
|
+
(l) => st(r, C, l)
|
|
109
111
|
);
|
|
110
112
|
}
|
|
111
113
|
const w = {
|
|
@@ -114,104 +116,104 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
|
|
|
114
116
|
};
|
|
115
117
|
return r == null ? void 0 : r.scrollTo({
|
|
116
118
|
...w,
|
|
117
|
-
behavior:
|
|
119
|
+
behavior: S
|
|
118
120
|
});
|
|
119
121
|
},
|
|
120
122
|
[r, d, st]
|
|
121
123
|
);
|
|
122
124
|
return F(() => {
|
|
123
|
-
p.current = t,
|
|
125
|
+
p.current = t, f.current = e;
|
|
124
126
|
}, [t, e]), F(() => {
|
|
125
127
|
h.current = s;
|
|
126
128
|
}, [s]), { scrollToPage: L(
|
|
127
|
-
(
|
|
128
|
-
a(
|
|
129
|
-
const
|
|
130
|
-
let w =
|
|
131
|
-
if (
|
|
132
|
-
|
|
129
|
+
(v, S = "smooth") => {
|
|
130
|
+
a(v);
|
|
131
|
+
const m = v - 1;
|
|
132
|
+
let w = m, C = 0;
|
|
133
|
+
if (f.current === Be.DUAL_PAGE && p.current === ee.PAGE_SCROLLING) {
|
|
134
|
+
P(v, S);
|
|
133
135
|
return;
|
|
134
136
|
}
|
|
135
137
|
if (p.current === ee.PAGE_SCROLLING) {
|
|
136
|
-
a(
|
|
138
|
+
a(v);
|
|
137
139
|
return;
|
|
138
140
|
}
|
|
139
141
|
if (!c.current || !o)
|
|
140
142
|
return;
|
|
141
143
|
const l = o;
|
|
142
|
-
if (
|
|
143
|
-
|
|
144
|
+
if (g.current = v, p.current === ee.HORIZONTAL_SCROLLING) {
|
|
145
|
+
C = m;
|
|
144
146
|
const y = {
|
|
145
|
-
left:
|
|
147
|
+
left: Ge(d, C),
|
|
146
148
|
top: 0
|
|
147
149
|
};
|
|
148
150
|
return l.scrollTo({
|
|
149
151
|
...y,
|
|
150
|
-
behavior:
|
|
152
|
+
behavior: S
|
|
151
153
|
});
|
|
152
154
|
}
|
|
153
|
-
if (
|
|
154
|
-
|
|
155
|
+
if (f.current === Be.DUAL_PAGE) {
|
|
156
|
+
C = m % 2, w = Math.floor(m / 2);
|
|
155
157
|
const y = {
|
|
156
|
-
left:
|
|
157
|
-
top:
|
|
158
|
+
left: Ge(d, C),
|
|
159
|
+
top: Ge(u, w)
|
|
158
160
|
};
|
|
159
161
|
return l.scrollTo({
|
|
160
162
|
...y,
|
|
161
|
-
behavior:
|
|
163
|
+
behavior: S
|
|
162
164
|
});
|
|
163
165
|
}
|
|
164
|
-
const
|
|
166
|
+
const T = {
|
|
165
167
|
left: 0,
|
|
166
|
-
top:
|
|
168
|
+
top: Ge(u, w)
|
|
167
169
|
};
|
|
168
170
|
return l.scrollTo({
|
|
169
|
-
...
|
|
170
|
-
behavior:
|
|
171
|
+
...T,
|
|
172
|
+
behavior: S
|
|
171
173
|
});
|
|
172
174
|
},
|
|
173
175
|
[
|
|
174
176
|
o,
|
|
175
177
|
s,
|
|
176
|
-
|
|
178
|
+
P,
|
|
177
179
|
a,
|
|
178
180
|
st,
|
|
179
181
|
u,
|
|
180
182
|
d
|
|
181
183
|
]
|
|
182
184
|
) };
|
|
183
|
-
},
|
|
184
|
-
const [t, n] = H(e), [o, r] = H(0), { scrollToPage: a } = Cn(), c = W(1), { viewMode: s } =
|
|
185
|
-
(
|
|
186
|
-
if (!/^[0-9]*$/g.test(
|
|
185
|
+
}, vo = (e = 1) => {
|
|
186
|
+
const [t, n] = H(e), [o, r] = H(0), { scrollToPage: a } = Cn(), c = W(1), { viewMode: s } = He(), { scrollMode: d } = Oe(), u = St(t, 100), p = L(
|
|
187
|
+
(b) => {
|
|
188
|
+
if (!/^[0-9]*$/g.test(b.toString()) || !b)
|
|
187
189
|
return { success: !1, currentPage: c.current };
|
|
188
|
-
const
|
|
189
|
-
return
|
|
190
|
+
const S = +b;
|
|
191
|
+
return S < 0 || S > o ? { success: !1, currentPage: c.current } : (n(S), c.current = S, { success: !0, currentPage: +b });
|
|
190
192
|
},
|
|
191
193
|
[o]
|
|
192
|
-
),
|
|
193
|
-
(
|
|
194
|
-
const
|
|
195
|
-
return
|
|
194
|
+
), f = L(p, [p]), h = L(
|
|
195
|
+
(b) => {
|
|
196
|
+
const v = p(b);
|
|
197
|
+
return v.success && a(v.currentPage), v;
|
|
196
198
|
},
|
|
197
199
|
[p, a]
|
|
198
|
-
),
|
|
199
|
-
let
|
|
200
|
-
h(
|
|
201
|
-
}, [h, t, s, d]),
|
|
202
|
-
let
|
|
203
|
-
h(
|
|
200
|
+
), g = L(() => {
|
|
201
|
+
let b = t - 1;
|
|
202
|
+
h(b);
|
|
203
|
+
}, [h, t, s, d]), P = L(() => {
|
|
204
|
+
let b = t + 1;
|
|
205
|
+
h(b);
|
|
204
206
|
}, [h, t, s, d]);
|
|
205
207
|
return {
|
|
206
208
|
focusedPage: u,
|
|
207
209
|
totalPages: o,
|
|
208
|
-
setFocusedPage:
|
|
210
|
+
setFocusedPage: f,
|
|
209
211
|
setTotalPages: r,
|
|
210
|
-
nextPage:
|
|
211
|
-
prevPage:
|
|
212
|
+
nextPage: P,
|
|
213
|
+
prevPage: g,
|
|
212
214
|
goToPage: h
|
|
213
215
|
};
|
|
214
|
-
}, Tn =
|
|
216
|
+
}, Tn = Xe({
|
|
215
217
|
focusedPage: 0,
|
|
216
218
|
setFocusedPage: (e) => {
|
|
217
219
|
},
|
|
@@ -224,10 +226,10 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
|
|
|
224
226
|
nextPage: () => {
|
|
225
227
|
}
|
|
226
228
|
}), oe = () => {
|
|
227
|
-
const e =
|
|
229
|
+
const e = Ye(Tn);
|
|
228
230
|
return typeof (e == null ? void 0 : e.focusedPage) > "u" && $r.error("Please use this hooks inside children component of RPProvider"), e;
|
|
229
|
-
},
|
|
230
|
-
const { pdf: t } = X(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: d } =
|
|
231
|
+
}, Ls = ({ children: e }) => {
|
|
232
|
+
const { pdf: t } = X(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: c, nextPage: s, prevPage: d } = vo();
|
|
231
233
|
return F(() => {
|
|
232
234
|
t != null && t.numPages && (a(t.numPages), r(1));
|
|
233
235
|
}, [t, a, r]), /* @__PURE__ */ i(
|
|
@@ -246,7 +248,7 @@ import './assets/RPDefaultLayout.css';const $e = (e, t) => e.reduce((n, o, r) =>
|
|
|
246
248
|
}
|
|
247
249
|
);
|
|
248
250
|
};
|
|
249
|
-
const
|
|
251
|
+
const _o = () => {
|
|
250
252
|
const { pdf: e, pages: t } = X(), [n, o] = H({
|
|
251
253
|
loadedPages: 0,
|
|
252
254
|
totalPages: 0,
|
|
@@ -255,7 +257,7 @@ const vo = () => {
|
|
|
255
257
|
F(() => {
|
|
256
258
|
p.current;
|
|
257
259
|
}, [p]);
|
|
258
|
-
const
|
|
260
|
+
const f = L(() => {
|
|
259
261
|
document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
|
|
260
262
|
const w = document.querySelector(".rp-print-zone");
|
|
261
263
|
w && w.remove();
|
|
@@ -265,13 +267,13 @@ const vo = () => {
|
|
|
265
267
|
totalPages: 0,
|
|
266
268
|
percentage: 0
|
|
267
269
|
});
|
|
268
|
-
}, []),
|
|
270
|
+
}, []), g = () => {
|
|
269
271
|
p.current = !0;
|
|
270
|
-
},
|
|
272
|
+
}, P = async ({
|
|
271
273
|
scratchCanvas: w,
|
|
272
|
-
pdfDocument:
|
|
274
|
+
pdfDocument: C,
|
|
273
275
|
pageNumber: l,
|
|
274
|
-
viewerPdfPage:
|
|
276
|
+
viewerPdfPage: T,
|
|
275
277
|
printResolution: _,
|
|
276
278
|
optionalContentConfigPromise: y,
|
|
277
279
|
printAnnotationStoragePromise: E
|
|
@@ -281,11 +283,11 @@ const vo = () => {
|
|
|
281
283
|
return;
|
|
282
284
|
}
|
|
283
285
|
const I = _ / pr.PDF;
|
|
284
|
-
w.width = Math.floor(
|
|
286
|
+
w.width = Math.floor(T.width * I), w.height = Math.floor(T.height * I);
|
|
285
287
|
const N = w.getContext("2d");
|
|
286
288
|
N.save(), N.fillStyle = "rgb(255, 255, 255)", N.fillRect(0, 0, w.width, w.height), N.restore();
|
|
287
289
|
const [R, z] = await Promise.all([
|
|
288
|
-
|
|
290
|
+
C.getPage(l),
|
|
289
291
|
E
|
|
290
292
|
]);
|
|
291
293
|
if (p.current) {
|
|
@@ -295,7 +297,7 @@ const vo = () => {
|
|
|
295
297
|
const O = {
|
|
296
298
|
canvasContext: N,
|
|
297
299
|
transform: [I, 0, 0, I, 0, 0],
|
|
298
|
-
viewport: R.getViewport({ scale: 1, rotation:
|
|
300
|
+
viewport: R.getViewport({ scale: 1, rotation: T.rotation }),
|
|
299
301
|
intent: "print",
|
|
300
302
|
annotationMode: hr.ENABLE_STORAGE,
|
|
301
303
|
optionalContentConfigPromise: y,
|
|
@@ -306,50 +308,50 @@ const vo = () => {
|
|
|
306
308
|
} catch (D) {
|
|
307
309
|
throw D instanceof mr || console.error(D), D;
|
|
308
310
|
}
|
|
309
|
-
},
|
|
311
|
+
}, b = L(() => {
|
|
310
312
|
const w = window.print;
|
|
311
|
-
return new Promise((
|
|
313
|
+
return new Promise((C) => {
|
|
312
314
|
const l = (y) => {
|
|
313
315
|
setTimeout(() => {
|
|
314
316
|
w.call(window), setTimeout(() => y(), 20);
|
|
315
317
|
}, 0);
|
|
316
318
|
};
|
|
317
319
|
if (document.querySelector(".rp-print-zone")) {
|
|
318
|
-
l(
|
|
320
|
+
l(C);
|
|
319
321
|
return;
|
|
320
322
|
}
|
|
321
323
|
const _ = new MutationObserver(() => {
|
|
322
|
-
document.querySelector(".rp-print-zone") && (l(
|
|
324
|
+
document.querySelector(".rp-print-zone") && (l(C), _.disconnect());
|
|
323
325
|
});
|
|
324
326
|
_.observe(document.body, { childList: !0, subtree: !0 });
|
|
325
327
|
});
|
|
326
|
-
}, []),
|
|
327
|
-
const
|
|
328
|
-
return l.classList.add("rp-print-page"), await new Promise((
|
|
328
|
+
}, []), v = async (w) => {
|
|
329
|
+
const C = document.createElement("img"), l = document.createElement("div");
|
|
330
|
+
return l.classList.add("rp-print-page"), await new Promise((T, _) => {
|
|
329
331
|
w.toBlob((y) => {
|
|
330
|
-
y ? (
|
|
331
|
-
URL.revokeObjectURL(
|
|
332
|
-
},
|
|
332
|
+
y ? (C.src = URL.createObjectURL(y), C.onload = () => {
|
|
333
|
+
URL.revokeObjectURL(C.src), T();
|
|
334
|
+
}, C.onerror = _) : _(new Error("Failed to create blob"));
|
|
333
335
|
});
|
|
334
336
|
}).catch(() => {
|
|
335
|
-
}), l.appendChild(
|
|
336
|
-
},
|
|
337
|
+
}), l.appendChild(C), l;
|
|
338
|
+
}, S = (w, C) => {
|
|
337
339
|
const l = document.createElement("div");
|
|
338
340
|
l.classList.add("rp-print-zone");
|
|
339
|
-
const
|
|
341
|
+
const T = document.createElement("style"), _ = C.get(1);
|
|
340
342
|
if (_) {
|
|
341
343
|
const { width: y, height: E } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
|
|
342
|
-
|
|
344
|
+
T.innerHTML = `@page { size: ${y}px ${E}px }`;
|
|
343
345
|
}
|
|
344
|
-
return l.appendChild(
|
|
345
|
-
},
|
|
346
|
+
return l.appendChild(T), l.append(...w), l;
|
|
347
|
+
}, m = L(async () => {
|
|
346
348
|
if (!e)
|
|
347
349
|
return;
|
|
348
350
|
h();
|
|
349
|
-
const w = document.createElement("canvas"),
|
|
351
|
+
const w = document.createElement("canvas"), C = [];
|
|
350
352
|
try {
|
|
351
353
|
e.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
352
|
-
const
|
|
354
|
+
const T = e.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
|
|
353
355
|
e.annotationStorage.print ?? void 0
|
|
354
356
|
), y = t.size;
|
|
355
357
|
for (const [I, N] of t) {
|
|
@@ -358,21 +360,21 @@ const vo = () => {
|
|
|
358
360
|
return;
|
|
359
361
|
}
|
|
360
362
|
const R = N.page.getViewport({ scale: 1 });
|
|
361
|
-
if (await
|
|
363
|
+
if (await P({
|
|
362
364
|
scratchCanvas: w,
|
|
363
365
|
pdfDocument: e,
|
|
364
366
|
pageNumber: I,
|
|
365
367
|
viewerPdfPage: R,
|
|
366
368
|
printResolution: 150,
|
|
367
|
-
optionalContentConfigPromise:
|
|
369
|
+
optionalContentConfigPromise: T,
|
|
368
370
|
printAnnotationStoragePromise: _
|
|
369
371
|
}), p.current) {
|
|
370
372
|
h();
|
|
371
373
|
return;
|
|
372
374
|
}
|
|
373
|
-
const z = await
|
|
374
|
-
|
|
375
|
-
const O = parseFloat((
|
|
375
|
+
const z = await v(w);
|
|
376
|
+
C.push(z);
|
|
377
|
+
const O = parseFloat((C.length / y * 100).toFixed(2));
|
|
376
378
|
o({
|
|
377
379
|
loadedPages: I,
|
|
378
380
|
totalPages: y,
|
|
@@ -383,8 +385,8 @@ const vo = () => {
|
|
|
383
385
|
h();
|
|
384
386
|
return;
|
|
385
387
|
}
|
|
386
|
-
const E = C
|
|
387
|
-
document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await
|
|
388
|
+
const E = S(C, t);
|
|
389
|
+
document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await b();
|
|
388
390
|
} catch (l) {
|
|
389
391
|
s(!0), l instanceof Error && u(l);
|
|
390
392
|
} finally {
|
|
@@ -393,20 +395,20 @@ const vo = () => {
|
|
|
393
395
|
}, [e, t, p]);
|
|
394
396
|
return F(() => {
|
|
395
397
|
const w = () => {
|
|
396
|
-
h(),
|
|
398
|
+
h(), f();
|
|
397
399
|
};
|
|
398
400
|
return window.addEventListener("afterprint", w, !0), () => {
|
|
399
401
|
window.removeEventListener("afterprint", w, !0);
|
|
400
402
|
};
|
|
401
|
-
}, [
|
|
402
|
-
print:
|
|
403
|
-
cancel:
|
|
403
|
+
}, [f, h]), {
|
|
404
|
+
print: m,
|
|
405
|
+
cancel: g,
|
|
404
406
|
progress: n,
|
|
405
407
|
isComplete: r,
|
|
406
408
|
isError: c,
|
|
407
409
|
error: d
|
|
408
410
|
};
|
|
409
|
-
}, Pn =
|
|
411
|
+
}, Pn = Xe({
|
|
410
412
|
print: () => {
|
|
411
413
|
},
|
|
412
414
|
cancel: () => {
|
|
@@ -423,78 +425,78 @@ const vo = () => {
|
|
|
423
425
|
console.error("Error in setOnError callback:", t);
|
|
424
426
|
}
|
|
425
427
|
}
|
|
426
|
-
}),
|
|
427
|
-
const [t, n] = H(null), [o, r] = H(null), { print: a, cancel: c, progress: s, isComplete: d, isError: u, error: p } =
|
|
428
|
-
|
|
429
|
-
}, []), h = (
|
|
430
|
-
p &&
|
|
431
|
-
},
|
|
432
|
-
(
|
|
433
|
-
n(() =>
|
|
428
|
+
}), Rs = ({ children: e }) => {
|
|
429
|
+
const [t, n] = H(null), [o, r] = H(null), { print: a, cancel: c, progress: s, isComplete: d, isError: u, error: p } = _o(), f = L((v) => {
|
|
430
|
+
v && typeof v == "function" && r(() => v);
|
|
431
|
+
}, []), h = (v) => {
|
|
432
|
+
p && v(p);
|
|
433
|
+
}, g = L(
|
|
434
|
+
(v) => {
|
|
435
|
+
n(() => v);
|
|
434
436
|
},
|
|
435
437
|
[s, t]
|
|
436
438
|
);
|
|
437
439
|
F(() => {
|
|
438
|
-
d && o &&
|
|
440
|
+
d && o && P();
|
|
439
441
|
}, [d, o]), F(() => {
|
|
440
|
-
u && h((
|
|
441
|
-
console.error(
|
|
442
|
+
u && h((v) => {
|
|
443
|
+
console.error(v);
|
|
442
444
|
});
|
|
443
445
|
}, [u]), F(() => {
|
|
444
446
|
s && t && t(s);
|
|
445
447
|
}, [s, t]);
|
|
446
|
-
const
|
|
448
|
+
const P = () => {
|
|
447
449
|
o && (o(), r(null));
|
|
448
|
-
},
|
|
450
|
+
}, b = {
|
|
449
451
|
print: a,
|
|
450
452
|
cancel: c,
|
|
451
|
-
setOnProgress:
|
|
452
|
-
setOnComplete:
|
|
453
|
+
setOnProgress: g,
|
|
454
|
+
setOnComplete: f,
|
|
453
455
|
setOnError: h,
|
|
454
456
|
progress: s
|
|
455
457
|
};
|
|
456
|
-
return /* @__PURE__ */ i(Pn.Provider, { value:
|
|
458
|
+
return /* @__PURE__ */ i(Pn.Provider, { value: b, children: e });
|
|
457
459
|
}, nt = () => {
|
|
458
|
-
const e =
|
|
460
|
+
const e = Ye(Pn);
|
|
459
461
|
if (!e)
|
|
460
462
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
461
463
|
return e;
|
|
462
|
-
},
|
|
463
|
-
const [e, t] = H({}), { pages: n } = X(), { rotate: o } =
|
|
464
|
+
}, wo = () => {
|
|
465
|
+
const [e, t] = H({}), { pages: n } = X(), { rotate: o } = Je(), r = M(() => Object.keys(e).length, [e]), a = L(
|
|
464
466
|
(s) => {
|
|
465
467
|
if (!n.size || s > n.size)
|
|
466
468
|
return;
|
|
467
|
-
const d = Array.from(n.values()).slice(0, s).map((
|
|
468
|
-
const { thumbnailViewport: h, scale:
|
|
469
|
+
const d = Array.from(n.values()).slice(0, s).map((f) => {
|
|
470
|
+
const { thumbnailViewport: h, scale: g } = Wt(f.page, o);
|
|
469
471
|
return {
|
|
470
|
-
scale:
|
|
471
|
-
page:
|
|
472
|
+
scale: g,
|
|
473
|
+
page: f.page,
|
|
472
474
|
loading: !0,
|
|
473
475
|
viewport: h
|
|
474
476
|
};
|
|
475
|
-
}), u = d.reduce((
|
|
477
|
+
}), u = d.reduce((f, h) => (f[h.page.pageNumber] = h, f), {});
|
|
476
478
|
t(u);
|
|
477
479
|
const p = [];
|
|
478
|
-
for (const
|
|
479
|
-
const h = document.createElement("canvas"),
|
|
480
|
-
scale:
|
|
480
|
+
for (const f of d) {
|
|
481
|
+
const h = document.createElement("canvas"), g = _t(f.page, h, {
|
|
482
|
+
scale: f.scale,
|
|
481
483
|
rotate: o
|
|
482
484
|
}).promise.then(() => {
|
|
483
|
-
const
|
|
485
|
+
const P = h.toDataURL();
|
|
484
486
|
return {
|
|
485
|
-
...
|
|
486
|
-
thumbnailSrc:
|
|
487
|
+
...f,
|
|
488
|
+
thumbnailSrc: P,
|
|
487
489
|
loading: !1
|
|
488
490
|
};
|
|
489
491
|
});
|
|
490
|
-
p.push(
|
|
492
|
+
p.push(g);
|
|
491
493
|
}
|
|
492
|
-
Promise.all(p).then((
|
|
493
|
-
const h =
|
|
494
|
-
(
|
|
494
|
+
Promise.all(p).then((f) => {
|
|
495
|
+
const h = f.reduce(
|
|
496
|
+
(g, P) => (g[P.page.pageNumber] = P, g),
|
|
495
497
|
{}
|
|
496
498
|
);
|
|
497
|
-
t((
|
|
499
|
+
t((g) => ({ ...g, ...h }));
|
|
498
500
|
}).catch(() => {
|
|
499
501
|
});
|
|
500
502
|
},
|
|
@@ -521,22 +523,22 @@ const vo = () => {
|
|
|
521
523
|
}));
|
|
522
524
|
const u = document.createElement("canvas");
|
|
523
525
|
_t(d.page, u, { scale: d.thumbnailScale, rotate: o }).promise.then(() => {
|
|
524
|
-
const p = u.toDataURL(), { thumbnailViewport:
|
|
526
|
+
const p = u.toDataURL(), { thumbnailViewport: f, scale: h } = Wt(d.page, o);
|
|
525
527
|
return {
|
|
526
528
|
scale: h,
|
|
527
529
|
thumbnailSrc: p,
|
|
528
530
|
page: d.page,
|
|
529
531
|
loading: !1,
|
|
530
|
-
viewport:
|
|
532
|
+
viewport: f
|
|
531
533
|
};
|
|
532
534
|
}).then((p) => {
|
|
533
|
-
t((
|
|
535
|
+
t((f) => ({ ...f, [s]: p }));
|
|
534
536
|
});
|
|
535
537
|
},
|
|
536
538
|
[n, o]
|
|
537
539
|
);
|
|
538
540
|
return { thumbnailPages: e, addPage: c, addToPage: a, thumbnailLength: r };
|
|
539
|
-
}, Sn =
|
|
541
|
+
}, Sn = Xe({
|
|
540
542
|
thumbnailPages: {},
|
|
541
543
|
addPage: (e) => {
|
|
542
544
|
},
|
|
@@ -546,11 +548,11 @@ const vo = () => {
|
|
|
546
548
|
setActive: (e) => {
|
|
547
549
|
},
|
|
548
550
|
active: !1
|
|
549
|
-
}), yn = () =>
|
|
551
|
+
}), yn = () => Ye(Sn), Es = ({
|
|
550
552
|
children: e,
|
|
551
553
|
initialThumbnailsVisible: t
|
|
552
554
|
}) => {
|
|
553
|
-
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } =
|
|
555
|
+
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = wo(), [c, s] = H(t);
|
|
554
556
|
return /* @__PURE__ */ i(
|
|
555
557
|
Sn.Provider,
|
|
556
558
|
{
|
|
@@ -558,21 +560,21 @@ const vo = () => {
|
|
|
558
560
|
children: e
|
|
559
561
|
}
|
|
560
562
|
);
|
|
561
|
-
},
|
|
562
|
-
const [n, o] = H(t), [r, a] = H(!1), { pdf: c, pages: s } = X(), d = tt(), u = W(!n), { currentZoom: p } =
|
|
563
|
+
}, bo = (e = {}, t = "") => {
|
|
564
|
+
const [n, o] = H(t), [r, a] = H(!1), { pdf: c, pages: s } = X(), d = tt(), u = W(!n), { currentZoom: p } = Qe(), [f, h] = H([]), { setFocusedPage: g } = oe(), [P, b] = H(0), { pageScrollElementRef: v, virtualScrollableElementRef: S } = et(), { scrollMode: m } = Oe(), { pagesRef: w } = we(), [C, l] = H(null), T = W({}), _ = M(() => P === 0 ? null : f[P - 1], [P, f]), y = M(() => f.length, [f]);
|
|
563
565
|
F(() => {
|
|
564
566
|
if (!_ || !s)
|
|
565
567
|
return;
|
|
566
|
-
const R =
|
|
568
|
+
const R = S || v;
|
|
567
569
|
if (!R || !w)
|
|
568
570
|
return;
|
|
569
571
|
const z = s.get(_.page), O = w.clientHeight / 2, D = w.clientWidth / 2;
|
|
570
572
|
let x = 0, k = 0;
|
|
571
|
-
|
|
573
|
+
m === ee.PAGE_SCROLLING && g(_.page), m === ee.VERTICAL_SCROLLING && (x = d.heights.slice(0, _.page - 1).reduce((q, B) => q + B, 0)), m === ee.HORIZONTAL_SCROLLING && (k = d.widths.slice(0, _.page - 1).reduce((q, B) => q + B, 0));
|
|
572
574
|
let $;
|
|
573
575
|
if (!z)
|
|
574
576
|
return;
|
|
575
|
-
const j =
|
|
577
|
+
const j = T.current[_.page], Y = z.page.getViewport({ scale: 1 });
|
|
576
578
|
$ = new Tt.TextLayer({
|
|
577
579
|
viewport: Y,
|
|
578
580
|
textContentSource: j,
|
|
@@ -590,18 +592,18 @@ const vo = () => {
|
|
|
590
592
|
});
|
|
591
593
|
}, [
|
|
592
594
|
s,
|
|
593
|
-
|
|
595
|
+
g,
|
|
594
596
|
d,
|
|
595
597
|
_,
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
598
|
+
m,
|
|
599
|
+
S,
|
|
600
|
+
v,
|
|
599
601
|
w
|
|
600
602
|
]);
|
|
601
603
|
const E = L(() => {
|
|
602
|
-
|
|
604
|
+
b((R) => y ? R + 1 > y ? 1 : R + 1 : 0);
|
|
603
605
|
}, [y]), I = L(() => {
|
|
604
|
-
|
|
606
|
+
b((R) => y ? R - 1 <= 0 ? y : R - 1 : 0);
|
|
605
607
|
}, [y]), N = L(async (R) => {
|
|
606
608
|
if (!R)
|
|
607
609
|
return {};
|
|
@@ -616,11 +618,11 @@ const vo = () => {
|
|
|
616
618
|
}, []);
|
|
617
619
|
return F(() => {
|
|
618
620
|
if (!n) {
|
|
619
|
-
u.current = !0, h([]),
|
|
621
|
+
u.current = !0, h([]), b(0);
|
|
620
622
|
return;
|
|
621
623
|
}
|
|
622
|
-
u.current = !1, a(!0), h([]),
|
|
623
|
-
|
|
624
|
+
u.current = !1, a(!0), h([]), b(0), N(c).then((R) => {
|
|
625
|
+
T.current = R;
|
|
624
626
|
const O = Object.keys(R).reduce((D, x) => {
|
|
625
627
|
const k = dr(
|
|
626
628
|
[n],
|
|
@@ -630,24 +632,24 @@ const vo = () => {
|
|
|
630
632
|
).map(($, j) => ({ ...$, page: Number(x), pageMatchIdx: j }));
|
|
631
633
|
return [...D, ...k];
|
|
632
634
|
}, []);
|
|
633
|
-
h(O),
|
|
635
|
+
h(O), b(O.length ? 1 : 0);
|
|
634
636
|
}).catch(() => {
|
|
635
|
-
h([]),
|
|
637
|
+
h([]), b(0);
|
|
636
638
|
}).finally(() => a(!1));
|
|
637
639
|
}, [n, N, c, e]), {
|
|
638
640
|
search: n,
|
|
639
641
|
setSearch: o,
|
|
640
642
|
loading: r,
|
|
641
|
-
matches:
|
|
643
|
+
matches: f,
|
|
642
644
|
totalMatches: y,
|
|
643
|
-
currentMatchPosition:
|
|
645
|
+
currentMatchPosition: P,
|
|
644
646
|
currentMatch: _,
|
|
645
647
|
nextMatch: E,
|
|
646
648
|
prevMatch: I,
|
|
647
|
-
currentMatchElement:
|
|
649
|
+
currentMatchElement: C,
|
|
648
650
|
setCurrentMatchElement: l
|
|
649
651
|
};
|
|
650
|
-
}, xn =
|
|
652
|
+
}, xn = Xe({
|
|
651
653
|
search: "",
|
|
652
654
|
setSearch: (e) => {
|
|
653
655
|
},
|
|
@@ -665,7 +667,7 @@ const vo = () => {
|
|
|
665
667
|
currentMatchElement: null,
|
|
666
668
|
setCurrentMatchElement: (e) => {
|
|
667
669
|
}
|
|
668
|
-
}),
|
|
670
|
+
}), Ns = ({
|
|
669
671
|
children: e,
|
|
670
672
|
initialSearch: t
|
|
671
673
|
}) => {
|
|
@@ -677,11 +679,11 @@ const vo = () => {
|
|
|
677
679
|
currentMatch: d,
|
|
678
680
|
search: u,
|
|
679
681
|
matches: p,
|
|
680
|
-
nextMatch:
|
|
682
|
+
nextMatch: f,
|
|
681
683
|
prevMatch: h,
|
|
682
|
-
currentMatchElement:
|
|
683
|
-
setCurrentMatchElement:
|
|
684
|
-
} =
|
|
684
|
+
currentMatchElement: g,
|
|
685
|
+
setCurrentMatchElement: P
|
|
686
|
+
} = bo(n, t);
|
|
685
687
|
return /* @__PURE__ */ i(
|
|
686
688
|
xn.Provider,
|
|
687
689
|
{
|
|
@@ -693,17 +695,17 @@ const vo = () => {
|
|
|
693
695
|
totalMatches: c,
|
|
694
696
|
currentMatchPosition: s,
|
|
695
697
|
currentMatch: d,
|
|
696
|
-
nextMatch:
|
|
698
|
+
nextMatch: f,
|
|
697
699
|
prevMatch: h,
|
|
698
700
|
search: u,
|
|
699
701
|
matches: p,
|
|
700
|
-
currentMatchElement:
|
|
701
|
-
setCurrentMatchElement:
|
|
702
|
+
currentMatchElement: g,
|
|
703
|
+
setCurrentMatchElement: P
|
|
702
704
|
},
|
|
703
705
|
children: e
|
|
704
706
|
}
|
|
705
707
|
);
|
|
706
|
-
}, Lt = () =>
|
|
708
|
+
}, Lt = () => Ye(xn), de = {
|
|
707
709
|
"rp-pages": "_rp-pages_1776r_1",
|
|
708
710
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
|
|
709
711
|
"rp-pages-container": "_rp-pages-container_1776r_11",
|
|
@@ -716,8 +718,8 @@ const vo = () => {
|
|
|
716
718
|
"rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
|
|
717
719
|
"rp-page": "_rp-page_h7a2q_1",
|
|
718
720
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
719
|
-
},
|
|
720
|
-
const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = W(null), { pages: a } = X(), { rotate: c } =
|
|
721
|
+
}, Co = (e) => {
|
|
722
|
+
const { pageNumber: t, onLoaded: n, onLoading: o } = e, r = W(null), { pages: a } = X(), { rotate: c } = Je(), s = W(), { currentZoom: d } = Qe();
|
|
721
723
|
return F(() => {
|
|
722
724
|
if (!a || d === 0)
|
|
723
725
|
return;
|
|
@@ -725,8 +727,8 @@ const vo = () => {
|
|
|
725
727
|
if (r.current && u) {
|
|
726
728
|
const p = r.current;
|
|
727
729
|
p.hidden = !0;
|
|
728
|
-
const
|
|
729
|
-
|
|
730
|
+
const f = s.current;
|
|
731
|
+
f && f.cancel(), o && o(), s.current = _t(u.page, p, {
|
|
730
732
|
scale: d,
|
|
731
733
|
rotate: c,
|
|
732
734
|
renderForms: !0
|
|
@@ -742,31 +744,31 @@ const vo = () => {
|
|
|
742
744
|
(p = s.current) == null || p.cancel();
|
|
743
745
|
};
|
|
744
746
|
}, [a, t, c, d, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${t}-canvas`, ref: r });
|
|
745
|
-
},
|
|
747
|
+
}, To = "_selecting_1x8te_9", Po = "_endOfContent_1x8te_24", ze = {
|
|
746
748
|
"rp-text-layer": "_rp-text-layer_1x8te_1",
|
|
747
|
-
selecting:
|
|
748
|
-
endOfContent:
|
|
749
|
+
selecting: To,
|
|
750
|
+
endOfContent: Po,
|
|
749
751
|
"rp-text-layer-text": "_rp-text-layer-text_1x8te_38"
|
|
750
|
-
},
|
|
752
|
+
}, So = (e) => {
|
|
751
753
|
const { pageNumber: t } = e, { pages: n } = X(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: c } = Lt(), [s, d] = H(
|
|
752
754
|
[]
|
|
753
|
-
), u = W(), p = W(),
|
|
754
|
-
(w,
|
|
755
|
-
if (l && mn(w,
|
|
756
|
-
|
|
755
|
+
), u = W(), p = W(), f = W(), h = M(() => r.filter((w) => w.pageIndex === t - 1), [r, t]), g = L(
|
|
756
|
+
(w, C, l = !1) => {
|
|
757
|
+
if (l && mn(w, C), !h.length) {
|
|
758
|
+
f.current = void 0, d([]);
|
|
757
759
|
return;
|
|
758
760
|
}
|
|
759
|
-
const
|
|
760
|
-
d(
|
|
761
|
+
const T = hn(h, w, C);
|
|
762
|
+
d(T);
|
|
761
763
|
},
|
|
762
764
|
[h]
|
|
763
|
-
),
|
|
765
|
+
), P = W(), b = W(!1), v = L(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
764
766
|
F(() => ((() => {
|
|
765
|
-
if (
|
|
767
|
+
if (P.current)
|
|
766
768
|
return;
|
|
767
|
-
|
|
768
|
-
const { signal:
|
|
769
|
-
|
|
769
|
+
P.current = new AbortController();
|
|
770
|
+
const { signal: C } = P.current, l = () => {
|
|
771
|
+
v().forEach((_) => {
|
|
770
772
|
const y = _.querySelector(".endOfContent");
|
|
771
773
|
y && (_.appendChild(y), y.style.width = "", y.style.height = "", _.classList.remove(ze.selecting));
|
|
772
774
|
});
|
|
@@ -774,29 +776,29 @@ const vo = () => {
|
|
|
774
776
|
document.addEventListener(
|
|
775
777
|
"pointerdown",
|
|
776
778
|
() => {
|
|
777
|
-
|
|
779
|
+
b.current = !0;
|
|
778
780
|
},
|
|
779
|
-
{ signal:
|
|
781
|
+
{ signal: C }
|
|
780
782
|
), document.addEventListener(
|
|
781
783
|
"pointerup",
|
|
782
784
|
() => {
|
|
783
|
-
|
|
785
|
+
b.current = !1, l();
|
|
784
786
|
},
|
|
785
|
-
{ signal:
|
|
787
|
+
{ signal: C }
|
|
786
788
|
), window.addEventListener(
|
|
787
789
|
"blur",
|
|
788
790
|
() => {
|
|
789
|
-
|
|
791
|
+
b.current = !1, l();
|
|
790
792
|
},
|
|
791
|
-
{ signal:
|
|
793
|
+
{ signal: C }
|
|
792
794
|
), document.addEventListener(
|
|
793
795
|
"keyup",
|
|
794
796
|
() => {
|
|
795
|
-
|
|
797
|
+
b.current || l();
|
|
796
798
|
},
|
|
797
|
-
{ signal:
|
|
799
|
+
{ signal: C }
|
|
798
800
|
);
|
|
799
|
-
let
|
|
801
|
+
let T = null;
|
|
800
802
|
document.addEventListener(
|
|
801
803
|
"selectionchange",
|
|
802
804
|
() => {
|
|
@@ -811,11 +813,11 @@ const vo = () => {
|
|
|
811
813
|
const y = /* @__PURE__ */ new Set();
|
|
812
814
|
for (let x = 0; x < _.rangeCount; x++) {
|
|
813
815
|
const k = _.getRangeAt(x);
|
|
814
|
-
|
|
816
|
+
v().forEach(($) => {
|
|
815
817
|
k.intersectsNode($) && !y.has($) && y.add($);
|
|
816
818
|
});
|
|
817
819
|
}
|
|
818
|
-
|
|
820
|
+
v().forEach((x) => {
|
|
819
821
|
if (y.has(x))
|
|
820
822
|
x.classList.add("selecting");
|
|
821
823
|
else {
|
|
@@ -824,54 +826,54 @@ const vo = () => {
|
|
|
824
826
|
}
|
|
825
827
|
});
|
|
826
828
|
const E = _.getRangeAt(0);
|
|
827
|
-
let N =
|
|
829
|
+
let N = T && (E.compareBoundaryPoints(Range.END_TO_END, T) === 0 || E.compareBoundaryPoints(Range.START_TO_END, T) === 0) ? E.startContainer : E.endContainer;
|
|
828
830
|
N.nodeType === Node.TEXT_NODE && (N = N.parentNode);
|
|
829
831
|
const R = (O = N.parentElement) == null ? void 0 : O.closest(
|
|
830
832
|
ze["rp-text-layer"]
|
|
831
833
|
), z = R == null ? void 0 : R.querySelector(".endOfContent");
|
|
832
|
-
z && R && (z.style.width = R.style.width, z.style.height = R.style.height, (D = N.parentElement) == null || D.insertBefore(z, N.nextSibling)),
|
|
834
|
+
z && R && (z.style.width = R.style.width, z.style.height = R.style.height, (D = N.parentElement) == null || D.insertBefore(z, N.nextSibling)), T = E.cloneRange();
|
|
833
835
|
},
|
|
834
|
-
{ signal:
|
|
836
|
+
{ signal: C }
|
|
835
837
|
);
|
|
836
838
|
})(), () => {
|
|
837
|
-
var
|
|
838
|
-
(
|
|
839
|
-
}), [
|
|
840
|
-
const
|
|
839
|
+
var C;
|
|
840
|
+
(C = P.current) == null || C.abort(), P.current = void 0;
|
|
841
|
+
}), [v]);
|
|
842
|
+
const S = L(() => {
|
|
841
843
|
o.current && o.current.classList.add("selecting");
|
|
842
|
-
}, []),
|
|
844
|
+
}, []), m = L(() => {
|
|
843
845
|
o.current && o.current.classList.remove("selecting");
|
|
844
846
|
}, []);
|
|
845
847
|
return F(() => {
|
|
846
848
|
var l;
|
|
847
|
-
if ((l =
|
|
849
|
+
if ((l = f.current) == null || l.classList.remove("selected"), !s.length || !a || a.pageIndex !== t - 1)
|
|
848
850
|
return;
|
|
849
851
|
const w = h.findIndex(
|
|
850
|
-
(
|
|
852
|
+
(T) => JSON.stringify(T) === JSON.stringify(a)
|
|
851
853
|
);
|
|
852
854
|
if (w === -1)
|
|
853
855
|
return;
|
|
854
|
-
const
|
|
855
|
-
|
|
856
|
+
const C = s.find((T) => T.index === w);
|
|
857
|
+
C && (f.current = C.element, c(C.element), C.element.classList.add("selected"));
|
|
856
858
|
}, [a, s, h]), F(() => {
|
|
857
859
|
const w = n.get(t);
|
|
858
860
|
if (!w || !o.current)
|
|
859
861
|
return;
|
|
860
|
-
const
|
|
862
|
+
const C = o.current;
|
|
861
863
|
return u.current && u.current.cancel(), w.page.getTextContent().then((l) => {
|
|
862
|
-
const
|
|
864
|
+
const T = w.page.getViewport({ scale: 1 });
|
|
863
865
|
return u.current = new Tt.TextLayer({
|
|
864
|
-
viewport:
|
|
866
|
+
viewport: T,
|
|
865
867
|
textContentSource: l,
|
|
866
|
-
container:
|
|
867
|
-
}), p.current = l,
|
|
868
|
+
container: C
|
|
869
|
+
}), p.current = l, C && (C.innerText = ""), u.current.render();
|
|
868
870
|
}).then(() => {
|
|
869
871
|
var y, E;
|
|
870
|
-
[].slice.call(
|
|
872
|
+
[].slice.call(C.children).forEach((I) => {
|
|
871
873
|
I.classList.add(ze["rp-text-layer-text"]);
|
|
872
874
|
});
|
|
873
|
-
const
|
|
874
|
-
|
|
875
|
+
const T = (y = u.current) == null ? void 0 : y.textDivs;
|
|
876
|
+
T && p.current && g(p.current, T);
|
|
875
877
|
const _ = document.createElement("div");
|
|
876
878
|
_.className = "endOfContent", (E = o.current) == null || E.appendChild(_);
|
|
877
879
|
}).catch(() => {
|
|
@@ -881,115 +883,115 @@ const vo = () => {
|
|
|
881
883
|
};
|
|
882
884
|
}, [n, t]), F(() => {
|
|
883
885
|
var l;
|
|
884
|
-
[].slice.call(o.current.children).forEach((
|
|
885
|
-
|
|
886
|
+
[].slice.call(o.current.children).forEach((T) => {
|
|
887
|
+
T.classList.add(ze["rp-text-layer-text"]);
|
|
886
888
|
});
|
|
887
|
-
const
|
|
888
|
-
|
|
889
|
-
}, [
|
|
889
|
+
const C = (l = u.current) == null ? void 0 : l.textDivs;
|
|
890
|
+
C && p.current && g(p.current, C, !0);
|
|
891
|
+
}, [g]), /* @__PURE__ */ i(
|
|
890
892
|
"div",
|
|
891
893
|
{
|
|
892
894
|
"data-rp": `page-${t}-textLayer`,
|
|
893
895
|
className: ze["rp-text-layer"],
|
|
894
896
|
ref: o,
|
|
895
|
-
onMouseDown:
|
|
896
|
-
onMouseUp:
|
|
897
|
+
onMouseDown: S,
|
|
898
|
+
onMouseUp: m
|
|
897
899
|
}
|
|
898
900
|
);
|
|
899
|
-
},
|
|
901
|
+
}, yo = {
|
|
900
902
|
"rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
|
|
901
903
|
};
|
|
902
|
-
let
|
|
903
|
-
const
|
|
904
|
-
const { pageNumber: t } = e, n = W(null), { pages: o, pdf: r } = X(), a = W(), [c, s] = H(), { setFocusedPage: d, goToPage: u } = oe(), { scrollMode: p } = Oe(), { print:
|
|
904
|
+
let xo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
905
|
+
const Io = (e) => {
|
|
906
|
+
const { pageNumber: t } = e, n = W(null), { pages: o, pdf: r } = X(), a = W(), [c, s] = H(), { setFocusedPage: d, goToPage: u } = oe(), { scrollMode: p } = Oe(), { print: f } = nt(), { download: h } = Un(), g = M(() => o.get(t), [o, t]), P = M(() => g == null ? void 0 : g.page.getViewport(), [g]);
|
|
905
907
|
F(() => {
|
|
906
908
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
907
909
|
}, [r]), F(() => {
|
|
908
|
-
|
|
909
|
-
a.current = void 0, s(
|
|
910
|
+
g && g.page.getAnnotations().then((v) => {
|
|
911
|
+
a.current = void 0, s(v), n.current && (n.current.innerText = "");
|
|
910
912
|
});
|
|
911
|
-
}, [
|
|
912
|
-
const
|
|
913
|
-
(
|
|
914
|
-
!c || !r || (Rr(
|
|
915
|
-
var
|
|
916
|
-
((
|
|
917
|
-
}), p === ee.PAGE_SCROLLING ? kt(
|
|
913
|
+
}, [g]);
|
|
914
|
+
const b = L(
|
|
915
|
+
(v) => {
|
|
916
|
+
!c || !r || (Rr(v), Er(v, r, c).then((S) => {
|
|
917
|
+
var m, w;
|
|
918
|
+
((m = S == null ? void 0 : S.data) == null ? void 0 : m.action) === "Print" ? f() : ((w = S == null ? void 0 : S.data) == null ? void 0 : w.action) === "SaveAs" && h();
|
|
919
|
+
}), p === ee.PAGE_SCROLLING ? kt(v, c, r, (S) => d(S.pageIndex + 1)) : kt(v, c, r, (S) => u(S.pageIndex + 1)));
|
|
918
920
|
},
|
|
919
|
-
[r, c, u, d, p,
|
|
921
|
+
[r, c, u, d, p, f, h]
|
|
920
922
|
);
|
|
921
923
|
return F(() => {
|
|
922
|
-
if (!
|
|
924
|
+
if (!g || !c)
|
|
923
925
|
return;
|
|
924
|
-
const
|
|
926
|
+
const v = g.page.getViewport();
|
|
925
927
|
if (a.current) {
|
|
926
928
|
a.current.update({
|
|
927
|
-
viewport:
|
|
929
|
+
viewport: v.clone({ dontFlip: !0 })
|
|
928
930
|
});
|
|
929
931
|
return;
|
|
930
932
|
}
|
|
931
|
-
const
|
|
932
|
-
for (const
|
|
933
|
-
const { annotationType: l } =
|
|
933
|
+
const S = /* @__PURE__ */ new Map([]);
|
|
934
|
+
for (const C of c) {
|
|
935
|
+
const { annotationType: l } = C;
|
|
934
936
|
switch (l) {
|
|
935
937
|
case Ft.Link:
|
|
936
|
-
Or(
|
|
938
|
+
Or(C);
|
|
937
939
|
break;
|
|
938
940
|
case Ft.Widget:
|
|
939
|
-
Nr(
|
|
941
|
+
Nr(C, v, S);
|
|
940
942
|
break;
|
|
941
943
|
}
|
|
942
944
|
}
|
|
943
|
-
const
|
|
945
|
+
const m = new AbortController();
|
|
944
946
|
return (async () => {
|
|
945
|
-
var
|
|
947
|
+
var T;
|
|
946
948
|
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new fr({
|
|
947
949
|
div: n.current,
|
|
948
950
|
accessibilityManager: void 0,
|
|
949
951
|
annotationCanvasMap: void 0,
|
|
950
952
|
annotationEditorUIManager: void 0,
|
|
951
953
|
structTreeLayer: null,
|
|
952
|
-
page:
|
|
953
|
-
viewport:
|
|
954
|
-
}), n.current && Mt(n.current,
|
|
955
|
-
const
|
|
956
|
-
if (
|
|
954
|
+
page: g.page,
|
|
955
|
+
viewport: v.clone({ dontFlip: !0 })
|
|
956
|
+
}), n.current && Mt(n.current, b);
|
|
957
|
+
const C = await (r == null ? void 0 : r.hasJSActions()), l = await (r == null ? void 0 : r.getFieldObjects());
|
|
958
|
+
if (m.signal.aborted)
|
|
957
959
|
throw "abort";
|
|
958
|
-
return (
|
|
960
|
+
return (T = a.current) == null ? void 0 : T.render({
|
|
959
961
|
annotations: c,
|
|
960
962
|
annotationStorage: r == null ? void 0 : r.annotationStorage,
|
|
961
|
-
hasJSActions:
|
|
963
|
+
hasJSActions: C,
|
|
962
964
|
fieldObjects: l,
|
|
963
965
|
div: n.current,
|
|
964
|
-
viewport:
|
|
965
|
-
page:
|
|
966
|
-
imageResourcesPath:
|
|
966
|
+
viewport: v.clone({ dontFlip: !0 }),
|
|
967
|
+
page: g.page,
|
|
968
|
+
imageResourcesPath: xo,
|
|
967
969
|
renderForms: !0,
|
|
968
970
|
linkService: new Lr(),
|
|
969
971
|
downloadManager: null,
|
|
970
972
|
enableScripting: !1
|
|
971
973
|
});
|
|
972
974
|
})().then(() => {
|
|
973
|
-
n.current && Dr(n.current,
|
|
974
|
-
}).catch((
|
|
975
|
-
if (
|
|
976
|
-
throw
|
|
975
|
+
n.current && Dr(n.current, b);
|
|
976
|
+
}).catch((C) => {
|
|
977
|
+
if (C !== "abort")
|
|
978
|
+
throw C;
|
|
977
979
|
}), () => {
|
|
978
|
-
|
|
980
|
+
m.abort("clear"), n.current && Mt(n.current, b);
|
|
979
981
|
};
|
|
980
|
-
}, [r, c,
|
|
982
|
+
}, [r, c, b]), /* @__PURE__ */ i(
|
|
981
983
|
"div",
|
|
982
984
|
{
|
|
983
985
|
"data-rp": `page-${t}-annotationLayer`,
|
|
984
|
-
style: { width: `${
|
|
985
|
-
className:
|
|
986
|
+
style: { width: `${P == null ? void 0 : P.width}px`, height: `${P == null ? void 0 : P.height}px` },
|
|
987
|
+
className: yo["rp-annotation-layer"],
|
|
986
988
|
ref: n
|
|
987
989
|
}
|
|
988
990
|
);
|
|
989
991
|
}, dt = {
|
|
990
992
|
"rp-text-highlight-layer": "_rp-text-highlight-layer_1fxd3_1",
|
|
991
993
|
"rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1fxd3_14"
|
|
992
|
-
},
|
|
994
|
+
}, Lo = ({ pageNumber: e }) => {
|
|
993
995
|
const t = W(null), n = W(), o = W(), { pages: r } = X(), { highlightMatches: a } = gr(), c = M(() => a.filter((u) => u.pageIndex === e - 1), [a]), s = L(
|
|
994
996
|
(d, u, p = !1) => {
|
|
995
997
|
p && mn(d, u), ur(c, d, u);
|
|
@@ -1002,19 +1004,19 @@ const xo = (e) => {
|
|
|
1002
1004
|
return;
|
|
1003
1005
|
const u = t.current;
|
|
1004
1006
|
return n.current && n.current.cancel(), d.page.getTextContent().then((p) => {
|
|
1005
|
-
const
|
|
1007
|
+
const f = d.page.getViewport({ scale: 1 });
|
|
1006
1008
|
return n.current = new Tt.TextLayer({
|
|
1007
|
-
viewport:
|
|
1009
|
+
viewport: f,
|
|
1008
1010
|
textContentSource: p,
|
|
1009
1011
|
container: u
|
|
1010
1012
|
}), o.current = p, u && (u.innerText = ""), n.current.render();
|
|
1011
1013
|
}).then(() => {
|
|
1012
1014
|
var h;
|
|
1013
|
-
[].slice.call(u.children).forEach((
|
|
1014
|
-
|
|
1015
|
+
[].slice.call(u.children).forEach((g) => {
|
|
1016
|
+
g.classList.add(dt["rp-text-highlight-layer-text"]);
|
|
1015
1017
|
});
|
|
1016
|
-
const
|
|
1017
|
-
|
|
1018
|
+
const f = (h = n.current) == null ? void 0 : h.textDivs;
|
|
1019
|
+
f && o.current && s(o.current, f);
|
|
1018
1020
|
}).catch(() => {
|
|
1019
1021
|
}), () => {
|
|
1020
1022
|
var p;
|
|
@@ -1022,8 +1024,8 @@ const xo = (e) => {
|
|
|
1022
1024
|
};
|
|
1023
1025
|
}, [r, e]), F(() => {
|
|
1024
1026
|
var p;
|
|
1025
|
-
[].slice.call(t.current.children).forEach((
|
|
1026
|
-
|
|
1027
|
+
[].slice.call(t.current.children).forEach((f) => {
|
|
1028
|
+
f.classList.add(dt["rp-text-highlight-layer-text"]);
|
|
1027
1029
|
});
|
|
1028
1030
|
const u = (p = n.current) == null ? void 0 : p.textDivs;
|
|
1029
1031
|
u && o.current && s(o.current, u, !0);
|
|
@@ -1036,30 +1038,30 @@ const xo = (e) => {
|
|
|
1036
1038
|
}
|
|
1037
1039
|
) });
|
|
1038
1040
|
}, Rt = We((e, t) => {
|
|
1039
|
-
const { pageNumber: n, style: o, ...r } = e, { pages: a } = X(), { rotate: c } =
|
|
1041
|
+
const { pageNumber: n, style: o, ...r } = e, { pages: a } = X(), { rotate: c } = Je(), { textLayer: s } = ar(), { currentZoom: d } = Qe(), u = W(a.get(n)), [p, f] = H(!1), h = W(null), [g, P] = H({
|
|
1040
1042
|
width: 0,
|
|
1041
1043
|
height: 0
|
|
1042
1044
|
});
|
|
1043
1045
|
dn(t, () => h.current), F(() => {
|
|
1044
1046
|
if (a && (u.current = a.get(n), u.current)) {
|
|
1045
|
-
const
|
|
1046
|
-
|
|
1047
|
+
const m = u.current.page.getViewport({ scale: d, rotation: c });
|
|
1048
|
+
P(m);
|
|
1047
1049
|
}
|
|
1048
1050
|
}, [a, n, c, d]);
|
|
1049
|
-
const
|
|
1051
|
+
const b = M(() => {
|
|
1050
1052
|
switch (c) {
|
|
1051
1053
|
case 90:
|
|
1052
|
-
return `${
|
|
1054
|
+
return `${g.width / 2}px ${g.width / 2}px`;
|
|
1053
1055
|
case -90:
|
|
1054
1056
|
case 270:
|
|
1055
|
-
return `${
|
|
1057
|
+
return `${g.height / 2}px ${g.height / 2}px`;
|
|
1056
1058
|
default:
|
|
1057
1059
|
return "center";
|
|
1058
1060
|
}
|
|
1059
|
-
}, [c,
|
|
1060
|
-
|
|
1061
|
-
}, []),
|
|
1062
|
-
|
|
1061
|
+
}, [c, g]), v = L(() => {
|
|
1062
|
+
f(!0);
|
|
1063
|
+
}, []), S = L(() => {
|
|
1064
|
+
f(!1);
|
|
1063
1065
|
}, []);
|
|
1064
1066
|
return /* @__PURE__ */ i(
|
|
1065
1067
|
"div",
|
|
@@ -1071,7 +1073,7 @@ const xo = (e) => {
|
|
|
1071
1073
|
style: {
|
|
1072
1074
|
...o,
|
|
1073
1075
|
"--rp-rotate": `${c}deg`,
|
|
1074
|
-
"--rp-page-rotate-translate": `${
|
|
1076
|
+
"--rp-page-rotate-translate": `${b}`,
|
|
1075
1077
|
"--scale-factor": d
|
|
1076
1078
|
},
|
|
1077
1079
|
className: lt["rp-page-wrapper"],
|
|
@@ -1079,16 +1081,16 @@ const xo = (e) => {
|
|
|
1079
1081
|
"div",
|
|
1080
1082
|
{
|
|
1081
1083
|
style: {
|
|
1082
|
-
width: `${
|
|
1083
|
-
height: `${
|
|
1084
|
+
width: `${g.width}px`,
|
|
1085
|
+
height: `${g.height}px`
|
|
1084
1086
|
},
|
|
1085
1087
|
className: lt["rp-page"],
|
|
1086
1088
|
children: [
|
|
1087
|
-
/* @__PURE__ */ i(
|
|
1089
|
+
/* @__PURE__ */ i(Co, { onLoading: v, onLoaded: S, pageNumber: n }),
|
|
1088
1090
|
p && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Pt, {}) }),
|
|
1089
|
-
s && /* @__PURE__ */ i(
|
|
1090
|
-
/* @__PURE__ */ i(
|
|
1091
|
-
/* @__PURE__ */ i(
|
|
1091
|
+
s && /* @__PURE__ */ i(So, { pageNumber: n }),
|
|
1092
|
+
/* @__PURE__ */ i(Lo, { pageNumber: n }),
|
|
1093
|
+
/* @__PURE__ */ i(Io, { pageNumber: n })
|
|
1092
1094
|
]
|
|
1093
1095
|
}
|
|
1094
1096
|
)
|
|
@@ -1105,25 +1107,25 @@ function wt(e, t) {
|
|
|
1105
1107
|
return n.__proto__ = o, n;
|
|
1106
1108
|
}, wt(e, t);
|
|
1107
1109
|
}
|
|
1108
|
-
function
|
|
1110
|
+
function Ro(e, t) {
|
|
1109
1111
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, wt(e, t);
|
|
1110
1112
|
}
|
|
1111
1113
|
var Zt = Number.isNaN || function(t) {
|
|
1112
1114
|
return typeof t == "number" && t !== t;
|
|
1113
1115
|
};
|
|
1114
|
-
function
|
|
1116
|
+
function Eo(e, t) {
|
|
1115
1117
|
return !!(e === t || Zt(e) && Zt(t));
|
|
1116
1118
|
}
|
|
1117
|
-
function
|
|
1119
|
+
function No(e, t) {
|
|
1118
1120
|
if (e.length !== t.length)
|
|
1119
1121
|
return !1;
|
|
1120
1122
|
for (var n = 0; n < e.length; n++)
|
|
1121
|
-
if (!
|
|
1123
|
+
if (!Eo(e[n], t[n]))
|
|
1122
1124
|
return !1;
|
|
1123
1125
|
return !0;
|
|
1124
1126
|
}
|
|
1125
1127
|
function ut(e, t) {
|
|
1126
|
-
t === void 0 && (t =
|
|
1128
|
+
t === void 0 && (t = No);
|
|
1127
1129
|
var n, o = [], r, a = !1;
|
|
1128
1130
|
function c() {
|
|
1129
1131
|
for (var s = [], d = 0; d < arguments.length; d++)
|
|
@@ -1144,7 +1146,7 @@ function Bt(e, t) {
|
|
|
1144
1146
|
}
|
|
1145
1147
|
return n;
|
|
1146
1148
|
}
|
|
1147
|
-
var
|
|
1149
|
+
var Oo = typeof performance == "object" && typeof performance.now == "function", jt = Oo ? function() {
|
|
1148
1150
|
return performance.now();
|
|
1149
1151
|
} : function() {
|
|
1150
1152
|
return Date.now();
|
|
@@ -1152,7 +1154,7 @@ var No = typeof performance == "object" && typeof performance.now == "function",
|
|
|
1152
1154
|
function Kt(e) {
|
|
1153
1155
|
cancelAnimationFrame(e.id);
|
|
1154
1156
|
}
|
|
1155
|
-
function
|
|
1157
|
+
function Do(e, t) {
|
|
1156
1158
|
var n = jt();
|
|
1157
1159
|
function o() {
|
|
1158
1160
|
jt() - n >= t ? e.call(null) : r.id = requestAnimationFrame(o);
|
|
@@ -1163,7 +1165,7 @@ function Oo(e, t) {
|
|
|
1163
1165
|
return r;
|
|
1164
1166
|
}
|
|
1165
1167
|
var pt = -1;
|
|
1166
|
-
function
|
|
1168
|
+
function zo(e) {
|
|
1167
1169
|
if (e === void 0 && (e = !1), pt === -1 || e) {
|
|
1168
1170
|
var t = document.createElement("div"), n = t.style;
|
|
1169
1171
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), pt = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
|
|
@@ -1180,20 +1182,20 @@ function Xt(e) {
|
|
|
1180
1182
|
}
|
|
1181
1183
|
return Re;
|
|
1182
1184
|
}
|
|
1183
|
-
var
|
|
1185
|
+
var Ao = 150, Fo = function(t) {
|
|
1184
1186
|
var n = t.columnIndex;
|
|
1185
1187
|
t.data;
|
|
1186
1188
|
var o = t.rowIndex;
|
|
1187
1189
|
return o + ":" + n;
|
|
1188
|
-
},
|
|
1189
|
-
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (
|
|
1190
|
-
function
|
|
1191
|
-
var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, d = e.getOffsetForColumnAndAlignment, u = e.getOffsetForRowAndAlignment, p = e.getRowHeight,
|
|
1192
|
-
return t = /* @__PURE__ */ function(
|
|
1193
|
-
|
|
1194
|
-
function
|
|
1190
|
+
}, Ue = null, qe = null, Ze = null;
|
|
1191
|
+
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ue = /* @__PURE__ */ new WeakSet(), qe = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet());
|
|
1192
|
+
function ko(e) {
|
|
1193
|
+
var t, n = e.getColumnOffset, o = e.getColumnStartIndexForOffset, r = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, d = e.getOffsetForColumnAndAlignment, u = e.getOffsetForRowAndAlignment, p = e.getRowHeight, f = e.getRowOffset, h = e.getRowStartIndexForOffset, g = e.getRowStopIndexForStartIndex, P = e.initInstanceProps, b = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
|
|
1194
|
+
return t = /* @__PURE__ */ function(S) {
|
|
1195
|
+
Ro(m, S);
|
|
1196
|
+
function m(C) {
|
|
1195
1197
|
var l;
|
|
1196
|
-
return l =
|
|
1198
|
+
return l = S.call(this, C) || this, l._instanceProps = P(l.props, qt(l)), l._resetIsScrollingTimeoutId = null, l._outerRef = void 0, l.state = {
|
|
1197
1199
|
instance: qt(l),
|
|
1198
1200
|
isScrolling: !1,
|
|
1199
1201
|
horizontalScrollDirection: "forward",
|
|
@@ -1201,9 +1203,9 @@ function Fo(e) {
|
|
|
1201
1203
|
scrollTop: typeof l.props.initialScrollTop == "number" ? l.props.initialScrollTop : 0,
|
|
1202
1204
|
scrollUpdateWasRequested: !1,
|
|
1203
1205
|
verticalScrollDirection: "forward"
|
|
1204
|
-
}, l._callOnItemsRendered = void 0, l._callOnItemsRendered = ut(function(
|
|
1206
|
+
}, l._callOnItemsRendered = void 0, l._callOnItemsRendered = ut(function(T, _, y, E, I, N, R, z) {
|
|
1205
1207
|
return l.props.onItemsRendered({
|
|
1206
|
-
overscanColumnStartIndex:
|
|
1208
|
+
overscanColumnStartIndex: T,
|
|
1207
1209
|
overscanColumnStopIndex: _,
|
|
1208
1210
|
overscanRowStartIndex: y,
|
|
1209
1211
|
overscanRowStopIndex: E,
|
|
@@ -1212,16 +1214,16 @@ function Fo(e) {
|
|
|
1212
1214
|
visibleRowStartIndex: R,
|
|
1213
1215
|
visibleRowStopIndex: z
|
|
1214
1216
|
});
|
|
1215
|
-
}), l._callOnScroll = void 0, l._callOnScroll = ut(function(
|
|
1217
|
+
}), l._callOnScroll = void 0, l._callOnScroll = ut(function(T, _, y, E, I) {
|
|
1216
1218
|
return l.props.onScroll({
|
|
1217
1219
|
horizontalScrollDirection: y,
|
|
1218
|
-
scrollLeft:
|
|
1220
|
+
scrollLeft: T,
|
|
1219
1221
|
scrollTop: _,
|
|
1220
1222
|
verticalScrollDirection: E,
|
|
1221
1223
|
scrollUpdateWasRequested: I
|
|
1222
1224
|
});
|
|
1223
|
-
}), l._getItemStyle = void 0, l._getItemStyle = function(
|
|
1224
|
-
var y = l.props, E = y.columnWidth, I = y.direction, N = y.rowHeight, R = l._getItemStyleCache(
|
|
1225
|
+
}), l._getItemStyle = void 0, l._getItemStyle = function(T, _) {
|
|
1226
|
+
var y = l.props, E = y.columnWidth, I = y.direction, N = y.rowHeight, R = l._getItemStyleCache(b && E, b && I, b && N), z = T + ":" + _, O;
|
|
1225
1227
|
if (R.hasOwnProperty(z))
|
|
1226
1228
|
O = R[z];
|
|
1227
1229
|
else {
|
|
@@ -1230,16 +1232,16 @@ function Fo(e) {
|
|
|
1230
1232
|
position: "absolute",
|
|
1231
1233
|
left: x ? void 0 : D,
|
|
1232
1234
|
right: x ? D : void 0,
|
|
1233
|
-
top:
|
|
1234
|
-
height: p(l.props,
|
|
1235
|
+
top: f(l.props, T, l._instanceProps),
|
|
1236
|
+
height: p(l.props, T, l._instanceProps),
|
|
1235
1237
|
width: a(l.props, _, l._instanceProps)
|
|
1236
1238
|
};
|
|
1237
1239
|
}
|
|
1238
1240
|
return O;
|
|
1239
|
-
}, l._getItemStyleCache = void 0, l._getItemStyleCache = ut(function(
|
|
1241
|
+
}, l._getItemStyleCache = void 0, l._getItemStyleCache = ut(function(T, _, y) {
|
|
1240
1242
|
return {};
|
|
1241
|
-
}), l._onScroll = function(
|
|
1242
|
-
var _ =
|
|
1243
|
+
}), l._onScroll = function(T) {
|
|
1244
|
+
var _ = T.currentTarget, y = _.clientHeight, E = _.clientWidth, I = _.scrollLeft, N = _.scrollTop, R = _.scrollHeight, z = _.scrollWidth;
|
|
1243
1245
|
l.setState(function(O) {
|
|
1244
1246
|
if (O.scrollLeft === I && O.scrollTop === N)
|
|
1245
1247
|
return null;
|
|
@@ -1264,11 +1266,11 @@ function Fo(e) {
|
|
|
1264
1266
|
scrollUpdateWasRequested: !1
|
|
1265
1267
|
};
|
|
1266
1268
|
}, l._resetIsScrollingDebounced);
|
|
1267
|
-
}, l._outerRefSetter = function(
|
|
1269
|
+
}, l._outerRefSetter = function(T) {
|
|
1268
1270
|
var _ = l.props.outerRef;
|
|
1269
|
-
l._outerRef =
|
|
1271
|
+
l._outerRef = T, typeof _ == "function" ? _(T) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = T);
|
|
1270
1272
|
}, l._resetIsScrollingDebounced = function() {
|
|
1271
|
-
l._resetIsScrollingTimeoutId !== null && Kt(l._resetIsScrollingTimeoutId), l._resetIsScrollingTimeoutId =
|
|
1273
|
+
l._resetIsScrollingTimeoutId !== null && Kt(l._resetIsScrollingTimeoutId), l._resetIsScrollingTimeoutId = Do(l._resetIsScrolling, Ao);
|
|
1272
1274
|
}, l._resetIsScrolling = function() {
|
|
1273
1275
|
l._resetIsScrollingTimeoutId = null, l.setState({
|
|
1274
1276
|
isScrolling: !1
|
|
@@ -1277,23 +1279,23 @@ function Fo(e) {
|
|
|
1277
1279
|
});
|
|
1278
1280
|
}, l;
|
|
1279
1281
|
}
|
|
1280
|
-
|
|
1281
|
-
return
|
|
1282
|
+
m.getDerivedStateFromProps = function(l, T) {
|
|
1283
|
+
return Mo(l, T), v(l), null;
|
|
1282
1284
|
};
|
|
1283
|
-
var w =
|
|
1285
|
+
var w = m.prototype;
|
|
1284
1286
|
return w.scrollTo = function(l) {
|
|
1285
|
-
var
|
|
1286
|
-
|
|
1287
|
-
return
|
|
1288
|
-
horizontalScrollDirection: y.scrollLeft <
|
|
1289
|
-
scrollLeft:
|
|
1287
|
+
var T = l.scrollLeft, _ = l.scrollTop;
|
|
1288
|
+
T !== void 0 && (T = Math.max(0, T)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(y) {
|
|
1289
|
+
return T === void 0 && (T = y.scrollLeft), _ === void 0 && (_ = y.scrollTop), y.scrollLeft === T && y.scrollTop === _ ? null : {
|
|
1290
|
+
horizontalScrollDirection: y.scrollLeft < T ? "forward" : "backward",
|
|
1291
|
+
scrollLeft: T,
|
|
1290
1292
|
scrollTop: _,
|
|
1291
1293
|
scrollUpdateWasRequested: !0,
|
|
1292
1294
|
verticalScrollDirection: y.scrollTop < _ ? "forward" : "backward"
|
|
1293
1295
|
};
|
|
1294
1296
|
}, this._resetIsScrollingDebounced);
|
|
1295
1297
|
}, w.scrollToItem = function(l) {
|
|
1296
|
-
var
|
|
1298
|
+
var T = l.align, _ = T === void 0 ? "auto" : T, y = l.columnIndex, E = l.rowIndex, I = this.props, N = I.columnCount, R = I.height, z = I.rowCount, O = I.width, D = this.state, x = D.scrollLeft, k = D.scrollTop, $ = zo();
|
|
1297
1299
|
y !== void 0 && (y = Math.max(0, Math.min(y, N - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, z - 1)));
|
|
1298
1300
|
var j = c(this.props, this._instanceProps), Y = s(this.props, this._instanceProps), q = Y > O ? $ : 0, B = j > R ? $ : 0;
|
|
1299
1301
|
this.scrollTo({
|
|
@@ -1301,14 +1303,14 @@ function Fo(e) {
|
|
|
1301
1303
|
scrollTop: E !== void 0 ? u(this.props, E, _, k, this._instanceProps, q) : k
|
|
1302
1304
|
});
|
|
1303
1305
|
}, w.componentDidMount = function() {
|
|
1304
|
-
var l = this.props,
|
|
1306
|
+
var l = this.props, T = l.initialScrollLeft, _ = l.initialScrollTop;
|
|
1305
1307
|
if (this._outerRef != null) {
|
|
1306
1308
|
var y = this._outerRef;
|
|
1307
|
-
typeof
|
|
1309
|
+
typeof T == "number" && (y.scrollLeft = T), typeof _ == "number" && (y.scrollTop = _);
|
|
1308
1310
|
}
|
|
1309
1311
|
this._callPropsCallbacks();
|
|
1310
1312
|
}, w.componentDidUpdate = function() {
|
|
1311
|
-
var l = this.props.direction,
|
|
1313
|
+
var l = this.props.direction, T = this.state, _ = T.scrollLeft, y = T.scrollTop, E = T.scrollUpdateWasRequested;
|
|
1312
1314
|
if (E && this._outerRef != null) {
|
|
1313
1315
|
var I = this._outerRef;
|
|
1314
1316
|
if (l === "rtl")
|
|
@@ -1332,11 +1334,11 @@ function Fo(e) {
|
|
|
1332
1334
|
}, w.componentWillUnmount = function() {
|
|
1333
1335
|
this._resetIsScrollingTimeoutId !== null && Kt(this._resetIsScrollingTimeoutId);
|
|
1334
1336
|
}, w.render = function() {
|
|
1335
|
-
var l = this.props,
|
|
1337
|
+
var l = this.props, T = l.children, _ = l.className, y = l.columnCount, E = l.direction, I = l.height, N = l.innerRef, R = l.innerElementType, z = l.innerTagName, O = l.itemData, D = l.itemKey, x = D === void 0 ? Fo : D, k = l.outerElementType, $ = l.outerTagName, j = l.rowCount, Y = l.style, q = l.useIsScrolling, B = l.width, ie = this.state.isScrolling, pe = this._getHorizontalRangeToRender(), J = pe[0], ae = pe[1], Q = this._getVerticalRangeToRender(), Ie = Q[0], Ce = Q[1], Le = [];
|
|
1336
1338
|
if (y > 0 && j)
|
|
1337
1339
|
for (var le = Ie; le <= Ce; le++)
|
|
1338
1340
|
for (var he = J; he <= ae; he++)
|
|
1339
|
-
Le.push(
|
|
1341
|
+
Le.push(Ve(T, {
|
|
1340
1342
|
columnIndex: he,
|
|
1341
1343
|
data: O,
|
|
1342
1344
|
isScrolling: q ? ie : void 0,
|
|
@@ -1349,7 +1351,7 @@ function Fo(e) {
|
|
|
1349
1351
|
style: this._getItemStyle(le, he)
|
|
1350
1352
|
}));
|
|
1351
1353
|
var De = c(this.props, this._instanceProps), rt = s(this.props, this._instanceProps);
|
|
1352
|
-
return
|
|
1354
|
+
return Ve(k || $ || "div", {
|
|
1353
1355
|
className: _,
|
|
1354
1356
|
onScroll: this._onScroll,
|
|
1355
1357
|
ref: this._outerRefSetter,
|
|
@@ -1362,7 +1364,7 @@ function Fo(e) {
|
|
|
1362
1364
|
willChange: "transform",
|
|
1363
1365
|
direction: E
|
|
1364
1366
|
}, Y)
|
|
1365
|
-
},
|
|
1367
|
+
}, Ve(R || z || "div", {
|
|
1366
1368
|
children: Le,
|
|
1367
1369
|
ref: N,
|
|
1368
1370
|
style: {
|
|
@@ -1372,8 +1374,8 @@ function Fo(e) {
|
|
|
1372
1374
|
}
|
|
1373
1375
|
}));
|
|
1374
1376
|
}, w._callPropsCallbacks = function() {
|
|
1375
|
-
var l = this.props,
|
|
1376
|
-
if (typeof _ == "function" &&
|
|
1377
|
+
var l = this.props, T = l.columnCount, _ = l.onItemsRendered, y = l.onScroll, E = l.rowCount;
|
|
1378
|
+
if (typeof _ == "function" && T > 0 && E > 0) {
|
|
1377
1379
|
var I = this._getHorizontalRangeToRender(), N = I[0], R = I[1], z = I[2], O = I[3], D = this._getVerticalRangeToRender(), x = D[0], k = D[1], $ = D[2], j = D[3];
|
|
1378
1380
|
this._callOnItemsRendered(N, R, x, k, z, O, $, j);
|
|
1379
1381
|
}
|
|
@@ -1382,28 +1384,28 @@ function Fo(e) {
|
|
|
1382
1384
|
this._callOnScroll(B, ie, q, J, pe);
|
|
1383
1385
|
}
|
|
1384
1386
|
}, w._getHorizontalRangeToRender = function() {
|
|
1385
|
-
var l = this.props,
|
|
1386
|
-
if (
|
|
1387
|
+
var l = this.props, T = l.columnCount, _ = l.overscanColumnCount, y = l.overscanColumnsCount, E = l.overscanCount, I = l.rowCount, N = this.state, R = N.horizontalScrollDirection, z = N.isScrolling, O = N.scrollLeft, D = _ || y || E || 1;
|
|
1388
|
+
if (T === 0 || I === 0)
|
|
1387
1389
|
return [0, 0, 0, 0];
|
|
1388
1390
|
var x = o(this.props, O, this._instanceProps), k = r(this.props, x, O, this._instanceProps), $ = !z || R === "backward" ? Math.max(1, D) : 1, j = !z || R === "forward" ? Math.max(1, D) : 1;
|
|
1389
|
-
return [Math.max(0, x - $), Math.max(0, Math.min(
|
|
1391
|
+
return [Math.max(0, x - $), Math.max(0, Math.min(T - 1, k + j)), x, k];
|
|
1390
1392
|
}, w._getVerticalRangeToRender = function() {
|
|
1391
|
-
var l = this.props,
|
|
1392
|
-
if (
|
|
1393
|
+
var l = this.props, T = l.columnCount, _ = l.overscanCount, y = l.overscanRowCount, E = l.overscanRowsCount, I = l.rowCount, N = this.state, R = N.isScrolling, z = N.verticalScrollDirection, O = N.scrollTop, D = y || E || _ || 1;
|
|
1394
|
+
if (T === 0 || I === 0)
|
|
1393
1395
|
return [0, 0, 0, 0];
|
|
1394
|
-
var x = h(this.props, O, this._instanceProps), k =
|
|
1396
|
+
var x = h(this.props, O, this._instanceProps), k = g(this.props, x, O, this._instanceProps), $ = !R || z === "backward" ? Math.max(1, D) : 1, j = !R || z === "forward" ? Math.max(1, D) : 1;
|
|
1395
1397
|
return [Math.max(0, x - $), Math.max(0, Math.min(I - 1, k + j)), x, k];
|
|
1396
|
-
},
|
|
1398
|
+
}, m;
|
|
1397
1399
|
}(tr), t.defaultProps = {
|
|
1398
1400
|
direction: "ltr",
|
|
1399
1401
|
itemData: void 0,
|
|
1400
1402
|
useIsScrolling: !1
|
|
1401
1403
|
}, t;
|
|
1402
1404
|
}
|
|
1403
|
-
var
|
|
1404
|
-
var o = t.children, r = t.direction, a = t.height, c = t.innerTagName, s = t.outerTagName, d = t.overscanColumnsCount, u = t.overscanCount, p = t.overscanRowsCount,
|
|
1405
|
+
var Mo = function(t, n) {
|
|
1406
|
+
var o = t.children, r = t.direction, a = t.height, c = t.innerTagName, s = t.outerTagName, d = t.overscanColumnsCount, u = t.overscanCount, p = t.overscanRowsCount, f = t.width, h = n.instance;
|
|
1405
1407
|
if (process.env.NODE_ENV !== "production") {
|
|
1406
|
-
if (typeof u == "number" &&
|
|
1408
|
+
if (typeof u == "number" && Ue && !Ue.has(h) && (Ue.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof p == "number") && qe && !qe.has(h) && (qe.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && Ze && !Ze.has(h) && (Ze.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1407
1409
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1408
1410
|
switch (r) {
|
|
1409
1411
|
case "ltr":
|
|
@@ -1412,8 +1414,8 @@ var ko = function(t, n) {
|
|
|
1412
1414
|
default:
|
|
1413
1415
|
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + r + '" was specified.'));
|
|
1414
1416
|
}
|
|
1415
|
-
if (typeof
|
|
1416
|
-
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (
|
|
1417
|
+
if (typeof f != "number")
|
|
1418
|
+
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (f === null ? "null" : typeof f) + '" was specified.'));
|
|
1417
1419
|
if (typeof a != "number")
|
|
1418
1420
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
1419
1421
|
}
|
|
@@ -1442,11 +1444,11 @@ var ko = function(t, n) {
|
|
|
1442
1444
|
d = u.offset + u.size;
|
|
1443
1445
|
}
|
|
1444
1446
|
for (var p = s + 1; p <= o; p++) {
|
|
1445
|
-
var
|
|
1447
|
+
var f = c(p);
|
|
1446
1448
|
a[p] = {
|
|
1447
1449
|
offset: d,
|
|
1448
|
-
size:
|
|
1449
|
-
}, d +=
|
|
1450
|
+
size: f
|
|
1451
|
+
}, d += f;
|
|
1450
1452
|
}
|
|
1451
1453
|
t === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
|
|
1452
1454
|
}
|
|
@@ -1455,7 +1457,7 @@ var ko = function(t, n) {
|
|
|
1455
1457
|
var a, c;
|
|
1456
1458
|
t === "column" ? (a = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
|
|
1457
1459
|
var s = c > 0 ? a[c].offset : 0;
|
|
1458
|
-
return s >= r ? Rn(t, n, o, c, 0, r) :
|
|
1460
|
+
return s >= r ? Rn(t, n, o, c, 0, r) : Wo(t, n, o, Math.max(0, c), r);
|
|
1459
1461
|
}, Rn = function(t, n, o, r, a, c) {
|
|
1460
1462
|
for (; a <= r; ) {
|
|
1461
1463
|
var s = a + Math.floor((r - a) / 2), d = me(t, n, s, o).offset;
|
|
@@ -1464,24 +1466,24 @@ var ko = function(t, n) {
|
|
|
1464
1466
|
d < c ? a = s + 1 : d > c && (r = s - 1);
|
|
1465
1467
|
}
|
|
1466
1468
|
return a > 0 ? a - 1 : 0;
|
|
1467
|
-
},
|
|
1469
|
+
}, Wo = function(t, n, o, r, a) {
|
|
1468
1470
|
for (var c = t === "column" ? n.columnCount : n.rowCount, s = 1; r < c && me(t, n, r, o).offset < a; )
|
|
1469
1471
|
r += s, s *= 2;
|
|
1470
1472
|
return Rn(t, n, o, Math.min(r, c - 1), Math.floor(r / 2), a);
|
|
1471
1473
|
}, Qt = function(t, n, o, r, a, c, s) {
|
|
1472
|
-
var d = t === "column" ? n.width : n.height, u = me(t, n, o, c), p = t === "column" ? Ln(n, c) : In(n, c),
|
|
1473
|
-
switch (r === "smart" && (a >= h - d && a <=
|
|
1474
|
+
var d = t === "column" ? n.width : n.height, u = me(t, n, o, c), p = t === "column" ? Ln(n, c) : In(n, c), f = Math.max(0, Math.min(p - d, u.offset)), h = Math.max(0, u.offset - d + s + u.size);
|
|
1475
|
+
switch (r === "smart" && (a >= h - d && a <= f + d ? r = "auto" : r = "center"), r) {
|
|
1474
1476
|
case "start":
|
|
1475
|
-
return
|
|
1477
|
+
return f;
|
|
1476
1478
|
case "end":
|
|
1477
1479
|
return h;
|
|
1478
1480
|
case "center":
|
|
1479
|
-
return Math.round(h + (
|
|
1481
|
+
return Math.round(h + (f - h) / 2);
|
|
1480
1482
|
case "auto":
|
|
1481
1483
|
default:
|
|
1482
|
-
return a >= h && a <=
|
|
1484
|
+
return a >= h && a <= f ? a : h > f || a < h ? h : f;
|
|
1483
1485
|
}
|
|
1484
|
-
},
|
|
1486
|
+
}, Ho = /* @__PURE__ */ ko({
|
|
1485
1487
|
getColumnOffset: function(t, n, o) {
|
|
1486
1488
|
return me("column", t, n, o).offset;
|
|
1487
1489
|
},
|
|
@@ -1538,8 +1540,8 @@ var ko = function(t, n) {
|
|
|
1538
1540
|
shouldForceUpdate: d
|
|
1539
1541
|
});
|
|
1540
1542
|
}, n.resetAfterIndices = function(s) {
|
|
1541
|
-
var d = s.columnIndex, u = s.rowIndex, p = s.shouldForceUpdate,
|
|
1542
|
-
typeof d == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, d - 1)), typeof u == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, u - 1)), n._getItemStyleCache(-1),
|
|
1543
|
+
var d = s.columnIndex, u = s.rowIndex, p = s.shouldForceUpdate, f = p === void 0 ? !0 : p;
|
|
1544
|
+
typeof d == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, d - 1)), typeof u == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, u - 1)), n._getItemStyleCache(-1), f && n.forceUpdate();
|
|
1543
1545
|
}, c;
|
|
1544
1546
|
},
|
|
1545
1547
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
@@ -1563,30 +1565,30 @@ function en(e, t) {
|
|
|
1563
1565
|
return !0;
|
|
1564
1566
|
return !1;
|
|
1565
1567
|
}
|
|
1566
|
-
var
|
|
1567
|
-
function
|
|
1568
|
-
var n = e.style, o = Bt(e,
|
|
1568
|
+
var $o = ["style"], Go = ["style"];
|
|
1569
|
+
function Vo(e, t) {
|
|
1570
|
+
var n = e.style, o = Bt(e, $o), r = t.style, a = Bt(t, Go);
|
|
1569
1571
|
return !en(n, r) && !en(o, a);
|
|
1570
1572
|
}
|
|
1571
|
-
const
|
|
1572
|
-
const { viewMode: e } =
|
|
1573
|
-
(
|
|
1573
|
+
const Uo = () => {
|
|
1574
|
+
const { viewMode: e } = He(), { scrollMode: t } = Oe(), { setColumnCount: n } = pn(), { virtualScrollableElementRef: o } = et(), r = tt(), a = L(
|
|
1575
|
+
(g) => r.widths[g] || 0,
|
|
1574
1576
|
[r.widths]
|
|
1575
1577
|
), c = L(
|
|
1576
|
-
(
|
|
1578
|
+
(g) => r.heights[g] || 0,
|
|
1577
1579
|
[r.heights]
|
|
1578
|
-
), s = M(() => r.heights.length, [r.heights]), d = M(() => Math.max(...r.widths), [r.widths]), u = M(() => t === ee.HORIZONTAL_SCROLLING ? s : e ===
|
|
1580
|
+
), s = M(() => r.heights.length, [r.heights]), d = M(() => Math.max(...r.widths), [r.widths]), u = M(() => t === ee.HORIZONTAL_SCROLLING ? s : e === Be.DUAL_PAGE ? 2 : 1, [e, t, t, s, o, d]);
|
|
1579
1581
|
F(() => {
|
|
1580
1582
|
n(u);
|
|
1581
1583
|
}, [u, n]);
|
|
1582
|
-
const p = M(() => t === ee.HORIZONTAL_SCROLLING || t === ee.PAGE_SCROLLING ? 1 : Math.round(s / u), [u, s, t]),
|
|
1584
|
+
const p = M(() => t === ee.HORIZONTAL_SCROLLING || t === ee.PAGE_SCROLLING ? 1 : Math.round(s / u), [u, s, t]), f = M(() => r.heights.reduce((g, P) => g + P, 0) / r.heights.length || 0, [r]), h = M(() => r.widths.reduce((g, P) => g + P, 0) / r.heights.length || 0, [r]);
|
|
1583
1585
|
return {
|
|
1584
1586
|
rowCount: p,
|
|
1585
1587
|
rowHeight: c,
|
|
1586
1588
|
columnCount: u,
|
|
1587
1589
|
columnWidth: a,
|
|
1588
1590
|
pageDimension: r,
|
|
1589
|
-
estimatedRowHeight:
|
|
1591
|
+
estimatedRowHeight: f,
|
|
1590
1592
|
estimatedColumnWidth: h
|
|
1591
1593
|
};
|
|
1592
1594
|
};
|
|
@@ -1606,69 +1608,69 @@ mt == null || rn == null ? (bt = ht, Ct = function(t) {
|
|
|
1606
1608
|
}, tn);
|
|
1607
1609
|
return [n, o];
|
|
1608
1610
|
});
|
|
1609
|
-
function
|
|
1611
|
+
function qo(e) {
|
|
1610
1612
|
let t, n, o, r, a, c, s;
|
|
1611
1613
|
const d = typeof document < "u" && document.attachEvent;
|
|
1612
1614
|
if (!d) {
|
|
1613
|
-
c = function(
|
|
1614
|
-
const
|
|
1615
|
-
|
|
1616
|
-
}, a = function(
|
|
1617
|
-
return
|
|
1618
|
-
}, s = function(
|
|
1619
|
-
if (
|
|
1615
|
+
c = function(S) {
|
|
1616
|
+
const m = S.__resizeTriggers__, w = m.firstElementChild, C = m.lastElementChild, l = w.firstElementChild;
|
|
1617
|
+
C.scrollLeft = C.scrollWidth, C.scrollTop = C.scrollHeight, l.style.width = w.offsetWidth + 1 + "px", l.style.height = w.offsetHeight + 1 + "px", w.scrollLeft = w.scrollWidth, w.scrollTop = w.scrollHeight;
|
|
1618
|
+
}, a = function(S) {
|
|
1619
|
+
return S.offsetWidth !== S.__resizeLast__.width || S.offsetHeight !== S.__resizeLast__.height;
|
|
1620
|
+
}, s = function(S) {
|
|
1621
|
+
if (S.target.className && typeof S.target.className.indexOf == "function" && S.target.className.indexOf("contract-trigger") < 0 && S.target.className.indexOf("expand-trigger") < 0)
|
|
1620
1622
|
return;
|
|
1621
|
-
const
|
|
1623
|
+
const m = this;
|
|
1622
1624
|
c(this), this.__resizeRAF__ && bt(this.__resizeRAF__), this.__resizeRAF__ = Ct(function() {
|
|
1623
|
-
a(
|
|
1624
|
-
l.call(
|
|
1625
|
+
a(m) && (m.__resizeLast__.width = m.offsetWidth, m.__resizeLast__.height = m.offsetHeight, m.__resizeListeners__.forEach(function(l) {
|
|
1626
|
+
l.call(m, S);
|
|
1625
1627
|
}));
|
|
1626
1628
|
});
|
|
1627
1629
|
};
|
|
1628
|
-
let h = !1,
|
|
1630
|
+
let h = !1, g = "";
|
|
1629
1631
|
o = "animationstart";
|
|
1630
|
-
const
|
|
1631
|
-
let
|
|
1632
|
+
const P = "Webkit Moz O ms".split(" ");
|
|
1633
|
+
let b = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = "";
|
|
1632
1634
|
{
|
|
1633
|
-
const
|
|
1634
|
-
if (
|
|
1635
|
-
for (let
|
|
1636
|
-
if (
|
|
1637
|
-
|
|
1635
|
+
const S = document.createElement("fakeelement");
|
|
1636
|
+
if (S.style.animationName !== void 0 && (h = !0), h === !1) {
|
|
1637
|
+
for (let m = 0; m < P.length; m++)
|
|
1638
|
+
if (S.style[P[m] + "AnimationName"] !== void 0) {
|
|
1639
|
+
v = P[m], g = "-" + v.toLowerCase() + "-", o = b[m], h = !0;
|
|
1638
1640
|
break;
|
|
1639
1641
|
}
|
|
1640
1642
|
}
|
|
1641
1643
|
}
|
|
1642
|
-
n = "resizeanim", t = "@" +
|
|
1644
|
+
n = "resizeanim", t = "@" + g + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = g + "animation: 1ms " + n + "; ";
|
|
1643
1645
|
}
|
|
1644
1646
|
const u = function(h) {
|
|
1645
1647
|
if (!h.getElementById("detectElementResize")) {
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1648
|
+
const g = (t || "") + ".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 = h.head || h.getElementsByTagName("head")[0], b = h.createElement("style");
|
|
1649
|
+
b.id = "detectElementResize", b.type = "text/css", e != null && b.setAttribute("nonce", e), b.styleSheet ? b.styleSheet.cssText = g : b.appendChild(h.createTextNode(g)), P.appendChild(b);
|
|
1648
1650
|
}
|
|
1649
1651
|
};
|
|
1650
1652
|
return {
|
|
1651
|
-
addResizeListener: function(h,
|
|
1653
|
+
addResizeListener: function(h, g) {
|
|
1652
1654
|
if (d)
|
|
1653
|
-
h.attachEvent("onresize",
|
|
1655
|
+
h.attachEvent("onresize", g);
|
|
1654
1656
|
else {
|
|
1655
1657
|
if (!h.__resizeTriggers__) {
|
|
1656
|
-
const
|
|
1657
|
-
|
|
1658
|
-
const
|
|
1659
|
-
|
|
1660
|
-
const
|
|
1661
|
-
|
|
1658
|
+
const P = h.ownerDocument, b = re.getComputedStyle(h);
|
|
1659
|
+
b && b.position === "static" && (h.style.position = "relative"), u(P), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = P.createElement("div")).className = "resize-triggers";
|
|
1660
|
+
const v = P.createElement("div");
|
|
1661
|
+
v.className = "expand-trigger", v.appendChild(P.createElement("div"));
|
|
1662
|
+
const S = P.createElement("div");
|
|
1663
|
+
S.className = "contract-trigger", h.__resizeTriggers__.appendChild(v), h.__resizeTriggers__.appendChild(S), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", s, !0), o && (h.__resizeTriggers__.__animationListener__ = function(w) {
|
|
1662
1664
|
w.animationName === n && c(h);
|
|
1663
1665
|
}, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
|
|
1664
1666
|
}
|
|
1665
|
-
h.__resizeListeners__.push(
|
|
1667
|
+
h.__resizeListeners__.push(g);
|
|
1666
1668
|
}
|
|
1667
1669
|
},
|
|
1668
|
-
removeResizeListener: function(h,
|
|
1670
|
+
removeResizeListener: function(h, g) {
|
|
1669
1671
|
if (d)
|
|
1670
|
-
h.detachEvent("onresize",
|
|
1671
|
-
else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(
|
|
1672
|
+
h.detachEvent("onresize", g);
|
|
1673
|
+
else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(g), 1), !h.__resizeListeners__.length) {
|
|
1672
1674
|
h.removeEventListener("scroll", s, !0), h.__resizeTriggers__.__animationListener__ && (h.__resizeTriggers__.removeEventListener(o, h.__resizeTriggers__.__animationListener__), h.__resizeTriggers__.__animationListener__ = null);
|
|
1673
1675
|
try {
|
|
1674
1676
|
h.__resizeTriggers__ = !h.removeChild(h.__resizeTriggers__);
|
|
@@ -1678,7 +1680,7 @@ function Uo(e) {
|
|
|
1678
1680
|
}
|
|
1679
1681
|
};
|
|
1680
1682
|
}
|
|
1681
|
-
class
|
|
1683
|
+
class Zo extends nr {
|
|
1682
1684
|
constructor(...t) {
|
|
1683
1685
|
super(...t), this.state = {
|
|
1684
1686
|
height: this.props.defaultHeight || 0,
|
|
@@ -1693,17 +1695,17 @@ class qo extends nr {
|
|
|
1693
1695
|
onResize: r
|
|
1694
1696
|
} = this.props;
|
|
1695
1697
|
if (this._parentNode) {
|
|
1696
|
-
const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), u = parseFloat(a.paddingBottom || "0"), p = this._parentNode.getBoundingClientRect(),
|
|
1697
|
-
(!n && (this.state.height !==
|
|
1698
|
-
height:
|
|
1699
|
-
width:
|
|
1700
|
-
scaledHeight:
|
|
1698
|
+
const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), u = parseFloat(a.paddingBottom || "0"), p = this._parentNode.getBoundingClientRect(), f = p.height - d - u, h = p.width - c - s, g = this._parentNode.offsetHeight - d - u, P = this._parentNode.offsetWidth - c - s;
|
|
1699
|
+
(!n && (this.state.height !== g || this.state.scaledHeight !== f) || !o && (this.state.width !== P || this.state.scaledWidth !== h)) && (this.setState({
|
|
1700
|
+
height: g,
|
|
1701
|
+
width: P,
|
|
1702
|
+
scaledHeight: f,
|
|
1701
1703
|
scaledWidth: h
|
|
1702
1704
|
}), typeof r == "function" && r({
|
|
1703
|
-
height:
|
|
1704
|
-
scaledHeight:
|
|
1705
|
+
height: g,
|
|
1706
|
+
scaledHeight: f,
|
|
1705
1707
|
scaledWidth: h,
|
|
1706
|
-
width:
|
|
1708
|
+
width: P
|
|
1707
1709
|
}));
|
|
1708
1710
|
}
|
|
1709
1711
|
}, this._setRef = (n) => {
|
|
@@ -1719,7 +1721,7 @@ class qo extends nr {
|
|
|
1719
1721
|
const o = n.ownerDocument.defaultView.ResizeObserver;
|
|
1720
1722
|
o != null ? (this._resizeObserver = new o(() => {
|
|
1721
1723
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1722
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1724
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = qo(t), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1723
1725
|
}
|
|
1724
1726
|
}
|
|
1725
1727
|
componentWillUnmount() {
|
|
@@ -1737,27 +1739,27 @@ class qo extends nr {
|
|
|
1737
1739
|
onResize: d,
|
|
1738
1740
|
style: u = {},
|
|
1739
1741
|
tagName: p = "div",
|
|
1740
|
-
...
|
|
1742
|
+
...f
|
|
1741
1743
|
} = this.props, {
|
|
1742
1744
|
height: h,
|
|
1743
|
-
scaledHeight:
|
|
1744
|
-
scaledWidth:
|
|
1745
|
-
width:
|
|
1746
|
-
} = this.state,
|
|
1745
|
+
scaledHeight: g,
|
|
1746
|
+
scaledWidth: P,
|
|
1747
|
+
width: b
|
|
1748
|
+
} = this.state, v = {
|
|
1747
1749
|
overflow: "visible"
|
|
1748
|
-
},
|
|
1749
|
-
let
|
|
1750
|
-
return r || (h === 0 && (
|
|
1750
|
+
}, S = {};
|
|
1751
|
+
let m = !1;
|
|
1752
|
+
return r || (h === 0 && (m = !0), v.height = 0, S.height = h, S.scaledHeight = g), a || (b === 0 && (m = !0), v.width = 0, S.width = b, S.scaledWidth = P), c && (m = !1), Ve(p, {
|
|
1751
1753
|
ref: this._setRef,
|
|
1752
1754
|
style: {
|
|
1753
|
-
...
|
|
1755
|
+
...v,
|
|
1754
1756
|
...u
|
|
1755
1757
|
},
|
|
1756
|
-
...
|
|
1757
|
-
}, !
|
|
1758
|
+
...f
|
|
1759
|
+
}, !m && t(S));
|
|
1758
1760
|
}
|
|
1759
1761
|
}
|
|
1760
|
-
const
|
|
1762
|
+
const Bo = ({ widths: e, heights: t }) => {
|
|
1761
1763
|
const { focusedPage: n, totalPages: o } = oe(), r = M(() => {
|
|
1762
1764
|
const s = [], d = Math.ceil(n / 2) * 2 - 1;
|
|
1763
1765
|
if (s.push(d), d + 1 < o) {
|
|
@@ -1781,7 +1783,7 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1781
1783
|
}
|
|
1782
1784
|
], [e, t, r]), c = M(() => a.reduce((s, d) => s + Number(d.width || 0), 0), [a]);
|
|
1783
1785
|
return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: r.map((s, d) => /* @__PURE__ */ i(Rt, { style: a[d], pageNumber: s }, s)) });
|
|
1784
|
-
},
|
|
1786
|
+
}, jo = ({ widths: e, heights: t }) => {
|
|
1785
1787
|
const { focusedPage: n } = oe(), o = M(() => ({
|
|
1786
1788
|
position: "absolute",
|
|
1787
1789
|
width: e(n - 1),
|
|
@@ -1797,72 +1799,72 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1797
1799
|
children: /* @__PURE__ */ i(Rt, { style: o, pageNumber: n }, n)
|
|
1798
1800
|
}
|
|
1799
1801
|
);
|
|
1800
|
-
},
|
|
1801
|
-
const o = W(), { contentRef: r } = we(), { heights: a, widths: c } = tt(), { setFocusedPage: s } = oe(), [d, u] = H([]), { targetScrollPage: p } = fn(),
|
|
1802
|
-
const
|
|
1802
|
+
}, Ko = (e, t, n) => {
|
|
1803
|
+
const o = W(), { contentRef: r } = we(), { heights: a, widths: c } = tt(), { setFocusedPage: s } = oe(), [d, u] = H([]), { targetScrollPage: p } = fn(), f = St(d, 0, 500), h = M(() => a.map((P, b) => {
|
|
1804
|
+
const v = c[b], S = Wr(b + 1, e), m = v * S.columnIndex, w = P * S.rowIndex, C = m + v, l = w + P;
|
|
1803
1805
|
return {
|
|
1804
|
-
pageNumber:
|
|
1805
|
-
...
|
|
1806
|
-
width:
|
|
1807
|
-
height:
|
|
1808
|
-
startX:
|
|
1806
|
+
pageNumber: b + 1,
|
|
1807
|
+
...S,
|
|
1808
|
+
width: v,
|
|
1809
|
+
height: P,
|
|
1810
|
+
startX: m,
|
|
1809
1811
|
startY: w,
|
|
1810
|
-
endX:
|
|
1812
|
+
endX: C,
|
|
1811
1813
|
endY: l
|
|
1812
1814
|
};
|
|
1813
1815
|
}), [a, c, e, t]);
|
|
1814
1816
|
F(() => {
|
|
1815
|
-
var
|
|
1816
|
-
|
|
1817
|
-
let
|
|
1818
|
-
|
|
1819
|
-
}, [
|
|
1820
|
-
const
|
|
1821
|
-
(
|
|
1817
|
+
var b;
|
|
1818
|
+
f.length > 0 && !p.current && s(f[0].pageNumber);
|
|
1819
|
+
let P = (b = f[0]) == null ? void 0 : b.ratio;
|
|
1820
|
+
P && f.filter((v) => Math.round(v.ratio) === Math.round(P)).some((v) => v.pageNumber === p.current) && (p.current = void 0);
|
|
1821
|
+
}, [f, s]);
|
|
1822
|
+
const g = L(
|
|
1823
|
+
(P) => {
|
|
1822
1824
|
o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
|
|
1823
|
-
const
|
|
1824
|
-
startTop:
|
|
1825
|
-
startLeft:
|
|
1826
|
-
endTop:
|
|
1827
|
-
endLeft:
|
|
1828
|
-
},
|
|
1829
|
-
const w =
|
|
1830
|
-
return w &&
|
|
1831
|
-
}).map((
|
|
1832
|
-
const w =
|
|
1825
|
+
const b = P.target, v = {
|
|
1826
|
+
startTop: b.scrollTop,
|
|
1827
|
+
startLeft: b.scrollLeft,
|
|
1828
|
+
endTop: b.scrollTop + b.clientHeight,
|
|
1829
|
+
endLeft: b.scrollLeft + b.clientWidth
|
|
1830
|
+
}, S = h.filter((m) => {
|
|
1831
|
+
const w = m.endX >= v.startLeft && m.endY >= v.startTop, C = m.startX <= v.endLeft && m.startY <= v.endTop;
|
|
1832
|
+
return w && C;
|
|
1833
|
+
}).map((m) => {
|
|
1834
|
+
const w = v.startLeft > m.startX ? v.startLeft : m.startX, C = v.startTop > m.startY ? v.startTop : m.startY, l = v.endLeft < m.endX ? v.endLeft : m.endX, T = v.endTop < m.endY ? v.endTop : m.endY, _ = l - w, y = T - C, I = +(_ * y / (m.width * m.height) * 100).toFixed(2);
|
|
1833
1835
|
return {
|
|
1834
|
-
pageNumber:
|
|
1836
|
+
pageNumber: m.pageNumber,
|
|
1835
1837
|
ratio: I
|
|
1836
1838
|
};
|
|
1837
|
-
}).sort((
|
|
1838
|
-
u(
|
|
1839
|
+
}).sort((m, w) => w.ratio - m.ratio);
|
|
1840
|
+
u(S);
|
|
1839
1841
|
});
|
|
1840
1842
|
},
|
|
1841
1843
|
[r, h]
|
|
1842
1844
|
);
|
|
1843
1845
|
F(() => {
|
|
1844
1846
|
if (n)
|
|
1845
|
-
return n == null || n.addEventListener("scroll",
|
|
1846
|
-
n == null || n.removeEventListener("scroll",
|
|
1847
|
+
return n == null || n.addEventListener("scroll", g), () => {
|
|
1848
|
+
n == null || n.removeEventListener("scroll", g);
|
|
1847
1849
|
};
|
|
1848
|
-
}, [n,
|
|
1849
|
-
},
|
|
1850
|
+
}, [n, g]);
|
|
1851
|
+
}, Xo = rr(({ columnIndex: e, rowIndex: t, data: n, style: o }) => {
|
|
1850
1852
|
const r = Hr(t, e, n.columnCount);
|
|
1851
1853
|
return /* @__PURE__ */ i(Rt, { style: o, pageNumber: r }, r);
|
|
1852
|
-
},
|
|
1854
|
+
}, Vo), Os = () => {
|
|
1853
1855
|
const { initialPage: e = 1, initialScrollMode: t, instanceId: n } = cr(), { pagesRef: o, setPagesRef: r } = we(), { scrollToPage: a } = Cn(), {
|
|
1854
1856
|
virtualScrollRef: c,
|
|
1855
1857
|
getVirtualScrollRef: s,
|
|
1856
1858
|
getPageScrollElementRef: d,
|
|
1857
1859
|
getVirtualScrollableElementRef: u,
|
|
1858
1860
|
setTotalInnerDimensions: p,
|
|
1859
|
-
virtualScrollableElementRef:
|
|
1861
|
+
virtualScrollableElementRef: f,
|
|
1860
1862
|
totalInnerDimensions: h,
|
|
1861
|
-
pageScrollElementRef:
|
|
1862
|
-
} = et(),
|
|
1863
|
+
pageScrollElementRef: g
|
|
1864
|
+
} = et(), P = W(!0), { nextPage: b, prevPage: v, setFocusedPage: S, focusedPage: m } = oe(), { scrollMode: w } = Oe(), { viewMode: C } = He(), l = W(null), { loading: T } = X(), { LoaderImageComponent: _ } = gn(), y = W(
|
|
1863
1865
|
h
|
|
1864
1866
|
), E = W({
|
|
1865
|
-
viewMode:
|
|
1867
|
+
viewMode: C,
|
|
1866
1868
|
scrollMode: w
|
|
1867
1869
|
}), I = W(!1), N = W(), { isFullScreen: R } = lr(), {
|
|
1868
1870
|
pageDimension: z,
|
|
@@ -1872,8 +1874,8 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1872
1874
|
columnWidth: k,
|
|
1873
1875
|
estimatedColumnWidth: $,
|
|
1874
1876
|
estimatedRowHeight: j
|
|
1875
|
-
} =
|
|
1876
|
-
|
|
1877
|
+
} = Uo(), Y = St(h, 100), q = W();
|
|
1878
|
+
Ko(x, O, f);
|
|
1877
1879
|
const B = W({
|
|
1878
1880
|
scrollTop: 0,
|
|
1879
1881
|
scrollLeft: 0
|
|
@@ -1886,9 +1888,9 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1886
1888
|
}), [x]), Ce = L(
|
|
1887
1889
|
(G) => {
|
|
1888
1890
|
const V = document.activeElement !== o;
|
|
1889
|
-
!R && V || (["ArrowUp", "ArrowLeft"].includes(G.key) ? (G.preventDefault(),
|
|
1891
|
+
!R && V || (["ArrowUp", "ArrowLeft"].includes(G.key) ? (G.preventDefault(), v()) : ["ArrowDown", "ArrowRight"].includes(G.key) && (G.preventDefault(), b()));
|
|
1890
1892
|
},
|
|
1891
|
-
[
|
|
1893
|
+
[b, v, R, w]
|
|
1892
1894
|
);
|
|
1893
1895
|
F(() => (window.addEventListener("keydown", Ce), () => {
|
|
1894
1896
|
window.removeEventListener("keydown", Ce);
|
|
@@ -1904,21 +1906,21 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1904
1906
|
}, [O, x, z, c]);
|
|
1905
1907
|
const Le = L(
|
|
1906
1908
|
(G, V) => {
|
|
1907
|
-
if (!
|
|
1909
|
+
if (!f)
|
|
1908
1910
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
1909
1911
|
const Te = B.current.scrollTop > V, Pe = B.current.scrollLeft > G;
|
|
1910
1912
|
return Te || Pe ? B.current : {
|
|
1911
|
-
scrollTop:
|
|
1912
|
-
scrollLeft:
|
|
1913
|
+
scrollTop: f.scrollTop,
|
|
1914
|
+
scrollLeft: f.scrollLeft
|
|
1913
1915
|
};
|
|
1914
1916
|
},
|
|
1915
|
-
[
|
|
1917
|
+
[f]
|
|
1916
1918
|
), le = L(
|
|
1917
1919
|
(G, V) => {
|
|
1918
|
-
if (E.current.viewMode !==
|
|
1919
|
-
q.current && clearTimeout(q.current), I.current = !0, a(
|
|
1920
|
+
if (E.current.viewMode !== C || E.current.scrollMode !== w) {
|
|
1921
|
+
q.current && clearTimeout(q.current), I.current = !0, a(m, "auto"), q.current = setTimeout(() => {
|
|
1920
1922
|
requestAnimationFrame(() => {
|
|
1921
|
-
E.current = { viewMode:
|
|
1923
|
+
E.current = { viewMode: C, scrollMode: w };
|
|
1922
1924
|
});
|
|
1923
1925
|
}, 100);
|
|
1924
1926
|
return;
|
|
@@ -1943,7 +1945,7 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1943
1945
|
width: V.width
|
|
1944
1946
|
};
|
|
1945
1947
|
},
|
|
1946
|
-
[c,
|
|
1948
|
+
[c, C, w, a]
|
|
1947
1949
|
);
|
|
1948
1950
|
F(() => {
|
|
1949
1951
|
clearTimeout(N.current);
|
|
@@ -1966,7 +1968,7 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1966
1968
|
scrollLeft: G.scrollLeft
|
|
1967
1969
|
};
|
|
1968
1970
|
},
|
|
1969
|
-
[
|
|
1971
|
+
[f]
|
|
1970
1972
|
);
|
|
1971
1973
|
F(() => () => {
|
|
1972
1974
|
q.current && clearTimeout(q.current);
|
|
@@ -1984,31 +1986,31 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
1984
1986
|
[Q, J, de]
|
|
1985
1987
|
);
|
|
1986
1988
|
return F(() => {
|
|
1987
|
-
|
|
1988
|
-
}, [
|
|
1989
|
-
if (!(Y.height === 0 || !
|
|
1989
|
+
T && ae();
|
|
1990
|
+
}, [T]), F(() => {
|
|
1991
|
+
if (!(Y.height === 0 || !P.current)) {
|
|
1990
1992
|
if (t === ee.PAGE_SCROLLING) {
|
|
1991
|
-
e !==
|
|
1993
|
+
e !== m && g && S(e), P.current = !1;
|
|
1992
1994
|
return;
|
|
1993
1995
|
}
|
|
1994
|
-
a(e, "auto"),
|
|
1996
|
+
a(e, "auto"), S(e), P.current = !1;
|
|
1995
1997
|
}
|
|
1996
1998
|
}, [
|
|
1997
1999
|
a,
|
|
1998
2000
|
t,
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
+
g,
|
|
2002
|
+
S,
|
|
2001
2003
|
Y
|
|
2002
|
-
]), /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: De, children: /* @__PURE__ */ i(
|
|
2004
|
+
]), /* @__PURE__ */ i("div", { id: n, ref: r, tabIndex: -1, className: De, children: /* @__PURE__ */ i(Zo, { style: { minHeight: "50px" }, children: ({ width: G, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: rt, style: { width: G, height: V }, children: w === ee.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2003
2005
|
"div",
|
|
2004
2006
|
{
|
|
2005
2007
|
ref: d,
|
|
2006
2008
|
style: { width: G, height: V },
|
|
2007
2009
|
className: te(de["rp-pages"], de["rp-page-scrolling-wrapper"]),
|
|
2008
|
-
children:
|
|
2010
|
+
children: C === Be.DUAL_PAGE ? /* @__PURE__ */ i(Bo, { widths: k, heights: D }) : /* @__PURE__ */ i(jo, { widths: k, heights: D })
|
|
2009
2011
|
}
|
|
2010
2012
|
) : $ ? /* @__PURE__ */ i(
|
|
2011
|
-
|
|
2013
|
+
Ho,
|
|
2012
2014
|
{
|
|
2013
2015
|
ref: s,
|
|
2014
2016
|
itemData: Ie,
|
|
@@ -2027,9 +2029,9 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
2027
2029
|
de["rp-pages"],
|
|
2028
2030
|
w === ee.HORIZONTAL_SCROLLING ? de["rp-pages-horizontal-scroll"] : ""
|
|
2029
2031
|
),
|
|
2030
|
-
children:
|
|
2032
|
+
children: Xo
|
|
2031
2033
|
}
|
|
2032
|
-
) :
|
|
2034
|
+
) : T ? null : /* @__PURE__ */ i(
|
|
2033
2035
|
"div",
|
|
2034
2036
|
{
|
|
2035
2037
|
className: de["rp-loader"],
|
|
@@ -2053,28 +2055,28 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
2053
2055
|
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
2054
2056
|
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
2055
2057
|
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
2056
|
-
},
|
|
2058
|
+
}, Yo = () => {
|
|
2057
2059
|
const { prevIcon: e } = ue();
|
|
2058
2060
|
return e || /* @__PURE__ */ i(Me, {});
|
|
2059
|
-
},
|
|
2061
|
+
}, Jo = () => {
|
|
2060
2062
|
const { nextIcon: e } = ue();
|
|
2061
2063
|
return e || /* @__PURE__ */ i(Me, { style: { transform: "rotate(180deg" } });
|
|
2062
|
-
},
|
|
2064
|
+
}, Qo = () => {
|
|
2063
2065
|
const { focusedPage: e, totalPages: t, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = oe(), [c, s] = H(e.toString()), { pageNavigationTool: d = !0 } = fe(), { isSmallScreen: u } = be(), { localeMessages: p } = se();
|
|
2064
2066
|
F(() => {
|
|
2065
2067
|
s(e.toString());
|
|
2066
2068
|
}, [e]);
|
|
2067
|
-
const
|
|
2068
|
-
const
|
|
2069
|
-
s(
|
|
2069
|
+
const f = L((b) => {
|
|
2070
|
+
const v = b.target.value;
|
|
2071
|
+
s(v);
|
|
2070
2072
|
}, []), h = L(async () => {
|
|
2071
|
-
const
|
|
2072
|
-
|
|
2073
|
-
}, [a, c, t]),
|
|
2073
|
+
const b = a(c);
|
|
2074
|
+
b.success || s(b.currentPage.toString());
|
|
2075
|
+
}, [a, c, t]), g = L(() => {
|
|
2074
2076
|
s(e.toString());
|
|
2075
|
-
}, [e]),
|
|
2076
|
-
(
|
|
2077
|
-
|
|
2077
|
+
}, [e]), P = L(
|
|
2078
|
+
(b) => {
|
|
2079
|
+
b.key === "Enter" && h();
|
|
2078
2080
|
},
|
|
2079
2081
|
[h]
|
|
2080
2082
|
);
|
|
@@ -2095,15 +2097,15 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
2095
2097
|
onClick: r,
|
|
2096
2098
|
"aria-label": p == null ? void 0 : p.previousPageTooltip,
|
|
2097
2099
|
"aria-disabled": e === 1,
|
|
2098
|
-
children: /* @__PURE__ */ i(
|
|
2100
|
+
children: /* @__PURE__ */ i(Yo, {})
|
|
2099
2101
|
}
|
|
2100
2102
|
) }),
|
|
2101
2103
|
/* @__PURE__ */ i(Z, { content: p == null ? void 0 : p.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2102
2104
|
un,
|
|
2103
2105
|
{
|
|
2104
|
-
onKeyDown:
|
|
2105
|
-
onBlur:
|
|
2106
|
-
onChange:
|
|
2106
|
+
onKeyDown: P,
|
|
2107
|
+
onBlur: g,
|
|
2108
|
+
onChange: f,
|
|
2107
2109
|
value: c,
|
|
2108
2110
|
className: ft["rp-page-input"]
|
|
2109
2111
|
}
|
|
@@ -2118,12 +2120,12 @@ const Zo = ({ widths: e, heights: t }) => {
|
|
|
2118
2120
|
onClick: o,
|
|
2119
2121
|
"aria-label": p == null ? void 0 : p.nextPageTooltip,
|
|
2120
2122
|
"aria-disabled": e === t,
|
|
2121
|
-
children: /* @__PURE__ */ i(
|
|
2123
|
+
children: /* @__PURE__ */ i(Jo, {})
|
|
2122
2124
|
}
|
|
2123
2125
|
) })
|
|
2124
2126
|
] }) : null;
|
|
2125
2127
|
};
|
|
2126
|
-
var Et = "Dialog", [En,
|
|
2128
|
+
var Et = "Dialog", [En, Ds] = qr(Et), [ei, ce] = En(Et), Nn = (e) => {
|
|
2127
2129
|
const {
|
|
2128
2130
|
__scopeDialog: t,
|
|
2129
2131
|
children: n,
|
|
@@ -2137,7 +2139,7 @@ var Et = "Dialog", [En, Es] = Ur(Et), [Qo, ce] = En(Et), Nn = (e) => {
|
|
|
2137
2139
|
onChange: a
|
|
2138
2140
|
});
|
|
2139
2141
|
return /* @__PURE__ */ i(
|
|
2140
|
-
|
|
2142
|
+
ei,
|
|
2141
2143
|
{
|
|
2142
2144
|
scope: t,
|
|
2143
2145
|
triggerRef: s,
|
|
@@ -2147,18 +2149,18 @@ var Et = "Dialog", [En, Es] = Ur(Et), [Qo, ce] = En(Et), Nn = (e) => {
|
|
|
2147
2149
|
descriptionId: ct(),
|
|
2148
2150
|
open: u,
|
|
2149
2151
|
onOpenChange: p,
|
|
2150
|
-
onOpenToggle: U.useCallback(() => p((
|
|
2152
|
+
onOpenToggle: U.useCallback(() => p((f) => !f), [p]),
|
|
2151
2153
|
modal: c,
|
|
2152
2154
|
children: n
|
|
2153
2155
|
}
|
|
2154
2156
|
);
|
|
2155
2157
|
};
|
|
2156
2158
|
Nn.displayName = Et;
|
|
2157
|
-
var On = "DialogTrigger",
|
|
2159
|
+
var On = "DialogTrigger", ti = U.forwardRef(
|
|
2158
2160
|
(e, t) => {
|
|
2159
2161
|
const { __scopeDialog: n, ...o } = e, r = ce(On, n), a = yt(t, r.triggerRef);
|
|
2160
2162
|
return /* @__PURE__ */ i(
|
|
2161
|
-
|
|
2163
|
+
$e.button,
|
|
2162
2164
|
{
|
|
2163
2165
|
type: "button",
|
|
2164
2166
|
"aria-haspopup": "dialog",
|
|
@@ -2172,29 +2174,29 @@ var On = "DialogTrigger", ei = U.forwardRef(
|
|
|
2172
2174
|
);
|
|
2173
2175
|
}
|
|
2174
2176
|
);
|
|
2175
|
-
|
|
2176
|
-
var Nt = "DialogPortal", [
|
|
2177
|
+
ti.displayName = On;
|
|
2178
|
+
var Nt = "DialogPortal", [ni, Dn] = En(Nt, {
|
|
2177
2179
|
forceMount: void 0
|
|
2178
2180
|
}), zn = (e) => {
|
|
2179
2181
|
const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, a = ce(Nt, t);
|
|
2180
|
-
return /* @__PURE__ */ i(
|
|
2182
|
+
return /* @__PURE__ */ i(ni, { scope: t, forceMount: n, children: U.Children.map(o, (c) => /* @__PURE__ */ i(xt, { present: n || a.open, children: /* @__PURE__ */ i(Jr, { asChild: !0, container: r, children: c }) })) });
|
|
2181
2183
|
};
|
|
2182
2184
|
zn.displayName = Nt;
|
|
2183
|
-
var
|
|
2185
|
+
var Ke = "DialogOverlay", An = U.forwardRef(
|
|
2184
2186
|
(e, t) => {
|
|
2185
|
-
const n = Dn(
|
|
2186
|
-
return a.modal ? /* @__PURE__ */ i(xt, { present: o || a.open, children: /* @__PURE__ */ i(
|
|
2187
|
+
const n = Dn(Ke, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(Ke, e.__scopeDialog);
|
|
2188
|
+
return a.modal ? /* @__PURE__ */ i(xt, { present: o || a.open, children: /* @__PURE__ */ i(ri, { ...r, ref: t }) }) : null;
|
|
2187
2189
|
}
|
|
2188
2190
|
);
|
|
2189
|
-
An.displayName =
|
|
2190
|
-
var
|
|
2191
|
+
An.displayName = Ke;
|
|
2192
|
+
var ri = U.forwardRef(
|
|
2191
2193
|
(e, t) => {
|
|
2192
|
-
const { __scopeDialog: n, ...o } = e, r = ce(
|
|
2194
|
+
const { __scopeDialog: n, ...o } = e, r = ce(Ke, n);
|
|
2193
2195
|
return (
|
|
2194
2196
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2195
2197
|
// ie. when `Overlay` and `Content` are siblings
|
|
2196
|
-
/* @__PURE__ */ i(
|
|
2197
|
-
|
|
2198
|
+
/* @__PURE__ */ i(jr, { as: Ur, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
|
|
2199
|
+
$e.div,
|
|
2198
2200
|
{
|
|
2199
2201
|
"data-state": Dt(r.open),
|
|
2200
2202
|
...o,
|
|
@@ -2207,11 +2209,11 @@ var ni = U.forwardRef(
|
|
|
2207
2209
|
), xe = "DialogContent", Fn = U.forwardRef(
|
|
2208
2210
|
(e, t) => {
|
|
2209
2211
|
const n = Dn(xe, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = ce(xe, e.__scopeDialog);
|
|
2210
|
-
return /* @__PURE__ */ i(xt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(
|
|
2212
|
+
return /* @__PURE__ */ i(xt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(oi, { ...r, ref: t }) : /* @__PURE__ */ i(ii, { ...r, ref: t }) });
|
|
2211
2213
|
}
|
|
2212
2214
|
);
|
|
2213
2215
|
Fn.displayName = xe;
|
|
2214
|
-
var
|
|
2216
|
+
var oi = U.forwardRef(
|
|
2215
2217
|
(e, t) => {
|
|
2216
2218
|
const n = ce(xe, e.__scopeDialog), o = U.useRef(null), r = yt(t, n.contentRef, o);
|
|
2217
2219
|
return U.useEffect(() => {
|
|
@@ -2240,7 +2242,7 @@ var ri = U.forwardRef(
|
|
|
2240
2242
|
}
|
|
2241
2243
|
);
|
|
2242
2244
|
}
|
|
2243
|
-
),
|
|
2245
|
+
), ii = U.forwardRef(
|
|
2244
2246
|
(e, t) => {
|
|
2245
2247
|
const n = ce(xe, e.__scopeDialog), o = U.useRef(!1), r = U.useRef(!1);
|
|
2246
2248
|
return /* @__PURE__ */ i(
|
|
@@ -2266,9 +2268,9 @@ var ri = U.forwardRef(
|
|
|
2266
2268
|
), kn = U.forwardRef(
|
|
2267
2269
|
(e, t) => {
|
|
2268
2270
|
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = e, s = ce(xe, n), d = U.useRef(null), u = yt(t, d);
|
|
2269
|
-
return
|
|
2271
|
+
return Kr(), /* @__PURE__ */ A(_e, { children: [
|
|
2270
2272
|
/* @__PURE__ */ i(
|
|
2271
|
-
|
|
2273
|
+
Xr,
|
|
2272
2274
|
{
|
|
2273
2275
|
asChild: !0,
|
|
2274
2276
|
loop: !0,
|
|
@@ -2276,7 +2278,7 @@ var ri = U.forwardRef(
|
|
|
2276
2278
|
onMountAutoFocus: r,
|
|
2277
2279
|
onUnmountAutoFocus: a,
|
|
2278
2280
|
children: /* @__PURE__ */ i(
|
|
2279
|
-
|
|
2281
|
+
Yr,
|
|
2280
2282
|
{
|
|
2281
2283
|
role: "dialog",
|
|
2282
2284
|
id: s.contentId,
|
|
@@ -2291,30 +2293,30 @@ var ri = U.forwardRef(
|
|
|
2291
2293
|
}
|
|
2292
2294
|
),
|
|
2293
2295
|
/* @__PURE__ */ A(_e, { children: [
|
|
2294
|
-
/* @__PURE__ */ i(
|
|
2295
|
-
/* @__PURE__ */ i(
|
|
2296
|
+
/* @__PURE__ */ i(si, { titleId: s.titleId }),
|
|
2297
|
+
/* @__PURE__ */ i(li, { contentRef: d, descriptionId: s.descriptionId })
|
|
2296
2298
|
] })
|
|
2297
2299
|
] });
|
|
2298
2300
|
}
|
|
2299
2301
|
), Ot = "DialogTitle", Mn = U.forwardRef(
|
|
2300
2302
|
(e, t) => {
|
|
2301
2303
|
const { __scopeDialog: n, ...o } = e, r = ce(Ot, n);
|
|
2302
|
-
return /* @__PURE__ */ i(
|
|
2304
|
+
return /* @__PURE__ */ i($e.h2, { id: r.titleId, ...o, ref: t });
|
|
2303
2305
|
}
|
|
2304
2306
|
);
|
|
2305
2307
|
Mn.displayName = Ot;
|
|
2306
|
-
var Wn = "DialogDescription",
|
|
2308
|
+
var Wn = "DialogDescription", ai = U.forwardRef(
|
|
2307
2309
|
(e, t) => {
|
|
2308
2310
|
const { __scopeDialog: n, ...o } = e, r = ce(Wn, n);
|
|
2309
|
-
return /* @__PURE__ */ i(
|
|
2311
|
+
return /* @__PURE__ */ i($e.p, { id: r.descriptionId, ...o, ref: t });
|
|
2310
2312
|
}
|
|
2311
2313
|
);
|
|
2312
|
-
|
|
2314
|
+
ai.displayName = Wn;
|
|
2313
2315
|
var Hn = "DialogClose", $n = U.forwardRef(
|
|
2314
2316
|
(e, t) => {
|
|
2315
2317
|
const { __scopeDialog: n, ...o } = e, r = ce(Hn, n);
|
|
2316
2318
|
return /* @__PURE__ */ i(
|
|
2317
|
-
|
|
2319
|
+
$e.button,
|
|
2318
2320
|
{
|
|
2319
2321
|
type: "button",
|
|
2320
2322
|
...o,
|
|
@@ -2328,11 +2330,11 @@ $n.displayName = Hn;
|
|
|
2328
2330
|
function Dt(e) {
|
|
2329
2331
|
return e ? "open" : "closed";
|
|
2330
2332
|
}
|
|
2331
|
-
var Gn = "DialogTitleWarning", [
|
|
2333
|
+
var Gn = "DialogTitleWarning", [zs, Vn] = Zr(Gn, {
|
|
2332
2334
|
contentName: xe,
|
|
2333
2335
|
titleName: Ot,
|
|
2334
2336
|
docsSlug: "dialog"
|
|
2335
|
-
}),
|
|
2337
|
+
}), si = ({ titleId: e }) => {
|
|
2336
2338
|
const t = Vn(Gn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2337
2339
|
|
|
2338
2340
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -2341,14 +2343,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2341
2343
|
return U.useEffect(() => {
|
|
2342
2344
|
e && (document.getElementById(e) || console.error(n));
|
|
2343
2345
|
}, [n, e]), null;
|
|
2344
|
-
},
|
|
2345
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vn(
|
|
2346
|
+
}, ci = "DialogDescriptionWarning", li = ({ contentRef: e, descriptionId: t }) => {
|
|
2347
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vn(ci).contentName}}.`;
|
|
2346
2348
|
return U.useEffect(() => {
|
|
2347
2349
|
var a;
|
|
2348
2350
|
const r = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2349
2351
|
t && r && (document.getElementById(t) || console.warn(o));
|
|
2350
2352
|
}, [o, e, t]), null;
|
|
2351
|
-
},
|
|
2353
|
+
}, di = Nn, ui = zn, pi = An, hi = Fn, mi = Mn, fi = $n;
|
|
2352
2354
|
const ye = {
|
|
2353
2355
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2354
2356
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2357,7 +2359,7 @@ const ye = {
|
|
|
2357
2359
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2358
2360
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2359
2361
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2360
|
-
},
|
|
2362
|
+
}, gi = () => {
|
|
2361
2363
|
const { pdfProperties: e } = X(), { container: t } = we(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = no(), { localeMessages: r } = se(), a = M(() => {
|
|
2362
2364
|
if (!e)
|
|
2363
2365
|
return [];
|
|
@@ -2367,13 +2369,13 @@ const ye = {
|
|
|
2367
2369
|
title: d,
|
|
2368
2370
|
author: u,
|
|
2369
2371
|
subject: p,
|
|
2370
|
-
createdOn:
|
|
2372
|
+
createdOn: f,
|
|
2371
2373
|
creator: h,
|
|
2372
|
-
keywords:
|
|
2373
|
-
modifiedOn:
|
|
2374
|
-
pdfProducer:
|
|
2375
|
-
pdfVersion:
|
|
2376
|
-
pageCount:
|
|
2374
|
+
keywords: g,
|
|
2375
|
+
modifiedOn: P,
|
|
2376
|
+
pdfProducer: b,
|
|
2377
|
+
pdfVersion: v,
|
|
2378
|
+
pageCount: S
|
|
2377
2379
|
} = e;
|
|
2378
2380
|
return [
|
|
2379
2381
|
{ label: r == null ? void 0 : r.propertiesFilenameLabel, value: s },
|
|
@@ -2382,35 +2384,35 @@ const ye = {
|
|
|
2382
2384
|
{ label: r == null ? void 0 : r.propertiesTitleLabel, value: d },
|
|
2383
2385
|
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value: u },
|
|
2384
2386
|
{ label: r == null ? void 0 : r.propertiesSubjectLabel, value: p },
|
|
2385
|
-
{ label: r == null ? void 0 : r.propertiesKeywordLabel, value:
|
|
2387
|
+
{ label: r == null ? void 0 : r.propertiesKeywordLabel, value: g },
|
|
2386
2388
|
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value: h },
|
|
2387
2389
|
{
|
|
2388
2390
|
label: r == null ? void 0 : r.propertiesCreateOnLabel,
|
|
2389
|
-
value:
|
|
2391
|
+
value: f ? Ht(f) : ""
|
|
2390
2392
|
},
|
|
2391
2393
|
{
|
|
2392
2394
|
label: r == null ? void 0 : r.propertiesModifiedOnLabel,
|
|
2393
|
-
value:
|
|
2395
|
+
value: P ? Ht(P) : ""
|
|
2394
2396
|
},
|
|
2395
2397
|
{ separate: !0 },
|
|
2396
|
-
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value:
|
|
2397
|
-
{ label: r == null ? void 0 : r.propertiesPDFVersionLabel, value:
|
|
2398
|
-
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value:
|
|
2398
|
+
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: b },
|
|
2399
|
+
{ label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: v },
|
|
2400
|
+
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value: S }
|
|
2399
2401
|
];
|
|
2400
2402
|
}, [e, r]);
|
|
2401
|
-
return /* @__PURE__ */ i(
|
|
2402
|
-
/* @__PURE__ */ i(
|
|
2403
|
-
/* @__PURE__ */ A(
|
|
2404
|
-
/* @__PURE__ */ i(
|
|
2403
|
+
return /* @__PURE__ */ i(di, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(ui, { container: t, children: /* @__PURE__ */ A("div", { className: ye["rp-dialog-wrapper"], children: [
|
|
2404
|
+
/* @__PURE__ */ i(pi, { className: ye["rp-dialog-overlay"] }),
|
|
2405
|
+
/* @__PURE__ */ A(hi, { className: ye["rp-document-dialog"], children: [
|
|
2406
|
+
/* @__PURE__ */ i(mi, { className: ye["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2405
2407
|
/* @__PURE__ */ i("div", { className: ye["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: ye["rp-properties-divider"] }) : /* @__PURE__ */ i(to, { label: c.label, value: c.value }) }, s)) }),
|
|
2406
|
-
/* @__PURE__ */ i(
|
|
2408
|
+
/* @__PURE__ */ i(fi, { asChild: !0, className: ye["rp-dialog-close"], children: /* @__PURE__ */ i(eo, {}) })
|
|
2407
2409
|
] })
|
|
2408
2410
|
] }) }) });
|
|
2409
|
-
},
|
|
2411
|
+
}, vi = {
|
|
2410
2412
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2411
|
-
}, on = ".pdf",
|
|
2413
|
+
}, on = ".pdf", _i = (e) => URL.createObjectURL(e), wi = async (e) => {
|
|
2412
2414
|
const n = await (await fetch(e)).blob();
|
|
2413
|
-
return
|
|
2415
|
+
return _i(n);
|
|
2414
2416
|
}, Un = () => {
|
|
2415
2417
|
const { filename: e, pdfSrc: t } = X(), { downloadFilename: n } = vr(), o = (a) => {
|
|
2416
2418
|
const c = n || a;
|
|
@@ -2420,26 +2422,26 @@ const ye = {
|
|
|
2420
2422
|
if (!e || !t)
|
|
2421
2423
|
throw new Error("There is no PDF source to download");
|
|
2422
2424
|
const a = document.createElement("a");
|
|
2423
|
-
a.href = await
|
|
2425
|
+
a.href = await wi(t), a.download = o(e), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2424
2426
|
}, [e, t]) };
|
|
2425
2427
|
}, qn = () => {
|
|
2426
2428
|
const { downloadIcon: e } = ue();
|
|
2427
|
-
return e || /* @__PURE__ */ i(
|
|
2428
|
-
}, Zn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.downloadFileTooltip, children: e }),
|
|
2429
|
+
return e || /* @__PURE__ */ i(co, {});
|
|
2430
|
+
}, Zn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.downloadFileTooltip, children: e }), bi = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(Zn, { localeMessages: t, children: /* @__PURE__ */ i(ne, { onClick: e, "aria-label": t == null ? void 0 : t.downloadFileTooltip, children: /* @__PURE__ */ i(qn, {}) }) }), Ci = ({ download: e, localeMessages: t }) => /* @__PURE__ */ i(ve, { onClick: e, children: /* @__PURE__ */ A(Zn, { className: "rp-menu-item", localeMessages: t, children: [
|
|
2429
2431
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(qn, {}) }),
|
|
2430
2432
|
t == null ? void 0 : t.downloadFileLabel
|
|
2431
2433
|
] }) }), Bn = () => {
|
|
2432
2434
|
const { download: e } = Un(), { downloadTool: t = !0 } = fe(), { isSmallScreen: n } = be(), { localeMessages: o } = se();
|
|
2433
|
-
return t ? n ? /* @__PURE__ */ i(
|
|
2435
|
+
return t ? n ? /* @__PURE__ */ i(Ci, { download: e, localeMessages: o }) : typeof t == "function" ? /* @__PURE__ */ i(t, { download: e }) : t ? /* @__PURE__ */ i(bi, { download: e, localeMessages: o }) : null : null;
|
|
2434
2436
|
}, jn = () => {
|
|
2435
2437
|
const { printIcon: e } = ue();
|
|
2436
|
-
return e || /* @__PURE__ */ i(
|
|
2437
|
-
}, Kn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.printTooltip, children: e }),
|
|
2438
|
+
return e || /* @__PURE__ */ i(lo, {});
|
|
2439
|
+
}, Kn = ({ children: e, className: t, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: t, content: n == null ? void 0 : n.printTooltip, children: e }), Ti = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(Kn, { localeMessages: t, children: /* @__PURE__ */ i(ne, { onClick: e, "aria-label": t == null ? void 0 : t.printTooltip, children: /* @__PURE__ */ i(jn, {}) }) }), Pi = ({ print: e, localeMessages: t }) => /* @__PURE__ */ i(ve, { onClick: e, children: /* @__PURE__ */ A(Kn, { className: "rp-menu-item", localeMessages: t, children: [
|
|
2438
2440
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(jn, {}) }),
|
|
2439
2441
|
t == null ? void 0 : t.printLabel
|
|
2440
2442
|
] }) }), Xn = () => {
|
|
2441
2443
|
const { print: e, cancel: t, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = nt(), { printTool: c = !0 } = fe(), { isSmallScreen: s } = be(), { localeMessages: d } = se();
|
|
2442
|
-
return c ? s ? /* @__PURE__ */ i(
|
|
2444
|
+
return c ? s ? /* @__PURE__ */ i(Pi, { print: e, localeMessages: d }) : typeof c == "function" ? /* @__PURE__ */ i(
|
|
2443
2445
|
c,
|
|
2444
2446
|
{
|
|
2445
2447
|
print: e,
|
|
@@ -2449,33 +2451,33 @@ const ye = {
|
|
|
2449
2451
|
setOnComplete: o,
|
|
2450
2452
|
progress: a
|
|
2451
2453
|
}
|
|
2452
|
-
) : c ? /* @__PURE__ */ i(
|
|
2453
|
-
},
|
|
2454
|
+
) : c ? /* @__PURE__ */ i(Ti, { print: e, localeMessages: d }) : null : null;
|
|
2455
|
+
}, Si = {
|
|
2454
2456
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2455
|
-
}, Si = () => {
|
|
2456
|
-
const { goToFirstPageIcon: e } = ue();
|
|
2457
|
-
return e || /* @__PURE__ */ i(bn, { className: Pi["rp-go-to-Top"] });
|
|
2458
2457
|
}, yi = () => {
|
|
2458
|
+
const { goToFirstPageIcon: e } = ue();
|
|
2459
|
+
return e || /* @__PURE__ */ i(bn, { className: Si["rp-go-to-Top"] });
|
|
2460
|
+
}, xi = () => {
|
|
2459
2461
|
const { goToLastPageIcon: e } = ue();
|
|
2460
2462
|
return e || /* @__PURE__ */ i(bn, {});
|
|
2461
|
-
}, an = { width: "100%" },
|
|
2463
|
+
}, an = { width: "100%" }, Ii = () => {
|
|
2462
2464
|
const { goToPage: e, totalPages: t, focusedPage: n } = oe(), { jumpNavigationTool: o = !0 } = fe(), { localeMessages: r } = se(), a = M(() => n === 1, [n]), c = M(() => n === t, [n, t]), s = L(() => {
|
|
2463
2465
|
e(1);
|
|
2464
2466
|
}, [e]), d = L(() => {
|
|
2465
2467
|
e(t);
|
|
2466
2468
|
}, [e, t]);
|
|
2467
|
-
return o ? /* @__PURE__ */ A(
|
|
2469
|
+
return o ? /* @__PURE__ */ A(je, { children: [
|
|
2468
2470
|
/* @__PURE__ */ i(ve, { onClick: s, children: /* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.firstPageTooltip, style: an, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2469
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2471
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(yi, {}) }),
|
|
2470
2472
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
|
|
2471
2473
|
] }) }) }),
|
|
2472
2474
|
/* @__PURE__ */ i(ve, { onClick: d, children: /* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.lastPageTooltip, style: an, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": c, children: [
|
|
2473
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2475
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(xi, {}) }),
|
|
2474
2476
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
|
|
2475
2477
|
] }) }) }),
|
|
2476
2478
|
/* @__PURE__ */ i(It, {})
|
|
2477
2479
|
] }) : null;
|
|
2478
|
-
},
|
|
2480
|
+
}, Li = () => {
|
|
2479
2481
|
const { container: e } = we(), { isSmallScreen: t } = be(), {
|
|
2480
2482
|
openFileTool: n,
|
|
2481
2483
|
downloadTool: o,
|
|
@@ -2486,11 +2488,11 @@ const ye = {
|
|
|
2486
2488
|
jumpNavigationTool: d,
|
|
2487
2489
|
printTool: u,
|
|
2488
2490
|
fullscreenTool: p
|
|
2489
|
-
} = fe(), { localeMessages:
|
|
2491
|
+
} = fe(), { localeMessages: f } = se();
|
|
2490
2492
|
return M(() => {
|
|
2491
|
-
const
|
|
2492
|
-
let
|
|
2493
|
-
return t && (
|
|
2493
|
+
const g = d || c || s || a || r;
|
|
2494
|
+
let P = !1;
|
|
2495
|
+
return t && (P = !(!n && !o && !u && !p)), g || P;
|
|
2494
2496
|
}, [
|
|
2495
2497
|
n,
|
|
2496
2498
|
o,
|
|
@@ -2505,26 +2507,27 @@ const ye = {
|
|
|
2505
2507
|
_n,
|
|
2506
2508
|
{
|
|
2507
2509
|
container: e,
|
|
2508
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content:
|
|
2509
|
-
children: /* @__PURE__ */ A("div", { className:
|
|
2510
|
-
t && /* @__PURE__ */ A(
|
|
2510
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(ne, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(Vr, {}) }) }) }),
|
|
2511
|
+
children: /* @__PURE__ */ A("div", { className: vi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2512
|
+
t && /* @__PURE__ */ A(je, { children: [
|
|
2511
2513
|
/* @__PURE__ */ i(vn, {}),
|
|
2512
2514
|
/* @__PURE__ */ i(Bn, {}),
|
|
2513
2515
|
/* @__PURE__ */ i(Xn, {}),
|
|
2514
2516
|
/* @__PURE__ */ i(wn, {}),
|
|
2515
2517
|
/* @__PURE__ */ i(It, {})
|
|
2516
2518
|
] }),
|
|
2517
|
-
/* @__PURE__ */ i(
|
|
2519
|
+
/* @__PURE__ */ i(Ii, {}),
|
|
2518
2520
|
/* @__PURE__ */ i(io, {}),
|
|
2519
|
-
/* @__PURE__ */ i(
|
|
2521
|
+
/* @__PURE__ */ i(uo, {}),
|
|
2520
2522
|
/* @__PURE__ */ i(ao, {}),
|
|
2523
|
+
/* @__PURE__ */ i(so, {}),
|
|
2521
2524
|
/* @__PURE__ */ i(oo, {})
|
|
2522
2525
|
] })
|
|
2523
2526
|
}
|
|
2524
2527
|
),
|
|
2525
|
-
/* @__PURE__ */ i(
|
|
2528
|
+
/* @__PURE__ */ i(gi, {})
|
|
2526
2529
|
] }) : null;
|
|
2527
|
-
},
|
|
2530
|
+
}, Ri = () => {
|
|
2528
2531
|
const { isSmallScreen: e } = be();
|
|
2529
2532
|
return /* @__PURE__ */ A(_e, { children: [
|
|
2530
2533
|
/* @__PURE__ */ i(Gr, {}),
|
|
@@ -2534,7 +2537,7 @@ const ye = {
|
|
|
2534
2537
|
/* @__PURE__ */ i(Xn, {}),
|
|
2535
2538
|
/* @__PURE__ */ i(wn, {})
|
|
2536
2539
|
] }),
|
|
2537
|
-
/* @__PURE__ */ i(
|
|
2540
|
+
/* @__PURE__ */ i(Li, {})
|
|
2538
2541
|
] });
|
|
2539
2542
|
}, Ee = {
|
|
2540
2543
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
|
|
@@ -2542,46 +2545,53 @@ const ye = {
|
|
|
2542
2545
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2543
2546
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2544
2547
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2545
|
-
},
|
|
2548
|
+
}, Ei = 25, gt = 1e3, Ni = [50, 75, 100, 125, 150, 200, 300, 400], Oi = () => {
|
|
2546
2549
|
const { zoomInIcon: e } = ue();
|
|
2547
|
-
return e || /* @__PURE__ */ i(uo, {});
|
|
2548
|
-
}, Oi = () => {
|
|
2549
|
-
const { zoomOutIcon: e } = ue();
|
|
2550
2550
|
return e || /* @__PURE__ */ i(po, {});
|
|
2551
2551
|
}, Di = () => {
|
|
2552
|
-
const {
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2552
|
+
const { zoomOutIcon: e } = ue();
|
|
2553
|
+
return e || /* @__PURE__ */ i(ho, {});
|
|
2554
|
+
}, zi = () => {
|
|
2555
|
+
const { zoomLevel: e, setZoomLevel: t } = Qe(), { container: n, contentRef: o } = we(), { zoomTool: r = !0 } = fe(), { focusedPage: a } = oe(), { rotate: c } = Je(), { pages: s } = X(), { isSmallScreen: d } = be(), { localeMessages: u } = se(), { viewMode: p } = He(), f = L(() => {
|
|
2556
|
+
t((m) => {
|
|
2557
|
+
const w = Math.floor(m / 25) * 25;
|
|
2558
|
+
return Math.min(w + 25, gt);
|
|
2556
2559
|
});
|
|
2557
|
-
}, [t]),
|
|
2558
|
-
t((
|
|
2559
|
-
const
|
|
2560
|
-
return Math.min(
|
|
2560
|
+
}, [t]), h = L(() => {
|
|
2561
|
+
t((m) => {
|
|
2562
|
+
const w = Math.ceil(m / 25) * 25;
|
|
2563
|
+
return Math.min(w - 25, gt);
|
|
2561
2564
|
});
|
|
2562
|
-
}, [t]),
|
|
2563
|
-
var
|
|
2564
|
-
return (
|
|
2565
|
-
}, [s, a, c]),
|
|
2566
|
-
(
|
|
2567
|
-
const
|
|
2568
|
-
|
|
2565
|
+
}, [t]), g = M(() => e === Ei, [e]), P = M(() => e === gt, [e]), b = M(() => {
|
|
2566
|
+
var m;
|
|
2567
|
+
return (m = s.get(a)) == null ? void 0 : m.page.getViewport({ scale: 1, rotation: c });
|
|
2568
|
+
}, [s, a, c]), v = L(
|
|
2569
|
+
(m) => {
|
|
2570
|
+
const w = ((b == null ? void 0 : b.width) || 0) + 2 * $t, C = ((b == null ? void 0 : b.height) || 0) + 2 * $t, l = (o == null ? void 0 : o.clientWidth) || 0, T = (o == null ? void 0 : o.clientHeight) || 0, _ = mo(
|
|
2571
|
+
m,
|
|
2572
|
+
l,
|
|
2573
|
+
T,
|
|
2574
|
+
w,
|
|
2575
|
+
C,
|
|
2576
|
+
p
|
|
2577
|
+
);
|
|
2578
|
+
t(_);
|
|
2569
2579
|
},
|
|
2570
2580
|
[t, b]
|
|
2571
|
-
),
|
|
2572
|
-
(
|
|
2573
|
-
typeof
|
|
2581
|
+
), S = L(
|
|
2582
|
+
(m) => {
|
|
2583
|
+
typeof m == "number" ? t(m) : v(m);
|
|
2574
2584
|
},
|
|
2575
|
-
[t,
|
|
2585
|
+
[t, v]
|
|
2576
2586
|
);
|
|
2577
2587
|
return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: e, setZoomLevel: t }) : r ? /* @__PURE__ */ A("div", { className: Ee["rp-zoom-wrapper"], children: [
|
|
2578
2588
|
/* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2579
2589
|
ne,
|
|
2580
2590
|
{
|
|
2581
|
-
disabled:
|
|
2582
|
-
onClick:
|
|
2591
|
+
disabled: g,
|
|
2592
|
+
onClick: h,
|
|
2583
2593
|
"aria-label": u == null ? void 0 : u.zoomOutTooltip,
|
|
2584
|
-
children: /* @__PURE__ */ i(
|
|
2594
|
+
children: /* @__PURE__ */ i(Di, {})
|
|
2585
2595
|
}
|
|
2586
2596
|
) }),
|
|
2587
2597
|
!d && /* @__PURE__ */ i(
|
|
@@ -2603,26 +2613,26 @@ const ye = {
|
|
|
2603
2613
|
style: { minWidth: "200px" },
|
|
2604
2614
|
align: "center",
|
|
2605
2615
|
children: /* @__PURE__ */ A("div", { className: Ee["rp-zoom-dropdown-content"], children: [
|
|
2606
|
-
/* @__PURE__ */ A(
|
|
2607
|
-
/* @__PURE__ */ i(ve, { onClick: () =>
|
|
2608
|
-
/* @__PURE__ */ i(ve, { onClick: () =>
|
|
2609
|
-
/* @__PURE__ */ i(ve, { onClick: () =>
|
|
2616
|
+
/* @__PURE__ */ A(je, { children: [
|
|
2617
|
+
/* @__PURE__ */ i(ve, { onClick: () => S(at.ACTUAL), children: u == null ? void 0 : u.zoomActualSize }),
|
|
2618
|
+
/* @__PURE__ */ i(ve, { onClick: () => S(at.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
|
|
2619
|
+
/* @__PURE__ */ i(ve, { onClick: () => S(at.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
|
|
2610
2620
|
] }),
|
|
2611
2621
|
/* @__PURE__ */ i(It, {}),
|
|
2612
|
-
/* @__PURE__ */ i(
|
|
2613
|
-
|
|
2622
|
+
/* @__PURE__ */ i(je, { children: Ni.map((m) => /* @__PURE__ */ A(ve, { onClick: () => S(m), children: [
|
|
2623
|
+
m,
|
|
2614
2624
|
" %"
|
|
2615
|
-
] },
|
|
2625
|
+
] }, m)) })
|
|
2616
2626
|
] })
|
|
2617
2627
|
}
|
|
2618
2628
|
),
|
|
2619
2629
|
/* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
2620
2630
|
ne,
|
|
2621
2631
|
{
|
|
2622
|
-
disabled:
|
|
2623
|
-
onClick:
|
|
2632
|
+
disabled: P,
|
|
2633
|
+
onClick: f,
|
|
2624
2634
|
"aria-label": u == null ? void 0 : u.zoomInTooltip,
|
|
2625
|
-
children: /* @__PURE__ */ i(
|
|
2635
|
+
children: /* @__PURE__ */ i(Oi, {})
|
|
2626
2636
|
}
|
|
2627
2637
|
) })
|
|
2628
2638
|
] }) : null;
|
|
@@ -2651,23 +2661,23 @@ const ye = {
|
|
|
2651
2661
|
] });
|
|
2652
2662
|
}, cn = () => {
|
|
2653
2663
|
const { searchIcon: e } = ue();
|
|
2654
|
-
return e || /* @__PURE__ */ i(
|
|
2655
|
-
},
|
|
2664
|
+
return e || /* @__PURE__ */ i(fo, {});
|
|
2665
|
+
}, Ai = () => {
|
|
2656
2666
|
const { container: e } = we(), [t, n] = H(!1), { pdf: o } = X(), [r, a] = H(null), {
|
|
2657
2667
|
searchOptions: c,
|
|
2658
2668
|
setSearchOptions: s,
|
|
2659
2669
|
loading: d,
|
|
2660
2670
|
setSearch: u,
|
|
2661
2671
|
totalMatches: p,
|
|
2662
|
-
currentMatchPosition:
|
|
2672
|
+
currentMatchPosition: f,
|
|
2663
2673
|
nextMatch: h,
|
|
2664
|
-
prevMatch:
|
|
2665
|
-
search:
|
|
2666
|
-
} = Lt(), { searchTool:
|
|
2674
|
+
prevMatch: g,
|
|
2675
|
+
search: P
|
|
2676
|
+
} = Lt(), { searchTool: b = !0 } = fe(), [v, S] = H(P), { localeMessages: m } = se(), { isSmallScreen: w } = be(), C = L(() => {
|
|
2667
2677
|
n(!0);
|
|
2668
2678
|
}, []), l = L(() => {
|
|
2669
|
-
u(""),
|
|
2670
|
-
}, [u]),
|
|
2679
|
+
u(""), S(""), n(!1);
|
|
2680
|
+
}, [u]), T = (x) => {
|
|
2671
2681
|
const k = x.key === "Enter", $ = x.key === " ";
|
|
2672
2682
|
(k || $) && l();
|
|
2673
2683
|
}, _ = L(
|
|
@@ -2677,9 +2687,9 @@ const ye = {
|
|
|
2677
2687
|
[t]
|
|
2678
2688
|
), y = L(
|
|
2679
2689
|
(x) => {
|
|
2680
|
-
x.shiftKey && x.key === "Enter" ?
|
|
2690
|
+
x.shiftKey && x.key === "Enter" ? g() : x.key === "Enter" && P !== v ? u(v) : x.key === "Enter" && h();
|
|
2681
2691
|
},
|
|
2682
|
-
[
|
|
2692
|
+
[v, g, h, u, P]
|
|
2683
2693
|
);
|
|
2684
2694
|
F(() => (window.addEventListener("keydown", _), () => {
|
|
2685
2695
|
window.removeEventListener("keydown", _);
|
|
@@ -2687,10 +2697,10 @@ const ye = {
|
|
|
2687
2697
|
r && r.focus();
|
|
2688
2698
|
}, [r]);
|
|
2689
2699
|
const E = L((x) => {
|
|
2690
|
-
|
|
2700
|
+
S(x.target.value);
|
|
2691
2701
|
}, []), I = L(() => {
|
|
2692
|
-
|
|
2693
|
-
}, [u]), N = M(() => `${
|
|
2702
|
+
S(""), u("");
|
|
2703
|
+
}, [u]), N = M(() => `${f} / ${p}`, [f, p]), { wholeWords: R, matchCase: z } = M(() => c, [c]), O = L(
|
|
2694
2704
|
(x) => {
|
|
2695
2705
|
s((k) => ({ ...k, matchCase: x }));
|
|
2696
2706
|
},
|
|
@@ -2703,55 +2713,55 @@ const ye = {
|
|
|
2703
2713
|
);
|
|
2704
2714
|
return F(() => {
|
|
2705
2715
|
l();
|
|
2706
|
-
}, [o, l]),
|
|
2716
|
+
}, [o, l]), b ? /* @__PURE__ */ i(_e, { children: /* @__PURE__ */ i(
|
|
2707
2717
|
Ar,
|
|
2708
2718
|
{
|
|
2709
2719
|
open: t,
|
|
2710
2720
|
container: e,
|
|
2711
|
-
triggerComponent: /* @__PURE__ */ i(Z, { content:
|
|
2721
|
+
triggerComponent: /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(ne, { onClick: C, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(cn, {}) }) }),
|
|
2712
2722
|
children: /* @__PURE__ */ A("div", { className: K["rp-search-tool-content"], children: [
|
|
2713
2723
|
/* @__PURE__ */ A("div", { className: K["rp-search-tool-input-wrapper"], children: [
|
|
2714
2724
|
/* @__PURE__ */ A("div", { className: K["rp-search-tool-input"], children: [
|
|
2715
|
-
/* @__PURE__ */ i(Z, { content:
|
|
2725
|
+
/* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
2716
2726
|
un,
|
|
2717
2727
|
{
|
|
2718
|
-
value:
|
|
2728
|
+
value: v,
|
|
2719
2729
|
onKeyDown: y,
|
|
2720
2730
|
onChange: E,
|
|
2721
2731
|
icon: /* @__PURE__ */ i(cn, {}),
|
|
2722
|
-
placeholder:
|
|
2732
|
+
placeholder: m == null ? void 0 : m.searchInputPlaceholder,
|
|
2723
2733
|
className: K["rp-search-input"],
|
|
2724
2734
|
ref: a,
|
|
2725
|
-
children: !!
|
|
2735
|
+
children: !!v && /* @__PURE__ */ i("span", { className: K["rp-search-tool-input-clear"], onClick: I, children: /* @__PURE__ */ i(go, {}) })
|
|
2726
2736
|
}
|
|
2727
2737
|
) }),
|
|
2728
2738
|
d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Pt, { className: K["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: N }),
|
|
2729
|
-
w && /* @__PURE__ */ i("div", { className: K["rp-search-tool-controls"], children: /* @__PURE__ */ i(Gt, { onKeyPress:
|
|
2739
|
+
w && /* @__PURE__ */ i("div", { className: K["rp-search-tool-controls"], children: /* @__PURE__ */ i(Gt, { onKeyPress: T, handleClose: l }) })
|
|
2730
2740
|
] }),
|
|
2731
2741
|
/* @__PURE__ */ A("div", { className: K["rp-search-tool-input-checkboxes"], children: [
|
|
2732
2742
|
w && /* @__PURE__ */ i(sn, {}),
|
|
2733
|
-
/* @__PURE__ */ i(Vt, { name: "matchCase", value: z, onChange: O, children:
|
|
2734
|
-
!w && /* @__PURE__ */ i(Z, { content:
|
|
2735
|
-
/* @__PURE__ */ i(Vt, { name: "wholeWord", value: R, onChange: D, children:
|
|
2736
|
-
!w && /* @__PURE__ */ i(Z, { content:
|
|
2743
|
+
/* @__PURE__ */ i(Vt, { name: "matchCase", value: z, onChange: O, children: m == null ? void 0 : m.searchMatchCaseLabel }),
|
|
2744
|
+
!w && /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: K["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Ut, {}) }) }),
|
|
2745
|
+
/* @__PURE__ */ i(Vt, { name: "wholeWord", value: R, onChange: D, children: m == null ? void 0 : m.searchWholeWordsLabel }),
|
|
2746
|
+
!w && /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: K["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Ut, {}) }) })
|
|
2737
2747
|
] })
|
|
2738
2748
|
] }),
|
|
2739
2749
|
!w && /* @__PURE__ */ A("div", { className: K["rp-search-tool-controls"], children: [
|
|
2740
2750
|
/* @__PURE__ */ i(sn, {}),
|
|
2741
|
-
/* @__PURE__ */ i(Gt, { onKeyPress:
|
|
2751
|
+
/* @__PURE__ */ i(Gt, { onKeyPress: T, handleClose: l })
|
|
2742
2752
|
] })
|
|
2743
2753
|
] })
|
|
2744
2754
|
}
|
|
2745
2755
|
) }) : null;
|
|
2746
|
-
},
|
|
2756
|
+
}, Fi = "_loading_vpexk_1", Ne = {
|
|
2747
2757
|
"rp-loading-overlay": "_rp-loading-overlay_vpexk_1",
|
|
2748
2758
|
"rp-loading-modal": "_rp-loading-modal_vpexk_14",
|
|
2749
2759
|
"rp-loading-title": "_rp-loading-title_vpexk_27",
|
|
2750
2760
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_vpexk_35",
|
|
2751
2761
|
"rp-loading-progress": "_rp-loading-progress_vpexk_35",
|
|
2752
2762
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_vpexk_55",
|
|
2753
|
-
loading:
|
|
2754
|
-
},
|
|
2763
|
+
loading: Fi
|
|
2764
|
+
}, ki = ({ percentage: e }) => {
|
|
2755
2765
|
const { cancel: t } = nt(), { localeMessages: n } = se();
|
|
2756
2766
|
return e < 1 ? null : /* @__PURE__ */ i("div", { className: te(Ne["rp-loading-overlay"]), children: /* @__PURE__ */ A("div", { className: te(Ne["rp-loading-modal"]), children: [
|
|
2757
2767
|
/* @__PURE__ */ A("div", { className: te(Ne["rp-loading-title"]), children: [
|
|
@@ -2767,18 +2777,18 @@ const ye = {
|
|
|
2767
2777
|
) }),
|
|
2768
2778
|
/* @__PURE__ */ i("button", { className: te(Ne["rp-loading-cancel-button"]), onClick: t, children: n == null ? void 0 : n.printCancelLabel })
|
|
2769
2779
|
] }) });
|
|
2770
|
-
},
|
|
2780
|
+
}, Mi = We((e, t) => {
|
|
2771
2781
|
const { showPrintProgress: n } = fe(), { progress: o } = nt(), { isSmallScreen: r } = be(), { percentage: a } = o || {}, c = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2772
2782
|
return /* @__PURE__ */ A("div", { children: [
|
|
2773
2783
|
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: t, className: Ae["rp-toolbar-content"], children: /* @__PURE__ */ A("div", { className: Ae["rp-toolbar-wrapper"], style: c(), children: [
|
|
2774
2784
|
/* @__PURE__ */ A("div", { "data-rp": "topBarLeft", className: Ae["rp-toolbar-start"], children: [
|
|
2775
|
-
/* @__PURE__ */ i(
|
|
2776
|
-
/* @__PURE__ */ i(
|
|
2785
|
+
/* @__PURE__ */ i(Ai, {}),
|
|
2786
|
+
/* @__PURE__ */ i(Qo, {})
|
|
2777
2787
|
] }),
|
|
2778
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ae["rp-toolbar-middle"], children: /* @__PURE__ */ i(
|
|
2779
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ae["rp-toolbar-end"], children: /* @__PURE__ */ i(
|
|
2788
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ae["rp-toolbar-middle"], children: /* @__PURE__ */ i(zi, {}) }),
|
|
2789
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ae["rp-toolbar-end"], children: /* @__PURE__ */ i(Ri, {}) })
|
|
2780
2790
|
] }) }),
|
|
2781
|
-
n && a ? /* @__PURE__ */ i(
|
|
2791
|
+
n && a ? /* @__PURE__ */ i(ki, { percentage: a }) : null
|
|
2782
2792
|
] });
|
|
2783
2793
|
}), vt = {
|
|
2784
2794
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
@@ -2791,7 +2801,7 @@ const ye = {
|
|
|
2791
2801
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2792
2802
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2793
2803
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2794
|
-
},
|
|
2804
|
+
}, Wi = (e) => {
|
|
2795
2805
|
const { thumbnailSrc: t, pageNumber: n, isFocused: o, viewport: r } = e, { goToPage: a } = oe(), c = M(() => o ? Fe["rp-thumbnail-active"] : "", [o]), s = M(() => ({
|
|
2796
2806
|
width: Math.round(r.width),
|
|
2797
2807
|
height: Math.round(r.height)
|
|
@@ -2831,36 +2841,36 @@ const ye = {
|
|
|
2831
2841
|
}, ln = {
|
|
2832
2842
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2833
2843
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2834
|
-
},
|
|
2844
|
+
}, Hi = 16, $i = (e, t) => {
|
|
2835
2845
|
const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
|
|
2836
|
-
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
2837
|
-
},
|
|
2846
|
+
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Hi);
|
|
2847
|
+
}, Gi = We((e, t) => {
|
|
2838
2848
|
const { show: n } = e, { focusedPage: o, totalPages: r } = oe(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: d } = yn(), u = W(null), p = W(1);
|
|
2839
2849
|
dn(t, () => u.current);
|
|
2840
|
-
const
|
|
2841
|
-
const
|
|
2842
|
-
|
|
2850
|
+
const f = M(() => Object.values(a), [a]), h = L(() => {
|
|
2851
|
+
const g = s + 1;
|
|
2852
|
+
g <= r && c(g);
|
|
2843
2853
|
}, [c, r, s]);
|
|
2844
2854
|
return F(() => {
|
|
2845
|
-
o > s ? d(o) : n && p.current !== o && (
|
|
2846
|
-
}, [o, s, d, n,
|
|
2847
|
-
var
|
|
2855
|
+
o > s ? d(o) : n && p.current !== o && ($i(u.current, o), p.current = o);
|
|
2856
|
+
}, [o, s, d, n, f]), wr(u.current, h), /* @__PURE__ */ i("div", { ref: u, className: ln["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: ln["rp-thumbnails"], children: n ? f.map((g, P) => {
|
|
2857
|
+
var b, v;
|
|
2848
2858
|
return /* @__PURE__ */ i(
|
|
2849
|
-
|
|
2859
|
+
Wi,
|
|
2850
2860
|
{
|
|
2851
|
-
isFocused: o === ((
|
|
2852
|
-
pageNumber: (
|
|
2853
|
-
thumbnailSrc:
|
|
2854
|
-
loading:
|
|
2855
|
-
viewport:
|
|
2861
|
+
isFocused: o === ((b = g.page) == null ? void 0 : b.pageNumber),
|
|
2862
|
+
pageNumber: (v = g.page) == null ? void 0 : v.pageNumber,
|
|
2863
|
+
thumbnailSrc: g.thumbnailSrc,
|
|
2864
|
+
loading: g.loading,
|
|
2865
|
+
viewport: g.viewport
|
|
2856
2866
|
},
|
|
2857
|
-
|
|
2867
|
+
P
|
|
2858
2868
|
);
|
|
2859
2869
|
}) : null }) });
|
|
2860
|
-
}),
|
|
2870
|
+
}), Vi = () => {
|
|
2861
2871
|
const { thumbnailIcon: e } = ue();
|
|
2862
2872
|
return e || /* @__PURE__ */ i(_r, {});
|
|
2863
|
-
},
|
|
2873
|
+
}, Ui = () => {
|
|
2864
2874
|
const { active: e, setActive: t } = yn(), [n, o] = H(200), r = W(null), { thumbnailTool: a, sidebarEnable: c } = fe(), { localeMessages: s } = se(), d = L(() => {
|
|
2865
2875
|
t((p) => !p);
|
|
2866
2876
|
}, []), u = M(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: e }) : a ? /* @__PURE__ */ i(Z, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
@@ -2869,7 +2879,7 @@ const ye = {
|
|
|
2869
2879
|
onClick: d,
|
|
2870
2880
|
active: e,
|
|
2871
2881
|
"aria-label": s == null ? void 0 : s.thumbnailTooltip,
|
|
2872
|
-
children: /* @__PURE__ */ i(
|
|
2882
|
+
children: /* @__PURE__ */ i(Vi, {})
|
|
2873
2883
|
}
|
|
2874
2884
|
) }) : null, [a, e, d, s]);
|
|
2875
2885
|
return /* @__PURE__ */ i(_e, { children: c && /* @__PURE__ */ A(
|
|
@@ -2887,7 +2897,7 @@ const ye = {
|
|
|
2887
2897
|
hidden: !e,
|
|
2888
2898
|
className: vt["rp-thumbnails-wrapper"],
|
|
2889
2899
|
children: [
|
|
2890
|
-
/* @__PURE__ */ i(
|
|
2900
|
+
/* @__PURE__ */ i(Gi, { show: e, ref: r }),
|
|
2891
2901
|
/* @__PURE__ */ i(br, { onWidthChange: o, thumbnailRef: r })
|
|
2892
2902
|
]
|
|
2893
2903
|
}
|
|
@@ -2896,14 +2906,14 @@ const ye = {
|
|
|
2896
2906
|
}
|
|
2897
2907
|
) });
|
|
2898
2908
|
}, ge = {
|
|
2899
|
-
"rp-layout": "_rp-
|
|
2900
|
-
"rp-content": "_rp-
|
|
2901
|
-
"rp-pages": "_rp-
|
|
2902
|
-
"rp-container": "_rp-
|
|
2903
|
-
"rp-loader": "_rp-
|
|
2904
|
-
"rp-theme-variables": "_rp-theme-
|
|
2905
|
-
"rp-dark-mode": "_rp-dark-
|
|
2906
|
-
},
|
|
2909
|
+
"rp-layout": "_rp-layout_vutcr_1",
|
|
2910
|
+
"rp-content": "_rp-content_vutcr_5",
|
|
2911
|
+
"rp-pages": "_rp-pages_vutcr_11",
|
|
2912
|
+
"rp-container": "_rp-container_vutcr_16",
|
|
2913
|
+
"rp-loader": "_rp-loader_vutcr_52",
|
|
2914
|
+
"rp-theme-variables": "_rp-theme-variables_vutcr_56",
|
|
2915
|
+
"rp-dark-mode": "_rp-dark-mode_vutcr_151"
|
|
2916
|
+
}, qi = We(
|
|
2907
2917
|
(e, t) => {
|
|
2908
2918
|
const { children: n, toolbarRef: o, style: r, className: a } = e, { customVariables: c, customDarkVariables: s } = Ir(), { darkMode: d } = or();
|
|
2909
2919
|
return /* @__PURE__ */ i(
|
|
@@ -2926,7 +2936,7 @@ const ye = {
|
|
|
2926
2936
|
}
|
|
2927
2937
|
);
|
|
2928
2938
|
}
|
|
2929
|
-
),
|
|
2939
|
+
), As = We((e, t) => {
|
|
2930
2940
|
const {
|
|
2931
2941
|
children: n,
|
|
2932
2942
|
slots: o,
|
|
@@ -2937,21 +2947,21 @@ const ye = {
|
|
|
2937
2947
|
onLoaded: d,
|
|
2938
2948
|
cleanupOnLoaded: u,
|
|
2939
2949
|
onLayoutWidthChange: p
|
|
2940
|
-
} = e, [
|
|
2950
|
+
} = e, [f, h] = H(null), { setContainer: g, setContentRef: P } = we(), { loading: b } = X(), { LoaderImageComponent: v } = gn();
|
|
2941
2951
|
return F(() => (d && d(), () => {
|
|
2942
2952
|
u && u();
|
|
2943
|
-
}), [d, u]), /* @__PURE__ */ i(
|
|
2953
|
+
}), [d, u]), /* @__PURE__ */ i(qi, { toolbarRef: f, ref: t, children: /* @__PURE__ */ i(xr, { mobileWidth: s, onLayoutWidthChange: p, children: /* @__PURE__ */ i(Cr, { slots: o, children: /* @__PURE__ */ i(Tr, { icons: r, children: /* @__PURE__ */ A(Pr, { getContainerRef: g, style: a, className: c, children: [
|
|
2944
2954
|
/* @__PURE__ */ A(Sr, { children: [
|
|
2945
2955
|
/* @__PURE__ */ A("div", { className: ge["rp-layout"], children: [
|
|
2946
|
-
/* @__PURE__ */ i(
|
|
2956
|
+
/* @__PURE__ */ i(Mi, { ref: h }),
|
|
2947
2957
|
/* @__PURE__ */ A("div", { className: ge["rp-content"], children: [
|
|
2948
|
-
/* @__PURE__ */ i("div", { className: ge["rp-sidebar"], children: /* @__PURE__ */ i(
|
|
2949
|
-
/* @__PURE__ */ i("div", { ref:
|
|
2958
|
+
/* @__PURE__ */ i("div", { className: ge["rp-sidebar"], children: /* @__PURE__ */ i(Ui, {}) }),
|
|
2959
|
+
/* @__PURE__ */ i("div", { ref: P, className: ge["rp-pages"], children: n })
|
|
2950
2960
|
] })
|
|
2951
2961
|
] }),
|
|
2952
2962
|
/* @__PURE__ */ i(yr, {})
|
|
2953
2963
|
] }),
|
|
2954
|
-
|
|
2964
|
+
b ? /* @__PURE__ */ i(
|
|
2955
2965
|
"div",
|
|
2956
2966
|
{
|
|
2957
2967
|
className: ge["rp-loader"],
|
|
@@ -2974,7 +2984,7 @@ const ye = {
|
|
|
2974
2984
|
height: "100%",
|
|
2975
2985
|
width: "100%"
|
|
2976
2986
|
},
|
|
2977
|
-
children:
|
|
2987
|
+
children: v && /* @__PURE__ */ i(v, {})
|
|
2978
2988
|
}
|
|
2979
2989
|
)
|
|
2980
2990
|
}
|
|
@@ -2982,49 +2992,49 @@ const ye = {
|
|
|
2982
2992
|
] }) }) }) }) });
|
|
2983
2993
|
});
|
|
2984
2994
|
export {
|
|
2985
|
-
|
|
2995
|
+
Io as A,
|
|
2986
2996
|
sn as B,
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2997
|
+
Co as C,
|
|
2998
|
+
Bo as D,
|
|
2999
|
+
Ai as E,
|
|
2990
3000
|
Bn as F,
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3001
|
+
Mi as G,
|
|
3002
|
+
Wi as H,
|
|
3003
|
+
Gi as I,
|
|
3004
|
+
Ui as J,
|
|
3005
|
+
qi as K,
|
|
3006
|
+
ki as L,
|
|
3007
|
+
Ii as M,
|
|
3008
|
+
Li as O,
|
|
3009
|
+
Ls as P,
|
|
3010
|
+
Os as R,
|
|
3011
|
+
Ns as S,
|
|
3012
|
+
Es as T,
|
|
3013
|
+
zi as Z,
|
|
3014
|
+
Rs as a,
|
|
3015
|
+
As as b,
|
|
3006
3016
|
Un as c,
|
|
3007
3017
|
nt as d,
|
|
3008
3018
|
Lt as e,
|
|
3009
3019
|
Cn as f,
|
|
3010
|
-
|
|
3020
|
+
vo as g,
|
|
3011
3021
|
Tn as h,
|
|
3012
|
-
|
|
3022
|
+
_o as i,
|
|
3013
3023
|
Pn as j,
|
|
3014
|
-
|
|
3024
|
+
wo as k,
|
|
3015
3025
|
Sn as l,
|
|
3016
3026
|
yn as m,
|
|
3017
|
-
|
|
3027
|
+
bo as n,
|
|
3018
3028
|
xn as o,
|
|
3019
|
-
|
|
3020
|
-
|
|
3029
|
+
So as p,
|
|
3030
|
+
Lo as q,
|
|
3021
3031
|
Rt as r,
|
|
3022
|
-
|
|
3023
|
-
|
|
3032
|
+
Uo as s,
|
|
3033
|
+
jo as t,
|
|
3024
3034
|
oe as u,
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3035
|
+
Ko as v,
|
|
3036
|
+
Qo as w,
|
|
3037
|
+
gi as x,
|
|
3028
3038
|
Xn as y,
|
|
3029
|
-
|
|
3039
|
+
Ri as z
|
|
3030
3040
|
};
|