@react-pdf-kit/viewer 2.11.0 → 2.11.1-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/{AnnotationLayer-lagF0zYo.js → AnnotationLayer-CkWazdbK.js} +1 -1
  2. package/dist/{PaginationContext-DIzsZhFd.js → PaginationContext-DDjxEFW0.js} +8 -1
  3. package/dist/{RPPages-BVSFaPUT.js → RPPages-BMt4LDEp.js} +261 -253
  4. package/dist/{Thumbnail-D0M1-UHT.js → Thumbnail-BRpZB3L6.js} +1 -1
  5. package/dist/{Thumbnails-CjtSNfLI.js → Thumbnails-DmSXQBQ4.js} +2 -2
  6. package/dist/components/RPController.js +1 -1
  7. package/dist/components/RPPages.js +1 -1
  8. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  9. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  10. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  11. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  12. package/dist/components/layout/toolbar/Paginate.js +1 -1
  13. package/dist/components/layout/toolbar/ToolbarCustom.js +1 -1
  14. package/dist/components/layout/toolbar/ToolbarDefault.js +1 -1
  15. package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +1 -1
  16. package/dist/components/layout/toolbar/tools/FirstPageTool.js +1 -1
  17. package/dist/components/layout/toolbar/tools/InputPageTool.js +1 -1
  18. package/dist/components/layout/toolbar/tools/LastPageTool.js +1 -1
  19. package/dist/components/layout/toolbar/tools/NextPageTool.js +1 -1
  20. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
  21. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +1 -1
  22. package/dist/components/page/AnnotationLayer.js +1 -1
  23. package/dist/components/page/DualPage.js +1 -1
  24. package/dist/components/page/DualPageWithCover.js +1 -1
  25. package/dist/components/page/RPPage.js +1 -1
  26. package/dist/components/page/SinglePage.js +1 -1
  27. package/dist/components/page/XfaLayer.js +1 -1
  28. package/dist/contexts/ElementThumbnailContext.js +1 -1
  29. package/dist/contexts/PaginationContext.js +1 -1
  30. package/dist/contexts/RenderQueueProvider.js +1 -1
  31. package/dist/{main-GaulAopG.js → main-iHA-6dyy.js} +1 -1
  32. package/dist/main.js +3 -3
  33. package/dist/utils/hooks/useLicense.js +1 -1
  34. package/dist/utils/hooks/usePaginate.js +1 -1
  35. package/dist/utils/hooks/usePresentPage.js +3 -3
  36. package/dist/utils/hooks/useScrollToPage.js +1 -1
  37. package/dist/utils/hooks/useSearch.js +1 -1
  38. package/package.json +1 -1
@@ -3,7 +3,7 @@ import { isPdfDocumentDestroyedError as t, runPdfOperation as n } from "./utils/
3
3
  import { useDocumentContext as r } from "./contexts/RPDocumentContext.js";
4
4
  import { useInitialStateContext as i } from "./contexts/InitialStateContext.js";
5
5
  import { useScrollModeContext as a } from "./contexts/ScrollModeContext.js";
6
- import { r as o } from "./PaginationContext-DIzsZhFd.js";
6
+ import { r as o } from "./PaginationContext-DDjxEFW0.js";
7
7
  import { SimpleLinkService as s } from "./utils/link_service.js";
8
8
  import { usePrintContext as c } from "./contexts/PrintContext.js";
9
9
  import { annotationEventsHandler as l, bindLayerEvents as u, enhanceLinkAccessibility as d, fixTabIndexAccessibility as f, handleAnnotationWidget as p, insertDateText as m, unbindLayerEvents as h } from "./utils/annotations.js";
