@pdf-viewer/react 1.18.0-beta.0 → 1.18.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/{ToolbarLayout.module-3f4e0f88.js → ToolbarLayout.module-4a9a9362.js} +1061 -1047
  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/RPLayout.js +1 -1
  8. package/dist/components/layout/SkipLink.js +3 -2
  9. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  10. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  11. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  12. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  13. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  14. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  15. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  16. package/dist/components/layout/toolbar/Paginate.js +1 -1
  17. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  18. package/dist/components/layout/toolbar/RPMoreOptions.js +1 -1
  19. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  20. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  21. package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
  22. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  23. package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
  24. package/dist/components/layout/toolbar/ToolbarCustom.js +1 -1
  25. package/dist/components/layout/toolbar/ToolbarDefault.js +1 -1
  26. package/dist/components/layout/toolbar/ToolbarLayout.js +1 -1
  27. package/dist/components/layout/toolbar/ZoomTool.js +1 -1
  28. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +1 -1
  29. package/dist/components/layout/toolbar/tools/DualPageTool.js +1 -1
  30. package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +1 -1
  31. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
  32. package/dist/components/layout/toolbar/tools/FirstPageTool.js +1 -1
  33. package/dist/components/layout/toolbar/tools/InputPageTool.js +1 -1
  34. package/dist/components/layout/toolbar/tools/LastPageTool.js +1 -1
  35. package/dist/components/layout/toolbar/tools/NextPageTool.js +1 -1
  36. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
  37. package/dist/components/layout/toolbar/tools/PrintTool.js +1 -1
  38. package/dist/components/layout/toolbar/tools/SinglePageTool.js +1 -1
  39. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
  40. package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +1 -1
  41. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +1 -1
  42. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +1 -1
  43. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +1 -1
  44. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +1 -1
  45. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +1 -1
  46. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +1 -1
  47. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +1 -1
  48. package/dist/components/page/AnnotationLayer.js +1 -1
  49. package/dist/components/page/CanvasLayer.js +1 -1
  50. package/dist/components/page/DualPage.js +1 -1
  51. package/dist/components/page/DualPageWithCover.js +1 -1
  52. package/dist/components/page/RPPage.js +1 -1
  53. package/dist/components/page/SinglePage.js +1 -1
  54. package/dist/components/page/TextHighlightLayer.js +1 -1
  55. package/dist/components/page/TextLayer.js +1 -1
  56. package/dist/components/ui/LoadingIndicator.js +1 -1
  57. package/dist/contexts/PaginationContext.js +1 -1
  58. package/dist/contexts/PrintContext.js +1 -1
  59. package/dist/contexts/RenderQueueProvider.js +1 -1
  60. package/dist/contexts/SearchContext.js +1 -1
  61. package/dist/contexts/ThumbnailsContext.js +1 -1
  62. package/dist/main.js +1 -1
  63. package/dist/types/utils/types.d.ts +1 -0
  64. package/dist/utils/highlight.js +139 -139
  65. package/dist/utils/hooks/useFileDownload.js +1 -1
  66. package/dist/utils/hooks/useLicense.js +1 -1
  67. package/dist/utils/hooks/usePaginate.js +1 -1
  68. package/dist/utils/hooks/usePresentPage.js +1 -1
  69. package/dist/utils/hooks/usePrint.js +1 -1
  70. package/dist/utils/hooks/useScrollToPage.js +1 -1
  71. package/dist/utils/hooks/useSearch.js +1 -1
  72. package/dist/utils/hooks/useThumbnail.js +1 -1
  73. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  74. package/package.json +1 -1
@@ -1,19 +1,19 @@
1
- import { jsx as i, Fragment as fe, jsxs as k } from "react/jsx-runtime";
1
+ import { jsx as i, Fragment as ge, jsxs as k } from "react/jsx-runtime";
2
2
  import * as X from "react";
3
- import { useRef as M, useEffect as A, useCallback as N, useState as H, useMemo as W, createContext as Be, useContext as Ze, useImperativeHandle as mn, createElement as Qe, PureComponent as ho, Component as fo, memo as It, Fragment as mo, forwardRef as go } from "react";
4
- import { ChevronUpIcon as qe } from "./components/icons/ChevronUpIcon.js";
5
- import { UIButton as le } from "./components/ui/Button.js";
3
+ import { useRef as M, useEffect as z, useCallback as O, useState as H, useMemo as W, createContext as je, useContext as Ze, useImperativeHandle as mn, createElement as Ye, PureComponent as ho, Component as fo, memo as It, Fragment as mo, forwardRef as go } from "react";
4
+ import { ChevronUpIcon as Be } from "./components/icons/ChevronUpIcon.js";
5
+ import { UIButton as pe } from "./components/ui/Button.js";
6
6
  import { UIInput as gn } from "./components/ui/Input.js";
7
- import { ViewMode as ne, ScrollMode as re, AnnotationSubType as $t, SelectionMode as vo, ErrorType as wo, ZoomLevel as Me } from "./utils/types.js";
7
+ import { ViewMode as ee, ScrollMode as ae, AnnotationSubType as $t, SelectionMode as vo, ErrorType as wo, ZoomLevel as He } from "./utils/types.js";
8
8
  import { useScrollModeContext as Ae } from "./contexts/ScrollModeContext.js";
9
- import { useDocumentContext as oe } from "./contexts/RPDocumentContext.js";
10
- import { useDocumentPasswordContext as bo } from "./contexts/DocumentPasswordContext.js";
11
- import { useDarkModeContext as _o } from "./contexts/DarkModeContext.js";
9
+ import { useDocumentContext as re } from "./contexts/RPDocumentContext.js";
10
+ import { useDocumentPasswordContext as _o } from "./contexts/DocumentPasswordContext.js";
11
+ import { useDarkModeContext as bo } from "./contexts/DarkModeContext.js";
12
12
  import "./contexts/RotationContext.js";
13
13
  import { useLayerContext as Po } from "./contexts/LayerContext.js";
14
- import { useZoomContext as ot } from "./contexts/ZoomContext.js";
15
- import { useViewModeContext as $e } from "./contexts/ViewModeContext.js";
16
- import { useVirtualScrollContext as rt } from "./contexts/VirtualScrollContext.js";
14
+ import { useZoomContext as rt } from "./contexts/ZoomContext.js";
15
+ import { useViewModeContext as Ge } from "./contexts/ViewModeContext.js";
16
+ import { useVirtualScrollContext as it } from "./contexts/VirtualScrollContext.js";
17
17
  import { useVirtualGridContext as vn } from "./contexts/VirtualGridContext.js";
18
18
  import { useSelectionModeContext as To } from "./contexts/SelectionModeContext.js";
19
19
  import { useInitialStateContext as xt } from "./contexts/InitialStateContext.js";
@@ -21,21 +21,21 @@ import { useFullScreenContext as Co } from "./contexts/FullScreenContext.js";
21
21
  import "./contexts/FileInputContext.js";
22
22
  import "./contexts/DropFileZoneContext.js";
23
23
  import { findMatches as yo, resetDivs as Io, highlightMatches as xo, isMatchEntireWord as So } from "./utils/highlight.js";
24
- import { useLayoutContainer as Te } from "./contexts/LayoutContainerContext.js";
25
- import { useDimensionPagesContext as je } from "./contexts/DimensionPagesContext.js";
26
- import { useLocalizationContext as ue } from "./contexts/LocalizationContext.js";
24
+ import { useLayoutContainer as Ce } from "./contexts/LayoutContainerContext.js";
25
+ import { useDimensionPagesContext as Ke } from "./contexts/DimensionPagesContext.js";
26
+ import { useLocalizationContext as fe } from "./contexts/LocalizationContext.js";
27
27
  import { useHighlightContext as Ro } from "./contexts/HighlightContext.js";
28
28
  import "./contexts/LicenseContext.js";
29
29
  import { useDownloadContext as Lo } from "./contexts/DownloadContext.js";
30
30
  import { useSmoothScrollContext as wn } from "./contexts/SmoothScrollContext.js";
31
31
  import "./contexts/ElementPageContext.js";
32
- import { usePagesRotateContext as it } from "./contexts/PagesRotateContext.js";
32
+ import { usePagesRotateContext as at } from "./contexts/PagesRotateContext.js";
33
33
  import { Queue as Eo } from "./utils/Queue.js";
34
34
  import { renderPage as No } from "./utils/renderPage.js";
35
35
  import { useGlobalCurrentPage as Oo } from "./contexts/GlobalCurrentPage.js";
36
36
  import { useLoaderContext as St } from "./contexts/LoaderContext.js";
37
37
  import { useToolComponentContext as Se } from "./contexts/ToolComponentContext.js";
38
- import { useIconToolContext as ve } from "./contexts/IconToolContext.js";
38
+ import { useIconToolContext as we } from "./contexts/IconToolContext.js";
39
39
  import { useOtherToolContext as Do } from "./contexts/OtherToolContext.js";
40
40
  import { useEventCallbackContext as Ao } from "./contexts/EventCallbackContext.js";
41
41
  import { useThemeContext as zo } from "./contexts/ThemeContext.js";
@@ -43,19 +43,19 @@ import "./contexts/ConfigContext.js";
43
43
  import * as Wo from "pdfjs-dist";
44
44
  import { PixelsPerInch as Fo, AnnotationMode as ko, RenderingCancelledException as Mo, AnnotationLayer as Ho } from "pdfjs-dist";
45
45
  import { ThumbnailIcon as $o } from "./components/icons/Thumbnail.js";
46
- import { c as Xe, R as Go } from "./RPSplitter-f6acf13b.js";
47
- import { c as ae } from "./clsx-0c6e471a.js";
48
- import { LoaderIcon as bn } from "./components/icons/LoaderIcon.js";
46
+ import { c as Qe, R as Go } from "./RPSplitter-f6acf13b.js";
47
+ import { c as le } from "./clsx-0c6e471a.js";
48
+ import { LoaderIcon as _n } from "./components/icons/LoaderIcon.js";
49
49
  import { Container as Uo } from "./components/layout/Container.js";
50
50
  import { useViewportContext as Re, ViewportProvider as Vo } from "./contexts/ViewportContext.js";
51
- import { useToolbarComponentContext as Ce, ToolbarComponentProvider as qo } from "./contexts/ToolbarComponentContext.js";
51
+ import { useToolbarComponentContext as ye, ToolbarComponentProvider as qo } from "./contexts/ToolbarComponentContext.js";
52
52
  import { WrapperLayout as Bo } from "./components/layout/WrapperLayout.js";
53
- import { RPDropFileZone as Zo } from "./components/RPDropFileZone.js";
54
- import { c as Ie, L as jo } from "./LayoutWrapper-60db8675.js";
53
+ import { RPDropFileZone as jo } from "./components/RPDropFileZone.js";
54
+ import { c as Ie, L as Zo } from "./LayoutWrapper-60db8675.js";
55
55
  import { SkipLink as Gt } from "./components/layout/SkipLink.js";
56
- import { c as te, S as Ut } from "./SearchCloseButton-08d57275.js";
56
+ import { c as oe, S as Ut } from "./SearchCloseButton-08d57275.js";
57
57
  import { UICheckbox as Vt } from "./components/ui/Checkbox.js";
58
- import { useIconContext as we, IconProvider as Ko } from "./contexts/IconContext.js";
58
+ import { useIconContext as _e, IconProvider as Ko } from "./contexts/IconContext.js";
59
59
  import K from "./components/ui/RPTooltip.js";
60
60
  import { UIDropDown as Rt } from "./components/ui/DropDown.js";
61
61
  import { MenuItem as xe } from "./components/layout/toolbar/MenuItem.js";
@@ -63,11 +63,11 @@ import { MenuSeparator as Lt } from "./components/layout/toolbar/MenuSeparator.j
63
63
  import { dateFormatter as qt } from "./utils/dateFormatter.js";
64
64
  import { PropertyItem as Xo } from "./components/layout/toolbar/PropertyItem.js";
65
65
  import "./RotateTool.module-67946714.js";
66
- import { withRef as at } from "./utils/withRef.js";
66
+ import { withRef as st } from "./utils/withRef.js";
67
67
  import { useInfiniteScroll as Qo } from "./utils/hooks/useInfiniteScroll.js";
68
68
  import { MAX_ZOOM_SCALE as Bt, THUMBNAIL_MIN_WIDTH as Yo } from "./utils/constants.js";
69
69
  import { SimpleLinkService as Jo } from "./utils/link_service.js";
70
- import { annotationsEvents as er, annotationEventsHandler as tr, handleAnnotationWidget as nr, handleAnnotationLink as or, bindLayerEvents as rr, fixTabIndexAccessibility as Zt, enhanceLinkAccessibility as jt, unbindLayerEvents as Kt } from "./utils/annotations.js";
70
+ import { annotationsEvents as er, annotationEventsHandler as tr, handleAnnotationWidget as nr, handleAnnotationLink as or, bindLayerEvents as rr, fixTabIndexAccessibility as jt, enhanceLinkAccessibility as Zt, unbindLayerEvents as Kt } from "./utils/annotations.js";
71
71
  import { normalizeSingleKeyword as ir, sortHighlightPosition as ar, unwrap as sr } from "./components/page/searchHighlight.js";
72
72
  import { CustomElement as cr } from "./components/page/CustomElement.js";
73
73
  import { getGridDimension as Et, getPositionFromPage as lr, getPageFromPosition as dr } from "./utils/calculatePage.js";
@@ -78,17 +78,17 @@ import { useDebounce as Nt } from "./utils/hooks/useDebounce.js";
78
78
  import fr from "./components/ui/PasswordModal.js";
79
79
  import { useCopyText as mr } from "./utils/hooks/useCopyText.js";
80
80
  import { useTextSelection as gr } from "./utils/hooks/useTextSelection.js";
81
- import { getScrollDistance as ke } from "./utils/getScrollDistance.js";
81
+ import { getScrollDistance as Me } from "./utils/getScrollDistance.js";
82
82
  import { getWordPositionInPage as vr } from "./utils/getWordPositionInPage.js";
83
83
  import { getThumbnailViewport as wr } from "./utils/getThumbnailViewport.js";
84
84
  import { smoothScrollTo as ht } from "./utils/smoothScrollTo.js";
85
- import { appConsole as br } from "./utils/appConsole.js";
86
- import { FileUploadTool as _n } from "./components/layout/toolbar/FileUploadTool.js";
87
- import { DarkModeTool as _r } from "./components/layout/toolbar/DarkModeTool.js";
85
+ import { appConsole as _r } from "./utils/appConsole.js";
86
+ import { FileUploadTool as bn } from "./components/layout/toolbar/FileUploadTool.js";
87
+ import { DarkModeTool as br } from "./components/layout/toolbar/DarkModeTool.js";
88
88
  import { ThreeDotIcon as Pr } from "./components/icons/ThreeDotIcon.js";
89
- import { c as Tr, u as Ot, P as Ke, a as Ve, b as Dt, k as Cr, e as yr, i as Ir } from "./index-c9a2990a.js";
89
+ import { c as Tr, u as Ot, P as Xe, a as qe, b as Dt, k as Cr, e as yr, i as Ir } from "./index-c9a2990a.js";
90
90
  import { D as xr, d as ft } from "./floating-ui.react-dom-d22a10b4.js";
91
- import { a as Sr, h as Rr, u as Lr, F as Er, b as Nr, G as tt } from "./index-3bf64864.js";
91
+ import { a as Sr, h as Rr, u as Lr, F as Er, b as Nr, G as nt } from "./index-3bf64864.js";
92
92
  import { CloseIcon as Or } from "./components/icons/CloseIcon.js";
93
93
  import { DocumentProperties as Dr } from "./components/layout/toolbar/DocumentProperties.js";
94
94
  import { RotateTool as Ar } from "./components/layout/toolbar/RotateTool.js";
@@ -106,14 +106,14 @@ import { SearchIcon as Cn } from "./components/icons/SearchIcon.js";
106
106
  import { ClearIcon as Vr } from "./components/icons/ClearIcon.js";
107
107
  import { InfoIcon as Xt } from "./components/icons/InfoIcon.js";
