@pdf-viewer/react 1.7.0-beta.4 → 1.7.0-beta.5

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-77fbc282.js → RPDefaultLayout-45eb04c1.js} +145 -142
  2. package/dist/components/RPController.js +1 -1
  3. package/dist/components/RPPages.js +1 -1
  4. package/dist/components/RPProvider.js +1 -1
  5. package/dist/components/layout/LayoutContainer.js +1 -1
  6. package/dist/components/layout/RPDefaultLayout.js +1 -1
  7. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  8. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  9. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  10. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  11. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  12. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  13. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  14. package/dist/components/layout/toolbar/Paginate.js +1 -1
  15. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  16. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  17. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  18. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  19. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  20. package/dist/components/layout/toolbar/ZoomTool.js +1 -1
  21. package/dist/components/page/AnnotationLayer.js +1 -1
  22. package/dist/components/page/CanvasLayer.js +1 -1
  23. package/dist/components/page/DualPage.js +1 -1
  24. package/dist/components/page/RPPage.js +1 -1
  25. package/dist/components/page/SinglePage.js +1 -1
  26. package/dist/components/page/TextHighlightLayer.js +1 -1
  27. package/dist/components/page/TextLayer.js +1 -1
  28. package/dist/components/ui/LoadingIndicator.js +1 -1
  29. package/dist/contexts/PaginationContext.js +1 -1
  30. package/dist/contexts/PrintContext.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
@@ -167,12 +167,12 @@ import './assets/RPDefaultLayout.css';const wn = () => {
167
167
  behavior: T
168
168
  });
169
169
  }
170
- const _ = {
170
+ const b = {
171
171
  left: 0,
172
172
  top: ze(p, f)
173
173
  };
174
174
  return s.scrollTo({
175
- ..._,
175
+ ...b,
176
176
  behavior: T
177
177
  });
178
178
  },