@@ -81,7 +81,14 @@ var S = () => {
81
81
  if (!E() || !C.current) return;
82
82
  let { page: e, behavior: t } = C.current;
83
83
  C.current = null, D(e, t);
84
- }, [E, D]), { scrollToPage: D };
84
+ }, [
85
+ E,
86
+ D,
87
+ l,
88
+ u,
89
+ n,
90
+ t
91
+ ]), { scrollToPage: D };
85
92
  }, C = (n = 1) => {
86
93
  let [r, i] = b(n), [s, l] = b(0), { scrollToPage: f } = S(), p = y(n), { viewMode: m } = o(), { scrollMode: h } = a(), { widths: _ } = d(), { pagesRef: v } = c(), x = u(r, 100), C = g((e) => {
87
94
  if (!/^[0-9]*$/g.test(e.toString()) || !e) return {
@@ -9,13 +9,12 @@ import { useVirtualScrollContext as d } from "./contexts/VirtualScrollContext.js
9
9
  import "./utils/constants.js";
10
10
  import { useLayoutContainer as f } from "./contexts/LayoutContainerContext.js";
11
11
  import { useEventCallbackContext as p } from "./contexts/EventCallbackContext.js";
12
- import { useDebounce as m } from "./utils/hooks/useDebounce.js";
13
- import { useZoomContext as h } from "./contexts/ZoomContext.js";
14
- import { usePagesRotateContext as ee } from "./contexts/PagesRotateContext.js";
15
- import { useDimensionPagesContext as te } from "./contexts/DimensionPagesContext.js";
16
- import { useSmoothScrollContext as ne } from "./contexts/SmoothScrollContext.js";
17
- import { buildDocumentLayout as re, getPageContentOffset as ie, getPageFromDocumentPoint as ae, getPagePlacement as oe, getRowsByIndexes as g, getVisibleRows as se } from "./utils/documentLayout.js";
18
- import { a as ce, r as le } from "./PaginationContext-DIzsZhFd.js";
12
+ import { useZoomContext as m } from "./contexts/ZoomContext.js";
13
+ import { usePagesRotateContext as h } from "./contexts/PagesRotateContext.js";
14
+ import { useDimensionPagesContext as ee } from "./contexts/DimensionPagesContext.js";
15
+ import { useSmoothScrollContext as te } from "./contexts/SmoothScrollContext.js";
16
+ import { buildDocumentLayout as ne, getPageContentOffset as re, getPageFromDocumentPoint as ie, getPagePlacement as ae, getRowsByIndexes as g, getScrollTargetForPage as oe, getVisibleRows as se } from "./utils/documentLayout.js";
17
+ import { a as ce, r as le } from "./PaginationContext-DDjxEFW0.js";
19
18
  import { useSelectionModeContext as ue } from "./contexts/SelectionModeContext.js";
20
19
  import { useFullScreenContext as de } from "./contexts/FullScreenContext.js";
21
20
  import { useRenderQueue as fe } from "./contexts/RenderQueueProvider.js";
@@ -36,20 +35,20 @@ import { Component as Ee, createElement as De, useCallback as _, useEffect as v,
36
35
  import { OutputScale as Ae } from "pdfjs-dist";
37
36
  import { Fragment as je, jsx as x, jsxs as Me } from "react/jsx-runtime";
38
37
  import './assets/RPPages.css';//#region node_modules/react-virtualized-auto-sizer/dist/react-virtualized-auto-sizer.esm.js
39
- var S = typeof window < "u" ? window : typeof self < "u" ? self : global, Ne = null, Pe = null, C = 20, w = S.clearTimeout, T = S.setTimeout, E = S.cancelAnimationFrame || S.mozCancelAnimationFrame || S.webkitCancelAnimationFrame, Fe = S.requestAnimationFrame || S.mozRequestAnimationFrame || S.webkitRequestAnimationFrame;
40
- E == null || Fe == null ? (Ne = w, Pe = function(e) {
41
- return T(e, C);
38
+ var S = typeof window < "u" ? window : typeof self < "u" ? self : global, Ne = null, C = null, w = 20, T = S.clearTimeout, E = S.setTimeout, D = S.cancelAnimationFrame || S.mozCancelAnimationFrame || S.webkitCancelAnimationFrame, O = S.requestAnimationFrame || S.mozRequestAnimationFrame || S.webkitRequestAnimationFrame;
39
+ D == null || O == null ? (Ne = T, C = function(e) {
40
+ return E(e, w);
42
41
  }) : (Ne = function([e, t]) {
43
- E(e), w(t);
44
- }, Pe = function(e) {
45
- let t = Fe(function() {
46
- w(n), e();
47
- }), n = T(function() {
48
- E(t), e();
49
- }, C);
42
+ D(e), T(t);
43
+ }, C = function(e) {
44
+ let t = O(function() {
45
+ T(n), e();
46
+ }), n = E(function() {
47
+ D(t), e();
48
+ }, w);
50
49
  return [t, n];
51
50
  });
52
- function Ie(e) {
51
+ function k(e) {
53
52
  let t, n, r, i, a, o, s, c = typeof document < "u" && document.attachEvent;
54
53
  if (!c) {
55
54
  o = function(e) {
@@ -60,7 +59,7 @@ function Ie(e) {
60
59
  }, s = function(e) {
61
60
  if (e.target.className && typeof e.target.className.indexOf == "function" && e.target.className.indexOf("contract-trigger") < 0 && e.target.className.indexOf("expand-trigger") < 0) return;
62
61
  let t = this;
63
- o(this), this.__resizeRAF__ && Ne(this.__resizeRAF__), this.__resizeRAF__ = Pe(function() {
62
+ o(this), this.__resizeRAF__ && Ne(this.__resizeRAF__), this.__resizeRAF__ = C(function() {
64
63
  a(t) && (t.__resizeLast__.width = t.offsetWidth, t.__resizeLast__.height = t.offsetHeight, t.__resizeListeners__.forEach(function(n) {
65
64
  n.call(t, e);
66
65
  }));
@@ -114,7 +113,7 @@ function Ie(e) {
114
113
  }
115
114
  };
116
115
  }
117
- var D = class extends Ee {
116
+ var Pe = class extends Ee {
118
117
  constructor(...e) {
119
118
  super(...e), this.state = {
120
119
  height: this.props.defaultHeight || 0,
@@ -153,7 +152,7 @@ var D = class extends Ee {
153
152
  if (t != null && t.ownerDocument && t.ownerDocument.defaultView && t instanceof t.ownerDocument.defaultView.HTMLElement) {
154
153
  this._parentNode = t;
155
154
  let n = t.ownerDocument.defaultView.ResizeObserver;
156
- n == null ? (this._detectElementResize = Ie(e), this._detectElementResize.addResizeListener(t, this._onResize)) : (this._resizeObserver = new n(() => {
155
+ n == null ? (this._detectElementResize = k(e), this._detectElementResize.addResizeListener(t, this._onResize)) : (this._resizeObserver = new n(() => {
157
156
  this._timeoutId = setTimeout(this._onResize, 0);
158
157
  }), this._resizeObserver.observe(t)), this._onResize();
159
158
  }
@@ -172,7 +171,7 @@ var D = class extends Ee {
172
171
  ...u
173
172
  }, !h && e(m));
174
173
  }
175
- }, O = {
174
+ }, A = {
176
175
  "rp-pages": "_rp-pages_ruuiz_1",
177
176
  "rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_ruuiz_6",
178
177
  "rp-pages-flow": "_rp-pages-flow_ruuiz_6",
@@ -189,10 +188,10 @@ var D = class extends Ee {
189
188
  "rp-not-supported-content": "_rp-not-supported-content_ruuiz_120",
190
189
  "rp-load-error": "_rp-load-error_ruuiz_126",
191
190
  "rp-load-error-message": "_rp-load-error-message_ruuiz_134"
192
- }, k = (e, t, n) => Math.max(t, Math.min(e, n)), A = 2, Le = 800, Re = .5, ze = 0, j = 1, M = 0, Be = (e) => ({
191
+ }, j = (e, t, n) => Math.max(t, Math.min(e, n)), M = 2, Fe = 800, Ie = .5, Le = 0, N = 1, P = 0, Re = (e) => ({
193
192
  width: e.scrollWidth,
194
193
  height: e.scrollHeight
195
- }), Ve = (e, t, n, r, i) => {
194
+ }), ze = (e, t, n, r, i) => {
196
195
  let a = n.scrollTop - t.offsetTop, o = a + i, s = n.scrollLeft - t.offsetLeft, c = s + r, l = /* @__PURE__ */ new Map();
197
196
  return e.forEach((e) => {
198
197
  e.pages.forEach((e) => {
@@ -208,8 +207,8 @@ var D = class extends Ee {
208
207
  });
209
208
  });
210
209
  }), l;
211
- }, He = ({ row: e }) => /* @__PURE__ */ x("div", {
212
- className: O["rp-page-row"],
210
+ }, Be = ({ row: e }) => /* @__PURE__ */ x("div", {
211
+ className: A["rp-page-row"],
213
212
  style: {
214
213
  position: "absolute",
215
214
  top: e.top,
@@ -227,21 +226,21 @@ var D = class extends Ee {
227
226
  height: t.height
228
227
  }
229
228
  }, t.pageNumber))
230
- }), Ue = (t) => {
229
+ }), Ve = (t) => {
231
230
  if (t === e.WASM_URL_REQUIRED) return o;
232
231
  if (t === e.INVALID_OR_CORRUPTED_PDF) return a;
233
232
  if (t === e.NOT_SUPPORTED) return i;
234
- }, We = (e) => Object.entries(e).sort(([e], [t]) => Number(e) - Number(t)).map(([e, t]) => `${e}:${t}`).join("|"), Ge = ({ width: r, height: i }) => {
235
- let { initialPage: a = 1, initialScrollMode: o } = c(), { pagesRef: he } = f(), { scrollToPage: ge } = ce(), { getPageScrollElementRef: _e, getVirtualScrollableElementRef: ve, setTotalInnerDimensions: ye, totalInnerDimensions: be, virtualScrollableElementRef: Te, pageScrollElementRef: Ee } = d(), De = b(a > 1), [Ae, je] = ke(a > 1), { nextPage: S, prevPage: Ne, setFocusedPage: Pe, focusedPage: C, totalPages: w } = le(), { scrollMode: T } = l(), { viewMode: E } = u(), { loading: Fe, error: Ie, pages: D } = s(), { pageRotate: Ge } = ee(), { LoaderImageComponent: Ke } = me(), { isFullScreen: qe } = de(), { onScroll: Je } = p(), { widths: Ye, heights: Xe } = te(), Ze = fe(), { targetZoom: N, zoomOrigin: Qe, isZooming: P, previousTargetZoom: $e, zoomGesture: et } = h(), { targetScrollPage: tt } = ne(), F = y(() => We(Ge), [Ge]), nt = m(be, 100), rt = b(null), I = b(be), it = b({
233
+ }, He = (e) => Object.entries(e).sort(([e], [t]) => Number(e) - Number(t)).map(([e, t]) => `${e}:${t}`).join("|"), Ue = ({ width: r, height: i }) => {
234
+ let { initialPage: a = 1 } = c(), { pagesRef: o } = f(), { scrollToPage: he } = ce(), { getPageScrollElementRef: ge, getVirtualScrollableElementRef: _e, setTotalInnerDimensions: ve, totalInnerDimensions: ye, virtualScrollableElementRef: be, pageScrollElementRef: Te } = d(), Ee = b(a > 1), [De, Ae] = ke(a > 1), { nextPage: je, prevPage: S, setFocusedPage: Ne, focusedPage: C, totalPages: w } = le(), { scrollMode: T } = l(), { viewMode: E } = u(), { loading: D, error: O, pages: k } = s(), { pageRotate: Pe } = h(), { LoaderImageComponent: Ue } = me(), { isFullScreen: We } = de(), { onScroll: Ge } = p(), { widths: Ke, heights: qe } = ee(), Je = fe(), { targetZoom: F, zoomOrigin: Ye, isZooming: I, previousTargetZoom: Xe, zoomGesture: Ze } = m(), { targetScrollPage: Qe } = te(), L = y(() => He(Pe), [Pe]), $e = b(null), R = b(ye), et = b({
236
235
  viewMode: E,
237
236
  scrollMode: T
238
- }), L = b(null), R = b(null), z = b(null), B = b(null), V = b(!1), H = b(!1), U = b(N), W = b(F), at = Ue(Ie), ot = b(), st = b(), ct = b(), G = b([]), lt = b([]), ut = b(P), dt = b(), ft = b([]), [pt, mt] = ke(!1), K = b({
237
+ }), z = b(null), B = b(null), V = b(null), H = b(null), U = b(!1), W = b(!1), G = b(F), K = b(L), tt = Ve(O), nt = b(), rt = b(), it = b(), q = b([]), at = b([]), ot = b(I), st = b(), ct = b([]), [lt, ut] = ke(!1), J = b({
239
238
  scrollTop: 0,
240
239
  scrollLeft: 0
241
- }), [q, ht] = ke(K.current), J = T === t.PAGE_SCROLLING ? Ee ?? Te : Te ?? Ee, { isPressed: gt } = Se(), { initializeGrabScroll: _t, resetGrabState: vt } = xe({ isPressed: gt }), { selectionMode: yt } = ue(), bt = yt === n.HAND, Y = y(() => re({
240
+ }), [dt, ft] = ke(J.current), Y = T === t.PAGE_SCROLLING ? Te ?? be : be ?? Te, { isPressed: pt } = Se(), { initializeGrabScroll: mt, resetGrabState: ht } = xe({ isPressed: pt }), { selectionMode: gt } = ue(), _t = gt === n.HAND, X = y(() => ne({
242
241
  pageDimensions: {
243
- widths: Ye,
244
- heights: Xe
242
+ widths: Ke,
243
+ heights: qe
245
244
  },
246
245
  viewportWidth: r,
247
246
  viewportHeight: i,
@@ -251,68 +250,68 @@ var D = class extends Ee {
251
250
  }), [
252
251
  C,
253
252
  i,
254
- Xe,
253
+ qe,
255
254
  T,
256
255
  E,
257
256
  r,
258
- Ye
259
- ]), X = y(() => se(Y, q.scrollTop, q.scrollLeft, r, i, 2), [
257
+ Ke
258
+ ]), Z = y(() => se(X, dt.scrollTop, dt.scrollLeft, r, i, 2), [
260
259
  i,
261
- Y,
262
- q.scrollLeft,
263
- q.scrollTop,
260
+ X,
261
+ dt.scrollLeft,
262
+ dt.scrollTop,
264
263
  r
265
- ]), xt = (e, t) => Array.from(new Set([...e, ...t.map((e) => e.index)])).sort((e, t) => e - t), St = y(() => P && G.current.length ? et === "touch" ? g(Y, G.current, lt.current) : g(Y, xt(G.current, X)) : pt && ft.current.length ? g(Y, xt(ft.current, X)) : X, [
264
+ ]), vt = (e, t) => Array.from(new Set([...e, ...t.map((e) => e.index)])).sort((e, t) => e - t), yt = y(() => I && q.current.length ? Ze === "touch" ? g(X, q.current, at.current) : g(X, vt(q.current, Z)) : lt && ct.current.length ? g(X, vt(ct.current, Z)) : Z, [
265
+ Z,
266
+ lt,
267
+ I,
266
268
  X,
267
- pt,
268
- P,
269
- Y,
270
- et
271
- ]), Ct = y(() => Ve(St, Y, q, r, i), [
269
+ Ze
270
+ ]), bt = y(() => ze(yt, X, dt, r, i), [
272
271
  i,
273
- Y,
274
- q,
275
- St,
272
+ X,
273
+ dt,
274
+ yt,
276
275
  r
277
276
  ]);
278
- we(J, Y), v(() => {
279
- let e = ut.current;
280
- P || (e && G.current.length && (ft.current = G.current, clearTimeout(dt.current), mt(!0), dt.current = setTimeout(() => {
281
- ft.current = [], mt(!1);
282
- }, Le)), G.current = X.map((e) => e.index), lt.current = X.flatMap((e) => e.pages.map((e) => e.pageNumber))), ut.current = P;
283
- }, [X, P]), v(() => {
284
- Array.from(Ct.entries()).sort(([, e], [, t]) => t.percent - e.percent).forEach(([e], t) => {
285
- Ze.changePagePriority(`^page-${e}$`, t);
277
+ we(Y, X), v(() => {
278
+ let e = ot.current;
279
+ I || (e && q.current.length && (ct.current = q.current, clearTimeout(st.current), ut(!0), st.current = setTimeout(() => {
280
+ ct.current = [], ut(!1);
281
+ }, Fe)), q.current = Z.map((e) => e.index), at.current = Z.flatMap((e) => e.pages.map((e) => e.pageNumber))), ot.current = I;
282
+ }, [Z, I]), v(() => {
283
+ Array.from(bt.entries()).sort(([, e], [, t]) => t.percent - e.percent).forEach(([e], t) => {
284
+ Je.changePagePriority(`^page-${e}$`, t);
286
285
  });
287
- }, [Ct, Ze]), v(() => {
288
- P && Ze.removeQueues(/^page-/);
289
- }, [P, Ze]), v(() => {
290
- Fe && vt();
291
- }, [Fe, vt]), v(() => {
292
- if (!at) return;
286
+ }, [bt, Je]), v(() => {
287
+ I && Je.removeQueues(/^page-/);
288
+ }, [I, Je]), v(() => {
289
+ D && ht();
290
+ }, [D, ht]), v(() => {
291
+ if (!tt) return;
293
292
  let e = requestAnimationFrame(() => {
294
- rt.current?.focus();
293
+ $e.current?.focus();
295
294
  });
296
295
  return () => {
297
296
  cancelAnimationFrame(e);
298
297
  };
299
- }, [at]);
300
- let Z = _((e) => {
301
- let t = D.get(e);
302
- return Ge[e] ?? t?.defaultRotation ?? 0;
303
- }, [Ge, D]), wt = _((e, t = C) => {
298
+ }, [tt]);
299
+ let Q = _((e) => {
300
+ let t = k.get(e);
301
+ return Pe[e] ?? t?.defaultRotation ?? 0;
302
+ }, [Pe, k]), xt = _((e, t = C) => {
304
303
  let n = [], a = [];
305
304
  for (let t = 1; t <= w; t += 1) {
306
- let r = D.get(t);
305
+ let r = k.get(t);
307
306
  if (!r) continue;
308
- let i = Z(t), o = r.page.getViewport({
307
+ let i = Q(t), o = r.page.getViewport({
309
308
  scale: 1,
310
309
  rotation: i,
311
310
  dontFlip: !0
312
311
  });
313
312
  n[t - 1] = o.width * e + 4, a[t - 1] = o.height * e + 4;
314
313
  }
315
- return re({
314
+ return ne({
316
315
  pageDimensions: {
317
316
  widths: n,
318
317
  heights: a
@@ -325,42 +324,42 @@ var D = class extends Ee {
325
324
  });
326
325
  }, [
327
326
  C,
328
- Z,
327
+ Q,
329
328
  i,
330
- D,
329
+ k,
331
330
  T,
332
331
  w,
333
332
  E,
334
333
  r
335
- ]), Tt = _((e, t, n) => {
336
- let r = J ? Math.max(0, n.scrollHeight - J.clientHeight) : Math.max(0, n.scrollHeight), i = J ? Math.max(0, n.scrollWidth - J.clientWidth) : Math.max(0, n.scrollWidth);
334
+ ]), St = _((e, t, n) => {
335
+ let r = Y ? Math.max(0, n.scrollHeight - Y.clientHeight) : Math.max(0, n.scrollHeight), i = Y ? Math.max(0, n.scrollWidth - Y.clientWidth) : Math.max(0, n.scrollWidth);
337
336
  return {
338
- scrollTop: Math.round(k(e, 0, r)) || 0,
339
- scrollLeft: Math.round(k(t, 0, i)) || 0
337
+ scrollTop: Math.round(j(e, 0, r)) || 0,
338
+ scrollLeft: Math.round(j(t, 0, i)) || 0
340
339
  };
341
- }, [J]), Q = _((e) => ({
342
- maxScrollTop: J ? Math.max(0, e.scrollHeight - J.clientHeight) : Math.max(0, e.scrollHeight),
343
- maxScrollLeft: J ? Math.max(0, e.scrollWidth - J.clientWidth) : Math.max(0, e.scrollWidth)
344
- }), [J]), Et = _(() => J ? [J.clientWidth / 2, J.clientHeight / 2] : null, [J]), Dt = _((e) => {
345
- if (!J) return {
340
+ }, [Y]), Ct = _((e) => ({
341
+ maxScrollTop: Y ? Math.max(0, e.scrollHeight - Y.clientHeight) : Math.max(0, e.scrollHeight),
342
+ maxScrollLeft: Y ? Math.max(0, e.scrollWidth - Y.clientWidth) : Math.max(0, e.scrollWidth)
343
+ }), [Y]), wt = _(() => Y ? [Y.clientWidth / 2, Y.clientHeight / 2] : null, [Y]), Tt = _((e) => {
344
+ if (!Y) return {
346
345
  scrollTop: 0,
347
346
  scrollLeft: 0
348
347
  };
349
- let { maxScrollTop: t, maxScrollLeft: n } = Q(e), r = K.current.scrollTop, i = K.current.scrollLeft, a = t > A && t - r <= A, o = n > A && n - i <= A;
350
- return a || o || r > t || i > n ? K.current : {
351
- scrollTop: J.scrollTop,
352
- scrollLeft: J.scrollLeft
348
+ let { maxScrollTop: t, maxScrollLeft: n } = Ct(e), r = J.current.scrollTop, i = J.current.scrollLeft, a = t > M && t - r <= M, o = n > M && n - i <= M;
349
+ return a || o || r > t || i > n ? J.current : {
350
+ scrollTop: Y.scrollTop,
351
+ scrollLeft: Y.scrollLeft
353
352
  };
354
- }, [Q, J]), Ot = _((e, t, n, r, i) => {
355
- if (!n || !r || !i || !D.size) return null;
356
- let a = t + n[0] - i.offsetLeft, o = e + n[1] - i.offsetTop, s = ae(i, a, o) ?? oe(i, C);
353
+ }, [Ct, Y]), Et = _((e, t, n, r, i) => {
354
+ if (!n || !r || !i || !k.size) return null;
355
+ let a = t + n[0] - i.offsetLeft, o = e + n[1] - i.offsetTop, s = ie(i, a, o) ?? ae(i, C);
357
356
  if (!s) return null;
358
- let c = D.get(s.pageNumber);
357
+ let c = k.get(s.pageNumber);
359
358
  if (!c) return null;
360
- let l = Z(s.pageNumber), u = c.page.getViewport({
359
+ let l = Q(s.pageNumber), u = c.page.getViewport({
361
360
  scale: r,
362
361
  rotation: l
363
- }), d = ie(s.width, s.height, u.width, u.height), f = k(a - s.left - d.x, 0, u.width), p = k(o - s.top - d.y, 0, u.height), [m, h] = u.convertToPdfPoint(f, p);
362
+ }), d = re(s.width, s.height, u.width, u.height), f = j(a - s.left - d.x, 0, u.width), p = j(o - s.top - d.y, 0, u.height), [m, h] = u.convertToPdfPoint(f, p);
364
363
  return {
365
364
  pageNumber: s.pageNumber,
366
365
  pdfX: m,
@@ -369,260 +368,269 @@ var D = class extends Ee {
369
368
  };
370
369
  }, [
371
370
  C,
372
- Z,
373
- D
374
- ]), $ = _((e, t, n, r, i) => {
371
+ Q,
372
+ k
373
+ ]), Dt = _((e, t, n, r, i) => {
375
374
  if (!i) return null;
376
- let a = Ot(e, t, n, r, i), { maxScrollTop: o, maxScrollLeft: s } = Q(i), c = a?.pageNumber === 1, l = a?.pageNumber === w, u = (o <= A || e <= A) && c ? "start" : o > A && l && o - e <= A ? "end" : null;
375
+ let a = Et(e, t, n, r, i), { maxScrollTop: o, maxScrollLeft: s } = Ct(i), c = a?.pageNumber === 1, l = a?.pageNumber === w, u = (o <= M || e <= M) && c ? "start" : o > M && l && o - e <= M ? "end" : null;
377
376
  return {
378
377
  location: a,
379
- edgeX: (s <= A || t <= A) && c ? "start" : s > A && l && s - t <= A ? "end" : null,
378
+ edgeX: (s <= M || t <= M) && c ? "start" : s > M && l && s - t <= M ? "end" : null,
380
379
  edgeY: u,
381
380
  previousScale: r
382
381
  };
383
382
  }, [
384
- Ot,
385
- Q,
383
+ Et,
384
+ Ct,
386
385
  w
387
- ]), kt = _((e, t, n) => {
388
- let r = D.get(t.pageNumber), i = oe(n, t.pageNumber);
386
+ ]), Ot = _((e, t, n) => {
387
+ let r = k.get(t.pageNumber), i = ae(n, t.pageNumber);
389
388
  if (!r || !i || !e) return null;
390
- let a = Z(t.pageNumber), o = r.page.getViewport({
389
+ let a = Q(t.pageNumber), o = r.page.getViewport({
391
390
  scale: e,
392
391
  rotation: a
393
- }), [s, c] = o.convertToViewportPoint(t.pdfX, t.pdfY), l = ie(i.width, i.height, o.width, o.height);
392
+ }), [s, c] = o.convertToViewportPoint(t.pdfX, t.pdfY), l = re(i.width, i.height, o.width, o.height);
394
393
  return {
395
394
  left: n.offsetLeft + i.left + l.x + s - t.origin[0],
396
395
  top: n.offsetTop + i.top + l.y + c - t.origin[1]
397
396
  };
398
- }, [Z, D]), At = _((e, t, n, r, i, a, o = !0) => {
399
- let s = e?.location ? kt(t, e.location, n) : null, c = a ? t / a : 1, l = s ?? {
397
+ }, [Q, k]), kt = _((e, t, n, r, i, a, o = !0) => {
398
+ let s = e?.location ? Ot(t, e.location, n) : null, c = a ? t / a : 1, l = s ?? {
400
399
  left: (r.scrollLeft + i[0]) * c - i[0],
401
400
  top: (r.scrollTop + i[1]) * c - i[1]
402
- }, { maxScrollTop: u, maxScrollLeft: d } = Q(n), f = o && e && t < e.previousScale ? {
401
+ }, { maxScrollTop: u, maxScrollLeft: d } = Ct(n), f = o && e && t < e.previousScale ? {
403
402
  top: e.edgeY === "start" ? 0 : e.edgeY === "end" ? u : l.top,
404
403
  left: e.edgeX === "start" ? 0 : e.edgeX === "end" ? d : l.left
405
404
  } : l;
406
- return Tt(f.top, f.left, n);
405
+ return St(f.top, f.left, n);
407
406
  }, [
408
- kt,
409
- Tt,
410
- Q
411
- ]), jt = _((e, t) => {
412
- (V.current || z.current || B.current) && (H.current = !0), J?.scrollTo({
407
+ Ot,
408
+ St,
409
+ Ct
410
+ ]), $ = _((e, t) => {
411
+ (U.current || V.current || H.current) && (W.current = !0), Y?.scrollTo({
413
412
  top: e,
414
413
  left: t,
415
414
  behavior: "auto"
416
- }), K.current = {
415
+ }), J.current = {
417
416
  scrollTop: e,
418
417
  scrollLeft: t
419
- }, ht(K.current);
420
- }, [J]), Mt = _(({ gesture: e, origin: t, previousScale: n, nextScale: r }) => {
418
+ }, ft(J.current);
419
+ }, [Y]), At = _(({ gesture: e, origin: t, previousScale: n, nextScale: r }) => {
421
420
  if (!n || !r) return;
422
- let i = t ?? Et();
421
+ let i = t ?? wt();
423
422
  if (!i) return;
424
- e === "touch" && (V.current = !0);
425
- let a = B.current, o = a?.scale || U.current || n, s = a?.layout ?? L.current ?? Y, c = a?.scrollTop ?? K.current.scrollTop, l = a?.scrollLeft ?? K.current.scrollLeft, u = wt(r), d = $(c, l, i, o, s), f = At(d, r, u, {
423
+ e === "touch" && (U.current = !0);
424
+ let a = H.current, o = a?.scale || G.current || n, s = a?.layout ?? z.current ?? X, c = a?.scrollTop ?? J.current.scrollTop, l = a?.scrollLeft ?? J.current.scrollLeft, u = xt(r), d = Dt(c, l, i, o, s), f = kt(d, r, u, {
426
425
  scrollTop: c,
427
426
  scrollLeft: l
428
427
  }, i, o, e !== "touch");
429
- z.current = {
428
+ V.current = {
430
429
  anchor: d,
431
430
  nextScale: r,
432
431
  targetScrollTop: f.scrollTop,
433
432
  targetScrollLeft: f.scrollLeft,
434
433
  targetLayout: u
435
- }, B.current = {
434
+ }, H.current = {
436
435
  scale: r,
437
436
  layout: u,
438
437
  scrollTop: f.scrollTop,
439
438
  scrollLeft: f.scrollLeft
440
- }, R.current = d;
439
+ }, B.current = d;
441
440
  }, [
442
- At,
443
- $,
444
- Et,
441
+ kt,
442
+ Dt,
445
443
  wt,
446
- Y
447
- ]), Nt = _(() => {
448
- V.current = !1, H.current = !1, z.current || (B.current = null, R.current = null);
449
- }, []), Pt = _(() => {
450
- V.current = !1, H.current = !1, z.current = null, B.current = null, R.current = null;
444
+ xt,
445
+ X
446
+ ]), jt = _(() => {
447
+ U.current = !1, W.current = !1, V.current || (H.current = null, B.current = null);
448
+ }, []), Mt = _(() => {
449
+ U.current = !1, W.current = !1, V.current = null, H.current = null, B.current = null;
451
450
  }, []);
452
- Ce(J || he, {
453
- onBeforeZoom: Mt,
454
- onPinchEnd: Nt
451
+ Ce(Y || o, {
452
+ onBeforeZoom: At,
453
+ onPinchEnd: jt
455
454
  });
456
- let Ft = _((e, t) => {
457
- if (it.current.viewMode !== E || it.current.scrollMode !== T) {
458
- st.current && clearTimeout(st.current), R.current = null, Pt(), ge(C, "auto"), st.current = setTimeout(() => {
455
+ let Nt = _((e, t) => {
456
+ if (et.current.viewMode !== E || et.current.scrollMode !== T) {
457
+ rt.current && clearTimeout(rt.current), B.current = null, Mt(), he(C, "auto"), rt.current = setTimeout(() => {
459
458
  requestAnimationFrame(() => {
460
- it.current = {
459
+ et.current = {
461
460
  viewMode: E,
462
461
  scrollMode: T
463
- }, L.current = Y, U.current = N, W.current = F;
462
+ }, z.current = X, G.current = F, K.current = L;
464
463
  });
465
464
  }, 100);
466
465
  return;
467
466
  }
468
467
  let n = e.scrollTop, r = e.scrollLeft;
469
468
  if (!t.height || !t.width) return;
470
- let { height: i, width: o } = t, { height: s, width: c } = I.current, l = L.current, u = Math.abs(U.current - N) > 1e-10, d = W.current !== F, f = Qe ?? Et(), p = u && !!f, m = U.current || $e || N, h = z.current, ee = h?.nextScale ?? N, te = s === i && c === o;
471
- if (d && !(De.current && a > 1)) {
472
- let e = [l ? l.viewportWidth * Re : M, l ? l.viewportHeight * ze : M], i = r + e[0] - (l?.offsetLeft ?? M), a = n + e[1] - (l?.offsetTop ?? M), o = l ? ae(l, i, a) ?? oe(l, C) : null, s = o ? oe(Y, o.pageNumber) : null, c = Math.max(j, o ? o.width - 4 : j), u = Math.max(j, o ? o.height - 4 : j), d = Math.max(j, s ? s.width - 4 : j), f = Math.max(j, s ? s.height - 4 : j), p = o ? (o.width - c) * Re : M, m = s ? (s.width - d) * Re : M, h = o ? k(i - o.left - p, M, c) / c : ze, ee = o ? k(a - o.top, M, u) / u : ze, te = s ? {
473
- left: Y.offsetLeft + s.left + m + d * h - e[0],
474
- top: Y.offsetTop + s.top + f * ee - e[1]
475
- } : null, ne = Tt(te?.top ?? n, te?.left ?? r, Y);
476
- o && (tt.current = o.pageNumber), jt(ne.scrollTop, ne.scrollLeft), R.current = null, Pt(), I.current = {
469
+ let { height: i, width: o } = t, { height: s, width: c } = R.current, l = z.current, u = Math.abs(G.current - F) > 1e-10, d = K.current !== L, f = Ye ?? wt(), p = u && !!f, m = G.current || Xe || F, h = V.current, ee = h?.nextScale ?? F, te = s === i && c === o;
470
+ if (d && !(Ee.current && a > 1)) {
471
+ let e = [l ? l.viewportWidth * Ie : P, l ? l.viewportHeight * Le : P], i = r + e[0] - (l?.offsetLeft ?? P), a = n + e[1] - (l?.offsetTop ?? P), o = l ? ie(l, i, a) ?? ae(l, C) : null, s = o ? ae(X, o.pageNumber) : null, c = Math.max(N, o ? o.width - 4 : N), u = Math.max(N, o ? o.height - 4 : N), d = Math.max(N, s ? s.width - 4 : N), f = Math.max(N, s ? s.height - 4 : N), p = o ? (o.width - c) * Ie : P, m = s ? (s.width - d) * Ie : P, h = o ? j(i - o.left - p, P, c) / c : Le, ee = o ? j(a - o.top, P, u) / u : Le, te = s ? {
472
+ left: X.offsetLeft + s.left + m + d * h - e[0],
473
+ top: X.offsetTop + s.top + f * ee - e[1]
474
+ } : null, ne = St(te?.top ?? n, te?.left ?? r, X);
475
+ o && (Qe.current = o.pageNumber), $(ne.scrollTop, ne.scrollLeft), B.current = null, Mt(), R.current = {
477
476
  height: t.height,
478
477
  width: t.width
479
- }, L.current = Y, U.current = N, W.current = F;
478
+ }, z.current = X, G.current = F, K.current = L;
480
479
  return;
481
480
  }
482
- if (u && !Qe && !h && l && s && c) {
483
- let e = [l.viewportWidth / 2, 0], i = At($(n, r, e, m, l), N, Y, {
481
+ if (u && !Ye && !h && l && s && c) {
482
+ let e = [l.viewportWidth / 2, 0], i = kt(Dt(n, r, e, m, l), F, X, {
484
483
  scrollTop: n,
485
484
  scrollLeft: r
486
485
  }, e, m);
487
- jt(i.scrollTop, i.scrollLeft), R.current = null, I.current = {
486
+ $(i.scrollTop, i.scrollLeft), B.current = null, R.current = {
488
487
  height: t.height,
489
488
  width: t.width
490
- }, L.current = Y, U.current = N, W.current = F;
489
+ }, z.current = X, G.current = F, K.current = L;
491
490
  return;
492
491
  }
493
492
  if (te) {
494
- if (W.current = F, h) {
495
- jt(h.targetScrollTop, h.targetScrollLeft), R.current = null, z.current = null, V.current || (B.current = null, H.current = !1), L.current = h.targetLayout, U.current = h.nextScale, I.current = {
493
+ if (K.current = L, h) {
494
+ $(h.targetScrollTop, h.targetScrollLeft), B.current = null, V.current = null, U.current || (H.current = null, W.current = !1), z.current = h.targetLayout, G.current = h.nextScale, R.current = {
496
495
  height: t.height,
497
496
  width: t.width
498
497
  };
499
498
  return;
500
499
  }
501
500
  if (p && l) {
502
- R.current = $(n, r, f, m, l);
501
+ B.current = Dt(n, r, f, m, l);
503
502
  return;
504
503
  }
505
- L.current = Y, U.current = N;
504
+ z.current = X, G.current = F;
506
505
  return;
507
506
  }
508
- if (De.current && a > 1) {
509
- R.current = null, Pt(), I.current = {
507
+ if (Ee.current && a > 1) {
508
+ B.current = null, Mt(), R.current = {
510
509
  height: t.height,
511
510
  width: t.width
512
- }, L.current = Y, U.current = N, W.current = F;
511
+ }, z.current = X, G.current = F, K.current = L;
513
512
  return;
514
513
  }
515
514
  if (!s || !c) {
516
- R.current = null, Pt(), I.current = {
515
+ B.current = null, Mt(), R.current = {
517
516
  height: t.height,
518
517
  width: t.width
519
- }, L.current = Y, U.current = N, W.current = F;
518
+ }, z.current = X, G.current = F, K.current = L;
520
519
  return;
521
520
  }
522
- let ne = !!h, re = !!R.current?.location;
521
+ let ne = !!h, re = !!B.current?.location;
523
522
  if (n === 0 && r === 0 && !(ne || (u || re) && (f || re))) {
524
- I.current = {
523
+ R.current = {
525
524
  height: t.height,
526
525
  width: t.width
527
- }, L.current = Y, U.current = N, W.current = F;
526
+ }, z.current = X, G.current = F, K.current = L;
528
527
  return;
529
528
  }
530
- let ie = n / s * i, g = r / c * o, se = !1;
531
- if (h) g = h.targetScrollLeft, ie = h.targetScrollTop, se = !0;
529
+ let g = n / s * i, oe = r / c * o, se = !1;
530
+ if (h) oe = h.targetScrollLeft, g = h.targetScrollTop, se = !0;
532
531
  else if ((u || re) && l && f) {
533
- let e = At(R.current ?? $(n, r, f, m, l), N, Y, {
532
+ let e = kt(B.current ?? Dt(n, r, f, m, l), F, X, {
534
533
  scrollTop: n,
535
534
  scrollLeft: r
536
535
  }, f, m);
537
- g = e.scrollLeft, ie = e.scrollTop, se = !0;
536
+ oe = e.scrollLeft, g = e.scrollTop, se = !0;
538
537
  }
539
- let ce = Tt(ie, g, Y);
540
- se ? jt(ce.scrollTop, ce.scrollLeft) : ot.current = setTimeout(() => {
538
+ let ce = St(g, oe, X);
539
+ se ? $(ce.scrollTop, ce.scrollLeft) : nt.current = setTimeout(() => {
541
540
  requestAnimationFrame(() => {
542
- jt(ce.scrollTop, ce.scrollLeft);
541
+ $(ce.scrollTop, ce.scrollLeft);
543
542
  });
544
- }, 0), R.current = null, z.current = null, V.current || (B.current = null, H.current = !1), I.current = {
543
+ }, 0), B.current = null, V.current = null, U.current || (H.current = null, W.current = !1), R.current = {
545
544
  height: t.height,
546
545
  width: t.width
547
- }, L.current = Y, U.current = ee, W.current = F;
546
+ }, z.current = X, G.current = ee, K.current = L;
548
547
  }, [
549
- At,
550
- $,
548
+ kt,
549
+ Dt,
551
550
  C,
552
- Z,
553
- Et,
551
+ Q,
552
+ wt,
554
553
  a,
555
- Y,
556
- D,
557
- $e,
558
- Pt,
559
- F,
554
+ X,
555
+ k,
556
+ Xe,
557
+ Mt,
558
+ L,
560
559
  T,
561
- ge,
562
- jt,
563
- N,
560
+ he,
561
+ $,
562
+ F,
564
563
  E,
565
- Qe
564
+ Ye
566
565
  ]);
567
566
  Oe(() => {
568
- clearTimeout(ot.current);
569
- let e = Be(Y), t = !!z.current, n = W.current !== F, r = t || n ? K.current : Dt(Y);
570
- !t && !n && (K.current = r, ht(r)), Ft(r, e), ye(e);
567
+ clearTimeout(nt.current);
568
+ let e = Re(X), t = !!V.current, n = K.current !== L, r = t || n ? J.current : Tt(X);
569
+ !t && !n && (J.current = r, ft(r)), Nt(r, e), ve(e);
571
570
  }, [
572
- Dt,
573
- Y,
574
- F,
575
- ye,
576
- Ft
571
+ Tt,
572
+ X,
573
+ L,
574
+ ve,
575
+ Nt
577
576
  ]);
578
- let It = _((e) => {
579
- let t = document.activeElement !== he;
580
- !qe && t || (["ArrowUp", "ArrowLeft"].includes(e.key) ? (e.preventDefault(), Ne()) : ["ArrowDown", "ArrowRight"].includes(e.key) && (e.preventDefault(), S()));
577
+ let Pt = _((e) => {
578
+ let t = document.activeElement !== o;
579
+ !We && t || (["ArrowUp", "ArrowLeft"].includes(e.key) ? (e.preventDefault(), S()) : ["ArrowDown", "ArrowRight"].includes(e.key) && (e.preventDefault(), je()));
581
580
  }, [
582
- qe,
583
- S,
584
- he,
585
- Ne
581
+ We,
582
+ je,
583
+ o,
584
+ S
586
585
  ]);
587
- v(() => (window.addEventListener("keydown", It), () => {
588
- window.removeEventListener("keydown", It);
589
- }), [It]), v(() => () => {
590
- st.current && clearTimeout(st.current), clearTimeout(dt.current), ct.current && cancelAnimationFrame(ct.current);
591
- }, []), v(() => {
592
- nt.height === 0 || !De.current || J && (ge(a, "auto"), requestAnimationFrame(() => {
593
- Pe(a), De.current = !1, je(!1);
594
- }));
586
+ v(() => (window.addEventListener("keydown", Pt), () => {
587
+ window.removeEventListener("keydown", Pt);
588
+ }), [Pt]), v(() => () => {
589
+ rt.current && clearTimeout(rt.current), clearTimeout(st.current), it.current && cancelAnimationFrame(it.current);
590
+ }, []), Oe(() => {
591
+ if (D || !w || !r || !i || !Ee.current) return;
592
+ let e = Y, t = j(a, 1, w), n = oe(X, t);
593
+ if (!e || !n) return;
594
+ he(t, "auto");
595
+ let o = requestAnimationFrame(() => {
596
+ let r = j(Math.floor(n.left), 0, e.scrollWidth - e.clientWidth), i = j(Math.floor(n.top), 0, e.scrollHeight - e.clientHeight);
597
+ Math.abs(e.scrollLeft - r) > 1 || Math.abs(e.scrollTop - i) > 1 || (Ne(t), Ee.current = !1, Ae(!1));
598
+ });
599
+ return () => cancelAnimationFrame(o);
595
600
  }, [
596
- nt.height,
601
+ D,
602
+ w,
603
+ r,
604
+ i,
605
+ X,
597
606
  a,
598
- o,
599
- ge,
600
- J,
601
- Pe
607
+ he,
608
+ Y,
609
+ Ne
602
610
  ]);
603
- let Lt = _((e) => {
604
- e && (ve(e), _e(e), bt && _t(e));
611
+ let Ft = _((e) => {
612
+ e && (_e(e), ge(e), _t && mt(e));
605
613
  }, [
614
+ ge,
606
615
  _e,
607
- ve,
608
- _t,
609
- bt
610
- ]), Rt = _((e) => {
616
+ mt,
617
+ _t
618
+ ]), It = _((e) => {
611
619
  let t = e.currentTarget, n = {
612
620
  scrollTop: t.scrollTop,
613
621
  scrollLeft: t.scrollLeft
614
622
  };
615
- if (V.current || z.current || H.current) {
616
- H.current = !1, Je?.(e.nativeEvent);
623
+ if (U.current || V.current || W.current) {
624
+ W.current = !1, Ge?.(e.nativeEvent);
617
625
  return;
618
626
  }
619
- K.current = n, ct.current && cancelAnimationFrame(ct.current), ct.current = requestAnimationFrame(() => {
620
- ht(n);
621
- }), Je?.(e.nativeEvent);
622
- }, [Je]);
623
- return Ie === e.INVALID_OR_CORRUPTED_PDF ? /* @__PURE__ */ x("div", {
624
- ref: rt,
625
- className: O["rp-load-error"],
627
+ J.current = n, it.current && cancelAnimationFrame(it.current), it.current = requestAnimationFrame(() => {
628
+ ft(n);
629
+ }), Ge?.(e.nativeEvent);
630
+ }, [Ge]);
631
+ return O === e.INVALID_OR_CORRUPTED_PDF ? /* @__PURE__ */ x("div", {
632
+ ref: $e,
633
+ className: A["rp-load-error"],
626
634
  style: {
627
635
  width: r,
628
636
  height: i
@@ -632,19 +640,19 @@ var D = class extends Ee {
632
640
  "aria-live": "assertive",
633
641
  "aria-atomic": "true",
634
642
  children: /* @__PURE__ */ x("div", {
635
- className: O["rp-load-error-message"],
643
+ className: A["rp-load-error-message"],
636
644
  children: "Invalid or corrupted PDF file."
637
645
  })
638
- }) : Ie === e.NOT_SUPPORTED ? /* @__PURE__ */ x("div", {
639
- className: O["rp-not-supported"],
646
+ }) : O === e.NOT_SUPPORTED ? /* @__PURE__ */ x("div", {
647
+ className: A["rp-not-supported"],
640
648
  style: {
641
649
  width: r,
642
650
  height: i
643
651
  },
644
652
  children: /* @__PURE__ */ Me("div", {
645
- className: O["rp-not-supported-content"],
653
+ className: A["rp-not-supported-content"],
646
654
  children: ["React PDF Kit is unable to render on this browser. Please use the supported browsers from the list below:", /* @__PURE__ */ x("div", { children: /* @__PURE__ */ Me("ul", {
647
- className: O["rp-not-supported-list"],
655
+ className: A["rp-not-supported-list"],
648
656
  children: [
649
657
  /* @__PURE__ */ x("li", { children: "Chrome 126+" }),
650
658
  /* @__PURE__ */ x("li", { children: "Edge 126+" }),
@@ -655,40 +663,40 @@ var D = class extends Ee {
655
663
  ]
656
664
  }) })]
657
665
  })
658
- }) : !Y.pages.length && !Fe && !Ie ? /* @__PURE__ */ x("div", {
659
- className: O["rp-loader"],
666
+ }) : !X.pages.length && !D && !O ? /* @__PURE__ */ x("div", {
667
+ className: A["rp-loader"],
660
668
  style: {
661
669
  width: r,
662
670
  height: i
663
671
  },
664
- children: Ke && /* @__PURE__ */ x(Ke, {})
672
+ children: Ue && /* @__PURE__ */ x(Ue, {})
665
673
  }) : /* @__PURE__ */ x("div", {
666
674
  "data-rp": "pages",
667
- ref: Lt,
668
- className: pe(O["rp-pages"], O["rp-pages-flow"], T === t.HORIZONTAL_SCROLLING && O["rp-pages-horizontal-scroll"], T === t.PAGE_SCROLLING && O["rp-page-scrolling-wrapper"]),
669
- onScroll: Rt,
675
+ ref: Ft,
676
+ className: pe(A["rp-pages"], A["rp-pages-flow"], T === t.HORIZONTAL_SCROLLING && A["rp-pages-horizontal-scroll"], T === t.PAGE_SCROLLING && A["rp-page-scrolling-wrapper"]),
677
+ onScroll: It,
670
678
  style: {
671
679
  width: r,
672
680
  height: i,
673
- ...Ae && { visibility: "hidden" }
681
+ ...De && { visibility: "hidden" }
674
682
  },
675
683
  children: /* @__PURE__ */ x("div", {
676
- className: O["rp-document-wrapper"],
684
+ className: A["rp-document-wrapper"],
677
685
  style: {
678
- width: Y.documentWidth,
679
- height: Y.documentHeight,
680
- marginLeft: Y.offsetLeft,
681
- marginTop: Y.offsetTop,
682
- "--rp-pages-height": `${Y.documentHeight}px`,
683
- "--rp-pages-width": `${Y.documentWidth}px`
686
+ width: X.documentWidth,
687
+ height: X.documentHeight,
688
+ marginLeft: X.offsetLeft,
689
+ marginTop: X.offsetTop,
690
+ "--rp-pages-height": `${X.documentHeight}px`,
691
+ "--rp-pages-width": `${X.documentWidth}px`
684
692
  },
685
- children: St.map((e) => /* @__PURE__ */ x(He, { row: e }, e.index))
693
+ children: yt.map((e) => /* @__PURE__ */ x(Be, { row: e }, e.index))
686
694
  })
687
695
  });
688
- }, Ke = () => {
689
- let e = b(new Ae()), { pagesRef: t, setPagesRef: i, setContentRef: a } = f(), { passwordRequired: o } = r(), { onTextSelect: s } = p(), { selectionMode: c } = ue(), { isPressed: l } = Se(), u = c === n.HAND, d = y(() => pe(O["rp-pages-container"], {
690
- [O["rp-cursor-grab"]]: u && !l,
691
- [O["rp-cursor-grabbing"]]: u && l
696
+ }, We = () => {
697
+ let e = b(new Ae()), { pagesRef: t, setPagesRef: i, setContentRef: a } = f(), { passwordRequired: o } = r(), { onTextSelect: s } = p(), { selectionMode: c } = ue(), { isPressed: l } = Se(), u = c === n.HAND, d = y(() => pe(A["rp-pages-container"], {
698
+ [A["rp-cursor-grab"]]: u && !l,
699
+ [A["rp-cursor-grabbing"]]: u && l
692
700
  }), [u, l]);
693
701
  return be(t), Te({
694
702
  onTextSelect: s,
@@ -703,9 +711,9 @@ var D = class extends Ee {
703
711
  "--scale-round-x": `${ye(e.current.sx)[1]}px`,
704
712
  "--scale-round-y": `${ye(e.current.sy)[1]}px`
705
713
  },
706
- children: /* @__PURE__ */ x(D, {
714
+ children: /* @__PURE__ */ x(Pe, {
707
715
  style: { minHeight: "50px" },
708
- children: ({ width: e, height: t }) => /* @__PURE__ */ x(Ge, {
716
+ children: ({ width: e, height: t }) => /* @__PURE__ */ x(Ue, {
709
717
  width: e,
710
718
  height: t
711
719
  })
@@ -714,4 +722,4 @@ var D = class extends Ee {
714
722
  }), o && /* @__PURE__ */ x(ve, {})] });
715
723
  };
716
724
  //#endregion
717
- export { Ke as t };
725
+ export { We as t };
@@ -1,6 +1,6 @@
1
1
  import { useDocumentContext as e } from "./contexts/RPDocumentContext.js";
2
2
  import { usePagesRotateContext as t } from "./contexts/PagesRotateContext.js";
3
- import { r as n } from "./PaginationContext-DIzsZhFd.js";
3
+ import { r as n } from "./PaginationContext-DDjxEFW0.js";
4
4
  import { useRenderQueue as r } from "./contexts/RenderQueueProvider.js";
5
5
  import { t as i } from "./clsx-BD2qMUU1.js";
6
6
  import { t as a } from "./LoaderIcon-SD35XFV2.js";
@@ -1,8 +1,8 @@
1
- import { r as e } from "./PaginationContext-DIzsZhFd.js";
1
+ import { r as e } from "./PaginationContext-DDjxEFW0.js";
2
2
  import { useThumbnailContext as t } from "./contexts/ThumbnailsContext.js";
3
3
  import { useThumbnailContainerRegister as n } from "./contexts/ElementThumbnailContext.js";
4
4
  import { withRef as r } from "./utils/withRef.js";
5
- import { t as i } from "./Thumbnail-D0M1-UHT.js";
5
+ import { t as i } from "./Thumbnail-BRpZB3L6.js";
6
6
  import { useInfiniteScroll as a } from "./utils/hooks/useInfiniteScroll.js";
7
7
  import { useCallback as o, useEffect as s, useImperativeHandle as c, useMemo as l, useRef as u } from "react";
8
8
  import { jsx as d } from "react/jsx-runtime";
@@ -10,7 +10,7 @@ import { ZoomProvider as l } from "../contexts/ZoomContext.js";
10
10
  import { PagesRotateProvider as u } from "../contexts/PagesRotateContext.js";
11
11
  import { DimensionPagesProvider as d } from "../contexts/DimensionPagesContext.js";
12
12
  import { SmoothScrollProvider as f } from "../contexts/SmoothScrollContext.js";
13
- import { n as p } from "../PaginationContext-DIzsZhFd.js";
13
+ import { n as p } from "../PaginationContext-DDjxEFW0.js";
14
14
  import { DarkModeProvider as m } from "../contexts/DarkModeContext.js";
15
15
  import { LayerProvider as h } from "../contexts/LayerContext.js";
16
16
  import { SelectionModeProvider as g } from "../contexts/SelectionModeContext.js";
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { t as e } from "../RPPages-BVSFaPUT.js";
2
+ import { t as e } from "../RPPages-BMt4LDEp.js";
3
3
  export { e as RPPages };
@@ -9,7 +9,7 @@ import { useIconContext as a } from "../../../contexts/IconContext.js";
9
9
  import { t as o } from "../../../RPTooltip-DMM4skl8.js";
10
10
  import { ThumbnailIcon as s } from "../../icons/Thumbnail.js";
11
11
  import { n as c, t as l } from "../../../RPSplitter-kYf59kRI.js";
12
- import { t as u } from "../../../Thumbnails-CjtSNfLI.js";
12
+ import { t as u } from "../../../Thumbnails-DmSXQBQ4.js";
13
13
  import { useCallback as d, useMemo as f, useRef as p, useState as m } from "react";
14
14
  import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
15
15
  //#region lib/components/layout/sidebar/RPSidebar.tsx
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import { t as e } from "../../../Thumbnail-D0M1-UHT.js";
2
+ import { t as e } from "../../../Thumbnail-BRpZB3L6.js";
3
3
  export { e as Thumbnail };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../../Thumbnails-CjtSNfLI.js";
1
+ import { t as e } from "../../../Thumbnails-DmSXQBQ4.js";
2
2
  export { e as Thumbnails };
@@ -1,4 +1,4 @@
1
- import { r as e } from "../../../PaginationContext-DIzsZhFd.js";
1
+ import { r as e } from "../../../PaginationContext-DDjxEFW0.js";
2
2
  import { useLocalizationContext as t } from "../../../contexts/LocalizationContext.js";
3
3
  import { useToolbarComponentContext as n } from "../../../contexts/ToolbarComponentContext.js";
4
4
  import { useToolComponentContext as r } from "../../../contexts/ToolComponentContext.js";
@@ -1,7 +1,7 @@
1
1
  import { ScrollMode as e, ViewMode as t } from "../../../utils/types.js";
2
2
  import { useScrollModeContext as n } from "../../../contexts/ScrollModeContext.js";
3
3
  import { useViewModeContext as r } from "../../../contexts/ViewModeContext.js";
4
- import { r as i } from "../../../PaginationContext-DIzsZhFd.js";
4
+ import { r as i } from "../../../PaginationContext-DDjxEFW0.js";
5
5
  import { useLocalizationContext as a } from "../../../contexts/LocalizationContext.js";
6
6
  import { useToolbarComponentContext as o } from "../../../contexts/ToolbarComponentContext.js";
7
7
  import { useToolComponentContext as s } from "../../../contexts/ToolComponentContext.js";
@@ -4,7 +4,7 @@ import { useToolbarComponentContext as t } from "../../../contexts/ToolbarCompon
4
4
  import { useThumbnailContext as n } from "../../../contexts/ThumbnailsContext.js";
5
5
  import { t as r } from "../../../LoadingIndicator-DDFWa48h.js";
6
6
  import { t as i } from "../../../RPSplitter-kYf59kRI.js";
7
- import { t as a } from "../../../Thumbnails-CjtSNfLI.js";
7
+ import { t as a } from "../../../Thumbnails-DmSXQBQ4.js";
8
8
  import { t as o } from "../../../ToolbarLayout.module--e7Y4NlO.js";
9
9
  import { useRef as s, useState as c } from "react";
10
10
  import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
@@ -4,7 +4,7 @@ import { useToolbarComponentContext as t } from "../../../contexts/ToolbarCompon
4
4
  import { useThumbnailContext as n } from "../../../contexts/ThumbnailsContext.js";
5
5
  import { t as r } from "../../../LoadingIndicator-DDFWa48h.js";
6
6
  import { t as i } from "../../../RPSplitter-kYf59kRI.js";
7
- import { t as a } from "../../../Thumbnails-CjtSNfLI.js";
7
+ import { t as a } from "../../../Thumbnails-DmSXQBQ4.js";
8
8
  import { t as o } from "../../../ToolbarLayout.module--e7Y4NlO.js";
9
9
  import { RPVerticalBar as s } from "./tools/defaults/RPVerticalBar.js";
10
10
  import { RPHorizontalBar as c } from "./tools/defaults/RPHorizontalBar.js";
@@ -1,2 +1,2 @@
1
- import { r as e } from "../../../../main-GaulAopG.js";
1
+ import { r as e } from "../../../../main-iHA-6dyy.js";
2
2
  export { e as DualPageWithCoverTool };
@@ -1,2 +1,2 @@
1
- import { n as e } from "../../../../main-GaulAopG.js";
1
+ import { n as e } from "../../../../main-iHA-6dyy.js";
2
2
  export { e as FirstPageTool };
@@ -1,4 +1,4 @@
1
- import { r as e } from "../../../../PaginationContext-DIzsZhFd.js";
1
+ import { r as e } from "../../../../PaginationContext-DDjxEFW0.js";
2
2
  import { useLocalizationContext as t } from "../../../../contexts/LocalizationContext.js";
3
3
  import { t as n } from "../../../../Input-cx_7lycL.js";
4
4
  import { t as r } from "../../../../Paginate.module-DOw5WBhH.js";
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../../../main-GaulAopG.js";
1
+ import { t as e } from "../../../../main-iHA-6dyy.js";
2
2
  export { e as LastPageTool };
@@ -1,7 +1,7 @@
1
1
  import { ScrollMode as e, ViewMode as t } from "../../../../utils/types.js";
2
2
  import { useScrollModeContext as n } from "../../../../contexts/ScrollModeContext.js";
3
3
  import { useViewModeContext as r } from "../../../../contexts/ViewModeContext.js";
4
- import { r as i } from "../../../../PaginationContext-DIzsZhFd.js";
4
+ import { r as i } from "../../../../PaginationContext-DDjxEFW0.js";
5
5
  import { useLocalizationContext as a } from "../../../../contexts/LocalizationContext.js";
6
6
  import { ChevronUpIcon as o } from "../../../icons/ChevronUpIcon.js";
7
7
  import { t as s } from "../../../../Button-Dk2wKVbw.js";
@@ -1,4 +1,4 @@
1
- import { r as e } from "../../../../PaginationContext-DIzsZhFd.js";
1
+ import { r as e } from "../../../../PaginationContext-DDjxEFW0.js";
2
2
  import { useLocalizationContext as t } from "../../../../contexts/LocalizationContext.js";
3
3
  import { ChevronUpIcon as n } from "../../../icons/ChevronUpIcon.js";
4
4
  import { t as r } from "../../../../Button-Dk2wKVbw.js";
@@ -1,4 +1,4 @@
1
- import { r as e } from "../../../../../PaginationContext-DIzsZhFd.js";
1
+ import { r as e } from "../../../../../PaginationContext-DDjxEFW0.js";
2
2
  import { useLocalizationContext as t } from "../../../../../contexts/LocalizationContext.js";
3
3
  import { t as n } from "../../../../../RPTooltip-DMM4skl8.js";
4
4
  import { n as r } from "../../../../../dist-B96fEANu.js";
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../AnnotationLayer-lagF0zYo.js";
1
+ import { t as e } from "../../AnnotationLayer-CkWazdbK.js";
2
2
  export { e as AnnotationLayer };
@@ -1,4 +1,4 @@
1
- import { r as e } from "../../PaginationContext-DIzsZhFd.js";
1
+ import { r as e } from "../../PaginationContext-DDjxEFW0.js";
2
2
  import { RPPage as t } from "./RPPage.js";
3
3
  import { memo as n, useMemo as r } from "react";
4
4
  import { jsx as i } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { r as e } from "../../PaginationContext-DIzsZhFd.js";
1
+ import { r as e } from "../../PaginationContext-DDjxEFW0.js";
2
2
  import { RPPage as t } from "./RPPage.js";
3
3
  import { memo as n, useMemo as r } from "react";
4
4
  import { jsx as i } from "react/jsx-runtime";
@@ -6,7 +6,7 @@ import { useLoaderContext as i } from "../../contexts/LoaderContext.js";
6
6
  import { withRef as a } from "../../utils/withRef.js";
7
7
  import { n as o, t as s } from "../../CanvasLayer-DkVH-tX2.js";
8
8
  import { t as c } from "../../TextLayer-CUtANGvL.js";
9
- import { t as l } from "../../AnnotationLayer-lagF0zYo.js";
9
+ import { t as l } from "../../AnnotationLayer-CkWazdbK.js";
10
10
  import { t as u } from "../../TextHighlightLayer-BMhYl-9Q.js";
11
11
  import { CustomElement as d } from "./CustomElement.js";
12
12
  import { XfaLayer as f } from "./XfaLayer.js";
@@ -1,4 +1,4 @@
1
- import { r as e } from "../../PaginationContext-DIzsZhFd.js";
1
+ import { r as e } from "../../PaginationContext-DDjxEFW0.js";
2
2
  import { RPPage as t } from "./RPPage.js";
3
3
  import { useMemo as n } from "react";
4
4
  import { jsx as r } from "react/jsx-runtime";
@@ -4,7 +4,7 @@ import { useDocumentContext as t } from "../../contexts/RPDocumentContext.js";
4
4
  import { useZoomContext as n } from "../../contexts/ZoomContext.js";
5
5
  import { usePagesRotateContext as r } from "../../contexts/PagesRotateContext.js";
6
6
  import { useSmoothScrollContext as i } from "../../contexts/SmoothScrollContext.js";
7
- import { r as a } from "../../PaginationContext-DIzsZhFd.js";
7
+ import { r as a } from "../../PaginationContext-DDjxEFW0.js";
8
8
  import { SimpleLinkService as o } from "../../utils/link_service.js";
9
9
  import { t as s } from "../../XfaLayer.module-w4FOd2dm.js";
10
10
  import { highlightMatches as c, resetDivs as l } from "../../utils/highlight.js";
@@ -2,7 +2,7 @@ import { LicenseType as e } from "../utils/types.js";
2
2
  import { ORGANIZATION_ALLOWED_FEATURES_MESSAGE as t } from "../utils/const.js";
3
3
  import { usePagesRotateContext as n } from "./PagesRotateContext.js";
4
4
  import { useSmoothScrollContext as r } from "./SmoothScrollContext.js";
5
- import { r as i } from "../PaginationContext-DIzsZhFd.js";
5
+ import { r as i } from "../PaginationContext-DDjxEFW0.js";
6
6
  import { useThumbnailContext as a } from "./ThumbnailsContext.js";
7
7
  import { useLicenseContext as o } from "./LicenseContext.js";
8
8
  import { createContext as s, useCallback as c, useContext as l, useEffect as u, useMemo as d, useRef as f, useState as p } from "react";
@@ -1,2 +1,2 @@
1
- import { n as e, r as t, t as n } from "../PaginationContext-DIzsZhFd.js";
1
+ import { n as e, r as t, t as n } from "../PaginationContext-DDjxEFW0.js";
2
2
  export { n as PaginationContext, e as PaginationProvider, t as usePaginationContext };
@@ -1,6 +1,6 @@
1
1
  import { isPdfDestroyed as e, trackPdfOperation as t } from "../utils/pdfOperationTracker.js";
2
2
  import { useDocumentContext as n } from "./RPDocumentContext.js";
3
- import { r } from "../PaginationContext-DIzsZhFd.js";
3
+ import { r } from "../PaginationContext-DDjxEFW0.js";
4
4
  import { Queue as i } from "../utils/Queue.js";
5
5
  import { renderPage as a } from "../utils/renderPage.js";
6
6
  import { createContext as o, useCallback as s, useContext as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
@@ -1,5 +1,5 @@
1
1
  import { useViewModeContext as e } from "./contexts/ViewModeContext.js";
2
- import { r as t } from "./PaginationContext-DIzsZhFd.js";
2
+ import { r as t } from "./PaginationContext-DDjxEFW0.js";
3
3
  import { useLocalizationContext as n } from "./contexts/LocalizationContext.js";
4
4
  import { t as r } from "./Button-Dk2wKVbw.js";
5
5
  import { t as i } from "./RPTooltip-DMM4skl8.js";
package/dist/main.js CHANGED
@@ -4,7 +4,7 @@ import { useScrollModeContext as s } from "./contexts/ScrollModeContext.js";
4
4
  import { useViewModeContext as c } from "./contexts/ViewModeContext.js";
5
5
  import { useRotationContext as l } from "./contexts/RotationContext.js";
6
6
  import { useZoomContext as u } from "./contexts/ZoomContext.js";
7
- import { r as d } from "./PaginationContext-DIzsZhFd.js";
7
+ import { r as d } from "./PaginationContext-DDjxEFW0.js";
8
8
  import { useDarkModeContext as f } from "./contexts/DarkModeContext.js";
9
9
  import { useSelectionModeContext as p } from "./contexts/SelectionModeContext.js";
10
10
  import { useFullScreenContext as m } from "./contexts/FullScreenContext.js";
@@ -16,7 +16,7 @@ import { useHighlightContext as y } from "./contexts/HighlightContext.js";
16
16
  import { useElementPageContext as b } from "./contexts/ElementPageContext.js";
17
17
  import { useElementThumbnailContext as x } from "./contexts/ElementThumbnailContext.js";
18
18
  import { RPProvider as S } from "./components/RPProvider.js";
19
- import { t as C } from "./RPPages-BVSFaPUT.js";
19
+ import { t as C } from "./RPPages-BMt4LDEp.js";
20
20
  import { useFileDownload as w } from "./utils/hooks/useFileDownload.js";
21
21
  import { RPTheme as T } from "./components/RPTheme.js";
22
22
  import { RPConfig as E } from "./components/RPConfig.js";
@@ -46,7 +46,7 @@ import { RotateCounterclockwiseTool as Y } from "./components/layout/toolbar/too
46
46
  import { SelectionModeSwitcherTool as X } from "./components/layout/toolbar/tools/SelectionModeSwitcherTool.js";
47
47
  import { SinglePageTool as Z } from "./components/layout/toolbar/tools/SinglePageTool.js";
48
48
  import { DualPageTool as Q } from "./components/layout/toolbar/tools/DualPageTool.js";
49
- import { n as $, r as ee, t as te } from "./main-GaulAopG.js";
49
+ import { n as $, r as ee, t as te } from "./main-iHA-6dyy.js";
50
50
  import { PageScrollingTool as ne } from "./components/layout/toolbar/tools/PageScrollingTool.js";
51
51
  import { VerticalScrollingTool as re } from "./components/layout/toolbar/tools/VerticalScrollingTool.js";
52
52
  import { HorizontalScrollingTool as ie } from "./components/layout/toolbar/tools/HorizontalScrollingTool.js";
@@ -3,7 +3,7 @@ import { LicenseType as t } from "../types.js";
3
3
  import { appConsole as n } from "../appConsole.js";
4
4
  import { useCallback as r, useEffect as i, useState as a } from "react";
5
5
  //#region lib/utils/hooks/useLicense.ts
6
- var o = /* @__PURE__ */ new Date("2026-10-28T08:07:05.510Z"), s = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvIokvErJ0Fctu0jduSAx\ngr+5Har/VSuZLlOunS28hnlqqA+OF1apHL7RYkjBosS15yvviYdLrVWYHpHnoY4b\nHLQ9I6YX6FMB9T/VbB4xLdVdKvfi8r49aTScl5EKuSpgpPgz2VSJTfvVGcRuth/Y\nBm7PPGYdL2l2gvKDxchmmsHFPukGki9L4JOUeIVX0GXAxabENckaEH/iC1NZhX+W\nvXnpHeHuIIKlZ16LSivXNgo6BH2Z3GFdg4G3cAaXr6qNP8fsacYNqv2SpTW1viFD\nvzcGRabN25gpJAp9/syeScefWH3OiJY1lmw88oTiJbjIoiq6AkPhfn3G9mF54nvR\nkwIDAQAB\n-----END PUBLIC KEY-----", c = "Please visit https://app.react-pdf-kit.dev to generate a new license key.", l = {
6
+ var o = /* @__PURE__ */ new Date("2026-11-02T11:43:22.011Z"), s = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvIokvErJ0Fctu0jduSAx\ngr+5Har/VSuZLlOunS28hnlqqA+OF1apHL7RYkjBosS15yvviYdLrVWYHpHnoY4b\nHLQ9I6YX6FMB9T/VbB4xLdVdKvfi8r49aTScl5EKuSpgpPgz2VSJTfvVGcRuth/Y\nBm7PPGYdL2l2gvKDxchmmsHFPukGki9L4JOUeIVX0GXAxabENckaEH/iC1NZhX+W\nvXnpHeHuIIKlZ16LSivXNgo6BH2Z3GFdg4G3cAaXr6qNP8fsacYNqv2SpTW1viFD\nvzcGRabN25gpJAp9/syeScefWH3OiJY1lmw88oTiJbjIoiq6AkPhfn3G9mF54nvR\nkwIDAQAB\n-----END PUBLIC KEY-----", c = "Please visit https://app.react-pdf-kit.dev to generate a new license key.", l = {
7
7
  invalidLicense: `You are currently using without a valid license. ${c}`,
8
8
  mismatchedDomain: `Your license key is not valid for the current domain / IP. ${c}`,
9
9
  expired: `Your license key has expired. ${c}`,
@@ -1,2 +1,2 @@
1
- import { i as e } from "../../PaginationContext-DIzsZhFd.js";
1
+ import { i as e } from "../../PaginationContext-DDjxEFW0.js";
2
2
  export { e as usePaginate };
@@ -1,6 +1,6 @@
1
1
  import { useDebounce as e } from "./useDebounce.js";
2
2
  import { useSmoothScrollContext as t } from "../../contexts/SmoothScrollContext.js";
3
- import { r as n } from "../../PaginationContext-DIzsZhFd.js";
3
+ import { r as n } from "../../PaginationContext-DDjxEFW0.js";
4
4
  import { useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
5
5
  //#region lib/utils/hooks/usePresentPage.ts
6
6
  var s = (s, c) => {
@@ -10,8 +10,8 @@ var s = (s, c) => {
10
10
  i(() => {
11
11
  let e = h.current;
12
12
  if (e) {
13
- if (!g.some((t) => t.pageNumber === e)) return;
14
- f.current(e), clearTimeout(u.current), u.current = setTimeout(() => {
13
+ if (clearTimeout(u.current), !g.some((t) => t.pageNumber === e)) return;
14
+ f.current(e), u.current = setTimeout(() => {
15
15
  h.current === e && (h.current = void 0);
16
16
  }, 500);
17
17
  return;
@@ -1,2 +1,2 @@
1
- import { a as e } from "../../PaginationContext-DIzsZhFd.js";
1
+ import { a as e } from "../../PaginationContext-DDjxEFW0.js";
2
2
  export { e as useScrollToPage };
@@ -10,7 +10,7 @@ import { usePagesRotateContext as c } from "../../contexts/PagesRotateContext.js
10
10
  import { useDimensionPagesContext as l } from "../../contexts/DimensionPagesContext.js";
11
11
  import { useSmoothScrollContext as u } from "../../contexts/SmoothScrollContext.js";
12
12
  import { buildDocumentLayout as d, getPagePlacement as f } from "../documentLayout.js";
13
- import { r as p } from "../../PaginationContext-DIzsZhFd.js";
13
+ import { r as p } from "../../PaginationContext-DDjxEFW0.js";
14
14
  import { findMatches as m } from "../highlight.js";
15
15
  import { getWordPositionInPage as h } from "../getWordPositionInPage.js";
16
16
  import { useCallback as g, useEffect as _, useMemo as v, useRef as y, useState as b } from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pdf-kit/viewer",
3
- "version": "2.11.0",
3
+ "version": "2.11.1-rc.0",
4
4
  "private": false,
5
5
  "description": "A react-pdf-viewer component for React and Next.js. Suitable for react-pdf document.",
6
6
  "keywords": [