@pdf-viewer/react 1.8.4-rc.0 → 1.8.4-rc.2

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.
Files changed (43) hide show
  1. package/dist/{RPDefaultLayout-a85a421b.js → RPDefaultLayout-77e14344.js} +790 -788
  2. package/dist/components/RPController.js +1 -1
  3. package/dist/components/RPPages.js +1 -1
  4. package/dist/components/layout/LayoutContainer.js +1 -1
  5. package/dist/components/layout/RPDefaultLayout.js +1 -1
  6. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  7. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  8. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  9. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  10. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  11. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  12. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  13. package/dist/components/layout/toolbar/Paginate.js +1 -1
  14. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  15. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  16. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  17. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  18. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  19. package/dist/components/layout/toolbar/ZoomTool.js +1 -1
  20. package/dist/components/page/AnnotationLayer.js +1 -1
  21. package/dist/components/page/CanvasLayer.js +1 -1
  22. package/dist/components/page/DualPage.js +1 -1
  23. package/dist/components/page/RPPage.js +1 -1
  24. package/dist/components/page/SinglePage.js +1 -1
  25. package/dist/components/page/TextHighlightLayer.js +1 -1
  26. package/dist/components/page/TextLayer.js +1 -1
  27. package/dist/components/ui/LoadingIndicator.js +1 -1
  28. package/dist/contexts/PaginationContext.js +1 -1
  29. package/dist/contexts/PrintContext.js +1 -1
  30. package/dist/contexts/RenderQueueProvider.js +1 -1
  31. package/dist/contexts/SearchContext.js +1 -1
  32. package/dist/contexts/ThumbnailsContext.js +1 -1
  33. package/dist/main.js +1 -1
  34. package/dist/utils/hooks/useFileDownload.js +1 -1
  35. package/dist/utils/hooks/useLicense.js +1 -1
  36. package/dist/utils/hooks/usePaginate.js +1 -1
  37. package/dist/utils/hooks/usePresentPage.js +1 -1
  38. package/dist/utils/hooks/usePrint.js +1 -1
  39. package/dist/utils/hooks/useScrollToPage.js +1 -1
  40. package/dist/utils/hooks/useSearch.js +1 -1
  41. package/dist/utils/hooks/useThumbnail.js +1 -1
  42. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  43. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { jsx as i, Fragment as me, jsxs as M } from "react/jsx-runtime";
1
+ import { jsx as a, Fragment as me, jsxs as M } from "react/jsx-runtime";
2
2
  import * as j from "react";
3
- import { useRef as $, useEffect as z, useCallback as E, useState as G, useMemo as W, createContext as $e, useContext as Ge, useImperativeHandle as cn, createElement as Ze, PureComponent as tr, Component as nr, memo as ln } from "react";
3
+ import { useRef as H, useEffect as z, useCallback as E, useState as G, useMemo as W, createContext as $e, useContext as Ge, useImperativeHandle as cn, createElement as Ze, PureComponent as tr, Component as nr, memo as ln } from "react";
4
4
  import { ChevronUpIcon as He } from "./components/icons/ChevronUpIcon.js";
5
5
  import { UIButton as ie } from "./components/ui/Button.js";
6
6
  import { UIInput as dn } from "./components/ui/Input.js";
@@ -97,20 +97,20 @@ import { UICheckbox as $t } from "./components/ui/Checkbox.js";
97
97
  import { ClearIcon as xo } from "./components/icons/ClearIcon.js";
98
98
  import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