@@ -205,8 +205,8 @@ import './assets/RPDefaultLayout.css';const wn = () => {
205
205
  const g = f % 2 === 1;
206
206
  if (!m || g)
207
207
  return !1;
208
- const s = g ? p[f] : p[f - 1], _ = g ? p[f + 1] : p[f];
209
- return c === Ie.DUAL_PAGE && s + _ < m.clientWidth;
208
+ const s = g ? p[f] : p[f - 1], b = g ? p[f + 1] : p[f];
209
+ return c === Ie.DUAL_PAGE && s + b < m.clientWidth;
210
210
  }, [c, p, m, o]), P = N(() => {
211
211
  let f = e - 1;
212
212
  y(f) && (f = e - 2), C(f);
@@ -285,8 +285,8 @@ const So = () => {
285
285
  scratchCanvas: f,
286
286
  pdfDocument: g,
287
287
  pageNumber: s,
288
- viewerPdfPage: _,
289
- printResolution: b,
288
+ viewerPdfPage: b,
289
+ printResolution: _,
290
290
  optionalContentConfigPromise: S,
291
291
  printAnnotationStoragePromise: E
292
292
  }) => {
@@ -294,8 +294,8 @@ const So = () => {
294
294
  h();
295
295
  return;
296
296
  }
297
- const x = b / yr.PDF;
298
- f.width = Math.floor(_.width * x), f.height = Math.floor(_.height * x);
297
+ const x = _ / yr.PDF;
298
+ f.width = Math.floor(b.width * x), f.height = Math.floor(b.height * x);
299
299
  const L = f.getContext("2d");
300
300
  L.save(), L.fillStyle = "rgb(255, 255, 255)", L.fillRect(0, 0, f.width, f.height), L.restore();
301
301
  const [D, A] = await Promise.all([
@@ -309,7 +309,7 @@ const So = () => {
309
309
  const z = {
310
310
  canvasContext: L,
311
311
  transform: [x, 0, 0, x, 0, 0],
312
- viewport: D.getViewport({ scale: 1, rotation: _.rotation }),
312
+ viewport: D.getViewport({ scale: 1, rotation: b.rotation }),
313
313
  intent: "print",
314
314
  annotationMode: xr.ENABLE_STORAGE,
315
315
  optionalContentConfigPromise: S,
@@ -332,30 +332,30 @@ const So = () => {
332
332
  s(g);
333
333
  return;
334
334
  }
335
- const b = new MutationObserver(() => {
336
- document.querySelector(".rp-print-zone") && (s(g), b.disconnect());
335
+ const _ = new MutationObserver(() => {
336
+ document.querySelector(".rp-print-zone") && (s(g), _.disconnect());
337
337
  });
338
- b.observe(document.body, { childList: !0, subtree: !0 });
338
+ _.observe(document.body, { childList: !0, subtree: !0 });
339
339
  });
340
340
  }, []), P = async (f) => {
341
341
  const g = document.createElement("img"), s = document.createElement("div");
342
- return s.classList.add("rp-print-page"), await new Promise((_, b) => {
342
+ return s.classList.add("rp-print-page"), await new Promise((b, _) => {
343
343
  f.toBlob((S) => {
344
344
  S ? (g.src = URL.createObjectURL(S), g.onload = () => {
345
- URL.revokeObjectURL(g.src), _();
346
- }, g.onerror = b) : b(new Error("Failed to create blob"));
345
+ URL.revokeObjectURL(g.src), b();
346
+ }, g.onerror = _) : _(new Error("Failed to create blob"));
347
347
  });
348
348
  }).catch(() => {
349
349
  }), s.appendChild(g), s;
350
350
  }, T = (f, g) => {
351
351
  const s = document.createElement("div");
352
352
  s.classList.add("rp-print-zone");
353
- const _ = document.createElement("style"), b = g.get(1);
354
- if (b) {
355
- const { width: S, height: E } = b == null ? void 0 : b.page.getViewport({ scale: 1 });
356
- _.innerHTML = `@page { size: ${S}px ${E}px }`;
353
+ const b = document.createElement("style"), _ = g.get(1);
354
+ if (_) {
355
+ const { width: S, height: E } = _ == null ? void 0 : _.page.getViewport({ scale: 1 });
356
+ b.innerHTML = `@page { size: ${S}px ${E}px }`;
357
357
  }
358
- return s.appendChild(_), s.append(...f), s;
358
+ return s.appendChild(b), s.append(...f), s;
359
359
  }, u = N(async () => {
360
360
  if (!t)
361
361
  return;
@@ -363,7 +363,7 @@ const So = () => {
363
363
  const f = document.createElement("canvas"), g = [];
364
364
  try {
365
365
  t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
366
- const _ = t.getOptionalContentConfig({ intent: "print" }), b = Promise.resolve(
366
+ const b = t.getOptionalContentConfig({ intent: "print" }), _ = Promise.resolve(
367
367
  t.annotationStorage.print ?? void 0
368
368
  ), S = e.size;
369
369
  for (const [x, L] of e) {
@@ -378,8 +378,8 @@ const So = () => {
378
378
  pageNumber: x,
379
379
  viewerPdfPage: D,
380
380
  printResolution: 150,
381
- optionalContentConfigPromise: _,
382
- printAnnotationStoragePromise: b
381
+ optionalContentConfigPromise: b,
382
+ printAnnotationStoragePromise: _
383
383
  }), m.current) {
384
384
  h();
385
385
  return;
@@ -573,12 +573,12 @@ const So = () => {
573
573
  }
574
574
  );
575
575
  }, xo = (t = {}, e = "") => {
576
- const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights: p } = qe(), m = H(!n), { currentZoom: v } = Qe(), [h, w] = $([]), { setFocusedPage: C } = ie(), { columnCount: y } = Ee(), { rotate: P } = Ge(), [T, u] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Re(), { pagesRef: _ } = ge(), [b, S] = $(null), E = H({}), x = W(() => T === 0 ? null : h[T - 1], [T, h]), L = W(() => h.length, [h]);
576
+ const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights: p } = qe(), m = H(!n), { currentZoom: v } = Qe(), [h, w] = $([]), { setFocusedPage: C } = ie(), { columnCount: y } = Ee(), { rotate: P } = Ge(), [T, u] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Re(), { pagesRef: b } = ge(), [_, S] = $(null), E = H({}), x = W(() => T === 0 ? null : h[T - 1], [T, h]), L = W(() => h.length, [h]);
577
577
  k(() => {
578
578
  if (!x || !c)
579
579
  return;
580
580
  const R = g || f;
581
- if (!R || !_)
581
+ if (!R || !b)
582
582
  return;
583
583
  const I = c.get(x.page);
584
584
  if (s === J.PAGE_SCROLLING && C(x.page), !I)
@@ -590,8 +590,8 @@ const So = () => {
590
590
  }
591
591
  s === J.HORIZONTAL_SCROLLING && (M = d.slice(0, x.page - 1).reduce((ae, de) => ae + de, 0));
592
592
  const G = {
593
- top: _.clientHeight / 2,
594
- left: _.clientWidth / 2
593
+ top: b.clientHeight / 2,
594
+ left: b.clientWidth / 2
595
595
  }, Z = {
596
596
  height: p[x.page - 1],
597
597
  width: d[x.page - 1]
@@ -617,7 +617,7 @@ const So = () => {
617
617
  s,
618
618
  g,
619
619
  f,
620
- _
620
+ b
621
621
  ]);
622
622
  const D = N(() => {
623
623
  u((R) => L ? R + 1 > L ? 1 : R + 1 : 0);
@@ -665,7 +665,7 @@ const So = () => {
665
665
  currentMatch: x,
666
666
  nextMatch: D,
667
667
  prevMatch: A,
668
- currentMatchElement: b,
668
+ currentMatchElement: _,
669
669
  setCurrentMatchElement: S
670
670
  };
671
671
  }, Tn = Ye({
@@ -771,14 +771,14 @@ const So = () => {
771
771
  }, Eo = (t) => {
772
772
  const { pageNumber: e } = t, { pages: n } = Q(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = xt(), [c, d] = $(
773
773
  []
774
- ), p = H(), m = H(), v = H(), h = W(() => r.filter((f) => f.pageIndex === e - 1), [r, e]), w = N(
774
+ ), p = H(), m = H(), v = H([]), h = W(() => r.filter((f) => f.pageIndex === e - 1), [r, e]), w = N(
775
775
  (f, g, s = !1) => {
776
776
  if (s && lr(f, g), !h.length) {
777
- v.current = void 0, d([]);
777
+ v.current = [], d([]);
778
778
  return;
779
779
  }
780
- const _ = dr(h, f, g);
781
- d(_);
780
+ const b = dr(h, f, g);
781
+ d(b);
782
782
  },
783
783
  [h]
784
784
  ), C = H(), y = H(!1), P = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
@@ -787,9 +787,9 @@ const So = () => {
787
787
  return;
788
788
  C.current = new AbortController();
789
789
  const { signal: g } = C.current, s = () => {
790
- P().forEach((b) => {
791
- const S = b.querySelector(".endOfContent");
792
- S && (b.appendChild(S), S.style.width = "", S.style.height = "", b.classList.remove(he.selecting));
790
+ P().forEach((_) => {
791
+ const S = _.querySelector(".endOfContent");
792
+ S && (_.appendChild(S), S.style.width = "", S.style.height = "", _.classList.remove(he.selecting));
793
793
  });
794
794
  };
795
795
  document.addEventListener(
@@ -817,21 +817,21 @@ const So = () => {
817
817
  },
818
818
  { signal: g }
819
819
  );
820
- let _ = null;
820
+ let b = null;
821
821
  document.addEventListener(
822
822
  "selectionchange",
823
823
  () => {
824
824
  var z, R;
825
- const b = document.getSelection();
826
- if (!b)
825
+ const _ = document.getSelection();
826
+ if (!_)
827
827
  return;
828
- if (b.rangeCount === 0) {
828
+ if (_.rangeCount === 0) {
829
829
  s();
830
830
  return;
831
831
  }
832
832
  const S = /* @__PURE__ */ new Set();
833
- for (let I = 0; I < b.rangeCount; I++) {
834
- const O = b.getRangeAt(I);
833
+ for (let I = 0; I < _.rangeCount; I++) {
834
+ const O = _.getRangeAt(I);
835
835
  P().forEach((M) => {
836
836
  O.intersectsNode(M) && !S.has(M) && S.add(M);
837
837
  });
@@ -844,13 +844,13 @@ const So = () => {
844
844
  O && (I.appendChild(O), O.style.width = "", O.style.height = "", I.classList.remove(he.selecting));
845
845
  }
846
846
  });
847
- const E = b.getRangeAt(0);
848
- let L = _ && (E.compareBoundaryPoints(Range.END_TO_END, _) === 0 || E.compareBoundaryPoints(Range.START_TO_END, _) === 0) ? E.startContainer : E.endContainer;
847
+ const E = _.getRangeAt(0);
848
+ let L = b && (E.compareBoundaryPoints(Range.END_TO_END, b) === 0 || E.compareBoundaryPoints(Range.START_TO_END, b) === 0) ? E.startContainer : E.endContainer;
849
849
  L.nodeType === Node.TEXT_NODE && (L = L.parentNode);
850
850
  const D = (z = L.parentElement) == null ? void 0 : z.closest(
851
851
  he["rp-text-layer"]
852
852
  ), A = D == null ? void 0 : D.querySelector(".endOfContent");
853
- A && D && (A.style.width = D.style.width, A.style.height = D.style.height, (R = L.parentElement) == null || R.insertBefore(A, L.nextSibling)), _ = E.cloneRange();
853
+ A && D && (A.style.width = D.style.width, A.style.height = D.style.height, (R = L.parentElement) == null || R.insertBefore(A, L.nextSibling)), b = E.cloneRange();
854
854
  },
855
855
  { signal: g }
856
856
  );
@@ -864,25 +864,28 @@ const So = () => {
864
864
  o.current && o.current.classList.remove(he.selecting);
865
865
  }, []);
866
866
  return k(() => {
867
- var s;
868
- if ((s = v.current) == null || s.classList.remove("selected"), !c.length || !a || a.pageIndex !== e - 1)
867
+ if (v.current.forEach((s) => {
868
+ s.classList.remove("selected");
869
+ }), !c.length || !a || a.pageIndex !== e - 1)
869
870
  return;
870
871
  const f = h.findIndex(
871
- (_) => JSON.stringify(_) === JSON.stringify(a)
872
+ (s) => JSON.stringify(s) === JSON.stringify(a)
872
873
  );
873
874
  if (f === -1)
874
875
  return;
875
- const g = c.find((_) => _.index === f);
876
- g && (v.current = g.element, l(g.element), g.element.classList.add("selected"));
876
+ const g = c.filter((s) => s.index === f);
877
+ g.length && (v.current = g.map((s) => s.element), l(g[0].element), g.forEach((s) => {
878
+ s.element.classList.add("selected");
879
+ }));
877
880
  }, [a, c, h]), k(() => {
878
881
  const f = n.get(e);
879
882
  if (!f || !o.current)
880
883
  return;
881
884
  const g = o.current;
882
885
  return p.current && p.current.cancel(), f.page.getTextContent().then((s) => {
883
- const _ = f.page.getViewport({ scale: 1 });
886
+ const b = f.page.getViewport({ scale: 1 });
884
887
  return p.current = new Sr.TextLayer({
885
- viewport: _,
888
+ viewport: b,
886
889
  textContentSource: s,
887
890
  container: g
888
891
  }), m.current = s, g && (g.innerText = ""), p.current.render();
@@ -891,10 +894,10 @@ const So = () => {
891
894
  [].slice.call(g.children).forEach((x) => {
892
895
  x.classList.add(he["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
893
896
  });
894
- const _ = (S = p.current) == null ? void 0 : S.textDivs;
895
- _ && m.current && w(m.current, _);
896
- const b = document.createElement("div");
897
- b.className = "endOfContent", (E = o.current) == null || E.appendChild(b);
897
+ const b = (S = p.current) == null ? void 0 : S.textDivs;
898
+ b && m.current && w(m.current, b);
899
+ const _ = document.createElement("div");
900
+ _.className = "endOfContent", (E = o.current) == null || E.appendChild(_);
898
901
  }).catch(() => {
899
902
  }), () => {
900
903
  var s;
@@ -902,8 +905,8 @@ const So = () => {
902
905
  };
903
906
  }, [n, e]), k(() => {
904
907
  var s;
905
- [].slice.call(o.current.children).forEach((_) => {
906
- _.classList.add(he["rp-text-layer-text"]);
908
+ [].slice.call(o.current.children).forEach((b) => {
909
+ b.classList.add(he["rp-text-layer-text"]);
907
910
  });
908
911
  const g = (s = p.current) == null ? void 0 : s.textDivs;
909
912
  g && m.current && w(m.current, g, !0);
@@ -963,7 +966,7 @@ const Do = (t) => {
963
966
  }
964
967
  const u = new AbortController();
965
968
  return (async () => {
966
- var _;
969
+ var b;
967
970
  a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new Lr({
968
971
  div: n.current,
969
972
  accessibilityManager: void 0,
@@ -976,7 +979,7 @@ const Do = (t) => {
976
979
  const g = await (r == null ? void 0 : r.hasJSActions()), s = await (r == null ? void 0 : r.getFieldObjects());
977
980
  if (u.signal.aborted)
978
981
  throw "abort";
979
- return (_ = a.current) == null ? void 0 : _.render({
982
+ return (b = a.current) == null ? void 0 : b.render({
980
983
  annotations: l,
981
984
  annotationStorage: r == null ? void 0 : r.annotationStorage,
982
985
  hasJSActions: g,
@@ -1034,9 +1037,9 @@ const Do = (t) => {
1034
1037
  return;
1035
1038
  const g = `[data-rp="page-${f}-textLayer"]`;
1036
1039
  return new Promise((s) => {
1037
- const _ = u.querySelector(g);
1038
- if (_) {
1039
- s(_);
1040
+ const b = u.querySelector(g);
1041
+ if (b) {
1042
+ s(b);
1040
1043
  return;
1041
1044
  }
1042
1045
  new MutationObserver((S, E) => {
@@ -1054,25 +1057,25 @@ const Do = (t) => {
1054
1057
  f(Array.from(g));
1055
1058
  return;
1056
1059
  }
1057
- new MutationObserver((_, b) => {
1060
+ new MutationObserver((b, _) => {
1058
1061
  const S = u.querySelectorAll(
1059
1062
  ".vpv-text-layer-text"
1060
1063
  );
1061
- S.length && (f(Array.from(S)), b.disconnect());
1064
+ S.length && (f(Array.from(S)), _.disconnect());
1062
1065
  }).observe(u, { childList: !0, subtree: !0 });
1063
1066
  });
1064
1067
  }
1065
1068
  const y = (u, f, g, s) => {
1066
1069
  var Z;
1067
- const _ = document.createRange(), b = g.firstChild;
1068
- if (!b || b.nodeType !== Node.TEXT_NODE)
1070
+ const b = document.createRange(), _ = g.firstChild;
1071
+ if (!_ || _.nodeType !== Node.TEXT_NODE)
1069
1072
  return null;
1070
- const S = ((Z = b.textContent) == null ? void 0 : Z.length) ?? 0, E = s[0].charIdxInSpan, x = s.length === 1 ? E : s[s.length - 1].charIdxInSpan;
1073
+ const S = ((Z = _.textContent) == null ? void 0 : Z.length) ?? 0, E = s[0].charIdxInSpan, x = s.length === 1 ? E : s[s.length - 1].charIdxInSpan;
1071
1074
  if (E > S || x + 1 > S)
1072
1075
  return null;
1073
- _.setStart(b, E), _.setEnd(b, x + 1);
1076
+ b.setStart(_, E), b.setEnd(_, x + 1);
1074
1077
  const L = document.createElement("span");
1075
- L.style.width = "auto", _.surroundContents(L);
1078
+ L.style.width = "auto", b.surroundContents(L);
1076
1079
  const D = L.getBoundingClientRect(), A = u.getBoundingClientRect(), z = A.height, R = A.width, I = 100 * (D.left - A.left) / R, O = 100 * (D.top - A.top) / z, M = 100 * D.height / z, G = 100 * D.width / R;
1077
1080
  return kr(L), {
1078
1081
  keywordStr: f,
@@ -1090,7 +1093,7 @@ const Do = (t) => {
1090
1093
  return;
1091
1094
  const s = await C(g);
1092
1095
  if (s.length) {
1093
- const _ = s.map((S) => S.tagName === "BR" ? " " : S.textContent).reduce(
1096
+ const b = s.map((S) => S.tagName === "BR" ? " " : S.textContent).reduce(
1094
1097
  (S, E, x) => S.concat(
1095
1098
  E.split("").map((L, D) => ({
1096
1099
  char: L,
@@ -1105,15 +1108,15 @@ const Do = (t) => {
1105
1108
  spanIdx: 0
1106
1109
  }
1107
1110
  ]
1108
- ).slice(1), b = T(g, f, s, _);
1109
- v(b);
1111
+ ).slice(1), _ = T(g, f, s, b);
1112
+ v(_);
1110
1113
  }
1111
1114
  }
1112
1115
  const T = (u, f, g, s) => {
1113
- const _ = f.length;
1114
- if (!s.length || !_)
1116
+ const b = f.length;
1117
+ if (!s.length || !b)
1115
1118
  return [];
1116
- const b = [], S = s.map((E) => E.char).join("");
1119
+ const _ = [], S = s.map((E) => E.char).join("");
1117
1120
  return h.forEach((E) => {
1118
1121
  const { keyword: x, regExp: L, wholeWords: D, color: A } = E, z = x;
1119
1122
  if (!z.trim())
@@ -1147,13 +1150,13 @@ const Do = (t) => {
1147
1150
  );
1148
1151
  if (X) {
1149
1152
  const { left: le, top: ae } = X;
1150
- if (b.find((te) => te.left === le && te.top === ae))
1153
+ if (_.find((te) => te.left === le && te.top === ae))
1151
1154
  continue;
1152
- b.push({ ...X, highlightColor: G.color });
1155
+ _.push({ ...X, highlightColor: G.color });
1153
1156
  }
1154
1157
  }
1155
1158
  }
1156
- }), b.sort(Fr), b;
1159
+ }), _.sort(Fr), _;
1157
1160
  };
1158
1161
  return k(() => {
1159
1162
  (async () => {
@@ -1344,10 +1347,10 @@ function Uo(t) {
1344
1347
  scrollTop: typeof s.props.initialScrollTop == "number" ? s.props.initialScrollTop : 0,
1345
1348
  scrollUpdateWasRequested: !1,
1346
1349
  verticalScrollDirection: "forward"
1347
- }, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(_, b, S, E, x, L, D, A) {
1350
+ }, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(b, _, S, E, x, L, D, A) {
1348
1351
  return s.props.onItemsRendered({
1349
- overscanColumnStartIndex: _,
1350
- overscanColumnStopIndex: b,
1352
+ overscanColumnStartIndex: b,
1353
+ overscanColumnStopIndex: _,
1351
1354
  overscanRowStartIndex: S,
1352
1355
  overscanRowStopIndex: E,
1353
1356
  visibleColumnStartIndex: x,
@@ -1355,34 +1358,34 @@ function Uo(t) {
1355
1358
  visibleRowStartIndex: D,
1356
1359
  visibleRowStopIndex: A
1357
1360
  });
1358
- }), s._callOnScroll = void 0, s._callOnScroll = dt(function(_, b, S, E, x) {
1361
+ }), s._callOnScroll = void 0, s._callOnScroll = dt(function(b, _, S, E, x) {
1359
1362
  return s.props.onScroll({
1360
1363
  horizontalScrollDirection: S,
1361
- scrollLeft: _,
1362
- scrollTop: b,
1364
+ scrollLeft: b,
1365
+ scrollTop: _,
1363
1366
  verticalScrollDirection: E,
1364
1367
  scrollUpdateWasRequested: x
1365
1368
  });
1366
- }), s._getItemStyle = void 0, s._getItemStyle = function(_, b) {
1367
- var S = s.props, E = S.columnWidth, x = S.direction, L = S.rowHeight, D = s._getItemStyleCache(y && E, y && x, y && L), A = _ + ":" + b, z;
1369
+ }), s._getItemStyle = void 0, s._getItemStyle = function(b, _) {
1370
+ var S = s.props, E = S.columnWidth, x = S.direction, L = S.rowHeight, D = s._getItemStyleCache(y && E, y && x, y && L), A = b + ":" + _, z;
1368
1371
  if (D.hasOwnProperty(A))
1369
1372
  z = D[A];
1370
1373
  else {
1371
- var R = n(s.props, b, s._instanceProps), I = x === "rtl";
1374
+ var R = n(s.props, _, s._instanceProps), I = x === "rtl";
1372
1375
  D[A] = z = {
1373
1376
  position: "absolute",
1374
1377
  left: I ? void 0 : R,
1375
1378
  right: I ? R : void 0,
1376
- top: v(s.props, _, s._instanceProps),
1377
- height: m(s.props, _, s._instanceProps),
1378
- width: a(s.props, b, s._instanceProps)
1379
+ top: v(s.props, b, s._instanceProps),
1380
+ height: m(s.props, b, s._instanceProps),
1381
+ width: a(s.props, _, s._instanceProps)
1379
1382
  };
1380
1383
  }
1381
1384
  return z;
1382
- }, s._getItemStyleCache = void 0, s._getItemStyleCache = dt(function(_, b, S) {
1385
+ }, s._getItemStyleCache = void 0, s._getItemStyleCache = dt(function(b, _, S) {
1383
1386
  return {};
1384
- }), s._onScroll = function(_) {
1385
- var b = _.currentTarget, S = b.clientHeight, E = b.clientWidth, x = b.scrollLeft, L = b.scrollTop, D = b.scrollHeight, A = b.scrollWidth;
1387
+ }), s._onScroll = function(b) {
1388
+ var _ = b.currentTarget, S = _.clientHeight, E = _.clientWidth, x = _.scrollLeft, L = _.scrollTop, D = _.scrollHeight, A = _.scrollWidth;
1386
1389
  s.setState(function(z) {
1387
1390
  if (z.scrollLeft === x && z.scrollTop === L)
1388
1391
  return null;
@@ -1407,9 +1410,9 @@ function Uo(t) {
1407
1410
  scrollUpdateWasRequested: !1
1408
1411
  };
1409
1412
  }, s._resetIsScrollingDebounced);
1410
- }, s._outerRefSetter = function(_) {
1411
- var b = s.props.outerRef;
1412
- s._outerRef = _, typeof b == "function" ? b(_) : b != null && typeof b == "object" && b.hasOwnProperty("current") && (b.current = _);
1413
+ }, s._outerRefSetter = function(b) {
1414
+ var _ = s.props.outerRef;
1415
+ s._outerRef = b, typeof _ == "function" ? _(b) : _ != null && typeof _ == "object" && _.hasOwnProperty("current") && (_.current = b);
1413
1416
  }, s._resetIsScrollingDebounced = function() {
1414
1417
  s._resetIsScrollingTimeoutId !== null && Zt(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId = Ho(s._resetIsScrolling, Go);
1415
1418
  }, s._resetIsScrolling = function() {
@@ -1420,66 +1423,66 @@ function Uo(t) {
1420
1423
  });
1421
1424
  }, s;
1422
1425
  }
1423
- u.getDerivedStateFromProps = function(s, _) {
1424
- return Vo(s, _), P(s), null;
1426
+ u.getDerivedStateFromProps = function(s, b) {
1427
+ return Vo(s, b), P(s), null;
1425
1428
  };
1426
1429
  var f = u.prototype;
1427
1430
  return f.scrollTo = function(s) {
1428
- var _ = s.scrollLeft, b = s.scrollTop;
1429
- _ !== void 0 && (_ = Math.max(0, _)), b !== void 0 && (b = Math.max(0, b)), this.setState(function(S) {
1430
- return _ === void 0 && (_ = S.scrollLeft), b === void 0 && (b = S.scrollTop), S.scrollLeft === _ && S.scrollTop === b ? null : {
1431
- horizontalScrollDirection: S.scrollLeft < _ ? "forward" : "backward",
1432
- scrollLeft: _,
1433
- scrollTop: b,
1431
+ var b = s.scrollLeft, _ = s.scrollTop;
1432
+ b !== void 0 && (b = Math.max(0, b)), _ !== void 0 && (_ = Math.max(0, _)), this.setState(function(S) {
1433
+ return b === void 0 && (b = S.scrollLeft), _ === void 0 && (_ = S.scrollTop), S.scrollLeft === b && S.scrollTop === _ ? null : {
1434
+ horizontalScrollDirection: S.scrollLeft < b ? "forward" : "backward",
1435
+ scrollLeft: b,
1436
+ scrollTop: _,
1434
1437
  scrollUpdateWasRequested: !0,
1435
- verticalScrollDirection: S.scrollTop < b ? "forward" : "backward"
1438
+ verticalScrollDirection: S.scrollTop < _ ? "forward" : "backward"
1436
1439
  };
1437
1440
  }, this._resetIsScrollingDebounced);
1438
1441
  }, f.scrollToItem = function(s) {
1439
- var _ = s.align, b = _ === void 0 ? "auto" : _, S = s.columnIndex, E = s.rowIndex, x = this.props, L = x.columnCount, D = x.height, A = x.rowCount, z = x.width, R = this.state, I = R.scrollLeft, O = R.scrollTop, M = $o();
1442
+ var b = s.align, _ = b === void 0 ? "auto" : b, S = s.columnIndex, E = s.rowIndex, x = this.props, L = x.columnCount, D = x.height, A = x.rowCount, z = x.width, R = this.state, I = R.scrollLeft, O = R.scrollTop, M = $o();
1440
1443
  S !== void 0 && (S = Math.max(0, Math.min(S, L - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, A - 1)));
1441
1444
  var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > z ? M : 0, V = G > D ? M : 0;
1442
1445
  this.scrollTo({
1443
- scrollLeft: S !== void 0 ? d(this.props, S, b, I, this._instanceProps, V) : I,
1444
- scrollTop: E !== void 0 ? p(this.props, E, b, O, this._instanceProps, j) : O
1446
+ scrollLeft: S !== void 0 ? d(this.props, S, _, I, this._instanceProps, V) : I,
1447
+ scrollTop: E !== void 0 ? p(this.props, E, _, O, this._instanceProps, j) : O
1445
1448
  });
1446
1449
  }, f.componentDidMount = function() {
1447
- var s = this.props, _ = s.initialScrollLeft, b = s.initialScrollTop;
1450
+ var s = this.props, b = s.initialScrollLeft, _ = s.initialScrollTop;
1448
1451
  if (this._outerRef != null) {
1449
1452
  var S = this._outerRef;
1450
- typeof _ == "number" && (S.scrollLeft = _), typeof b == "number" && (S.scrollTop = b);
1453
+ typeof b == "number" && (S.scrollLeft = b), typeof _ == "number" && (S.scrollTop = _);
1451
1454
  }
1452
1455
  this._callPropsCallbacks();
1453
1456
  }, f.componentDidUpdate = function() {
1454
- var s = this.props.direction, _ = this.state, b = _.scrollLeft, S = _.scrollTop, E = _.scrollUpdateWasRequested;
1457
+ var s = this.props.direction, b = this.state, _ = b.scrollLeft, S = b.scrollTop, E = b.scrollUpdateWasRequested;
1455
1458
  if (E && this._outerRef != null) {
1456
1459
  var x = this._outerRef;
1457
1460
  if (s === "rtl")
1458
1461
  switch (jt()) {
1459
1462
  case "negative":
1460
- x.scrollLeft = -b;
1463
+ x.scrollLeft = -_;
1461
1464
  break;
1462
1465
  case "positive-ascending":
1463
- x.scrollLeft = b;
1466
+ x.scrollLeft = _;
1464
1467
  break;
1465
1468
  default:
1466
1469
  var L = x.clientWidth, D = x.scrollWidth;
1467
- x.scrollLeft = D - L - b;
1470
+ x.scrollLeft = D - L - _;
1468
1471
  break;
1469
1472
  }
1470
1473
  else
1471
- x.scrollLeft = Math.max(0, b);
1474
+ x.scrollLeft = Math.max(0, _);
1472
1475
  x.scrollTop = Math.max(0, S);
1473
1476
  }
1474
1477
  this._callPropsCallbacks();
1475
1478
  }, f.componentWillUnmount = function() {
1476
1479
  this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
1477
1480
  }, f.render = function() {
1478
- var s = this.props, _ = s.children, b = s.className, S = s.columnCount, E = s.direction, x = s.height, L = s.innerRef, D = s.innerElementType, A = s.innerTagName, z = s.itemData, R = s.itemKey, I = R === void 0 ? qo : R, O = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, V = s.width, ee = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], Fe = de[1], Ne = [];
1481
+ var s = this.props, b = s.children, _ = s.className, S = s.columnCount, E = s.direction, x = s.height, L = s.innerRef, D = s.innerElementType, A = s.innerTagName, z = s.itemData, R = s.itemKey, I = R === void 0 ? qo : R, O = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, V = s.width, ee = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], Fe = de[1], Ne = [];
1479
1482
  if (S > 0 && G)
1480
1483
  for (var Pe = te; Pe <= Fe; Pe++)
1481
1484
  for (var we = le; we <= ae; we++)
1482
- Ne.push(Ve(_, {
1485
+ Ne.push(Ve(b, {
1483
1486
  columnIndex: we,
1484
1487
  data: z,
1485
1488
  isScrolling: j ? ee : void 0,
@@ -1493,7 +1496,7 @@ function Uo(t) {
1493
1496
  }));
1494
1497
  var nt = l(this.props, this._instanceProps), rt = c(this.props, this._instanceProps);
1495
1498
  return Ve(O || M || "div", {
1496
- className: b,
1499
+ className: _,
1497
1500
  onScroll: this._onScroll,
1498
1501
  ref: this._outerRefSetter,
1499
1502
  style: Wr({
@@ -1515,8 +1518,8 @@ function Uo(t) {
1515
1518
  }
1516
1519
  }));
1517
1520
  }, f._callPropsCallbacks = function() {
1518
- var s = this.props, _ = s.columnCount, b = s.onItemsRendered, S = s.onScroll, E = s.rowCount;
1519
- if (typeof b == "function" && _ > 0 && E > 0) {
1521
+ var s = this.props, b = s.columnCount, _ = s.onItemsRendered, S = s.onScroll, E = s.rowCount;
1522
+ if (typeof _ == "function" && b > 0 && E > 0) {
1520
1523
  var x = this._getHorizontalRangeToRender(), L = x[0], D = x[1], A = x[2], z = x[3], R = this._getVerticalRangeToRender(), I = R[0], O = R[1], M = R[2], G = R[3];
1521
1524
  this._callOnItemsRendered(L, D, I, O, A, z, M, G);
1522
1525
  }
@@ -1525,14 +1528,14 @@ function Uo(t) {
1525
1528
  this._callOnScroll(V, ee, j, le, X);
1526
1529
  }
1527
1530
  }, f._getHorizontalRangeToRender = function() {
1528
- var s = this.props, _ = s.columnCount, b = s.overscanColumnCount, S = s.overscanColumnsCount, E = s.overscanCount, x = s.rowCount, L = this.state, D = L.horizontalScrollDirection, A = L.isScrolling, z = L.scrollLeft, R = b || S || E || 1;
1529
- if (_ === 0 || x === 0)
1531
+ var s = this.props, b = s.columnCount, _ = s.overscanColumnCount, S = s.overscanColumnsCount, E = s.overscanCount, x = s.rowCount, L = this.state, D = L.horizontalScrollDirection, A = L.isScrolling, z = L.scrollLeft, R = _ || S || E || 1;
1532
+ if (b === 0 || x === 0)
1530
1533
  return [0, 0, 0, 0];
1531
1534
  var I = o(this.props, z, this._instanceProps), O = r(this.props, I, z, this._instanceProps), M = !A || D === "backward" ? Math.max(1, R) : 1, G = !A || D === "forward" ? Math.max(1, R) : 1;
1532
- return [Math.max(0, I - M), Math.max(0, Math.min(_ - 1, O + G)), I, O];
1535
+ return [Math.max(0, I - M), Math.max(0, Math.min(b - 1, O + G)), I, O];
1533
1536
  }, f._getVerticalRangeToRender = function() {
1534
- var s = this.props, _ = s.columnCount, b = s.overscanCount, S = s.overscanRowCount, E = s.overscanRowsCount, x = s.rowCount, L = this.state, D = L.isScrolling, A = L.verticalScrollDirection, z = L.scrollTop, R = S || E || b || 1;
1535
- if (_ === 0 || x === 0)
1537
+ var s = this.props, b = s.columnCount, _ = s.overscanCount, S = s.overscanRowCount, E = s.overscanRowsCount, x = s.rowCount, L = this.state, D = L.isScrolling, A = L.verticalScrollDirection, z = L.scrollTop, R = S || E || _ || 1;
1538
+ if (b === 0 || x === 0)
1536
1539
  return [0, 0, 0, 0];
1537
1540
  var I = h(this.props, z, this._instanceProps), O = w(this.props, I, z, this._instanceProps), M = !D || A === "backward" ? Math.max(1, R) : 1, G = !D || A === "forward" ? Math.max(1, R) : 1;
1538
1541
  return [Math.max(0, I - M), Math.max(0, Math.min(x - 1, O + G)), I, O];
@@ -1984,7 +1987,7 @@ const ei = ln(({ widths: t, heights: e }) => {
1984
1987
  const f = u.endX >= P.startLeft && u.endY >= P.startTop, g = u.startX <= P.endLeft && u.startY <= P.endTop;
1985
1988
  return f && g;
1986
1989
  }).map((u) => {
1987
- const f = P.startLeft > u.startX ? P.startLeft : u.startX, g = P.startTop > u.startY ? P.startTop : u.startY, s = P.endLeft < u.endX ? P.endLeft : u.endX, _ = P.endTop < u.endY ? P.endTop : u.endY, b = s - f, S = _ - g, x = +(b * S / (u.width * u.height) * 100).toFixed(2);
1990
+ const f = P.startLeft > u.startX ? P.startLeft : u.startX, g = P.startTop > u.startY ? P.startTop : u.startY, s = P.endLeft < u.endX ? P.endLeft : u.endX, b = P.endTop < u.endY ? P.endTop : u.endY, _ = s - f, S = b - g, x = +(_ * S / (u.width * u.height) * 100).toFixed(2);
1988
1991
  return {
1989
1992
  pageNumber: u.pageNumber,
1990
1993
  ratio: x
@@ -2014,7 +2017,7 @@ const ei = ln(({ widths: t, heights: e }) => {
2014
2017
  virtualScrollableElementRef: v,
2015
2018
  totalInnerDimensions: h,
2016
2019
  pageScrollElementRef: w
2017
- } = et(), C = H(!0), { nextPage: y, prevPage: P, setFocusedPage: T, focusedPage: u } = ie(), { scrollMode: f } = Re(), { viewMode: g } = Ee(), s = H(null), { loading: _ } = Q(), { passwordRequired: b } = nr(), { LoaderImageComponent: S } = hn(), E = H(
2020
+ } = et(), C = H(!0), { nextPage: y, prevPage: P, setFocusedPage: T, focusedPage: u } = ie(), { scrollMode: f } = Re(), { viewMode: g } = Ee(), s = H(null), { loading: b } = Q(), { passwordRequired: _ } = nr(), { LoaderImageComponent: S } = hn(), E = H(
2018
2021
  h
2019
2022
  ), x = H({
2020
2023
  viewMode: g,
@@ -2139,8 +2142,8 @@ const ei = ln(({ widths: t, heights: e }) => {
2139
2142
  [te, ae, ue]
2140
2143
  );
2141
2144
  return k(() => {
2142
- _ && de();
2143
- }, [_]), k(() => {
2145
+ b && de();
2146
+ }, [b]), k(() => {
2144
2147
  if (!(j.height === 0 || !C.current)) {
2145
2148
  if (e === J.PAGE_SCROLLING) {
2146
2149
  t !== u && w && T(t), C.current = !1;
@@ -2185,7 +2188,7 @@ const ei = ln(({ widths: t, heights: e }) => {
2185
2188
  ),
2186
2189
  children: ri
2187
2190
  }
2188
- ) : _ ? null : /* @__PURE__ */ i(
2191
+ ) : b ? null : /* @__PURE__ */ i(
2189
2192
  "div",
2190
2193
  {
2191
2194
  className: ue["rp-loader"],
@@ -2199,7 +2202,7 @@ const ei = ln(({ widths: t, heights: e }) => {
2199
2202
  children: S && /* @__PURE__ */ i(S, {})
2200
2203
  }
2201
2204
  ) }) }) }),
2202
- b && /* @__PURE__ */ i(qr, {})
2205
+ _ && /* @__PURE__ */ i(qr, {})
2203
2206
  ] });
2204
2207
  }, ke = {
2205
2208
  "rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
@@ -2723,15 +2726,15 @@ const xe = {
2723
2726
  return (u = c.get(a)) == null ? void 0 : u.page.getViewport({ scale: 1, rotation: l });
2724
2727
  }, [c, a, l]), P = N(
2725
2728
  (u) => {
2726
- const f = ((y == null ? void 0 : y.width) || 0) + 2 * Mt, g = ((y == null ? void 0 : y.height) || 0) + 2 * Mt, s = (o == null ? void 0 : o.clientWidth) || 0, _ = (o == null ? void 0 : o.clientHeight) || 0, b = bo(
2729
+ const f = ((y == null ? void 0 : y.width) || 0) + 2 * Mt, g = ((y == null ? void 0 : y.height) || 0) + 2 * Mt, s = (o == null ? void 0 : o.clientWidth) || 0, b = (o == null ? void 0 : o.clientHeight) || 0, _ = bo(
2727
2730
  u,
2728
2731
  s,
2729
- _,
2732
+ b,
2730
2733
  f,
2731
2734
  g,
2732
2735
  m
2733
2736
  );
2734
- e(b);
2737
+ e(_);
2735
2738
  },
2736
2739
  [e, y]
2737
2740
  ), T = N(
@@ -2833,10 +2836,10 @@ const xe = {
2833
2836
  n(!0);
2834
2837
  }, []), s = N(() => {
2835
2838
  p(""), T(""), n(!1);
2836
- }, [p]), _ = (I) => {
2839
+ }, [p]), b = (I) => {
2837
2840
  const O = I.key === "Enter", M = I.key === " ";
2838
2841
  (O || M) && s();
2839
- }, b = N(
2842
+ }, _ = N(
2840
2843
  (I) => {
2841
2844
  I.key === "Escape" && e && s();
2842
2845
  },
@@ -2847,9 +2850,9 @@ const xe = {
2847
2850
  },
2848
2851
  [P, w, h, p, C]
2849
2852
  );
2850
- k(() => (window.addEventListener("keydown", b), () => {
2851
- window.removeEventListener("keydown", b);
2852
- }), [b]), k(() => {
2853
+ k(() => (window.addEventListener("keydown", _), () => {
2854
+ window.removeEventListener("keydown", _);
2855
+ }), [_]), k(() => {
2853
2856
  r && r.focus();
2854
2857
  }, [r]);
2855
2858
  const E = N((I) => {
@@ -2892,7 +2895,7 @@ const xe = {
2892
2895
  }
2893
2896
  ) }),
2894
2897
  d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Ct, { className: Y["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: L }),
2895
- f && /* @__PURE__ */ i("div", { className: Y["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: _, handleClose: s }) })
2898
+ f && /* @__PURE__ */ i("div", { className: Y["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: b, handleClose: s }) })
2896
2899
  ] }),
2897
2900
  /* @__PURE__ */ F("div", { className: Y["rp-search-tool-input-checkboxes"], children: [
2898
2901
  f && /* @__PURE__ */ i(on, {}),
@@ -2904,7 +2907,7 @@ const xe = {
2904
2907
  ] }),
2905
2908
  !f && /* @__PURE__ */ F("div", { className: Y["rp-search-tool-controls"], children: [
2906
2909
  /* @__PURE__ */ i(on, {}),
2907
- /* @__PURE__ */ i(Ht, { onKeyPress: _, handleClose: s })
2910
+ /* @__PURE__ */ i(Ht, { onKeyPress: b, handleClose: s })
2908
2911
  ] })
2909
2912
  ] })
2910
2913
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { useState as i, useId as V, useMemo as T } from "react";
3
- import { P as w, S as D, T as k, a as x } from "../RPDefaultLayout-77fbc282.js";
3
+ import { P as w, S as D, T as k, a as x } from "../RPDefaultLayout-45eb04c1.js";
4
4
  import { DarkModeProvider as E } from "../contexts/DarkModeContext.js";
5
5
  import { ViewMode as F, ScrollMode as G, SelectionMode as b } from "../utils/types.js";
6
6
  import { RotateProvider as y } from "../contexts/RotationContext.js";
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { R as L } from "../RPDefaultLayout-77fbc282.js";
3
+ import { R as L } from "../RPDefaultLayout-45eb04c1.js";
4
4
  import "../contexts/VirtualScrollContext.js";
5
5
  import "../contexts/RPDocumentContext.js";
6
6
  import "../contexts/DocumentPasswordContext.js";
@@ -4,7 +4,7 @@ import { DocumentProvider as s } from "../contexts/RPDocumentContext.js";
4
4
  import { DocumentPasswordProvider as l } from "../contexts/DocumentPasswordContext.js";
5
5
  import { RPController as P } from "./RPController.js";
6
6
  import { LoaderProvider as f } from "../contexts/LoaderContext.js";
7
- import "../RPDefaultLayout-77fbc282.js";
7
+ import "../RPDefaultLayout-45eb04c1.js";
8
8
  import "./RPConfig.js";
9
9
  import "./RPTheme.js";
10
10
  import "./RPDropFileZone.js";
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../clsx-0c6e471a.js";
3
3
  import "react";
4
- import { K as E } from "../../RPDefaultLayout-77fbc282.js";
4
+ import { K as E } from "../../RPDefaultLayout-45eb04c1.js";
5
5
  import "../../contexts/ThemeContext.js";
6
6
  import "../../contexts/RPDocumentContext.js";
7
7
  import "../../contexts/DocumentPasswordContext.js";
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { b as x } from "../../RPDefaultLayout-77fbc282.js";
3
+ import { b as x } from "../../RPDefaultLayout-45eb04c1.js";
4
4
  import "../../contexts/ToolbarComponentContext.js";
5
5
  import "../../contexts/LayoutContainerContext.js";
6
6
  import "./Container.js";
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../icons/Thumbnail.js";
4
4
  import "../../ui/Button.js";
5
- import { J as s } from "../../../RPDefaultLayout-77fbc282.js";
5
+ import { J as s } from "../../../RPDefaultLayout-45eb04c1.js";
6
6
  import "./RPSplitter.js";
7
7
  import "../../../contexts/ToolbarComponentContext.js";
8
8
  import "../../../contexts/IconContext.js";
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { H as a } from "../../../RPDefaultLayout-77fbc282.js";
3
+ import { H as a } from "../../../RPDefaultLayout-45eb04c1.js";
4
4
  import "../../../clsx-0c6e471a.js";
5
5
  import "../../icons/LoaderIcon.js";
6
6
  export {
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { I as t } from "../../../RPDefaultLayout-77fbc282.js";
3
+ import { I as t } from "../../../RPDefaultLayout-45eb04c1.js";
4
4
  import "../../../utils/hooks/useInfiniteScroll.js";
5
5
  export {
6
6
  t as Thumbnails
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { x as J } from "../../../RPDefaultLayout-77fbc282.js";
3
+ import { x as J } from "../../../RPDefaultLayout-45eb04c1.js";
4
4
  import "../../../contexts/LayoutContainerContext.js";
5
5
  import "../../icons/CloseIcon.js";
6
6
  import "../../../utils/dateFormatter.js";
@@ -3,7 +3,7 @@ import "../../icons/FileDownloadDefaultIcon.js";
3
3
  import "../../../contexts/ToolbarComponentContext.js";
4
4
  import "../../../contexts/IconContext.js";
5
5
  import "../../ui/Button.js";
6
- import { F as f } from "../../../RPDefaultLayout-77fbc282.js";
6
+ import { F as f } from "../../../RPDefaultLayout-45eb04c1.js";
7
7
  import "./MenuItem.js";
8
8
  import "../../../contexts/ViewportContext.js";
9
9
  import "../../ui/RPTooltip.js";
@@ -4,7 +4,7 @@ import "./MenuItem.js";
4
4
  import "react";
5
5
  import "../../../contexts/RPDocumentContext.js";
6
6
  import "../../../contexts/DocumentPasswordContext.js";
7
- import { M as I } from "../../../RPDefaultLayout-77fbc282.js";
7
+ import { M as I } from "../../../RPDefaultLayout-45eb04c1.js";
8
8
  import "../../../contexts/DarkModeContext.js";
9
9
  import "../../../contexts/RotationContext.js";
10
10
  import "../../../contexts/LayerContext.js";
@@ -3,7 +3,7 @@ import "../../../contexts/LayoutContainerContext.js";
3
3
  import "../../icons/ThreeDotIcon.js";
4
4
  import "../../ui/Button.js";
5
5
  import "../../ui/DropDown.js";
6
- import { O as q } from "../../../RPDefaultLayout-77fbc282.js";
6
+ import { O as q } from "../../../RPDefaultLayout-45eb04c1.js";
7
7
  import "../../../contexts/OtherToolContext.js";
8
8
  import "./DocumentProperties.js";
9
9
  import "./RotateTool.js";
@@ -3,7 +3,7 @@ import "react";
3
3
  import "../../icons/ChevronUpIcon.js";
4
4
  import "../../ui/Button.js";
5
5
  import "../../ui/Input.js";
6
- import { w as b } from "../../../RPDefaultLayout-77fbc282.js";
6
+ import { w as b } from "../../../RPDefaultLayout-45eb04c1.js";
7
7
  import "../../../contexts/IconContext.js";
8
8
  import "../../../contexts/ToolbarComponentContext.js";
9
9
  import "../../../contexts/ViewportContext.js";
@@ -3,7 +3,7 @@ import "../../icons/PrintDefaultIcon.js";
3
3
  import "../../../contexts/ToolbarComponentContext.js";
4
4
  import "../../../contexts/IconContext.js";
5
5
  import "../../ui/Button.js";
6
- import { y as s } from "../../../RPDefaultLayout-77fbc282.js";
6
+ import { y as s } from "../../../RPDefaultLayout-45eb04c1.js";
7
7
  import "../../../contexts/ViewportContext.js";
8
8
  import "../../../contexts/LocalizationContext.js";
9
9
  import "./MenuItem.js";
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { G as a } from "../../../RPDefaultLayout-77fbc282.js";
3
+ import { G as a } from "../../../RPDefaultLayout-45eb04c1.js";
4
4
  import "../../../contexts/ToolbarComponentContext.js";
5
5
  import "../../../contexts/ViewportContext.js";
6
6
  export {
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "./FileUploadTool.js";
3
3
  import "./DarkModeTool.js";
4
- import { z as b } from "../../../RPDefaultLayout-77fbc282.js";
4
+ import { z as b } from "../../../RPDefaultLayout-45eb04c1.js";
5
5
  import "./FullScreenTool.js";
6
6
  import "../../../contexts/ViewportContext.js";
7
7
  export {
@@ -3,7 +3,7 @@ import "../../ui/RPTooltip.js";
3
3
  import "../../ui/Button.js";
4
4
  import "../../icons/ChevronUpIcon.js";
5
5
  import "../../../contexts/LocalizationContext.js";
6
- import { B as s } from "../../../RPDefaultLayout-77fbc282.js";
6
+ import { B as s } from "../../../RPDefaultLayout-45eb04c1.js";
7
7
  import "../../../SearchCloseButton-ddb9877e.js";
8
8
  export {
9
9
  s as SearchResultNavigator
@@ -8,7 +8,7 @@ import "../../ui/Input.js";
8
8
  import "../../ui/Checkbox.js";
9
9
  import "../../icons/ClearIcon.js";
10
10
  import "../../icons/LoaderIcon.js";
11
- import { E as P } from "../../../RPDefaultLayout-77fbc282.js";
11
+ import { E as P } from "../../../RPDefaultLayout-45eb04c1.js";
12
12
  import "../../../contexts/IconContext.js";
13
13
  import "../../../contexts/RPDocumentContext.js";
14
14
  import "../../../contexts/DocumentPasswordContext.js";
@@ -5,7 +5,7 @@ import "../../icons/ChevronUpIcon.js";
5
5
  import "../../icons/ZoomInIcon.js";
6
6
  import "../../icons/ZoomOutIcon.js";
7
7
  import "../../ui/Button.js";
8
- import { Z as w } from "../../../RPDefaultLayout-77fbc282.js";
8
+ import { Z as w } from "../../../RPDefaultLayout-45eb04c1.js";
9
9
  import "../../ui/DropDown.js";
10
10
  import "../../../contexts/LayoutContainerContext.js";
11
11
  import "../../../index-7279fb4e.js";
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../contexts/RPDocumentContext.js";
4
4
  import "../../contexts/DocumentPasswordContext.js";
5
- import { A as I } from "../../RPDefaultLayout-77fbc282.js";
5
+ import { A as I } from "../../RPDefaultLayout-45eb04c1.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../utils/types.js";
8
8
  import "../../contexts/RotationContext.js";
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../contexts/RPDocumentContext.js";
4
4
  import "../../contexts/DocumentPasswordContext.js";
5
- import { C as F } from "../../RPDefaultLayout-77fbc282.js";
5
+ import { C as F } from "../../RPDefaultLayout-45eb04c1.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../contexts/RotationContext.js";
8
8
  import "../../contexts/LayerContext.js";
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { D as p } from "../../RPDefaultLayout-77fbc282.js";
3
+ import { D as p } from "../../RPDefaultLayout-45eb04c1.js";
4
4
  export {
5
5
  p as DualPage
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { r as E } from "../../RPDefaultLayout-77fbc282.js";
3
+ import { r as E } from "../../RPDefaultLayout-45eb04c1.js";
4
4
  import "../../contexts/RPDocumentContext.js";
5
5
  import "../../contexts/DocumentPasswordContext.js";
6
6
  import "../../contexts/DarkModeContext.js";
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { t as i } from "../../RPDefaultLayout-77fbc282.js";
3
+ import { t as i } from "../../RPDefaultLayout-45eb04c1.js";
4
4
  export {
5
5
  i as SinglePage
6
6
  };
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../contexts/RPDocumentContext.js";
4
4
  import "../../contexts/DocumentPasswordContext.js";
5
- import { q as E } from "../../RPDefaultLayout-77fbc282.js";
5
+ import { q as E } from "../../RPDefaultLayout-45eb04c1.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../contexts/RotationContext.js";
8
8
  import "../../contexts/LayerContext.js";
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../contexts/RPDocumentContext.js";
4
4
  import "../../contexts/DocumentPasswordContext.js";
5
- import { p as F } from "../../RPDefaultLayout-77fbc282.js";
5
+ import { p as F } from "../../RPDefaultLayout-45eb04c1.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../contexts/RotationContext.js";
8
8
  import "../../contexts/LayerContext.js";
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { L as i } from "../../RPDefaultLayout-77fbc282.js";
2
+ import { L as i } from "../../RPDefaultLayout-45eb04c1.js";
3
3
  import "../../clsx-0c6e471a.js";
4
4
  import "../../contexts/LocalizationContext.js";
5
5
  export {
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { h as e, P as m, u as p } from "../RPDefaultLayout-77fbc282.js";
3
+ import { h as e, P as m, u as p } from "../RPDefaultLayout-45eb04c1.js";
4
4
  import "./RPDocumentContext.js";
5
5
  import "../utils/appConsole.js";
6
6
  export {
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { j as e, a as n, d as a } from "../RPDefaultLayout-77fbc282.js";
3
+ import { j as e, a as n, d as a } from "../RPDefaultLayout-45eb04c1.js";
4
4
  export {
5
5
  e as PrintContext,
6
6
  n as PrintProvider,
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { o as a, S as s, e as S } from "../RPDefaultLayout-77fbc282.js";
3
+ import { o as a, S as s, e as S } from "../RPDefaultLayout-45eb04c1.js";
4
4
  export {
5
5
  a as SearchContext,
6
6
  s as SearchProvider,
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { l as i, T as r, m as e } from "../RPDefaultLayout-77fbc282.js";
3
+ import { l as i, T as r, m as e } from "../RPDefaultLayout-45eb04c1.js";
4
4
  export {
5
5
  i as ThumbnailContext,
6
6
  r as ThumbnailProvider,
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RPProvider as t } from "./components/RPProvider.js";
2
- import { b as x, R as n, c as s, u as m, d as p, e as f } from "./RPDefaultLayout-77fbc282.js";
2
+ import { b as x, R as n, c as s, u as m, d as p, e as f } from "./RPDefaultLayout-45eb04c1.js";
3
3
  import { RPConfig as a } from "./components/RPConfig.js";
4
4
  import { RPController as l } from "./components/RPController.js";
5
5
  import { RPTheme as P } from "./components/RPTheme.js";
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../contexts/RPDocumentContext.js";
4
4
  import "../../contexts/DocumentPasswordContext.js";
5
- import { c as E } from "../../RPDefaultLayout-77fbc282.js";
5
+ import { c as E } from "../../RPDefaultLayout-45eb04c1.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../contexts/RotationContext.js";
8
8
  import "../../contexts/LayerContext.js";
@@ -1,6 +1,6 @@
1
1
  import { useState as g, useCallback as h, useEffect as A } from "react";
2
2
  import { appConsole as c } from "../appConsole.js";
3
- const b = /* @__PURE__ */ new Date("2025-06-04T04:46:16.910Z"), l = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", s = {
3
+ const b = /* @__PURE__ */ new Date("2025-06-05T03:01:51.881Z"), l = "Please visit https://www.react-pdf.dev/manage-license/ to generate a new license key.", s = {
4
4
  invalidLicense: `You are currently using without a valid license. ${l}`,
5
5
  mismatchedDomain: `Your license key is not valid for the current domain / IP. ${l}`,
6
6
  expired: `Your license key has expired. ${l}`,
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "../types.js";
3
- import { g as G } from "../../RPDefaultLayout-77fbc282.js";
3
+ import { g as G } from "../../RPDefaultLayout-45eb04c1.js";
4
4
  import "react/jsx-runtime";
5
5
  import "../../contexts/RPDocumentContext.js";
6
6
  import "../../contexts/DocumentPasswordContext.js";
@@ -5,7 +5,7 @@ import "../calculatePage.js";
5
5
  import "react/jsx-runtime";
6
6
  import "../../contexts/RPDocumentContext.js";
7
7
  import "../../contexts/DocumentPasswordContext.js";
8
- import { v as G } from "../../RPDefaultLayout-77fbc282.js";
8
+ import { v as G } from "../../RPDefaultLayout-45eb04c1.js";
9
9
  import "../../contexts/DarkModeContext.js";
10
10
  import "../../contexts/RotationContext.js";
11
11
  import "../../contexts/LayerContext.js";
@@ -2,7 +2,7 @@ import "react";
2
2
  import "react/jsx-runtime";
3
3
  import "../../contexts/RPDocumentContext.js";
4
4
  import "../../contexts/DocumentPasswordContext.js";
5
- import { i as F } from "../../RPDefaultLayout-77fbc282.js";
5
+ import { i as F } from "../../RPDefaultLayout-45eb04c1.js";
6
6
  import "../../contexts/DarkModeContext.js";
7
7
  import "../../contexts/RotationContext.js";
8
8
  import "../../contexts/LayerContext.js";
@@ -3,7 +3,7 @@ import "../../contexts/ScrollModeContext.js";
3
3
  import "react/jsx-runtime";
4
4
  import "../../contexts/RPDocumentContext.js";
5
5
  import "../../contexts/DocumentPasswordContext.js";
6
- import { f as F } from "../../RPDefaultLayout-77fbc282.js";
6
+ import { f as F } from "../../RPDefaultLayout-45eb04c1.js";
7
7
  import "../../contexts/DarkModeContext.js";
8
8
  import "../types.js";
9
9
  import "../../contexts/RotationContext.js";
@@ -7,7 +7,7 @@ import "../../contexts/RPDocumentContext.js";
7
7
  import "../../contexts/ZoomContext.js";
8
8
  import "react/jsx-runtime";
9
9
  import "../../contexts/DocumentPasswordContext.js";
10
- import { n as I } from "../../RPDefaultLayout-77fbc282.js";
10
+ import { n as I } from "../../RPDefaultLayout-45eb04c1.js";
11
11
  import "../../contexts/DarkModeContext.js";
12
12
  import "../../contexts/RotationContext.js";
13
13
  import "../../contexts/LayerContext.js";
@@ -3,7 +3,7 @@ import "../renderPage.js";
3
3
  import "react/jsx-runtime";
4
4
  import "../../contexts/RPDocumentContext.js";
5
5
  import "../../contexts/DocumentPasswordContext.js";
6
- import { k as G } from "../../RPDefaultLayout-77fbc282.js";
6
+ import { k as G } from "../../RPDefaultLayout-45eb04c1.js";
7
7
  import "../../contexts/DarkModeContext.js";
8
8
  import "../../contexts/RotationContext.js";
9
9
  import "../../contexts/LayerContext.js";
@@ -4,7 +4,7 @@ import "../../contexts/ScrollModeContext.js";
4
4
  import "react/jsx-runtime";
5
5
  import "../../contexts/RPDocumentContext.js";
6
6
  import "../../contexts/DocumentPasswordContext.js";
7
- import { s as D } from "../../RPDefaultLayout-77fbc282.js";
7
+ import { s as D } from "../../RPDefaultLayout-45eb04c1.js";
8
8
  import "../../contexts/DarkModeContext.js";
9
9
  import "../../contexts/RotationContext.js";
10
10
  import "../../contexts/LayerContext.js";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@pdf-viewer/react",
3
3
  "private": false,
4
4
  "description": "The PDF Viewer component for React and Next.js",
5
- "version": "1.7.0-beta.4",
5
+ "version": "1.7.0-beta.5",
6
6
  "keywords": [
7
7
  "component",
8
8
  "frontend",