108
108
  const yn = () => {
109
- const { viewMode: t } = $e(), { scrollMode: e } = Ae(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = rt(), { setFocusedPage: a } = se(), c = M(), { columnCount: d } = vn(), { widths: s, heights: f } = je(), m = M(e), C = M(t), u = M(d), { targetScrollPage: T } = wn();
110
- A(() => {
109
+ const { viewMode: t } = Ge(), { scrollMode: e } = Ae(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = it(), { setFocusedPage: a } = de(), c = M(), { columnCount: d } = vn(), { widths: s, heights: f } = Ke(), m = M(e), T = M(t), u = M(d), { targetScrollPage: C } = wn();
110
+ z(() => {
111
111
  n != null && n.scrollToItem && (c.current = n);
112
- }, [n]), A(() => {
113
- m.current = e, C.current = t;
112
+ }, [n]), z(() => {
113
+ m.current = e, T.current = t;
114
114
  }, [e, t]);
115
- const b = N(
116
- (y, w) => {
115
+ const w = O(
116
+ (y, b) => {
117
117
  if (!o)
118
118
  return;
119
119
  const g = Math.ceil(y / 2) * 2 - 1;
@@ -132,71 +132,71 @@ const yn = () => {
132
132
  };
133
133
  return o == null ? void 0 : o.scrollTo({
134
134
  ...h,
135
- behavior: w
135
+ behavior: b
136
136
  });
137
137
  },
138
138
  [o, s, ht]
139
139
  );
140
- return A(() => {
141
- m.current = e, C.current = t;
142
- }, [e, t]), A(() => {
140
+ return z(() => {
141
+ m.current = e, T.current = t;
142
+ }, [e, t]), z(() => {
143
143
  u.current = d;
144
- }, [d]), { scrollToPage: N(
145
- (y, w = "smooth") => {
144
+ }, [d]), { scrollToPage: O(
145
+ (y, b = "smooth") => {
146
146
  a(y);
147
147
  const g = y - 1;
148
148
  let h = g, p = 0;
149
- if (C.current === ne.DUAL_PAGE && m.current === re.PAGE_SCROLLING) {
150
- b(y, w);
149
+ if (T.current === ee.DUAL_PAGE && m.current === ae.PAGE_SCROLLING) {
150
+ w(y, b);
151
151
  return;
152
152
  }
153
- if (m.current === re.PAGE_SCROLLING) {
153
+ if (m.current === ae.PAGE_SCROLLING) {
154
154
  a(y);
155
155
  return;
156
156
  }
157
157
  if (!c.current || !r)
158
158
  return;
159
159
  const l = r;
160
- w === "smooth" && (T.current = y);
160
+ b === "smooth" && (C.current = y);
161
161
  const { columnsWidth: v, rowsHeight: _ } = Et(
162
162
  { widths: s, heights: f },
163
163
  d
164
164
  );
165
- if (m.current === re.HORIZONTAL_SCROLLING) {
165
+ if (m.current === ae.HORIZONTAL_SCROLLING) {
166
166
  p = g;
167
- const x = ke(v, p), R = {
168
- left: Math.floor(x),
167
+ const S = Me(v, p), R = {
168
+ left: Math.floor(S),
169
169
  top: 0
170
170
  };
171
171
  return l.scrollTo({
172
172
  ...R,
173
- behavior: w
173
+ behavior: b
174
174
  });
175
175
  }
176
- if (C.current === ne.DUAL_PAGE) {
176
+ if (T.current === ee.DUAL_PAGE) {
177
177
  p = g % 2, h = Math.floor(g / 2);
178
- const R = ke(v, p), O = ke(_, h), D = {
178
+ const R = Me(v, p), N = Me(_, h), A = {
179
179
  left: Math.floor(R),
180
- top: Math.floor(O)
180
+ top: Math.floor(N)
181
181
  };
182
182
  return l.scrollTo({
183
- ...D,
184
- behavior: w
183
+ ...A,
184
+ behavior: b
185
185
  });
186
186
  }
187
- const I = ke(_, h), S = {
187
+ const I = Me(_, h), x = {
188
188
  left: 0,
189
189
  top: Math.floor(I)
190
190
  };
191
191
  return l.scrollTo({
192
- ...S,
193
- behavior: w
192
+ ...x,
193
+ behavior: b
194
194
  });
195
195
  },
196
196
  [
197
197
  r,
198
198
  d,
199
- b,
199
+ w,
200
200
  a,
201
201
  ht,
202
202
  f,
@@ -204,7 +204,7 @@ const yn = () => {
204
204
  ]
205
205
  ) };
206
206
  }, qr = (t = 1) => {
207
- const [e, n] = H(t), [r, o] = H(0), { scrollToPage: a } = yn(), c = M(1), { viewMode: d } = $e(), { scrollMode: s } = Ae(), { widths: f } = je(), { pagesRef: m } = Te(), C = Nt(e, 100), u = N(
207
+ const [e, n] = H(t), [r, o] = H(0), { scrollToPage: a } = yn(), c = M(1), { viewMode: d } = Ge(), { scrollMode: s } = Ae(), { widths: f } = Ke(), { pagesRef: m } = Ce(), T = Nt(e, 100), u = O(
208
208
  (h) => {
209
209
  if (!/^[0-9]*$/g.test(h.toString()) || !h)
210
210
  return { success: !1, currentPage: c.current };
@@ -212,37 +212,37 @@ const yn = () => {
212
212
  return l < 0 || l > r ? { success: !1, currentPage: c.current } : (n(l), c.current = l, { success: !0, currentPage: +h });
213
213
  },
214
214
  [r]
215
- ), T = N(u, [u]), b = N(
215
+ ), C = O(u, [u]), w = O(
216
216
  (h) => {
217
217
  const p = u(h);
218
218
  return p.success && a(p.currentPage), p;
219
219
  },
220
220
  [u, a]
221
- ), P = N((h) => {
221
+ ), P = O((h) => {
222
222
  const p = h % 2 === 1;
223
223
  if (!m || p)
224
224
  return !1;
225
225
  const l = p ? f[h] : f[h - 1], v = p ? f[h + 1] : f[h];
226
- return d === ne.DUAL_PAGE && l + v < m.clientWidth;
227
- }, [d, f, m, r]), y = N(() => {
226
+ return d === ee.DUAL_PAGE && l + v < m.clientWidth;
227
+ }, [d, f, m, r]), y = O(() => {
228
228
  let h = e - 1;
229
- P(h) && (h = e - 2), b(h);
230
- }, [b, e, d, s, P]), w = W(() => d === ne.DUAL_PAGE && s === re.PAGE_SCROLLING ? e === r - 1 : e === r, [e, r, d, s]), g = N(() => {
231
- if (w)
229
+ P(h) && (h = e - 2), w(h);
230
+ }, [w, e, d, s, P]), b = W(() => d === ee.DUAL_PAGE && s === ae.PAGE_SCROLLING ? e === r - 1 : e === r, [e, r, d, s]), g = O(() => {
231
+ if (b)
232
232
  return;
233
233
  let h = e + 1;
234
- P(h) && (h = e + 2), b(h);
235
- }, [b, e, P, d, s, w]);
234
+ P(h) && (h = e + 2), w(h);
235
+ }, [w, e, P, d, s, b]);
236
236
  return {
237
- focusedPage: C,
237
+ focusedPage: T,
238
238
  totalPages: r,
239
- setFocusedPage: T,
239
+ setFocusedPage: C,
240
240
  setTotalPages: o,
241
241
  nextPage: g,
242
242
  prevPage: y,
243
- goToPage: b
243
+ goToPage: w
244
244
  };
245
- }, In = Be({
245
+ }, In = je({
246
246
  focusedPage: 0,
247
247
  setFocusedPage: (t) => {
248
248
  },
@@ -254,14 +254,14 @@ const yn = () => {
254
254
  },
255
255
  nextPage: () => {
256
256
  }
257
- }), se = () => {
257
+ }), de = () => {
258
258
  const t = Ze(In);
259
- return typeof (t == null ? void 0 : t.focusedPage) > "u" && br.error("Please use this hooks inside children component of RPProvider"), t;
259
+ return typeof (t == null ? void 0 : t.focusedPage) > "u" && _r.error("Please use this hooks inside children component of RPProvider"), t;
260
260
  }, Tc = ({ children: t }) => {
261
- const { pdf: e } = oe(), { setCurrentPage: n } = Oo(), { focusedPage: r, totalPages: o, setFocusedPage: a, setTotalPages: c, goToPage: d, nextPage: s, prevPage: f } = qr();
262
- return A(() => {
261
+ const { pdf: e } = re(), { setCurrentPage: n } = Oo(), { focusedPage: r, totalPages: o, setFocusedPage: a, setTotalPages: c, goToPage: d, nextPage: s, prevPage: f } = qr();
262
+ return z(() => {
263
263
  e != null && e.numPages && (c(e.numPages), a(1));
264
- }, [e, c, a]), A(() => {
264
+ }, [e, c, a]), z(() => {
265
265
  n(r);
266
266
  }, [r, n]), /* @__PURE__ */ i(
267
267
  In.Provider,
@@ -279,20 +279,20 @@ const yn = () => {
279
279
  }
280
280
  );
281
281
  }, Br = () => {
282
- const { pdf: t, pages: e } = oe(), [n, r] = H({
282
+ const { pdf: t, pages: e } = re(), [n, r] = H({
283
283
  loadedPages: 0,
284
284
  totalPages: 0,
285
285
  percentage: 0
286
- }), [o, a] = H(!1), [c, d] = H(!1), [s, f] = H(null), [m, C] = H(void 0), u = M(!1);
287
- A(() => {
286
+ }), [o, a] = H(!1), [c, d] = H(!1), [s, f] = H(null), [m, T] = H(void 0), u = M(!1);
287
+ z(() => {
288
288
  u.current;
289
289
  }, [u]);
290
- const T = N(() => {
290
+ const C = O(() => {
291
291
  document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
292
292
  const l = document.querySelector(".rp-print-zone");
293
293
  l && l.remove();
294
- }, []), b = N(() => {
295
- u.current = !1, a(!1), d(!1), f(null), C(void 0), r({
294
+ }, []), w = O(() => {
295
+ u.current = !1, a(!1), d(!1), f(null), T(void 0), r({
296
296
  loadedPages: 0,
297
297
  totalPages: 0,
298
298
  percentage: 0
@@ -304,138 +304,138 @@ const yn = () => {
304
304
  pdfDocument: v,
305
305
  pageNumber: _,
306
306
  viewerPdfPage: I,
307
- printResolution: S,
308
- optionalContentConfigPromise: x,
307
+ printResolution: x,
308
+ optionalContentConfigPromise: S,
309
309
  printAnnotationStoragePromise: R
310
310
  }) => {
311
311
  if (u.current) {
312
- b();
312
+ w();
313
313
  return;
314
314
  }
315
- const O = S / Fo.PDF;
316
- l.width = Math.floor(I.width * O), l.height = Math.floor(I.height * O);
317
- const D = l.getContext("2d");
318
- D.save(), D.fillStyle = "rgb(255, 255, 255)", D.fillRect(0, 0, l.width, l.height), D.restore();
319
- const [z, E] = await Promise.all([
315
+ const N = x / Fo.PDF;
316
+ l.width = Math.floor(I.width * N), l.height = Math.floor(I.height * N);
317
+ const A = l.getContext("2d");
318
+ A.save(), A.fillStyle = "rgb(255, 255, 255)", A.fillRect(0, 0, l.width, l.height), A.restore();
319
+ const [F, D] = await Promise.all([
320
320
  v.getPage(_),
321
321
  R
322
322
  ]);
323
323
  if (u.current) {
324
- b();
324
+ w();
325
325
  return;
326
326
  }
327
327
  const L = {
328
- canvasContext: D,
329
- transform: [O, 0, 0, O, 0, 0],
330
- viewport: z.getViewport({ scale: 1, rotation: I.rotation }),
328
+ canvasContext: A,
329
+ transform: [N, 0, 0, N, 0, 0],
330
+ viewport: F.getViewport({ scale: 1, rotation: I.rotation }),
331
331
  intent: "print",
332
332
  annotationMode: ko.ENABLE_STORAGE,
333
- optionalContentConfigPromise: x,
334
- printAnnotationStorage: E
333
+ optionalContentConfigPromise: S,
334
+ printAnnotationStorage: D
335
335
  };
336
336
  try {
337
- return z.render(L).promise;
338
- } catch (F) {
339
- throw F instanceof Mo || console.error(F), F;
337
+ return F.render(L).promise;
338
+ } catch (E) {
339
+ throw E instanceof Mo || console.error(E), E;
340
340
  }
341
- }, w = N(() => {
341
+ }, b = O(() => {
342
342
  const l = window.print;
343
343
  return new Promise((v) => {
344
- const _ = (x) => {
344
+ const _ = (S) => {
345
345
  setTimeout(() => {
346
- l.call(window), setTimeout(() => x(), 20);
346
+ l.call(window), setTimeout(() => S(), 20);
347
347
  }, 0);
348
348
  };
349
349
  if (document.querySelector(".rp-print-zone")) {
350
350
  _(v);
351
351
  return;
352
352
  }
353
- const S = new MutationObserver(() => {
354
- document.querySelector(".rp-print-zone") && (_(v), S.disconnect());
353
+ const x = new MutationObserver(() => {
354
+ document.querySelector(".rp-print-zone") && (_(v), x.disconnect());
355
355
  });
356
- S.observe(document.body, { childList: !0, subtree: !0 });
356
+ x.observe(document.body, { childList: !0, subtree: !0 });
357
357
  });
358
358
  }, []), g = async (l) => {
359
359
  const v = document.createElement("img"), _ = document.createElement("div");
360
- return _.classList.add("rp-print-page"), await new Promise((I, S) => {
361
- l.toBlob((x) => {
362
- x ? (v.src = URL.createObjectURL(x), v.onload = () => {
360
+ return _.classList.add("rp-print-page"), await new Promise((I, x) => {
361
+ l.toBlob((S) => {
362
+ S ? (v.src = URL.createObjectURL(S), v.onload = () => {
363
363
  URL.revokeObjectURL(v.src), I();
364
- }, v.onerror = S) : S(new Error("Failed to create blob"));
364
+ }, v.onerror = x) : x(new Error("Failed to create blob"));
365
365
  });
366
366
  }).catch(() => {
367
367
  }), _.appendChild(v), _;
368
368
  }, h = (l, v) => {
369
369
  const _ = document.createElement("div");
370
370
  _.classList.add("rp-print-zone");
371
- const I = document.createElement("style"), S = v.get(1);
372
- if (S) {
373
- const { width: x, height: R } = S == null ? void 0 : S.page.getViewport({ scale: 1 });
374
- I.innerHTML = `@page { size: ${x}px ${R}px }`;
371
+ const I = document.createElement("style"), x = v.get(1);
372
+ if (x) {
373
+ const { width: S, height: R } = x == null ? void 0 : x.page.getViewport({ scale: 1 });
374
+ I.innerHTML = `@page { size: ${S}px ${R}px }`;
375
375
  }
376
376
  return _.appendChild(I), _.append(...l), _;
377
- }, p = N(
377
+ }, p = O(
378
378
  async (l) => {
379
379
  if (!t)
380
380
  return;
381
- b();
381
+ w();
382
382
  const v = l && "visibleDefaultProgress" in l ? l : void 0;
383
- (v == null ? void 0 : v.visibleDefaultProgress) !== void 0 ? C(v.visibleDefaultProgress) : C(!0);
383
+ (v == null ? void 0 : v.visibleDefaultProgress) !== void 0 ? T(v.visibleDefaultProgress) : T(!0);
384
384
  const _ = document.createElement("canvas"), I = [];
385
385
  try {
386
386
  t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
387
- const x = t.getOptionalContentConfig({ intent: "print" }), R = Promise.resolve(
387
+ const S = t.getOptionalContentConfig({ intent: "print" }), R = Promise.resolve(
388
388
  t.annotationStorage.print ?? void 0
389
- ), O = e.size;
390
- for (const [z, E] of e) {
389
+ ), N = e.size;
390
+ for (const [F, D] of e) {
391
391
  if (u.current) {
392
- b();
392
+ w();
393
393
  return;
394
394
  }
395
- const L = E.page.getViewport({ scale: 1 });
395
+ const L = D.page.getViewport({ scale: 1 });
396
396
  if (await y({
397
397
  scratchCanvas: _,
398
398
  pdfDocument: t,
399
- pageNumber: z,
399
+ pageNumber: F,
400
400
  viewerPdfPage: L,
401
401
  printResolution: 150,
402
- optionalContentConfigPromise: x,
402
+ optionalContentConfigPromise: S,
403
403
  printAnnotationStoragePromise: R
404
404
  }), u.current) {
405
- b();
405
+ w();
406
406
  return;
407
407
  }
408
- const F = await g(_);
409
- I.push(F);
410
- const G = parseFloat((I.length / O * 100).toFixed(2));
408
+ const E = await g(_);
409
+ I.push(E);
410
+ const U = parseFloat((I.length / N * 100).toFixed(2));
411
411
  r({
412
- loadedPages: z,
413
- totalPages: O,
414
- percentage: G
412
+ loadedPages: F,
413
+ totalPages: N,
414
+ percentage: U
415
415
  });
416
416
  }
417
417
  if (u.current) {
418
- b();
418
+ w();
419
419
  return;
420
420
  }
421
- const D = h(I, e);
422
- document.body.appendChild(D), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await w();
423
- } catch (S) {
424
- d(!0), S instanceof Error && f(S);
421
+ const A = h(I, e);
422
+ document.body.appendChild(A), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await b();
423
+ } catch (x) {
424
+ d(!0), x instanceof Error && f(x);
425
425
  } finally {
426
426
  _.height = 0, _.width = 0;
427
427
  }
428
428
  },
429
- [t, e, u, b, h, w]
429
+ [t, e, u, w, h, b]
430
430
  );
431
- return A(() => {
431
+ return z(() => {
432
432
  const l = () => {
433
- b(), T();
433
+ w(), C();
434
434
  };
435
435
  return window.addEventListener("afterprint", l, !0), () => {
436
436
  window.removeEventListener("afterprint", l, !0);
437
437
  };
438
- }, [T, b]), {
438
+ }, [C, w]), {
439
439
  print: p,
440
440
  cancel: P,
441
441
  progress: n,
@@ -444,7 +444,7 @@ const yn = () => {
444
444
  error: s,
445
445
  showDefaultProgress: m
446
446
  };
447
- }, xn = Be({
447
+ }, xn = je({
448
448
  print: async () => {
449
449
  },
450
450
  cancel: () => {
@@ -462,23 +462,23 @@ const yn = () => {
462
462
  }
463
463
  }
464
464
  }), Cc = ({ children: t }) => {
465
- const [e, n] = H(null), [r, o] = H(null), { print: a, cancel: c, progress: d, isComplete: s, isError: f, error: m, showDefaultProgress: C } = Br(), u = N((w) => {
466
- w && typeof w == "function" && o(() => w);
467
- }, []), T = (w) => {
468
- m && w(m);
469
- }, b = N(
470
- (w) => {
471
- n(() => w);
465
+ const [e, n] = H(null), [r, o] = H(null), { print: a, cancel: c, progress: d, isComplete: s, isError: f, error: m, showDefaultProgress: T } = Br(), u = O((b) => {
466
+ b && typeof b == "function" && o(() => b);
467
+ }, []), C = (b) => {
468
+ m && b(m);
469
+ }, w = O(
470
+ (b) => {
471
+ n(() => b);
472
472
  },
473
473
  [d, e]
474
474
  );
475
- A(() => {
475
+ z(() => {
476
476
  s && r && P();
477
- }, [s, r]), A(() => {
478
- f && T((w) => {
479
- console.error(w);
477
+ }, [s, r]), z(() => {
478
+ f && C((b) => {
479
+ console.error(b);
480
480
  });
481
- }, [f]), A(() => {
481
+ }, [f]), z(() => {
482
482
  d && e && e(d);
483
483
  }, [d, e]);
484
484
  const P = () => {
@@ -486,41 +486,41 @@ const yn = () => {
486
486
  }, y = {
487
487
  print: a,
488
488
  cancel: c,
489
- setOnProgress: b,
489
+ setOnProgress: w,
490
490
  setOnComplete: u,
491
- setOnError: T,
491
+ setOnError: C,
492
492
  progress: d,
493
- showDefaultProgress: C
493
+ showDefaultProgress: T
494
494
  };
495
495
  return /* @__PURE__ */ i(xn.Provider, { value: y, children: t });
496
- }, st = () => {
496
+ }, ct = () => {
497
497
  const t = Ze(xn);
498
498
  if (!t)
499
499
  throw new Error("usePrintContext must be used within a PrintProvider");
500
500
  return t;
501
- }, Zr = () => {
502
- const [t, e] = H({}), { pages: n } = oe(), r = W(() => Object.keys(t).length, [t]), o = N(
501
+ }, jr = () => {
502
+ const [t, e] = H({}), { pages: n } = re(), r = W(() => Object.keys(t).length, [t]), o = O(
503
503
  (c) => {
504
504
  if (!n.size)
505
505
  return;
506
506
  const d = c > n.size ? n.size : c, f = Array.from(n.values()).slice(0, d).map((m) => {
507
- const { thumbnailViewport: C, scale: u } = wr(m.page, m.defaultRotation);
507
+ const { thumbnailViewport: T, scale: u } = wr(m.page, m.defaultRotation);
508
508
  return {
509
509
  scale: u,
510
510
  page: m.page,
511
511
  loading: !0,
512
- viewport: C,
512
+ viewport: T,
513
513
  defaultRotation: m.defaultRotation
514
514
  };
515
- }).reduce((m, C) => (m[C.page.pageNumber] = C, m), {});
515
+ }).reduce((m, T) => (m[T.page.pageNumber] = T, m), {});
516
516
  e(f);
517
517
  },
518
518
  [n]
519
519
  );
520
- A(() => {
520
+ z(() => {
521
521
  o(10);
522
522
  }, [o]);
523
- const a = N(
523
+ const a = O(
524
524
  (c) => {
525
525
  if (!n)
526
526
  return;
@@ -539,7 +539,7 @@ const yn = () => {
539
539
  [n]
540
540
  );
541
541
  return { thumbnailPages: t, addPage: a, addToPage: o, thumbnailLength: r };
542
- }, Sn = Be({
542
+ }, Sn = je({
543
543
  thumbnailPages: {},
544
544
  addPage: (t) => {
545
545
  },
@@ -553,7 +553,7 @@ const yn = () => {
553
553
  children: t,
554
554
  initialThumbnailsVisible: e
555
555
  }) => {
556
- const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a } = Zr(), [c, d] = H(e);
556
+ const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a } = jr(), [c, d] = H(e);
557
557
  return /* @__PURE__ */ i(
558
558
  Sn.Provider,
559
559
  {
@@ -561,114 +561,128 @@ const yn = () => {
561
561
  children: t
562
562
  }
563
563
  );
564
- }, jr = (t = {}, e = "") => {
565
- const [n, r] = H(e), [o, a] = H(!1), { pdf: c, pages: d } = oe(), { widths: s, heights: f } = je(), m = M(!n), { currentZoom: C } = ot(), [u, T] = H([]), { setFocusedPage: b } = se(), { columnCount: P } = $e(), { pageRotate: y } = it(), [w, g] = H(0), { pageScrollElementRef: h, virtualScrollableElementRef: p } = rt(), { scrollMode: l } = Ae(), { pagesRef: v } = Te(), _ = M({}), I = M(0), S = W(() => w === 0 ? null : u[w - 1], [w, u]), x = W(() => u.length, [u]), R = N(
566
- (E) => {
567
- if (E === 0)
564
+ }, Zr = (t = {}, e = "") => {
565
+ const [n, r] = H(e), [o, a] = H(!1), { pdf: c, pages: d } = re(), { widths: s, heights: f } = Ke(), m = M(!n), { currentZoom: T } = rt(), [u, C] = H([]), { setFocusedPage: w } = de(), { columnCount: P, viewMode: y } = Ge(), { pageRotate: b } = at(), [g, h] = H(0), { pageScrollElementRef: p, virtualScrollableElementRef: l } = it(), { scrollMode: v } = Ae(), { pagesRef: _ } = Ce(), I = M({}), x = M(0), S = W(() => g === 0 ? null : u[g - 1], [g, u]), R = W(() => u.length, [u]), N = O(
566
+ (L) => {
567
+ if (L === 0)
568
568
  return;
569
- const L = u[E - 1];
570
- if (!L || !d)
569
+ const E = u[L - 1];
570
+ if (!E || !d)
571
571
  return;
572
- const F = p || h;
573
- if (!F || !v)
572
+ const U = l || p;
573
+ if (!U || !_)
574
574
  return;
575
- const G = d.get(L.page);
576
- if (l === re.PAGE_SCROLLING && b(L.page), !G)
575
+ const V = d.get(E.page);
576
+ if (v === ae.PAGE_SCROLLING && w(E.page), !V)
577
577
  return;
578
- let U = 0, V = 0;
579
- if (l === re.VERTICAL_SCROLLING) {
580
- const ee = L.page - 1, Q = P, he = ee % Q, ge = Math.floor(ee / Q);
581
- U = ke(f, ge), V = ke(s, he);
578
+ let $ = 0, q = 0;
579
+ if (v === ae.VERTICAL_SCROLLING) {
580
+ const Q = E.page - 1, ie = P;
581
+ let se, ce;
582
+ if (y === ee.DUAL_PAGE_WITH_COVER)
583
+ if (E.page === 1)
584
+ se = 0, ce = 0;
585
+ else {
586
+ const ze = E.page - 2;
587
+ se = ze % 2, ce = Math.floor(ze / 2) + 1;
588
+ }
589
+ else
590
+ se = Q % ie, ce = Math.floor(Q / ie);
591
+ $ = Me(f, ce), q = Me(s, se);
582
592
  }
583
- l === re.HORIZONTAL_SCROLLING && (V = s.slice(0, L.page - 1).reduce((ee, Q) => ee + Q, 0));
584
- const B = {
585
- height: f[L.page - 1],
586
- width: s[L.page - 1]
587
- }, Z = y[L.page], { leftInPage: ie, topInPage: $ } = vr(
588
- B,
589
- v,
590
- L.rect,
591
- C,
592
- Z
593
- ), Y = V + ie, J = U + $, pe = {
594
- left: Math.max(Y, 0),
595
- top: Math.max(J, 0)
593
+ v === ae.HORIZONTAL_SCROLLING && (q = s.slice(0, E.page - 1).reduce((Q, ie) => Q + ie, 0));
594
+ const j = {
595
+ height: f[E.page - 1],
596
+ width: s[E.page - 1]
597
+ }, te = b[E.page], { leftInPage: G, topInPage: Y } = vr(
598
+ j,
599
+ _,
600
+ E.rect,
601
+ T,
602
+ te
603
+ ), J = q + G, me = $ + Y, ne = {
604
+ left: Math.max(J, 0),
605
+ top: Math.max(me, 0)
596
606
  };
597
- F.scrollTo({
598
- ...pe,
607
+ U.scrollTo({
608
+ ...ne,
599
609
  behavior: "smooth"
600
610
  });
601
611
  },
602
612
  [
603
613
  d,
604
- b,
614
+ w,
605
615
  s,
606
616
  f,
617
+ v,
618
+ y,
619
+ P,
607
620
  l,
608
621
  p,
609
- h,
610
- v,
611
- u
622
+ _,
623
+ u,
624
+ T,
625
+ b
612
626
  ]
613
627
  );
614
- A(() => {
615
- w && R(w);
616
- }, [w]);
617
- const O = N(() => {
618
- g((E) => {
619
- let L;
620
- return x ? E + 1 > x ? L = 1 : L = E + 1 : L = 0, I.current = L, L;
621
- }), I.current === 1 && R(I.current);
622
- }, [x, R]), D = N(() => {
623
- g((E) => {
624
- let L;
625
- return x ? E - 1 <= 0 ? L = x : L = E - 1 : L = 0, I.current = L, L;
626
- }), I.current === 1 && R(I.current);
627
- }, [x, R]), z = N(async (E) => {
628
- if (!E)
628
+ z(() => {
629
+ g && N(g);
630
+ }, [g]);
631
+ const A = O(() => {
632
+ h((L) => {
633
+ let E;
634
+ return R ? L + 1 > R ? E = 1 : E = L + 1 : E = 0, x.current = E, E;
635
+ }), x.current === 1 && N(x.current);
636
+ }, [R, N]), F = O(() => {
637
+ h((L) => {
638
+ let E;
639
+ return R ? L - 1 <= 0 ? E = R : E = L - 1 : E = 0, x.current = E, E;
640
+ }), x.current === 1 && N(x.current);
641
+ }, [R, N]), D = O(async (L) => {
642
+ if (!L)
629
643
  return {};
630
- const L = E.numPages, F = {};
631
- for (let G = 1; G <= L; G++) {
644
+ const E = L.numPages, U = {};
645
+ for (let V = 1; V <= E; V++) {
632
646
  if (m.current)
633
647
  throw "close pop over";
634
- const U = await E.getPage(G);
635
- F[G.toString()] = await U.getTextContent();
648
+ const $ = await L.getPage(V);
649
+ U[V.toString()] = await $.getTextContent();
636
650
  }
637
- return F;
651
+ return U;
638
652
  }, []);
639
- return A(() => {
653
+ return z(() => {
640
654
  if (!n) {
641
- m.current = !0, T([]), g(0);
655
+ m.current = !0, C([]), h(0);
642
656
  return;
643
657
  }
644
- m.current = !1, a(!0), T([]), g(0), z(c).then((E) => {
645
- _.current = E;
646
- const F = Object.keys(E).reduce((G, U) => {
647
- const V = yo(
658
+ m.current = !1, a(!0), C([]), h(0), D(c).then((L) => {
659
+ I.current = L;
660
+ const U = Object.keys(L).reduce((V, $) => {
661
+ const q = yo(
648
662
  [n],
649
- E[U],
650
- Number(U) - 1,
663
+ L[$],
664
+ Number($) - 1,
651
665
  t
652
- ).map((B, Z) => ({ ...B, page: Number(U), pageMatchIdx: Z }));
653
- return [...G, ...V];
666
+ ).map((j, te) => ({ ...j, page: Number($), pageMatchIdx: te }));
667
+ return [...V, ...q];
654
668
  }, []);
655
- T(F), g(F.length ? 1 : 0);
669
+ C(U), h(U.length ? 1 : 0);
656
670
  }).catch(() => {
657
- T([]), g(0);
671
+ C([]), h(0);
658
672
  }).finally(() => a(!1));
659
- }, [n, z, c, t]), {
673
+ }, [n, D, c, t]), {
660
674
  search: n,
661
675
  setSearch: r,
662
676
  loading: o,
663
677
  matches: u,
664
- totalMatches: x,
665
- currentMatchPosition: w,
678
+ totalMatches: R,
679
+ currentMatchPosition: g,
666
680
  currentMatch: S,
667
- nextMatch: O,
668
- prevMatch: D,
669
- setCurrentMatchPosition: g
681
+ nextMatch: A,
682
+ prevMatch: F,
683
+ setCurrentMatchPosition: h
670
684
  };
671
- }, Ln = Be({
685
+ }, Ln = je({
672
686
  search: "",
673
687
  setSearch: (t) => {
674
688
  },
@@ -696,10 +710,10 @@ const yn = () => {
696
710
  currentMatch: s,
697
711
  search: f,
698
712
  matches: m,
699
- nextMatch: C,
713
+ nextMatch: T,
700
714
  prevMatch: u,
701
- setCurrentMatchPosition: T
702
- } = jr(n, e);
715
+ setCurrentMatchPosition: C
716
+ } = Zr(n, e);
703
717
  return /* @__PURE__ */ i(
704
718
  Ln.Provider,
705
719
  {
@@ -711,19 +725,19 @@ const yn = () => {
711
725
  totalMatches: c,
712
726
  currentMatchPosition: d,
713
727
  currentMatch: s,
714
- nextMatch: C,
728
+ nextMatch: T,
715
729
  prevMatch: u,
716
730
  search: f,
717
731
  matches: m,
718
- setCurrentMatchPosition: T
732
+ setCurrentMatchPosition: C
719
733
  },
720
734
  children: t
721
735
  }
722
736
  );
723
- }, At = () => Ze(Ln), En = Be(null), xc = ({ children: t }) => {
724
- const e = M(!1), [n, r] = H([]), o = N((s) => {
737
+ }, At = () => Ze(Ln), En = je(null), xc = ({ children: t }) => {
738
+ const e = M(!1), [n, r] = H([]), o = O((s) => {
725
739
  r((f) => [...f, { id: s.page.pageNumber.toString(), data: s, priority: 0 }]);
726
- }, []), a = W(() => new Eo(o), [o]), { focusedPage: c } = se(), d = N((s) => (e.current = !0, No(
740
+ }, []), a = W(() => new Eo(o), [o]), { focusedPage: c } = de(), d = O((s) => (e.current = !0, No(
727
741
  s.data.page,
728
742
  s.data.canvasElem,
729
743
  s.data.options
@@ -732,9 +746,9 @@ const yn = () => {
732
746
  }).finally(() => {
733
747
  s.data.onLoaded && s.data.onLoaded();
734
748
  })), []);
735
- return A(() => {
749
+ return z(() => {
736
750
  c && (a.changePagePriority(`^page-${c}`, 0), a.changePagePriority(`^thumbnail-${c}`, 1));
737
- }, [c]), A(() => {
751
+ }, [c]), z(() => {
738
752
  if (a.isEmpty() || e.current)
739
753
  return;
740
754
  const s = () => {
@@ -750,7 +764,7 @@ const yn = () => {
750
764
  if (!t)
751
765
  throw new Error("RenderQueue not found");
752
766
  return t;
753
- }, ce = {
767
+ }, ue = {
754
768
  "rp-pages": "_rp-pages_u7m2r_1",
755
769
  "rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_u7m2r_6",
756
770
  "rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_u7m2r_11",
@@ -766,20 +780,20 @@ const yn = () => {
766
780
  "rp-page": "_rp-page_ii91u_1",
767
781
  "rp-loader-wrapper": "_rp-loader-wrapper_ii91u_15"
768
782
  }, Kr = (t) => {
769
- const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = M(null), { pages: a } = oe(), { pageRotate: c } = it(), d = M(), { currentZoom: s } = ot(), { interactiveForm: f } = xt(), m = Nn(), C = M(`page-${e}`);
770
- return A(() => {
783
+ const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = M(null), { pages: a } = re(), { pageRotate: c } = at(), d = M(), { currentZoom: s } = rt(), { interactiveForm: f } = xt(), m = Nn(), T = M(`page-${e}`);
784
+ return z(() => {
771
785
  if (!a || s === 0)
772
786
  return;
773
787
  const u = a.get(e);
774
788
  if (o.current && u) {
775
- const T = o.current;
776
- T.hidden = !0;
777
- const b = d.current;
778
- b && b.cancel(), r && r(), m.enqueue(
779
- C.current,
789
+ const C = o.current;
790
+ C.hidden = !0;
791
+ const w = d.current;
792
+ w && w.cancel(), r && r(), m.enqueue(
793
+ T.current,
780
794
  {
781
795
  page: u.page,
782
- canvasElem: T,
796
+ canvasElem: C,
783
797
  options: {
784
798
  scale: s,
785
799
  rotate: c[e],
@@ -792,60 +806,60 @@ const yn = () => {
792
806
  );
793
807
  }
794
808
  return () => {
795
- m.removeQueue(C.current);
809
+ m.removeQueue(T.current);
796
810
  };
797
811
  }, [a, e, c, s, r, n, m, f]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: o });
798
- }, Xr = "_selecting_1oep2_10", Qr = "_markedContent_1oep2_33", _e = {
812
+ }, Xr = "_selecting_1oep2_10", Qr = "_markedContent_1oep2_33", Pe = {
799
813
  "rp-text-layer": "_rp-text-layer_1oep2_1",
800
814
  selecting: Xr,
801
815
  markedContent: Qr,
802
816
  "rp-text-layer-text": "_rp-text-layer-text_1oep2_52"
803
817
  }, Yr = (t) => {
804
- const { pageNumber: e } = t, { pages: n } = oe(), r = M(null), { matches: o, currentMatch: a } = At(), [c, d] = H(
818
+ const { pageNumber: e } = t, { pages: n } = re(), r = M(null), { matches: o, currentMatch: a } = At(), [c, d] = H(
805
819
  []
806
- ), s = M(), f = M(), m = M([]), C = W(() => o.filter((g) => g.pageIndex === e - 1), [o, e]), u = N(
820
+ ), s = M(), f = M(), m = M([]), T = W(() => o.filter((g) => g.pageIndex === e - 1), [o, e]), u = O(
807
821
  (g, h, p = !1) => {
808
- if (p && Io(g, h), !C.length) {
822
+ if (p && Io(g, h), !T.length) {
809
823
  m.current = [], d([]);
810
824
  return;
811
825
  }
812
- const l = xo(C, g, h);
826
+ const l = xo(T, g, h);
813
827
  d(l);
814
828
  },
815
- [C]
816
- ), T = M(), b = M(!1), P = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
817
- A(() => ((() => {
818
- if (T.current)
829
+ [T]
830
+ ), C = M(), w = M(!1), P = O(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
831
+ z(() => ((() => {
832
+ if (C.current)
819
833
  return;
820
- T.current = new AbortController();
821
- const { signal: h } = T.current, p = () => {
834
+ C.current = new AbortController();
835
+ const { signal: h } = C.current, p = () => {
822
836
  P().forEach((v) => {
823
837
  const _ = v.querySelector(".endOfContent");
824
- _ && (v.appendChild(_), _.style.width = "", _.style.height = "", v.classList.remove(_e.selecting));
838
+ _ && (v.appendChild(_), _.style.width = "", _.style.height = "", v.classList.remove(Pe.selecting));
825
839
  });
826
840
  };
827
841
  document.addEventListener(
828
842
  "pointerdown",
829
843
  () => {
830
- b.current = !0;
844
+ w.current = !0;
831
845
  },
832
846
  { signal: h }
833
847
  ), document.addEventListener(
834
848
  "pointerup",
835
849
  () => {
836
- b.current = !1, p();
850
+ w.current = !1, p();
837
851
  },
838
852
  { signal: h }
839
853
  ), window.addEventListener(
840
854
  "blur",
841
855
  () => {
842
- b.current = !1, p();
856
+ w.current = !1, p();
843
857
  },
844
858
  { signal: h }
845
859
  ), document.addEventListener(
846
860
  "keyup",
847
861
  () => {
848
- b.current || p();
862
+ w.current || p();
849
863
  },
850
864
  { signal: h }
851
865
  );
@@ -853,7 +867,7 @@ const yn = () => {
853
867
  document.addEventListener(
854
868
  "selectionchange",
855
869
  () => {
856
- var D, z;
870
+ var A, F;
857
871
  const v = document.getSelection();
858
872
  if (!v)
859
873
  return;
@@ -862,45 +876,45 @@ const yn = () => {
862
876
  return;
863
877
  }
864
878
  const _ = /* @__PURE__ */ new Set();
865
- for (let E = 0; E < v.rangeCount; E++) {
866
- const L = v.getRangeAt(E);
867
- P().forEach((F) => {
868
- L.intersectsNode(F) && !_.has(F) && _.add(F);
879
+ for (let D = 0; D < v.rangeCount; D++) {
880
+ const L = v.getRangeAt(D);
881
+ P().forEach((E) => {
882
+ L.intersectsNode(E) && !_.has(E) && _.add(E);
869
883
  });
870
884
  }
871
- P().forEach((E) => {
872
- if (_.has(E))
873
- E.classList.add(_e.selecting);
885
+ P().forEach((D) => {
886
+ if (_.has(D))
887
+ D.classList.add(Pe.selecting);
874
888
  else {
875
- const L = E.querySelector(".endOfContent");
876
- L && (E.appendChild(L), L.style.width = "", L.style.height = "", E.classList.remove(_e.selecting));
889
+ const L = D.querySelector(".endOfContent");
890
+ L && (D.appendChild(L), L.style.width = "", L.style.height = "", D.classList.remove(Pe.selecting));
877
891
  }
878
892
  });
879
893
  const I = v.getRangeAt(0);
880
- let x = l && (I.compareBoundaryPoints(Range.END_TO_END, l) === 0 || I.compareBoundaryPoints(Range.START_TO_END, l) === 0) ? I.startContainer : I.endContainer;
881
- x.nodeType === Node.TEXT_NODE && (x = x.parentNode);
882
- const R = (D = x.parentElement) == null ? void 0 : D.closest(
883
- _e["rp-text-layer"]
884
- ), O = R == null ? void 0 : R.querySelector(".endOfContent");
885
- O && R && (O.style.width = R.style.width, O.style.height = R.style.height, (z = x.parentElement) == null || z.insertBefore(O, x.nextSibling)), l = I.cloneRange();
894
+ let S = l && (I.compareBoundaryPoints(Range.END_TO_END, l) === 0 || I.compareBoundaryPoints(Range.START_TO_END, l) === 0) ? I.startContainer : I.endContainer;
895
+ S.nodeType === Node.TEXT_NODE && (S = S.parentNode);
896
+ const R = (A = S.parentElement) == null ? void 0 : A.closest(
897
+ Pe["rp-text-layer"]
898
+ ), N = R == null ? void 0 : R.querySelector(".endOfContent");
899
+ N && R && (N.style.width = R.style.width, N.style.height = R.style.height, (F = S.parentElement) == null || F.insertBefore(N, S.nextSibling)), l = I.cloneRange();
886
900
  },
887
901
  { signal: h }
888
902
  );
889
903
  })(), () => {
890
904
  var h;
891
- (h = T.current) == null || h.abort(), T.current = void 0;
905
+ (h = C.current) == null || h.abort(), C.current = void 0;
892
906
  }), [P]);
893
- const y = N(() => {
894
- r.current && r.current.classList.add(_e.selecting);
895
- }, []), w = N(() => {
896
- r.current && r.current.classList.remove(_e.selecting);
907
+ const y = O(() => {
908
+ r.current && r.current.classList.add(Pe.selecting);
909
+ }, []), b = O(() => {
910
+ r.current && r.current.classList.remove(Pe.selecting);
897
911
  }, []);
898
- return A(() => {
912
+ return z(() => {
899
913
  if (m.current.forEach((p) => {
900
914
  p.classList.remove("selected");
901
915
  }), !c.length || !a || a.pageIndex !== e - 1)
902
916
  return;
903
- const g = C.findIndex(
917
+ const g = T.findIndex(
904
918
  (p) => JSON.stringify(p) === JSON.stringify(a)
905
919
  );
906
920
  if (g === -1)
@@ -909,7 +923,7 @@ const yn = () => {
909
923
  h.length && (m.current = h.map((p) => p.element), h.forEach((p) => {
910
924
  p.element.classList.add("selected");
911
925
  }));
912
- }, [a, c, C]), A(() => {
926
+ }, [a, c, T]), z(() => {
913
927
  const g = n.get(e);
914
928
  if (!g || !r.current)
915
929
  return;
@@ -923,8 +937,8 @@ const yn = () => {
923
937
  }), f.current = p, h && (h.innerText = ""), s.current.render();
924
938
  }).then(() => {
925
939
  var _, I;
926
- [].slice.call(h.children).forEach((S) => {
927
- S.classList.add(_e["rp-text-layer-text"]), S.setAttribute("data-rp", "rp-text-layer-text");
940
+ [].slice.call(h.children).forEach((x) => {
941
+ x.classList.add(Pe["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
928
942
  });
929
943
  const l = (_ = s.current) == null ? void 0 : _.textDivs;
930
944
  l && f.current && u(f.current, l);
@@ -935,10 +949,10 @@ const yn = () => {
935
949
  var p;
936
950
  (p = s.current) == null || p.cancel();
937
951
  };
938
- }, [n, e]), A(() => {
952
+ }, [n, e]), z(() => {
939
953
  var p;
940
954
  [].slice.call(r.current.children).forEach((l) => {
941
- l.classList.add(_e["rp-text-layer-text"]);
955
+ l.classList.add(Pe["rp-text-layer-text"]);
942
956
  });
943
957
  const h = (p = s.current) == null ? void 0 : p.textDivs;
944
958
  h && f.current && u(f.current, h, !0);
@@ -947,10 +961,10 @@ const yn = () => {
947
961
  {
948
962
  "data-rp-text-layer": !0,
949
963
  "data-rp": `page-${e}-textLayer`,
950
- className: _e["rp-text-layer"],
964
+ className: Pe["rp-text-layer"],
951
965
  ref: r,
952
966
  onMouseDown: y,
953
- onMouseUp: w
967
+ onMouseUp: b
954
968
  }
955
969
  );
956
970
  }, Jr = {
@@ -958,30 +972,30 @@ const yn = () => {
958
972
  };
959
973
  let ei = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
960
974
  const ti = (t) => {
961
- const { pageNumber: e } = t, n = M(null), { pages: r, pdf: o } = oe(), { interactiveForm: a } = xt(), c = M(), [d, s] = H(), { goToPage: f } = se(), { scrollMode: m } = Ae(), { print: C } = st(), { download: u } = Xn(), T = M(null), b = W(() => r.get(e), [r, e]), P = W(() => b == null ? void 0 : b.page.getViewport(), [b]);
962
- A(() => {
975
+ const { pageNumber: e } = t, n = M(null), { pages: r, pdf: o } = re(), { interactiveForm: a } = xt(), c = M(), [d, s] = H(), { goToPage: f } = de(), { scrollMode: m } = Ae(), { print: T } = ct(), { download: u } = Xn(), C = M(null), w = W(() => r.get(e), [r, e]), P = W(() => w == null ? void 0 : w.page.getViewport(), [w]);
976
+ z(() => {
963
977
  c.current && (c.current.div.replaceChildren(), c.current = void 0);
964
- }, [o]), A(() => {
965
- b && b.page.getAnnotations().then((w) => {
966
- c.current = void 0, s(w), n.current && (n.current.innerText = "");
978
+ }, [o]), z(() => {
979
+ w && w.page.getAnnotations().then((b) => {
980
+ c.current = void 0, s(b), n.current && (n.current.innerText = "");
967
981
  });
968
- }, [b]);
969
- const y = N(
970
- (w) => {
971
- !d || !o || (er(w), tr(w, o, d).then((g) => {
982
+ }, [w]);
983
+ const y = O(
984
+ (b) => {
985
+ !d || !o || (er(b), tr(b, o, d).then((g) => {
972
986
  var h, p;
973
- ((h = g == null ? void 0 : g.data) == null ? void 0 : h.action) === "Print" ? C() : ((p = g == null ? void 0 : g.data) == null ? void 0 : p.action) === "SaveAs" && u();
987
+ ((h = g == null ? void 0 : g.data) == null ? void 0 : h.action) === "Print" ? T() : ((p = g == null ? void 0 : g.data) == null ? void 0 : p.action) === "SaveAs" && u();
974
988
  }));
975
989
  },
976
- [o, d, m, C, u]
990
+ [o, d, m, T, u]
977
991
  );
978
- return A(() => {
979
- if (!b || !d)
992
+ return z(() => {
993
+ if (!w || !d)
980
994
  return;
981
- const w = b.page.getViewport();
995
+ const b = w.page.getViewport();
982
996
  if (c.current) {
983
997
  c.current.update({
984
- viewport: w.clone({ dontFlip: !0 })
998
+ viewport: b.clone({ dontFlip: !0 })
985
999
  });
986
1000
  return;
987
1001
  }
@@ -993,7 +1007,7 @@ const ti = (t) => {
993
1007
  or(l);
994
1008
  break;
995
1009
  case $t.Widget:
996
- nr(l, w, g);
1010
+ nr(l, b, g);
997
1011
  break;
998
1012
  }
999
1013
  }
@@ -1006,8 +1020,8 @@ const ti = (t) => {
1006
1020
  annotationCanvasMap: void 0,
1007
1021
  annotationEditorUIManager: void 0,
1008
1022
  structTreeLayer: null,
1009
- page: b.page,
1010
- viewport: w.clone({ dontFlip: !0 })
1023
+ page: w.page,
1024
+ viewport: b.clone({ dontFlip: !0 })
1011
1025
  }), n.current && Kt(n.current, y);
1012
1026
  const l = await (o == null ? void 0 : o.hasJSActions()), v = await (o == null ? void 0 : o.getFieldObjects());
1013
1027
  if (h.signal.aborted)
@@ -1018,8 +1032,8 @@ const ti = (t) => {
1018
1032
  hasJSActions: l,
1019
1033
  fieldObjects: v,
1020
1034
  div: n.current,
1021
- viewport: w.clone({ dontFlip: !0 }),
1022
- page: b.page,
1035
+ viewport: b.clone({ dontFlip: !0 }),
1036
+ page: w.page,
1023
1037
  imageResourcesPath: ei,
1024
1038
  renderForms: a ?? !0,
1025
1039
  linkService: new Jo(o, f),
@@ -1027,9 +1041,9 @@ const ti = (t) => {
1027
1041
  enableScripting: !1
1028
1042
  });
1029
1043
  })().then(() => {
1030
- n.current && (rr(n.current, y), Zt(n.current), jt(n.current), T.current && T.current.disconnect(), T.current = new MutationObserver(() => {
1031
- n.current && (Zt(n.current), jt(n.current));
1032
- }), T.current.observe(n.current, {
1044
+ n.current && (rr(n.current, y), jt(n.current), Zt(n.current), C.current && C.current.disconnect(), C.current = new MutationObserver(() => {
1045
+ n.current && (jt(n.current), Zt(n.current));
1046
+ }), C.current.observe(n.current, {
1033
1047
  childList: !0,
1034
1048
  subtree: !0,
1035
1049
  attributes: !0,
@@ -1041,7 +1055,7 @@ const ti = (t) => {
1041
1055
  }).finally(() => {
1042
1056
  c.current = void 0;
1043
1057
  }), () => {
1044
- h.abort("clear"), n.current && Kt(n.current, y), T.current && (T.current.disconnect(), T.current = null);
1058
+ h.abort("clear"), n.current && Kt(n.current, y), C.current && (C.current.disconnect(), C.current = null);
1045
1059
  };
1046
1060
  }, [o, d, y, f]), /* @__PURE__ */ i(
1047
1061
  "div",
@@ -1055,10 +1069,10 @@ const ti = (t) => {
1055
1069
  }, ni = {
1056
1070
  "rp-text-highlight": "_rp-text-highlight_jdkf8_1"
1057
1071
  }, oi = ({ pageNumber: t, viewport: e }) => {
1058
- const [n, r] = H(), { pages: o } = oe(), { highlightKeywords: a } = Ro(), c = !0, d = M(null), [s, f] = H(null), [m, C] = H([]);
1059
- A(() => {
1072
+ const [n, r] = H(), { pages: o } = re(), { highlightKeywords: a } = Ro(), c = !0, d = M(null), [s, f] = H(null), [m, T] = H([]);
1073
+ z(() => {
1060
1074
  d.current && f(d.current.parentElement);
1061
- }, [d]), A(() => {
1075
+ }, [d]), z(() => {
1062
1076
  (async () => {
1063
1077
  const h = o.get(t);
1064
1078
  if (!h || !d.current)
@@ -1074,7 +1088,7 @@ const ti = (t) => {
1074
1088
  color: g.highlightColor
1075
1089
  };
1076
1090
  }) : [], [a]);
1077
- function T(g, h) {
1091
+ function C(g, h) {
1078
1092
  if (!g)
1079
1093
  return;
1080
1094
  const p = `[data-rp="page-${h}-textLayer"]`;
@@ -1084,13 +1098,13 @@ const ti = (t) => {
1084
1098
  l(v);
1085
1099
  return;
1086
1100
  }
1087
- new MutationObserver((I, S) => {
1088
- const x = g.querySelector(p);
1089
- x && (l(x), S.disconnect());
1101
+ new MutationObserver((I, x) => {
1102
+ const S = g.querySelector(p);
1103
+ S && (l(S), x.disconnect());
1090
1104
  }).observe(g, { childList: !0, subtree: !0 });
1091
1105
  });
1092
1106
  }
1093
- function b(g) {
1107
+ function w(g) {
1094
1108
  return new Promise((h) => {
1095
1109
  const p = g.querySelectorAll(
1096
1110
  '[data-rp="rp-text-layer-text"]'
@@ -1108,39 +1122,39 @@ const ti = (t) => {
1108
1122
  });
1109
1123
  }
1110
1124
  const P = (g, h, p, l) => {
1111
- var V;
1125
+ var $;
1112
1126
  const v = document.createRange(), _ = p.firstChild;
1113
1127
  if (!_ || _.nodeType !== Node.TEXT_NODE)
1114
1128
  return null;
1115
- const I = ((V = _.textContent) == null ? void 0 : V.length) ?? 0, S = l[0].charIdxInSpan, x = l.length === 1 ? S : l[l.length - 1].charIdxInSpan;
1116
- if (S > I || x + 1 > I)
1129
+ const I = (($ = _.textContent) == null ? void 0 : $.length) ?? 0, x = l[0].charIdxInSpan, S = l.length === 1 ? x : l[l.length - 1].charIdxInSpan;
1130
+ if (x > I || S + 1 > I)
1117
1131
  return null;
1118
- v.setStart(_, S), v.setEnd(_, x + 1);
1132
+ v.setStart(_, x), v.setEnd(_, S + 1);
1119
1133
  const R = document.createElement("span");
1120
1134
  R.style.width = "auto", v.surroundContents(R);
1121
- const O = R.getBoundingClientRect(), D = g.getBoundingClientRect(), z = D.height, E = D.width, L = 100 * (O.left - D.left) / E, F = 100 * (O.top - D.top) / z, G = 100 * O.height / z, U = 100 * O.width / E;
1135
+ const N = R.getBoundingClientRect(), A = g.getBoundingClientRect(), F = A.height, D = A.width, L = 100 * (N.left - A.left) / D, E = 100 * (N.top - A.top) / F, U = 100 * N.height / F, V = 100 * N.width / D;
1122
1136
  return sr(R), {
1123
1137
  keywordStr: h,
1124
1138
  left: L,
1125
- top: F,
1126
- height: G,
1127
- width: U,
1128
- pageHeight: z,
1129
- pageWidth: E
1139
+ top: E,
1140
+ height: U,
1141
+ width: V,
1142
+ pageHeight: F,
1143
+ pageWidth: D
1130
1144
  };
1131
1145
  };
1132
1146
  async function y(g, h) {
1133
- const p = await T(s, g);
1147
+ const p = await C(s, g);
1134
1148
  if (!p)
1135
1149
  return;
1136
- const l = await b(p);
1150
+ const l = await w(p);
1137
1151
  if (l.length) {
1138
1152
  const v = l.map((I) => I.tagName === "BR" ? " " : I.textContent).reduce(
1139
- (I, S, x) => I.concat(
1140
- S.split("").map((R, O) => ({
1153
+ (I, x, S) => I.concat(
1154
+ x.split("").map((R, N) => ({
1141
1155
  char: R,
1142
- charIdxInSpan: O,
1143
- spanIdx: x
1156
+ charIdxInSpan: N,
1157
+ spanIdx: S
1144
1158
  }))
1145
1159
  ),
1146
1160
  [
@@ -1150,60 +1164,60 @@ const ti = (t) => {
1150
1164
  spanIdx: 0
1151
1165
  }
1152
1166
  ]
1153
- ).slice(1), _ = w(p, h, l, v);
1154
- C(_);
1167
+ ).slice(1), _ = b(p, h, l, v);
1168
+ T(_);
1155
1169
  }
1156
1170
  }
1157
- const w = (g, h, p, l) => {
1171
+ const b = (g, h, p, l) => {
1158
1172
  const v = h.length;
1159
1173
  if (!l.length || !v)
1160
1174
  return [];
1161
- const _ = [], I = l.map((S) => S.char).join("");
1162
- return u.forEach((S) => {
1163
- const { keyword: x, regExp: R, wholeWords: O, color: D } = S, z = x;
1164
- if (!z.trim())
1175
+ const _ = [], I = l.map((x) => x.char).join("");
1176
+ return u.forEach((x) => {
1177
+ const { keyword: S, regExp: R, wholeWords: N, color: A } = x, F = S;
1178
+ if (!F.trim())
1165
1179
  return;
1166
- const E = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
1180
+ const D = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
1167
1181
  let L;
1168
- const F = [];
1169
- for (; (L = E.exec(I)) !== null; )
1170
- O && !So(I, L.index, L[0].length) || F.push({
1171
- keyword: E,
1182
+ const E = [];
1183
+ for (; (L = D.exec(I)) !== null; )
1184
+ N && !So(I, L.index, L[0].length) || E.push({
1185
+ keyword: D,
1172
1186
  startIndex: L.index,
1173
- endIndex: E.lastIndex
1187
+ endIndex: D.lastIndex
1174
1188
  });
1175
- const G = F.map((U) => ({
1176
- keyword: U.keyword,
1177
- indexes: l.slice(U.startIndex, U.endIndex),
1178
- color: D
1189
+ const U = E.map((V) => ({
1190
+ keyword: V.keyword,
1191
+ indexes: l.slice(V.startIndex, V.endIndex),
1192
+ color: A
1179
1193
  }));
1180
- for (const U of G) {
1181
- const V = U.indexes.reduce(
1182
- (B, Z) => (B[Z.spanIdx] = (B[Z.spanIdx] || []).concat([Z]), B),
1194
+ for (const V of U) {
1195
+ const $ = V.indexes.reduce(
1196
+ (q, j) => (q[j.spanIdx] = (q[j.spanIdx] || []).concat([j]), q),
1183
1197
  {}
1184
1198
  );
1185
- for (const B of Object.values(V))
1186
- if (B.length !== 1 || B[0].char.trim() !== "") {
1187
- const Z = B, ie = p[Z[0].spanIdx], $ = P(
1199
+ for (const q of Object.values($))
1200
+ if (q.length !== 1 || q[0].char.trim() !== "") {
1201
+ const j = q, te = p[j[0].spanIdx], G = P(
1188
1202
  g,
1189
- z,
1190
- ie,
1191
- Z
1203
+ F,
1204
+ te,
1205
+ j
1192
1206
  );
1193
- if ($) {
1194
- const { left: Y, top: J } = $;
1195
- if (_.find((ee) => ee.left === Y && ee.top === J))
1207
+ if (G) {
1208
+ const { left: Y, top: J } = G;
1209
+ if (_.find((ne) => ne.left === Y && ne.top === J))
1196
1210
  continue;
1197
- _.push({ ...$, highlightColor: U.color });
1211
+ _.push({ ...G, highlightColor: V.color });
1198
1212
  }
1199
1213
  }
1200
1214
  }
1201
1215
  }), _.sort(ar), _;
1202
1216
  };
1203
- return A(() => {
1217
+ return z(() => {
1204
1218
  (async () => {
1205
1219
  if (!a || a.length === 0) {
1206
- C([]);
1220
+ T([]);
1207
1221
  return;
1208
1222
  }
1209
1223
  try {
@@ -1212,7 +1226,7 @@ const ti = (t) => {
1212
1226
  console.error(h);
1213
1227
  }
1214
1228
  })();
1215
- }, [c, a, t, n, e]), /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i("div", { ref: d, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((g, h) => /* @__PURE__ */ i(
1229
+ }, [c, a, t, n, e]), /* @__PURE__ */ i(ge, { children: /* @__PURE__ */ i("div", { ref: d, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((g, h) => /* @__PURE__ */ i(
1216
1230
  "div",
1217
1231
  {
1218
1232
  className: ni["rp-text-highlight"],
@@ -1226,14 +1240,14 @@ const ti = (t) => {
1226
1240
  },
1227
1241
  h
1228
1242
  )) }) });
1229
- }, He = at((t, e) => {
1230
- const { pageNumber: n, style: r, ...o } = t, { pages: a } = oe(), { pageRotate: c } = it(), { textLayer: d } = Po(), { currentZoom: s } = ot(), { LoaderImageComponent: f } = St(), m = M(a.get(n)), [C, u] = H(!1), T = M(null), [b, P] = H({
1243
+ }, $e = st((t, e) => {
1244
+ const { pageNumber: n, style: r, ...o } = t, { pages: a } = re(), { pageRotate: c } = at(), { textLayer: d } = Po(), { currentZoom: s } = rt(), { LoaderImageComponent: f } = St(), m = M(a.get(n)), [T, u] = H(!1), C = M(null), [w, P] = H({
1231
1245
  width: 0,
1232
1246
  height: 0
1233
1247
  });
1234
- mn(e, () => T.current);
1248
+ mn(e, () => C.current);
1235
1249
  const y = W(() => m.current ? c[n] : 0, [n, c]);
1236
- A(() => {
1250
+ z(() => {
1237
1251
  if (a && (m.current = a.get(n), m.current)) {
1238
1252
  const p = m.current.page.getViewport({
1239
1253
  scale: s,
@@ -1242,32 +1256,32 @@ const ti = (t) => {
1242
1256
  P(p);
1243
1257
  }
1244
1258
  }, [a, n, y, s]);
1245
- const w = W(() => {
1259
+ const b = W(() => {
1246
1260
  switch (y) {
1247
1261
  case 90:
1248
- return `${b.width / 2}px ${b.width / 2}px`;
1262
+ return `${w.width / 2}px ${w.width / 2}px`;
1249
1263
  case -90:
1250
1264
  case 270:
1251
- return `${b.height / 2}px ${b.height / 2}px`;
1265
+ return `${w.height / 2}px ${w.height / 2}px`;
1252
1266
  default:
1253
1267
  return "center";
1254
1268
  }
1255
- }, [y, b]), g = N(() => {
1269
+ }, [y, w]), g = O(() => {
1256
1270
  u(!0);
1257
- }, []), h = N(() => {
1271
+ }, []), h = O(() => {
1258
1272
  u(!1);
1259
1273
  }, []);
1260
1274
  return /* @__PURE__ */ i(
1261
1275
  "div",
1262
1276
  {
1263
- ref: T,
1277
+ ref: C,
1264
1278
  id: `page-${n}`,
1265
1279
  "data-rp": `page-${n}`,
1266
1280
  ...o,
1267
1281
  style: {
1268
1282
  ...r,
1269
1283
  "--rp-rotate": `${y}deg`,
1270
- "--rp-page-rotate-translate": `${w}`,
1284
+ "--rp-page-rotate-translate": `${b}`,
1271
1285
  "--scale-factor": s
1272
1286
  },
1273
1287
  className: mt["rp-page-wrapper"],
@@ -1275,16 +1289,16 @@ const ti = (t) => {
1275
1289
  "div",
1276
1290
  {
1277
1291
  style: {
1278
- width: `${b.width}px`,
1279
- height: `${b.height}px`
1292
+ width: `${w.width}px`,
1293
+ height: `${w.height}px`
1280
1294
  },
1281
1295
  className: mt["rp-page"],
1282
1296
  children: [
1283
1297
  /* @__PURE__ */ i(Kr, { onLoading: g, onLoaded: h, pageNumber: n }),
1284
- C && f && /* @__PURE__ */ i("div", { className: mt["rp-loader-wrapper"], children: /* @__PURE__ */ i(f, {}) }),
1298
+ T && f && /* @__PURE__ */ i("div", { className: mt["rp-loader-wrapper"], children: /* @__PURE__ */ i(f, {}) }),
1285
1299
  /* @__PURE__ */ i(cr, { pageNumber: n }),
1286
1300
  d && /* @__PURE__ */ i(Yr, { pageNumber: n }),
1287
- /* @__PURE__ */ i(oi, { pageNumber: n, viewport: b }),
1301
+ /* @__PURE__ */ i(oi, { pageNumber: n, viewport: w }),
1288
1302
  /* @__PURE__ */ i(ti, { pageNumber: n })
1289
1303
  ]
1290
1304
  }
@@ -1377,30 +1391,30 @@ function li(t) {
1377
1391
  }
1378
1392
  return vt;
1379
1393
  }
1380
- var ze = null;
1394
+ var We = null;
1381
1395
  function nn(t) {
1382
- if (t === void 0 && (t = !1), ze === null || t) {
1396
+ if (t === void 0 && (t = !1), We === null || t) {
1383
1397
  var e = document.createElement("div"), n = e.style;
1384
1398
  n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
1385
1399
  var r = document.createElement("div"), o = r.style;
1386
- return o.width = "100px", o.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ? ze = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? ze = "negative" : ze = "positive-ascending"), document.body.removeChild(e), ze;
1400
+ return o.width = "100px", o.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ? We = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? We = "negative" : We = "positive-ascending"), document.body.removeChild(e), We;
1387
1401
  }
1388
- return ze;
1402
+ return We;
1389
1403
  }
1390
1404
  var di = 150, ui = function(e) {
1391
1405
  var n = e.columnIndex;
1392
1406
  e.data;
1393
1407
  var r = e.rowIndex;
1394
1408
  return r + ":" + n;
1395
- }, Ye = null, Je = null, et = null;
1396
- process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ye = /* @__PURE__ */ new WeakSet(), Je = /* @__PURE__ */ new WeakSet(), et = /* @__PURE__ */ new WeakSet());
1409
+ }, Je = null, et = null, tt = null;
1410
+ process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Je = /* @__PURE__ */ new WeakSet(), et = /* @__PURE__ */ new WeakSet(), tt = /* @__PURE__ */ new WeakSet());
1397
1411
  function pi(t) {
1398
- var e, n = t.getColumnOffset, r = t.getColumnStartIndexForOffset, o = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, c = t.getEstimatedTotalHeight, d = t.getEstimatedTotalWidth, s = t.getOffsetForColumnAndAlignment, f = t.getOffsetForRowAndAlignment, m = t.getRowHeight, C = t.getRowOffset, u = t.getRowStartIndexForOffset, T = t.getRowStopIndexForStartIndex, b = t.initInstanceProps, P = t.shouldResetStyleCacheOnItemSizeChange, y = t.validateProps;
1399
- return e = /* @__PURE__ */ function(w) {
1400
- ri(g, w);
1412
+ var e, n = t.getColumnOffset, r = t.getColumnStartIndexForOffset, o = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, c = t.getEstimatedTotalHeight, d = t.getEstimatedTotalWidth, s = t.getOffsetForColumnAndAlignment, f = t.getOffsetForRowAndAlignment, m = t.getRowHeight, T = t.getRowOffset, u = t.getRowStartIndexForOffset, C = t.getRowStopIndexForStartIndex, w = t.initInstanceProps, P = t.shouldResetStyleCacheOnItemSizeChange, y = t.validateProps;
1413
+ return e = /* @__PURE__ */ function(b) {
1414
+ ri(g, b);
1401
1415
  function g(p) {
1402
1416
  var l;
1403
- return l = w.call(this, p) || this, l._instanceProps = b(l.props, Qt(l)), l._resetIsScrollingTimeoutId = null, l._outerRef = void 0, l.state = {
1417
+ return l = b.call(this, p) || this, l._instanceProps = w(l.props, Qt(l)), l._resetIsScrollingTimeoutId = null, l._outerRef = void 0, l.state = {
1404
1418
  instance: Qt(l),
1405
1419
  isScrolling: !1,
1406
1420
  horizontalScrollDirection: "forward",
@@ -1408,66 +1422,66 @@ function pi(t) {
1408
1422
  scrollTop: typeof l.props.initialScrollTop == "number" ? l.props.initialScrollTop : 0,
1409
1423
  scrollUpdateWasRequested: !1,
1410
1424
  verticalScrollDirection: "forward"
1411
- }, l._callOnItemsRendered = void 0, l._callOnItemsRendered = gt(function(v, _, I, S, x, R, O, D) {
1425
+ }, l._callOnItemsRendered = void 0, l._callOnItemsRendered = gt(function(v, _, I, x, S, R, N, A) {
1412
1426
  return l.props.onItemsRendered({
1413
1427
  overscanColumnStartIndex: v,
1414
1428
  overscanColumnStopIndex: _,
1415
1429
  overscanRowStartIndex: I,
1416
- overscanRowStopIndex: S,
1417
- visibleColumnStartIndex: x,
1430
+ overscanRowStopIndex: x,
1431
+ visibleColumnStartIndex: S,
1418
1432
  visibleColumnStopIndex: R,
1419
- visibleRowStartIndex: O,
1420
- visibleRowStopIndex: D
1433
+ visibleRowStartIndex: N,
1434
+ visibleRowStopIndex: A
1421
1435
  });
1422
- }), l._callOnScroll = void 0, l._callOnScroll = gt(function(v, _, I, S, x) {
1436
+ }), l._callOnScroll = void 0, l._callOnScroll = gt(function(v, _, I, x, S) {
1423
1437
  return l.props.onScroll({
1424
1438
  horizontalScrollDirection: I,
1425
1439
  scrollLeft: v,
1426
1440
  scrollTop: _,
1427
- verticalScrollDirection: S,
1428
- scrollUpdateWasRequested: x
1441
+ verticalScrollDirection: x,
1442
+ scrollUpdateWasRequested: S
1429
1443
  });
1430
1444
  }), l._getItemStyle = void 0, l._getItemStyle = function(v, _) {
1431
- var I = l.props, S = I.columnWidth, x = I.direction, R = I.rowHeight, O = l._getItemStyleCache(P && S, P && x, P && R), D = v + ":" + _, z;
1432
- if (O.hasOwnProperty(D))
1433
- z = O[D];
1445
+ var I = l.props, x = I.columnWidth, S = I.direction, R = I.rowHeight, N = l._getItemStyleCache(P && x, P && S, P && R), A = v + ":" + _, F;
1446
+ if (N.hasOwnProperty(A))
1447
+ F = N[A];
1434
1448
  else {
1435
- var E = n(l.props, _, l._instanceProps), L = x === "rtl";
1436
- O[D] = z = {
1449
+ var D = n(l.props, _, l._instanceProps), L = S === "rtl";
1450
+ N[A] = F = {
1437
1451
  position: "absolute",
1438
- left: L ? void 0 : E,
1439
- right: L ? E : void 0,
1440
- top: C(l.props, v, l._instanceProps),
1452
+ left: L ? void 0 : D,
1453
+ right: L ? D : void 0,
1454
+ top: T(l.props, v, l._instanceProps),
1441
1455
  height: m(l.props, v, l._instanceProps),
1442
1456
  width: a(l.props, _, l._instanceProps)
1443
1457
  };
1444
1458
  }
1445
- return z;
1459
+ return F;
1446
1460
  }, l._getItemStyleCache = void 0, l._getItemStyleCache = gt(function(v, _, I) {
1447
1461
  return {};
1448
1462
  }), l._onScroll = function(v) {
1449
- var _ = v.currentTarget, I = _.clientHeight, S = _.clientWidth, x = _.scrollLeft, R = _.scrollTop, O = _.scrollHeight, D = _.scrollWidth;
1450
- l.setState(function(z) {
1451
- if (z.scrollLeft === x && z.scrollTop === R)
1463
+ var _ = v.currentTarget, I = _.clientHeight, x = _.clientWidth, S = _.scrollLeft, R = _.scrollTop, N = _.scrollHeight, A = _.scrollWidth;
1464
+ l.setState(function(F) {
1465
+ if (F.scrollLeft === S && F.scrollTop === R)
1452
1466
  return null;
1453
- var E = l.props.direction, L = x;
1454
- if (E === "rtl")
1467
+ var D = l.props.direction, L = S;
1468
+ if (D === "rtl")
1455
1469
  switch (nn()) {
1456
1470
  case "negative":
1457
- L = -x;
1471
+ L = -S;
1458
1472
  break;
1459
1473
  case "positive-descending":
1460
- L = D - S - x;
1474
+ L = A - x - S;
1461
1475
  break;
1462
1476
  }
1463
- L = Math.max(0, Math.min(L, D - S));
1464
- var F = Math.max(0, Math.min(R, O - I));
1477
+ L = Math.max(0, Math.min(L, A - x));
1478
+ var E = Math.max(0, Math.min(R, N - I));
1465
1479
  return {
1466
1480
  isScrolling: !0,
1467
- horizontalScrollDirection: z.scrollLeft < x ? "forward" : "backward",
1481
+ horizontalScrollDirection: F.scrollLeft < S ? "forward" : "backward",
1468
1482
  scrollLeft: L,
1469
- scrollTop: F,
1470
- verticalScrollDirection: z.scrollTop < R ? "forward" : "backward",
1483
+ scrollTop: E,
1484
+ verticalScrollDirection: F.scrollTop < R ? "forward" : "backward",
1471
1485
  scrollUpdateWasRequested: !1
1472
1486
  };
1473
1487
  }, l._resetIsScrollingDebounced);
@@ -1500,12 +1514,12 @@ function pi(t) {
1500
1514
  };
1501
1515
  }, this._resetIsScrollingDebounced);
1502
1516
  }, h.scrollToItem = function(l) {
1503
- var v = l.align, _ = v === void 0 ? "auto" : v, I = l.columnIndex, S = l.rowIndex, x = this.props, R = x.columnCount, O = x.height, D = x.rowCount, z = x.width, E = this.state, L = E.scrollLeft, F = E.scrollTop, G = li();
1504
- I !== void 0 && (I = Math.max(0, Math.min(I, R - 1))), S !== void 0 && (S = Math.max(0, Math.min(S, D - 1)));
1505
- var U = c(this.props, this._instanceProps), V = d(this.props, this._instanceProps), B = V > z ? G : 0, Z = U > O ? G : 0;
1517
+ var v = l.align, _ = v === void 0 ? "auto" : v, I = l.columnIndex, x = l.rowIndex, S = this.props, R = S.columnCount, N = S.height, A = S.rowCount, F = S.width, D = this.state, L = D.scrollLeft, E = D.scrollTop, U = li();
1518
+ I !== void 0 && (I = Math.max(0, Math.min(I, R - 1))), x !== void 0 && (x = Math.max(0, Math.min(x, A - 1)));
1519
+ var V = c(this.props, this._instanceProps), $ = d(this.props, this._instanceProps), q = $ > F ? U : 0, j = V > N ? U : 0;
1506
1520
  this.scrollTo({
1507
- scrollLeft: I !== void 0 ? s(this.props, I, _, L, this._instanceProps, Z) : L,
1508
- scrollTop: S !== void 0 ? f(this.props, S, _, F, this._instanceProps, B) : F
1521
+ scrollLeft: I !== void 0 ? s(this.props, I, _, L, this._instanceProps, j) : L,
1522
+ scrollTop: x !== void 0 ? f(this.props, x, _, E, this._instanceProps, q) : E
1509
1523
  });
1510
1524
  }, h.componentDidMount = function() {
1511
1525
  var l = this.props, v = l.initialScrollLeft, _ = l.initialScrollTop;
@@ -1515,91 +1529,91 @@ function pi(t) {
1515
1529
  }
1516
1530
  this._callPropsCallbacks();
1517
1531
  }, h.componentDidUpdate = function() {
1518
- var l = this.props.direction, v = this.state, _ = v.scrollLeft, I = v.scrollTop, S = v.scrollUpdateWasRequested;
1519
- if (S && this._outerRef != null) {
1520
- var x = this._outerRef;
1532
+ var l = this.props.direction, v = this.state, _ = v.scrollLeft, I = v.scrollTop, x = v.scrollUpdateWasRequested;
1533
+ if (x && this._outerRef != null) {
1534
+ var S = this._outerRef;
1521
1535
  if (l === "rtl")
1522
1536
  switch (nn()) {
1523
1537
  case "negative":
1524
- x.scrollLeft = -_;
1538
+ S.scrollLeft = -_;
1525
1539
  break;
1526
1540
  case "positive-ascending":
1527
- x.scrollLeft = _;
1541
+ S.scrollLeft = _;
1528
1542
  break;
1529
1543
  default:
1530
- var R = x.clientWidth, O = x.scrollWidth;
1531
- x.scrollLeft = O - R - _;
1544
+ var R = S.clientWidth, N = S.scrollWidth;
1545
+ S.scrollLeft = N - R - _;
1532
1546
  break;
1533
1547
  }
1534
1548
  else
1535
- x.scrollLeft = Math.max(0, _);
1536
- x.scrollTop = Math.max(0, I);
1549
+ S.scrollLeft = Math.max(0, _);
1550
+ S.scrollTop = Math.max(0, I);
1537
1551
  }
1538
1552
  this._callPropsCallbacks();
1539
1553
  }, h.componentWillUnmount = function() {
1540
1554
  this._resetIsScrollingTimeoutId !== null && tn(this._resetIsScrollingTimeoutId);
1541
1555
  }, h.render = function() {
1542
- var l = this.props, v = l.children, _ = l.className, I = l.columnCount, S = l.direction, x = l.height, R = l.innerRef, O = l.innerElementType, D = l.innerTagName, z = l.itemData, E = l.itemKey, L = E === void 0 ? ui : E, F = l.outerElementType, G = l.outerTagName, U = l.rowCount, V = l.style, B = l.useIsScrolling, Z = l.width, ie = this.state.isScrolling, $ = this._getHorizontalRangeToRender(), Y = $[0], J = $[1], pe = this._getVerticalRangeToRender(), ee = pe[0], Q = pe[1], he = [];
1543
- if (I > 0 && U)
1544
- for (var ge = ee; ge <= Q; ge++)
1545
- for (var ye = Y; ye <= J; ye++)
1546
- he.push(Qe(v, {
1547
- columnIndex: ye,
1548
- data: z,
1549
- isScrolling: B ? ie : void 0,
1556
+ var l = this.props, v = l.children, _ = l.className, I = l.columnCount, x = l.direction, S = l.height, R = l.innerRef, N = l.innerElementType, A = l.innerTagName, F = l.itemData, D = l.itemKey, L = D === void 0 ? ui : D, E = l.outerElementType, U = l.outerTagName, V = l.rowCount, $ = l.style, q = l.useIsScrolling, j = l.width, te = this.state.isScrolling, G = this._getHorizontalRangeToRender(), Y = G[0], J = G[1], me = this._getVerticalRangeToRender(), ne = me[0], Q = me[1], ie = [];
1557
+ if (I > 0 && V)
1558
+ for (var se = ne; se <= Q; se++)
1559
+ for (var ce = Y; ce <= J; ce++)
1560
+ ie.push(Ye(v, {
1561
+ columnIndex: ce,
1562
+ data: F,
1563
+ isScrolling: q ? te : void 0,
1550
1564
  key: L({
1551
- columnIndex: ye,
1552
- data: z,
1553
- rowIndex: ge
1565
+ columnIndex: ce,
1566
+ data: F,
1567
+ rowIndex: se
1554
1568
  }),
1555
- rowIndex: ge,
1556
- style: this._getItemStyle(ge, ye)
1569
+ rowIndex: se,
1570
+ style: this._getItemStyle(se, ce)
1557
1571
  }));
1558
- var lt = c(this.props, this._instanceProps), Le = d(this.props, this._instanceProps);
1559
- return Qe(F || G || "div", {
1572
+ var ze = c(this.props, this._instanceProps), Le = d(this.props, this._instanceProps);
1573
+ return Ye(E || U || "div", {
1560
1574
  className: _,
1561
1575
  onScroll: this._onScroll,
1562
1576
  ref: this._outerRefSetter,
1563
1577
  style: Pt({
1564
1578
  position: "relative",
1565
- height: x,
1566
- width: Z,
1579
+ height: S,
1580
+ width: j,
1567
1581
  overflow: "auto",
1568
1582
  WebkitOverflowScrolling: "touch",
1569
1583
  willChange: "transform",
1570
- direction: S
1571
- }, V)
1572
- }, Qe(O || D || "div", {
1573
- children: he,
1584
+ direction: x
1585
+ }, $)
1586
+ }, Ye(N || A || "div", {
1587
+ children: ie,
1574
1588
  ref: R,
1575
1589
  style: {
1576
- height: lt,
1577
- pointerEvents: ie ? "none" : void 0,
1590
+ height: ze,
1591
+ pointerEvents: te ? "none" : void 0,
1578
1592
  width: Le
1579
1593
  }
1580
1594
  }));
1581
1595
  }, h._callPropsCallbacks = function() {
1582
- var l = this.props, v = l.columnCount, _ = l.onItemsRendered, I = l.onScroll, S = l.rowCount;
1583
- if (typeof _ == "function" && v > 0 && S > 0) {
1584
- var x = this._getHorizontalRangeToRender(), R = x[0], O = x[1], D = x[2], z = x[3], E = this._getVerticalRangeToRender(), L = E[0], F = E[1], G = E[2], U = E[3];
1585
- this._callOnItemsRendered(R, O, L, F, D, z, G, U);
1596
+ var l = this.props, v = l.columnCount, _ = l.onItemsRendered, I = l.onScroll, x = l.rowCount;
1597
+ if (typeof _ == "function" && v > 0 && x > 0) {
1598
+ var S = this._getHorizontalRangeToRender(), R = S[0], N = S[1], A = S[2], F = S[3], D = this._getVerticalRangeToRender(), L = D[0], E = D[1], U = D[2], V = D[3];
1599
+ this._callOnItemsRendered(R, N, L, E, A, F, U, V);
1586
1600
  }
1587
1601
  if (typeof I == "function") {
1588
- var V = this.state, B = V.horizontalScrollDirection, Z = V.scrollLeft, ie = V.scrollTop, $ = V.scrollUpdateWasRequested, Y = V.verticalScrollDirection;
1589
- this._callOnScroll(Z, ie, B, Y, $);
1602
+ var $ = this.state, q = $.horizontalScrollDirection, j = $.scrollLeft, te = $.scrollTop, G = $.scrollUpdateWasRequested, Y = $.verticalScrollDirection;
1603
+ this._callOnScroll(j, te, q, Y, G);
1590
1604
  }
1591
1605
  }, h._getHorizontalRangeToRender = function() {
1592
- var l = this.props, v = l.columnCount, _ = l.overscanColumnCount, I = l.overscanColumnsCount, S = l.overscanCount, x = l.rowCount, R = this.state, O = R.horizontalScrollDirection, D = R.isScrolling, z = R.scrollLeft, E = _ || I || S || 1;
1593
- if (v === 0 || x === 0)
1606
+ var l = this.props, v = l.columnCount, _ = l.overscanColumnCount, I = l.overscanColumnsCount, x = l.overscanCount, S = l.rowCount, R = this.state, N = R.horizontalScrollDirection, A = R.isScrolling, F = R.scrollLeft, D = _ || I || x || 1;
1607
+ if (v === 0 || S === 0)
1594
1608
  return [0, 0, 0, 0];
1595
- var L = r(this.props, z, this._instanceProps), F = o(this.props, L, z, this._instanceProps), G = !D || O === "backward" ? Math.max(1, E) : 1, U = !D || O === "forward" ? Math.max(1, E) : 1;
1596
- return [Math.max(0, L - G), Math.max(0, Math.min(v - 1, F + U)), L, F];
1609
+ var L = r(this.props, F, this._instanceProps), E = o(this.props, L, F, this._instanceProps), U = !A || N === "backward" ? Math.max(1, D) : 1, V = !A || N === "forward" ? Math.max(1, D) : 1;
1610
+ return [Math.max(0, L - U), Math.max(0, Math.min(v - 1, E + V)), L, E];
1597
1611
  }, h._getVerticalRangeToRender = function() {
1598
- var l = this.props, v = l.columnCount, _ = l.overscanCount, I = l.overscanRowCount, S = l.overscanRowsCount, x = l.rowCount, R = this.state, O = R.isScrolling, D = R.verticalScrollDirection, z = R.scrollTop, E = I || S || _ || 1;
1599
- if (v === 0 || x === 0)
1612
+ var l = this.props, v = l.columnCount, _ = l.overscanCount, I = l.overscanRowCount, x = l.overscanRowsCount, S = l.rowCount, R = this.state, N = R.isScrolling, A = R.verticalScrollDirection, F = R.scrollTop, D = I || x || _ || 1;
1613
+ if (v === 0 || S === 0)
1600
1614
  return [0, 0, 0, 0];
1601
- var L = u(this.props, z, this._instanceProps), F = T(this.props, L, z, this._instanceProps), G = !O || D === "backward" ? Math.max(1, E) : 1, U = !O || D === "forward" ? Math.max(1, E) : 1;
1602
- return [Math.max(0, L - G), Math.max(0, Math.min(x - 1, F + U)), L, F];
1615
+ var L = u(this.props, F, this._instanceProps), E = C(this.props, L, F, this._instanceProps), U = !N || A === "backward" ? Math.max(1, D) : 1, V = !N || A === "forward" ? Math.max(1, D) : 1;
1616
+ return [Math.max(0, L - U), Math.max(0, Math.min(S - 1, E + V)), L, E];
1603
1617
  }, g;
1604
1618
  }(ho), e.defaultProps = {
1605
1619
  direction: "ltr",
@@ -1608,9 +1622,9 @@ function pi(t) {
1608
1622
  }, e;
1609
1623
  }
1610
1624
  var hi = function(e, n) {
1611
- var r = e.children, o = e.direction, a = e.height, c = e.innerTagName, d = e.outerTagName, s = e.overscanColumnsCount, f = e.overscanCount, m = e.overscanRowsCount, C = e.width, u = n.instance;
1625
+ var r = e.children, o = e.direction, a = e.height, c = e.innerTagName, d = e.outerTagName, s = e.overscanColumnsCount, f = e.overscanCount, m = e.overscanRowsCount, T = e.width, u = n.instance;
1612
1626
  if (process.env.NODE_ENV !== "production") {
1613
- if (typeof f == "number" && Ye && !Ye.has(u) && (Ye.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof s == "number" || typeof m == "number") && Je && !Je.has(u) && (Je.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || d != null) && et && !et.has(u) && (et.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
1627
+ if (typeof f == "number" && Je && !Je.has(u) && (Je.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof s == "number" || typeof m == "number") && et && !et.has(u) && (et.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || d != null) && tt && !tt.has(u) && (tt.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
1614
1628
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
1615
1629
  switch (o) {
1616
1630
  case "ltr":
@@ -1619,8 +1633,8 @@ var hi = function(e, n) {
1619
1633
  default:
1620
1634
  throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + o + '" was specified.'));
1621
1635
  }
1622
- if (typeof C != "number")
1623
- throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (C === null ? "null" : typeof C) + '" was specified.'));
1636
+ if (typeof T != "number")
1637
+ throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (T === null ? "null" : typeof T) + '" was specified.'));
1624
1638
  if (typeof a != "number")
1625
1639
  throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
1626
1640
  }
@@ -1640,7 +1654,7 @@ var hi = function(e, n) {
1640
1654
  }
1641
1655
  var f = r - c - 1, m = f * a;
1642
1656
  return d + m;
1643
- }, Pe = function(e, n, r, o) {
1657
+ }, Te = function(e, n, r, o) {
1644
1658
  var a, c, d;
1645
1659
  if (e === "column" ? (a = o.columnMetadataMap, c = n.columnWidth, d = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = n.rowHeight, d = o.lastMeasuredRowIndex), r > d) {
1646
1660
  var s = 0;
@@ -1649,11 +1663,11 @@ var hi = function(e, n) {
1649
1663
  s = f.offset + f.size;
1650
1664
  }
1651
1665
  for (var m = d + 1; m <= r; m++) {
1652
- var C = c(m);
1666
+ var T = c(m);
1653
1667
  a[m] = {
1654
1668
  offset: s,
1655
- size: C
1656
- }, s += C;
1669
+ size: T
1670
+ }, s += T;
1657
1671
  }
1658
1672
  e === "column" ? o.lastMeasuredColumnIndex = r : o.lastMeasuredRowIndex = r;
1659
1673
  }
@@ -1665,39 +1679,39 @@ var hi = function(e, n) {
1665
1679
  return d >= o ? An(e, n, r, c, 0, o) : fi(e, n, r, Math.max(0, c), o);
1666
1680
  }, An = function(e, n, r, o, a, c) {
1667
1681
  for (; a <= o; ) {
1668
- var d = a + Math.floor((o - a) / 2), s = Pe(e, n, d, r).offset;
1682
+ var d = a + Math.floor((o - a) / 2), s = Te(e, n, d, r).offset;
1669
1683
  if (s === c)
1670
1684
  return d;
1671
1685
  s < c ? a = d + 1 : s > c && (o = d - 1);
1672
1686
  }
1673
1687
  return a > 0 ? a - 1 : 0;
1674
1688
  }, fi = function(e, n, r, o, a) {
1675
- for (var c = e === "column" ? n.columnCount : n.rowCount, d = 1; o < c && Pe(e, n, o, r).offset < a; )
1689
+ for (var c = e === "column" ? n.columnCount : n.rowCount, d = 1; o < c && Te(e, n, o, r).offset < a; )
1676
1690
  o += d, d *= 2;
1677
1691
  return An(e, n, r, Math.min(o, c - 1), Math.floor(o / 2), a);
1678
1692
  }, an = function(e, n, r, o, a, c, d) {
1679
- var s = e === "column" ? n.width : n.height, f = Pe(e, n, r, c), m = e === "column" ? Dn(n, c) : On(n, c), C = Math.max(0, Math.min(m - s, f.offset)), u = Math.max(0, f.offset - s + d + f.size);
1680
- switch (o === "smart" && (a >= u - s && a <= C + s ? o = "auto" : o = "center"), o) {
1693
+ var s = e === "column" ? n.width : n.height, f = Te(e, n, r, c), m = e === "column" ? Dn(n, c) : On(n, c), T = Math.max(0, Math.min(m - s, f.offset)), u = Math.max(0, f.offset - s + d + f.size);
1694
+ switch (o === "smart" && (a >= u - s && a <= T + s ? o = "auto" : o = "center"), o) {
1681
1695
  case "start":
1682
- return C;
1696
+ return T;
1683
1697
  case "end":
1684
1698
  return u;
1685
1699
  case "center":
1686
- return Math.round(u + (C - u) / 2);
1700
+ return Math.round(u + (T - u) / 2);
1687
1701
  case "auto":
1688
1702
  default:
1689
- return a >= u && a <= C ? a : u > C || a < u ? u : C;
1703
+ return a >= u && a <= T ? a : u > T || a < u ? u : T;
1690
1704
  }
1691
1705
  }, mi = /* @__PURE__ */ pi({
1692
1706
  getColumnOffset: function(e, n, r) {
1693
- return Pe("column", e, n, r).offset;
1707
+ return Te("column", e, n, r).offset;
1694
1708
  },
1695
1709
  getColumnStartIndexForOffset: function(e, n, r) {
1696
1710
  return rn("column", e, r, n);
1697
1711
  },
1698
1712
  getColumnStopIndexForStartIndex: function(e, n, r, o) {
1699
- for (var a = e.columnCount, c = e.width, d = Pe("column", e, n, o), s = r + c, f = d.offset + d.size, m = n; m < a - 1 && f < s; )
1700
- m++, f += Pe("column", e, m, o).size;
1713
+ for (var a = e.columnCount, c = e.width, d = Te("column", e, n, o), s = r + c, f = d.offset + d.size, m = n; m < a - 1 && f < s; )
1714
+ m++, f += Te("column", e, m, o).size;
1701
1715
  return m;
1702
1716
  },
1703
1717
  getColumnWidth: function(e, n, r) {
@@ -1712,7 +1726,7 @@ var hi = function(e, n) {
1712
1726
  return an("row", e, n, r, o, a, c);
1713
1727
  },
1714
1728
  getRowOffset: function(e, n, r) {
1715
- return Pe("row", e, n, r).offset;
1729
+ return Te("row", e, n, r).offset;
1716
1730
  },
1717
1731
  getRowHeight: function(e, n, r) {
1718
1732
  return r.rowMetadataMap[n].size;
@@ -1721,8 +1735,8 @@ var hi = function(e, n) {
1721
1735
  return rn("row", e, r, n);
1722
1736
  },
1723
1737
  getRowStopIndexForStartIndex: function(e, n, r, o) {
1724
- for (var a = e.rowCount, c = e.height, d = Pe("row", e, n, o), s = r + c, f = d.offset + d.size, m = n; m < a - 1 && f < s; )
1725
- m++, f += Pe("row", e, m, o).size;
1738
+ for (var a = e.rowCount, c = e.height, d = Te("row", e, n, o), s = r + c, f = d.offset + d.size, m = n; m < a - 1 && f < s; )
1739
+ m++, f += Te("row", e, m, o).size;
1726
1740
  return m;
1727
1741
  },
1728
1742
  initInstanceProps: function(e, n) {
@@ -1745,8 +1759,8 @@ var hi = function(e, n) {
1745
1759
  shouldForceUpdate: s
1746
1760
  });
1747
1761
  }, n.resetAfterIndices = function(d) {
1748
- var s = d.columnIndex, f = d.rowIndex, m = d.shouldForceUpdate, C = m === void 0 ? !0 : m;
1749
- typeof s == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, s - 1)), typeof f == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, f - 1)), n._getItemStyleCache(-1), C && n.forceUpdate();
1762
+ var s = d.columnIndex, f = d.rowIndex, m = d.shouldForceUpdate, T = m === void 0 ? !0 : m;
1763
+ typeof s == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, s - 1)), typeof f == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, f - 1)), n._getItemStyleCache(-1), T && n.forceUpdate();
1750
1764
  }, c;
1751
1765
  },
1752
1766
  shouldResetStyleCacheOnItemSizeChange: !1,
@@ -1775,148 +1789,148 @@ function wi(t, e) {
1775
1789
  var n = t.style, r = Jt(t, gi), o = e.style, a = Jt(e, vi);
1776
1790
  return !sn(n, o) && !sn(r, a);
1777
1791
  }
1778
- const bi = () => {
1779
- const { viewMode: t } = $e(), { scrollMode: e } = Ae(), { setColumnCount: n } = vn(), { virtualScrollableElementRef: r } = rt(), o = je(), a = W(() => o.heights.length, [o.heights]), c = W(() => e === re.HORIZONTAL_SCROLLING ? a : t === ne.DUAL_PAGE || t === ne.DUAL_PAGE_WITH_COVER ? 2 : 1, [t, e, e, a, r]), d = W(() => {
1780
- if (t === ne.DUAL_PAGE_WITH_COVER && o.widths.length > 0) {
1781
- const w = [0, 0];
1792
+ const _i = () => {
1793
+ const { viewMode: t } = Ge(), { scrollMode: e } = Ae(), { setColumnCount: n } = vn(), { virtualScrollableElementRef: r } = it(), o = Ke(), a = W(() => o.heights.length, [o.heights]), c = W(() => e === ae.HORIZONTAL_SCROLLING ? a : t === ee.DUAL_PAGE || t === ee.DUAL_PAGE_WITH_COVER ? 2 : 1, [t, e, e, a, r]), d = W(() => {
1794
+ if (t === ee.DUAL_PAGE_WITH_COVER && o.widths.length > 0) {
1795
+ const b = [0, 0];
1782
1796
  return o.widths.forEach((g, h) => {
1783
1797
  const p = h + 1;
1784
1798
  if (p === 1)
1785
1799
  return;
1786
1800
  const l = p % 2 === 0 ? 0 : 1;
1787
- w[l] = Math.max(w[l] || 0, g);
1788
- }), w;
1801
+ b[l] = Math.max(b[l] || 0, g);
1802
+ }), b;
1789
1803
  }
1790
- return o.widths.reduce((w, g, h) => {
1804
+ return o.widths.reduce((b, g, h) => {
1791
1805
  const p = h % c;
1792
- return (!w[p] || g > w[p]) && (w[p] = g), w;
1806
+ return (!b[p] || g > b[p]) && (b[p] = g), b;
1793
1807
  }, []);
1794
- }, [o.widths, c, t]), s = N(
1808
+ }, [o.widths, c, t]), s = O(
1795
1809
  (P) => {
1796
1810
  const y = P % d.length;
1797
1811
  return d[y] || 0;
1798
1812
  },
1799
1813
  [d]
1800
- ), f = N(
1814
+ ), f = O(
1801
1815
  (P) => {
1802
- if (t === ne.DUAL_PAGE_WITH_COVER) {
1816
+ if (t === ee.DUAL_PAGE_WITH_COVER) {
1803
1817
  if (P === 0)
1804
1818
  return o.heights[0] || 0;
1805
1819
  const g = 1 + (P - 1) * c + 1, p = Array.from({ length: c }, (l, v) => g + v - 1).filter((l) => l < o.heights.length).map((l) => o.heights[l] || 0);
1806
1820
  return Math.max(...p, 0);
1807
1821
  }
1808
- const w = Array.from({ length: c }, (g, h) => {
1822
+ const b = Array.from({ length: c }, (g, h) => {
1809
1823
  const p = P * c + h;
1810
1824
  return o.heights[p] || 0;
1811
1825
  });
1812
- return Math.max(...w);
1826
+ return Math.max(...b);
1813
1827
  },
1814
1828
  [o.heights, c, t]
1815
1829
  );
1816
- A(() => {
1830
+ z(() => {
1817
1831
  n(c);
1818
1832
  }, [c, n]);
1819
- const m = W(() => e === re.HORIZONTAL_SCROLLING || e === re.PAGE_SCROLLING ? 1 : t === ne.DUAL_PAGE_WITH_COVER && a > 0 ? 1 + Math.ceil((a - 1) / c) : Math.round(a / c), [c, a, e, t]), C = W(() => o.heights.reduce((P, y) => P + y, 0) / o.heights.length || 0, [o]), u = W(() => o.widths.reduce((P, y) => P + y, 0) / o.widths.length || 0, [o]), T = W(() => {
1820
- const P = t === ne.DUAL_PAGE_WITH_COVER, { rowsHeight: y, columnsWidth: w } = Et(o, c, P);
1833
+ const m = W(() => e === ae.HORIZONTAL_SCROLLING || e === ae.PAGE_SCROLLING ? 1 : t === ee.DUAL_PAGE_WITH_COVER && a > 0 ? 1 + Math.ceil((a - 1) / c) : Math.round(a / c), [c, a, e, t]), T = W(() => o.heights.reduce((P, y) => P + y, 0) / o.heights.length || 0, [o]), u = W(() => o.widths.reduce((P, y) => P + y, 0) / o.widths.length || 0, [o]), C = W(() => {
1834
+ const P = t === ee.DUAL_PAGE_WITH_COVER, { rowsHeight: y, columnsWidth: b } = Et(o, c, P);
1821
1835
  return {
1822
1836
  rowsHeight: y,
1823
- columnsWidth: w
1837
+ columnsWidth: b
1824
1838
  };
1825
- }, [o, c, t]), b = W(() => ({
1826
- width: T.columnsWidth.reduce((P, y) => P + y, 0),
1827
- height: T.rowsHeight.reduce((P, y) => P + y, 0)
1828
- }), [T]);
1839
+ }, [o, c, t]), w = W(() => ({
1840
+ width: C.columnsWidth.reduce((P, y) => P + y, 0),
1841
+ height: C.rowsHeight.reduce((P, y) => P + y, 0)
1842
+ }), [C]);
1829
1843
  return {
1830
1844
  rowCount: m,
1831
1845
  rowHeight: f,
1832
1846
  columnCount: c,
1833
1847
  columnWidth: s,
1834
1848
  pageDimension: o,
1835
- estimatedRowHeight: C,
1849
+ estimatedRowHeight: T,
1836
1850
  estimatedColumnWidth: u,
1837
- gridDimension: T,
1838
- totalDimension: b
1851
+ gridDimension: C,
1852
+ totalDimension: w
1839
1853
  };
1840
1854
  };
1841
- let de;
1842
- typeof window < "u" ? de = window : typeof self < "u" ? de = self : de = global;
1855
+ let he;
1856
+ typeof window < "u" ? he = window : typeof self < "u" ? he = self : he = global;
1843
1857
  let Ct = null, yt = null;
1844
- const cn = 20, wt = de.clearTimeout, ln = de.setTimeout, bt = de.cancelAnimationFrame || de.mozCancelAnimationFrame || de.webkitCancelAnimationFrame, dn = de.requestAnimationFrame || de.mozRequestAnimationFrame || de.webkitRequestAnimationFrame;
1845
- bt == null || dn == null ? (Ct = wt, yt = function(e) {
1858
+ const cn = 20, wt = he.clearTimeout, ln = he.setTimeout, _t = he.cancelAnimationFrame || he.mozCancelAnimationFrame || he.webkitCancelAnimationFrame, dn = he.requestAnimationFrame || he.mozRequestAnimationFrame || he.webkitRequestAnimationFrame;
1859
+ _t == null || dn == null ? (Ct = wt, yt = function(e) {
1846
1860
  return ln(e, cn);
1847
1861
  }) : (Ct = function([e, n]) {
1848
- bt(e), wt(n);
1862
+ _t(e), wt(n);
1849
1863
  }, yt = function(e) {
1850
1864
  const n = dn(function() {
1851
1865
  wt(r), e();
1852
1866
  }), r = ln(function() {
1853
- bt(n), e();
1867
+ _t(n), e();
1854
1868
  }, cn);
1855
1869
  return [n, r];
1856
1870
  });
1857
- function _i(t) {
1871
+ function bi(t) {
1858
1872
  let e, n, r, o, a, c, d;
1859
1873
  const s = typeof document < "u" && document.attachEvent;
1860
1874
  if (!s) {
1861
- c = function(w) {
1862
- const g = w.__resizeTriggers__, h = g.firstElementChild, p = g.lastElementChild, l = h.firstElementChild;
1875
+ c = function(b) {
1876
+ const g = b.__resizeTriggers__, h = g.firstElementChild, p = g.lastElementChild, l = h.firstElementChild;
1863
1877
  p.scrollLeft = p.scrollWidth, p.scrollTop = p.scrollHeight, l.style.width = h.offsetWidth + 1 + "px", l.style.height = h.offsetHeight + 1 + "px", h.scrollLeft = h.scrollWidth, h.scrollTop = h.scrollHeight;
1864
- }, a = function(w) {
1865
- return w.offsetWidth !== w.__resizeLast__.width || w.offsetHeight !== w.__resizeLast__.height;
1866
- }, d = function(w) {
1867
- if (w.target.className && typeof w.target.className.indexOf == "function" && w.target.className.indexOf("contract-trigger") < 0 && w.target.className.indexOf("expand-trigger") < 0)
1878
+ }, a = function(b) {
1879
+ return b.offsetWidth !== b.__resizeLast__.width || b.offsetHeight !== b.__resizeLast__.height;
1880
+ }, d = function(b) {
1881
+ if (b.target.className && typeof b.target.className.indexOf == "function" && b.target.className.indexOf("contract-trigger") < 0 && b.target.className.indexOf("expand-trigger") < 0)
1868
1882
  return;
1869
1883
  const g = this;
1870
1884
  c(this), this.__resizeRAF__ && Ct(this.__resizeRAF__), this.__resizeRAF__ = yt(function() {
1871
1885
  a(g) && (g.__resizeLast__.width = g.offsetWidth, g.__resizeLast__.height = g.offsetHeight, g.__resizeListeners__.forEach(function(l) {
1872
- l.call(g, w);
1886
+ l.call(g, b);
1873
1887
  }));
1874
1888
  });
1875
1889
  };
1876
- let u = !1, T = "";
1890
+ let u = !1, C = "";
1877
1891
  r = "animationstart";
1878
- const b = "Webkit Moz O ms".split(" ");
1892
+ const w = "Webkit Moz O ms".split(" ");
1879
1893
  let P = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), y = "";
1880
1894
  {
1881
- const w = document.createElement("fakeelement");
1882
- if (w.style.animationName !== void 0 && (u = !0), u === !1) {
1883
- for (let g = 0; g < b.length; g++)
1884
- if (w.style[b[g] + "AnimationName"] !== void 0) {
1885
- y = b[g], T = "-" + y.toLowerCase() + "-", r = P[g], u = !0;
1895
+ const b = document.createElement("fakeelement");
1896
+ if (b.style.animationName !== void 0 && (u = !0), u === !1) {
1897
+ for (let g = 0; g < w.length; g++)
1898
+ if (b.style[w[g] + "AnimationName"] !== void 0) {
1899
+ y = w[g], C = "-" + y.toLowerCase() + "-", r = P[g], u = !0;
1886
1900
  break;
1887
1901
  }
1888
1902
  }
1889
1903
  }
1890
- n = "resizeanim", e = "@" + T + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", o = T + "animation: 1ms " + n + "; ";
1904
+ n = "resizeanim", e = "@" + C + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", o = C + "animation: 1ms " + n + "; ";
1891
1905
  }
1892
1906
  const f = function(u) {
1893
1907
  if (!u.getElementById("detectElementResize")) {
1894
- const T = (e || "") + ".resize-triggers { " + (o || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', b = u.head || u.getElementsByTagName("head")[0], P = u.createElement("style");
1895
- P.id = "detectElementResize", P.type = "text/css", t != null && P.setAttribute("nonce", t), P.styleSheet ? P.styleSheet.cssText = T : P.appendChild(u.createTextNode(T)), b.appendChild(P);
1908
+ const C = (e || "") + ".resize-triggers { " + (o || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', w = u.head || u.getElementsByTagName("head")[0], P = u.createElement("style");
1909
+ P.id = "detectElementResize", P.type = "text/css", t != null && P.setAttribute("nonce", t), P.styleSheet ? P.styleSheet.cssText = C : P.appendChild(u.createTextNode(C)), w.appendChild(P);
1896
1910
  }
1897
1911
  };
1898
1912
  return {
1899
- addResizeListener: function(u, T) {
1913
+ addResizeListener: function(u, C) {
1900
1914
  if (s)
1901
- u.attachEvent("onresize", T);
1915
+ u.attachEvent("onresize", C);
1902
1916
  else {
1903
1917
  if (!u.__resizeTriggers__) {
1904
- const b = u.ownerDocument, P = de.getComputedStyle(u);
1905
- P && P.position === "static" && (u.style.position = "relative"), f(b), u.__resizeLast__ = {}, u.__resizeListeners__ = [], (u.__resizeTriggers__ = b.createElement("div")).className = "resize-triggers";
1906
- const y = b.createElement("div");
1907
- y.className = "expand-trigger", y.appendChild(b.createElement("div"));
1908
- const w = b.createElement("div");
1909
- w.className = "contract-trigger", u.__resizeTriggers__.appendChild(y), u.__resizeTriggers__.appendChild(w), u.appendChild(u.__resizeTriggers__), c(u), u.addEventListener("scroll", d, !0), r && (u.__resizeTriggers__.__animationListener__ = function(h) {
1918
+ const w = u.ownerDocument, P = he.getComputedStyle(u);
1919
+ P && P.position === "static" && (u.style.position = "relative"), f(w), u.__resizeLast__ = {}, u.__resizeListeners__ = [], (u.__resizeTriggers__ = w.createElement("div")).className = "resize-triggers";
1920
+ const y = w.createElement("div");
1921
+ y.className = "expand-trigger", y.appendChild(w.createElement("div"));
1922
+ const b = w.createElement("div");
1923
+ b.className = "contract-trigger", u.__resizeTriggers__.appendChild(y), u.__resizeTriggers__.appendChild(b), u.appendChild(u.__resizeTriggers__), c(u), u.addEventListener("scroll", d, !0), r && (u.__resizeTriggers__.__animationListener__ = function(h) {
1910
1924
  h.animationName === n && c(u);
1911
1925
  }, u.__resizeTriggers__.addEventListener(r, u.__resizeTriggers__.__animationListener__));
1912
1926
  }
1913
- u.__resizeListeners__.push(T);
1927
+ u.__resizeListeners__.push(C);
1914
1928
  }
1915
1929
  },
1916
- removeResizeListener: function(u, T) {
1930
+ removeResizeListener: function(u, C) {
1917
1931
  if (s)
1918
- u.detachEvent("onresize", T);
1919
- else if (u.__resizeListeners__.splice(u.__resizeListeners__.indexOf(T), 1), !u.__resizeListeners__.length) {
1932
+ u.detachEvent("onresize", C);
1933
+ else if (u.__resizeListeners__.splice(u.__resizeListeners__.indexOf(C), 1), !u.__resizeListeners__.length) {
1920
1934
  u.removeEventListener("scroll", d, !0), u.__resizeTriggers__.__animationListener__ && (u.__resizeTriggers__.removeEventListener(r, u.__resizeTriggers__.__animationListener__), u.__resizeTriggers__.__animationListener__ = null);
1921
1935
  try {
1922
1936
  u.__resizeTriggers__ = !u.removeChild(u.__resizeTriggers__);
@@ -1939,24 +1953,24 @@ class Pi extends fo {
1939
1953
  onResize: o
1940
1954
  } = this.props;
1941
1955
  if (this._parentNode) {
1942
- const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), d = parseFloat(a.paddingRight || "0"), s = parseFloat(a.paddingTop || "0"), f = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), C = m.height - s - f, u = m.width - c - d;
1943
- if (!n && this.state.height !== C || !r && this.state.width !== u) {
1956
+ const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), d = parseFloat(a.paddingRight || "0"), s = parseFloat(a.paddingTop || "0"), f = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), T = m.height - s - f, u = m.width - c - d;
1957
+ if (!n && this.state.height !== T || !r && this.state.width !== u) {
1944
1958
  this.setState({
1945
- height: C,
1959
+ height: T,
1946
1960
  width: u
1947
1961
  });
1948
- const T = () => {
1962
+ const C = () => {
1949
1963
  this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
1950
1964
  };
1951
1965
  typeof o == "function" && o({
1952
- height: C,
1966
+ height: T,
1953
1967
  width: u,
1954
1968
  // TODO Remove these params in the next major release
1955
1969
  get scaledHeight() {
1956
- return T(), C;
1970
+ return C(), T;
1957
1971
  },
1958
1972
  get scaledWidth() {
1959
- return T(), u;
1973
+ return C(), u;
1960
1974
  }
1961
1975
  });
1962
1976
  }
@@ -1974,7 +1988,7 @@ class Pi extends fo {
1974
1988
  const r = n.ownerDocument.defaultView.ResizeObserver;
1975
1989
  r != null ? (this._resizeObserver = new r(() => {
1976
1990
  this._timeoutId = setTimeout(this._onResize, 0);
1977
- }), this._resizeObserver.observe(n)) : (this._detectElementResize = _i(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
1991
+ }), this._resizeObserver.observe(n)) : (this._detectElementResize = bi(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
1978
1992
  }
1979
1993
  }
1980
1994
  componentWillUnmount() {
@@ -1992,26 +2006,26 @@ class Pi extends fo {
1992
2006
  onResize: s,
1993
2007
  style: f = {},
1994
2008
  tagName: m = "div",
1995
- ...C
2009
+ ...T
1996
2010
  } = this.props, {
1997
2011
  height: u,
1998
- width: T
1999
- } = this.state, b = {
2012
+ width: C
2013
+ } = this.state, w = {
2000
2014
  overflow: "visible"
2001
2015
  }, P = {};
2002
2016
  let y = !1;
2003
- return o || (u === 0 && (y = !0), b.height = 0, P.height = u, P.scaledHeight = u), a || (T === 0 && (y = !0), b.width = 0, P.width = T, P.scaledWidth = T), c && (y = !1), Qe(m, {
2017
+ return o || (u === 0 && (y = !0), w.height = 0, P.height = u, P.scaledHeight = u), a || (C === 0 && (y = !0), w.width = 0, P.width = C, P.scaledWidth = C), c && (y = !1), Ye(m, {
2004
2018
  ref: this._setRef,
2005
2019
  style: {
2006
- ...b,
2020
+ ...w,
2007
2021
  ...f
2008
2022
  },
2009
- ...C
2023
+ ...T
2010
2024
  }, !y && e(P));
2011
2025
  }
2012
2026
  }
2013
2027
  const Ti = It(({ widths: t, heights: e }) => {
2014
- const { focusedPage: n, totalPages: r } = se(), o = W(() => {
2028
+ const { focusedPage: n, totalPages: r } = de(), o = W(() => {
2015
2029
  const d = [], s = Math.ceil(n / 2) * 2 - 1;
2016
2030
  if (d.push(s), s + 1 <= r) {
2017
2031
  const f = s + 1;
@@ -2019,7 +2033,7 @@ const Ti = It(({ widths: t, heights: e }) => {
2019
2033
  }
2020
2034
  return d;
2021
2035
  }, [n, r]), a = W(() => {
2022
- const d = n % 2 === 1 ? n - 1 : n - 2, s = Math.floor(d / 2), f = e(s), m = t(d), C = t(d + 1);
2036
+ const d = n % 2 === 1 ? n - 1 : n - 2, s = Math.floor(d / 2), f = e(s), m = t(d), T = t(d + 1);
2023
2037
  return [
2024
2038
  {
2025
2039
  position: "absolute",
@@ -2030,14 +2044,14 @@ const Ti = It(({ widths: t, heights: e }) => {
2030
2044
  {
2031
2045
  position: "absolute",
2032
2046
  left: m,
2033
- width: C,
2047
+ width: T,
2034
2048
  height: f
2035
2049
  }
2036
2050
  ];
2037
2051
  }, [t, e, o]), c = W(() => a.reduce((d, s) => d + Number(s.width || 0), 0), [a]);
2038
- return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: o.map((d, s) => /* @__PURE__ */ i(He, { style: a[s], pageNumber: d }, d)) });
2052
+ return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: o.map((d, s) => /* @__PURE__ */ i($e, { style: a[s], pageNumber: d }, d)) });
2039
2053
  }), Ci = It(({ widths: t, heights: e }) => {
2040
- const { focusedPage: n, totalPages: r } = se(), o = W(() => {
2054
+ const { focusedPage: n, totalPages: r } = de(), o = W(() => {
2041
2055
  const d = [];
2042
2056
  if (n === 1)
2043
2057
  return d.push(1), d;
@@ -2045,14 +2059,14 @@ const Ti = It(({ widths: t, heights: e }) => {
2045
2059
  return d.push(m), m + 1 <= r && d.push(m + 1), d;
2046
2060
  }, [n, r]), a = W(() => {
2047
2061
  if (o.length === 1) {
2048
- const T = o[0] - 1, b = t(T);
2049
- let P = b * 2;
2062
+ const C = o[0] - 1, w = t(C);
2063
+ let P = w * 2;
2050
2064
  if (r >= 3) {
2051
- const y = t(1), w = t(2);
2052
- P = y + w;
2065
+ const y = t(1), b = t(2);
2066
+ P = y + b;
2053
2067
  } else if (r >= 2) {
2054
2068
  const y = t(1);
2055
- P = b + y;
2069
+ P = w + y;
2056
2070
  }
2057
2071
  return {
2058
2072
  width: P,
@@ -2069,7 +2083,7 @@ const Ti = It(({ widths: t, heights: e }) => {
2069
2083
  };
2070
2084
  }, [t, o, r]), c = W(() => {
2071
2085
  if (o.length === 1) {
2072
- const b = o[0], P = b - 1, y = e(b === 1 ? 0 : Math.floor((b - 2) / 2) + 1);
2086
+ const w = o[0], P = w - 1, y = e(w === 1 ? 0 : Math.floor((w - 2) / 2) + 1);
2073
2087
  return [{
2074
2088
  width: t(P),
2075
2089
  height: y,
@@ -2077,25 +2091,25 @@ const Ti = It(({ widths: t, heights: e }) => {
2077
2091
  // Use relative for flexbox centering
2078
2092
  }];
2079
2093
  }
2080
- const d = o[0], s = d - 1, f = Math.floor((d - 2) / 2) + 1, m = e(f), C = t(s), u = t(s + 1);
2094
+ const d = o[0], s = d - 1, f = Math.floor((d - 2) / 2) + 1, m = e(f), T = t(s), u = t(s + 1);
2081
2095
  return [
2082
2096
  {
2083
2097
  position: "absolute",
2084
2098
  left: 0,
2085
- width: C,
2099
+ width: T,
2086
2100
  height: m
2087
2101
  },
2088
2102
  {
2089
2103
  position: "absolute",
2090
- left: C,
2104
+ left: T,
2091
2105
  width: u,
2092
2106
  height: m
2093
2107
  }
2094
2108
  ];
2095
2109
  }, [t, e, o]);
2096
- return /* @__PURE__ */ i("div", { style: a, children: o.map((d, s) => /* @__PURE__ */ i(He, { style: c[s], pageNumber: d }, d)) });
2110
+ return /* @__PURE__ */ i("div", { style: a, children: o.map((d, s) => /* @__PURE__ */ i($e, { style: c[s], pageNumber: d }, d)) });
2097
2111
  }), yi = ({ widths: t, heights: e }) => {
2098
- const { focusedPage: n } = se(), r = W(() => ({
2112
+ const { focusedPage: n } = de(), r = W(() => ({
2099
2113
  position: "absolute",
2100
2114
  width: t(n - 1),
2101
2115
  height: e(n - 1)
@@ -2107,14 +2121,14 @@ const Ti = It(({ widths: t, heights: e }) => {
2107
2121
  width: o,
2108
2122
  position: "relative"
2109
2123
  },
2110
- children: /* @__PURE__ */ i(He, { style: r, pageNumber: n }, n)
2124
+ children: /* @__PURE__ */ i($e, { style: r, pageNumber: n }, n)
2111
2125
  }
2112
2126
  );
2113
2127
  }, Ii = (t, e, n, r) => {
2114
- const o = M(), { contentRef: a } = Te(), { heights: c, widths: d } = je(), { setFocusedPage: s } = se(), [f, m] = H([]), { targetScrollPage: C } = wn(), u = Nt(f, 0, 500), T = W(() => {
2115
- const P = r === ne.DUAL_PAGE_WITH_COVER, { rowsHeight: y, columnsWidth: w } = Et({ heights: c, widths: d }, t, P);
2128
+ const o = M(), { contentRef: a } = Ce(), { heights: c, widths: d } = Ke(), { setFocusedPage: s } = de(), [f, m] = H([]), { targetScrollPage: T } = wn(), u = Nt(f, 0, 500), C = W(() => {
2129
+ const P = r === ee.DUAL_PAGE_WITH_COVER, { rowsHeight: y, columnsWidth: b } = Et({ heights: c, widths: d }, t, P);
2116
2130
  return c.map((g, h) => {
2117
- const p = d[h], l = lr(h + 1, t, P), v = w.slice(0, l.columnIndex).reduce((x, R) => x + R, 0), _ = y.slice(0, l.rowIndex).reduce((x, R) => x + R, 0), I = v + p, S = _ + g;
2131
+ const p = d[h], l = lr(h + 1, t, P), v = b.slice(0, l.columnIndex).reduce((S, R) => S + R, 0), _ = y.slice(0, l.rowIndex).reduce((S, R) => S + R, 0), I = v + p, x = _ + g;
2118
2132
  return {
2119
2133
  pageNumber: h + 1,
2120
2134
  ...l,
@@ -2123,29 +2137,29 @@ const Ti = It(({ widths: t, heights: e }) => {
2123
2137
  startX: v,
2124
2138
  startY: _,
2125
2139
  endX: I,
2126
- endY: S
2140
+ endY: x
2127
2141
  };
2128
2142
  });
2129
2143
  }, [c, d, t, e, r]);
2130
- A(() => {
2144
+ z(() => {
2131
2145
  var y;
2132
- u.length > 0 && !C.current && s(u[0].pageNumber), ((y = u[0]) == null ? void 0 : y.ratio) && u.some((w) => w.pageNumber === C.current) && setTimeout(() => {
2133
- C.current = void 0;
2146
+ u.length > 0 && !T.current && s(u[0].pageNumber), ((y = u[0]) == null ? void 0 : y.ratio) && u.some((b) => b.pageNumber === T.current) && setTimeout(() => {
2147
+ T.current = void 0;
2134
2148
  }, 500);
2135
2149
  }, [u, s]);
2136
- const b = N(
2150
+ const w = O(
2137
2151
  (P) => {
2138
2152
  o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
2139
- const y = P.target, w = {
2153
+ const y = P.target, b = {
2140
2154
  startTop: y.scrollTop,
2141
2155
  startLeft: y.scrollLeft,
2142
2156
  endTop: y.scrollTop + y.clientHeight,
2143
2157
  endLeft: y.scrollLeft + y.clientWidth
2144
- }, g = T.filter((h) => {
2145
- const p = h.endX >= w.startLeft && h.endY >= w.startTop, l = h.startX <= w.endLeft && h.startY <= w.endTop;
2158
+ }, g = C.filter((h) => {
2159
+ const p = h.endX >= b.startLeft && h.endY >= b.startTop, l = h.startX <= b.endLeft && h.startY <= b.endTop;
2146
2160
  return p && l;
2147
2161
  }).map((h) => {
2148
- const p = w.startLeft > h.startX ? w.startLeft : h.startX, l = w.startTop > h.startY ? w.startTop : h.startY, v = w.endLeft < h.endX ? w.endLeft : h.endX, _ = w.endTop < h.endY ? w.endTop : h.endY, I = v - p, S = _ - l, R = +(I * S / (h.width * h.height) * 100).toFixed(2);
2162
+ const p = b.startLeft > h.startX ? b.startLeft : h.startX, l = b.startTop > h.startY ? b.startTop : h.startY, v = b.endLeft < h.endX ? b.endLeft : h.endX, _ = b.endTop < h.endY ? b.endTop : h.endY, I = v - p, x = _ - l, R = +(I * x / (h.width * h.height) * 100).toFixed(2);
2149
2163
  return {
2150
2164
  pageNumber: h.pageNumber,
2151
2165
  ratio: R
@@ -2154,22 +2168,22 @@ const Ti = It(({ widths: t, heights: e }) => {
2154
2168
  m(g);
2155
2169
  });
2156
2170
  },
2157
- [a, T]
2171
+ [a, C]
2158
2172
  );
2159
- A(() => {
2173
+ z(() => {
2160
2174
  if (n)
2161
- return n == null || n.addEventListener("scroll", b), () => {
2162
- n == null || n.removeEventListener("scroll", b);
2175
+ return n == null || n.addEventListener("scroll", w), () => {
2176
+ n == null || n.removeEventListener("scroll", w);
2163
2177
  };
2164
- }, [n, b]);
2165
- }, zn = at((t, e) => {
2166
- const { children: n, toolbarRef: r, style: o, className: a, ...c } = t, { customVariables: d, customDarkVariables: s } = zo(), { darkMode: f } = _o();
2178
+ }, [n, w]);
2179
+ }, zn = st((t, e) => {
2180
+ const { children: n, toolbarRef: r, style: o, className: a, ...c } = t, { customVariables: d, customDarkVariables: s } = zo(), { darkMode: f } = bo();
2167
2181
  return /* @__PURE__ */ i(
2168
2182
  "div",
2169
2183
  {
2170
2184
  ref: e,
2171
2185
  ...c,
2172
- className: ae(
2186
+ className: le(
2173
2187
  Ie["rp-theme-variables"],
2174
2188
  Ie["rp-container"],
2175
2189
  f ? Ie["rp-dark-mode"] : "",
@@ -2207,7 +2221,7 @@ const Ti = It(({ widths: t, heights: e }) => {
2207
2221
  justifyContent: "center",
2208
2222
  alignItems: "flex-start"
2209
2223
  },
2210
- children: /* @__PURE__ */ i(He, { style: { position: "relative" }, pageNumber: o }, o)
2224
+ children: /* @__PURE__ */ i($e, { style: { position: "relative" }, pageNumber: o }, o)
2211
2225
  }
2212
2226
  );
2213
2227
  }
@@ -2221,103 +2235,103 @@ const Ti = It(({ widths: t, heights: e }) => {
2221
2235
  justifyContent: t === 0 ? "flex-end" : "flex-start",
2222
2236
  alignItems: "flex-start"
2223
2237
  },
2224
- children: /* @__PURE__ */ i(He, { style: { position: "relative" }, pageNumber: o }, o)
2238
+ children: /* @__PURE__ */ i($e, { style: { position: "relative" }, pageNumber: o }, o)
2225
2239
  }
2226
- ) : /* @__PURE__ */ i(He, { style: r, pageNumber: o }, o);
2240
+ ) : /* @__PURE__ */ i($e, { style: r, pageNumber: o }, o);
2227
2241
  }, wi), Sc = () => {
2228
- const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = xt(), { pagesRef: r, setPagesRef: o, setContentRef: a } = Te(), { scrollToPage: c } = yn();
2242
+ const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = xt(), { pagesRef: r, setPagesRef: o, setContentRef: a } = Ce(), { scrollToPage: c } = yn();
2229
2243
  mr(r);
2230
2244
  const {
2231
2245
  virtualScrollRef: d,
2232
2246
  getVirtualScrollRef: s,
2233
2247
  getPageScrollElementRef: f,
2234
2248
  getVirtualScrollableElementRef: m,
2235
- setTotalInnerDimensions: C,
2249
+ setTotalInnerDimensions: T,
2236
2250
  virtualScrollableElementRef: u,
2237
- totalInnerDimensions: T,
2238
- pageScrollElementRef: b
2239
- } = rt(), P = M(!0), { nextPage: y, prevPage: w, setFocusedPage: g, focusedPage: h, totalPages: p } = se(), { scrollMode: l } = Ae(), { viewMode: v } = $e(), _ = M(null), { loading: I, error: S } = oe(), { passwordRequired: x } = bo(), { LoaderImageComponent: R } = St(), O = M(
2240
- T
2241
- ), D = M({
2251
+ totalInnerDimensions: C,
2252
+ pageScrollElementRef: w
2253
+ } = it(), P = M(!0), { nextPage: y, prevPage: b, setFocusedPage: g, focusedPage: h, totalPages: p } = de(), { scrollMode: l } = Ae(), { viewMode: v } = Ge(), _ = M(null), { loading: I, error: x } = re(), { passwordRequired: S } = _o(), { LoaderImageComponent: R } = St(), N = M(
2254
+ C
2255
+ ), A = M({
2242
2256
  viewMode: v,
2243
2257
  scrollMode: l
2244
- }), z = M(!1), E = M(), { isFullScreen: L } = Co(), {
2245
- pageDimension: F,
2246
- rowCount: G,
2247
- rowHeight: U,
2248
- columnCount: V,
2249
- columnWidth: B,
2250
- estimatedColumnWidth: Z,
2251
- estimatedRowHeight: ie,
2252
- totalDimension: $
2253
- } = bi(), Y = Nt(T, 100), { onScroll: J, onTextSelect: pe } = Ao();
2254
- gr({ onTextSelect: pe, pagesRef: r });
2255
- const ee = M();
2256
- Ii(V, G, u, v);
2258
+ }), F = M(!1), D = M(), { isFullScreen: L } = Co(), {
2259
+ pageDimension: E,
2260
+ rowCount: U,
2261
+ rowHeight: V,
2262
+ columnCount: $,
2263
+ columnWidth: q,
2264
+ estimatedColumnWidth: j,
2265
+ estimatedRowHeight: te,
2266
+ totalDimension: G
2267
+ } = _i(), Y = Nt(C, 100), { onScroll: J, onTextSelect: me } = Ao();
2268
+ gr({ onTextSelect: me, pagesRef: r });
2269
+ const ne = M();
2270
+ Ii($, U, u, v);
2257
2271
  const Q = M({
2258
2272
  scrollTop: 0,
2259
2273
  scrollLeft: 0
2260
2274
  });
2261
2275
  hr(r);
2262
- const { isPressed: he } = ur(), { selectionMode: ge } = To(), { initializeGrabScroll: ye, resetGrabState: lt } = pr({
2263
- isPressed: he
2264
- }), Le = W(() => ge === vo.HAND, [ge]), oo = W(() => {
2265
- const q = Array.from({ length: V }, (j, be) => B(be));
2276
+ const { isPressed: ie } = ur(), { selectionMode: se } = To(), { initializeGrabScroll: ce, resetGrabState: ze } = pr({
2277
+ isPressed: ie
2278
+ }), Le = W(() => se === vo.HAND, [se]), oo = W(() => {
2279
+ const B = Array.from({ length: $ }, (Z, be) => q(be));
2266
2280
  return {
2267
- columnCount: V,
2268
- isDualPageWithCover: v === ne.DUAL_PAGE_WITH_COVER,
2269
- columnWidths: q,
2281
+ columnCount: $,
2282
+ isDualPageWithCover: v === ee.DUAL_PAGE_WITH_COVER,
2283
+ columnWidths: B,
2270
2284
  totalPages: p
2271
2285
  };
2272
- }, [V, v, B, p]), dt = N(
2273
- (q) => {
2274
- const j = document.activeElement !== r;
2275
- !L && j || (["ArrowUp", "ArrowLeft"].includes(q.key) ? (q.preventDefault(), w()) : ["ArrowDown", "ArrowRight"].includes(q.key) && (q.preventDefault(), y()));
2286
+ }, [$, v, q, p]), dt = O(
2287
+ (B) => {
2288
+ const Z = document.activeElement !== r;
2289
+ !L && Z || (["ArrowUp", "ArrowLeft"].includes(B.key) ? (B.preventDefault(), b()) : ["ArrowDown", "ArrowRight"].includes(B.key) && (B.preventDefault(), y()));
2276
2290
  },
2277
- [y, w, L, l]
2291
+ [y, b, L, l]
2278
2292
  );
2279
- A(() => (window.addEventListener("keydown", dt), () => {
2293
+ z(() => (window.addEventListener("keydown", dt), () => {
2280
2294
  window.removeEventListener("keydown", dt);
2281
- }), [dt]), A(() => {
2295
+ }), [dt]), z(() => {
2282
2296
  if (_.current && (_.current.style.position = "relative"), !!d)
2283
- for (let q = 0; q < G; q++)
2284
- for (let j = 0; j < V; j++)
2297
+ for (let B = 0; B < U; B++)
2298
+ for (let Z = 0; Z < $; Z++)
2285
2299
  d.resetAfterIndices({
2286
- columnIndex: j,
2287
- rowIndex: q,
2300
+ columnIndex: Z,
2301
+ rowIndex: B,
2288
2302
  shouldForceUpdate: !0
2289
2303
  });
2290
- }, [G, V, F, d]);
2291
- const ro = N(
2292
- (q, j) => {
2304
+ }, [U, $, E, d]);
2305
+ const ro = O(
2306
+ (B, Z) => {
2293
2307
  if (!u)
2294
2308
  return { scrollTop: 0, scrollLeft: 0 };
2295
- const be = Q.current.scrollTop > j, Ee = Q.current.scrollLeft > q;
2309
+ const be = Q.current.scrollTop > Z, Ee = Q.current.scrollLeft > B;
2296
2310
  return be || Ee ? Q.current : {
2297
2311
  scrollTop: u.scrollTop,
2298
2312
  scrollLeft: u.scrollLeft
2299
2313
  };
2300
2314
  },
2301
2315
  [u]
2302
- ), kt = N(
2303
- (q, j) => {
2304
- if (D.current.viewMode !== v || D.current.scrollMode !== l) {
2305
- ee.current && clearTimeout(ee.current), z.current = !0, c(h, "auto"), ee.current = setTimeout(() => {
2316
+ ), kt = O(
2317
+ (B, Z) => {
2318
+ if (A.current.viewMode !== v || A.current.scrollMode !== l) {
2319
+ ne.current && clearTimeout(ne.current), F.current = !0, c(h, "auto"), ne.current = setTimeout(() => {
2306
2320
  requestAnimationFrame(() => {
2307
- D.current = { viewMode: v, scrollMode: l };
2321
+ A.current = { viewMode: v, scrollMode: l };
2308
2322
  });
2309
2323
  }, 100);
2310
2324
  return;
2311
2325
  }
2312
- const Ee = q.scrollTop, ut = q.scrollLeft;
2313
- if (!j.height || !j.width)
2326
+ const Ee = B.scrollTop, ut = B.scrollLeft;
2327
+ if (!Z.height || !Z.width)
2314
2328
  return;
2315
- z.current = !0;
2316
- const { height: Ne, width: pt } = j, { height: Mt, width: Ht } = O.current;
2329
+ F.current = !0;
2330
+ const { height: Ne, width: pt } = Z, { height: Mt, width: Ht } = N.current;
2317
2331
  if (Mt === Ne && Ht === pt)
2318
2332
  return;
2319
2333
  const co = Ee / Mt * Ne, lo = ut / Ht * pt, uo = Math.round(Math.min(co, Ne)) || 0, po = Math.round(Math.min(lo, pt)) || 0;
2320
- E.current = setTimeout(() => {
2334
+ D.current = setTimeout(() => {
2321
2335
  requestAnimationFrame(() => {
2322
2336
  u == null || u.scrollTo({
2323
2337
  top: uo,
@@ -2325,62 +2339,62 @@ const Ti = It(({ widths: t, heights: e }) => {
2325
2339
  behavior: "auto"
2326
2340
  });
2327
2341
  });
2328
- }, 0), O.current = {
2329
- height: j.height,
2330
- width: j.width
2342
+ }, 0), N.current = {
2343
+ height: Z.height,
2344
+ width: Z.width
2331
2345
  };
2332
2346
  },
2333
2347
  [u, v, l, c]
2334
2348
  );
2335
- A(() => {
2336
- clearTimeout(E.current);
2337
- const q = Array.from({ length: G }).reduce(
2338
- (Ee, ut, Ne) => Ee + U(Ne),
2349
+ z(() => {
2350
+ clearTimeout(D.current);
2351
+ const B = Array.from({ length: U }).reduce(
2352
+ (Ee, ut, Ne) => Ee + V(Ne),
2339
2353
  0
2340
- ), j = Array.from({ length: V }).reduce(
2341
- (Ee, ut, Ne) => Ee + B(Ne),
2354
+ ), Z = Array.from({ length: $ }).reduce(
2355
+ (Ee, ut, Ne) => Ee + q(Ne),
2342
2356
  0
2343
- ), be = ro(j, q);
2344
- Q.current = be, kt(be, { height: q, width: j }), C({
2345
- height: q,
2346
- width: j
2357
+ ), be = ro(Z, B);
2358
+ Q.current = be, kt(be, { height: B, width: Z }), T({
2359
+ height: B,
2360
+ width: Z
2347
2361
  });
2348
- }, [F, G, V, kt]);
2349
- const io = N(
2350
- (q) => {
2362
+ }, [E, U, $, kt]);
2363
+ const io = O(
2364
+ (B) => {
2351
2365
  Q.current = {
2352
- scrollTop: q.scrollTop,
2353
- scrollLeft: q.scrollLeft
2366
+ scrollTop: B.scrollTop,
2367
+ scrollLeft: B.scrollLeft
2354
2368
  };
2355
2369
  },
2356
2370
  [u]
2357
2371
  );
2358
- A(() => {
2372
+ z(() => {
2359
2373
  if (J)
2360
- return b && b.addEventListener("scroll", J), u && u.addEventListener("scroll", J), () => {
2361
- b == null || b.removeEventListener("scroll", J), u == null || u.removeEventListener("scroll", J);
2374
+ return w && w.addEventListener("scroll", J), u && u.addEventListener("scroll", J), () => {
2375
+ w == null || w.removeEventListener("scroll", J), u == null || u.removeEventListener("scroll", J);
2362
2376
  };
2363
- }, [u, b, J]), A(() => () => {
2364
- ee.current && clearTimeout(ee.current);
2377
+ }, [u, w, J]), z(() => () => {
2378
+ ne.current && clearTimeout(ne.current);
2365
2379
  }, []);
2366
- const ao = W(() => ae(ce["rp-pages-container"], {
2367
- [ce["rp-cursor-grab"]]: Le && !he,
2368
- [ce["rp-cursor-grabbing"]]: Le && he
2369
- }), [Le, he]), so = N(
2370
- (q) => {
2371
- if (Le && q) {
2372
- const j = ae(ce["rp-pages"]), be = document.querySelector(`.${j}`);
2373
- ye(be);
2380
+ const ao = W(() => le(ue["rp-pages-container"], {
2381
+ [ue["rp-cursor-grab"]]: Le && !ie,
2382
+ [ue["rp-cursor-grabbing"]]: Le && ie
2383
+ }), [Le, ie]), so = O(
2384
+ (B) => {
2385
+ if (Le && B) {
2386
+ const Z = le(ue["rp-pages"]), be = document.querySelector(`.${Z}`);
2387
+ ce(be);
2374
2388
  }
2375
2389
  },
2376
- [Le, ye, ce]
2390
+ [Le, ce, ue]
2377
2391
  );
2378
- return A(() => {
2379
- I && lt();
2380
- }, [I]), A(() => {
2392
+ return z(() => {
2393
+ I && ze();
2394
+ }, [I]), z(() => {
2381
2395
  if (!(Y.height === 0 || !P.current)) {
2382
- if (e === re.PAGE_SCROLLING) {
2383
- t !== h && b && g(t), P.current = !1;
2396
+ if (e === ae.PAGE_SCROLLING) {
2397
+ t !== h && w && g(t), P.current = !1;
2384
2398
  return;
2385
2399
  }
2386
2400
  c(t, "auto"), g(t), P.current = !1;
@@ -2388,26 +2402,26 @@ const Ti = It(({ widths: t, heights: e }) => {
2388
2402
  }, [
2389
2403
  c,
2390
2404
  e,
2391
- b,
2405
+ w,
2392
2406
  g,
2393
2407
  Y
2394
- ]), /* @__PURE__ */ k(fe, { children: [
2395
- /* @__PURE__ */ i(jo, { ref: a, children: /* @__PURE__ */ i(
2408
+ ]), /* @__PURE__ */ k(ge, { children: [
2409
+ /* @__PURE__ */ i(Zo, { ref: a, children: /* @__PURE__ */ i(
2396
2410
  zn,
2397
2411
  {
2398
2412
  id: n,
2399
2413
  ref: o,
2400
2414
  tabIndex: -1,
2401
2415
  className: ao,
2402
- children: /* @__PURE__ */ i(Pi, { style: { minHeight: "50px" }, children: ({ width: q, height: j }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: so, style: { width: q, height: j }, children: l === re.PAGE_SCROLLING ? /* @__PURE__ */ i(
2416
+ children: /* @__PURE__ */ i(Pi, { style: { minHeight: "50px" }, children: ({ width: B, height: Z }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: so, style: { width: B, height: Z }, children: l === ae.PAGE_SCROLLING ? /* @__PURE__ */ i(
2403
2417
  "div",
2404
2418
  {
2405
2419
  ref: f,
2406
- style: { width: q, height: j },
2407
- className: ae(ce["rp-pages"], ce["rp-page-scrolling-wrapper"]),
2408
- children: v === ne.DUAL_PAGE ? /* @__PURE__ */ i(Ti, { widths: B, heights: U }) : v === ne.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ i(Ci, { widths: B, heights: U }) : /* @__PURE__ */ i(yi, { widths: B, heights: U })
2420
+ style: { width: B, height: Z },
2421
+ className: le(ue["rp-pages"], ue["rp-page-scrolling-wrapper"]),
2422
+ children: v === ee.DUAL_PAGE ? /* @__PURE__ */ i(Ti, { widths: q, heights: V }) : v === ee.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ i(Ci, { widths: q, heights: V }) : /* @__PURE__ */ i(yi, { widths: q, heights: V })
2409
2423
  }
2410
- ) : ie ? /* @__PURE__ */ i(
2424
+ ) : te ? /* @__PURE__ */ i(
2411
2425
  mi,
2412
2426
  {
2413
2427
  ref: s,
@@ -2415,30 +2429,30 @@ const Ti = It(({ widths: t, heights: e }) => {
2415
2429
  outerRef: m,
2416
2430
  innerRef: _,
2417
2431
  onScroll: io,
2418
- columnCount: V,
2419
- columnWidth: B,
2420
- rowHeight: U,
2421
- height: j,
2422
- width: q,
2423
- estimatedColumnWidth: Z,
2424
- estimatedRowHeight: ie,
2425
- rowCount: G,
2426
- className: ae(
2427
- ce["rp-pages"],
2428
- l === re.HORIZONTAL_SCROLLING ? ce["rp-pages-horizontal-scroll"] : ""
2432
+ columnCount: $,
2433
+ columnWidth: q,
2434
+ rowHeight: V,
2435
+ height: Z,
2436
+ width: B,
2437
+ estimatedColumnWidth: j,
2438
+ estimatedRowHeight: te,
2439
+ rowCount: U,
2440
+ className: le(
2441
+ ue["rp-pages"],
2442
+ l === ae.HORIZONTAL_SCROLLING ? ue["rp-pages-horizontal-scroll"] : ""
2429
2443
  ),
2430
2444
  style: {
2431
- "--rp-pages-height": `${$.height}px`,
2432
- "--rp-pages-width": `${$.width}px`,
2433
- "--rp-row-count": `${G}`,
2434
- "--rp-column-count": `${V}`
2445
+ "--rp-pages-height": `${G.height}px`,
2446
+ "--rp-pages-width": `${G.width}px`,
2447
+ "--rp-row-count": `${U}`,
2448
+ "--rp-column-count": `${$}`
2435
2449
  },
2436
2450
  children: xi
2437
2451
  }
2438
- ) : !I && !S ? /* @__PURE__ */ i(
2452
+ ) : !I && !x ? /* @__PURE__ */ i(
2439
2453
  "div",
2440
2454
  {
2441
- className: ce["rp-loader"],
2455
+ className: ue["rp-loader"],
2442
2456
  style: {
2443
2457
  display: "flex",
2444
2458
  justifyContent: "center",
@@ -2448,7 +2462,7 @@ const Ti = It(({ widths: t, heights: e }) => {
2448
2462
  },
2449
2463
  children: R && /* @__PURE__ */ i(R, {})
2450
2464
  }
2451
- ) : S === wo.NOT_SUPPORTED ? /* @__PURE__ */ i("div", { className: ce["rp-not-supported"], children: /* @__PURE__ */ k("div", { className: ce["rp-not-supported-content"], children: [
2465
+ ) : x === wo.NOT_SUPPORTED ? /* @__PURE__ */ i("div", { className: ue["rp-not-supported"], children: /* @__PURE__ */ k("div", { className: ue["rp-not-supported-content"], children: [
2452
2466
  "React PDF is unable to render on this browser. Please use the supported browsers from the list below:",
2453
2467
  /* @__PURE__ */ i("div", { children: /* @__PURE__ */ k("ul", { children: [
2454
2468
  /* @__PURE__ */ i("li", { children: "Chrome 119+" }),
@@ -2461,43 +2475,43 @@ const Ti = It(({ widths: t, heights: e }) => {
2461
2475
  ] }) }) : null }) })
2462
2476
  }
2463
2477
  ) }),
2464
- x && /* @__PURE__ */ i(fr, {})
2478
+ S && /* @__PURE__ */ i(fr, {})
2465
2479
  ] });
2466
- }, Ge = {
2480
+ }, Ue = {
2467
2481
  "rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
2468
2482
  "rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
2469
2483
  "rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
2470
2484
  "rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
2471
2485
  "rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
2472
- }, _t = {
2486
+ }, bt = {
2473
2487
  "rp-paginate": "_rp-paginate_1yinm_1",
2474
2488
  "rp-page-input": "_rp-page-input_1yinm_6",
2475
2489
  "rp-total-page": "_rp-total-page_1yinm_29"
2476
2490
  }, Si = () => {
2477
- const { prevIcon: t } = we(), { prevIcon: e } = ve();
2478
- return t || e || /* @__PURE__ */ i(qe, {});
2491
+ const { prevIcon: t } = _e(), { prevIcon: e } = we();
2492
+ return t || e || /* @__PURE__ */ i(Be, {});
2479
2493
  }, Ri = () => {
2480
- const { nextIcon: t } = we(), { nextIcon: e } = ve();
2481
- return t || e || /* @__PURE__ */ i(qe, { style: { transform: "rotate(180deg" } });
2494
+ const { nextIcon: t } = _e(), { nextIcon: e } = we();
2495
+ return t || e || /* @__PURE__ */ i(Be, { style: { transform: "rotate(180deg" } });
2482
2496
  }, Li = () => {
2483
- const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: a } = se(), [c, d] = H(t.toString()), { pageNavigationTool: s = !0 } = Ce(), { pageNavigationTool: f = !0 } = Se(), { isSmallScreen: m } = Re(), { viewMode: C } = $e(), { scrollMode: u } = Ae(), { localeMessages: T } = ue();
2484
- A(() => {
2497
+ const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: a } = de(), [c, d] = H(t.toString()), { pageNavigationTool: s = !0 } = ye(), { pageNavigationTool: f = !0 } = Se(), { isSmallScreen: m } = Re(), { viewMode: T } = Ge(), { scrollMode: u } = Ae(), { localeMessages: C } = fe();
2498
+ z(() => {
2485
2499
  d(t.toString());
2486
2500
  }, [t]);
2487
- const b = N((h) => {
2501
+ const w = O((h) => {
2488
2502
  const p = h.target.value;
2489
2503
  d(p);
2490
- }, []), P = N(async () => {
2504
+ }, []), P = O(async () => {
2491
2505
  const h = a(c);
2492
2506
  h.success || d(h.currentPage.toString());
2493
- }, [a, c, e]), y = N(() => {
2507
+ }, [a, c, e]), y = O(() => {
2494
2508
  d(t.toString());
2495
- }, [t]), w = N(
2509
+ }, [t]), b = O(
2496
2510
  (h) => {
2497
2511
  h.key === "Enter" && P();
2498
2512
  },
2499
2513
  [P]
2500
- ), g = W(() => C === ne.DUAL_PAGE && u === re.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, C, u]);
2514
+ ), g = W(() => T === ee.DUAL_PAGE && u === ae.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, T, u]);
2501
2515
  return !s || !f ? null : typeof s != "boolean" ? /* @__PURE__ */ i(
2502
2516
  s,
2503
2517
  {
@@ -2518,27 +2532,27 @@ const Ti = It(({ widths: t, heights: e }) => {
2518
2532
  goToPage: a,
2519
2533
  changePage: n
2520
2534
  }
2521
- ) : /* @__PURE__ */ k("div", { className: _t["rp-paginate"], children: [
2522
- !m && /* @__PURE__ */ i(K, { content: T == null ? void 0 : T.previousPageTooltip, children: /* @__PURE__ */ i(
2523
- le,
2535
+ ) : /* @__PURE__ */ k("div", { className: bt["rp-paginate"], children: [
2536
+ !m && /* @__PURE__ */ i(K, { content: C == null ? void 0 : C.previousPageTooltip, children: /* @__PURE__ */ i(
2537
+ pe,
2524
2538
  {
2525
2539
  onClick: o,
2526
- "aria-label": T == null ? void 0 : T.previousPageTooltip,
2540
+ "aria-label": C == null ? void 0 : C.previousPageTooltip,
2527
2541
  "aria-disabled": t === 1,
2528
2542
  children: /* @__PURE__ */ i(Si, {})
2529
2543
  }
2530
2544
  ) }),
2531
- /* @__PURE__ */ i(K, { content: T == null ? void 0 : T.currentPageTooltip, children: /* @__PURE__ */ i(
2545
+ /* @__PURE__ */ i(K, { content: C == null ? void 0 : C.currentPageTooltip, children: /* @__PURE__ */ i(
2532
2546
  gn,
2533
2547
  {
2534
- onKeyDown: w,
2548
+ onKeyDown: b,
2535
2549
  onBlur: y,
2536
- onChange: b,
2550
+ onChange: w,
2537
2551
  value: c,
2538
- className: _t["rp-page-input"],
2552
+ className: bt["rp-page-input"],
2539
2553
  id: "page-input",
2540
2554
  name: "page-input",
2541
- "aria-label": T == null ? void 0 : T.currentPageTooltip,
2555
+ "aria-label": C == null ? void 0 : C.currentPageTooltip,
2542
2556
  "aria-valuemin": 1,
2543
2557
  "aria-valuemax": e,
2544
2558
  "aria-valuenow": parseInt(c) || t,
@@ -2547,22 +2561,22 @@ const Ti = It(({ widths: t, heights: e }) => {
2547
2561
  max: e
2548
2562
  }
2549
2563
  ) }),
2550
- /* @__PURE__ */ k("span", { className: _t["rp-total-page"], children: [
2564
+ /* @__PURE__ */ k("span", { className: bt["rp-total-page"], children: [
2551
2565
  "/",
2552
2566
  e
2553
2567
  ] }),
2554
- !m && /* @__PURE__ */ i(K, { content: T == null ? void 0 : T.nextPageTooltip, children: /* @__PURE__ */ i(
2555
- le,
2568
+ !m && /* @__PURE__ */ i(K, { content: C == null ? void 0 : C.nextPageTooltip, children: /* @__PURE__ */ i(
2569
+ pe,
2556
2570
  {
2557
2571
  onClick: r,
2558
- "aria-label": T == null ? void 0 : T.nextPageTooltip,
2572
+ "aria-label": C == null ? void 0 : C.nextPageTooltip,
2559
2573
  "aria-disabled": g,
2560
2574
  children: /* @__PURE__ */ i(Ri, {})
2561
2575
  }
2562
2576
  ) })
2563
2577
  ] });
2564
2578
  };
2565
- var ct = "Dialog", [Wn, Rc] = Tr(ct), [Ei, me] = Wn(ct), Fn = (t) => {
2579
+ var lt = "Dialog", [Wn, Rc] = Tr(lt), [Ei, ve] = Wn(lt), Fn = (t) => {
2566
2580
  const {
2567
2581
  __scopeDialog: e,
2568
2582
  children: n,
@@ -2574,7 +2588,7 @@ var ct = "Dialog", [Wn, Rc] = Tr(ct), [Ei, me] = Wn(ct), Fn = (t) => {
2574
2588
  prop: r,
2575
2589
  defaultProp: o ?? !1,
2576
2590
  onChange: a,
2577
- caller: ct
2591
+ caller: lt
2578
2592
  });
2579
2593
  return /* @__PURE__ */ i(
2580
2594
  Ei,
@@ -2587,18 +2601,18 @@ var ct = "Dialog", [Wn, Rc] = Tr(ct), [Ei, me] = Wn(ct), Fn = (t) => {
2587
2601
  descriptionId: ft(),
2588
2602
  open: f,
2589
2603
  onOpenChange: m,
2590
- onOpenToggle: X.useCallback(() => m((C) => !C), [m]),
2604
+ onOpenToggle: X.useCallback(() => m((T) => !T), [m]),
2591
2605
  modal: c,
2592
2606
  children: n
2593
2607
  }
2594
2608
  );
2595
2609
  };
2596
- Fn.displayName = ct;
2610
+ Fn.displayName = lt;
2597
2611
  var kn = "DialogTrigger", Ni = X.forwardRef(
2598
2612
  (t, e) => {
2599
- const { __scopeDialog: n, ...r } = t, o = me(kn, n), a = Ot(e, o.triggerRef);
2613
+ const { __scopeDialog: n, ...r } = t, o = ve(kn, n), a = Ot(e, o.triggerRef);
2600
2614
  return /* @__PURE__ */ i(
2601
- Ke.button,
2615
+ Xe.button,
2602
2616
  {
2603
2617
  type: "button",
2604
2618
  "aria-haspopup": "dialog",
@@ -2607,7 +2621,7 @@ var kn = "DialogTrigger", Ni = X.forwardRef(
2607
2621
  "data-state": Ft(o.open),
2608
2622
  ...r,
2609
2623
  ref: a,
2610
- onClick: Ve(t.onClick, o.onOpenToggle)
2624
+ onClick: qe(t.onClick, o.onOpenToggle)
2611
2625
  }
2612
2626
  );
2613
2627
  }
@@ -2616,25 +2630,25 @@ Ni.displayName = kn;
2616
2630
  var zt = "DialogPortal", [Oi, Mn] = Wn(zt, {
2617
2631
  forceMount: void 0
2618
2632
  }), Hn = (t) => {
2619
- const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, a = me(zt, e);
2633
+ const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, a = ve(zt, e);
2620
2634
  return /* @__PURE__ */ i(Oi, { scope: e, forceMount: n, children: X.Children.map(r, (c) => /* @__PURE__ */ i(Dt, { present: n || a.open, children: /* @__PURE__ */ i(Nr, { asChild: !0, container: o, children: c }) })) });
2621
2635
  };
2622
2636
  Hn.displayName = zt;
2623
- var nt = "DialogOverlay", $n = X.forwardRef(
2637
+ var ot = "DialogOverlay", $n = X.forwardRef(
2624
2638
  (t, e) => {
2625
- const n = Mn(nt, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, a = me(nt, t.__scopeDialog);
2639
+ const n = Mn(ot, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, a = ve(ot, t.__scopeDialog);
2626
2640
  return a.modal ? /* @__PURE__ */ i(Dt, { present: r || a.open, children: /* @__PURE__ */ i(Ai, { ...o, ref: e }) }) : null;
2627
2641
  }
2628
2642
  );
2629
- $n.displayName = nt;
2643
+ $n.displayName = ot;
2630
2644
  var Di = Ir("DialogOverlay.RemoveScroll"), Ai = X.forwardRef(
2631
2645
  (t, e) => {
2632
- const { __scopeDialog: n, ...r } = t, o = me(nt, n);
2646
+ const { __scopeDialog: n, ...r } = t, o = ve(ot, n);
2633
2647
  return (
2634
2648
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2635
2649
  // ie. when `Overlay` and `Content` are siblings
2636
2650
  /* @__PURE__ */ i(Sr, { as: Di, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ i(
2637
- Ke.div,
2651
+ Xe.div,
2638
2652
  {
2639
2653
  "data-state": Ft(o.open),
2640
2654
  ...r,
@@ -2646,14 +2660,14 @@ var Di = Ir("DialogOverlay.RemoveScroll"), Ai = X.forwardRef(
2646
2660
  }
2647
2661
  ), De = "DialogContent", Gn = X.forwardRef(
2648
2662
  (t, e) => {
2649
- const n = Mn(De, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, a = me(De, t.__scopeDialog);
2663
+ const n = Mn(De, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, a = ve(De, t.__scopeDialog);
2650
2664
  return /* @__PURE__ */ i(Dt, { present: r || a.open, children: a.modal ? /* @__PURE__ */ i(zi, { ...o, ref: e }) : /* @__PURE__ */ i(Wi, { ...o, ref: e }) });
2651
2665
  }
2652
2666
  );
2653
2667
  Gn.displayName = De;
2654
2668
  var zi = X.forwardRef(
2655
2669
  (t, e) => {
2656
- const n = me(De, t.__scopeDialog), r = X.useRef(null), o = Ot(e, n.contentRef, r);
2670
+ const n = ve(De, t.__scopeDialog), r = X.useRef(null), o = Ot(e, n.contentRef, r);
2657
2671
  return X.useEffect(() => {
2658
2672
  const a = r.current;
2659
2673
  if (a)
@@ -2665,15 +2679,15 @@ var zi = X.forwardRef(
2665
2679
  ref: o,
2666
2680
  trapFocus: n.open,
2667
2681
  disableOutsidePointerEvents: !0,
2668
- onCloseAutoFocus: Ve(t.onCloseAutoFocus, (a) => {
2682
+ onCloseAutoFocus: qe(t.onCloseAutoFocus, (a) => {
2669
2683
  var c;
2670
2684
  a.preventDefault(), (c = n.triggerRef.current) == null || c.focus();
2671
2685
  }),
2672
- onPointerDownOutside: Ve(t.onPointerDownOutside, (a) => {
2686
+ onPointerDownOutside: qe(t.onPointerDownOutside, (a) => {
2673
2687
  const c = a.detail.originalEvent, d = c.button === 0 && c.ctrlKey === !0;
2674
2688
  (c.button === 2 || d) && a.preventDefault();
2675
2689
  }),
2676
- onFocusOutside: Ve(
2690
+ onFocusOutside: qe(
2677
2691
  t.onFocusOutside,
2678
2692
  (a) => a.preventDefault()
2679
2693
  )
@@ -2682,7 +2696,7 @@ var zi = X.forwardRef(
2682
2696
  }
2683
2697
  ), Wi = X.forwardRef(
2684
2698
  (t, e) => {
2685
- const n = me(De, t.__scopeDialog), r = X.useRef(!1), o = X.useRef(!1);
2699
+ const n = ve(De, t.__scopeDialog), r = X.useRef(!1), o = X.useRef(!1);
2686
2700
  return /* @__PURE__ */ i(
2687
2701
  Un,
2688
2702
  {
@@ -2705,8 +2719,8 @@ var zi = X.forwardRef(
2705
2719
  }
2706
2720
  ), Un = X.forwardRef(
2707
2721
  (t, e) => {
2708
- const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = t, d = me(De, n), s = X.useRef(null), f = Ot(e, s);
2709
- return Lr(), /* @__PURE__ */ k(fe, { children: [
2722
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = t, d = ve(De, n), s = X.useRef(null), f = Ot(e, s);
2723
+ return Lr(), /* @__PURE__ */ k(ge, { children: [
2710
2724
  /* @__PURE__ */ i(
2711
2725
  Er,
2712
2726
  {
@@ -2730,7 +2744,7 @@ var zi = X.forwardRef(
2730
2744
  )
2731
2745
  }
2732
2746
  ),
2733
- /* @__PURE__ */ k(fe, { children: [
2747
+ /* @__PURE__ */ k(ge, { children: [
2734
2748
  /* @__PURE__ */ i(ki, { titleId: d.titleId }),
2735
2749
  /* @__PURE__ */ i(Hi, { contentRef: s, descriptionId: d.descriptionId })
2736
2750
  ] })
@@ -2738,42 +2752,42 @@ var zi = X.forwardRef(
2738
2752
  }
2739
2753
  ), Wt = "DialogTitle", Vn = X.forwardRef(
2740
2754
  (t, e) => {
2741
- const { __scopeDialog: n, ...r } = t, o = me(Wt, n);
2742
- return /* @__PURE__ */ i(Ke.h2, { id: o.titleId, ...r, ref: e });
2755
+ const { __scopeDialog: n, ...r } = t, o = ve(Wt, n);
2756
+ return /* @__PURE__ */ i(Xe.h2, { id: o.titleId, ...r, ref: e });
2743
2757
  }
2744
2758
  );
2745
2759
  Vn.displayName = Wt;
2746
2760
  var qn = "DialogDescription", Fi = X.forwardRef(
2747
2761
  (t, e) => {
2748
- const { __scopeDialog: n, ...r } = t, o = me(qn, n);
2749
- return /* @__PURE__ */ i(Ke.p, { id: o.descriptionId, ...r, ref: e });
2762
+ const { __scopeDialog: n, ...r } = t, o = ve(qn, n);
2763
+ return /* @__PURE__ */ i(Xe.p, { id: o.descriptionId, ...r, ref: e });
2750
2764
  }
2751
2765
  );
2752
2766
  Fi.displayName = qn;
2753
- var Bn = "DialogClose", Zn = X.forwardRef(
2767
+ var Bn = "DialogClose", jn = X.forwardRef(
2754
2768
  (t, e) => {
2755
- const { __scopeDialog: n, ...r } = t, o = me(Bn, n);
2769
+ const { __scopeDialog: n, ...r } = t, o = ve(Bn, n);
2756
2770
  return /* @__PURE__ */ i(
2757
- Ke.button,
2771
+ Xe.button,
2758
2772
  {
2759
2773
  type: "button",
2760
2774
  ...r,
2761
2775
  ref: e,
2762
- onClick: Ve(t.onClick, () => o.onOpenChange(!1))
2776
+ onClick: qe(t.onClick, () => o.onOpenChange(!1))
2763
2777
  }
2764
2778
  );
2765
2779
  }
2766
2780
  );
2767
- Zn.displayName = Bn;
2781
+ jn.displayName = Bn;
2768
2782
  function Ft(t) {
2769
2783
  return t ? "open" : "closed";
2770
2784
  }
2771
- var jn = "DialogTitleWarning", [Lc, Kn] = Cr(jn, {
2785
+ var Zn = "DialogTitleWarning", [Lc, Kn] = Cr(Zn, {
2772
2786
  contentName: De,
2773
2787
  titleName: Wt,
2774
2788
  docsSlug: "dialog"
2775
2789
  }), ki = ({ titleId: t }) => {
2776
- const e = Kn(jn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
2790
+ const e = Kn(Zn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
2777
2791
 
2778
2792
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
2779
2793
 
@@ -2788,7 +2802,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
2788
2802
  const o = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
2789
2803
  e && o && (document.getElementById(e) || console.warn(r));
2790
2804
  }, [r, t, e]), null;
2791
- }, $i = Fn, Gi = Hn, Ui = $n, Vi = Gn, qi = Vn, Bi = Zn;
2805
+ }, $i = Fn, Gi = Hn, Ui = $n, Vi = Gn, qi = Vn, Bi = jn;
2792
2806
  const Oe = {
2793
2807
  "rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
2794
2808
  "rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
@@ -2797,8 +2811,8 @@ const Oe = {
2797
2811
  "rp-dialog-title": "_rp-dialog-title_slqo7_39",
2798
2812
  "rp-dialog-close": "_rp-dialog-close_slqo7_47",
2799
2813
  "rp-properties-divider": "_rp-properties-divider_slqo7_55"
2800
- }, Zi = () => {
2801
- const { pdfProperties: t } = oe(), { container: e } = Te(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = Do(), { localeMessages: o } = ue(), a = W(() => {
2814
+ }, ji = () => {
2815
+ const { pdfProperties: t } = re(), { container: e } = Ce(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = Do(), { localeMessages: o } = fe(), a = W(() => {
2802
2816
  if (!t)
2803
2817
  return [];
2804
2818
  const {
@@ -2807,13 +2821,13 @@ const Oe = {
2807
2821
  title: s,
2808
2822
  author: f,
2809
2823
  subject: m,
2810
- createdOn: C,
2824
+ createdOn: T,
2811
2825
  creator: u,
2812
- keywords: T,
2813
- modifiedOn: b,
2826
+ keywords: C,
2827
+ modifiedOn: w,
2814
2828
  pdfProducer: P,
2815
2829
  pdfVersion: y,
2816
- pageCount: w
2830
+ pageCount: b
2817
2831
  } = t;
2818
2832
  return [
2819
2833
  { label: o == null ? void 0 : o.propertiesFilenameLabel, value: d },
@@ -2822,20 +2836,20 @@ const Oe = {
2822
2836
  { label: o == null ? void 0 : o.propertiesTitleLabel, value: s },
2823
2837
  { label: o == null ? void 0 : o.propertiesAuthorLabel, value: f },
2824
2838
  { label: o == null ? void 0 : o.propertiesSubjectLabel, value: m },
2825
- { label: o == null ? void 0 : o.propertiesKeywordLabel, value: T },
2839
+ { label: o == null ? void 0 : o.propertiesKeywordLabel, value: C },
2826
2840
  { label: o == null ? void 0 : o.propertiesCreatorLabel, value: u },
2827
2841
  {
2828
2842
  label: o == null ? void 0 : o.propertiesCreateOnLabel,
2829
- value: C ? qt(C) : ""
2843
+ value: T ? qt(T) : ""
2830
2844
  },
2831
2845
  {
2832
2846
  label: o == null ? void 0 : o.propertiesModifiedOnLabel,
2833
- value: b ? qt(b) : ""
2847
+ value: w ? qt(w) : ""
2834
2848
  },
2835
2849
  { separate: !0 },
2836
2850
  { label: o == null ? void 0 : o.propertiesPDFProducerLabel, value: P },
2837
2851
  { label: o == null ? void 0 : o.propertiesPDFVersionLabel, value: y },
2838
- { label: o == null ? void 0 : o.propertiesPageCountLabel, value: w }
2852
+ { label: o == null ? void 0 : o.propertiesPageCountLabel, value: b }
2839
2853
  ];
2840
2854
  }, [t, o]);
2841
2855
  return /* @__PURE__ */ i($i, { open: n, onOpenChange: r, children: /* @__PURE__ */ i(Gi, { container: e, children: /* @__PURE__ */ k("div", { className: Oe["rp-dialog-wrapper"], children: [
@@ -2846,40 +2860,40 @@ const Oe = {
2846
2860
  /* @__PURE__ */ i(Bi, { asChild: !0, className: Oe["rp-dialog-close"], "aria-label": (o == null ? void 0 : o.searchCloseButtonTooltip) || "Close dialog", children: /* @__PURE__ */ i(Or, { "aria-hidden": "true" }) })
2847
2861
  ] })
2848
2862
  ] }) }) });
2849
- }, ji = {
2863
+ }, Zi = {
2850
2864
  "rp-other-tool-content": "_rp-other-tool-content_su718_1"
2851
2865
  }, un = ".pdf", Ki = (t) => URL.createObjectURL(t), Xi = async (t) => {
2852
2866
  const n = await (await fetch(t)).blob();
2853
2867
  return Ki(n);
2854
2868
  }, Xn = () => {
2855
- const { filename: t, pdfSrc: e } = oe(), { downloadFilename: n } = Lo(), r = (a) => {
2869
+ const { filename: t, pdfSrc: e } = re(), { downloadFilename: n } = Lo(), r = (a) => {
2856
2870
  const c = n || a;
2857
2871
  return c.endsWith(un) ? c : `${c}${un}`;
2858
2872
  };
2859
- return { download: N(async () => {
2873
+ return { download: O(async () => {
2860
2874
  if (!t || !e)
2861
2875
  throw new Error("There is no PDF source to download");
2862
2876
  const a = document.createElement("a");
2863
2877
  a.href = await Xi(e), a.download = r(t), document.body.appendChild(a), a.click(), document.body.removeChild(a);
2864
2878
  }, [t, e]) };
2865
2879
  }, Qn = () => {
2866
- const { downloadIcon: t } = we(), { downloadIcon: e } = ve();
2880
+ const { downloadIcon: t } = _e(), { downloadIcon: e } = we();
2867
2881
  return t || e || /* @__PURE__ */ i(Fr, {});
2868
- }, Yn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Qi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Yn, { localeMessages: e, children: /* @__PURE__ */ i(le, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Qn, {}) }) }), Yi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(xe, { onClick: t, children: /* @__PURE__ */ k(Yn, { className: "rp-menu-item", localeMessages: e, children: [
2882
+ }, Yn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Qi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Yn, { localeMessages: e, children: /* @__PURE__ */ i(pe, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Qn, {}) }) }), Yi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(xe, { onClick: t, children: /* @__PURE__ */ k(Yn, { className: "rp-menu-item", localeMessages: e, children: [
2869
2883
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Qn, {}) }),
2870
2884
  e == null ? void 0 : e.downloadFileLabel
2871
2885
  ] }) }), Jn = () => {
2872
- const { download: t } = Xn(), { downloadTool: e = !0 } = Ce(), { downloadTool: n = !0 } = Se(), { isSmallScreen: r } = Re(), { localeMessages: o } = ue(), a = o == null ? void 0 : o.downloadFileTooltip;
2886
+ const { download: t } = Xn(), { downloadTool: e = !0 } = ye(), { downloadTool: n = !0 } = Se(), { isSmallScreen: r } = Re(), { localeMessages: o } = fe(), a = o == null ? void 0 : o.downloadFileTooltip;
2873
2887
  return !e || !n ? null : r ? /* @__PURE__ */ i(Yi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(K, { content: a, children: /* @__PURE__ */ i(e, { download: t }) }) : typeof n == "function" ? /* @__PURE__ */ i(K, { content: a, children: /* @__PURE__ */ i(n, { download: t }) }) : /* @__PURE__ */ i(Qi, { download: t, localeMessages: o });
2874
2888
  }, eo = () => {
2875
- const { printIcon: t } = we(), { printIcon: e } = ve();
2889
+ const { printIcon: t } = _e(), { printIcon: e } = we();
2876
2890
  return t || e || /* @__PURE__ */ i(kr, {});
2877
- }, to = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Ji = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(to, { localeMessages: e, children: /* @__PURE__ */ i(le, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(eo, {}) }) }), ea = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(xe, { onClick: t, children: /* @__PURE__ */ k(to, { className: "rp-menu-item", localeMessages: e, children: [
2891
+ }, to = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Ji = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(to, { localeMessages: e, children: /* @__PURE__ */ i(pe, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(eo, {}) }) }), ea = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(xe, { onClick: t, children: /* @__PURE__ */ k(to, { className: "rp-menu-item", localeMessages: e, children: [
2878
2892
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(eo, {}) }),
2879
2893
  e == null ? void 0 : e.printLabel
2880
2894
  ] }) }), no = () => {
2881
- const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: a, showDefaultProgress: c } = st(), { printTool: d = !0 } = Ce(), { printTool: s = !0 } = Se(), { isSmallScreen: f } = Re(), { localeMessages: m } = ue(), C = m == null ? void 0 : m.printTooltip;
2882
- return !d || !s ? null : f ? /* @__PURE__ */ i(ea, { print: t, localeMessages: m }) : typeof d == "function" ? /* @__PURE__ */ i(K, { content: C, children: /* @__PURE__ */ i(
2895
+ const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: a, showDefaultProgress: c } = ct(), { printTool: d = !0 } = ye(), { printTool: s = !0 } = Se(), { isSmallScreen: f } = Re(), { localeMessages: m } = fe(), T = m == null ? void 0 : m.printTooltip;
2896
+ return !d || !s ? null : f ? /* @__PURE__ */ i(ea, { print: t, localeMessages: m }) : typeof d == "function" ? /* @__PURE__ */ i(K, { content: T, children: /* @__PURE__ */ i(
2883
2897
  d,
2884
2898
  {
2885
2899
  print: t,
@@ -2890,7 +2904,7 @@ const Oe = {
2890
2904
  progress: a,
2891
2905
  showDefaultProgress: c
2892
2906
  }
2893
- ) }) : typeof s == "function" ? /* @__PURE__ */ i(K, { content: C, children: /* @__PURE__ */ i(
2907
+ ) }) : typeof s == "function" ? /* @__PURE__ */ i(K, { content: T, children: /* @__PURE__ */ i(
2894
2908
  s,
2895
2909
  {
2896
2910
  print: t,
@@ -2905,18 +2919,18 @@ const Oe = {
2905
2919
  }, ta = {
2906
2920
  "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2907
2921
  }, na = () => {
2908
- const { goToFirstPageIcon: t } = we(), { goToFirstPageIcon: e } = ve();
2922
+ const { goToFirstPageIcon: t } = _e(), { goToFirstPageIcon: e } = we();
2909
2923
  return t || e || /* @__PURE__ */ i(Tn, { className: ta["rp-go-to-Top"] });
2910
2924
  }, oa = () => {
2911
- const { goToLastPageIcon: t } = we(), { goToLastPageIcon: e } = ve();
2925
+ const { goToLastPageIcon: t } = _e(), { goToLastPageIcon: e } = we();
2912
2926
  return t || e || /* @__PURE__ */ i(Tn, {});
2913
2927
  }, pn = { width: "100%" }, ra = () => {
2914
- const { goToPage: t, totalPages: e, focusedPage: n } = se(), { jumpNavigationTool: r = !0 } = Ce(), { jumpNavigationTool: o = !0 } = Se(), { localeMessages: a } = ue(), c = W(() => n === 1, [n]), d = W(() => n === e, [n, e]), s = N(() => {
2928
+ const { goToPage: t, totalPages: e, focusedPage: n } = de(), { jumpNavigationTool: r = !0 } = ye(), { jumpNavigationTool: o = !0 } = Se(), { localeMessages: a } = fe(), c = W(() => n === 1, [n]), d = W(() => n === e, [n, e]), s = O(() => {
2915
2929
  t(1);
2916
- }, [t]), f = N(() => {
2930
+ }, [t]), f = O(() => {
2917
2931
  t(e);
2918
2932
  }, [t, e]);
2919
- return !r || !o ? null : /* @__PURE__ */ k(tt, { children: [
2933
+ return !r || !o ? null : /* @__PURE__ */ k(nt, { children: [
2920
2934
  /* @__PURE__ */ i(xe, { onClick: s, children: /* @__PURE__ */ i(K, { content: a == null ? void 0 : a.firstPageTooltip, style: pn, children: /* @__PURE__ */ k("div", { className: "rp-menu-item", "aria-disabled": c, children: [
2921
2935
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(na, {}) }),
2922
2936
  /* @__PURE__ */ i("span", { children: a == null ? void 0 : a.firstPageLabel })
@@ -2928,21 +2942,21 @@ const Oe = {
2928
2942
  /* @__PURE__ */ i(Lt, {})
2929
2943
  ] });
2930
2944
  }, ia = () => {
2931
- const [t, e] = H(!1), { container: n, pagesRef: r } = Te(), { isSmallScreen: o } = Re(), {
2945
+ const [t, e] = H(!1), { container: n, pagesRef: r } = Ce(), { isSmallScreen: o } = Re(), {
2932
2946
  openFileTool: a,
2933
2947
  downloadTool: c,
2934
2948
  documentProperties: d,
2935
2949
  scrollModeTool: s,
2936
2950
  rotateTool: f,
2937
2951
  selectionModeTool: m,
2938
- jumpNavigationTool: C,
2952
+ jumpNavigationTool: T,
2939
2953
  printTool: u,
2940
- fullscreenTool: T,
2941
- viewModeTool: b
2942
- } = Ce(), {
2954
+ fullscreenTool: C,
2955
+ viewModeTool: w
2956
+ } = ye(), {
2943
2957
  openFileTool: P,
2944
2958
  downloadTool: y,
2945
- documentProperties: w,
2959
+ documentProperties: b,
2946
2960
  scrollModeTool: g,
2947
2961
  rotateTool: h,
2948
2962
  selectionModeTool: p,
@@ -2950,46 +2964,46 @@ const Oe = {
2950
2964
  printTool: v,
2951
2965
  fullscreenTool: _,
2952
2966
  viewModeTool: I
2953
- } = Se(), { localeMessages: S } = ue(), [x, R] = H(0), O = M(
2954
- new ResizeObserver((E) => {
2955
- R(E[0].contentRect.height);
2967
+ } = Se(), { localeMessages: x } = fe(), [S, R] = H(0), N = M(
2968
+ new ResizeObserver((D) => {
2969
+ R(D[0].contentRect.height);
2956
2970
  })
2957
- ), D = W(() => C || f || m || s || d || b || o && (a || c || u || T), [
2971
+ ), A = W(() => T || f || m || s || d || w || o && (a || c || u || C), [
2958
2972
  a,
2959
2973
  c,
2960
2974
  u,
2961
- T,
2975
+ C,
2962
2976
  d,
2963
2977
  s,
2964
2978
  f,
2965
2979
  m,
2966
- C,
2980
+ T,
2967
2981
  o
2968
- ]), z = W(() => l || h || p || g || w || I || o && (P || y || v || _), [
2982
+ ]), F = W(() => l || h || p || g || b || I || o && (P || y || v || _), [
2969
2983
  P,
2970
2984
  y,
2971
2985
  v,
2972
2986
  _,
2973
- w,
2987
+ b,
2974
2988
  g,
2975
2989
  h,
2976
2990
  p,
2977
2991
  l,
2978
2992
  o
2979
2993
  ]);
2980
- return A(() => (r && O.current.observe(r), () => {
2981
- O.current.disconnect();
2982
- }), [r]), !D || !z ? null : /* @__PURE__ */ k(fe, { children: [
2994
+ return z(() => (r && N.current.observe(r), () => {
2995
+ N.current.disconnect();
2996
+ }), [r]), !A || !F ? null : /* @__PURE__ */ k(ge, { children: [
2983
2997
  /* @__PURE__ */ i(
2984
2998
  Rt,
2985
2999
  {
2986
3000
  container: n,
2987
3001
  onOpenChange: e,
2988
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", "aria-haspopup": "menu", children: /* @__PURE__ */ i(K, { content: S == null ? void 0 : S.moreOptionTooltip, children: /* @__PURE__ */ i(
2989
- le,
3002
+ triggerComponent: /* @__PURE__ */ i("div", { role: "button", "aria-haspopup": "menu", children: /* @__PURE__ */ i(K, { content: x == null ? void 0 : x.moreOptionTooltip, children: /* @__PURE__ */ i(
3003
+ pe,
2990
3004
  {
2991
3005
  active: t,
2992
- "aria-label": S == null ? void 0 : S.moreOptionTooltip,
3006
+ "aria-label": x == null ? void 0 : x.moreOptionTooltip,
2993
3007
  "aria-expanded": t,
2994
3008
  children: /* @__PURE__ */ i(Pr, { "aria-hidden": "true" })
2995
3009
  }
@@ -2999,12 +3013,12 @@ const Oe = {
2999
3013
  children: /* @__PURE__ */ k(
3000
3014
  "div",
3001
3015
  {
3002
- style: { maxHeight: `${x}px`, overflow: "auto" },
3003
- className: ji["rp-other-tool-content"],
3016
+ style: { maxHeight: `${S}px`, overflow: "auto" },
3017
+ className: Zi["rp-other-tool-content"],
3004
3018
  "data-rp": "moreOptionsDropdown",
3005
3019
  children: [
3006
- o && /* @__PURE__ */ k(tt, { children: [
3007
- /* @__PURE__ */ i(_n, {}),
3020
+ o && /* @__PURE__ */ k(nt, { children: [
3021
+ /* @__PURE__ */ i(bn, {}),
3008
3022
  /* @__PURE__ */ i(Jn, {}),
3009
3023
  /* @__PURE__ */ i(no, {}),
3010
3024
  /* @__PURE__ */ i(Pn, {}),
@@ -3021,21 +3035,21 @@ const Oe = {
3021
3035
  )
3022
3036
  }
3023
3037
  ),
3024
- /* @__PURE__ */ i(Zi, {})
3038
+ /* @__PURE__ */ i(ji, {})
3025
3039
  ] });
3026
3040
  }, aa = () => {
3027
3041
  const { isSmallScreen: t } = Re();
3028
- return /* @__PURE__ */ k(fe, { children: [
3029
- /* @__PURE__ */ i(_r, {}),
3030
- !t && /* @__PURE__ */ k(fe, { children: [
3031
- /* @__PURE__ */ i(_n, {}),
3042
+ return /* @__PURE__ */ k(ge, { children: [
3043
+ /* @__PURE__ */ i(br, {}),
3044
+ !t && /* @__PURE__ */ k(ge, { children: [
3045
+ /* @__PURE__ */ i(bn, {}),
3032
3046
  /* @__PURE__ */ i(Jn, {}),
3033
3047
  /* @__PURE__ */ i(no, {}),
3034
3048
  /* @__PURE__ */ i(Pn, {})
3035
3049
  ] }),
3036
3050
  /* @__PURE__ */ i(ia, {})
3037
3051
  ] });
3038
- }, sa = "_active_1yldl_11", We = {
3052
+ }, sa = "_active_1yldl_11", Fe = {
3039
3053
  "rp-zoom-wrapper": "_rp-zoom-wrapper_1yldl_1",
3040
3054
  "rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_1yldl_6",
3041
3055
  active: sa,
@@ -3044,48 +3058,48 @@ const Oe = {
3044
3058
  "rp-current-zoom-text": "_rp-current-zoom-text_1yldl_24",
3045
3059
  "rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_1yldl_28"
3046
3060
  }, ca = ({ zoomLevel: t, className: e }) => {
3047
- const { localeMessages: n } = ue(), r = W(() => {
3061
+ const { localeMessages: n } = fe(), r = W(() => {
3048
3062
  switch (t) {
3049
- case Me.ACTUAL:
3063
+ case He.ACTUAL:
3050
3064
  return n == null ? void 0 : n.zoomActualSize;
3051
- case Me.PAGE_FIT:
3065
+ case He.PAGE_FIT:
3052
3066
  return n == null ? void 0 : n.zoomPageFit;
3053
- case Me.PAGE_WIDTH:
3067
+ case He.PAGE_WIDTH:
3054
3068
  return n == null ? void 0 : n.zoomPageWidth;
3055
3069
  }
3056
3070
  return t.toString();
3057
3071
  }, [t, n]);
3058
- return /* @__PURE__ */ i(fe, { children: typeof t == "number" ? /* @__PURE__ */ k(mo, { children: [
3072
+ return /* @__PURE__ */ i(ge, { children: typeof t == "number" ? /* @__PURE__ */ k(mo, { children: [
3059
3073
  /* @__PURE__ */ i("span", { className: e, children: t }),
3060
3074
  /* @__PURE__ */ i("span", { className: e, children: "%" })
3061
3075
  ] }) : /* @__PURE__ */ i("span", { className: e, children: r }) });
3062
3076
  }, la = [50, 75, 100, 125, 150, 200, 300, 400], da = () => {
3063
- const { zoomInIcon: t } = we(), { zoomInIcon: e } = ve();
3077
+ const { zoomInIcon: t } = _e(), { zoomInIcon: e } = we();
3064
3078
  return t || e || /* @__PURE__ */ i(Hr, {});
3065
3079
  }, ua = () => {
3066
- const { zoomOutIcon: t } = we(), { zoomOutIcon: e } = ve();
3080
+ const { zoomOutIcon: t } = _e(), { zoomOutIcon: e } = we();
3067
3081
  return t || e || /* @__PURE__ */ i($r, {});
3068
3082
  }, pa = () => {
3069
- const { zoomLevel: t, setZoomLevel: e, currentZoom: n } = ot(), { container: r, pagesRef: o } = Te(), { zoomTool: a = !0 } = Ce(), { zoomTool: c = !0 } = Se(), { isSmallScreen: d } = Re(), { localeMessages: s } = ue(), [f, m] = H(0), [C, u] = H(!1), T = M(
3083
+ const { zoomLevel: t, setZoomLevel: e, currentZoom: n } = rt(), { container: r, pagesRef: o } = Ce(), { zoomTool: a = !0 } = ye(), { zoomTool: c = !0 } = Se(), { isSmallScreen: d } = Re(), { localeMessages: s } = fe(), [f, m] = H(0), [T, u] = H(!1), C = M(
3070
3084
  new ResizeObserver((g) => {
3071
3085
  m(g[0].contentRect.height);
3072
3086
  })
3073
- ), b = N(() => {
3087
+ ), w = O(() => {
3074
3088
  e(() => {
3075
3089
  const g = Math.floor(n * 100 / 25) * 25;
3076
3090
  return Math.min(g + 25, Bt);
3077
3091
  });
3078
- }, [e, n]), P = N(() => {
3092
+ }, [e, n]), P = O(() => {
3079
3093
  e(() => {
3080
3094
  const g = Math.ceil(n * 100 / 25) * 25;
3081
3095
  return Math.min(g - 25, Bt);
3082
3096
  });
3083
- }, [e, n]), y = W(() => Gr(n), [n]), w = W(() => Ur(n), [n]);
3084
- return A(() => (o && T.current.observe(o), () => {
3085
- T.current.disconnect();
3086
- }), [o]), !a || !c ? null : typeof a == "function" ? /* @__PURE__ */ i(a, { zoomLevel: t, setZoomLevel: e }) : typeof c == "function" ? /* @__PURE__ */ i(c, { zoomLevel: t, setZoomLevel: e }) : /* @__PURE__ */ k("div", { className: We["rp-zoom-wrapper"], children: [
3097
+ }, [e, n]), y = W(() => Gr(n), [n]), b = W(() => Ur(n), [n]);
3098
+ return z(() => (o && C.current.observe(o), () => {
3099
+ C.current.disconnect();
3100
+ }), [o]), !a || !c ? null : typeof a == "function" ? /* @__PURE__ */ i(a, { zoomLevel: t, setZoomLevel: e }) : typeof c == "function" ? /* @__PURE__ */ i(c, { zoomLevel: t, setZoomLevel: e }) : /* @__PURE__ */ k("div", { className: Fe["rp-zoom-wrapper"], children: [
3087
3101
  /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.zoomOutTooltip, children: /* @__PURE__ */ i(
3088
- le,
3102
+ pe,
3089
3103
  {
3090
3104
  disabled: y,
3091
3105
  onClick: P,
@@ -3097,14 +3111,14 @@ const Oe = {
3097
3111
  Rt,
3098
3112
  {
3099
3113
  container: r,
3100
- open: C,
3114
+ open: T,
3101
3115
  onOpenChange: u,
3102
3116
  triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.zoomSelectTooltip, children: /* @__PURE__ */ k(
3103
- le,
3117
+ pe,
3104
3118
  {
3105
- className: ae(
3106
- We["rp-current-zoom-wrapper"],
3107
- C && We.active
3119
+ className: le(
3120
+ Fe["rp-current-zoom-wrapper"],
3121
+ T && Fe.active
3108
3122
  ),
3109
3123
  "aria-label": s == null ? void 0 : s.zoomSelectTooltip,
3110
3124
  children: [
@@ -3112,10 +3126,10 @@ const Oe = {
3112
3126
  ca,
3113
3127
  {
3114
3128
  zoomLevel: t,
3115
- className: We["rp-current-zoom-text"]
3129
+ className: Fe["rp-current-zoom-text"]
3116
3130
  }
3117
3131
  ),
3118
- /* @__PURE__ */ i(qe, { className: We["rp-current-zoom-icon"] })
3132
+ /* @__PURE__ */ i(Be, { className: Fe["rp-current-zoom-icon"] })
3119
3133
  ]
3120
3134
  }
3121
3135
  ) }) }),
@@ -3127,15 +3141,15 @@ const Oe = {
3127
3141
  "div",
3128
3142
  {
3129
3143
  style: { maxHeight: `${f}px`, overflow: "auto" },
3130
- className: We["rp-zoom-dropdown-content"],
3144
+ className: Fe["rp-zoom-dropdown-content"],
3131
3145
  children: [
3132
- /* @__PURE__ */ k(tt, { children: [
3133
- /* @__PURE__ */ i(xe, { onClick: () => e(Me.ACTUAL), children: s == null ? void 0 : s.zoomActualSize }),
3134
- /* @__PURE__ */ i(xe, { onClick: () => e(Me.PAGE_FIT), children: s == null ? void 0 : s.zoomPageFit }),
3135
- /* @__PURE__ */ i(xe, { onClick: () => e(Me.PAGE_WIDTH), children: s == null ? void 0 : s.zoomPageWidth })
3146
+ /* @__PURE__ */ k(nt, { children: [
3147
+ /* @__PURE__ */ i(xe, { onClick: () => e(He.ACTUAL), children: s == null ? void 0 : s.zoomActualSize }),
3148
+ /* @__PURE__ */ i(xe, { onClick: () => e(He.PAGE_FIT), children: s == null ? void 0 : s.zoomPageFit }),
3149
+ /* @__PURE__ */ i(xe, { onClick: () => e(He.PAGE_WIDTH), children: s == null ? void 0 : s.zoomPageWidth })
3136
3150
  ] }),
3137
3151
  /* @__PURE__ */ i(Lt, {}),
3138
- /* @__PURE__ */ i(tt, { children: la.map((g) => /* @__PURE__ */ k(xe, { onClick: () => e(g), children: [
3152
+ /* @__PURE__ */ i(nt, { children: la.map((g) => /* @__PURE__ */ k(xe, { onClick: () => e(g), children: [
3139
3153
  g,
3140
3154
  " %"
3141
3155
  ] }, g)) })
@@ -3145,25 +3159,25 @@ const Oe = {
3145
3159
  }
3146
3160
  ),
3147
3161
  /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.zoomInTooltip, children: /* @__PURE__ */ i(
3148
- le,
3162
+ pe,
3149
3163
  {
3150
- disabled: w,
3151
- onClick: b,
3164
+ disabled: b,
3165
+ onClick: w,
3152
3166
  "aria-label": s == null ? void 0 : s.zoomInTooltip,
3153
3167
  children: /* @__PURE__ */ i(da, {})
3154
3168
  }
3155
3169
  ) })
3156
3170
  ] });
3157
3171
  }, hn = () => {
3158
- const { totalMatches: t, nextMatch: e, prevMatch: n } = At(), { localeMessages: r } = ue(), o = !t || t === 0;
3159
- return /* @__PURE__ */ k(fe, { children: [
3172
+ const { totalMatches: t, nextMatch: e, prevMatch: n } = At(), { localeMessages: r } = fe(), o = !t || t === 0;
3173
+ return /* @__PURE__ */ k(ge, { children: [
3160
3174
  /* @__PURE__ */ i(
3161
3175
  K,
3162
3176
  {
3163
3177
  content: r == null ? void 0 : r.searchPrevTooltip,
3164
- className: te["rp-search-tool-result-navigator"],
3178
+ className: oe["rp-search-tool-result-navigator"],
3165
3179
  children: /* @__PURE__ */ i(
3166
- le,
3180
+ pe,
3167
3181
  {
3168
3182
  tabIndex: 0,
3169
3183
  onClick: n,
@@ -3171,9 +3185,9 @@ const Oe = {
3171
3185
  disabled: o,
3172
3186
  "aria-disabled": o,
3173
3187
  children: /* @__PURE__ */ i(
3174
- qe,
3188
+ Be,
3175
3189
  {
3176
- className: te["rp-search-tool-input-icon"],
3190
+ className: oe["rp-search-tool-input-icon"],
3177
3191
  "aria-hidden": "true"
3178
3192
  }
3179
3193
  )
@@ -3185,9 +3199,9 @@ const Oe = {
3185
3199
  K,
3186
3200
  {
3187
3201
  content: r == null ? void 0 : r.searchNextTooltip,
3188
- className: te["rp-search-tool-result-navigator"],
3202
+ className: oe["rp-search-tool-result-navigator"],
3189
3203
  children: /* @__PURE__ */ i(
3190
- le,
3204
+ pe,
3191
3205
  {
3192
3206
  tabIndex: 0,
3193
3207
  onClick: e,
@@ -3195,10 +3209,10 @@ const Oe = {
3195
3209
  disabled: o,
3196
3210
  "aria-disabled": o,
3197
3211
  children: /* @__PURE__ */ i(
3198
- qe,
3212
+ Be,
3199
3213
  {
3200
3214
  style: { transform: "rotate(180deg" },
3201
- className: te["rp-search-tool-input-icon"],
3215
+ className: oe["rp-search-tool-input-icon"],
3202
3216
  "aria-hidden": "true"
3203
3217
  }
3204
3218
  )
@@ -3208,93 +3222,93 @@ const Oe = {
3208
3222
  )
3209
3223
  ] });
3210
3224
  }, ha = () => {
3211
- const { searchIcon: t } = we(), { searchIcon: e } = ve();
3225
+ const { searchIcon: t } = _e(), { searchIcon: e } = we();
3212
3226
  return t || e || /* @__PURE__ */ i(Cn, {});
3213
3227
  }, fa = ({ icon: t }) => {
3214
- const { container: e } = Te(), [n, r] = H(!1), { pdf: o } = oe(), [a, c] = H(null), {
3228
+ const { container: e } = Ce(), [n, r] = H(!1), { pdf: o } = re(), [a, c] = H(null), {
3215
3229
  searchOptions: d,
3216
3230
  setSearchOptions: s,
3217
3231
  loading: f,
3218
3232
  setSearch: m,
3219
- totalMatches: C,
3233
+ totalMatches: T,
3220
3234
  currentMatchPosition: u,
3221
- nextMatch: T,
3222
- prevMatch: b,
3235
+ nextMatch: C,
3236
+ prevMatch: w,
3223
3237
  search: P
3224
- } = At(), { searchTool: y = !0 } = Ce(), { searchTool: w = !0 } = Se(), [g, h] = H(P), { localeMessages: p } = ue(), { isSmallScreen: l } = Re(), [v, _] = H(null), [I, S] = H(!1), x = N(() => {
3238
+ } = At(), { searchTool: y = !0 } = ye(), { searchTool: b = !0 } = Se(), [g, h] = H(P), { localeMessages: p } = fe(), { isSmallScreen: l } = Re(), [v, _] = H(null), [I, x] = H(!1), S = O(() => {
3225
3239
  r(!0);
3226
- }, []), R = N(() => {
3240
+ }, []), R = O(() => {
3227
3241
  m(""), h(""), r(!1);
3228
- }, [m]), O = ($) => {
3229
- const Y = $.key === "Enter", J = $.key === " ";
3242
+ }, [m]), N = (G) => {
3243
+ const Y = G.key === "Enter", J = G.key === " ";
3230
3244
  (Y || J) && R();
3231
- }, D = N(
3232
- ($) => {
3233
- $.key === "Escape" && n && R();
3245
+ }, A = O(
3246
+ (G) => {
3247
+ G.key === "Escape" && n && R();
3234
3248
  },
3235
3249
  [n]
3236
- ), z = N(
3237
- ($) => {
3238
- $.shiftKey && $.key === "Enter" ? b() : $.key === "Enter" && P !== g ? m(g) : $.key === "Enter" && T();
3250
+ ), F = O(
3251
+ (G) => {
3252
+ G.shiftKey && G.key === "Enter" ? w() : G.key === "Enter" && P !== g ? m(g) : G.key === "Enter" && C();
3239
3253
  },
3240
- [g, b, T, m, P]
3254
+ [g, w, C, m, P]
3241
3255
  );
3242
- A(() => {
3256
+ z(() => {
3243
3257
  h(P);
3244
- }, [P]), A(() => {
3245
- P && o && S(!0);
3246
- }, [P, o]), A(() => {
3258
+ }, [P]), z(() => {
3259
+ P && o && x(!0);
3260
+ }, [P, o]), z(() => {
3247
3261
  P && P.trim() !== "" && (h(P), m(P));
3248
- }, []), A(() => (window.addEventListener("keydown", D), () => {
3249
- window.removeEventListener("keydown", D);
3250
- }), [D]), A(() => {
3262
+ }, []), z(() => (window.addEventListener("keydown", A), () => {
3263
+ window.removeEventListener("keydown", A);
3264
+ }), [A]), z(() => {
3251
3265
  a && setTimeout(() => {
3252
3266
  a.focus();
3253
3267
  }, 0);
3254
3268
  }, [a]);
3255
- const E = N(($) => {
3256
- h($.target.value);
3257
- }, []), L = N(() => {
3269
+ const D = O((G) => {
3270
+ h(G.target.value);
3271
+ }, []), L = O(() => {
3258
3272
  h(""), m("");
3259
- }, [m]), F = W(() => `${u} / ${C}`, [u, C]), { wholeWords: G, matchCase: U } = W(() => d, [d]), V = N(
3260
- ($) => {
3261
- s((Y) => ({ ...Y, matchCase: $ }));
3273
+ }, [m]), E = W(() => `${u} / ${T}`, [u, T]), { wholeWords: U, matchCase: V } = W(() => d, [d]), $ = O(
3274
+ (G) => {
3275
+ s((Y) => ({ ...Y, matchCase: G }));
3262
3276
  },
3263
3277
  [s]
3264
- ), B = N(
3265
- ($) => {
3266
- s((Y) => ({ ...Y, wholeWords: $ }));
3278
+ ), q = O(
3279
+ (G) => {
3280
+ s((Y) => ({ ...Y, wholeWords: G }));
3267
3281
  },
3268
3282
  [s]
3269
3283
  );
3270
- A(() => {
3284
+ z(() => {
3271
3285
  o && I && R();
3272
3286
  }, [o, R]);
3273
- const Z = W(() => (v == null ? void 0 : v.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [v]), ie = N(
3274
- ($) => {
3275
- if ($.key === "Tab") {
3287
+ const j = W(() => (v == null ? void 0 : v.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [v]), te = O(
3288
+ (G) => {
3289
+ if (G.key === "Tab") {
3276
3290
  const Y = document.activeElement;
3277
3291
  let J = 0;
3278
- Z.forEach((Q, he) => {
3279
- Q === Y && (J = he);
3292
+ j.forEach((Q, ie) => {
3293
+ Q === Y && (J = ie);
3280
3294
  });
3281
- let pe = J + 1;
3282
- $.shiftKey && (pe = J - 1);
3283
- const ee = Z[pe];
3284
- if (ee)
3285
- ee.focus();
3286
- else if (pe > Z.length - 1) {
3287
- const Q = Z[0];
3295
+ let me = J + 1;
3296
+ G.shiftKey && (me = J - 1);
3297
+ const ne = j[me];
3298
+ if (ne)
3299
+ ne.focus();
3300
+ else if (me > j.length - 1) {
3301
+ const Q = j[0];
3288
3302
  Q && Q.focus();
3289
3303
  } else {
3290
- const Q = Z[Z.length - 1];
3304
+ const Q = j[j.length - 1];
3291
3305
  Q && Q.focus();
3292
3306
  }
3293
3307
  }
3294
3308
  },
3295
- [Z]
3309
+ [j]
3296
3310
  );
3297
- return !y || !w ? null : /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(
3311
+ return !y || !b ? null : /* @__PURE__ */ i(ge, { children: /* @__PURE__ */ i(
3298
3312
  Rt,
3299
3313
  {
3300
3314
  open: n,
@@ -3304,10 +3318,10 @@ const Oe = {
3304
3318
  tabIndex: 0,
3305
3319
  avoidCollisions: !1,
3306
3320
  triggerComponent: /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.searchButtonTooltip, children: /* @__PURE__ */ i(
3307
- le,
3321
+ pe,
3308
3322
  {
3309
3323
  active: n,
3310
- onClick: x,
3324
+ onClick: S,
3311
3325
  "aria-label": p == null ? void 0 : p.searchButtonTooltip,
3312
3326
  "aria-expanded": n,
3313
3327
  "aria-haspopup": "dialog",
@@ -3318,23 +3332,23 @@ const Oe = {
3318
3332
  "div",
3319
3333
  {
3320
3334
  ref: _,
3321
- className: te["rp-search-tool-content"],
3335
+ className: oe["rp-search-tool-content"],
3322
3336
  tabIndex: 0,
3323
- onKeyDown: ie,
3337
+ onKeyDown: te,
3324
3338
  role: "dialog",
3325
3339
  "aria-label": (p == null ? void 0 : p.searchInputTooltip) || "Search dialog",
3326
3340
  children: [
3327
- /* @__PURE__ */ k("div", { className: te["rp-search-tool-input-wrapper"], children: [
3328
- /* @__PURE__ */ k("div", { className: te["rp-search-tool-input"], children: [
3341
+ /* @__PURE__ */ k("div", { className: oe["rp-search-tool-input-wrapper"], children: [
3342
+ /* @__PURE__ */ k("div", { className: oe["rp-search-tool-input"], children: [
3329
3343
  /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.searchInputTooltip, children: /* @__PURE__ */ i(
3330
3344
  gn,
3331
3345
  {
3332
3346
  value: g,
3333
- onKeyDown: z,
3334
- onChange: E,
3347
+ onKeyDown: F,
3348
+ onChange: D,
3335
3349
  icon: /* @__PURE__ */ i(Cn, {}),
3336
3350
  placeholder: p == null ? void 0 : p.searchInputPlaceholder,
3337
- className: te["rp-search-input"],
3351
+ className: oe["rp-search-input"],
3338
3352
  ref: c,
3339
3353
  id: "search-input",
3340
3354
  name: "search-input",
@@ -3344,60 +3358,60 @@ const Oe = {
3344
3358
  children: !!g && /* @__PURE__ */ i(
3345
3359
  "span",
3346
3360
  {
3347
- className: te["rp-search-tool-input-clear"],
3361
+ className: oe["rp-search-tool-input-clear"],
3348
3362
  onClick: L,
3349
3363
  role: "button",
3350
3364
  tabIndex: 0,
3351
3365
  "aria-label": (p == null ? void 0 : p.searchCloseButtonTooltip) || "Clear search",
3352
- onKeyDown: ($) => {
3353
- ($.key === "Enter" || $.key === " ") && ($.preventDefault(), L());
3366
+ onKeyDown: (G) => {
3367
+ (G.key === "Enter" || G.key === " ") && (G.preventDefault(), L());
3354
3368
  },
3355
3369
  children: /* @__PURE__ */ i(Vr, {})
3356
3370
  }
3357
3371
  )
3358
3372
  }
3359
3373
  ) }),
3360
- f ? /* @__PURE__ */ i("span", { "aria-live": "polite", "aria-label": "Searching", children: /* @__PURE__ */ i(bn, { className: te["rp-search-loader-icon"], "aria-hidden": "true" }) }) : /* @__PURE__ */ i("span", { id: "search-results-count", "aria-live": "polite", children: F }),
3361
- l && /* @__PURE__ */ i("div", { className: te["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ut, { onKeyPress: O, handleClose: R }) })
3374
+ f ? /* @__PURE__ */ i("span", { "aria-live": "polite", "aria-label": "Searching", children: /* @__PURE__ */ i(_n, { className: oe["rp-search-loader-icon"], "aria-hidden": "true" }) }) : /* @__PURE__ */ i("span", { id: "search-results-count", "aria-live": "polite", children: E }),
3375
+ l && /* @__PURE__ */ i("div", { className: oe["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ut, { onKeyPress: N, handleClose: R }) })
3362
3376
  ] }),
3363
- /* @__PURE__ */ k("div", { className: te["rp-search-tool-input-checkboxes"], children: [
3377
+ /* @__PURE__ */ k("div", { className: oe["rp-search-tool-input-checkboxes"], children: [
3364
3378
  l && /* @__PURE__ */ i(hn, {}),
3365
3379
  /* @__PURE__ */ i(
3366
3380
  Vt,
3367
3381
  {
3368
3382
  tabIndex: 0,
3369
3383
  name: "matchCase",
3370
- value: U,
3371
- onChange: V,
3384
+ value: V,
3385
+ onChange: $,
3372
3386
  "aria-label": p == null ? void 0 : p.searchMatchCaseLabel,
3373
3387
  children: p == null ? void 0 : p.searchMatchCaseLabel
3374
3388
  }
3375
3389
  ),
3376
- !l && /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: te["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Xt, {}) }) }),
3390
+ !l && /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: oe["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Xt, {}) }) }),
3377
3391
  /* @__PURE__ */ i(
3378
3392
  Vt,
3379
3393
  {
3380
3394
  tabIndex: 0,
3381
3395
  name: "wholeWord",
3382
- value: G,
3383
- onChange: B,
3396
+ value: U,
3397
+ onChange: q,
3384
3398
  "aria-label": p == null ? void 0 : p.searchWholeWordsLabel,
3385
3399
  children: p == null ? void 0 : p.searchWholeWordsLabel
3386
3400
  }
3387
3401
  ),
3388
- !l && /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { tabIndex: 0, className: te["rp-search-icon-info"], children: /* @__PURE__ */ i(Xt, {}) }) })
3402
+ !l && /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { tabIndex: 0, className: oe["rp-search-icon-info"], children: /* @__PURE__ */ i(Xt, {}) }) })
3389
3403
  ] })
3390
3404
  ] }),
3391
- !l && /* @__PURE__ */ k("div", { className: te["rp-search-tool-controls"], children: [
3405
+ !l && /* @__PURE__ */ k("div", { className: oe["rp-search-tool-controls"], children: [
3392
3406
  /* @__PURE__ */ i(hn, {}),
3393
- /* @__PURE__ */ i(Ut, { onKeyPress: O, handleClose: R })
3407
+ /* @__PURE__ */ i(Ut, { onKeyPress: N, handleClose: R })
3394
3408
  ] })
3395
3409
  ]
3396
3410
  }
3397
3411
  )
3398
3412
  }
3399
3413
  ) });
3400
- }, ma = "_loading_wazy2_1", Fe = {
3414
+ }, ma = "_loading_wazy2_1", ke = {
3401
3415
  "rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
3402
3416
  "rp-loading-modal": "_rp-loading-modal_wazy2_14",
3403
3417
  "rp-loading-title": "_rp-loading-title_wazy2_27",
@@ -3406,66 +3420,66 @@ const Oe = {
3406
3420
  "rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
3407
3421
  loading: ma
3408
3422
  }, ga = ({ percentage: t }) => {
3409
- const { cancel: e } = st(), { localeMessages: n } = ue();
3410
- return t < 1 ? null : /* @__PURE__ */ i("div", { className: ae(Fe["rp-loading-overlay"]), children: /* @__PURE__ */ k("div", { className: ae(Fe["rp-loading-modal"]), children: [
3411
- /* @__PURE__ */ k("div", { className: ae(Fe["rp-loading-title"]), children: [
3423
+ const { cancel: e } = ct(), { localeMessages: n } = fe();
3424
+ return t < 1 ? null : /* @__PURE__ */ i("div", { className: le(ke["rp-loading-overlay"]), children: /* @__PURE__ */ k("div", { className: le(ke["rp-loading-modal"]), children: [
3425
+ /* @__PURE__ */ k("div", { className: le(ke["rp-loading-title"]), children: [
3412
3426
  n == null ? void 0 : n.printLoadingMessage,
3413
3427
  "..."
3414
3428
  ] }),
3415
- /* @__PURE__ */ i("div", { className: ae(Fe["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
3429
+ /* @__PURE__ */ i("div", { className: le(ke["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
3416
3430
  "div",
3417
3431
  {
3418
- className: ae(Fe["rp-loading-progress"]),
3432
+ className: le(ke["rp-loading-progress"]),
3419
3433
  style: { width: `${t}%` }
3420
3434
  }
3421
3435
  ) }),
3422
- /* @__PURE__ */ i("button", { className: ae(Fe["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
3436
+ /* @__PURE__ */ i("button", { className: le(ke["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
3423
3437
  ] }) });
3424
- }, va = at((t, e) => {
3425
- const { showPrintProgress: n = !0 } = Ce(), { showPrintProgress: r = !0 } = Se(), { progress: o, showDefaultProgress: a } = st(), { isSmallScreen: c } = Re(), { percentage: d } = o || {}, s = () => c ? { gridTemplateColumns: "25% 60% 15%" } : void 0, f = () => {
3438
+ }, va = st((t, e) => {
3439
+ const { showPrintProgress: n = !0 } = ye(), { showPrintProgress: r = !0 } = Se(), { progress: o, showDefaultProgress: a } = ct(), { isSmallScreen: c } = Re(), { percentage: d } = o || {}, s = () => c ? { gridTemplateColumns: "25% 60% 15%" } : void 0, f = () => {
3426
3440
  if (!(!(a ?? (n && r)) || !d))
3427
3441
  return /* @__PURE__ */ i(ga, { percentage: d });
3428
3442
  };
3429
3443
  return /* @__PURE__ */ k("div", { children: [
3430
- /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: Ge["rp-toolbar-content"], children: /* @__PURE__ */ k("div", { className: Ge["rp-toolbar-wrapper"], style: s(), children: [
3431
- /* @__PURE__ */ k("div", { "data-rp": "topBarLeft", className: Ge["rp-toolbar-start"], children: [
3444
+ /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: Ue["rp-toolbar-content"], children: /* @__PURE__ */ k("div", { className: Ue["rp-toolbar-wrapper"], style: s(), children: [
3445
+ /* @__PURE__ */ k("div", { "data-rp": "topBarLeft", className: Ue["rp-toolbar-start"], children: [
3432
3446
  /* @__PURE__ */ i(fa, {}),
3433
3447
  /* @__PURE__ */ i(Li, {})
3434
3448
  ] }),
3435
- /* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ge["rp-toolbar-middle"], children: /* @__PURE__ */ i(pa, {}) }),
3436
- /* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ge["rp-toolbar-end"], children: /* @__PURE__ */ i(aa, {}) })
3449
+ /* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: Ue["rp-toolbar-middle"], children: /* @__PURE__ */ i(pa, {}) }),
3450
+ /* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: Ue["rp-toolbar-end"], children: /* @__PURE__ */ i(aa, {}) })
3437
3451
  ] }) }),
3438
3452
  /* @__PURE__ */ i(f, {})
3439
3453
  ] });
3440
- }), Ue = {
3454
+ }), Ve = {
3441
3455
  "rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
3442
3456
  "rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
3443
3457
  "rp-thumbnail": "_rp-thumbnail_3fenb_1",
3444
3458
  "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
3445
3459
  "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
3446
3460
  }, wa = (t) => {
3447
- const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = se(), { pageRotate: a } = it(), c = M(null), d = Nn(), { pages: s } = oe(), [f, m] = H(null), C = M(!1), u = M(), T = W(() => n ? Ue["rp-thumbnail-active"] : "", [n]), b = W(() => ({
3461
+ const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = de(), { pageRotate: a } = at(), c = M(null), d = Nn(), { pages: s } = re(), [f, m] = H(null), T = M(!1), u = M(), C = W(() => n ? Ve["rp-thumbnail-active"] : "", [n]), w = W(() => ({
3448
3462
  width: Math.round(r.width),
3449
3463
  height: Math.round(r.height)
3450
- }), [r]), P = N(() => {
3464
+ }), [r]), P = O(() => {
3451
3465
  e && o(e);
3452
3466
  }, [o, e]);
3453
- return A(() => {
3467
+ return z(() => {
3454
3468
  const y = s.get(e);
3455
3469
  u.current === y || (m(null), u.current = y);
3456
- }, [s, e]), A(() => {
3470
+ }, [s, e]), z(() => {
3457
3471
  const y = s.get(e);
3458
3472
  if (!c.current || !e || !y || f)
3459
3473
  return;
3460
- const w = new IntersectionObserver((g) => {
3474
+ const b = new IntersectionObserver((g) => {
3461
3475
  g.forEach((h) => {
3462
- if (C.current) {
3463
- C.current = !1, d.removeQueue(`thumbnail-${e}`);
3476
+ if (T.current) {
3477
+ T.current = !1, d.removeQueue(`thumbnail-${e}`);
3464
3478
  return;
3465
3479
  }
3466
3480
  if (h.isIntersecting) {
3467
3481
  const p = document.createElement("canvas");
3468
- C.current = !0, d.enqueue(
3482
+ T.current = !0, d.enqueue(
3469
3483
  `thumbnail-${e}`,
3470
3484
  {
3471
3485
  page: y.page,
@@ -3487,8 +3501,8 @@ const Oe = {
3487
3501
  }
3488
3502
  });
3489
3503
  });
3490
- return c.current && w.observe(c.current), () => {
3491
- w.disconnect(), d.removeQueue(`thumbnail-${e}`);
3504
+ return c.current && b.observe(c.current), () => {
3505
+ b.disconnect(), d.removeQueue(`thumbnail-${e}`);
3492
3506
  };
3493
3507
  }, [d, e, s, f]), /* @__PURE__ */ k(
3494
3508
  "div",
@@ -3498,7 +3512,7 @@ const Oe = {
3498
3512
  (y.key === "Enter" || y.key === " ") && (y.preventDefault(), P());
3499
3513
  },
3500
3514
  id: `page-${e}`,
3501
- className: Ue["rp-thumbnail-wrapper"],
3515
+ className: Ve["rp-thumbnail-wrapper"],
3502
3516
  ref: c,
3503
3517
  role: "button",
3504
3518
  tabIndex: 0,
@@ -3511,71 +3525,71 @@ const Oe = {
3511
3525
  style: {
3512
3526
  transform: `rotate(${a[e || 0]}deg)`
3513
3527
  },
3514
- className: ae(T, Ue["rp-thumbnail"]),
3528
+ className: le(C, Ve["rp-thumbnail"]),
3515
3529
  "aria-hidden": "true",
3516
3530
  children: f ? /* @__PURE__ */ i(
3517
3531
  "img",
3518
3532
  {
3519
3533
  src: f,
3520
- width: b.width,
3521
- height: b.height,
3534
+ width: w.width,
3535
+ height: w.height,
3522
3536
  alt: `Page ${e} thumbnail`,
3523
3537
  "aria-hidden": "true"
3524
3538
  }
3525
3539
  ) : /* @__PURE__ */ i(
3526
3540
  "div",
3527
3541
  {
3528
- className: Ue["rp-thumbnail-loader"],
3542
+ className: Ve["rp-thumbnail-loader"],
3529
3543
  style: {
3530
- width: `${b.width}px`,
3531
- height: `${b.height}px`
3544
+ width: `${w.width}px`,
3545
+ height: `${w.height}px`
3532
3546
  },
3533
- children: /* @__PURE__ */ i(bn, { "aria-hidden": "true" })
3547
+ children: /* @__PURE__ */ i(_n, { "aria-hidden": "true" })
3534
3548
  }
3535
3549
  )
3536
3550
  }
3537
3551
  ),
3538
- /* @__PURE__ */ i("div", { className: Ue["rp-thumbnail-text"], "aria-hidden": "true", children: e })
3552
+ /* @__PURE__ */ i("div", { className: Ve["rp-thumbnail-text"], "aria-hidden": "true", children: e })
3539
3553
  ]
3540
3554
  }
3541
3555
  );
3542
3556
  }, fn = {
3543
3557
  "rp-thumbnails-container": "_rp-thumbnails-container_70k68_1",
3544
3558
  "rp-thumbnails": "_rp-thumbnails_70k68_1"
3545
- }, ba = 16, _a = (t, e) => {
3559
+ }, _a = 16, ba = (t, e) => {
3546
3560
  const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
3547
- t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - ba);
3548
- }, Pa = at((t, e) => {
3549
- const { show: n, width: r } = t, { focusedPage: o, totalPages: a } = se(), { thumbnailPages: c, addPage: d, thumbnailLength: s, addToPage: f } = Rn(), m = M(null), C = M(1);
3561
+ t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - _a);
3562
+ }, Pa = st((t, e) => {
3563
+ const { show: n, width: r } = t, { focusedPage: o, totalPages: a } = de(), { thumbnailPages: c, addPage: d, thumbnailLength: s, addToPage: f } = Rn(), m = M(null), T = M(1);
3550
3564
  mn(e, () => m.current);
3551
- const u = W(() => Object.values(c), [c]), T = N(() => {
3552
- const b = s + 1;
3553
- b <= a && d(b);
3565
+ const u = W(() => Object.values(c), [c]), C = O(() => {
3566
+ const w = s + 1;
3567
+ w <= a && d(w);
3554
3568
  }, [d, a, s]);
3555
- return A(() => {
3556
- o > s && a > s ? f(o) : n && C.current !== o && (_a(m.current, o), C.current = o);
3557
- }, [o, s, f, n, u]), Qo(m.current, T), /* @__PURE__ */ i("div", { ref: m, className: fn["rp-thumbnails-container"], style: { width: r }, children: /* @__PURE__ */ i("div", { className: fn["rp-thumbnails"], children: n ? u.map((b, P) => {
3558
- var y, w;
3569
+ return z(() => {
3570
+ o > s && a > s ? f(o) : n && T.current !== o && (ba(m.current, o), T.current = o);
3571
+ }, [o, s, f, n, u]), Qo(m.current, C), /* @__PURE__ */ i("div", { ref: m, className: fn["rp-thumbnails-container"], style: { width: r }, children: /* @__PURE__ */ i("div", { className: fn["rp-thumbnails"], children: n ? u.map((w, P) => {
3572
+ var y, b;
3559
3573
  return /* @__PURE__ */ i(
3560
3574
  wa,
3561
3575
  {
3562
- isFocused: o === ((y = b.page) == null ? void 0 : y.pageNumber),
3563
- pageNumber: (w = b.page) == null ? void 0 : w.pageNumber,
3564
- loading: b.loading,
3565
- viewport: b.viewport,
3566
- defaultRotation: b.defaultRotation
3576
+ isFocused: o === ((y = w.page) == null ? void 0 : y.pageNumber),
3577
+ pageNumber: (b = w.page) == null ? void 0 : b.pageNumber,
3578
+ loading: w.loading,
3579
+ viewport: w.viewport,
3580
+ defaultRotation: w.defaultRotation
3567
3581
  },
3568
3582
  P
3569
3583
  );
3570
3584
  }) : null }) });
3571
3585
  }), Ta = () => {
3572
- const { thumbnailIcon: t } = we(), { thumbnailIcon: e } = ve();
3586
+ const { thumbnailIcon: t } = _e(), { thumbnailIcon: e } = we();
3573
3587
  return t || e || /* @__PURE__ */ i($o, {});
3574
3588
  }, Ca = () => {
3575
- const { active: t, setActive: e } = Rn(), [n, r] = H(Yo), o = M(null), a = M(null), { thumbnailTool: c, sidebarEnable: d } = Ce(), { localeMessages: s } = ue(), f = N(() => {
3576
- e((C) => !C);
3589
+ const { active: t, setActive: e } = Rn(), [n, r] = H(Yo), o = M(null), a = M(null), { thumbnailTool: c, sidebarEnable: d } = ye(), { localeMessages: s } = fe(), f = O(() => {
3590
+ e((T) => !T);
3577
3591
  }, []), m = W(() => typeof c != "boolean" && c ? /* @__PURE__ */ i(c, { onClick: f, active: t }) : c ? /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
3578
- le,
3592
+ pe,
3579
3593
  {
3580
3594
  onClick: f,
3581
3595
  active: t,
@@ -3583,19 +3597,19 @@ const Oe = {
3583
3597
  children: /* @__PURE__ */ i(Ta, {})
3584
3598
  }
3585
3599
  ) }) : null, [c, t, f, s]);
3586
- return /* @__PURE__ */ i(fe, { children: d && /* @__PURE__ */ k(
3600
+ return /* @__PURE__ */ i(ge, { children: d && /* @__PURE__ */ k(
3587
3601
  "div",
3588
3602
  {
3589
3603
  style: { "--rp-thumbnail-width": `${n}px` },
3590
- className: Xe["rp-sidebar-content-wrapper"],
3604
+ className: Qe["rp-sidebar-content-wrapper"],
3591
3605
  "data-rp": "sidebar",
3592
3606
  children: [
3593
- /* @__PURE__ */ i("div", { ref: a, className: Xe["rp-sidebar-content"], children: m }),
3607
+ /* @__PURE__ */ i("div", { ref: a, className: Qe["rp-sidebar-content"], children: m }),
3594
3608
  /* @__PURE__ */ k(
3595
3609
  "div",
3596
3610
  {
3597
3611
  "data-rp": "thumbnailSidebar",
3598
- className: `${Xe["rp-thumbnails-wrapper"]} ${t ? "" : Xe["rp-thumbnails-wrapper-hidden"]}`,
3612
+ className: `${Qe["rp-thumbnails-wrapper"]} ${t ? "" : Qe["rp-thumbnails-wrapper-hidden"]}`,
3599
3613
  children: [
3600
3614
  /* @__PURE__ */ i(Pa, { show: t, ref: o }),
3601
3615
  /* @__PURE__ */ i(
@@ -3623,11 +3637,11 @@ const Oe = {
3623
3637
  onLoaded: s,
3624
3638
  cleanupOnLoaded: f,
3625
3639
  onLayoutWidthChange: m
3626
- } = t, [C, u] = H(null), { setContainer: T, setContentRef: b } = Te(), { loading: P } = oe(), { LoaderImageComponent: y } = St();
3627
- return A(() => (s && s(), () => {
3640
+ } = t, [T, u] = H(null), { setContainer: C, setContentRef: w } = Ce(), { loading: P } = re(), { LoaderImageComponent: y } = St();
3641
+ return z(() => (s && s(), () => {
3628
3642
  f && f();
3629
3643
  }), [s, f]), // TODO: deprecated in v2.0.0, remove later ~
3630
- /* @__PURE__ */ i(zn, { toolbarRef: C, ref: e, children: /* @__PURE__ */ i(Vo, { mobileWidth: d, onLayoutWidthChange: m, children: /* @__PURE__ */ i(qo, { slots: r, children: /* @__PURE__ */ i(Ko, { icons: o, children: /* @__PURE__ */ k(Uo, { getContainerRef: T, style: a, className: c, children: [
3644
+ /* @__PURE__ */ i(zn, { toolbarRef: T, ref: e, children: /* @__PURE__ */ i(Vo, { mobileWidth: d, onLayoutWidthChange: m, children: /* @__PURE__ */ i(qo, { slots: r, children: /* @__PURE__ */ i(Ko, { icons: o, children: /* @__PURE__ */ k(Uo, { getContainerRef: C, style: a, className: c, children: [
3631
3645
  /* @__PURE__ */ i(Gt, { href: "#rp-menu", label: "Skip to Menu" }),
3632
3646
  /* @__PURE__ */ i(Gt, { href: "#rp-main-content", label: "Skip to Main Content" }),
3633
3647
  /* @__PURE__ */ k(Bo, { children: [
@@ -3652,7 +3666,7 @@ const Oe = {
3652
3666
  "main",
3653
3667
  {
3654
3668
  id: "rp-main-content",
3655
- ref: b,
3669
+ ref: w,
3656
3670
  className: Ie["rp-pages"],
3657
3671
  role: "main",
3658
3672
  "aria-label": "PDF document pages",
@@ -3661,7 +3675,7 @@ const Oe = {
3661
3675
  )
3662
3676
  ] })
3663
3677
  ] }),
3664
- /* @__PURE__ */ i(Zo, {})
3678
+ /* @__PURE__ */ i(jo, {})
3665
3679
  ] }),
3666
3680
  P ? /* @__PURE__ */ i(
3667
3681
  "div",
@@ -3704,18 +3718,18 @@ const Oe = {
3704
3718
  export {
3705
3719
  va as $,
3706
3720
  Sn as A,
3707
- jr as B,
3721
+ Zr as B,
3708
3722
  Ln as C,
3709
- Zi as D,
3723
+ ji as D,
3710
3724
  En as E,
3711
3725
  Nn as F,
3712
3726
  Kr as G,
3713
3727
  Yr as H,
3714
3728
  ti as I,
3715
3729
  oi as J,
3716
- He as K,
3730
+ $e as K,
3717
3731
  zn as L,
3718
- bi as M,
3732
+ _i as M,
3719
3733
  Ti as N,
3720
3734
  Ci as O,
3721
3735
  Li as P,
@@ -3734,12 +3748,12 @@ export {
3734
3748
  wa as a0,
3735
3749
  Ca as a1,
3736
3750
  Xn as b,
3737
- st as c,
3751
+ ct as c,
3738
3752
  At as d,
3739
3753
  Rn as e,
3740
- _t as f,
3741
- We as g,
3742
- Ge as h,
3754
+ bt as f,
3755
+ Fe as g,
3756
+ Ue as h,
3743
3757
  pa as i,
3744
3758
  aa as j,
3745
3759
  ta as k,
@@ -3750,12 +3764,12 @@ export {
3750
3764
  Nc as p,
3751
3765
  Pa as q,
3752
3766
  ga as r,
3753
- ji as s,
3767
+ Zi as s,
3754
3768
  yn as t,
3755
- se as u,
3769
+ de as u,
3756
3770
  qr as v,
3757
3771
  In as w,
3758
3772
  Br as x,
3759
3773
  xn as y,
3760
- Zr as z
3774
+ jr as z
3761
3775
  };