99
99
  import './assets/RPDefaultLayout.css';const vn = () => {
100
- const { viewMode: t } = Oe(), { scrollMode: e } = Ne(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = oe(), s = $(), { columnCount: l } = un(), { widths: u, heights: d } = qe(), m = $(e), b = $(t), h = $(l), { targetScrollPage: w } = pn();
100
+ const { viewMode: t } = Oe(), { scrollMode: e } = Ne(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: i } = oe(), s = H(), { columnCount: l } = un(), { widths: d, heights: u } = qe(), m = H(e), P = H(t), h = H(l), { targetScrollPage: b } = pn();
101
101
  z(() => {
102
102
  n != null && n.scrollToItem && (s.current = n);
103
103
  }, [n]), z(() => {
104
- m.current = e, b.current = t;
104
+ m.current = e, P.current = t;
105
105
  }, [e, t]);
106
106
  const C = E(
107
- (_, S) => {
107
+ (w, S) => {
108
108
  if (!r)
109
109
  return;
110
- const f = Math.ceil(_ / 2) * 2 - 1;
111
- if (_ === f + 1) {
110
+ const f = Math.ceil(w / 2) * 2 - 1;
111
+ if (w === f + 1) {
112
112
  const g = {
113
- left: u[f],
113
+ left: d[f],
114
114
  top: 0
115
115
  };
116
116
  return new Promise(
@@ -126,32 +126,32 @@ import './assets/RPDefaultLayout.css';const vn = () => {
126
126
  behavior: S
127
127
  });
128
128
  },
129
- [r, u, ct]
129
+ [r, d, ct]
130
130
  );
131
131
  return z(() => {
132
- m.current = e, b.current = t;
132
+ m.current = e, P.current = t;
133
133
  }, [e, t]), z(() => {
134
134
  h.current = l;
135
135
  }, [l]), { scrollToPage: E(
136
- (_, S = "smooth") => {
137
- a(_);
138
- const f = _ - 1;
136
+ (w, S = "smooth") => {
137
+ i(w);
138
+ const f = w - 1;
139
139
  let p = f, g = 0;
140
- if (b.current === Le.DUAL_PAGE && m.current === ne.PAGE_SCROLLING) {
141
- C(_, S);
140
+ if (P.current === Le.DUAL_PAGE && m.current === ne.PAGE_SCROLLING) {
141
+ C(w, S);
142
142
  return;
143
143
  }
144
144
  if (m.current === ne.PAGE_SCROLLING) {
145
- a(_);
145
+ i(w);
146
146
  return;
147
147
  }
148
148
  if (!s.current || !o)
149
149
  return;
150
150
  const c = o;
151
- if (w.current = _, m.current === ne.HORIZONTAL_SCROLLING) {
151
+ if (b.current = w, m.current === ne.HORIZONTAL_SCROLLING) {
152
152
  g = f;
153
153
  const T = {
154
- left: Ae(u, g),
154
+ left: Ae(d, g),
155
155
  top: 0
156
156
  };
157
157
  return c.scrollTo({
@@ -159,23 +159,23 @@ import './assets/RPDefaultLayout.css';const vn = () => {
159
159
  behavior: S
160
160
  });
161
161
  }
162
- if (b.current === Le.DUAL_PAGE) {
162
+ if (P.current === Le.DUAL_PAGE) {
163
163
  g = f % 2, p = Math.floor(f / 2);
164
164
  const T = {
165
- left: Ae(u, g),
166
- top: Ae(d, p)
165
+ left: Ae(d, g),
166
+ top: Ae(u, p)
167
167
  };
168
168
  return c.scrollTo({
169
169
  ...T,
170
170
  behavior: S
171
171
  });
172
172
  }
173
- const P = {
173
+ const _ = {
174
174
  left: 0,
175
- top: Ae(d, p)
175
+ top: Ae(u, p)
176
176
  };
177
177
  return c.scrollTo({
178
- ...P,
178
+ ..._,
179
179
  behavior: S
180
180
  });
181
181
  },
@@ -183,14 +183,14 @@ import './assets/RPDefaultLayout.css';const vn = () => {
183
183
  o,
184
184
  l,
185
185
  C,
186
- a,
186
+ i,
187
187
  ct,
188
- d,
189
- u
188
+ u,
189
+ d
190
190
  ]
191
191
  ) };
192
192
  }, Io = (t = 1) => {
193
- const [e, n] = G(t), [o, r] = G(0), { scrollToPage: a } = vn(), s = $(1), { viewMode: l } = Oe(), { scrollMode: u } = Ne(), { widths: d } = qe(), { pagesRef: m } = ge(), b = Tt(e, 100), h = E(
193
+ const [e, n] = G(t), [o, r] = G(0), { scrollToPage: i } = vn(), s = H(1), { viewMode: l } = Oe(), { scrollMode: d } = Ne(), { widths: u } = qe(), { pagesRef: m } = ge(), P = Tt(e, 100), h = E(
194
194
  (p) => {
195
195
  if (!/^[0-9]*$/g.test(p.toString()) || !p)
196
196
  return { success: !1, currentPage: s.current };
@@ -198,34 +198,34 @@ import './assets/RPDefaultLayout.css';const vn = () => {
198
198
  return c < 0 || c > o ? { success: !1, currentPage: s.current } : (n(c), s.current = c, { success: !0, currentPage: +p });
199
199
  },
200
200
  [o]
201
- ), w = E(h, [h]), C = E(
201
+ ), b = E(h, [h]), C = E(
202
202
  (p) => {
203
203
  const g = h(p);
204
- return g.success && a(g.currentPage), g;
204
+ return g.success && i(g.currentPage), g;
205
205
  },
206
- [h, a]
206
+ [h, i]
207
207
  ), y = E((p) => {
208
208
  const g = p % 2 === 1;
209
209
  if (!m || g)
210
210
  return !1;
211
- const c = g ? d[p] : d[p - 1], P = g ? d[p + 1] : d[p];
212
- return l === Le.DUAL_PAGE && c + P < m.clientWidth;
213
- }, [l, d, m, o]), _ = E(() => {
211
+ const c = g ? u[p] : u[p - 1], _ = g ? u[p + 1] : u[p];
212
+ return l === Le.DUAL_PAGE && c + _ < m.clientWidth;
213
+ }, [l, u, m, o]), w = E(() => {
214
214
  let p = e - 1;
215
215
  y(p) && (p = e - 2), C(p);
216
- }, [C, e, l, u, y]), S = W(() => l === Le.DUAL_PAGE && u === ne.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, l, u]), f = E(() => {
216
+ }, [C, e, l, d, y]), S = W(() => l === Le.DUAL_PAGE && d === ne.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, l, d]), f = E(() => {
217
217
  if (S)
218
218
  return;
219
219
  let p = e + 1;
220
220
  y(p) && (p = e + 2), C(p);
221
- }, [C, e, y, l, u, S]);
221
+ }, [C, e, y, l, d, S]);
222
222
  return {
223
- focusedPage: b,
223
+ focusedPage: P,
224
224
  totalPages: o,
225
- setFocusedPage: w,
225
+ setFocusedPage: b,
226
226
  setTotalPages: r,
227
227
  nextPage: f,
228
- prevPage: _,
228
+ prevPage: w,
229
229
  goToPage: C
230
230
  };
231
231
  }, wn = $e({
@@ -244,19 +244,19 @@ import './assets/RPDefaultLayout.css';const vn = () => {
244
244
  const t = Ge(wn);
245
245
  return typeof (t == null ? void 0 : t.focusedPage) > "u" && Qr.error("Please use this hooks inside children component of RPProvider"), t;
246
246
  }, Bs = ({ children: t }) => {
247
- const { pdf: e } = J(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: s, nextPage: l, prevPage: u } = Io();
247
+ const { pdf: e } = J(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: i, goToPage: s, nextPage: l, prevPage: d } = Io();
248
248
  return z(() => {
249
- e != null && e.numPages && (a(e.numPages), r(1));
250
- }, [e, a, r]), /* @__PURE__ */ i(
249
+ e != null && e.numPages && (i(e.numPages), r(1));
250
+ }, [e, i, r]), /* @__PURE__ */ a(
251
251
  wn.Provider,
252
252
  {
253
253
  value: {
254
254
  focusedPage: n,
255
255
  totalPages: o,
256
256
  setFocusedPage: r,
257
- setTotalPages: a,
257
+ setTotalPages: i,
258
258
  nextPage: l,
259
- prevPage: u,
259
+ prevPage: d,
260
260
  goToPage: s
261
261
  },
262
262
  children: t
@@ -268,27 +268,27 @@ const Ro = () => {
268
268
  loadedPages: 0,
269
269
  totalPages: 0,
270
270
  percentage: 0
271
- }), [r, a] = G(!1), [s, l] = G(!1), [u, d] = G(null), m = $(!1);
271
+ }), [r, i] = G(!1), [s, l] = G(!1), [d, u] = G(null), m = H(!1);
272
272
  z(() => {
273
273
  m.current;
274
274
  }, [m]);
275
- const b = E(() => {
275
+ const P = E(() => {
276
276
  document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
277
277
  const p = document.querySelector(".rp-print-zone");
278
278
  p && p.remove();
279
279
  }, []), h = E(() => {
280
- m.current = !1, a(!1), l(!1), d(null), o({
280
+ m.current = !1, i(!1), l(!1), u(null), o({
281
281
  loadedPages: 0,
282
282
  totalPages: 0,
283
283
  percentage: 0
284
284
  });
285
- }, []), w = () => {
285
+ }, []), b = () => {
286
286
  m.current = !0;
287
287
  }, C = async ({
288
288
  scratchCanvas: p,
289
289
  pdfDocument: g,
290
290
  pageNumber: c,
291
- viewerPdfPage: P,
291
+ viewerPdfPage: _,
292
292
  printResolution: v,
293
293
  optionalContentConfigPromise: T,
294
294
  printAnnotationStoragePromise: R
@@ -298,7 +298,7 @@ const Ro = () => {
298
298
  return;
299
299
  }
300
300
  const x = v / Lr.PDF;
301
- p.width = Math.floor(P.width * x), p.height = Math.floor(P.height * x);
301
+ p.width = Math.floor(_.width * x), p.height = Math.floor(_.height * x);
302
302
  const I = p.getContext("2d");
303
303
  I.save(), I.fillStyle = "rgb(255, 255, 255)", I.fillRect(0, 0, p.width, p.height), I.restore();
304
304
  const [O, A] = await Promise.all([
@@ -312,7 +312,7 @@ const Ro = () => {
312
312
  const F = {
313
313
  canvasContext: I,
314
314
  transform: [x, 0, 0, x, 0, 0],
315
- viewport: O.getViewport({ scale: 1, rotation: P.rotation }),
315
+ viewport: O.getViewport({ scale: 1, rotation: _.rotation }),
316
316
  intent: "print",
317
317
  annotationMode: Er.ENABLE_STORAGE,
318
318
  optionalContentConfigPromise: T,
@@ -340,12 +340,12 @@ const Ro = () => {
340
340
  });
341
341
  v.observe(document.body, { childList: !0, subtree: !0 });
342
342
  });
343
- }, []), _ = async (p) => {
343
+ }, []), w = async (p) => {
344
344
  const g = document.createElement("img"), c = document.createElement("div");
345
- return c.classList.add("rp-print-page"), await new Promise((P, v) => {
345
+ return c.classList.add("rp-print-page"), await new Promise((_, v) => {
346
346
  p.toBlob((T) => {
347
347
  T ? (g.src = URL.createObjectURL(T), g.onload = () => {
348
- URL.revokeObjectURL(g.src), P();
348
+ URL.revokeObjectURL(g.src), _();
349
349
  }, g.onerror = v) : v(new Error("Failed to create blob"));
350
350
  });
351
351
  }).catch(() => {
@@ -353,12 +353,12 @@ const Ro = () => {
353
353
  }, S = (p, g) => {
354
354
  const c = document.createElement("div");
355
355
  c.classList.add("rp-print-zone");
356
- const P = document.createElement("style"), v = g.get(1);
356
+ const _ = document.createElement("style"), v = g.get(1);
357
357
  if (v) {
358
358
  const { width: T, height: R } = v == null ? void 0 : v.page.getViewport({ scale: 1 });
359
- P.innerHTML = `@page { size: ${T}px ${R}px }`;
359
+ _.innerHTML = `@page { size: ${T}px ${R}px }`;
360
360
  }
361
- return c.appendChild(P), c.append(...p), c;
361
+ return c.appendChild(_), c.append(...p), c;
362
362
  }, f = E(async () => {
363
363
  if (!t)
364
364
  return;
@@ -366,7 +366,7 @@ const Ro = () => {
366
366
  const p = document.createElement("canvas"), g = [];
367
367
  try {
368
368
  t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
369
- const P = t.getOptionalContentConfig({ intent: "print" }), v = Promise.resolve(
369
+ const _ = t.getOptionalContentConfig({ intent: "print" }), v = Promise.resolve(
370
370
  t.annotationStorage.print ?? void 0
371
371
  ), T = e.size;
372
372
  for (const [x, I] of e) {
@@ -381,13 +381,13 @@ const Ro = () => {
381
381
  pageNumber: x,
382
382
  viewerPdfPage: O,
383
383
  printResolution: 150,
384
- optionalContentConfigPromise: P,
384
+ optionalContentConfigPromise: _,
385
385
  printAnnotationStoragePromise: v
386
386
  }), m.current) {
387
387
  h();
388
388
  return;
389
389
  }
390
- const A = await _(p);
390
+ const A = await w(p);
391
391
  g.push(A);
392
392
  const F = parseFloat((g.length / T * 100).toFixed(2));
393
393
  o({
@@ -401,27 +401,27 @@ const Ro = () => {
401
401
  return;
402
402
  }
403
403
  const R = S(g, e);
404
- document.body.appendChild(R), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await y();
404
+ document.body.appendChild(R), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), i(!0), await y();
405
405
  } catch (c) {
406
- l(!0), c instanceof Error && d(c);
406
+ l(!0), c instanceof Error && u(c);
407
407
  } finally {
408
408
  p.height = 0, p.width = 0;
409
409
  }
410
410
  }, [t, e, m]);
411
411
  return z(() => {
412
412
  const p = () => {
413
- h(), b();
413
+ h(), P();
414
414
  };
415
415
  return window.addEventListener("afterprint", p, !0), () => {
416
416
  window.removeEventListener("afterprint", p, !0);
417
417
  };
418
- }, [b, h]), {
418
+ }, [P, h]), {
419
419
  print: f,
420
- cancel: w,
420
+ cancel: b,
421
421
  progress: n,
422
422
  isComplete: r,
423
423
  isError: s,
424
- error: u
424
+ error: d
425
425
  };
426
426
  }, _n = $e({
427
427
  print: () => {
@@ -441,36 +441,36 @@ const Ro = () => {
441
441
  }
442
442
  }
443
443
  }), Zs = ({ children: t }) => {
444
- const [e, n] = G(null), [o, r] = G(null), { print: a, cancel: s, progress: l, isComplete: u, isError: d, error: m } = Ro(), b = E((_) => {
445
- _ && typeof _ == "function" && r(() => _);
446
- }, []), h = (_) => {
447
- m && _(m);
448
- }, w = E(
449
- (_) => {
450
- n(() => _);
444
+ const [e, n] = G(null), [o, r] = G(null), { print: i, cancel: s, progress: l, isComplete: d, isError: u, error: m } = Ro(), P = E((w) => {
445
+ w && typeof w == "function" && r(() => w);
446
+ }, []), h = (w) => {
447
+ m && w(m);
448
+ }, b = E(
449
+ (w) => {
450
+ n(() => w);
451
451
  },
452
452
  [l, e]
453
453
  );
454
454
  z(() => {
455
- u && o && C();
456
- }, [u, o]), z(() => {
457
- d && h((_) => {
458
- console.error(_);
455
+ d && o && C();
456
+ }, [d, o]), z(() => {
457
+ u && h((w) => {
458
+ console.error(w);
459
459
  });
460
- }, [d]), z(() => {
460
+ }, [u]), z(() => {
461
461
  l && e && e(l);
462
462
  }, [l, e]);
463
463
  const C = () => {
464
464
  o && (o(), r(null));
465
465
  }, y = {
466
- print: a,
466
+ print: i,
467
467
  cancel: s,
468
- setOnProgress: w,
469
- setOnComplete: b,
468
+ setOnProgress: b,
469
+ setOnComplete: P,
470
470
  setOnError: h,
471
471
  progress: l
472
472
  };
473
- return /* @__PURE__ */ i(_n.Provider, { value: y, children: t });
473
+ return /* @__PURE__ */ a(_n.Provider, { value: y, children: t });
474
474
  }, tt = () => {
475
475
  const t = Ge(_n);
476
476
  if (!t)
@@ -481,30 +481,30 @@ const Ro = () => {
481
481
  (s) => {
482
482
  if (!n.size)
483
483
  return;
484
- const l = s > n.size ? n.size : s, d = Array.from(n.values()).slice(0, l).map((m) => {
485
- const { thumbnailViewport: b, scale: h } = Xr(m.page, m.defaultRotation);
484
+ const l = s > n.size ? n.size : s, u = Array.from(n.values()).slice(0, l).map((m) => {
485
+ const { thumbnailViewport: P, scale: h } = Xr(m.page, m.defaultRotation);
486
486
  return {
487
487
  scale: h,
488
488
  page: m.page,
489
489
  loading: !0,
490
- viewport: b,
490
+ viewport: P,
491
491
  defaultRotation: m.defaultRotation
492
492
  };
493
- }).reduce((m, b) => (m[b.page.pageNumber] = b, m), {});
494
- e(d);
493
+ }).reduce((m, P) => (m[P.page.pageNumber] = P, m), {});
494
+ e(u);
495
495
  },
496
496
  [n]
497
497
  );
498
498
  z(() => {
499
499
  r(10);
500
500
  }, [r]);
501
- const a = E(
501
+ const i = E(
502
502
  (s) => {
503
503
  if (!n)
504
504
  return;
505
505
  const l = n.get(s);
506
- l && e((u) => ({
507
- ...u,
506
+ l && e((d) => ({
507
+ ...d,
508
508
  [s]: {
509
509
  loading: !0,
510
510
  page: l.page,
@@ -516,7 +516,7 @@ const Ro = () => {
516
516
  },
517
517
  [n]
518
518
  );
519
- return { thumbnailPages: t, addPage: a, addToPage: r, thumbnailLength: o };
519
+ return { thumbnailPages: t, addPage: i, addToPage: r, thumbnailLength: o };
520
520
  }, bn = $e({
521
521
  thumbnailPages: {},
522
522
  addPage: (t) => {
@@ -531,21 +531,21 @@ const Ro = () => {
531
531
  children: t,
532
532
  initialThumbnailsVisible: e
533
533
  }) => {
534
- const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = Lo(), [s, l] = G(e);
535
- return /* @__PURE__ */ i(
534
+ const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: i } = Lo(), [s, l] = G(e);
535
+ return /* @__PURE__ */ a(
536
536
  bn.Provider,
537
537
  {
538
- value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a, active: s, setActive: l },
538
+ value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: i, active: s, setActive: l },
539
539
  children: t
540
540
  }
541
541
  );
542
542
  }, Eo = (t = {}, e = "") => {
543
- const [n, o] = G(e), [r, a] = G(!1), { pdf: s, pages: l } = J(), { widths: u, heights: d } = qe(), m = $(!n), { currentZoom: b } = Je(), [h, w] = G([]), { setFocusedPage: C } = oe(), { columnCount: y } = Oe(), { pageRotate: _ } = Ue(), [S, f] = G(0), { pageScrollElementRef: p, virtualScrollableElementRef: g } = et(), { scrollMode: c } = Ne(), { pagesRef: P } = ge(), [v, T] = G(null), R = $({}), x = W(() => S === 0 ? null : h[S - 1], [S, h]), I = W(() => h.length, [h]);
543
+ const [n, o] = G(e), [r, i] = G(!1), { pdf: s, pages: l } = J(), { widths: d, heights: u } = qe(), m = H(!n), { currentZoom: P } = Je(), [h, b] = G([]), { setFocusedPage: C } = oe(), { columnCount: y } = Oe(), { pageRotate: w } = Ue(), [S, f] = G(0), { pageScrollElementRef: p, virtualScrollableElementRef: g } = et(), { scrollMode: c } = Ne(), { pagesRef: _ } = ge(), [v, T] = G(null), R = H({}), x = W(() => S === 0 ? null : h[S - 1], [S, h]), I = W(() => h.length, [h]);
544
544
  z(() => {
545
545
  if (!x || !l)
546
546
  return;
547
547
  const L = g || p;
548
- if (!L || !P)
548
+ if (!L || !_)
549
549
  return;
550
550
  const N = l.get(x.page);
551
551
  if (c === ne.PAGE_SCROLLING && C(x.page), !N)
@@ -553,20 +553,20 @@ const Ro = () => {
553
553
  let D = 0, k = 0;
554
554
  if (c === ne.VERTICAL_SCROLLING) {
555
555
  const de = x.page - 1, ee = y, Fe = de % ee, we = Math.floor(de / ee);
556
- D = Ae(d, we), k = Ae(u, Fe);
556
+ D = Ae(u, we), k = Ae(d, Fe);
557
557
  }
558
- c === ne.HORIZONTAL_SCROLLING && (k = u.slice(0, x.page - 1).reduce((de, ee) => de + ee, 0));
558
+ c === ne.HORIZONTAL_SCROLLING && (k = d.slice(0, x.page - 1).reduce((de, ee) => de + ee, 0));
559
559
  const q = {
560
- height: d[x.page - 1],
561
- width: u[x.page - 1]
562
- }, H = {
560
+ height: u[x.page - 1],
561
+ width: d[x.page - 1]
562
+ }, $ = {
563
563
  top: q.height / 2,
564
564
  left: q.width / 2
565
- }, U = _[x.page], { leftInPage: V, topInPage: K } = Kr(
565
+ }, U = w[x.page], { leftInPage: V, topInPage: K } = Kr(
566
566
  q,
567
- H,
567
+ $,
568
568
  x.rect,
569
- b,
569
+ P,
570
570
  U
571
571
  ), X = k + V, Q = D + K, le = {
572
572
  left: Math.max(X, 0),
@@ -579,13 +579,13 @@ const Ro = () => {
579
579
  }, [
580
580
  l,
581
581
  C,
582
- u,
583
582
  d,
583
+ u,
584
584
  x,
585
585
  c,
586
586
  g,
587
587
  p,
588
- P
588
+ _
589
589
  ]);
590
590
  const O = E(() => {
591
591
  f((L) => I ? L + 1 > I ? 1 : L + 1 : 0);
@@ -605,24 +605,24 @@ const Ro = () => {
605
605
  }, []);
606
606
  return z(() => {
607
607
  if (!n) {
608
- m.current = !0, w([]), f(0);
608
+ m.current = !0, b([]), f(0);
609
609
  return;
610
610
  }
611
- m.current = !1, a(!0), w([]), f(0), F(s).then((L) => {
611
+ m.current = !1, i(!0), b([]), f(0), F(s).then((L) => {
612
612
  R.current = L;
613
613
  const D = Object.keys(L).reduce((k, q) => {
614
- const H = dr(
614
+ const $ = dr(
615
615
  [n],
616
616
  L[q],
617
617
  Number(q) - 1,
618
618
  t
619
619
  ).map((U, V) => ({ ...U, page: Number(q), pageMatchIdx: V }));
620
- return [...k, ...H];
620
+ return [...k, ...$];
621
621
  }, []);
622
- w(D), f(D.length ? 1 : 0);
622
+ b(D), f(D.length ? 1 : 0);
623
623
  }).catch(() => {
624
- w([]), f(0);
625
- }).finally(() => a(!1));
624
+ b([]), f(0);
625
+ }).finally(() => i(!1));
626
626
  }, [n, F, s, t]), {
627
627
  search: n,
628
628
  setSearch: o,
@@ -660,42 +660,42 @@ const Ro = () => {
660
660
  }) => {
661
661
  const [n, o] = G({}), {
662
662
  loading: r,
663
- setSearch: a,
663
+ setSearch: i,
664
664
  totalMatches: s,
665
665
  currentMatchPosition: l,
666
- currentMatch: u,
667
- search: d,
666
+ currentMatch: d,
667
+ search: u,
668
668
  matches: m,
669
- nextMatch: b,
669
+ nextMatch: P,
670
670
  prevMatch: h,
671
- currentMatchElement: w,
671
+ currentMatchElement: b,
672
672
  setCurrentMatchElement: C
673
673
  } = Eo(n, e);
674
- return /* @__PURE__ */ i(
674
+ return /* @__PURE__ */ a(
675
675
  Pn.Provider,
676
676
  {
677
677
  value: {
678
678
  searchOptions: n,
679
679
  setSearchOptions: o,
680
680
  loading: r,
681
- setSearch: a,
681
+ setSearch: i,
682
682
  totalMatches: s,
683
683
  currentMatchPosition: l,
684
- currentMatch: u,
685
- nextMatch: b,
684
+ currentMatch: d,
685
+ nextMatch: P,
686
686
  prevMatch: h,
687
- search: d,
687
+ search: u,
688
688
  matches: m,
689
- currentMatchElement: w,
689
+ currentMatchElement: b,
690
690
  setCurrentMatchElement: C
691
691
  },
692
692
  children: t
693
693
  }
694
694
  );
695
695
  }, Rt = () => Ge(Pn), Tn = $e(null), Xs = ({ children: t }) => {
696
- const [e, n] = G(!1), [o, r] = G([]), a = E((d) => {
697
- r((m) => [...m, { id: d.page.pageNumber.toString(), data: d, priority: 0 }]);
698
- }, []), s = W(() => new gr(a), [a]), { focusedPage: l } = oe(), u = E((d) => (n(!0), vr(
696
+ const e = H(!1), [n, o] = G([]), r = E((d) => {
697
+ o((u) => [...u, { id: d.page.pageNumber.toString(), data: d, priority: 0 }]);
698
+ }, []), i = W(() => new gr(r), [r]), { focusedPage: s } = oe(), l = E((d) => (e.current = !0, vr(
699
699
  d.data.page,
700
700
  d.data.canvasElem,
701
701
  d.data.options
@@ -705,17 +705,18 @@ const Ro = () => {
705
705
  d.data.onLoaded && d.data.onLoaded();
706
706
  })), []);
707
707
  return z(() => {
708
- l && (s.changePagePriority(`^page-${l}`, 0), s.changePagePriority(`^thumbnail-${l}`, 1));
709
- }, [l]), z(() => {
710
- if (s.isEmpty() || e)
711
- return;
712
- const d = s.dequeue();
713
- if (!d)
708
+ s && (i.changePagePriority(`^page-${s}`, 0), i.changePagePriority(`^thumbnail-${s}`, 1));
709
+ }, [s]), z(() => {
710
+ if (i.isEmpty() || e.current)
714
711
  return;
715
- (async () => {
716
- await u(d), n(!1), r(s.peekAll());
717
- })();
718
- }, [s, u, o, e]), /* @__PURE__ */ i(Tn.Provider, { value: s, children: t });
712
+ const d = () => {
713
+ const u = i.dequeue();
714
+ u ? l(u).finally(() => {
715
+ d();
716
+ }) : (e.current = !1, o(i.peekAll()));
717
+ };
718
+ d();
719
+ }, [i, l, n]), /* @__PURE__ */ a(Tn.Provider, { value: i, children: t });
719
720
  }, yn = () => {
720
721
  const t = Ge(Tn);
721
722
  if (!t)
@@ -735,58 +736,58 @@ const Ro = () => {
735
736
  "rp-page": "_rp-page_14ohm_1",
736
737
  "rp-loader-wrapper": "_rp-loader-wrapper_14ohm_15"
737
738
  }, No = (t) => {
738
- const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = $(null), { pages: a } = J(), { pageRotate: s } = Ue(), l = $(), { currentZoom: u } = Je(), d = yn(), m = $(`page-${e}`);
739
+ const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = H(null), { pages: i } = J(), { pageRotate: s } = Ue(), l = H(), { currentZoom: d } = Je(), u = yn(), m = H(`page-${e}`);
739
740
  return z(() => {
740
- if (!a || u === 0)
741
+ if (!i || d === 0)
741
742
  return;
742
- const b = a.get(e);
743
- if (r.current && b) {
743
+ const P = i.get(e);
744
+ if (r.current && P) {
744
745
  const h = r.current;
745
746
  h.hidden = !0;
746
- const w = l.current;
747
- w && w.cancel(), o && o(), d.enqueue(
747
+ const b = l.current;
748
+ b && b.cancel(), o && o(), u.enqueue(
748
749
  m.current,
749
750
  {
750
- page: b.page,
751
+ page: P.page,
751
752
  canvasElem: h,
752
753
  options: {
753
- scale: u,
754
+ scale: d,
754
755
  rotate: s[e],
755
756
  renderForms: !0
756
757
  },
757
758
  onLoaded: n
758
759
  },
759
- 2
760
+ 3
760
761
  );
761
762
  }
762
763
  return () => {
763
- d.removeQueue(m.current);
764
+ u.removeQueue(m.current);
764
765
  };
765
- }, [a, e, s, u, o, n, d]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: r });
766
+ }, [i, e, s, d, o, n, u]), /* @__PURE__ */ a("canvas", { "data-rp": `page-${e}-canvas`, ref: r });
766
767
  }, Oo = "_selecting_usdup_9", he = {
767
768
  "rp-text-layer": "_rp-text-layer_usdup_1",
768
769
  selecting: Oo,
769
770
  "rp-text-layer-text": "_rp-text-layer-text_usdup_39"
770
771
  }, Do = (t) => {
771
- const { pageNumber: e } = t, { pages: n } = J(), o = $(null), { matches: r, currentMatch: a, setCurrentMatchElement: s } = Rt(), [l, u] = G(
772
+ const { pageNumber: e } = t, { pages: n } = J(), o = H(null), { matches: r, currentMatch: i, setCurrentMatchElement: s } = Rt(), [l, d] = G(
772
773
  []
773
- ), d = $(), m = $(), b = $([]), h = W(() => r.filter((p) => p.pageIndex === e - 1), [r, e]), w = E(
774
+ ), u = H(), m = H(), P = H([]), h = W(() => r.filter((p) => p.pageIndex === e - 1), [r, e]), b = E(
774
775
  (p, g, c = !1) => {
775
776
  if (c && ur(p, g), !h.length) {
776
- b.current = [], u([]);
777
+ P.current = [], d([]);
777
778
  return;
778
779
  }
779
- const P = pr(h, p, g);
780
- u(P);
780
+ const _ = pr(h, p, g);
781
+ d(_);
781
782
  },
782
783
  [h]
783
- ), C = $(), y = $(!1), _ = E(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
784
+ ), C = H(), y = H(!1), w = E(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
784
785
  z(() => ((() => {
785
786
  if (C.current)
786
787
  return;
787
788
  C.current = new AbortController();
788
789
  const { signal: g } = C.current, c = () => {
789
- _().forEach((v) => {
790
+ w().forEach((v) => {
790
791
  const T = v.querySelector(".endOfContent");
791
792
  T && (v.appendChild(T), T.style.width = "", T.style.height = "", v.classList.remove(he.selecting));
792
793
  });
@@ -816,7 +817,7 @@ const Ro = () => {
816
817
  },
817
818
  { signal: g }
818
819
  );
819
- let P = null;
820
+ let _ = null;
820
821
  document.addEventListener(
821
822
  "selectionchange",
822
823
  () => {
@@ -831,11 +832,11 @@ const Ro = () => {
831
832
  const T = /* @__PURE__ */ new Set();
832
833
  for (let N = 0; N < v.rangeCount; N++) {
833
834
  const D = v.getRangeAt(N);
834
- _().forEach((k) => {
835
+ w().forEach((k) => {
835
836
  D.intersectsNode(k) && !T.has(k) && T.add(k);
836
837
  });
837
838
  }
838
- _().forEach((N) => {
839
+ w().forEach((N) => {
839
840
  if (T.has(N))
840
841
  N.classList.add(he.selecting);
841
842
  else {
@@ -844,72 +845,72 @@ const Ro = () => {
844
845
  }
845
846
  });
846
847
  const R = v.getRangeAt(0);
847
- let I = P && (R.compareBoundaryPoints(Range.END_TO_END, P) === 0 || R.compareBoundaryPoints(Range.START_TO_END, P) === 0) ? R.startContainer : R.endContainer;
848
+ let I = _ && (R.compareBoundaryPoints(Range.END_TO_END, _) === 0 || R.compareBoundaryPoints(Range.START_TO_END, _) === 0) ? R.startContainer : R.endContainer;
848
849
  I.nodeType === Node.TEXT_NODE && (I = I.parentNode);
849
850
  const O = (F = I.parentElement) == null ? void 0 : F.closest(
850
851
  he["rp-text-layer"]
851
852
  ), A = O == null ? void 0 : O.querySelector(".endOfContent");
852
- A && O && (A.style.width = O.style.width, A.style.height = O.style.height, (L = I.parentElement) == null || L.insertBefore(A, I.nextSibling)), P = R.cloneRange();
853
+ A && O && (A.style.width = O.style.width, A.style.height = O.style.height, (L = I.parentElement) == null || L.insertBefore(A, I.nextSibling)), _ = R.cloneRange();
853
854
  },
854
855
  { signal: g }
855
856
  );
856
857
  })(), () => {
857
858
  var g;
858
859
  (g = C.current) == null || g.abort(), C.current = void 0;
859
- }), [_]);
860
+ }), [w]);
860
861
  const S = E(() => {
861
862
  o.current && o.current.classList.add(he.selecting);
862
863
  }, []), f = E(() => {
863
864
  o.current && o.current.classList.remove(he.selecting);
864
865
  }, []);
865
866
  return z(() => {
866
- if (b.current.forEach((c) => {
867
+ if (P.current.forEach((c) => {
867
868
  c.classList.remove("selected");
868
- }), !l.length || !a || a.pageIndex !== e - 1)
869
+ }), !l.length || !i || i.pageIndex !== e - 1)
869
870
  return;
870
871
  const p = h.findIndex(
871
- (c) => JSON.stringify(c) === JSON.stringify(a)
872
+ (c) => JSON.stringify(c) === JSON.stringify(i)
872
873
  );
873
874
  if (p === -1)
874
875
  return;
875
876
  const g = l.filter((c) => c.index === p);
876
- g.length && (b.current = g.map((c) => c.element), s(g[0].element), g.forEach((c) => {
877
+ g.length && (P.current = g.map((c) => c.element), s(g[0].element), g.forEach((c) => {
877
878
  c.element.classList.add("selected");
878
879
  }));
879
- }, [a, l, h]), z(() => {
880
+ }, [i, l, h]), z(() => {
880
881
  const p = n.get(e);
881
882
  if (!p || !o.current)
882
883
  return;
883
884
  const g = o.current;
884
- return d.current && d.current.cancel(), p.page.getTextContent().then((c) => {
885
- const P = p.page.getViewport({ scale: 1 });
886
- return d.current = new Rr.TextLayer({
887
- viewport: P,
885
+ return u.current && u.current.cancel(), p.page.getTextContent().then((c) => {
886
+ const _ = p.page.getViewport({ scale: 1 });
887
+ return u.current = new Rr.TextLayer({
888
+ viewport: _,
888
889
  textContentSource: c,
889
890
  container: g
890
- }), m.current = c, g && (g.innerText = ""), d.current.render();
891
+ }), m.current = c, g && (g.innerText = ""), u.current.render();
891
892
  }).then(() => {
892
893
  var T, R;
893
894
  [].slice.call(g.children).forEach((x) => {
894
895
  x.classList.add(he["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
895
896
  });
896
- const P = (T = d.current) == null ? void 0 : T.textDivs;
897
- P && m.current && w(m.current, P);
897
+ const _ = (T = u.current) == null ? void 0 : T.textDivs;
898
+ _ && m.current && b(m.current, _);
898
899
  const v = document.createElement("div");
899
900
  v.className = "endOfContent", (R = o.current) == null || R.appendChild(v);
900
901
  }).catch(() => {
901
902
  }), () => {
902
903
  var c;
903
- (c = d.current) == null || c.cancel();
904
+ (c = u.current) == null || c.cancel();
904
905
  };
905
906
  }, [n, e]), z(() => {
906
907
  var c;
907
- [].slice.call(o.current.children).forEach((P) => {
908
- P.classList.add(he["rp-text-layer-text"]);
908
+ [].slice.call(o.current.children).forEach((_) => {
909
+ _.classList.add(he["rp-text-layer-text"]);
909
910
  });
910
- const g = (c = d.current) == null ? void 0 : c.textDivs;
911
- g && m.current && w(m.current, g, !0);
912
- }, [w]), /* @__PURE__ */ i(
911
+ const g = (c = u.current) == null ? void 0 : c.textDivs;
912
+ g && m.current && b(m.current, g, !0);
913
+ }, [b]), /* @__PURE__ */ a(
913
914
  "div",
914
915
  {
915
916
  "data-rp": `page-${e}-textLayer`,
@@ -924,30 +925,30 @@ const Ro = () => {
924
925
  };
925
926
  let Ao = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
926
927
  const Fo = (t) => {
927
- const { pageNumber: e } = t, n = $(null), { pages: o, pdf: r } = J(), a = $(), [s, l] = G(), { setFocusedPage: u, goToPage: d } = oe(), { scrollMode: m } = Ne(), { print: b } = tt(), { download: h } = qn(), w = W(() => o.get(e), [o, e]), C = W(() => w == null ? void 0 : w.page.getViewport(), [w]);
928
+ const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = J(), i = H(), [s, l] = G(), { setFocusedPage: d, goToPage: u } = oe(), { scrollMode: m } = Ne(), { print: P } = tt(), { download: h } = qn(), b = W(() => o.get(e), [o, e]), C = W(() => b == null ? void 0 : b.page.getViewport(), [b]);
928
929
  z(() => {
929
- a.current && (a.current.div.replaceChildren(), a.current = void 0);
930
+ i.current && (i.current.div.replaceChildren(), i.current = void 0);
930
931
  }, [r]), z(() => {
931
- w && w.page.getAnnotations().then((_) => {
932
- a.current = void 0, l(_), n.current && (n.current.innerText = "");
932
+ b && b.page.getAnnotations().then((w) => {
933
+ i.current = void 0, l(w), n.current && (n.current.innerText = "");
933
934
  });
934
- }, [w]);
935
+ }, [b]);
935
936
  const y = E(
936
- (_) => {
937
- !s || !r || (zr(_), Ar(_, r, s).then((S) => {
937
+ (w) => {
938
+ !s || !r || (zr(w), Ar(w, r, s).then((S) => {
938
939
  var f, p;
939
- ((f = S == null ? void 0 : S.data) == null ? void 0 : f.action) === "Print" ? b() : ((p = S == null ? void 0 : S.data) == null ? void 0 : p.action) === "SaveAs" && h();
940
- }), m === ne.PAGE_SCROLLING ? Ft(_, s, r, (S) => u(S.pageIndex + 1)) : Ft(_, s, r, (S) => d(S.pageIndex + 1)));
940
+ ((f = S == null ? void 0 : S.data) == null ? void 0 : f.action) === "Print" ? P() : ((p = S == null ? void 0 : S.data) == null ? void 0 : p.action) === "SaveAs" && h();
941
+ }), m === ne.PAGE_SCROLLING ? Ft(w, s, r, (S) => d(S.pageIndex + 1)) : Ft(w, s, r, (S) => u(S.pageIndex + 1)));
941
942
  },
942
- [r, s, d, u, m, b, h]
943
+ [r, s, u, d, m, P, h]
943
944
  );
944
945
  return z(() => {
945
- if (!w || !s)
946
+ if (!b || !s)
946
947
  return;
947
- const _ = w.page.getViewport();
948
- if (a.current) {
949
- a.current.update({
950
- viewport: _.clone({ dontFlip: !0 })
948
+ const w = b.page.getViewport();
949
+ if (i.current) {
950
+ i.current.update({
951
+ viewport: w.clone({ dontFlip: !0 })
951
952
  });
952
953
  return;
953
954
  }
@@ -959,33 +960,33 @@ const Fo = (t) => {
959
960
  kr(g);
960
961
  break;
961
962
  case At.Widget:
962
- Fr(g, _, S);
963
+ Fr(g, w, S);
963
964
  break;
964
965
  }
965
966
  }
966
967
  const f = new AbortController();
967
968
  return (async () => {
968
- var P;
969
- a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new Or({
969
+ var _;
970
+ i.current && (i.current.div.replaceChildren(), i.current = void 0), n.current && (n.current.innerText = ""), i.current = new Or({
970
971
  div: n.current,
971
972
  accessibilityManager: void 0,
972
973
  annotationCanvasMap: void 0,
973
974
  annotationEditorUIManager: void 0,
974
975
  structTreeLayer: null,
975
- page: w.page,
976
- viewport: _.clone({ dontFlip: !0 })
976
+ page: b.page,
977
+ viewport: w.clone({ dontFlip: !0 })
977
978
  }), n.current && kt(n.current, y);
978
979
  const g = await (r == null ? void 0 : r.hasJSActions()), c = await (r == null ? void 0 : r.getFieldObjects());
979
980
  if (f.signal.aborted)
980
981
  throw "abort";
981
- return (P = a.current) == null ? void 0 : P.render({
982
+ return (_ = i.current) == null ? void 0 : _.render({
982
983
  annotations: s,
983
984
  annotationStorage: r == null ? void 0 : r.annotationStorage,
984
985
  hasJSActions: g,
985
986
  fieldObjects: c,
986
987
  div: n.current,
987
- viewport: _.clone({ dontFlip: !0 }),
988
- page: w.page,
988
+ viewport: w.clone({ dontFlip: !0 }),
989
+ page: b.page,
989
990
  imageResourcesPath: Ao,
990
991
  renderForms: !0,
991
992
  linkService: new Dr(),
@@ -1000,7 +1001,7 @@ const Fo = (t) => {
1000
1001
  }), () => {
1001
1002
  f.abort("clear"), n.current && kt(n.current, y);
1002
1003
  };
1003
- }, [r, s, y]), /* @__PURE__ */ i(
1004
+ }, [r, s, y]), /* @__PURE__ */ a(
1004
1005
  "div",
1005
1006
  {
1006
1007
  "data-rp": `page-${e}-annotationLayer`,
@@ -1012,9 +1013,9 @@ const Fo = (t) => {
1012
1013
  }, ko = {
1013
1014
  "rp-text-highlight": "_rp-text-highlight_jdkf8_1"
1014
1015
  }, Wo = ({ pageNumber: t, viewport: e }) => {
1015
- const [n, o] = G(), { pages: r } = J(), { highlightKeywords: a } = fr(), s = !0, l = $(null), [u, d] = G(null), [m, b] = G([]);
1016
+ const [n, o] = G(), { pages: r } = J(), { highlightKeywords: i } = fr(), s = !0, l = H(null), [d, u] = G(null), [m, P] = G([]);
1016
1017
  z(() => {
1017
- l.current && d(l.current.parentElement);
1018
+ l.current && u(l.current.parentElement);
1018
1019
  }, [l]), z(() => {
1019
1020
  (async () => {
1020
1021
  const p = r.get(t);
@@ -1024,21 +1025,21 @@ const Fo = (t) => {
1024
1025
  o(g);
1025
1026
  })();
1026
1027
  }, [r, t]);
1027
- const h = W(() => a ? a.map((f) => {
1028
+ const h = W(() => i ? i.map((f) => {
1028
1029
  var p, g;
1029
1030
  return {
1030
1031
  ...Mr(f.keyword, (p = f.options) == null ? void 0 : p.matchCase, (g = f.options) == null ? void 0 : g.wholeWords),
1031
1032
  color: f.highlightColor
1032
1033
  };
1033
- }) : [], [a]);
1034
- function w(f, p) {
1034
+ }) : [], [i]);
1035
+ function b(f, p) {
1035
1036
  if (!f)
1036
1037
  return;
1037
1038
  const g = `[data-rp="page-${p}-textLayer"]`;
1038
1039
  return new Promise((c) => {
1039
- const P = f.querySelector(g);
1040
- if (P) {
1041
- c(P);
1040
+ const _ = f.querySelector(g);
1041
+ if (_) {
1042
+ c(_);
1042
1043
  return;
1043
1044
  }
1044
1045
  new MutationObserver((T, R) => {
@@ -1056,7 +1057,7 @@ const Fo = (t) => {
1056
1057
  p(Array.from(g));
1057
1058
  return;
1058
1059
  }
1059
- new MutationObserver((P, v) => {
1060
+ new MutationObserver((_, v) => {
1060
1061
  const T = f.querySelectorAll(
1061
1062
  ".rp-text-layer-text"
1062
1063
  );
@@ -1065,16 +1066,16 @@ const Fo = (t) => {
1065
1066
  });
1066
1067
  }
1067
1068
  const y = (f, p, g, c) => {
1068
- var H;
1069
- const P = document.createRange(), v = g.firstChild;
1069
+ var $;
1070
+ const _ = document.createRange(), v = g.firstChild;
1070
1071
  if (!v || v.nodeType !== Node.TEXT_NODE)
1071
1072
  return null;
1072
- const T = ((H = v.textContent) == null ? void 0 : H.length) ?? 0, R = c[0].charIdxInSpan, x = c.length === 1 ? R : c[c.length - 1].charIdxInSpan;
1073
+ const T = (($ = v.textContent) == null ? void 0 : $.length) ?? 0, R = c[0].charIdxInSpan, x = c.length === 1 ? R : c[c.length - 1].charIdxInSpan;
1073
1074
  if (R > T || x + 1 > T)
1074
1075
  return null;
1075
- P.setStart(v, R), P.setEnd(v, x + 1);
1076
+ _.setStart(v, R), _.setEnd(v, x + 1);
1076
1077
  const I = document.createElement("span");
1077
- I.style.width = "auto", P.surroundContents(I);
1078
+ I.style.width = "auto", _.surroundContents(I);
1078
1079
  const O = I.getBoundingClientRect(), A = f.getBoundingClientRect(), F = A.height, L = A.width, N = 100 * (O.left - A.left) / L, D = 100 * (O.top - A.top) / F, k = 100 * O.height / F, q = 100 * O.width / L;
1079
1080
  return $r(I), {
1080
1081
  keywordStr: p,
@@ -1086,13 +1087,13 @@ const Fo = (t) => {
1086
1087
  pageWidth: L
1087
1088
  };
1088
1089
  };
1089
- async function _(f, p) {
1090
- const g = await w(u, f);
1090
+ async function w(f, p) {
1091
+ const g = await b(d, f);
1091
1092
  if (!g)
1092
1093
  return;
1093
1094
  const c = await C(g);
1094
1095
  if (c.length) {
1095
- const P = c.map((T) => T.tagName === "BR" ? " " : T.textContent).reduce(
1096
+ const _ = c.map((T) => T.tagName === "BR" ? " " : T.textContent).reduce(
1096
1097
  (T, R, x) => T.concat(
1097
1098
  R.split("").map((I, O) => ({
1098
1099
  char: I,
@@ -1107,13 +1108,13 @@ const Fo = (t) => {
1107
1108
  spanIdx: 0
1108
1109
  }
1109
1110
  ]
1110
- ).slice(1), v = S(g, p, c, P);
1111
- b(v);
1111
+ ).slice(1), v = S(g, p, c, _);
1112
+ P(v);
1112
1113
  }
1113
1114
  }
1114
1115
  const S = (f, p, g, c) => {
1115
- const P = p.length;
1116
- if (!c.length || !P)
1116
+ const _ = p.length;
1117
+ if (!c.length || !_)
1117
1118
  return [];
1118
1119
  const v = [], T = c.map((R) => R.char).join("");
1119
1120
  return h.forEach((R) => {
@@ -1135,11 +1136,11 @@ const Fo = (t) => {
1135
1136
  color: A
1136
1137
  }));
1137
1138
  for (const q of k) {
1138
- const H = q.indexes.reduce(
1139
+ const $ = q.indexes.reduce(
1139
1140
  (U, V) => (U[V.spanIdx] = (U[V.spanIdx] || []).concat([V]), U),
1140
1141
  {}
1141
1142
  );
1142
- for (const U of Object.values(H))
1143
+ for (const U of Object.values($))
1143
1144
  if (U.length !== 1 || U[0].char.trim() !== "") {
1144
1145
  const V = U, K = g[V[0].spanIdx], X = y(
1145
1146
  f,
@@ -1159,14 +1160,14 @@ const Fo = (t) => {
1159
1160
  };
1160
1161
  return z(() => {
1161
1162
  (async () => {
1162
- if (!(!a || a.length === 0))
1163
+ if (!(!i || i.length === 0))
1163
1164
  try {
1164
- await _(t, a);
1165
+ await w(t, i);
1165
1166
  } catch (p) {
1166
1167
  console.error(p);
1167
1168
  }
1168
1169
  })();
1169
- }, [s, a, t, n, e]), /* @__PURE__ */ i(me, { children: /* @__PURE__ */ i("div", { ref: l, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((f, p) => /* @__PURE__ */ i(
1170
+ }, [s, i, t, n, e]), /* @__PURE__ */ a(me, { children: /* @__PURE__ */ a("div", { ref: l, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((f, p) => /* @__PURE__ */ a(
1170
1171
  "div",
1171
1172
  {
1172
1173
  className: ko["rp-text-highlight"],
@@ -1181,37 +1182,37 @@ const Fo = (t) => {
1181
1182
  p
1182
1183
  )) }) });
1183
1184
  }, Lt = Ve((t, e) => {
1184
- const { pageNumber: n, style: o, ...r } = t, { pages: a } = J(), { pageRotate: s } = Ue(), { textLayer: l } = ar(), { currentZoom: u } = Je(), d = $(a.get(n)), [m, b] = G(!1), h = $(null), [w, C] = G({
1185
+ const { pageNumber: n, style: o, ...r } = t, { pages: i } = J(), { pageRotate: s } = Ue(), { textLayer: l } = ar(), { currentZoom: d } = Je(), u = H(i.get(n)), [m, P] = G(!1), h = H(null), [b, C] = G({
1185
1186
  width: 0,
1186
1187
  height: 0
1187
1188
  });
1188
1189
  cn(e, () => h.current);
1189
- const y = W(() => d.current ? s[n] : 0, [n, s]);
1190
+ const y = W(() => u.current ? s[n] : 0, [n, s]);
1190
1191
  z(() => {
1191
- if (a && (d.current = a.get(n), d.current)) {
1192
- const p = d.current.page.getViewport({
1193
- scale: u,
1192
+ if (i && (u.current = i.get(n), u.current)) {
1193
+ const p = u.current.page.getViewport({
1194
+ scale: d,
1194
1195
  rotation: y
1195
1196
  });
1196
1197
  C(p);
1197
1198
  }
1198
- }, [a, n, y, u]);
1199
- const _ = W(() => {
1199
+ }, [i, n, y, d]);
1200
+ const w = W(() => {
1200
1201
  switch (y) {
1201
1202
  case 90:
1202
- return `${w.width / 2}px ${w.width / 2}px`;
1203
+ return `${b.width / 2}px ${b.width / 2}px`;
1203
1204
  case -90:
1204
1205
  case 270:
1205
- return `${w.height / 2}px ${w.height / 2}px`;
1206
+ return `${b.height / 2}px ${b.height / 2}px`;
1206
1207
  default:
1207
1208
  return "center";
1208
1209
  }
1209
- }, [y, w]), S = E(() => {
1210
- b(!0);
1210
+ }, [y, b]), S = E(() => {
1211
+ P(!0);
1211
1212
  }, []), f = E(() => {
1212
- b(!1);
1213
+ P(!1);
1213
1214
  }, []);
1214
- return /* @__PURE__ */ i(
1215
+ return /* @__PURE__ */ a(
1215
1216
  "div",
1216
1217
  {
1217
1218
  ref: h,
@@ -1221,25 +1222,25 @@ const Fo = (t) => {
1221
1222
  style: {
1222
1223
  ...o,
1223
1224
  "--rp-rotate": `${y}deg`,
1224
- "--rp-page-rotate-translate": `${_}`,
1225
- "--scale-factor": u
1225
+ "--rp-page-rotate-translate": `${w}`,
1226
+ "--scale-factor": d
1226
1227
  },
1227
1228
  className: dt["rp-page-wrapper"],
1228
1229
  children: /* @__PURE__ */ M(
1229
1230
  "div",
1230
1231
  {
1231
1232
  style: {
1232
- width: `${w.width}px`,
1233
- height: `${w.height}px`
1233
+ width: `${b.width}px`,
1234
+ height: `${b.height}px`
1234
1235
  },
1235
1236
  className: dt["rp-page"],
1236
1237
  children: [
1237
- /* @__PURE__ */ i(No, { onLoading: S, onLoaded: f, pageNumber: n }),
1238
- m && /* @__PURE__ */ i("div", { className: dt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Pt, {}) }),
1239
- /* @__PURE__ */ i(Gr, { pageNumber: n }),
1240
- l && /* @__PURE__ */ i(Do, { pageNumber: n }),
1241
- /* @__PURE__ */ i(Wo, { pageNumber: n, viewport: w }),
1242
- /* @__PURE__ */ i(Fo, { pageNumber: n })
1238
+ /* @__PURE__ */ a(No, { onLoading: S, onLoaded: f, pageNumber: n }),
1239
+ m && /* @__PURE__ */ a("div", { className: dt["rp-loader-wrapper"], children: /* @__PURE__ */ a(Pt, {}) }),
1240
+ /* @__PURE__ */ a(Gr, { pageNumber: n }),
1241
+ l && /* @__PURE__ */ a(Do, { pageNumber: n }),
1242
+ /* @__PURE__ */ a(Wo, { pageNumber: n, viewport: b }),
1243
+ /* @__PURE__ */ a(Fo, { pageNumber: n })
1243
1244
  ]
1244
1245
  }
1245
1246
  )
@@ -1285,11 +1286,11 @@ function $o(t, e) {
1285
1286
  }
1286
1287
  function ut(t, e) {
1287
1288
  e === void 0 && (e = $o);
1288
- var n, o = [], r, a = !1;
1289
+ var n, o = [], r, i = !1;
1289
1290
  function s() {
1290
- for (var l = [], u = 0; u < arguments.length; u++)
1291
- l[u] = arguments[u];
1292
- return a && n === this && e(l, o) || (r = t.apply(this, l), a = !0, n = this, o = l), r;
1291
+ for (var l = [], d = 0; d < arguments.length; d++)
1292
+ l[d] = arguments[d];
1293
+ return i && n === this && e(l, o) || (r = t.apply(this, l), i = !0, n = this, o = l), r;
1293
1294
  }
1294
1295
  return s;
1295
1296
  }
@@ -1349,7 +1350,7 @@ var Vo = 150, Bo = function(e) {
1349
1350
  }, je = null, Ke = null, Xe = null;
1350
1351
  process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (je = /* @__PURE__ */ new WeakSet(), Ke = /* @__PURE__ */ new WeakSet(), Xe = /* @__PURE__ */ new WeakSet());
1351
1352
  function Zo(t) {
1352
- var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, s = t.getEstimatedTotalHeight, l = t.getEstimatedTotalWidth, u = t.getOffsetForColumnAndAlignment, d = t.getOffsetForRowAndAlignment, m = t.getRowHeight, b = t.getRowOffset, h = t.getRowStartIndexForOffset, w = t.getRowStopIndexForStartIndex, C = t.initInstanceProps, y = t.shouldResetStyleCacheOnItemSizeChange, _ = t.validateProps;
1353
+ var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, i = t.getColumnWidth, s = t.getEstimatedTotalHeight, l = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, u = t.getOffsetForRowAndAlignment, m = t.getRowHeight, P = t.getRowOffset, h = t.getRowStartIndexForOffset, b = t.getRowStopIndexForStartIndex, C = t.initInstanceProps, y = t.shouldResetStyleCacheOnItemSizeChange, w = t.validateProps;
1353
1354
  return e = /* @__PURE__ */ function(S) {
1354
1355
  Mo(f, S);
1355
1356
  function f(g) {
@@ -1362,9 +1363,9 @@ function Zo(t) {
1362
1363
  scrollTop: typeof c.props.initialScrollTop == "number" ? c.props.initialScrollTop : 0,
1363
1364
  scrollUpdateWasRequested: !1,
1364
1365
  verticalScrollDirection: "forward"
1365
- }, c._callOnItemsRendered = void 0, c._callOnItemsRendered = ut(function(P, v, T, R, x, I, O, A) {
1366
+ }, c._callOnItemsRendered = void 0, c._callOnItemsRendered = ut(function(_, v, T, R, x, I, O, A) {
1366
1367
  return c.props.onItemsRendered({
1367
- overscanColumnStartIndex: P,
1368
+ overscanColumnStartIndex: _,
1368
1369
  overscanColumnStopIndex: v,
1369
1370
  overscanRowStartIndex: T,
1370
1371
  overscanRowStopIndex: R,
@@ -1373,16 +1374,16 @@ function Zo(t) {
1373
1374
  visibleRowStartIndex: O,
1374
1375
  visibleRowStopIndex: A
1375
1376
  });
1376
- }), c._callOnScroll = void 0, c._callOnScroll = ut(function(P, v, T, R, x) {
1377
+ }), c._callOnScroll = void 0, c._callOnScroll = ut(function(_, v, T, R, x) {
1377
1378
  return c.props.onScroll({
1378
1379
  horizontalScrollDirection: T,
1379
- scrollLeft: P,
1380
+ scrollLeft: _,
1380
1381
  scrollTop: v,
1381
1382
  verticalScrollDirection: R,
1382
1383
  scrollUpdateWasRequested: x
1383
1384
  });
1384
- }), c._getItemStyle = void 0, c._getItemStyle = function(P, v) {
1385
- var T = c.props, R = T.columnWidth, x = T.direction, I = T.rowHeight, O = c._getItemStyleCache(y && R, y && x, y && I), A = P + ":" + v, F;
1385
+ }), c._getItemStyle = void 0, c._getItemStyle = function(_, v) {
1386
+ var T = c.props, R = T.columnWidth, x = T.direction, I = T.rowHeight, O = c._getItemStyleCache(y && R, y && x, y && I), A = _ + ":" + v, F;
1386
1387
  if (O.hasOwnProperty(A))
1387
1388
  F = O[A];
1388
1389
  else {
@@ -1391,16 +1392,16 @@ function Zo(t) {
1391
1392
  position: "absolute",
1392
1393
  left: N ? void 0 : L,
1393
1394
  right: N ? L : void 0,
1394
- top: b(c.props, P, c._instanceProps),
1395
- height: m(c.props, P, c._instanceProps),
1396
- width: a(c.props, v, c._instanceProps)
1395
+ top: P(c.props, _, c._instanceProps),
1396
+ height: m(c.props, _, c._instanceProps),
1397
+ width: i(c.props, v, c._instanceProps)
1397
1398
  };
1398
1399
  }
1399
1400
  return F;
1400
- }, c._getItemStyleCache = void 0, c._getItemStyleCache = ut(function(P, v, T) {
1401
+ }, c._getItemStyleCache = void 0, c._getItemStyleCache = ut(function(_, v, T) {
1401
1402
  return {};
1402
- }), c._onScroll = function(P) {
1403
- var v = P.currentTarget, T = v.clientHeight, R = v.clientWidth, x = v.scrollLeft, I = v.scrollTop, O = v.scrollHeight, A = v.scrollWidth;
1403
+ }), c._onScroll = function(_) {
1404
+ var v = _.currentTarget, T = v.clientHeight, R = v.clientWidth, x = v.scrollLeft, I = v.scrollTop, O = v.scrollHeight, A = v.scrollWidth;
1404
1405
  c.setState(function(F) {
1405
1406
  if (F.scrollLeft === x && F.scrollTop === I)
1406
1407
  return null;
@@ -1425,9 +1426,9 @@ function Zo(t) {
1425
1426
  scrollUpdateWasRequested: !1
1426
1427
  };
1427
1428
  }, c._resetIsScrollingDebounced);
1428
- }, c._outerRefSetter = function(P) {
1429
+ }, c._outerRefSetter = function(_) {
1429
1430
  var v = c.props.outerRef;
1430
- c._outerRef = P, typeof v == "function" ? v(P) : v != null && typeof v == "object" && v.hasOwnProperty("current") && (v.current = P);
1431
+ c._outerRef = _, typeof v == "function" ? v(_) : v != null && typeof v == "object" && v.hasOwnProperty("current") && (v.current = _);
1431
1432
  }, c._resetIsScrollingDebounced = function() {
1432
1433
  c._resetIsScrollingTimeoutId !== null && Zt(c._resetIsScrollingTimeoutId), c._resetIsScrollingTimeoutId = qo(c._resetIsScrolling, Vo);
1433
1434
  }, c._resetIsScrolling = function() {
@@ -1438,38 +1439,38 @@ function Zo(t) {
1438
1439
  });
1439
1440
  }, c;
1440
1441
  }
1441
- f.getDerivedStateFromProps = function(c, P) {
1442
- return jo(c, P), _(c), null;
1442
+ f.getDerivedStateFromProps = function(c, _) {
1443
+ return jo(c, _), w(c), null;
1443
1444
  };
1444
1445
  var p = f.prototype;
1445
1446
  return p.scrollTo = function(c) {
1446
- var P = c.scrollLeft, v = c.scrollTop;
1447
- P !== void 0 && (P = Math.max(0, P)), v !== void 0 && (v = Math.max(0, v)), this.setState(function(T) {
1448
- return P === void 0 && (P = T.scrollLeft), v === void 0 && (v = T.scrollTop), T.scrollLeft === P && T.scrollTop === v ? null : {
1449
- horizontalScrollDirection: T.scrollLeft < P ? "forward" : "backward",
1450
- scrollLeft: P,
1447
+ var _ = c.scrollLeft, v = c.scrollTop;
1448
+ _ !== void 0 && (_ = Math.max(0, _)), v !== void 0 && (v = Math.max(0, v)), this.setState(function(T) {
1449
+ return _ === void 0 && (_ = T.scrollLeft), v === void 0 && (v = T.scrollTop), T.scrollLeft === _ && T.scrollTop === v ? null : {
1450
+ horizontalScrollDirection: T.scrollLeft < _ ? "forward" : "backward",
1451
+ scrollLeft: _,
1451
1452
  scrollTop: v,
1452
1453
  scrollUpdateWasRequested: !0,
1453
1454
  verticalScrollDirection: T.scrollTop < v ? "forward" : "backward"
1454
1455
  };
1455
1456
  }, this._resetIsScrollingDebounced);
1456
1457
  }, p.scrollToItem = function(c) {
1457
- var P = c.align, v = P === void 0 ? "auto" : P, T = c.columnIndex, R = c.rowIndex, x = this.props, I = x.columnCount, O = x.height, A = x.rowCount, F = x.width, L = this.state, N = L.scrollLeft, D = L.scrollTop, k = Uo();
1458
+ var _ = c.align, v = _ === void 0 ? "auto" : _, T = c.columnIndex, R = c.rowIndex, x = this.props, I = x.columnCount, O = x.height, A = x.rowCount, F = x.width, L = this.state, N = L.scrollLeft, D = L.scrollTop, k = Uo();
1458
1459
  T !== void 0 && (T = Math.max(0, Math.min(T, I - 1))), R !== void 0 && (R = Math.max(0, Math.min(R, A - 1)));
1459
- var q = s(this.props, this._instanceProps), H = l(this.props, this._instanceProps), U = H > F ? k : 0, V = q > O ? k : 0;
1460
+ var q = s(this.props, this._instanceProps), $ = l(this.props, this._instanceProps), U = $ > F ? k : 0, V = q > O ? k : 0;
1460
1461
  this.scrollTo({
1461
- scrollLeft: T !== void 0 ? u(this.props, T, v, N, this._instanceProps, V) : N,
1462
- scrollTop: R !== void 0 ? d(this.props, R, v, D, this._instanceProps, U) : D
1462
+ scrollLeft: T !== void 0 ? d(this.props, T, v, N, this._instanceProps, V) : N,
1463
+ scrollTop: R !== void 0 ? u(this.props, R, v, D, this._instanceProps, U) : D
1463
1464
  });
1464
1465
  }, p.componentDidMount = function() {
1465
- var c = this.props, P = c.initialScrollLeft, v = c.initialScrollTop;
1466
+ var c = this.props, _ = c.initialScrollLeft, v = c.initialScrollTop;
1466
1467
  if (this._outerRef != null) {
1467
1468
  var T = this._outerRef;
1468
- typeof P == "number" && (T.scrollLeft = P), typeof v == "number" && (T.scrollTop = v);
1469
+ typeof _ == "number" && (T.scrollLeft = _), typeof v == "number" && (T.scrollTop = v);
1469
1470
  }
1470
1471
  this._callPropsCallbacks();
1471
1472
  }, p.componentDidUpdate = function() {
1472
- var c = this.props.direction, P = this.state, v = P.scrollLeft, T = P.scrollTop, R = P.scrollUpdateWasRequested;
1473
+ var c = this.props.direction, _ = this.state, v = _.scrollLeft, T = _.scrollTop, R = _.scrollUpdateWasRequested;
1473
1474
  if (R && this._outerRef != null) {
1474
1475
  var x = this._outerRef;
1475
1476
  if (c === "rtl")
@@ -1493,11 +1494,11 @@ function Zo(t) {
1493
1494
  }, p.componentWillUnmount = function() {
1494
1495
  this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
1495
1496
  }, p.render = function() {
1496
- var c = this.props, P = c.children, v = c.className, T = c.columnCount, R = c.direction, x = c.height, I = c.innerRef, O = c.innerElementType, A = c.innerTagName, F = c.itemData, L = c.itemKey, N = L === void 0 ? Bo : L, D = c.outerElementType, k = c.outerTagName, q = c.rowCount, H = c.style, U = c.useIsScrolling, V = c.width, K = this.state.isScrolling, X = this._getHorizontalRangeToRender(), Q = X[0], le = X[1], de = this._getVerticalRangeToRender(), ee = de[0], Fe = de[1], we = [];
1497
+ var c = this.props, _ = c.children, v = c.className, T = c.columnCount, R = c.direction, x = c.height, I = c.innerRef, O = c.innerElementType, A = c.innerTagName, F = c.itemData, L = c.itemKey, N = L === void 0 ? Bo : L, D = c.outerElementType, k = c.outerTagName, q = c.rowCount, $ = c.style, U = c.useIsScrolling, V = c.width, K = this.state.isScrolling, X = this._getHorizontalRangeToRender(), Q = X[0], le = X[1], de = this._getVerticalRangeToRender(), ee = de[0], Fe = de[1], we = [];
1497
1498
  if (T > 0 && q)
1498
1499
  for (var Te = ee; Te <= Fe; Te++)
1499
1500
  for (var _e = Q; _e <= le; _e++)
1500
- we.push(Ze(P, {
1501
+ we.push(Ze(_, {
1501
1502
  columnIndex: _e,
1502
1503
  data: F,
1503
1504
  isScrolling: U ? K : void 0,
@@ -1522,7 +1523,7 @@ function Zo(t) {
1522
1523
  WebkitOverflowScrolling: "touch",
1523
1524
  willChange: "transform",
1524
1525
  direction: R
1525
- }, H)
1526
+ }, $)
1526
1527
  }, Ze(O || A || "div", {
1527
1528
  children: we,
1528
1529
  ref: I,
@@ -1533,26 +1534,26 @@ function Zo(t) {
1533
1534
  }
1534
1535
  }));
1535
1536
  }, p._callPropsCallbacks = function() {
1536
- var c = this.props, P = c.columnCount, v = c.onItemsRendered, T = c.onScroll, R = c.rowCount;
1537
- if (typeof v == "function" && P > 0 && R > 0) {
1537
+ var c = this.props, _ = c.columnCount, v = c.onItemsRendered, T = c.onScroll, R = c.rowCount;
1538
+ if (typeof v == "function" && _ > 0 && R > 0) {
1538
1539
  var x = this._getHorizontalRangeToRender(), I = x[0], O = x[1], A = x[2], F = x[3], L = this._getVerticalRangeToRender(), N = L[0], D = L[1], k = L[2], q = L[3];
1539
1540
  this._callOnItemsRendered(I, O, N, D, A, F, k, q);
1540
1541
  }
1541
1542
  if (typeof T == "function") {
1542
- var H = this.state, U = H.horizontalScrollDirection, V = H.scrollLeft, K = H.scrollTop, X = H.scrollUpdateWasRequested, Q = H.verticalScrollDirection;
1543
+ var $ = this.state, U = $.horizontalScrollDirection, V = $.scrollLeft, K = $.scrollTop, X = $.scrollUpdateWasRequested, Q = $.verticalScrollDirection;
1543
1544
  this._callOnScroll(V, K, U, Q, X);
1544
1545
  }
1545
1546
  }, p._getHorizontalRangeToRender = function() {
1546
- var c = this.props, P = c.columnCount, v = c.overscanColumnCount, T = c.overscanColumnsCount, R = c.overscanCount, x = c.rowCount, I = this.state, O = I.horizontalScrollDirection, A = I.isScrolling, F = I.scrollLeft, L = v || T || R || 1;
1547
- if (P === 0 || x === 0)
1547
+ var c = this.props, _ = c.columnCount, v = c.overscanColumnCount, T = c.overscanColumnsCount, R = c.overscanCount, x = c.rowCount, I = this.state, O = I.horizontalScrollDirection, A = I.isScrolling, F = I.scrollLeft, L = v || T || R || 1;
1548
+ if (_ === 0 || x === 0)
1548
1549
  return [0, 0, 0, 0];
1549
1550
  var N = o(this.props, F, this._instanceProps), D = r(this.props, N, F, this._instanceProps), k = !A || O === "backward" ? Math.max(1, L) : 1, q = !A || O === "forward" ? Math.max(1, L) : 1;
1550
- return [Math.max(0, N - k), Math.max(0, Math.min(P - 1, D + q)), N, D];
1551
+ return [Math.max(0, N - k), Math.max(0, Math.min(_ - 1, D + q)), N, D];
1551
1552
  }, p._getVerticalRangeToRender = function() {
1552
- var c = this.props, P = c.columnCount, v = c.overscanCount, T = c.overscanRowCount, R = c.overscanRowsCount, x = c.rowCount, I = this.state, O = I.isScrolling, A = I.verticalScrollDirection, F = I.scrollTop, L = T || R || v || 1;
1553
- if (P === 0 || x === 0)
1553
+ var c = this.props, _ = c.columnCount, v = c.overscanCount, T = c.overscanRowCount, R = c.overscanRowsCount, x = c.rowCount, I = this.state, O = I.isScrolling, A = I.verticalScrollDirection, F = I.scrollTop, L = T || R || v || 1;
1554
+ if (_ === 0 || x === 0)
1554
1555
  return [0, 0, 0, 0];
1555
- var N = h(this.props, F, this._instanceProps), D = w(this.props, N, F, this._instanceProps), k = !O || A === "backward" ? Math.max(1, L) : 1, q = !O || A === "forward" ? Math.max(1, L) : 1;
1556
+ var N = h(this.props, F, this._instanceProps), D = b(this.props, N, F, this._instanceProps), k = !O || A === "backward" ? Math.max(1, L) : 1, q = !O || A === "forward" ? Math.max(1, L) : 1;
1556
1557
  return [Math.max(0, N - k), Math.max(0, Math.min(x - 1, D + q)), N, D];
1557
1558
  }, f;
1558
1559
  }(tr), e.defaultProps = {
@@ -1562,9 +1563,9 @@ function Zo(t) {
1562
1563
  }, e;
1563
1564
  }
1564
1565
  var jo = function(e, n) {
1565
- var o = e.children, r = e.direction, a = e.height, s = e.innerTagName, l = e.outerTagName, u = e.overscanColumnsCount, d = e.overscanCount, m = e.overscanRowsCount, b = e.width, h = n.instance;
1566
+ var o = e.children, r = e.direction, i = e.height, s = e.innerTagName, l = e.outerTagName, d = e.overscanColumnsCount, u = e.overscanCount, m = e.overscanRowsCount, P = e.width, h = n.instance;
1566
1567
  if (process.env.NODE_ENV !== "production") {
1567
- if (typeof d == "number" && je && !je.has(h) && (je.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof u == "number" || typeof m == "number") && Ke && !Ke.has(h) && (Ke.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (s != null || l != null) && Xe && !Xe.has(h) && (Xe.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1568
+ if (typeof u == "number" && je && !je.has(h) && (je.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof m == "number") && Ke && !Ke.has(h) && (Ke.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (s != null || l != null) && Xe && !Xe.has(h) && (Xe.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1568
1569
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
1569
1570
  switch (r) {
1570
1571
  case "ltr":
@@ -1573,74 +1574,74 @@ var jo = function(e, n) {
1573
1574
  default:
1574
1575
  throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + r + '" was specified.'));
1575
1576
  }
1576
- if (typeof b != "number")
1577
- throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (b === null ? "null" : typeof b) + '" was specified.'));
1578
- if (typeof a != "number")
1579
- throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
1577
+ if (typeof P != "number")
1578
+ throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (P === null ? "null" : typeof P) + '" was specified.'));
1579
+ if (typeof i != "number")
1580
+ throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (i === null ? "null" : typeof i) + '" was specified.'));
1580
1581
  }
1581
1582
  }, Kt = 50, Sn = function(e, n) {
1582
- var o = e.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, s = n.lastMeasuredRowIndex, l = 0;
1583
+ var o = e.rowCount, r = n.rowMetadataMap, i = n.estimatedRowHeight, s = n.lastMeasuredRowIndex, l = 0;
1583
1584
  if (s >= o && (s = o - 1), s >= 0) {
1584
- var u = r[s];
1585
- l = u.offset + u.size;
1585
+ var d = r[s];
1586
+ l = d.offset + d.size;
1586
1587
  }
1587
- var d = o - s - 1, m = d * a;
1588
+ var u = o - s - 1, m = u * i;
1588
1589
  return l + m;
1589
1590
  }, xn = function(e, n) {
1590
- var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, s = n.lastMeasuredColumnIndex, l = 0;
1591
+ var o = e.columnCount, r = n.columnMetadataMap, i = n.estimatedColumnWidth, s = n.lastMeasuredColumnIndex, l = 0;
1591
1592
  if (s >= o && (s = o - 1), s >= 0) {
1592
- var u = r[s];
1593
- l = u.offset + u.size;
1593
+ var d = r[s];
1594
+ l = d.offset + d.size;
1594
1595
  }
1595
- var d = o - s - 1, m = d * a;
1596
+ var u = o - s - 1, m = u * i;
1596
1597
  return l + m;
1597
1598
  }, fe = function(e, n, o, r) {
1598
- var a, s, l;
1599
- if (e === "column" ? (a = r.columnMetadataMap, s = n.columnWidth, l = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, s = n.rowHeight, l = r.lastMeasuredRowIndex), o > l) {
1600
- var u = 0;
1599
+ var i, s, l;
1600
+ if (e === "column" ? (i = r.columnMetadataMap, s = n.columnWidth, l = r.lastMeasuredColumnIndex) : (i = r.rowMetadataMap, s = n.rowHeight, l = r.lastMeasuredRowIndex), o > l) {
1601
+ var d = 0;
1601
1602
  if (l >= 0) {
1602
- var d = a[l];
1603
- u = d.offset + d.size;
1603
+ var u = i[l];
1604
+ d = u.offset + u.size;
1604
1605
  }
1605
1606
  for (var m = l + 1; m <= o; m++) {
1606
- var b = s(m);
1607
- a[m] = {
1608
- offset: u,
1609
- size: b
1610
- }, u += b;
1607
+ var P = s(m);
1608
+ i[m] = {
1609
+ offset: d,
1610
+ size: P
1611
+ }, d += P;
1611
1612
  }
1612
1613
  e === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
1613
1614
  }
1614
- return a[o];
1615
+ return i[o];
1615
1616
  }, Xt = function(e, n, o, r) {
1616
- var a, s;
1617
- e === "column" ? (a = o.columnMetadataMap, s = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, s = o.lastMeasuredRowIndex);
1618
- var l = s > 0 ? a[s].offset : 0;
1617
+ var i, s;
1618
+ e === "column" ? (i = o.columnMetadataMap, s = o.lastMeasuredColumnIndex) : (i = o.rowMetadataMap, s = o.lastMeasuredRowIndex);
1619
+ var l = s > 0 ? i[s].offset : 0;
1619
1620
  return l >= r ? In(e, n, o, s, 0, r) : Ko(e, n, o, Math.max(0, s), r);
1620
- }, In = function(e, n, o, r, a, s) {
1621
- for (; a <= r; ) {
1622
- var l = a + Math.floor((r - a) / 2), u = fe(e, n, l, o).offset;
1623
- if (u === s)
1621
+ }, In = function(e, n, o, r, i, s) {
1622
+ for (; i <= r; ) {
1623
+ var l = i + Math.floor((r - i) / 2), d = fe(e, n, l, o).offset;
1624
+ if (d === s)
1624
1625
  return l;
1625
- u < s ? a = l + 1 : u > s && (r = l - 1);
1626
+ d < s ? i = l + 1 : d > s && (r = l - 1);
1626
1627
  }
1627
- return a > 0 ? a - 1 : 0;
1628
- }, Ko = function(e, n, o, r, a) {
1629
- for (var s = e === "column" ? n.columnCount : n.rowCount, l = 1; r < s && fe(e, n, r, o).offset < a; )
1628
+ return i > 0 ? i - 1 : 0;
1629
+ }, Ko = function(e, n, o, r, i) {
1630
+ for (var s = e === "column" ? n.columnCount : n.rowCount, l = 1; r < s && fe(e, n, r, o).offset < i; )
1630
1631
  r += l, l *= 2;
1631
- return In(e, n, o, Math.min(r, s - 1), Math.floor(r / 2), a);
1632
- }, Qt = function(e, n, o, r, a, s, l) {
1633
- var u = e === "column" ? n.width : n.height, d = fe(e, n, o, s), m = e === "column" ? xn(n, s) : Sn(n, s), b = Math.max(0, Math.min(m - u, d.offset)), h = Math.max(0, d.offset - u + l + d.size);
1634
- switch (r === "smart" && (a >= h - u && a <= b + u ? r = "auto" : r = "center"), r) {
1632
+ return In(e, n, o, Math.min(r, s - 1), Math.floor(r / 2), i);
1633
+ }, Qt = function(e, n, o, r, i, s, l) {
1634
+ var d = e === "column" ? n.width : n.height, u = fe(e, n, o, s), m = e === "column" ? xn(n, s) : Sn(n, s), P = Math.max(0, Math.min(m - d, u.offset)), h = Math.max(0, u.offset - d + l + u.size);
1635
+ switch (r === "smart" && (i >= h - d && i <= P + d ? r = "auto" : r = "center"), r) {
1635
1636
  case "start":
1636
- return b;
1637
+ return P;
1637
1638
  case "end":
1638
1639
  return h;
1639
1640
  case "center":
1640
- return Math.round(h + (b - h) / 2);
1641
+ return Math.round(h + (P - h) / 2);
1641
1642
  case "auto":
1642
1643
  default:
1643
- return a >= h && a <= b ? a : h > b || a < h ? h : b;
1644
+ return i >= h && i <= P ? i : h > P || i < h ? h : P;
1644
1645
  }
1645
1646
  }, Xo = /* @__PURE__ */ Zo({
1646
1647
  getColumnOffset: function(e, n, o) {
@@ -1650,8 +1651,8 @@ var jo = function(e, n) {
1650
1651
  return Xt("column", e, o, n);
1651
1652
  },
1652
1653
  getColumnStopIndexForStartIndex: function(e, n, o, r) {
1653
- for (var a = e.columnCount, s = e.width, l = fe("column", e, n, r), u = o + s, d = l.offset + l.size, m = n; m < a - 1 && d < u; )
1654
- m++, d += fe("column", e, m, r).size;
1654
+ for (var i = e.columnCount, s = e.width, l = fe("column", e, n, r), d = o + s, u = l.offset + l.size, m = n; m < i - 1 && u < d; )
1655
+ m++, u += fe("column", e, m, r).size;
1655
1656
  return m;
1656
1657
  },
1657
1658
  getColumnWidth: function(e, n, o) {
@@ -1659,11 +1660,11 @@ var jo = function(e, n) {
1659
1660
  },
1660
1661
  getEstimatedTotalHeight: Sn,
1661
1662
  getEstimatedTotalWidth: xn,
1662
- getOffsetForColumnAndAlignment: function(e, n, o, r, a, s) {
1663
- return Qt("column", e, n, o, r, a, s);
1663
+ getOffsetForColumnAndAlignment: function(e, n, o, r, i, s) {
1664
+ return Qt("column", e, n, o, r, i, s);
1664
1665
  },
1665
- getOffsetForRowAndAlignment: function(e, n, o, r, a, s) {
1666
- return Qt("row", e, n, o, r, a, s);
1666
+ getOffsetForRowAndAlignment: function(e, n, o, r, i, s) {
1667
+ return Qt("row", e, n, o, r, i, s);
1667
1668
  },
1668
1669
  getRowOffset: function(e, n, o) {
1669
1670
  return fe("row", e, n, o).offset;
@@ -1675,32 +1676,32 @@ var jo = function(e, n) {
1675
1676
  return Xt("row", e, o, n);
1676
1677
  },
1677
1678
  getRowStopIndexForStartIndex: function(e, n, o, r) {
1678
- for (var a = e.rowCount, s = e.height, l = fe("row", e, n, r), u = o + s, d = l.offset + l.size, m = n; m < a - 1 && d < u; )
1679
- m++, d += fe("row", e, m, r).size;
1679
+ for (var i = e.rowCount, s = e.height, l = fe("row", e, n, r), d = o + s, u = l.offset + l.size, m = n; m < i - 1 && u < d; )
1680
+ m++, u += fe("row", e, m, r).size;
1680
1681
  return m;
1681
1682
  },
1682
1683
  initInstanceProps: function(e, n) {
1683
- var o = e, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, s = {
1684
+ var o = e, r = o.estimatedColumnWidth, i = o.estimatedRowHeight, s = {
1684
1685
  columnMetadataMap: {},
1685
1686
  estimatedColumnWidth: r || Kt,
1686
- estimatedRowHeight: a || Kt,
1687
+ estimatedRowHeight: i || Kt,
1687
1688
  lastMeasuredColumnIndex: -1,
1688
1689
  lastMeasuredRowIndex: -1,
1689
1690
  rowMetadataMap: {}
1690
1691
  };
1691
- return n.resetAfterColumnIndex = function(l, u) {
1692
- u === void 0 && (u = !0), n.resetAfterIndices({
1692
+ return n.resetAfterColumnIndex = function(l, d) {
1693
+ d === void 0 && (d = !0), n.resetAfterIndices({
1693
1694
  columnIndex: l,
1694
- shouldForceUpdate: u
1695
+ shouldForceUpdate: d
1695
1696
  });
1696
- }, n.resetAfterRowIndex = function(l, u) {
1697
- u === void 0 && (u = !0), n.resetAfterIndices({
1697
+ }, n.resetAfterRowIndex = function(l, d) {
1698
+ d === void 0 && (d = !0), n.resetAfterIndices({
1698
1699
  rowIndex: l,
1699
- shouldForceUpdate: u
1700
+ shouldForceUpdate: d
1700
1701
  });
1701
1702
  }, n.resetAfterIndices = function(l) {
1702
- var u = l.columnIndex, d = l.rowIndex, m = l.shouldForceUpdate, b = m === void 0 ? !0 : m;
1703
- typeof u == "number" && (s.lastMeasuredColumnIndex = Math.min(s.lastMeasuredColumnIndex, u - 1)), typeof d == "number" && (s.lastMeasuredRowIndex = Math.min(s.lastMeasuredRowIndex, d - 1)), n._getItemStyleCache(-1), b && n.forceUpdate();
1703
+ var d = l.columnIndex, u = l.rowIndex, m = l.shouldForceUpdate, P = m === void 0 ? !0 : m;
1704
+ typeof d == "number" && (s.lastMeasuredColumnIndex = Math.min(s.lastMeasuredColumnIndex, d - 1)), typeof u == "number" && (s.lastMeasuredRowIndex = Math.min(s.lastMeasuredRowIndex, u - 1)), n._getItemStyleCache(-1), P && n.forceUpdate();
1704
1705
  }, s;
1705
1706
  },
1706
1707
  shouldResetStyleCacheOnItemSizeChange: !1,
@@ -1726,23 +1727,23 @@ function Yt(t, e) {
1726
1727
  }
1727
1728
  var Qo = ["style"], Yo = ["style"];
1728
1729
  function Jo(t, e) {
1729
- var n = t.style, o = Vt(t, Qo), r = e.style, a = Vt(e, Yo);
1730
- return !Yt(n, r) && !Yt(o, a);
1730
+ var n = t.style, o = Vt(t, Qo), r = e.style, i = Vt(e, Yo);
1731
+ return !Yt(n, r) && !Yt(o, i);
1731
1732
  }
1732
1733
  const ei = () => {
1733
- const { viewMode: t } = Oe(), { scrollMode: e } = Ne(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = qe(), a = W(() => r.heights.length, [r.heights]), s = W(() => e === ne.HORIZONTAL_SCROLLING ? a : t === Le.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), l = W(() => r.widths.reduce((C, y, _) => {
1734
- const S = _ % s;
1734
+ const { viewMode: t } = Oe(), { scrollMode: e } = Ne(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = qe(), i = W(() => r.heights.length, [r.heights]), s = W(() => e === ne.HORIZONTAL_SCROLLING ? i : t === Le.DUAL_PAGE ? 2 : 1, [t, e, e, i, o]), l = W(() => r.widths.reduce((C, y, w) => {
1735
+ const S = w % s;
1735
1736
  return (!C[S] || y > C[S]) && (C[S] = y), C;
1736
- }, []), [r.widths, s]), u = E(
1737
- (w) => {
1738
- const C = w % l.length;
1737
+ }, []), [r.widths, s]), d = E(
1738
+ (b) => {
1739
+ const C = b % l.length;
1739
1740
  return l[C] || 0;
1740
1741
  },
1741
1742
  [l]
1742
- ), d = E(
1743
- (w) => {
1744
- const C = Array.from({ length: s }, (y, _) => {
1745
- const S = w * s + _;
1743
+ ), u = E(
1744
+ (b) => {
1745
+ const C = Array.from({ length: s }, (y, w) => {
1746
+ const S = b * s + w;
1746
1747
  return r.heights[S] || 0;
1747
1748
  });
1748
1749
  return Math.max(...C);
@@ -1752,14 +1753,14 @@ const ei = () => {
1752
1753
  z(() => {
1753
1754
  n(s);
1754
1755
  }, [s, n]);
1755
- const m = W(() => e === ne.HORIZONTAL_SCROLLING || e === ne.PAGE_SCROLLING ? 1 : Math.round(a / s), [s, a, e]), b = W(() => r.heights.reduce((w, C) => w + C, 0) / r.heights.length || 0, [r]), h = W(() => r.widths.reduce((w, C) => w + C, 0) / r.heights.length || 0, [r]);
1756
+ const m = W(() => e === ne.HORIZONTAL_SCROLLING || e === ne.PAGE_SCROLLING ? 1 : Math.round(i / s), [s, i, e]), P = W(() => r.heights.reduce((b, C) => b + C, 0) / r.heights.length || 0, [r]), h = W(() => r.widths.reduce((b, C) => b + C, 0) / r.heights.length || 0, [r]);
1756
1757
  return {
1757
1758
  rowCount: m,
1758
- rowHeight: d,
1759
+ rowHeight: u,
1759
1760
  columnCount: s,
1760
- columnWidth: u,
1761
+ columnWidth: d,
1761
1762
  pageDimension: r,
1762
- estimatedRowHeight: b,
1763
+ estimatedRowHeight: P,
1763
1764
  estimatedColumnWidth: h
1764
1765
  };
1765
1766
  };
@@ -1780,68 +1781,68 @@ ft == null || tn == null ? (bt = ht, Ct = function(e) {
1780
1781
  return [n, o];
1781
1782
  });
1782
1783
  function ti(t) {
1783
- let e, n, o, r, a, s, l;
1784
- const u = typeof document < "u" && document.attachEvent;
1785
- if (!u) {
1784
+ let e, n, o, r, i, s, l;
1785
+ const d = typeof document < "u" && document.attachEvent;
1786
+ if (!d) {
1786
1787
  s = function(S) {
1787
1788
  const f = S.__resizeTriggers__, p = f.firstElementChild, g = f.lastElementChild, c = p.firstElementChild;
1788
1789
  g.scrollLeft = g.scrollWidth, g.scrollTop = g.scrollHeight, c.style.width = p.offsetWidth + 1 + "px", c.style.height = p.offsetHeight + 1 + "px", p.scrollLeft = p.scrollWidth, p.scrollTop = p.scrollHeight;
1789
- }, a = function(S) {
1790
+ }, i = function(S) {
1790
1791
  return S.offsetWidth !== S.__resizeLast__.width || S.offsetHeight !== S.__resizeLast__.height;
1791
1792
  }, l = function(S) {
1792
1793
  if (S.target.className && typeof S.target.className.indexOf == "function" && S.target.className.indexOf("contract-trigger") < 0 && S.target.className.indexOf("expand-trigger") < 0)
1793
1794
  return;
1794
1795
  const f = this;
1795
1796
  s(this), this.__resizeRAF__ && bt(this.__resizeRAF__), this.__resizeRAF__ = Ct(function() {
1796
- a(f) && (f.__resizeLast__.width = f.offsetWidth, f.__resizeLast__.height = f.offsetHeight, f.__resizeListeners__.forEach(function(c) {
1797
+ i(f) && (f.__resizeLast__.width = f.offsetWidth, f.__resizeLast__.height = f.offsetHeight, f.__resizeListeners__.forEach(function(c) {
1797
1798
  c.call(f, S);
1798
1799
  }));
1799
1800
  });
1800
1801
  };
1801
- let h = !1, w = "";
1802
+ let h = !1, b = "";
1802
1803
  o = "animationstart";
1803
1804
  const C = "Webkit Moz O ms".split(" ");
1804
- let y = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), _ = "";
1805
+ let y = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), w = "";
1805
1806
  {
1806
1807
  const S = document.createElement("fakeelement");
1807
1808
  if (S.style.animationName !== void 0 && (h = !0), h === !1) {
1808
1809
  for (let f = 0; f < C.length; f++)
1809
1810
  if (S.style[C[f] + "AnimationName"] !== void 0) {
1810
- _ = C[f], w = "-" + _.toLowerCase() + "-", o = y[f], h = !0;
1811
+ w = C[f], b = "-" + w.toLowerCase() + "-", o = y[f], h = !0;
1811
1812
  break;
1812
1813
  }
1813
1814
  }
1814
1815
  }
1815
- n = "resizeanim", e = "@" + w + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = w + "animation: 1ms " + n + "; ";
1816
+ n = "resizeanim", e = "@" + b + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = b + "animation: 1ms " + n + "; ";
1816
1817
  }
1817
- const d = function(h) {
1818
+ const u = function(h) {
1818
1819
  if (!h.getElementById("detectElementResize")) {
1819
- const w = (e || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', C = h.head || h.getElementsByTagName("head")[0], y = h.createElement("style");
1820
- y.id = "detectElementResize", y.type = "text/css", t != null && y.setAttribute("nonce", t), y.styleSheet ? y.styleSheet.cssText = w : y.appendChild(h.createTextNode(w)), C.appendChild(y);
1820
+ const b = (e || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', C = h.head || h.getElementsByTagName("head")[0], y = h.createElement("style");
1821
+ y.id = "detectElementResize", y.type = "text/css", t != null && y.setAttribute("nonce", t), y.styleSheet ? y.styleSheet.cssText = b : y.appendChild(h.createTextNode(b)), C.appendChild(y);
1821
1822
  }
1822
1823
  };
1823
1824
  return {
1824
- addResizeListener: function(h, w) {
1825
- if (u)
1826
- h.attachEvent("onresize", w);
1825
+ addResizeListener: function(h, b) {
1826
+ if (d)
1827
+ h.attachEvent("onresize", b);
1827
1828
  else {
1828
1829
  if (!h.__resizeTriggers__) {
1829
1830
  const C = h.ownerDocument, y = ae.getComputedStyle(h);
1830
- y && y.position === "static" && (h.style.position = "relative"), d(C), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = C.createElement("div")).className = "resize-triggers";
1831
- const _ = C.createElement("div");
1832
- _.className = "expand-trigger", _.appendChild(C.createElement("div"));
1831
+ y && y.position === "static" && (h.style.position = "relative"), u(C), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = C.createElement("div")).className = "resize-triggers";
1832
+ const w = C.createElement("div");
1833
+ w.className = "expand-trigger", w.appendChild(C.createElement("div"));
1833
1834
  const S = C.createElement("div");
1834
- S.className = "contract-trigger", h.__resizeTriggers__.appendChild(_), h.__resizeTriggers__.appendChild(S), h.appendChild(h.__resizeTriggers__), s(h), h.addEventListener("scroll", l, !0), o && (h.__resizeTriggers__.__animationListener__ = function(p) {
1835
+ S.className = "contract-trigger", h.__resizeTriggers__.appendChild(w), h.__resizeTriggers__.appendChild(S), h.appendChild(h.__resizeTriggers__), s(h), h.addEventListener("scroll", l, !0), o && (h.__resizeTriggers__.__animationListener__ = function(p) {
1835
1836
  p.animationName === n && s(h);
1836
1837
  }, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
1837
1838
  }
1838
- h.__resizeListeners__.push(w);
1839
+ h.__resizeListeners__.push(b);
1839
1840
  }
1840
1841
  },
1841
- removeResizeListener: function(h, w) {
1842
- if (u)
1843
- h.detachEvent("onresize", w);
1844
- else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(w), 1), !h.__resizeListeners__.length) {
1842
+ removeResizeListener: function(h, b) {
1843
+ if (d)
1844
+ h.detachEvent("onresize", b);
1845
+ else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(b), 1), !h.__resizeListeners__.length) {
1845
1846
  h.removeEventListener("scroll", l, !0), h.__resizeTriggers__.__animationListener__ && (h.__resizeTriggers__.removeEventListener(o, h.__resizeTriggers__.__animationListener__), h.__resizeTriggers__.__animationListener__ = null);
1846
1847
  try {
1847
1848
  h.__resizeTriggers__ = !h.removeChild(h.__resizeTriggers__);
@@ -1864,24 +1865,24 @@ class ni extends nr {
1864
1865
  onResize: r
1865
1866
  } = this.props;
1866
1867
  if (this._parentNode) {
1867
- const a = window.getComputedStyle(this._parentNode) || {}, s = parseFloat(a.paddingLeft || "0"), l = parseFloat(a.paddingRight || "0"), u = parseFloat(a.paddingTop || "0"), d = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), b = m.height - u - d, h = m.width - s - l;
1868
- if (!n && this.state.height !== b || !o && this.state.width !== h) {
1868
+ const i = window.getComputedStyle(this._parentNode) || {}, s = parseFloat(i.paddingLeft || "0"), l = parseFloat(i.paddingRight || "0"), d = parseFloat(i.paddingTop || "0"), u = parseFloat(i.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), P = m.height - d - u, h = m.width - s - l;
1869
+ if (!n && this.state.height !== P || !o && this.state.width !== h) {
1869
1870
  this.setState({
1870
- height: b,
1871
+ height: P,
1871
1872
  width: h
1872
1873
  });
1873
- const w = () => {
1874
+ const b = () => {
1874
1875
  this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
1875
1876
  };
1876
1877
  typeof r == "function" && r({
1877
- height: b,
1878
+ height: P,
1878
1879
  width: h,
1879
1880
  // TODO Remove these params in the next major release
1880
1881
  get scaledHeight() {
1881
- return w(), b;
1882
+ return b(), P;
1882
1883
  },
1883
1884
  get scaledWidth() {
1884
- return w(), h;
1885
+ return b(), h;
1885
1886
  }
1886
1887
  });
1887
1888
  }
@@ -1911,125 +1912,123 @@ class ni extends nr {
1911
1912
  defaultHeight: n,
1912
1913
  defaultWidth: o,
1913
1914
  disableHeight: r = !1,
1914
- disableWidth: a = !1,
1915
+ disableWidth: i = !1,
1915
1916
  doNotBailOutOnEmptyChildren: s = !1,
1916
1917
  nonce: l,
1917
- onResize: u,
1918
- style: d = {},
1918
+ onResize: d,
1919
+ style: u = {},
1919
1920
  tagName: m = "div",
1920
- ...b
1921
+ ...P
1921
1922
  } = this.props, {
1922
1923
  height: h,
1923
- width: w
1924
+ width: b
1924
1925
  } = this.state, C = {
1925
1926
  overflow: "visible"
1926
1927
  }, y = {};
1927
- let _ = !1;
1928
- return r || (h === 0 && (_ = !0), C.height = 0, y.height = h, y.scaledHeight = h), a || (w === 0 && (_ = !0), C.width = 0, y.width = w, y.scaledWidth = w), s && (_ = !1), Ze(m, {
1928
+ let w = !1;
1929
+ return r || (h === 0 && (w = !0), C.height = 0, y.height = h, y.scaledHeight = h), i || (b === 0 && (w = !0), C.width = 0, y.width = b, y.scaledWidth = b), s && (w = !1), Ze(m, {
1929
1930
  ref: this._setRef,
1930
1931
  style: {
1931
1932
  ...C,
1932
- ...d
1933
+ ...u
1933
1934
  },
1934
- ...b
1935
- }, !_ && e(y));
1935
+ ...P
1936
+ }, !w && e(y));
1936
1937
  }
1937
1938
  }
1938
1939
  const ri = ln(({ widths: t, heights: e }) => {
1939
1940
  const { focusedPage: n, totalPages: o } = oe(), r = W(() => {
1940
- const l = [], u = Math.ceil(n / 2) * 2 - 1;
1941
- if (l.push(u), u + 1 <= o) {
1942
- const d = u + 1;
1943
- l.push(d);
1941
+ const l = [], d = Math.ceil(n / 2) * 2 - 1;
1942
+ if (l.push(d), d + 1 <= o) {
1943
+ const u = d + 1;
1944
+ l.push(u);
1944
1945
  }
1945
1946
  return l;
1946
- }, [n, o]), a = W(() => {
1947
- const l = n % 2 === 1 ? n - 1 : n - 2, u = t(l), d = e(l), m = t(l + 1), b = e(l + 1), h = d > b ? d : b, w = d < b ? d : b, C = h / 2 - w / 2;
1947
+ }, [n, o]), i = W(() => {
1948
+ const l = n % 2 === 1 ? n - 1 : n - 2, d = Math.floor(l / 2), u = e(d), m = t(l), P = t(l + 1);
1948
1949
  return [
1949
1950
  {
1950
1951
  position: "absolute",
1951
1952
  left: 0,
1952
- top: h === d ? 0 : C,
1953
- width: u,
1954
- height: d
1953
+ width: m,
1954
+ height: u
1955
1955
  },
1956
1956
  {
1957
1957
  position: "absolute",
1958
- left: u,
1959
- top: h === b ? 0 : C,
1960
- width: m,
1961
- height: b
1958
+ left: m,
1959
+ width: P,
1960
+ height: u
1962
1961
  }
1963
1962
  ];
1964
- }, [t, e, r]), s = W(() => a.reduce((l, u) => l + Number(u.width || 0), 0), [a]);
1965
- return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: r.map((l, u) => /* @__PURE__ */ i(Lt, { style: a[u], pageNumber: l }, l)) });
1963
+ }, [t, e, r]), s = W(() => i.reduce((l, d) => l + Number(d.width || 0), 0), [i]);
1964
+ return /* @__PURE__ */ a("div", { style: { width: s, position: "relative" }, children: r.map((l, d) => /* @__PURE__ */ a(Lt, { style: i[d], pageNumber: l }, l)) });
1966
1965
  }), oi = ({ widths: t, heights: e }) => {
1967
1966
  const { focusedPage: n } = oe(), o = W(() => ({
1968
1967
  position: "absolute",
1969
1968
  width: t(n - 1),
1970
1969
  height: e(n - 1)
1971
1970
  }), [t, e, n]), r = W(() => t(n - 1), [t]);
1972
- return /* @__PURE__ */ i(
1971
+ return /* @__PURE__ */ a(
1973
1972
  "div",
1974
1973
  {
1975
1974
  style: {
1976
1975
  width: r,
1977
1976
  position: "relative"
1978
1977
  },
1979
- children: /* @__PURE__ */ i(Lt, { style: o, pageNumber: n }, n)
1978
+ children: /* @__PURE__ */ a(Lt, { style: o, pageNumber: n }, n)
1980
1979
  }
1981
1980
  );
1982
1981
  }, ii = (t, e, n) => {
1983
- const o = $(), { contentRef: r } = ge(), { heights: a, widths: s } = qe(), { setFocusedPage: l } = oe(), [u, d] = G([]), { targetScrollPage: m } = pn(), b = Tt(u, 0, 500), h = W(() => a.map((C, y) => {
1984
- const _ = s[y], S = Zr(y + 1, t), f = _ * S.columnIndex, p = C * S.rowIndex, g = f + _, c = p + C;
1982
+ const o = H(), { contentRef: r } = ge(), { heights: i, widths: s } = qe(), { setFocusedPage: l } = oe(), [d, u] = G([]), { targetScrollPage: m } = pn(), P = Tt(d, 0, 500), h = W(() => i.map((C, y) => {
1983
+ const w = s[y], S = Zr(y + 1, t), f = w * S.columnIndex, p = C * S.rowIndex, g = f + w, c = p + C;
1985
1984
  return {
1986
1985
  pageNumber: y + 1,
1987
1986
  ...S,
1988
- width: _,
1987
+ width: w,
1989
1988
  height: C,
1990
1989
  startX: f,
1991
1990
  startY: p,
1992
1991
  endX: g,
1993
1992
  endY: c
1994
1993
  };
1995
- }), [a, s, t, e]);
1994
+ }), [i, s, t, e]);
1996
1995
  z(() => {
1997
1996
  var y;
1998
- b.length > 0 && !m.current && l(b[0].pageNumber);
1999
- let C = (y = b[0]) == null ? void 0 : y.ratio;
2000
- C && b.filter((_) => Math.round(_.ratio) === Math.round(C)).some((_) => _.pageNumber === m.current) && setTimeout(() => {
1997
+ P.length > 0 && !m.current && l(P[0].pageNumber);
1998
+ let C = (y = P[0]) == null ? void 0 : y.ratio;
1999
+ C && P.filter((w) => Math.round(w.ratio) === Math.round(C)).some((w) => w.pageNumber === m.current) && setTimeout(() => {
2001
2000
  m.current = void 0;
2002
2001
  }, 500);
2003
- }, [b, l]);
2004
- const w = E(
2002
+ }, [P, l]);
2003
+ const b = E(
2005
2004
  (C) => {
2006
2005
  o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
2007
- const y = C.target, _ = {
2006
+ const y = C.target, w = {
2008
2007
  startTop: y.scrollTop,
2009
2008
  startLeft: y.scrollLeft,
2010
2009
  endTop: y.scrollTop + y.clientHeight,
2011
2010
  endLeft: y.scrollLeft + y.clientWidth
2012
2011
  }, S = h.filter((f) => {
2013
- const p = f.endX >= _.startLeft && f.endY >= _.startTop, g = f.startX <= _.endLeft && f.startY <= _.endTop;
2012
+ const p = f.endX >= w.startLeft && f.endY >= w.startTop, g = f.startX <= w.endLeft && f.startY <= w.endTop;
2014
2013
  return p && g;
2015
2014
  }).map((f) => {
2016
- const p = _.startLeft > f.startX ? _.startLeft : f.startX, g = _.startTop > f.startY ? _.startTop : f.startY, c = _.endLeft < f.endX ? _.endLeft : f.endX, P = _.endTop < f.endY ? _.endTop : f.endY, v = c - p, T = P - g, x = +(v * T / (f.width * f.height) * 100).toFixed(2);
2015
+ const p = w.startLeft > f.startX ? w.startLeft : f.startX, g = w.startTop > f.startY ? w.startTop : f.startY, c = w.endLeft < f.endX ? w.endLeft : f.endX, _ = w.endTop < f.endY ? w.endTop : f.endY, v = c - p, T = _ - g, x = +(v * T / (f.width * f.height) * 100).toFixed(2);
2017
2016
  return {
2018
2017
  pageNumber: f.pageNumber,
2019
2018
  ratio: x
2020
2019
  };
2021
2020
  }).sort((f, p) => p.ratio - f.ratio);
2022
- d(S);
2021
+ u(S);
2023
2022
  });
2024
2023
  },
2025
2024
  [r, h]
2026
2025
  );
2027
2026
  z(() => {
2028
2027
  if (n)
2029
- return n == null || n.addEventListener("scroll", w), () => {
2030
- n == null || n.removeEventListener("scroll", w);
2028
+ return n == null || n.addEventListener("scroll", b), () => {
2029
+ n == null || n.removeEventListener("scroll", b);
2031
2030
  };
2032
- }, [n, w]);
2031
+ }, [n, b]);
2033
2032
  }, be = {
2034
2033
  "rp-layout": "_rp-layout_1g4ff_1",
2035
2034
  "rp-content": "_rp-content_1g4ff_5",
@@ -2039,8 +2038,8 @@ const ri = ln(({ widths: t, heights: e }) => {
2039
2038
  "rp-theme-variables": "_rp-theme-variables_1g4ff_24",
2040
2039
  "rp-dark-mode": "_rp-dark-mode_1g4ff_135"
2041
2040
  }, Rn = Ve((t, e) => {
2042
- const { children: n, toolbarRef: o, style: r, className: a, ...s } = t, { customVariables: l, customDarkVariables: u } = _r(), { darkMode: d } = ir();
2043
- return /* @__PURE__ */ i(
2041
+ const { children: n, toolbarRef: o, style: r, className: i, ...s } = t, { customVariables: l, customDarkVariables: d } = _r(), { darkMode: u } = ir();
2042
+ return /* @__PURE__ */ a(
2044
2043
  "div",
2045
2044
  {
2046
2045
  ref: e,
@@ -2048,13 +2047,13 @@ const ri = ln(({ widths: t, heights: e }) => {
2048
2047
  className: re(
2049
2048
  be["rp-theme-variables"],
2050
2049
  be["rp-container"],
2051
- d ? be["rp-dark-mode"] : "",
2052
- a
2050
+ u ? be["rp-dark-mode"] : "",
2051
+ i
2053
2052
  ),
2054
2053
  style: {
2055
2054
  "--rp-toolbar-height": `${(o == null ? void 0 : o.clientHeight) || 48}px`,
2056
2055
  ...l,
2057
- ...d ? u : {},
2056
+ ...u ? d : {},
2058
2057
  ...r
2059
2058
  },
2060
2059
  children: n
@@ -2062,33 +2061,33 @@ const ri = ln(({ widths: t, heights: e }) => {
2062
2061
  );
2063
2062
  }), ai = ln(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
2064
2063
  const r = jr(e, t, n.columnCount);
2065
- return /* @__PURE__ */ i(Lt, { style: o, pageNumber: r }, r);
2064
+ return /* @__PURE__ */ a(Lt, { style: o, pageNumber: r }, r);
2066
2065
  }, Jo), Qs = () => {
2067
- const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = cr(), { pagesRef: o, setPagesRef: r } = ge(), { scrollToPage: a } = vn(), {
2066
+ const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = cr(), { pagesRef: o, setPagesRef: r } = ge(), { scrollToPage: i } = vn(), {
2068
2067
  virtualScrollRef: s,
2069
2068
  getVirtualScrollRef: l,
2070
- getPageScrollElementRef: u,
2071
- getVirtualScrollableElementRef: d,
2069
+ getPageScrollElementRef: d,
2070
+ getVirtualScrollableElementRef: u,
2072
2071
  setTotalInnerDimensions: m,
2073
- virtualScrollableElementRef: b,
2072
+ virtualScrollableElementRef: P,
2074
2073
  totalInnerDimensions: h,
2075
- pageScrollElementRef: w
2076
- } = et(), C = $(!0), { nextPage: y, prevPage: _, setFocusedPage: S, focusedPage: f } = oe(), { scrollMode: p } = Ne(), { viewMode: g } = Oe(), c = $(null), { loading: P } = J(), { passwordRequired: v } = or(), { LoaderImageComponent: T } = hn(), R = $(
2074
+ pageScrollElementRef: b
2075
+ } = et(), C = H(!0), { nextPage: y, prevPage: w, setFocusedPage: S, focusedPage: f } = oe(), { scrollMode: p } = Ne(), { viewMode: g } = Oe(), c = H(null), { loading: _ } = J(), { passwordRequired: v } = or(), { LoaderImageComponent: T } = hn(), R = H(
2077
2076
  h
2078
- ), x = $({
2077
+ ), x = H({
2079
2078
  viewMode: g,
2080
2079
  scrollMode: p
2081
- }), I = $(!1), O = $(), { isFullScreen: A } = lr(), {
2080
+ }), I = H(!1), O = H(), { isFullScreen: A } = lr(), {
2082
2081
  pageDimension: F,
2083
2082
  rowCount: L,
2084
2083
  rowHeight: N,
2085
2084
  columnCount: D,
2086
2085
  columnWidth: k,
2087
2086
  estimatedColumnWidth: q,
2088
- estimatedRowHeight: H
2089
- } = ei(), U = Tt(h, 100), V = $();
2090
- ii(D, L, b);
2091
- const K = $({
2087
+ estimatedRowHeight: $
2088
+ } = ei(), U = Tt(h, 100), V = H();
2089
+ ii(D, L, P);
2090
+ const K = H({
2092
2091
  scrollTop: 0,
2093
2092
  scrollLeft: 0
2094
2093
  });
@@ -2100,9 +2099,9 @@ const ri = ln(({ widths: t, heights: e }) => {
2100
2099
  }), [D]), we = E(
2101
2100
  (B) => {
2102
2101
  const Z = document.activeElement !== o;
2103
- !A && Z || (["ArrowUp", "ArrowLeft"].includes(B.key) ? (B.preventDefault(), _()) : ["ArrowDown", "ArrowRight"].includes(B.key) && (B.preventDefault(), y()));
2102
+ !A && Z || (["ArrowUp", "ArrowLeft"].includes(B.key) ? (B.preventDefault(), w()) : ["ArrowDown", "ArrowRight"].includes(B.key) && (B.preventDefault(), y()));
2104
2103
  },
2105
- [y, _, A, p]
2104
+ [y, w, A, p]
2106
2105
  );
2107
2106
  z(() => (window.addEventListener("keydown", we), () => {
2108
2107
  window.removeEventListener("keydown", we);
@@ -2118,19 +2117,19 @@ const ri = ln(({ widths: t, heights: e }) => {
2118
2117
  }, [L, D, F, s]);
2119
2118
  const Te = E(
2120
2119
  (B, Z) => {
2121
- if (!b)
2120
+ if (!P)
2122
2121
  return { scrollTop: 0, scrollLeft: 0 };
2123
2122
  const ye = K.current.scrollTop > Z, Se = K.current.scrollLeft > B;
2124
2123
  return ye || Se ? K.current : {
2125
- scrollTop: b.scrollTop,
2126
- scrollLeft: b.scrollLeft
2124
+ scrollTop: P.scrollTop,
2125
+ scrollLeft: P.scrollLeft
2127
2126
  };
2128
2127
  },
2129
- [b]
2128
+ [P]
2130
2129
  ), _e = E(
2131
2130
  (B, Z) => {
2132
2131
  if (x.current.viewMode !== g || x.current.scrollMode !== p) {
2133
- V.current && clearTimeout(V.current), I.current = !0, a(f, "auto"), V.current = setTimeout(() => {
2132
+ V.current && clearTimeout(V.current), I.current = !0, i(f, "auto"), V.current = setTimeout(() => {
2134
2133
  requestAnimationFrame(() => {
2135
2134
  x.current = { viewMode: g, scrollMode: p };
2136
2135
  });
@@ -2157,7 +2156,7 @@ const ri = ln(({ widths: t, heights: e }) => {
2157
2156
  width: Z.width
2158
2157
  };
2159
2158
  },
2160
- [s, g, p, a]
2159
+ [s, g, p, i]
2161
2160
  );
2162
2161
  z(() => {
2163
2162
  clearTimeout(O.current);
@@ -2180,7 +2179,7 @@ const ri = ln(({ widths: t, heights: e }) => {
2180
2179
  scrollLeft: B.scrollLeft
2181
2180
  };
2182
2181
  },
2183
- [b]
2182
+ [P]
2184
2183
  );
2185
2184
  z(() => () => {
2186
2185
  V.current && clearTimeout(V.current);
@@ -2198,36 +2197,36 @@ const ri = ln(({ widths: t, heights: e }) => {
2198
2197
  [ee, le, ue]
2199
2198
  );
2200
2199
  return z(() => {
2201
- P && de();
2202
- }, [P]), z(() => {
2200
+ _ && de();
2201
+ }, [_]), z(() => {
2203
2202
  if (!(U.height === 0 || !C.current)) {
2204
2203
  if (e === ne.PAGE_SCROLLING) {
2205
- t !== f && w && S(t), C.current = !1;
2204
+ t !== f && b && S(t), C.current = !1;
2206
2205
  return;
2207
2206
  }
2208
- a(t, "auto"), S(t), C.current = !1;
2207
+ i(t, "auto"), S(t), C.current = !1;
2209
2208
  }
2210
2209
  }, [
2211
- a,
2210
+ i,
2212
2211
  e,
2213
- w,
2212
+ b,
2214
2213
  S,
2215
2214
  U
2216
2215
  ]), /* @__PURE__ */ M(me, { children: [
2217
- /* @__PURE__ */ i(Rn, { id: n, ref: r, tabIndex: -1, className: ot, children: /* @__PURE__ */ i(ni, { style: { minHeight: "50px" }, children: ({ width: B, height: Z }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Xn, style: { width: B, height: Z }, children: p === ne.PAGE_SCROLLING ? /* @__PURE__ */ i(
2216
+ /* @__PURE__ */ a(Rn, { id: n, ref: r, tabIndex: -1, className: ot, children: /* @__PURE__ */ a(ni, { style: { minHeight: "50px" }, children: ({ width: B, height: Z }) => /* @__PURE__ */ a("div", { "data-rp": "pages", ref: Xn, style: { width: B, height: Z }, children: p === ne.PAGE_SCROLLING ? /* @__PURE__ */ a(
2218
2217
  "div",
2219
2218
  {
2220
- ref: u,
2219
+ ref: d,
2221
2220
  style: { width: B, height: Z },
2222
2221
  className: re(ue["rp-pages"], ue["rp-page-scrolling-wrapper"]),
2223
- children: g === Le.DUAL_PAGE ? /* @__PURE__ */ i(ri, { widths: k, heights: N }) : /* @__PURE__ */ i(oi, { widths: k, heights: N })
2222
+ children: g === Le.DUAL_PAGE ? /* @__PURE__ */ a(ri, { widths: k, heights: N }) : /* @__PURE__ */ a(oi, { widths: k, heights: N })
2224
2223
  }
2225
- ) : q ? /* @__PURE__ */ i(
2224
+ ) : q ? /* @__PURE__ */ a(
2226
2225
  Xo,
2227
2226
  {
2228
2227
  ref: l,
2229
2228
  itemData: Fe,
2230
- outerRef: d,
2229
+ outerRef: u,
2231
2230
  innerRef: c,
2232
2231
  onScroll: rt,
2233
2232
  columnCount: D,
@@ -2236,7 +2235,7 @@ const ri = ln(({ widths: t, heights: e }) => {
2236
2235
  height: Z,
2237
2236
  width: B,
2238
2237
  estimatedColumnWidth: q,
2239
- estimatedRowHeight: H,
2238
+ estimatedRowHeight: $,
2240
2239
  rowCount: L,
2241
2240
  className: re(
2242
2241
  ue["rp-pages"],
@@ -2244,7 +2243,7 @@ const ri = ln(({ widths: t, heights: e }) => {
2244
2243
  ),
2245
2244
  children: ai
2246
2245
  }
2247
- ) : P ? null : /* @__PURE__ */ i(
2246
+ ) : _ ? null : /* @__PURE__ */ a(
2248
2247
  "div",
2249
2248
  {
2250
2249
  className: ue["rp-loader"],
@@ -2255,10 +2254,10 @@ const ri = ln(({ widths: t, heights: e }) => {
2255
2254
  height: "100%",
2256
2255
  width: "100%"
2257
2256
  },
2258
- children: T && /* @__PURE__ */ i(T, {})
2257
+ children: T && /* @__PURE__ */ a(T, {})
2259
2258
  }
2260
2259
  ) }) }) }),
2261
- v && /* @__PURE__ */ i(Br, {})
2260
+ v && /* @__PURE__ */ a(Br, {})
2262
2261
  ] });
2263
2262
  }, ke = {
2264
2263
  "rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
@@ -2272,55 +2271,55 @@ const ri = ln(({ widths: t, heights: e }) => {
2272
2271
  "rp-total-page": "_rp-total-page_1y9vo_11"
2273
2272
  }, si = () => {
2274
2273
  const { prevIcon: t } = pe();
2275
- return t || /* @__PURE__ */ i(He, {});
2274
+ return t || /* @__PURE__ */ a(He, {});
2276
2275
  }, ci = () => {
2277
2276
  const { nextIcon: t } = pe();
2278
- return t || /* @__PURE__ */ i(He, { style: { transform: "rotate(180deg" } });
2277
+ return t || /* @__PURE__ */ a(He, { style: { transform: "rotate(180deg" } });
2279
2278
  }, li = () => {
2280
- const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = oe(), [s, l] = G(t.toString()), { pageNavigationTool: u = !0 } = ve(), { isSmallScreen: d } = Pe(), { localeMessages: m } = se(), { viewMode: b } = Oe(), { scrollMode: h } = Ne();
2279
+ const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: i } = oe(), [s, l] = G(t.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen: u } = Pe(), { localeMessages: m } = se(), { viewMode: P } = Oe(), { scrollMode: h } = Ne();
2281
2280
  z(() => {
2282
2281
  l(t.toString());
2283
2282
  }, [t]);
2284
- const w = E((f) => {
2283
+ const b = E((f) => {
2285
2284
  const p = f.target.value;
2286
2285
  l(p);
2287
2286
  }, []), C = E(async () => {
2288
- const f = a(s);
2287
+ const f = i(s);
2289
2288
  f.success || l(f.currentPage.toString());
2290
- }, [a, s, e]), y = E(() => {
2289
+ }, [i, s, e]), y = E(() => {
2291
2290
  l(t.toString());
2292
- }, [t]), _ = E(
2291
+ }, [t]), w = E(
2293
2292
  (f) => {
2294
2293
  f.key === "Enter" && C();
2295
2294
  },
2296
2295
  [C]
2297
- ), S = W(() => b === Le.DUAL_PAGE && h === ne.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, b, h]);
2298
- return typeof u != "boolean" ? /* @__PURE__ */ i(
2299
- u,
2296
+ ), S = W(() => P === Le.DUAL_PAGE && h === ne.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, P, h]);
2297
+ return typeof d != "boolean" ? /* @__PURE__ */ a(
2298
+ d,
2300
2299
  {
2301
2300
  total: e,
2302
2301
  current: t,
2303
2302
  nextPage: o,
2304
2303
  prevPage: r,
2305
- goToPage: a,
2304
+ goToPage: i,
2306
2305
  changePage: n
2307
2306
  }
2308
- ) : u ? /* @__PURE__ */ M("div", { className: mt["rp-paginate"], children: [
2309
- !d && /* @__PURE__ */ i(Y, { content: m == null ? void 0 : m.previousPageTooltip, children: /* @__PURE__ */ i(
2307
+ ) : d ? /* @__PURE__ */ M("div", { className: mt["rp-paginate"], children: [
2308
+ !u && /* @__PURE__ */ a(Y, { content: m == null ? void 0 : m.previousPageTooltip, children: /* @__PURE__ */ a(
2310
2309
  ie,
2311
2310
  {
2312
2311
  onClick: r,
2313
2312
  "aria-label": m == null ? void 0 : m.previousPageTooltip,
2314
2313
  "aria-disabled": t === 1,
2315
- children: /* @__PURE__ */ i(si, {})
2314
+ children: /* @__PURE__ */ a(si, {})
2316
2315
  }
2317
2316
  ) }),
2318
- /* @__PURE__ */ i(Y, { content: m == null ? void 0 : m.currentPageTooltip, children: /* @__PURE__ */ i(
2317
+ /* @__PURE__ */ a(Y, { content: m == null ? void 0 : m.currentPageTooltip, children: /* @__PURE__ */ a(
2319
2318
  dn,
2320
2319
  {
2321
- onKeyDown: _,
2320
+ onKeyDown: w,
2322
2321
  onBlur: y,
2323
- onChange: w,
2322
+ onChange: b,
2324
2323
  value: s,
2325
2324
  className: mt["rp-page-input"],
2326
2325
  id: "page-input",
@@ -2331,13 +2330,13 @@ const ri = ln(({ widths: t, heights: e }) => {
2331
2330
  "/",
2332
2331
  e
2333
2332
  ] }),
2334
- !d && /* @__PURE__ */ i(Y, { content: m == null ? void 0 : m.nextPageTooltip, children: /* @__PURE__ */ i(
2333
+ !u && /* @__PURE__ */ a(Y, { content: m == null ? void 0 : m.nextPageTooltip, children: /* @__PURE__ */ a(
2335
2334
  ie,
2336
2335
  {
2337
2336
  onClick: o,
2338
2337
  "aria-label": m == null ? void 0 : m.nextPageTooltip,
2339
2338
  "aria-disabled": S,
2340
- children: /* @__PURE__ */ i(ci, {})
2339
+ children: /* @__PURE__ */ a(ci, {})
2341
2340
  }
2342
2341
  ) })
2343
2342
  ] }) : null;
@@ -2348,26 +2347,26 @@ var nt = "Dialog", [Ln, Ys] = eo(nt), [di, ce] = Ln(nt), En = (t) => {
2348
2347
  children: n,
2349
2348
  open: o,
2350
2349
  defaultOpen: r,
2351
- onOpenChange: a,
2350
+ onOpenChange: i,
2352
2351
  modal: s = !0
2353
- } = t, l = j.useRef(null), u = j.useRef(null), [d, m] = no({
2352
+ } = t, l = j.useRef(null), d = j.useRef(null), [u, m] = no({
2354
2353
  prop: o,
2355
2354
  defaultProp: r ?? !1,
2356
- onChange: a,
2355
+ onChange: i,
2357
2356
  caller: nt
2358
2357
  });
2359
- return /* @__PURE__ */ i(
2358
+ return /* @__PURE__ */ a(
2360
2359
  di,
2361
2360
  {
2362
2361
  scope: e,
2363
2362
  triggerRef: l,
2364
- contentRef: u,
2363
+ contentRef: d,
2365
2364
  contentId: lt(),
2366
2365
  titleId: lt(),
2367
2366
  descriptionId: lt(),
2368
- open: d,
2367
+ open: u,
2369
2368
  onOpenChange: m,
2370
- onOpenToggle: j.useCallback(() => m((b) => !b), [m]),
2369
+ onOpenToggle: j.useCallback(() => m((P) => !P), [m]),
2371
2370
  modal: s,
2372
2371
  children: n
2373
2372
  }
@@ -2376,8 +2375,8 @@ var nt = "Dialog", [Ln, Ys] = eo(nt), [di, ce] = Ln(nt), En = (t) => {
2376
2375
  En.displayName = nt;
2377
2376
  var Nn = "DialogTrigger", ui = j.forwardRef(
2378
2377
  (t, e) => {
2379
- const { __scopeDialog: n, ...o } = t, r = ce(Nn, n), a = St(e, r.triggerRef);
2380
- return /* @__PURE__ */ i(
2378
+ const { __scopeDialog: n, ...o } = t, r = ce(Nn, n), i = St(e, r.triggerRef);
2379
+ return /* @__PURE__ */ a(
2381
2380
  Be.button,
2382
2381
  {
2383
2382
  type: "button",
@@ -2386,7 +2385,7 @@ var Nn = "DialogTrigger", ui = j.forwardRef(
2386
2385
  "aria-controls": r.contentId,
2387
2386
  "data-state": Ot(r.open),
2388
2387
  ...o,
2389
- ref: a,
2388
+ ref: i,
2390
2389
  onClick: Me(t.onClick, r.onOpenToggle)
2391
2390
  }
2392
2391
  );
@@ -2396,14 +2395,14 @@ ui.displayName = Nn;
2396
2395
  var Et = "DialogPortal", [pi, On] = Ln(Et, {
2397
2396
  forceMount: void 0
2398
2397
  }), Dn = (t) => {
2399
- const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = ce(Et, e);
2400
- return /* @__PURE__ */ i(pi, { scope: e, forceMount: n, children: j.Children.map(o, (s) => /* @__PURE__ */ i(xt, { present: n || a.open, children: /* @__PURE__ */ i(lo, { asChild: !0, container: r, children: s }) })) });
2398
+ const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, i = ce(Et, e);
2399
+ return /* @__PURE__ */ a(pi, { scope: e, forceMount: n, children: j.Children.map(o, (s) => /* @__PURE__ */ a(xt, { present: n || i.open, children: /* @__PURE__ */ a(lo, { asChild: !0, container: r, children: s }) })) });
2401
2400
  };
2402
2401
  Dn.displayName = Et;
2403
2402
  var Ye = "DialogOverlay", zn = j.forwardRef(
2404
2403
  (t, e) => {
2405
- const n = On(Ye, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Ye, t.__scopeDialog);
2406
- return a.modal ? /* @__PURE__ */ i(xt, { present: o || a.open, children: /* @__PURE__ */ i(fi, { ...r, ref: e }) }) : null;
2404
+ const n = On(Ye, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, i = ce(Ye, t.__scopeDialog);
2405
+ return i.modal ? /* @__PURE__ */ a(xt, { present: o || i.open, children: /* @__PURE__ */ a(fi, { ...r, ref: e }) }) : null;
2407
2406
  }
2408
2407
  );
2409
2408
  zn.displayName = Ye;
@@ -2413,7 +2412,7 @@ var hi = ro("DialogOverlay.RemoveScroll"), fi = j.forwardRef(
2413
2412
  return (
2414
2413
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2415
2414
  // ie. when `Overlay` and `Content` are siblings
2416
- /* @__PURE__ */ i(io, { as: hi, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
2415
+ /* @__PURE__ */ a(io, { as: hi, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ a(
2417
2416
  Be.div,
2418
2417
  {
2419
2418
  "data-state": Ot(r.open),
@@ -2426,8 +2425,8 @@ var hi = ro("DialogOverlay.RemoveScroll"), fi = j.forwardRef(
2426
2425
  }
2427
2426
  ), Ee = "DialogContent", An = j.forwardRef(
2428
2427
  (t, e) => {
2429
- const n = On(Ee, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Ee, t.__scopeDialog);
2430
- return /* @__PURE__ */ i(xt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(mi, { ...r, ref: e }) : /* @__PURE__ */ i(gi, { ...r, ref: e }) });
2428
+ const n = On(Ee, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, i = ce(Ee, t.__scopeDialog);
2429
+ return /* @__PURE__ */ a(xt, { present: o || i.open, children: i.modal ? /* @__PURE__ */ a(mi, { ...r, ref: e }) : /* @__PURE__ */ a(gi, { ...r, ref: e }) });
2431
2430
  }
2432
2431
  );
2433
2432
  An.displayName = Ee;
@@ -2435,27 +2434,27 @@ var mi = j.forwardRef(
2435
2434
  (t, e) => {
2436
2435
  const n = ce(Ee, t.__scopeDialog), o = j.useRef(null), r = St(e, n.contentRef, o);
2437
2436
  return j.useEffect(() => {
2438
- const a = o.current;
2439
- if (a)
2440
- return ao(a);
2441
- }, []), /* @__PURE__ */ i(
2437
+ const i = o.current;
2438
+ if (i)
2439
+ return ao(i);
2440
+ }, []), /* @__PURE__ */ a(
2442
2441
  Fn,
2443
2442
  {
2444
2443
  ...t,
2445
2444
  ref: r,
2446
2445
  trapFocus: n.open,
2447
2446
  disableOutsidePointerEvents: !0,
2448
- onCloseAutoFocus: Me(t.onCloseAutoFocus, (a) => {
2447
+ onCloseAutoFocus: Me(t.onCloseAutoFocus, (i) => {
2449
2448
  var s;
2450
- a.preventDefault(), (s = n.triggerRef.current) == null || s.focus();
2449
+ i.preventDefault(), (s = n.triggerRef.current) == null || s.focus();
2451
2450
  }),
2452
- onPointerDownOutside: Me(t.onPointerDownOutside, (a) => {
2453
- const s = a.detail.originalEvent, l = s.button === 0 && s.ctrlKey === !0;
2454
- (s.button === 2 || l) && a.preventDefault();
2451
+ onPointerDownOutside: Me(t.onPointerDownOutside, (i) => {
2452
+ const s = i.detail.originalEvent, l = s.button === 0 && s.ctrlKey === !0;
2453
+ (s.button === 2 || l) && i.preventDefault();
2455
2454
  }),
2456
2455
  onFocusOutside: Me(
2457
2456
  t.onFocusOutside,
2458
- (a) => a.preventDefault()
2457
+ (i) => i.preventDefault()
2459
2458
  )
2460
2459
  }
2461
2460
  );
@@ -2463,39 +2462,39 @@ var mi = j.forwardRef(
2463
2462
  ), gi = j.forwardRef(
2464
2463
  (t, e) => {
2465
2464
  const n = ce(Ee, t.__scopeDialog), o = j.useRef(!1), r = j.useRef(!1);
2466
- return /* @__PURE__ */ i(
2465
+ return /* @__PURE__ */ a(
2467
2466
  Fn,
2468
2467
  {
2469
2468
  ...t,
2470
2469
  ref: e,
2471
2470
  trapFocus: !1,
2472
2471
  disableOutsidePointerEvents: !1,
2473
- onCloseAutoFocus: (a) => {
2472
+ onCloseAutoFocus: (i) => {
2474
2473
  var s, l;
2475
- (s = t.onCloseAutoFocus) == null || s.call(t, a), a.defaultPrevented || (o.current || (l = n.triggerRef.current) == null || l.focus(), a.preventDefault()), o.current = !1, r.current = !1;
2474
+ (s = t.onCloseAutoFocus) == null || s.call(t, i), i.defaultPrevented || (o.current || (l = n.triggerRef.current) == null || l.focus(), i.preventDefault()), o.current = !1, r.current = !1;
2476
2475
  },
2477
- onInteractOutside: (a) => {
2478
- var u, d;
2479
- (u = t.onInteractOutside) == null || u.call(t, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
2480
- const s = a.target;
2481
- ((d = n.triggerRef.current) == null ? void 0 : d.contains(s)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
2476
+ onInteractOutside: (i) => {
2477
+ var d, u;
2478
+ (d = t.onInteractOutside) == null || d.call(t, i), i.defaultPrevented || (o.current = !0, i.detail.originalEvent.type === "pointerdown" && (r.current = !0));
2479
+ const s = i.target;
2480
+ ((u = n.triggerRef.current) == null ? void 0 : u.contains(s)) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && r.current && i.preventDefault();
2482
2481
  }
2483
2482
  }
2484
2483
  );
2485
2484
  }
2486
2485
  ), Fn = j.forwardRef(
2487
2486
  (t, e) => {
2488
- const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...s } = t, l = ce(Ee, n), u = j.useRef(null), d = St(e, u);
2487
+ const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: i, ...s } = t, l = ce(Ee, n), d = j.useRef(null), u = St(e, d);
2489
2488
  return so(), /* @__PURE__ */ M(me, { children: [
2490
- /* @__PURE__ */ i(
2489
+ /* @__PURE__ */ a(
2491
2490
  co,
2492
2491
  {
2493
2492
  asChild: !0,
2494
2493
  loop: !0,
2495
2494
  trapped: o,
2496
2495
  onMountAutoFocus: r,
2497
- onUnmountAutoFocus: a,
2498
- children: /* @__PURE__ */ i(
2496
+ onUnmountAutoFocus: i,
2497
+ children: /* @__PURE__ */ a(
2499
2498
  oo,
2500
2499
  {
2501
2500
  role: "dialog",
@@ -2504,36 +2503,36 @@ var mi = j.forwardRef(
2504
2503
  "aria-labelledby": l.titleId,
2505
2504
  "data-state": Ot(l.open),
2506
2505
  ...s,
2507
- ref: d,
2506
+ ref: u,
2508
2507
  onDismiss: () => l.onOpenChange(!1)
2509
2508
  }
2510
2509
  )
2511
2510
  }
2512
2511
  ),
2513
2512
  /* @__PURE__ */ M(me, { children: [
2514
- /* @__PURE__ */ i(wi, { titleId: l.titleId }),
2515
- /* @__PURE__ */ i(bi, { contentRef: u, descriptionId: l.descriptionId })
2513
+ /* @__PURE__ */ a(wi, { titleId: l.titleId }),
2514
+ /* @__PURE__ */ a(bi, { contentRef: d, descriptionId: l.descriptionId })
2516
2515
  ] })
2517
2516
  ] });
2518
2517
  }
2519
2518
  ), Nt = "DialogTitle", kn = j.forwardRef(
2520
2519
  (t, e) => {
2521
2520
  const { __scopeDialog: n, ...o } = t, r = ce(Nt, n);
2522
- return /* @__PURE__ */ i(Be.h2, { id: r.titleId, ...o, ref: e });
2521
+ return /* @__PURE__ */ a(Be.h2, { id: r.titleId, ...o, ref: e });
2523
2522
  }
2524
2523
  );
2525
2524
  kn.displayName = Nt;
2526
2525
  var Wn = "DialogDescription", vi = j.forwardRef(
2527
2526
  (t, e) => {
2528
2527
  const { __scopeDialog: n, ...o } = t, r = ce(Wn, n);
2529
- return /* @__PURE__ */ i(Be.p, { id: r.descriptionId, ...o, ref: e });
2528
+ return /* @__PURE__ */ a(Be.p, { id: r.descriptionId, ...o, ref: e });
2530
2529
  }
2531
2530
  );
2532
2531
  vi.displayName = Wn;
2533
2532
  var Mn = "DialogClose", Hn = j.forwardRef(
2534
2533
  (t, e) => {
2535
2534
  const { __scopeDialog: n, ...o } = t, r = ce(Mn, n);
2536
- return /* @__PURE__ */ i(
2535
+ return /* @__PURE__ */ a(
2537
2536
  Be.button,
2538
2537
  {
2539
2538
  type: "button",
@@ -2564,8 +2563,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
2564
2563
  }, _i = "DialogDescriptionWarning", bi = ({ contentRef: t, descriptionId: e }) => {
2565
2564
  const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Gn(_i).contentName}}.`;
2566
2565
  return j.useEffect(() => {
2567
- var a;
2568
- const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
2566
+ var i;
2567
+ const r = (i = t.current) == null ? void 0 : i.getAttribute("aria-describedby");
2569
2568
  e && r && (document.getElementById(e) || console.warn(o));
2570
2569
  }, [o, t, e]), null;
2571
2570
  }, Ci = En, Pi = Dn, Ti = zn, yi = An, Si = kn, xi = Hn;
@@ -2578,35 +2577,35 @@ const Ie = {
2578
2577
  "rp-dialog-close": "_rp-dialog-close_slqo7_47",
2579
2578
  "rp-properties-divider": "_rp-properties-divider_slqo7_55"
2580
2579
  }, Ii = () => {
2581
- const { pdfProperties: t } = J(), { container: e } = ge(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = ho(), { localeMessages: r } = se(), a = W(() => {
2580
+ const { pdfProperties: t } = J(), { container: e } = ge(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = ho(), { localeMessages: r } = se(), i = W(() => {
2582
2581
  if (!t)
2583
2582
  return [];
2584
2583
  const {
2585
2584
  fileSize: s,
2586
2585
  filename: l,
2587
- title: u,
2588
- author: d,
2586
+ title: d,
2587
+ author: u,
2589
2588
  subject: m,
2590
- createdOn: b,
2589
+ createdOn: P,
2591
2590
  creator: h,
2592
- keywords: w,
2591
+ keywords: b,
2593
2592
  modifiedOn: C,
2594
2593
  pdfProducer: y,
2595
- pdfVersion: _,
2594
+ pdfVersion: w,
2596
2595
  pageCount: S
2597
2596
  } = t;
2598
2597
  return [
2599
2598
  { label: r == null ? void 0 : r.propertiesFilenameLabel, value: l },
2600
2599
  { label: r == null ? void 0 : r.propertiesFileSizeLabel, value: s },
2601
2600
  { separate: !0 },
2602
- { label: r == null ? void 0 : r.propertiesTitleLabel, value: u },
2603
- { label: r == null ? void 0 : r.propertiesAuthorLabel, value: d },
2601
+ { label: r == null ? void 0 : r.propertiesTitleLabel, value: d },
2602
+ { label: r == null ? void 0 : r.propertiesAuthorLabel, value: u },
2604
2603
  { label: r == null ? void 0 : r.propertiesSubjectLabel, value: m },
2605
- { label: r == null ? void 0 : r.propertiesKeywordLabel, value: w },
2604
+ { label: r == null ? void 0 : r.propertiesKeywordLabel, value: b },
2606
2605
  { label: r == null ? void 0 : r.propertiesCreatorLabel, value: h },
2607
2606
  {
2608
2607
  label: r == null ? void 0 : r.propertiesCreateOnLabel,
2609
- value: b ? Wt(b) : ""
2608
+ value: P ? Wt(P) : ""
2610
2609
  },
2611
2610
  {
2612
2611
  label: r == null ? void 0 : r.propertiesModifiedOnLabel,
@@ -2614,16 +2613,16 @@ const Ie = {
2614
2613
  },
2615
2614
  { separate: !0 },
2616
2615
  { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: y },
2617
- { label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: _ },
2616
+ { label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: w },
2618
2617
  { label: r == null ? void 0 : r.propertiesPageCountLabel, value: S }
2619
2618
  ];
2620
2619
  }, [t, r]);
2621
- return /* @__PURE__ */ i(Ci, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(Pi, { container: e, children: /* @__PURE__ */ M("div", { className: Ie["rp-dialog-wrapper"], children: [
2622
- /* @__PURE__ */ i(Ti, { className: Ie["rp-dialog-overlay"] }),
2620
+ return /* @__PURE__ */ a(Ci, { open: n, onOpenChange: o, children: /* @__PURE__ */ a(Pi, { container: e, children: /* @__PURE__ */ M("div", { className: Ie["rp-dialog-wrapper"], children: [
2621
+ /* @__PURE__ */ a(Ti, { className: Ie["rp-dialog-overlay"] }),
2623
2622
  /* @__PURE__ */ M(yi, { className: Ie["rp-document-dialog"], children: [
2624
- /* @__PURE__ */ i(Si, { className: Ie["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2625
- /* @__PURE__ */ i("div", { className: Ie["rp-document-properties"], children: a.map((s, l) => /* @__PURE__ */ i("div", { children: s.separate ? /* @__PURE__ */ i("div", { className: Ie["rp-properties-divider"] }) : /* @__PURE__ */ i(po, { label: s.label, value: s.value }) }, l)) }),
2626
- /* @__PURE__ */ i(xi, { asChild: !0, className: Ie["rp-dialog-close"], children: /* @__PURE__ */ i(uo, {}) })
2623
+ /* @__PURE__ */ a(Si, { className: Ie["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2624
+ /* @__PURE__ */ a("div", { className: Ie["rp-document-properties"], children: i.map((s, l) => /* @__PURE__ */ a("div", { children: s.separate ? /* @__PURE__ */ a("div", { className: Ie["rp-properties-divider"] }) : /* @__PURE__ */ a(po, { label: s.label, value: s.value }) }, l)) }),
2625
+ /* @__PURE__ */ a(xi, { asChild: !0, className: Ie["rp-dialog-close"], children: /* @__PURE__ */ a(uo, {}) })
2627
2626
  ] })
2628
2627
  ] }) }) });
2629
2628
  }, Ri = {
@@ -2632,34 +2631,34 @@ const Ie = {
2632
2631
  const n = await (await fetch(t)).blob();
2633
2632
  return Li(n);
2634
2633
  }, qn = () => {
2635
- const { filename: t, pdfSrc: e } = J(), { downloadFilename: n } = mr(), o = (a) => {
2636
- const s = n || a;
2634
+ const { filename: t, pdfSrc: e } = J(), { downloadFilename: n } = mr(), o = (i) => {
2635
+ const s = n || i;
2637
2636
  return s.endsWith(nn) ? s : `${s}${nn}`;
2638
2637
  };
2639
2638
  return { download: E(async () => {
2640
2639
  if (!t || !e)
2641
2640
  throw new Error("There is no PDF source to download");
2642
- const a = document.createElement("a");
2643
- a.href = await Ei(e), a.download = o(t), document.body.appendChild(a), a.click(), document.body.removeChild(a);
2641
+ const i = document.createElement("a");
2642
+ i.href = await Ei(e), i.download = o(t), document.body.appendChild(i), i.click(), document.body.removeChild(i);
2644
2643
  }, [t, e]) };
2645
2644
  }, Un = () => {
2646
2645
  const { downloadIcon: t } = pe();
2647
- return t || /* @__PURE__ */ i(_o, {});
2648
- }, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(Y, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ni = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Vn, { localeMessages: e, children: /* @__PURE__ */ i(ie, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Un, {}) }) }), Oi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Ce, { onClick: t, children: /* @__PURE__ */ M(Vn, { className: "rp-menu-item", localeMessages: e, children: [
2649
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Un, {}) }),
2646
+ return t || /* @__PURE__ */ a(_o, {});
2647
+ }, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ a(Y, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ni = ({ download: t, localeMessages: e }) => /* @__PURE__ */ a(Vn, { localeMessages: e, children: /* @__PURE__ */ a(ie, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ a(Un, {}) }) }), Oi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ a(Ce, { onClick: t, children: /* @__PURE__ */ M(Vn, { className: "rp-menu-item", localeMessages: e, children: [
2648
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Un, {}) }),
2650
2649
  e == null ? void 0 : e.downloadFileLabel
2651
2650
  ] }) }), Bn = () => {
2652
2651
  const { download: t } = qn(), { downloadTool: e = !0 } = ve(), { isSmallScreen: n } = Pe(), { localeMessages: o } = se();
2653
- return e ? n ? /* @__PURE__ */ i(Oi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(Ni, { download: t, localeMessages: o }) : null : null;
2652
+ return e ? n ? /* @__PURE__ */ a(Oi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ a(e, { download: t }) : e ? /* @__PURE__ */ a(Ni, { download: t, localeMessages: o }) : null : null;
2654
2653
  }, Zn = () => {
2655
2654
  const { printIcon: t } = pe();
2656
- return t || /* @__PURE__ */ i(bo, {});
2657
- }, jn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(Y, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Di = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(jn, { localeMessages: e, children: /* @__PURE__ */ i(ie, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Zn, {}) }) }), zi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Ce, { onClick: t, children: /* @__PURE__ */ M(jn, { className: "rp-menu-item", localeMessages: e, children: [
2658
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Zn, {}) }),
2655
+ return t || /* @__PURE__ */ a(bo, {});
2656
+ }, jn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ a(Y, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Di = ({ print: t, localeMessages: e }) => /* @__PURE__ */ a(jn, { localeMessages: e, children: /* @__PURE__ */ a(ie, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ a(Zn, {}) }) }), zi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ a(Ce, { onClick: t, children: /* @__PURE__ */ M(jn, { className: "rp-menu-item", localeMessages: e, children: [
2657
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Zn, {}) }),
2659
2658
  e == null ? void 0 : e.printLabel
2660
2659
  ] }) }), Kn = () => {
2661
- const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: s = !0 } = ve(), { isSmallScreen: l } = Pe(), { localeMessages: u } = se();
2662
- return s ? l ? /* @__PURE__ */ i(zi, { print: t, localeMessages: u }) : typeof s == "function" ? /* @__PURE__ */ i(
2660
+ const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: i } = tt(), { printTool: s = !0 } = ve(), { isSmallScreen: l } = Pe(), { localeMessages: d } = se();
2661
+ return s ? l ? /* @__PURE__ */ a(zi, { print: t, localeMessages: d }) : typeof s == "function" ? /* @__PURE__ */ a(
2663
2662
  s,
2664
2663
  {
2665
2664
  print: t,
@@ -2667,72 +2666,72 @@ const Ie = {
2667
2666
  setOnProgress: n,
2668
2667
  setOnError: r,
2669
2668
  setOnComplete: o,
2670
- progress: a
2669
+ progress: i
2671
2670
  }
2672
- ) : s ? /* @__PURE__ */ i(Di, { print: t, localeMessages: u }) : null : null;
2671
+ ) : s ? /* @__PURE__ */ a(Di, { print: t, localeMessages: d }) : null : null;
2673
2672
  }, Ai = {
2674
2673
  "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2675
2674
  }, Fi = () => {
2676
2675
  const { goToFirstPageIcon: t } = pe();
2677
- return t || /* @__PURE__ */ i(gn, { className: Ai["rp-go-to-Top"] });
2676
+ return t || /* @__PURE__ */ a(gn, { className: Ai["rp-go-to-Top"] });
2678
2677
  }, ki = () => {
2679
2678
  const { goToLastPageIcon: t } = pe();
2680
- return t || /* @__PURE__ */ i(gn, {});
2679
+ return t || /* @__PURE__ */ a(gn, {});
2681
2680
  }, rn = { width: "100%" }, Wi = () => {
2682
- const { goToPage: t, totalPages: e, focusedPage: n } = oe(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a = W(() => n === 1, [n]), s = W(() => n === e, [n, e]), l = E(() => {
2681
+ const { goToPage: t, totalPages: e, focusedPage: n } = oe(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), i = W(() => n === 1, [n]), s = W(() => n === e, [n, e]), l = E(() => {
2683
2682
  t(1);
2684
- }, [t]), u = E(() => {
2683
+ }, [t]), d = E(() => {
2685
2684
  t(e);
2686
2685
  }, [t, e]);
2687
2686
  return o ? /* @__PURE__ */ M(Qe, { children: [
2688
- /* @__PURE__ */ i(Ce, { onClick: l, children: /* @__PURE__ */ i(Y, { content: r == null ? void 0 : r.firstPageTooltip, style: rn, children: /* @__PURE__ */ M("div", { className: "rp-menu-item", "aria-disabled": a, children: [
2689
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Fi, {}) }),
2690
- /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
2687
+ /* @__PURE__ */ a(Ce, { onClick: l, children: /* @__PURE__ */ a(Y, { content: r == null ? void 0 : r.firstPageTooltip, style: rn, children: /* @__PURE__ */ M("div", { className: "rp-menu-item", "aria-disabled": i, children: [
2688
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Fi, {}) }),
2689
+ /* @__PURE__ */ a("span", { children: r == null ? void 0 : r.firstPageLabel })
2691
2690
  ] }) }) }),
2692
- /* @__PURE__ */ i(Ce, { onClick: u, children: /* @__PURE__ */ i(Y, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ M("div", { className: "rp-menu-item", "aria-disabled": s, children: [
2693
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(ki, {}) }),
2694
- /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
2691
+ /* @__PURE__ */ a(Ce, { onClick: d, children: /* @__PURE__ */ a(Y, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ M("div", { className: "rp-menu-item", "aria-disabled": s, children: [
2692
+ /* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(ki, {}) }),
2693
+ /* @__PURE__ */ a("span", { children: r == null ? void 0 : r.lastPageLabel })
2695
2694
  ] }) }) }),
2696
- /* @__PURE__ */ i(It, {})
2695
+ /* @__PURE__ */ a(It, {})
2697
2696
  ] }) : null;
2698
2697
  }, Mi = () => {
2699
2698
  const [t, e] = G(!1), { container: n, pagesRef: o } = ge(), { isSmallScreen: r } = Pe(), {
2700
- openFileTool: a,
2699
+ openFileTool: i,
2701
2700
  downloadTool: s,
2702
2701
  documentProperties: l,
2703
- scrollModeTool: u,
2704
- rotateTool: d,
2702
+ scrollModeTool: d,
2703
+ rotateTool: u,
2705
2704
  selectionModeTool: m,
2706
- jumpNavigationTool: b,
2705
+ jumpNavigationTool: P,
2707
2706
  printTool: h,
2708
- fullscreenTool: w
2709
- } = ve(), { localeMessages: C } = se(), [y, _] = G(0), S = $(
2707
+ fullscreenTool: b
2708
+ } = ve(), { localeMessages: C } = se(), [y, w] = G(0), S = H(
2710
2709
  new ResizeObserver((p) => {
2711
- _(p[0].contentRect.height);
2710
+ w(p[0].contentRect.height);
2712
2711
  })
2713
2712
  ), f = W(() => {
2714
- const p = b || d || m || u || l;
2713
+ const p = P || u || m || d || l;
2715
2714
  let g = !1;
2716
- return r && (g = !(!a && !s && !h && !w)), p || g;
2715
+ return r && (g = !(!i && !s && !h && !b)), p || g;
2717
2716
  }, [
2718
- a,
2717
+ i,
2719
2718
  s,
2720
2719
  l,
2721
- u,
2722
2720
  d,
2721
+ u,
2723
2722
  m,
2724
- b,
2723
+ P,
2725
2724
  r
2726
2725
  ]);
2727
2726
  return z(() => (o && S.current.observe(o), () => {
2728
2727
  S.current.disconnect();
2729
2728
  }), [o]), f ? /* @__PURE__ */ M(fo, { children: [
2730
- /* @__PURE__ */ i(
2729
+ /* @__PURE__ */ a(
2731
2730
  yt,
2732
2731
  {
2733
2732
  container: n,
2734
2733
  onOpenChange: e,
2735
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Y, { content: C == null ? void 0 : C.moreOptionTooltip, children: /* @__PURE__ */ i(ie, { active: t, "aria-label": C == null ? void 0 : C.moreOptionTooltip, children: /* @__PURE__ */ i(Jr, {}) }) }) }),
2734
+ triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(Y, { content: C == null ? void 0 : C.moreOptionTooltip, children: /* @__PURE__ */ a(ie, { active: t, "aria-label": C == null ? void 0 : C.moreOptionTooltip, children: /* @__PURE__ */ a(Jr, {}) }) }) }),
2736
2735
  side: "bottom",
2737
2736
  avoidCollisions: !1,
2738
2737
  children: /* @__PURE__ */ M(
@@ -2743,36 +2742,36 @@ const Ie = {
2743
2742
  "data-rp": "moreOptionsDropdown",
2744
2743
  children: [
2745
2744
  r && /* @__PURE__ */ M(Qe, { children: [
2746
- /* @__PURE__ */ i(fn, {}),
2747
- /* @__PURE__ */ i(Bn, {}),
2748
- /* @__PURE__ */ i(Kn, {}),
2749
- /* @__PURE__ */ i(mn, {}),
2750
- /* @__PURE__ */ i(It, {})
2745
+ /* @__PURE__ */ a(fn, {}),
2746
+ /* @__PURE__ */ a(Bn, {}),
2747
+ /* @__PURE__ */ a(Kn, {}),
2748
+ /* @__PURE__ */ a(mn, {}),
2749
+ /* @__PURE__ */ a(It, {})
2751
2750
  ] }),
2752
- /* @__PURE__ */ i(Wi, {}),
2753
- /* @__PURE__ */ i(go, {}),
2754
- /* @__PURE__ */ i(Co, {}),
2755
- /* @__PURE__ */ i(vo, {}),
2756
- /* @__PURE__ */ i(wo, {}),
2757
- /* @__PURE__ */ i(mo, {})
2751
+ /* @__PURE__ */ a(Wi, {}),
2752
+ /* @__PURE__ */ a(go, {}),
2753
+ /* @__PURE__ */ a(Co, {}),
2754
+ /* @__PURE__ */ a(vo, {}),
2755
+ /* @__PURE__ */ a(wo, {}),
2756
+ /* @__PURE__ */ a(mo, {})
2758
2757
  ]
2759
2758
  }
2760
2759
  )
2761
2760
  }
2762
2761
  ),
2763
- /* @__PURE__ */ i(Ii, {})
2762
+ /* @__PURE__ */ a(Ii, {})
2764
2763
  ] }) : null;
2765
2764
  }, Hi = () => {
2766
2765
  const { isSmallScreen: t } = Pe();
2767
2766
  return /* @__PURE__ */ M(me, { children: [
2768
- /* @__PURE__ */ i(Yr, {}),
2767
+ /* @__PURE__ */ a(Yr, {}),
2769
2768
  !t && /* @__PURE__ */ M(me, { children: [
2770
- /* @__PURE__ */ i(fn, {}),
2771
- /* @__PURE__ */ i(Bn, {}),
2772
- /* @__PURE__ */ i(Kn, {}),
2773
- /* @__PURE__ */ i(mn, {})
2769
+ /* @__PURE__ */ a(fn, {}),
2770
+ /* @__PURE__ */ a(Bn, {}),
2771
+ /* @__PURE__ */ a(Kn, {}),
2772
+ /* @__PURE__ */ a(mn, {})
2774
2773
  ] }),
2775
- /* @__PURE__ */ i(Mi, {})
2774
+ /* @__PURE__ */ a(Mi, {})
2776
2775
  ] });
2777
2776
  }, $i = "_active_1fv1b_11", Re = {
2778
2777
  "rp-zoom-wrapper": "_rp-zoom-wrapper_1fv1b_1",
@@ -2783,16 +2782,16 @@ const Ie = {
2783
2782
  "rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_1fv1b_24"
2784
2783
  }, Gi = 25, gt = 1e3, qi = [50, 75, 100, 125, 150, 200, 300, 400], Ui = () => {
2785
2784
  const { zoomInIcon: t } = pe();
2786
- return t || /* @__PURE__ */ i(Po, {});
2785
+ return t || /* @__PURE__ */ a(Po, {});
2787
2786
  }, Vi = () => {
2788
2787
  const { zoomOutIcon: t } = pe();
2789
- return t || /* @__PURE__ */ i(To, {});
2788
+ return t || /* @__PURE__ */ a(To, {});
2790
2789
  }, Bi = () => {
2791
- const { zoomLevel: t, setZoomLevel: e } = Je(), { container: n, pagesRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = oe(), { pageRotate: s } = Ue(), { pages: l } = J(), { isSmallScreen: u } = Pe(), { localeMessages: d } = se(), { viewMode: m } = Oe(), [b, h] = G(0), [w, C] = G(!1), y = $(
2790
+ const { zoomLevel: t, setZoomLevel: e } = Je(), { container: n, pagesRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: i } = oe(), { pageRotate: s } = Ue(), { pages: l } = J(), { isSmallScreen: d } = Pe(), { localeMessages: u } = se(), { viewMode: m } = Oe(), [P, h] = G(0), [b, C] = G(!1), y = H(
2792
2791
  new ResizeObserver((v) => {
2793
2792
  h(v[0].contentRect.height);
2794
2793
  })
2795
- ), _ = E(() => {
2794
+ ), w = E(() => {
2796
2795
  e((v) => {
2797
2796
  const T = Math.floor(v / 25) * 25;
2798
2797
  return Math.min(T + 25, gt);
@@ -2803,9 +2802,9 @@ const Ie = {
2803
2802
  return Math.min(T - 25, gt);
2804
2803
  });
2805
2804
  }, [e]), f = W(() => t === Gi, [t]), p = W(() => t === gt, [t]), g = W(() => {
2806
- const v = l.get(a);
2807
- return v ? v.page.getViewport({ scale: 1, rotation: s[a] }) : null;
2808
- }, [l, a, s]), c = E(
2805
+ const v = l.get(i);
2806
+ return v ? v.page.getViewport({ scale: 1, rotation: s[i] }) : null;
2807
+ }, [l, i, s]), c = E(
2809
2808
  (v) => {
2810
2809
  const T = ((g == null ? void 0 : g.width) || 0) + 2 * Mt, R = ((g == null ? void 0 : g.height) || 0) + 2 * Mt, x = (o == null ? void 0 : o.clientWidth) || 0, I = (o == null ? void 0 : o.clientHeight) || 0, O = yo(
2811
2810
  v,
@@ -2818,7 +2817,7 @@ const Ie = {
2818
2817
  e(O);
2819
2818
  },
2820
2819
  [e, g, o]
2821
- ), P = E(
2820
+ ), _ = E(
2822
2821
  (v) => {
2823
2822
  typeof v == "number" ? e(v) : c(v);
2824
2823
  },
@@ -2826,34 +2825,34 @@ const Ie = {
2826
2825
  );
2827
2826
  return z(() => (o && y.current.observe(o), () => {
2828
2827
  y.current.disconnect();
2829
- }), [o]), typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ M("div", { className: Re["rp-zoom-wrapper"], children: [
2830
- /* @__PURE__ */ i(Y, { content: d == null ? void 0 : d.zoomOutTooltip, children: /* @__PURE__ */ i(
2828
+ }), [o]), typeof r != "boolean" ? /* @__PURE__ */ a(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ M("div", { className: Re["rp-zoom-wrapper"], children: [
2829
+ /* @__PURE__ */ a(Y, { content: u == null ? void 0 : u.zoomOutTooltip, children: /* @__PURE__ */ a(
2831
2830
  ie,
2832
2831
  {
2833
2832
  disabled: f,
2834
2833
  onClick: S,
2835
- "aria-label": d == null ? void 0 : d.zoomOutTooltip,
2836
- children: /* @__PURE__ */ i(Vi, {})
2834
+ "aria-label": u == null ? void 0 : u.zoomOutTooltip,
2835
+ children: /* @__PURE__ */ a(Vi, {})
2837
2836
  }
2838
2837
  ) }),
2839
- !u && /* @__PURE__ */ i(
2838
+ !d && /* @__PURE__ */ a(
2840
2839
  yt,
2841
2840
  {
2842
2841
  container: n,
2843
- open: w,
2842
+ open: b,
2844
2843
  onOpenChange: C,
2845
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Y, { content: d == null ? void 0 : d.zoomSelectTooltip, children: /* @__PURE__ */ M(
2844
+ triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(Y, { content: u == null ? void 0 : u.zoomSelectTooltip, children: /* @__PURE__ */ M(
2846
2845
  ie,
2847
2846
  {
2848
2847
  className: re(
2849
2848
  Re["rp-current-zoom-wrapper"],
2850
- w && Re.active
2849
+ b && Re.active
2851
2850
  ),
2852
- "aria-label": d == null ? void 0 : d.zoomSelectTooltip,
2851
+ "aria-label": u == null ? void 0 : u.zoomSelectTooltip,
2853
2852
  children: [
2854
- /* @__PURE__ */ i("span", { className: Re["rp-current-zoom-text"], children: t }),
2855
- /* @__PURE__ */ i("span", { className: Re["rp-current-zoom-text"], children: "%" }),
2856
- /* @__PURE__ */ i(He, { className: Re["rp-current-zoom-icon"] })
2853
+ /* @__PURE__ */ a("span", { className: Re["rp-current-zoom-text"], children: t }),
2854
+ /* @__PURE__ */ a("span", { className: Re["rp-current-zoom-text"], children: "%" }),
2855
+ /* @__PURE__ */ a(He, { className: Re["rp-current-zoom-icon"] })
2857
2856
  ]
2858
2857
  }
2859
2858
  ) }) }),
@@ -2864,16 +2863,16 @@ const Ie = {
2864
2863
  children: /* @__PURE__ */ M(
2865
2864
  "div",
2866
2865
  {
2867
- style: { maxHeight: `${b}px`, overflow: "auto" },
2866
+ style: { maxHeight: `${P}px`, overflow: "auto" },
2868
2867
  className: Re["rp-zoom-dropdown-content"],
2869
2868
  children: [
2870
2869
  /* @__PURE__ */ M(Qe, { children: [
2871
- /* @__PURE__ */ i(Ce, { onClick: () => P(st.ACTUAL), children: d == null ? void 0 : d.zoomActualSize }),
2872
- /* @__PURE__ */ i(Ce, { onClick: () => P(st.PAGE_FIT), children: d == null ? void 0 : d.zoomPageFit }),
2873
- /* @__PURE__ */ i(Ce, { onClick: () => P(st.PAGE_WIDTH), children: d == null ? void 0 : d.zoomPageWidth })
2870
+ /* @__PURE__ */ a(Ce, { onClick: () => _(st.ACTUAL), children: u == null ? void 0 : u.zoomActualSize }),
2871
+ /* @__PURE__ */ a(Ce, { onClick: () => _(st.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
2872
+ /* @__PURE__ */ a(Ce, { onClick: () => _(st.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
2874
2873
  ] }),
2875
- /* @__PURE__ */ i(It, {}),
2876
- /* @__PURE__ */ i(Qe, { children: qi.map((v) => /* @__PURE__ */ M(Ce, { onClick: () => P(v), children: [
2874
+ /* @__PURE__ */ a(It, {}),
2875
+ /* @__PURE__ */ a(Qe, { children: qi.map((v) => /* @__PURE__ */ M(Ce, { onClick: () => _(v), children: [
2877
2876
  v,
2878
2877
  " %"
2879
2878
  ] }, v)) })
@@ -2882,25 +2881,25 @@ const Ie = {
2882
2881
  )
2883
2882
  }
2884
2883
  ),
2885
- /* @__PURE__ */ i(Y, { content: d == null ? void 0 : d.zoomInTooltip, children: /* @__PURE__ */ i(
2884
+ /* @__PURE__ */ a(Y, { content: u == null ? void 0 : u.zoomInTooltip, children: /* @__PURE__ */ a(
2886
2885
  ie,
2887
2886
  {
2888
2887
  disabled: p,
2889
- onClick: _,
2890
- "aria-label": d == null ? void 0 : d.zoomInTooltip,
2891
- children: /* @__PURE__ */ i(Ui, {})
2888
+ onClick: w,
2889
+ "aria-label": u == null ? void 0 : u.zoomInTooltip,
2890
+ children: /* @__PURE__ */ a(Ui, {})
2892
2891
  }
2893
2892
  ) })
2894
2893
  ] }) : null;
2895
2894
  }, on = () => {
2896
2895
  const { totalMatches: t, nextMatch: e, prevMatch: n } = Rt(), { localeMessages: o } = se();
2897
2896
  return /* @__PURE__ */ M(me, { children: [
2898
- /* @__PURE__ */ i(
2897
+ /* @__PURE__ */ a(
2899
2898
  Y,
2900
2899
  {
2901
2900
  content: o == null ? void 0 : o.searchPrevTooltip,
2902
2901
  className: te["rp-search-tool-result-navigator"],
2903
- children: /* @__PURE__ */ i(ie, { tabIndex: 0, onClick: n, "aria-label": o == null ? void 0 : o.searchPrevTooltip, children: /* @__PURE__ */ i(
2902
+ children: /* @__PURE__ */ a(ie, { tabIndex: 0, onClick: n, "aria-label": o == null ? void 0 : o.searchPrevTooltip, children: /* @__PURE__ */ a(
2904
2903
  He,
2905
2904
  {
2906
2905
  className: te["rp-search-tool-input-icon"],
@@ -2909,12 +2908,12 @@ const Ie = {
2909
2908
  ) })
2910
2909
  }
2911
2910
  ),
2912
- /* @__PURE__ */ i(
2911
+ /* @__PURE__ */ a(
2913
2912
  Y,
2914
2913
  {
2915
2914
  content: o == null ? void 0 : o.searchNextTooltip,
2916
2915
  className: te["rp-search-tool-result-navigator"],
2917
- children: /* @__PURE__ */ i(ie, { tabIndex: 0, onClick: e, "aria-label": o == null ? void 0 : o.searchNextTooltip, children: /* @__PURE__ */ i(
2916
+ children: /* @__PURE__ */ a(ie, { tabIndex: 0, onClick: e, "aria-label": o == null ? void 0 : o.searchNextTooltip, children: /* @__PURE__ */ a(
2918
2917
  He,
2919
2918
  {
2920
2919
  style: { transform: "rotate(180deg" },
@@ -2927,35 +2926,35 @@ const Ie = {
2927
2926
  ] });
2928
2927
  }, an = () => {
2929
2928
  const { searchIcon: t } = pe();
2930
- return t || /* @__PURE__ */ i(So, {});
2929
+ return t || /* @__PURE__ */ a(So, {});
2931
2930
  }, Zi = () => {
2932
- const { container: t } = ge(), [e, n] = G(!1), { pdf: o } = J(), [r, a] = G(null), {
2931
+ const { container: t } = ge(), [e, n] = G(!1), { pdf: o } = J(), [r, i] = G(null), {
2933
2932
  searchOptions: s,
2934
2933
  setSearchOptions: l,
2935
- loading: u,
2936
- setSearch: d,
2934
+ loading: d,
2935
+ setSearch: u,
2937
2936
  totalMatches: m,
2938
- currentMatchPosition: b,
2937
+ currentMatchPosition: P,
2939
2938
  nextMatch: h,
2940
- prevMatch: w,
2939
+ prevMatch: b,
2941
2940
  search: C
2942
- } = Rt(), { searchTool: y = !0 } = ve(), [_, S] = G(C), { localeMessages: f } = se(), { isSmallScreen: p } = Pe(), [g, c] = G(null), P = E(() => {
2941
+ } = Rt(), { searchTool: y = !0 } = ve(), [w, S] = G(C), { localeMessages: f } = se(), { isSmallScreen: p } = Pe(), [g, c] = G(null), _ = E(() => {
2943
2942
  n(!0);
2944
2943
  }, []), v = E(() => {
2945
- d(""), S(""), n(!1);
2946
- }, [d]), T = (H) => {
2947
- const U = H.key === "Enter", V = H.key === " ";
2944
+ u(""), S(""), n(!1);
2945
+ }, [u]), T = ($) => {
2946
+ const U = $.key === "Enter", V = $.key === " ";
2948
2947
  (U || V) && v();
2949
2948
  }, R = E(
2950
- (H) => {
2951
- H.key === "Escape" && e && v();
2949
+ ($) => {
2950
+ $.key === "Escape" && e && v();
2952
2951
  },
2953
2952
  [e]
2954
2953
  ), x = E(
2955
- (H) => {
2956
- H.shiftKey && H.key === "Enter" ? w() : H.key === "Enter" && C !== _ ? d(_) : H.key === "Enter" && h();
2954
+ ($) => {
2955
+ $.shiftKey && $.key === "Enter" ? b() : $.key === "Enter" && C !== w ? u(w) : $.key === "Enter" && h();
2957
2956
  },
2958
- [_, w, h, d, C]
2957
+ [w, b, h, u, C]
2959
2958
  );
2960
2959
  z(() => (window.addEventListener("keydown", R), () => {
2961
2960
  window.removeEventListener("keydown", R);
@@ -2964,18 +2963,18 @@ const Ie = {
2964
2963
  r.focus();
2965
2964
  }, 0);
2966
2965
  }, [r]);
2967
- const I = E((H) => {
2968
- S(H.target.value);
2966
+ const I = E(($) => {
2967
+ S($.target.value);
2969
2968
  }, []), O = E(() => {
2970
- S(""), d("");
2971
- }, [d]), A = W(() => `${b} / ${m}`, [b, m]), { wholeWords: F, matchCase: L } = W(() => s, [s]), N = E(
2972
- (H) => {
2973
- l((U) => ({ ...U, matchCase: H }));
2969
+ S(""), u("");
2970
+ }, [u]), A = W(() => `${P} / ${m}`, [P, m]), { wholeWords: F, matchCase: L } = W(() => s, [s]), N = E(
2971
+ ($) => {
2972
+ l((U) => ({ ...U, matchCase: $ }));
2974
2973
  },
2975
2974
  [l]
2976
2975
  ), D = E(
2977
- (H) => {
2978
- l((U) => ({ ...U, wholeWords: H }));
2976
+ ($) => {
2977
+ l((U) => ({ ...U, wholeWords: $ }));
2979
2978
  },
2980
2979
  [l]
2981
2980
  );
@@ -2983,15 +2982,15 @@ const Ie = {
2983
2982
  v();
2984
2983
  }, [o, v]);
2985
2984
  const k = W(() => (g == null ? void 0 : g.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [g]), q = E(
2986
- (H) => {
2987
- if (H.key === "Tab") {
2985
+ ($) => {
2986
+ if ($.key === "Tab") {
2988
2987
  const U = document.activeElement;
2989
2988
  let V = 0;
2990
2989
  k.forEach((Q, le) => {
2991
2990
  Q === U && (V = le);
2992
2991
  });
2993
2992
  let K = V + 1;
2994
- H.shiftKey && (K = V - 1);
2993
+ $.shiftKey && (K = V - 1);
2995
2994
  const X = k[K];
2996
2995
  if (X)
2997
2996
  X.focus();
@@ -3006,7 +3005,7 @@ const Ie = {
3006
3005
  },
3007
3006
  [k]
3008
3007
  );
3009
- return y ? /* @__PURE__ */ i(me, { children: /* @__PURE__ */ i(
3008
+ return y ? /* @__PURE__ */ a(me, { children: /* @__PURE__ */ a(
3010
3009
  yt,
3011
3010
  {
3012
3011
  open: e,
@@ -3015,13 +3014,13 @@ const Ie = {
3015
3014
  align: "start",
3016
3015
  tabIndex: 0,
3017
3016
  avoidCollisions: !1,
3018
- triggerComponent: /* @__PURE__ */ i(Y, { content: f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ i(
3017
+ triggerComponent: /* @__PURE__ */ a(Y, { content: f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ a(
3019
3018
  ie,
3020
3019
  {
3021
- onClick: P,
3020
+ onClick: _,
3022
3021
  active: e,
3023
3022
  "aria-label": f == null ? void 0 : f.searchButtonTooltip,
3024
- children: /* @__PURE__ */ i(an, {})
3023
+ children: /* @__PURE__ */ a(an, {})
3025
3024
  }
3026
3025
  ) }),
3027
3026
  children: /* @__PURE__ */ M(
@@ -3034,28 +3033,28 @@ const Ie = {
3034
3033
  children: [
3035
3034
  /* @__PURE__ */ M("div", { className: te["rp-search-tool-input-wrapper"], children: [
3036
3035
  /* @__PURE__ */ M("div", { className: te["rp-search-tool-input"], children: [
3037
- /* @__PURE__ */ i(Y, { content: f == null ? void 0 : f.searchInputTooltip, children: /* @__PURE__ */ i(
3036
+ /* @__PURE__ */ a(Y, { content: f == null ? void 0 : f.searchInputTooltip, children: /* @__PURE__ */ a(
3038
3037
  dn,
3039
3038
  {
3040
- value: _,
3039
+ value: w,
3041
3040
  onKeyDown: x,
3042
3041
  onChange: I,
3043
- icon: /* @__PURE__ */ i(an, {}),
3042
+ icon: /* @__PURE__ */ a(an, {}),
3044
3043
  placeholder: f == null ? void 0 : f.searchInputPlaceholder,
3045
3044
  className: te["rp-search-input"],
3046
- ref: a,
3045
+ ref: i,
3047
3046
  id: "search-input",
3048
3047
  name: "search-input",
3049
3048
  tabIndex: 0,
3050
- children: !!_ && /* @__PURE__ */ i("span", { className: te["rp-search-tool-input-clear"], onClick: O, children: /* @__PURE__ */ i(xo, {}) })
3049
+ children: !!w && /* @__PURE__ */ a("span", { className: te["rp-search-tool-input-clear"], onClick: O, children: /* @__PURE__ */ a(xo, {}) })
3051
3050
  }
3052
3051
  ) }),
3053
- u ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Pt, { className: te["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: A }),
3054
- p && /* @__PURE__ */ i("div", { className: te["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: T, handleClose: v }) })
3052
+ d ? /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(Pt, { className: te["rp-search-loader-icon"] }) }) : /* @__PURE__ */ a("span", { children: A }),
3053
+ p && /* @__PURE__ */ a("div", { className: te["rp-search-tool-controls"], children: /* @__PURE__ */ a(Ht, { onKeyPress: T, handleClose: v }) })
3055
3054
  ] }),
3056
3055
  /* @__PURE__ */ M("div", { className: te["rp-search-tool-input-checkboxes"], children: [
3057
- p && /* @__PURE__ */ i(on, {}),
3058
- /* @__PURE__ */ i(
3056
+ p && /* @__PURE__ */ a(on, {}),
3057
+ /* @__PURE__ */ a(
3059
3058
  $t,
3060
3059
  {
3061
3060
  tabIndex: 0,
@@ -3065,8 +3064,8 @@ const Ie = {
3065
3064
  children: f == null ? void 0 : f.searchMatchCaseLabel
3066
3065
  }
3067
3066
  ),
3068
- !p && /* @__PURE__ */ i(Y, { content: f == null ? void 0 : f.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: te["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Gt, {}) }) }),
3069
- /* @__PURE__ */ i(
3067
+ !p && /* @__PURE__ */ a(Y, { content: f == null ? void 0 : f.searchMatchCaseTooltip, children: /* @__PURE__ */ a("div", { className: te["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ a(Gt, {}) }) }),
3068
+ /* @__PURE__ */ a(
3070
3069
  $t,
3071
3070
  {
3072
3071
  tabIndex: 0,
@@ -3076,12 +3075,12 @@ const Ie = {
3076
3075
  children: f == null ? void 0 : f.searchWholeWordsLabel
3077
3076
  }
3078
3077
  ),
3079
- !p && /* @__PURE__ */ i(Y, { content: f == null ? void 0 : f.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { tabIndex: 0, className: te["rp-search-icon-info"], children: /* @__PURE__ */ i(Gt, {}) }) })
3078
+ !p && /* @__PURE__ */ a(Y, { content: f == null ? void 0 : f.searchWholeWordsTooltip, children: /* @__PURE__ */ a("div", { tabIndex: 0, className: te["rp-search-icon-info"], children: /* @__PURE__ */ a(Gt, {}) }) })
3080
3079
  ] })
3081
3080
  ] }),
3082
3081
  !p && /* @__PURE__ */ M("div", { className: te["rp-search-tool-controls"], children: [
3083
- /* @__PURE__ */ i(on, {}),
3084
- /* @__PURE__ */ i(Ht, { onKeyPress: T, handleClose: v })
3082
+ /* @__PURE__ */ a(on, {}),
3083
+ /* @__PURE__ */ a(Ht, { onKeyPress: T, handleClose: v })
3085
3084
  ] })
3086
3085
  ]
3087
3086
  }
@@ -3098,32 +3097,32 @@ const Ie = {
3098
3097
  loading: ji
3099
3098
  }, Ki = ({ percentage: t }) => {
3100
3099
  const { cancel: e } = tt(), { localeMessages: n } = se();
3101
- return t < 1 ? null : /* @__PURE__ */ i("div", { className: re(ze["rp-loading-overlay"]), children: /* @__PURE__ */ M("div", { className: re(ze["rp-loading-modal"]), children: [
3100
+ return t < 1 ? null : /* @__PURE__ */ a("div", { className: re(ze["rp-loading-overlay"]), children: /* @__PURE__ */ M("div", { className: re(ze["rp-loading-modal"]), children: [
3102
3101
  /* @__PURE__ */ M("div", { className: re(ze["rp-loading-title"]), children: [
3103
3102
  n == null ? void 0 : n.printLoadingMessage,
3104
3103
  "..."
3105
3104
  ] }),
3106
- /* @__PURE__ */ i("div", { className: re(ze["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
3105
+ /* @__PURE__ */ a("div", { className: re(ze["rp-loading-progress-bar"]), children: /* @__PURE__ */ a(
3107
3106
  "div",
3108
3107
  {
3109
3108
  className: re(ze["rp-loading-progress"]),
3110
3109
  style: { width: `${t}%` }
3111
3110
  }
3112
3111
  ) }),
3113
- /* @__PURE__ */ i("button", { className: re(ze["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
3112
+ /* @__PURE__ */ a("button", { className: re(ze["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
3114
3113
  ] }) });
3115
3114
  }, Xi = Ve((t, e) => {
3116
- const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Pe(), { percentage: a } = o || {}, s = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
3115
+ const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Pe(), { percentage: i } = o || {}, s = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
3117
3116
  return /* @__PURE__ */ M("div", { children: [
3118
- /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: ke["rp-toolbar-content"], children: /* @__PURE__ */ M("div", { className: ke["rp-toolbar-wrapper"], style: s(), children: [
3117
+ /* @__PURE__ */ a("div", { "data-rp": "topBar", ref: e, className: ke["rp-toolbar-content"], children: /* @__PURE__ */ M("div", { className: ke["rp-toolbar-wrapper"], style: s(), children: [
3119
3118
  /* @__PURE__ */ M("div", { "data-rp": "topBarLeft", className: ke["rp-toolbar-start"], children: [
3120
- /* @__PURE__ */ i(Zi, {}),
3121
- /* @__PURE__ */ i(li, {})
3119
+ /* @__PURE__ */ a(Zi, {}),
3120
+ /* @__PURE__ */ a(li, {})
3122
3121
  ] }),
3123
- /* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: ke["rp-toolbar-middle"], children: /* @__PURE__ */ i(Bi, {}) }),
3124
- /* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: ke["rp-toolbar-end"], children: /* @__PURE__ */ i(Hi, {}) })
3122
+ /* @__PURE__ */ a("div", { "data-rp": "topBarCenter", className: ke["rp-toolbar-middle"], children: /* @__PURE__ */ a(Bi, {}) }),
3123
+ /* @__PURE__ */ a("div", { "data-rp": "topBarRight", className: ke["rp-toolbar-end"], children: /* @__PURE__ */ a(Hi, {}) })
3125
3124
  ] }) }),
3126
- n && a ? /* @__PURE__ */ i(Ki, { percentage: a }) : null
3125
+ n && i ? /* @__PURE__ */ a(Ki, { percentage: i }) : null
3127
3126
  ] });
3128
3127
  }), vt = {
3129
3128
  "rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
@@ -3137,38 +3136,41 @@ const Ie = {
3137
3136
  "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
3138
3137
  "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
3139
3138
  }, Qi = (t) => {
3140
- const { pageNumber: e, isFocused: n, viewport: o } = t, { goToPage: r } = oe(), { pageRotate: a } = Ue(), s = $(null), l = yn(), { pages: u } = J(), [d, m] = G(null), b = $(!1), h = W(() => n ? We["rp-thumbnail-active"] : "", [n]), w = W(() => ({
3139
+ const { pageNumber: e, isFocused: n, viewport: o } = t, { goToPage: r } = oe(), { pageRotate: i } = Ue(), s = H(null), l = yn(), { pages: d } = J(), [u, m] = G(null), P = H(!1), h = H(), b = W(() => n ? We["rp-thumbnail-active"] : "", [n]), C = W(() => ({
3141
3140
  width: Math.round(o.width),
3142
3141
  height: Math.round(o.height)
3143
- }), [o]), C = E(() => {
3142
+ }), [o]), y = E(() => {
3144
3143
  e && r(e);
3145
3144
  }, [r, e]);
3146
3145
  return z(() => {
3147
- const y = u.get(e);
3148
- if (!s.current || !e || !y || d)
3146
+ const w = d.get(e);
3147
+ h.current === w || (m(null), h.current = w);
3148
+ }, [d, e]), z(() => {
3149
+ const w = d.get(e);
3150
+ if (!s.current || !e || !w || u)
3149
3151
  return;
3150
- const _ = new IntersectionObserver((S) => {
3151
- S.forEach((f) => {
3152
- if (b.current) {
3153
- b.current = !1, l.removeQueue(`thumbnail-${e}`);
3152
+ const S = new IntersectionObserver((f) => {
3153
+ f.forEach((p) => {
3154
+ if (P.current) {
3155
+ P.current = !1, l.removeQueue(`thumbnail-${e}`);
3154
3156
  return;
3155
3157
  }
3156
- if (f.isIntersecting) {
3157
- const p = document.createElement("canvas");
3158
- b.current = !0, l.enqueue(
3158
+ if (p.isIntersecting) {
3159
+ const g = document.createElement("canvas");
3160
+ P.current = !0, l.enqueue(
3159
3161
  `thumbnail-${e}`,
3160
3162
  {
3161
- page: y.page,
3162
- canvasElem: p,
3163
+ page: w.page,
3164
+ canvasElem: g,
3163
3165
  options: {
3164
3166
  scale: 1
3165
3167
  },
3166
3168
  onLoaded: () => {
3167
- p.toBlob((g) => {
3168
- if (!g)
3169
+ g.toBlob((c) => {
3170
+ if (!c)
3169
3171
  return;
3170
- const c = URL.createObjectURL(g);
3171
- m(c);
3172
+ const _ = URL.createObjectURL(c);
3173
+ m(_);
3172
3174
  });
3173
3175
  }
3174
3176
  },
@@ -3177,46 +3179,46 @@ const Ie = {
3177
3179
  }
3178
3180
  });
3179
3181
  });
3180
- return s.current && _.observe(s.current), () => {
3181
- _.disconnect(), l.removeQueue(`thumbnail-${e}`);
3182
+ return s.current && S.observe(s.current), () => {
3183
+ S.disconnect(), l.removeQueue(`thumbnail-${e}`);
3182
3184
  };
3183
- }, [l, e, u, d]), /* @__PURE__ */ M(
3185
+ }, [l, e, d, u]), /* @__PURE__ */ M(
3184
3186
  "div",
3185
3187
  {
3186
- onClick: C,
3188
+ onClick: y,
3187
3189
  id: `page-${e}`,
3188
3190
  className: We["rp-thumbnail-wrapper"],
3189
3191
  ref: s,
3190
3192
  children: [
3191
- /* @__PURE__ */ i(
3193
+ /* @__PURE__ */ a(
3192
3194
  "div",
3193
3195
  {
3194
3196
  style: {
3195
- transform: `rotate(${a[e || 0]}deg)`
3197
+ transform: `rotate(${i[e || 0]}deg)`
3196
3198
  },
3197
- className: re(h, We["rp-thumbnail"]),
3198
- children: d ? /* @__PURE__ */ i(
3199
+ className: re(b, We["rp-thumbnail"]),
3200
+ children: u ? /* @__PURE__ */ a(
3199
3201
  "img",
3200
3202
  {
3201
- src: d,
3202
- width: w.width,
3203
- height: w.height,
3203
+ src: u,
3204
+ width: C.width,
3205
+ height: C.height,
3204
3206
  alt: "thumbnail"
3205
3207
  }
3206
- ) : /* @__PURE__ */ i(
3208
+ ) : /* @__PURE__ */ a(
3207
3209
  "div",
3208
3210
  {
3209
3211
  className: We["rp-thumbnail-loader"],
3210
3212
  style: {
3211
- width: `${w.width}px`,
3212
- height: `${w.height}px`
3213
+ width: `${C.width}px`,
3214
+ height: `${C.height}px`
3213
3215
  },
3214
- children: /* @__PURE__ */ i(Pt, {})
3216
+ children: /* @__PURE__ */ a(Pt, {})
3215
3217
  }
3216
3218
  )
3217
3219
  }
3218
3220
  ),
3219
- /* @__PURE__ */ i("div", { className: We["rp-thumbnail-text"], children: e })
3221
+ /* @__PURE__ */ a("div", { className: We["rp-thumbnail-text"], children: e })
3220
3222
  ]
3221
3223
  }
3222
3224
  );
@@ -3227,51 +3229,51 @@ const Ie = {
3227
3229
  const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
3228
3230
  t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Yi);
3229
3231
  }, ea = Ve((t, e) => {
3230
- const { show: n } = t, { focusedPage: o, totalPages: r } = oe(), { thumbnailPages: a, addPage: s, thumbnailLength: l, addToPage: u } = Cn(), d = $(null), m = $(1);
3231
- cn(e, () => d.current);
3232
- const b = W(() => Object.values(a), [a]), h = E(() => {
3233
- const w = l + 1;
3234
- w <= r && s(w);
3232
+ const { show: n } = t, { focusedPage: o, totalPages: r } = oe(), { thumbnailPages: i, addPage: s, thumbnailLength: l, addToPage: d } = Cn(), u = H(null), m = H(1);
3233
+ cn(e, () => u.current);
3234
+ const P = W(() => Object.values(i), [i]), h = E(() => {
3235
+ const b = l + 1;
3236
+ b <= r && s(b);
3235
3237
  }, [s, r, l]);
3236
3238
  return z(() => {
3237
- o > l ? u(o) : n && m.current !== o && (Ji(d.current, o), m.current = o);
3238
- }, [o, l, u, n, b]), Pr(d.current, h), /* @__PURE__ */ i("div", { ref: d, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? b.map((w, C) => {
3239
- var y, _;
3240
- return /* @__PURE__ */ i(
3239
+ o > l ? d(o) : n && m.current !== o && (Ji(u.current, o), m.current = o);
3240
+ }, [o, l, d, n, P]), Pr(u.current, h), /* @__PURE__ */ a("div", { ref: u, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ a("div", { className: sn["rp-thumbnails"], children: n ? P.map((b, C) => {
3241
+ var y, w;
3242
+ return /* @__PURE__ */ a(
3241
3243
  Qi,
3242
3244
  {
3243
- isFocused: o === ((y = w.page) == null ? void 0 : y.pageNumber),
3244
- pageNumber: (_ = w.page) == null ? void 0 : _.pageNumber,
3245
- loading: w.loading,
3246
- viewport: w.viewport,
3247
- defaultRotation: w.defaultRotation
3245
+ isFocused: o === ((y = b.page) == null ? void 0 : y.pageNumber),
3246
+ pageNumber: (w = b.page) == null ? void 0 : w.pageNumber,
3247
+ loading: b.loading,
3248
+ viewport: b.viewport,
3249
+ defaultRotation: b.defaultRotation
3248
3250
  },
3249
3251
  C
3250
3252
  );
3251
3253
  }) : null }) });
3252
3254
  }), ta = () => {
3253
3255
  const { thumbnailIcon: t } = pe();
3254
- return t || /* @__PURE__ */ i(wr, {});
3256
+ return t || /* @__PURE__ */ a(wr, {});
3255
3257
  }, na = () => {
3256
- const { active: t, setActive: e } = Cn(), [n, o] = G(200), r = $(null), { thumbnailTool: a, sidebarEnable: s } = ve(), { localeMessages: l } = se(), u = E(() => {
3258
+ const { active: t, setActive: e } = Cn(), [n, o] = G(200), r = H(null), { thumbnailTool: i, sidebarEnable: s } = ve(), { localeMessages: l } = se(), d = E(() => {
3257
3259
  e((m) => !m);
3258
- }, []), d = W(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: u, active: t }) : a ? /* @__PURE__ */ i(Y, { content: l == null ? void 0 : l.thumbnailTooltip, children: /* @__PURE__ */ i(
3260
+ }, []), u = W(() => typeof i != "boolean" && i ? /* @__PURE__ */ a(i, { onClick: d, active: t }) : i ? /* @__PURE__ */ a(Y, { content: l == null ? void 0 : l.thumbnailTooltip, children: /* @__PURE__ */ a(
3259
3261
  ie,
3260
3262
  {
3261
- onClick: u,
3263
+ onClick: d,
3262
3264
  active: t,
3263
3265
  "aria-label": l == null ? void 0 : l.thumbnailTooltip,
3264
- children: /* @__PURE__ */ i(ta, {})
3266
+ children: /* @__PURE__ */ a(ta, {})
3265
3267
  }
3266
- ) }) : null, [a, t, u, l]);
3267
- return /* @__PURE__ */ i(me, { children: s && /* @__PURE__ */ M(
3268
+ ) }) : null, [i, t, d, l]);
3269
+ return /* @__PURE__ */ a(me, { children: s && /* @__PURE__ */ M(
3268
3270
  "div",
3269
3271
  {
3270
3272
  style: { "--rp-thumbnail-width": `${n}px` },
3271
3273
  className: vt["rp-sidebar-content-wrapper"],
3272
3274
  "data-rp": "sidebar",
3273
3275
  children: [
3274
- /* @__PURE__ */ i("div", { className: vt["rp-sidebar-content"], children: d }),
3276
+ /* @__PURE__ */ a("div", { className: vt["rp-sidebar-content"], children: u }),
3275
3277
  /* @__PURE__ */ M(
3276
3278
  "div",
3277
3279
  {
@@ -3279,8 +3281,8 @@ const Ie = {
3279
3281
  hidden: !t,
3280
3282
  className: vt["rp-thumbnails-wrapper"],
3281
3283
  children: [
3282
- /* @__PURE__ */ i(ea, { show: t, ref: r }),
3283
- /* @__PURE__ */ i(Tr, { onWidthChange: o, thumbnailRef: r })
3284
+ /* @__PURE__ */ a(ea, { show: t, ref: r }),
3285
+ /* @__PURE__ */ a(Tr, { onWidthChange: o, thumbnailRef: r })
3284
3286
  ]
3285
3287
  }
3286
3288
  )
@@ -3292,27 +3294,27 @@ const Ie = {
3292
3294
  children: n,
3293
3295
  slots: o,
3294
3296
  icons: r,
3295
- style: a,
3297
+ style: i,
3296
3298
  className: s,
3297
3299
  mobileWidth: l,
3298
- onLoaded: u,
3299
- cleanupOnLoaded: d,
3300
+ onLoaded: d,
3301
+ cleanupOnLoaded: u,
3300
3302
  onLayoutWidthChange: m
3301
- } = t, [b, h] = G(null), { setContainer: w, setContentRef: C } = ge(), { loading: y } = J(), { LoaderImageComponent: _ } = hn();
3302
- return z(() => (u && u(), () => {
3303
- d && d();
3304
- }), [u, d]), /* @__PURE__ */ i(Rn, { toolbarRef: b, ref: e, children: /* @__PURE__ */ i(Ir, { mobileWidth: l, onLayoutWidthChange: m, children: /* @__PURE__ */ i(Cr, { slots: o, children: /* @__PURE__ */ i(yr, { icons: r, children: /* @__PURE__ */ M(Sr, { getContainerRef: w, style: a, className: s, children: [
3303
+ } = t, [P, h] = G(null), { setContainer: b, setContentRef: C } = ge(), { loading: y } = J(), { LoaderImageComponent: w } = hn();
3304
+ return z(() => (d && d(), () => {
3305
+ u && u();
3306
+ }), [d, u]), /* @__PURE__ */ a(Rn, { toolbarRef: P, ref: e, children: /* @__PURE__ */ a(Ir, { mobileWidth: l, onLayoutWidthChange: m, children: /* @__PURE__ */ a(Cr, { slots: o, children: /* @__PURE__ */ a(yr, { icons: r, children: /* @__PURE__ */ M(Sr, { getContainerRef: b, style: i, className: s, children: [
3305
3307
  /* @__PURE__ */ M(xr, { children: [
3306
3308
  /* @__PURE__ */ M("div", { className: be["rp-layout"], children: [
3307
- /* @__PURE__ */ i(Xi, { ref: h }),
3309
+ /* @__PURE__ */ a(Xi, { ref: h }),
3308
3310
  /* @__PURE__ */ M("div", { className: be["rp-content"], children: [
3309
- /* @__PURE__ */ i("div", { className: be["rp-sidebar"], children: /* @__PURE__ */ i(na, {}) }),
3310
- /* @__PURE__ */ i("div", { ref: C, className: be["rp-pages"], children: n })
3311
+ /* @__PURE__ */ a("div", { className: be["rp-sidebar"], children: /* @__PURE__ */ a(na, {}) }),
3312
+ /* @__PURE__ */ a("div", { ref: C, className: be["rp-pages"], children: n })
3311
3313
  ] })
3312
3314
  ] }),
3313
- /* @__PURE__ */ i(br, {})
3315
+ /* @__PURE__ */ a(br, {})
3314
3316
  ] }),
3315
- y ? /* @__PURE__ */ i(
3317
+ y ? /* @__PURE__ */ a(
3316
3318
  "div",
3317
3319
  {
3318
3320
  className: be["rp-loader"],
@@ -3325,7 +3327,7 @@ const Ie = {
3325
3327
  width: "100%",
3326
3328
  height: "100%"
3327
3329
  },
3328
- children: /* @__PURE__ */ i(
3330
+ children: /* @__PURE__ */ a(
3329
3331
  "div",
3330
3332
  {
3331
3333
  style: {
@@ -3335,7 +3337,7 @@ const Ie = {
3335
3337
  height: "100%",
3336
3338
  width: "100%"
3337
3339
  },
3338
- children: _ && /* @__PURE__ */ i(_, {})
3340
+ children: w && /* @__PURE__ */ a(w, {})
3339
3341
  }
3340
3342
  )
3341
3343
  }