@pdf-viewer/react 1.11.0-beta.1 → 1.11.0-rc.0

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