@pdf-viewer/react 1.3.0-beta.2 → 1.3.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/{RPDefaultLayout-57b373e2.js → RPDefaultLayout-2102a11b.js} +907 -887
  2. package/dist/components/RPController.js +5 -5
  3. package/dist/components/RPPages.js +1 -1
  4. package/dist/components/RPProvider.js +1 -1
  5. package/dist/components/layout/RPDefaultLayout.js +1 -1
  6. package/dist/components/layout/sidebar/RPSidebar.js +1 -1
  7. package/dist/components/layout/sidebar/Thumbnail.js +1 -1
  8. package/dist/components/layout/sidebar/Thumbnails.js +1 -1
  9. package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
  10. package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
  11. package/dist/components/layout/toolbar/MostPageTool.js +1 -1
  12. package/dist/components/layout/toolbar/OtherTool.js +1 -1
  13. package/dist/components/layout/toolbar/Paginate.js +1 -1
  14. package/dist/components/layout/toolbar/PrintTool.js +1 -1
  15. package/dist/components/layout/toolbar/RPToolbar.js +1 -1
  16. package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
  17. package/dist/components/layout/toolbar/SearchTool.js +1 -1
  18. package/dist/components/layout/toolbar/ZoomTool.js +1 -1
  19. package/dist/components/page/AnnotationLayer.js +1 -1
  20. package/dist/components/page/CanvasLayer.js +1 -1
  21. package/dist/components/page/DualPage.js +1 -1
  22. package/dist/components/page/RPPage.js +1 -1
  23. package/dist/components/page/SinglePage.js +1 -1
  24. package/dist/components/page/TextLayer.js +1 -1
  25. package/dist/components/ui/LoadingIndicator.js +1 -1
  26. package/dist/contexts/DimensionPagesContext.js +32 -15
  27. package/dist/contexts/PaginationContext.js +1 -1
  28. package/dist/contexts/PrintContext.js +1 -1
  29. package/dist/contexts/SearchContext.js +1 -1
  30. package/dist/contexts/ThumbnailsContext.js +1 -1
  31. package/dist/contexts/ZoomContext.js +18 -18
  32. package/dist/main.js +1 -1
  33. package/dist/utils/hooks/useFileDownload.js +1 -1
  34. package/dist/utils/hooks/useLicense.js +1 -1
  35. package/dist/utils/hooks/usePaginate.js +1 -1
  36. package/dist/utils/hooks/usePrint.js +1 -1
  37. package/dist/utils/hooks/useScrollToPage.js +2 -3
  38. package/dist/utils/hooks/useSearch.js +1 -1
  39. package/dist/utils/hooks/useThumbnail.js +1 -1
  40. package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
  41. package/package.json +1 -1
  42. package/dist/types/utils/hooks/useDimensionPages.d.ts +0 -4
  43. package/dist/utils/hooks/useDimensionPages.js +0 -26
@@ -1,146 +1,156 @@
1
- import { jsx as i, jsxs as D, Fragment as ke } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as A, Fragment as Fe } from "react/jsx-runtime";
2
2
  import * as V from "react";
3
- import { useRef as W, useEffect as O, useCallback as L, useState as H, createContext as Be, useContext as Ke, useMemo as k, forwardRef as Xe, useImperativeHandle as Yt, createElement as $e, PureComponent as jn, Component as Bn, memo as Kn } from "react";
4
- import { ChevronUpIcon as We } from "./components/icons/ChevronUpIcon.js";
5
- import { UIButton as te } from "./components/ui/Button.js";
6
- import { UIInput as Qt } from "./components/ui/Input.js";
3
+ import { useRef as M, useEffect as z, useCallback as L, useState as H, createContext as je, useContext as Be, useMemo as k, forwardRef as Ke, useImperativeHandle as en, createElement as He, PureComponent as Bn, Component as Kn, memo as Xn } from "react";
4
+ import { ChevronUpIcon as ke } from "./components/icons/ChevronUpIcon.js";
5
+ import { UIButton as ee } from "./components/ui/Button.js";
6
+ import { UIInput as tn } from "./components/ui/Input.js";
7
7
  import { useScrollModeContext as Ee } from "./contexts/ScrollModeContext.js";
8
8
  import { useDocumentContext as Y } from "./contexts/RPDocumentContext.js";
9
9
  import "./contexts/DarkModeContext.js";
10
- import { ViewMode as qe, ScrollMode as X, AnnotationSubType as Rt, SelectionMode as Xn, ZoomLevel as rt } from "./utils/types.js";
11
- import { useRotationContext as Je } from "./contexts/RotationContext.js";
12
- import { useLayerContext as Jn } from "./contexts/LayerContext.js";
13
- import { useZoomContext as Ye } from "./contexts/ZoomContext.js";
14
- import { useViewModeContext as Qe } from "./contexts/ViewModeContext.js";
15
- import { useVirtualScrollContext as et } from "./contexts/VirtualScrollContext.js";
16
- import { useVirtualGridContext as en } from "./contexts/VirtualGridContext.js";
17
- import { useScrollStateContext as tt } from "./contexts/ScrollStateContext.js";
18
- import { useSelectionModeContext as Yn } from "./contexts/SelectionModeContext.js";
19
- import { useInitialStateContext as Qn } from "./contexts/InitialStateContext.js";
20
- import { useFullScreenContext as er } from "./contexts/FullScreenContext.js";
10
+ import { ViewMode as Ue, ScrollMode as K, AnnotationSubType as Lt, SelectionMode as Jn, ZoomLevel as rt } from "./utils/types.js";
11
+ import { useRotationContext as Xe } from "./contexts/RotationContext.js";
12
+ import { useLayerContext as Yn } from "./contexts/LayerContext.js";
13
+ import { useZoomContext as Je } from "./contexts/ZoomContext.js";
14
+ import { useViewModeContext as Ye } from "./contexts/ViewModeContext.js";
15
+ import { useVirtualScrollContext as Qe } from "./contexts/VirtualScrollContext.js";
16
+ import { useVirtualGridContext as nn } from "./contexts/VirtualGridContext.js";
17
+ import { useScrollStateContext as et } from "./contexts/ScrollStateContext.js";
18
+ import { useSelectionModeContext as Qn } from "./contexts/SelectionModeContext.js";
19
+ import { useInitialStateContext as er } from "./contexts/InitialStateContext.js";
20
+ import { useFullScreenContext as tr } from "./contexts/FullScreenContext.js";
21
21
  import "./contexts/FileInputContext.js";
22
22
  import "./contexts/DropFileZoneContext.js";
23
23
  import { renderPage as mt } from "./utils/renderPage.js";
24
- import { highlightMatches as tn, findMatches as tr, resetDivs as nr } from "./utils/highlight.js";
25
- import * as nn from "pdfjs-dist";
26
- import { PixelsPerInch as rr, AnnotationMode as or, RenderingCancelledException as ir, AnnotationLayer as ar } from "pdfjs-dist";
27
- import { useLayoutContainer as Ie } from "./contexts/LayoutContainerContext.js";
28
- import { useDimensionPagesContext as rn } from "./contexts/DimensionPagesContext.js";
29
- import { useLocalizationContext as le } from "./contexts/LocalizationContext.js";
24
+ import { highlightMatches as rn, findMatches as nr, resetDivs as rr } from "./utils/highlight.js";
25
+ import * as on from "pdfjs-dist";
26
+ import { PixelsPerInch as or, AnnotationMode as ir, RenderingCancelledException as ar, AnnotationLayer as sr } from "pdfjs-dist";
27
+ import { useLayoutContainer as Pe } from "./contexts/LayoutContainerContext.js";
28
+ import { useDimensionPagesContext as bt } from "./contexts/DimensionPagesContext.js";
29
+ import { useLocalizationContext as de } from "./contexts/LocalizationContext.js";
30
30
  import "./components/RPConfig.js";
31
- import { ThumbnailIcon as sr } from "./components/icons/Thumbnail.js";
31
+ import { ThumbnailIcon as cr } from "./components/icons/Thumbnail.js";
32
32
  import { c as re } from "./clsx-0c6e471a.js";
33
- import { LoaderIcon as Me } from "./components/icons/LoaderIcon.js";
34
- import { useInfiniteScroll as cr } from "./utils/hooks/useInfiniteScroll.js";
35
- import { RPSplitter as lr } from "./components/layout/sidebar/RPSplitter.js";
36
- import { useToolbarComponentContext as ge, ToolbarComponentProvider as ur } from "./contexts/ToolbarComponentContext.js";
37
- import { useIconContext as ue, IconProvider as dr } from "./contexts/IconContext.js";
38
- import Z from "./components/ui/RPTooltip.js";
39
- import { c as Ce, C as pr } from "./Container-8fea0875.js";
40
- import { WrapperLayout as hr } from "./components/layout/WrapperLayout.js";
41
- import { RPDropFileZone as mr } from "./components/RPDropFileZone.js";
42
- import { useViewportContext as ye, ViewportProvider as fr } from "./contexts/ViewportContext.js";
33
+ import { LoaderIcon as We } from "./components/icons/LoaderIcon.js";
34
+ import { useInfiniteScroll as lr } from "./utils/hooks/useInfiniteScroll.js";
35
+ import { RPSplitter as ur } from "./components/layout/sidebar/RPSplitter.js";
36
+ import { useToolbarComponentContext as ve, ToolbarComponentProvider as dr } from "./contexts/ToolbarComponentContext.js";
37
+ import { useIconContext as pe, IconProvider as pr } from "./contexts/IconContext.js";
38
+ import q from "./components/ui/RPTooltip.js";
39
+ import { c as be, C as hr } from "./Container-8fea0875.js";
40
+ import { WrapperLayout as mr } from "./components/layout/WrapperLayout.js";
41
+ import { RPDropFileZone as fr } from "./components/RPDropFileZone.js";
42
+ import { useViewportContext as Se, ViewportProvider as gr } from "./contexts/ViewportContext.js";
43
43
  import "./contexts/ThemeContext.js";
44
- import { SimpleLinkService as gr } from "./utils/link_service.js";
45
- import { annotationsEvents as vr, annotationEventsHandler as _r, handleClick as Lt, handleAnnotationWidget as wr, handleAnnotationLink as br, bindLayerEvents as Cr, unbindLayerEvents as Nt } from "./utils/annotations.js";
46
- import { useWatermark as Tr } from "./utils/hooks/useWatermark.js";
47
- import { useMousePressed as Pr } from "./utils/hooks/useMousePressed.js";
48
- import { useGrabScroll as Sr } from "./utils/hooks/useGrabScroll.js";
49
- import { usePinch as Ir } from "./utils/hooks/usePinch.js";
44
+ import { SimpleLinkService as vr } from "./utils/link_service.js";
45
+ import { annotationsEvents as _r, annotationEventsHandler as wr, handleClick as Nt, handleAnnotationWidget as br, handleAnnotationLink as Cr, bindLayerEvents as Tr, unbindLayerEvents as Et } from "./utils/annotations.js";
46
+ import { useWatermark as Pr } from "./utils/hooks/useWatermark.js";
47
+ import { useMousePressed as Sr } from "./utils/hooks/useMousePressed.js";
48
+ import { useGrabScroll as Ir } from "./utils/hooks/useGrabScroll.js";
49
+ import { usePinch as yr } from "./utils/hooks/usePinch.js";
50
50
  import { useDebounce as ft } from "./utils/hooks/useDebounce.js";
51
- import { getThumbnailViewport as Et } from "./utils/getThumbnailViewport.js";
52
- import { useDimensionPages as yr } from "./utils/hooks/useDimensionPages.js";
53
- import { smoothScrollTo as Te } from "./utils/smoothScrollTo.js";
51
+ import { getThumbnailViewport as Ot } from "./utils/getThumbnailViewport.js";
52
+ import { smoothScrollTo as Dt } from "./utils/smoothScrollTo.js";
54
53
  import { appConsole as xr } from "./utils/appConsole.js";
55
- import { FileUploadTool as on } from "./components/layout/toolbar/FileUploadTool.js";
54
+ import { FileUploadTool as an } from "./components/layout/toolbar/FileUploadTool.js";
56
55
  import { DarkModeTool as Rr } from "./components/layout/toolbar/DarkModeTool.js";
57
56
  import { ThreeDotIcon as Lr } from "./components/icons/ThreeDotIcon.js";
58
- import { UIDropDown as an } from "./components/ui/DropDown.js";
59
- import { c as Nr, u as bt, P as He, b as Fe, d as Ct, i as Er, k as Or, a as Dr } from "./index-48ca3f30.js";
57
+ import { UIDropDown as sn } from "./components/ui/DropDown.js";
58
+ import { c as Nr, u as Ct, P as Me, b as Ae, d as Tt, i as Er, k as Or, a as Dr } from "./index-48ca3f30.js";
60
59
  import { D as zr, d as ot } from "./floating-ui.react-dom-88a86594.js";
61
- import { a as Ar, h as Fr, u as kr, F as Wr, b as Mr, G as Ze } from "./index-4ba3ab9a.js";
62
- import { CloseIcon as sn } from "./components/icons/CloseIcon.js";
63
- import { dateFormatter as Ot } from "./utils/dateFormatter.js";
60
+ import { a as Ar, h as Fr, u as kr, F as Wr, b as Mr, G as qe } from "./index-4ba3ab9a.js";
61
+ import { CloseIcon as cn } from "./components/icons/CloseIcon.js";
62
+ import { dateFormatter as zt } from "./utils/dateFormatter.js";
64
63
  import { PropertyItem as Hr } from "./components/layout/toolbar/PropertyItem.js";
65
64
  import { useOtherToolContext as $r, OtherToolProvider as Gr } from "./contexts/OtherToolContext.js";
66
65
  import { DocumentProperties as Vr } from "./components/layout/toolbar/DocumentProperties.js";
67
66
  import { RotateTool as Ur } from "./components/layout/toolbar/RotateTool.js";
68
67
  import { ScrollModeTool as qr } from "./components/layout/toolbar/ScrollModeTool.js";
69
- import { MenuSeparator as Tt } from "./components/layout/toolbar/MenuSeparator.js";
68
+ import { MenuSeparator as Pt } from "./components/layout/toolbar/MenuSeparator.js";
70
69
  import { FileDownloadDefaultIcon as Zr } from "./components/icons/FileDownloadDefaultIcon.js";
71
70
  import { MenuItem as we } from "./components/layout/toolbar/MenuItem.js";
72
71
  import { PrintDefaultTool as jr } from "./components/icons/PrintDefaultIcon.js";
73
- import { FullScreenTool as cn } from "./components/layout/toolbar/FullScreenTool.js";
74
- import { GoToDownIcon as ln } from "./components/icons/GoToDownIcon.js";
72
+ import { FullScreenTool as ln } from "./components/layout/toolbar/FullScreenTool.js";
73
+ import { GoToDownIcon as un } from "./components/icons/GoToDownIcon.js";
75
74
  import { SelectionModeTool as Br } from "./components/layout/toolbar/SelectionModeTool.js";
76
75
  import { ZoomInIcon as Kr } from "./components/icons/ZoomInIcon.js";
77
76
  import { ZoomOutIcon as Xr } from "./components/icons/ZoomOutIcon.js";
78
- import { PAGE_PADDING as Dt } from "./utils/constants.js";
77
+ import { PAGE_PADDING as At } from "./utils/constants.js";
79
78
  import { getZoomLevel as Jr } from "./utils/getZoomLevel.js";
80
79
  import { SearchIcon as Yr } from "./components/icons/SearchIcon.js";
81
- import { UICheckbox as zt } from "./components/ui/Checkbox.js";
80
+ import { UICheckbox as Ft } from "./components/ui/Checkbox.js";
82
81
  import { ClearIcon as Qr } from "./components/icons/ClearIcon.js";
83
- import { InfoIcon as At } from "./components/icons/InfoIcon.js";
82
+ import { InfoIcon as kt } from "./components/icons/InfoIcon.js";
84
83
  import { UIPopOver as eo } from "./components/ui/Popover.js";
85
- import './assets/RPDefaultLayout.css';const un = () => {
86
- const { viewMode: t } = Qe(), { scrollMode: e } = Ee(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = se(), s = W(), { columnCount: c } = en(), { widths: l, heights: u } = yr(), h = W(e), f = W(t), p = W(c);
87
- O(() => {
84
+ import './assets/RPDefaultLayout.css';const dn = () => {
85
+ const { viewMode: t } = Ye(), { scrollMode: e } = Ee(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = Qe(), { setFocusedPage: a } = se(), s = M(), { columnCount: c } = nn(), { widths: l, heights: u } = bt(), h = M(e), f = M(t), p = M(c);
86
+ z(() => {
88
87
  n != null && n.scrollToItem && (s.current = n);
89
- }, [n]), O(() => {
88
+ }, [n]), z(() => {
90
89
  h.current = e, f.current = t;
91
90
  }, [e, t]);
92
91
  const v = L(
93
92
  (C) => {
94
93
  if (!r)
95
94
  return;
96
- const g = Math.ceil(C / 2) * 2 - 1;
97
- return C === g + 1 ? new Promise(
98
- (_) => Te(
99
- r,
100
- {
101
- left: l[g],
102
- top: 0
103
- },
104
- _
105
- )
106
- ) : new Promise(
107
- (_) => Te(r, { left: 0, top: 0 }, _)
108
- );
95
+ const w = Math.ceil(C / 2) * 2 - 1;
96
+ return C === w + 1 ? new Promise((g) => {
97
+ r.scrollTo({
98
+ left: l[w],
99
+ top: 0
100
+ }), g();
101
+ }) : new Promise((g) => {
102
+ r.scrollTo({
103
+ left: 0,
104
+ top: 0
105
+ }), g();
106
+ });
109
107
  },
110
- [r, l, Te]
108
+ [r, l, Dt]
111
109
  );
112
- return O(() => {
110
+ return z(() => {
113
111
  h.current = e, f.current = t;
114
- }, [e, t]), O(() => {
112
+ }, [e, t]), z(() => {
115
113
  p.current = c;
116
114
  }, [c]), { scrollToPage: L(
117
115
  (C) => {
118
- const g = C - 1;
119
- let _ = g, m = 0;
120
- if (f.current === qe.DUAL_PAGE && h.current === X.PAGE_SCROLLING)
116
+ const w = C - 1;
117
+ let g = w, m = 0;
118
+ if (f.current === Ue.DUAL_PAGE && h.current === K.PAGE_SCROLLING)
121
119
  return v(C), Promise.resolve();
122
- if (h.current === X.PAGE_SCROLLING)
120
+ if (h.current === K.PAGE_SCROLLING)
123
121
  return a(C), Promise.resolve();
124
122
  if (!s.current || !o)
125
123
  return Promise.resolve();
126
124
  const P = o;
127
- if (h.current === X.HORIZONTAL_SCROLLING) {
128
- m = g;
129
- const d = g * (l[g] ?? 0);
130
- return new Promise(
131
- (T) => Te(P, { left: d, top: 0 }, T)
132
- );
125
+ if (h.current === K.HORIZONTAL_SCROLLING) {
126
+ m = w;
127
+ const d = w * (l[w] ?? 0);
128
+ return new Promise((T) => {
129
+ P.scrollTo({
130
+ left: d,
131
+ top: 0
132
+ }), T();
133
+ });
133
134
  }
134
- if (f.current === qe.DUAL_PAGE) {
135
- m = g % 2, _ = Math.floor(g / 2);
136
- const T = _ * (u[_] ?? 0), b = m * (l[m] ?? 0);
137
- return new Promise(
138
- (S) => Te(P, { left: b, top: T }, S)
139
- );
135
+ if (f.current === Ue.DUAL_PAGE) {
136
+ m = w % 2, g = Math.floor(w / 2);
137
+ const T = g * (u[g] ?? 0), b = m * (l[m] ?? 0);
138
+ return new Promise((S) => {
139
+ P.scrollTo({
140
+ left: b,
141
+ top: T
142
+ }), S();
143
+ });
140
144
  }
141
- const I = _ * (u[_] ?? 0);
145
+ const I = g * (u[g] ?? 0);
142
146
  return new Promise(
143
- (d) => Te(P, { left: 0, top: I }, d)
147
+ (d) => {
148
+ P.scrollTo({
149
+ top: I,
150
+ left: 0
151
+ }), d();
152
+ }
153
+ // smoothScrollTo(scrollElement, { left: 0, top: targetTop }, resolve)
144
154
  );
145
155
  },
146
156
  [
@@ -148,34 +158,34 @@ import './assets/RPDefaultLayout.css';const un = () => {
148
158
  c,
149
159
  v,
150
160
  a,
151
- Te,
161
+ Dt,
152
162
  u,
153
163
  l
154
164
  ]
155
165
  ) };
156
166
  }, to = (t = 1) => {
157
- const [e, n] = H(t), [o, r] = H(0), { scrollToPage: a } = un(), s = W(1), { isScrolling: c } = tt(), { viewMode: l } = Qe(), { scrollMode: u } = Ee(), h = ft(e, 100), f = L(
158
- (g) => {
159
- if (!/^[0-9]*$/g.test(g.toString()) || !g)
167
+ const [e, n] = H(t), [o, r] = H(0), { scrollToPage: a } = dn(), s = M(1), { isScrolling: c } = et(), { viewMode: l } = Ye(), { scrollMode: u } = Ee(), h = ft(e, 100), f = L(
168
+ (w) => {
169
+ if (!/^[0-9]*$/g.test(w.toString()) || !w)
160
170
  return { success: !1, currentPage: s.current };
161
- const m = +g;
162
- return m < 0 || m > o ? { success: !1, currentPage: s.current } : (n(m), s.current = m, { success: !0, currentPage: +g });
171
+ const m = +w;
172
+ return m < 0 || m > o ? { success: !1, currentPage: s.current } : (n(m), s.current = m, { success: !0, currentPage: +w });
163
173
  },
164
174
  [o]
165
175
  ), p = L(f, [f]), v = L(
166
- async (g) => {
176
+ async (w) => {
167
177
  if (c.current)
168
178
  return { success: !1, currentPage: s.current };
169
- const _ = f(g);
170
- return _.success && (c.current = !0, await a(_.currentPage), c.current = !1), _;
179
+ const g = f(w);
180
+ return g.success && (c.current = !0, await a(g.currentPage), c.current = !1), g;
171
181
  },
172
182
  [f, a]
173
- ), w = L(() => {
174
- let g = e - 1;
175
- v(g);
183
+ ), _ = L(() => {
184
+ let w = e - 1;
185
+ v(w);
176
186
  }, [v, e, l, u]), C = L(() => {
177
- let g = e + 1;
178
- v(g);
187
+ let w = e + 1;
188
+ v(w);
179
189
  }, [v, e, l, u]);
180
190
  return {
181
191
  focusedPage: h,
@@ -183,10 +193,10 @@ import './assets/RPDefaultLayout.css';const un = () => {
183
193
  setFocusedPage: p,
184
194
  setTotalPages: r,
185
195
  nextPage: C,
186
- prevPage: w,
196
+ prevPage: _,
187
197
  goToPage: v
188
198
  };
189
- }, dn = Be({
199
+ }, pn = je({
190
200
  focusedPage: 0,
191
201
  setFocusedPage: (t) => {
192
202
  },
@@ -199,14 +209,14 @@ import './assets/RPDefaultLayout.css';const un = () => {
199
209
  nextPage: () => {
200
210
  }
201
211
  }), se = () => {
202
- const t = Ke(dn);
212
+ const t = Be(pn);
203
213
  return typeof (t == null ? void 0 : t.focusedPage) > "u" && xr.error("Please use this hooks inside children component of RPProvider"), t;
204
- }, ts = ({ children: t }) => {
214
+ }, es = ({ children: t }) => {
205
215
  const { pdf: e } = Y(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: s, nextPage: c, prevPage: l } = to();
206
- return O(() => {
216
+ return z(() => {
207
217
  e != null && e.numPages && a(e.numPages);
208
218
  }, [e, a]), /* @__PURE__ */ i(
209
- dn.Provider,
219
+ pn.Provider,
210
220
  {
211
221
  value: {
212
222
  focusedPage: n,
@@ -226,8 +236,8 @@ const no = () => {
226
236
  loadedPages: 0,
227
237
  totalPages: 0,
228
238
  percentage: 0
229
- }), [r, a] = H(!1), [s, c] = H(!1), [l, u] = H(null), h = W(!1);
230
- O(() => {
239
+ }), [r, a] = H(!1), [s, c] = H(!1), [l, u] = H(null), h = M(!1);
240
+ z(() => {
231
241
  h.current;
232
242
  }, [h]);
233
243
  const f = L(() => {
@@ -242,44 +252,44 @@ const no = () => {
242
252
  });
243
253
  }, []), v = () => {
244
254
  h.current = !0;
245
- }, w = async ({
255
+ }, _ = async ({
246
256
  scratchCanvas: P,
247
257
  pdfDocument: I,
248
258
  pageNumber: d,
249
259
  viewerPdfPage: T,
250
260
  printResolution: b,
251
261
  optionalContentConfigPromise: S,
252
- printAnnotationStoragePromise: A
262
+ printAnnotationStoragePromise: F
253
263
  }) => {
254
264
  if (h.current) {
255
265
  p();
256
266
  return;
257
267
  }
258
- const y = b / rr.PDF;
259
- P.width = Math.floor(T.width * y), P.height = Math.floor(T.height * y);
260
- const E = P.getContext("2d");
261
- E.save(), E.fillStyle = "rgb(255, 255, 255)", E.fillRect(0, 0, P.width, P.height), E.restore();
262
- const [x, F] = await Promise.all([
268
+ const x = b / or.PDF;
269
+ P.width = Math.floor(T.width * x), P.height = Math.floor(T.height * x);
270
+ const N = P.getContext("2d");
271
+ N.save(), N.fillStyle = "rgb(255, 255, 255)", N.fillRect(0, 0, P.width, P.height), N.restore();
272
+ const [R, O] = await Promise.all([
263
273
  I.getPage(d),
264
- A
274
+ F
265
275
  ]);
266
276
  if (h.current) {
267
277
  p();
268
278
  return;
269
279
  }
270
- const z = {
271
- canvasContext: E,
272
- transform: [y, 0, 0, y, 0, 0],
273
- viewport: x.getViewport({ scale: 1, rotation: T.rotation }),
280
+ const D = {
281
+ canvasContext: N,
282
+ transform: [x, 0, 0, x, 0, 0],
283
+ viewport: R.getViewport({ scale: 1, rotation: T.rotation }),
274
284
  intent: "print",
275
- annotationMode: or.ENABLE_STORAGE,
285
+ annotationMode: ir.ENABLE_STORAGE,
276
286
  optionalContentConfigPromise: S,
277
- printAnnotationStorage: F
287
+ printAnnotationStorage: O
278
288
  };
279
289
  try {
280
- return x.render(z).promise;
281
- } catch (R) {
282
- throw R instanceof ir || console.error(R), R;
290
+ return R.render(D).promise;
291
+ } catch (y) {
292
+ throw y instanceof ar || console.error(y), y;
283
293
  }
284
294
  }, C = L(() => {
285
295
  const P = window.print;
@@ -298,7 +308,7 @@ const no = () => {
298
308
  });
299
309
  b.observe(document.body, { childList: !0, subtree: !0 });
300
310
  });
301
- }, []), g = async (P) => {
311
+ }, []), w = async (P) => {
302
312
  const I = document.createElement("img"), d = document.createElement("div");
303
313
  return d.classList.add("rp-print-page"), await new Promise((T, b) => {
304
314
  P.toBlob((S) => {
@@ -308,13 +318,13 @@ const no = () => {
308
318
  });
309
319
  }).catch(() => {
310
320
  }), d.appendChild(I), d;
311
- }, _ = (P, I) => {
321
+ }, g = (P, I) => {
312
322
  const d = document.createElement("div");
313
323
  d.classList.add("rp-print-zone");
314
324
  const T = document.createElement("style"), b = I.get(1);
315
325
  if (b) {
316
- const { width: S, height: A } = b == null ? void 0 : b.page.getViewport({ scale: 1 });
317
- T.innerHTML = `@page { size: ${S}px ${A}px }`;
326
+ const { width: S, height: F } = b == null ? void 0 : b.page.getViewport({ scale: 1 });
327
+ T.innerHTML = `@page { size: ${S}px ${F}px }`;
318
328
  }
319
329
  return d.appendChild(T), d.append(...P), d;
320
330
  }, m = L(async () => {
@@ -327,17 +337,17 @@ const no = () => {
327
337
  const T = t.getOptionalContentConfig({ intent: "print" }), b = Promise.resolve(
328
338
  t.annotationStorage.print ?? void 0
329
339
  ), S = e.size;
330
- for (const [y, E] of e) {
340
+ for (const [x, N] of e) {
331
341
  if (h.current) {
332
342
  p();
333
343
  return;
334
344
  }
335
- const x = E.page.getViewport({ scale: 1 });
336
- if (await w({
345
+ const R = N.page.getViewport({ scale: 1 });
346
+ if (await _({
337
347
  scratchCanvas: P,
338
348
  pdfDocument: t,
339
- pageNumber: y,
340
- viewerPdfPage: x,
349
+ pageNumber: x,
350
+ viewerPdfPage: R,
341
351
  printResolution: 150,
342
352
  optionalContentConfigPromise: T,
343
353
  printAnnotationStoragePromise: b
@@ -345,28 +355,28 @@ const no = () => {
345
355
  p();
346
356
  return;
347
357
  }
348
- const F = await g(P);
349
- I.push(F);
350
- const z = parseFloat((I.length / S * 100).toFixed(2));
358
+ const O = await w(P);
359
+ I.push(O);
360
+ const D = parseFloat((I.length / S * 100).toFixed(2));
351
361
  o({
352
- loadedPages: y,
362
+ loadedPages: x,
353
363
  totalPages: S,
354
- percentage: z
364
+ percentage: D
355
365
  });
356
366
  }
357
367
  if (h.current) {
358
368
  p();
359
369
  return;
360
370
  }
361
- const A = _(I, e);
362
- document.body.appendChild(A), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await C();
371
+ const F = g(I, e);
372
+ document.body.appendChild(F), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await C();
363
373
  } catch (d) {
364
374
  c(!0), d instanceof Error && u(d);
365
375
  } finally {
366
376
  P.height = 0, P.width = 0;
367
377
  }
368
378
  }, [t, e, h]);
369
- return O(() => {
379
+ return z(() => {
370
380
  const P = () => {
371
381
  p(), f();
372
382
  };
@@ -381,7 +391,7 @@ const no = () => {
381
391
  isError: s,
382
392
  error: l
383
393
  };
384
- }, pn = Be({
394
+ }, hn = je({
385
395
  print: () => {
386
396
  },
387
397
  cancel: () => {
@@ -398,27 +408,27 @@ const no = () => {
398
408
  console.error("Error in setOnError callback:", e);
399
409
  }
400
410
  }
401
- }), ns = ({ children: t }) => {
402
- const [e, n] = H(null), [o, r] = H(null), { print: a, cancel: s, progress: c, isComplete: l, isError: u, error: h } = no(), f = L((g) => {
403
- g && typeof g == "function" && r(() => g);
404
- }, []), p = (g) => {
405
- h && g(h);
411
+ }), ts = ({ children: t }) => {
412
+ const [e, n] = H(null), [o, r] = H(null), { print: a, cancel: s, progress: c, isComplete: l, isError: u, error: h } = no(), f = L((w) => {
413
+ w && typeof w == "function" && r(() => w);
414
+ }, []), p = (w) => {
415
+ h && w(h);
406
416
  }, v = L(
407
- (g) => {
408
- n(() => g);
417
+ (w) => {
418
+ n(() => w);
409
419
  },
410
420
  [c, e]
411
421
  );
412
- O(() => {
413
- l && o && w();
414
- }, [l, o]), O(() => {
415
- u && p((g) => {
416
- console.error(g);
422
+ z(() => {
423
+ l && o && _();
424
+ }, [l, o]), z(() => {
425
+ u && p((w) => {
426
+ console.error(w);
417
427
  });
418
- }, [u]), O(() => {
428
+ }, [u]), z(() => {
419
429
  c && e && e(c);
420
430
  }, [c, e]);
421
- const w = () => {
431
+ const _ = () => {
422
432
  o && (o(), r(null));
423
433
  }, C = {
424
434
  print: a,
@@ -428,19 +438,19 @@ const no = () => {
428
438
  setOnError: p,
429
439
  progress: c
430
440
  };
431
- return /* @__PURE__ */ i(pn.Provider, { value: C, children: t });
432
- }, nt = () => {
433
- const t = Ke(pn);
441
+ return /* @__PURE__ */ i(hn.Provider, { value: C, children: t });
442
+ }, tt = () => {
443
+ const t = Be(hn);
434
444
  if (!t)
435
445
  throw new Error("usePrintContext must be used within a PrintProvider");
436
446
  return t;
437
447
  }, ro = () => {
438
- const [t, e] = H({}), { pages: n } = Y(), { rotate: o } = Je(), r = k(() => Object.keys(t).length, [t]), a = L(
448
+ const [t, e] = H({}), { pages: n } = Y(), { rotate: o } = Xe(), r = k(() => Object.keys(t).length, [t]), a = L(
439
449
  (c) => {
440
450
  if (!n.size)
441
451
  return;
442
452
  const l = Array.from(n.values()).slice(0, c).map((f) => {
443
- const { thumbnailViewport: p, scale: v } = Et(f.page, o);
453
+ const { thumbnailViewport: p, scale: v } = Ot(f.page, o);
444
454
  return {
445
455
  scale: v,
446
456
  page: f.page,
@@ -455,10 +465,10 @@ const no = () => {
455
465
  scale: f.scale,
456
466
  rotate: o
457
467
  }).promise.then(() => {
458
- const w = p.toDataURL();
468
+ const _ = p.toDataURL();
459
469
  return {
460
470
  ...f,
461
- thumbnailSrc: w,
471
+ thumbnailSrc: _,
462
472
  loading: !1
463
473
  };
464
474
  });
@@ -466,7 +476,7 @@ const no = () => {
466
476
  }
467
477
  Promise.all(h).then((f) => {
468
478
  const p = f.reduce(
469
- (v, w) => (v[w.page.pageNumber] = w, v),
479
+ (v, _) => (v[_.page.pageNumber] = _, v),
470
480
  {}
471
481
  );
472
482
  e((v) => ({ ...v, ...p }));
@@ -474,7 +484,7 @@ const no = () => {
474
484
  },
475
485
  [n, o]
476
486
  );
477
- O(() => {
487
+ z(() => {
478
488
  a(10);
479
489
  }, [a]);
480
490
  const s = L(
@@ -495,7 +505,7 @@ const no = () => {
495
505
  }));
496
506
  const u = document.createElement("canvas");
497
507
  mt(l.page, u, { scale: l.thumbnailScale, rotate: o }).promise.then(() => {
498
- const h = u.toDataURL(), { thumbnailViewport: f, scale: p } = Et(l.page, o);
508
+ const h = u.toDataURL(), { thumbnailViewport: f, scale: p } = Ot(l.page, o);
499
509
  return {
500
510
  scale: p,
501
511
  thumbnailSrc: h,
@@ -510,7 +520,7 @@ const no = () => {
510
520
  [n, o]
511
521
  );
512
522
  return { thumbnailPages: t, addPage: s, addToPage: a, thumbnailLength: r };
513
- }, hn = Be({
523
+ }, mn = je({
514
524
  thumbnailPages: {},
515
525
  addPage: (t) => {
516
526
  },
@@ -520,46 +530,46 @@ const no = () => {
520
530
  setActive: (t) => {
521
531
  },
522
532
  active: !1
523
- }), mn = () => Ke(hn), rs = ({
533
+ }), fn = () => Be(mn), ns = ({
524
534
  children: t,
525
535
  initialThumbnailsVisible: e
526
536
  }) => {
527
537
  const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = ro(), [s, c] = H(e);
528
538
  return /* @__PURE__ */ i(
529
- hn.Provider,
539
+ mn.Provider,
530
540
  {
531
541
  value: { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a, active: s, setActive: c },
532
542
  children: t
533
543
  }
534
544
  );
535
545
  }, oo = (t = {}, e = "") => {
536
- const [n, o] = H(e), [r, a] = H(!1), { pdf: s, pages: c } = Y(), l = rn(), u = W(!n), { currentZoom: h } = Ye(), [f, p] = H([]), { setFocusedPage: v } = se(), [w, C] = H(0), { pageScrollElementRef: g, virtualScrollableElementRef: _ } = et(), { scrollMode: m } = Ee(), { pagesRef: P } = Ie(), [I, d] = H(null), T = W({}), b = k(() => w === 0 ? null : f[w - 1], [w, f]), S = k(() => f.length, [f]);
537
- O(() => {
546
+ const [n, o] = H(e), [r, a] = H(!1), { pdf: s, pages: c } = Y(), l = bt(), u = M(!n), { currentZoom: h } = Je(), [f, p] = H([]), { setFocusedPage: v } = se(), [_, C] = H(0), { pageScrollElementRef: w, virtualScrollableElementRef: g } = Qe(), { scrollMode: m } = Ee(), { pagesRef: P } = Pe(), [I, d] = H(null), T = M({}), b = k(() => _ === 0 ? null : f[_ - 1], [_, f]), S = k(() => f.length, [f]);
547
+ z(() => {
538
548
  if (!b || !c)
539
549
  return;
540
- const x = _ || g;
541
- if (!x || !P)
550
+ const R = g || w;
551
+ if (!R || !P)
542
552
  return;
543
- const F = c.get(b.page), z = P.clientHeight / 2, R = P.clientWidth / 2;
544
- let N = 0, $ = 0;
545
- m === X.PAGE_SCROLLING && v(b.page), m === X.VERTICAL_SCROLLING && (N = l.heights.slice(0, b.page - 1).reduce((q, K) => q + K, 0)), m === X.HORIZONTAL_SCROLLING && ($ = l.widths.slice(0, b.page - 1).reduce((q, K) => q + K, 0));
553
+ const O = c.get(b.page), D = P.clientHeight / 2, y = P.clientWidth / 2;
554
+ let E = 0, W = 0;
555
+ m === K.PAGE_SCROLLING && v(b.page), m === K.VERTICAL_SCROLLING && (E = l.heights.slice(0, b.page - 1).reduce((Z, B) => Z + B, 0)), m === K.HORIZONTAL_SCROLLING && (W = l.widths.slice(0, b.page - 1).reduce((Z, B) => Z + B, 0));
546
556
  let U;
547
- if (!F)
557
+ if (!O)
548
558
  return;
549
- const j = T.current[b.page], B = F.page.getViewport({ scale: 1 });
550
- U = new nn.TextLayer({
551
- viewport: B,
559
+ const j = T.current[b.page], X = O.page.getViewport({ scale: 1 });
560
+ U = new on.TextLayer({
561
+ viewport: X,
552
562
  textContentSource: j,
553
563
  container: document.createElement("div")
554
564
  }), U.render().then(() => {
555
- const q = U.textDivs[b.start.idx], [K] = tn([b], j, U.textDivs), ie = l.widths[b.page - 1], de = l.heights[b.page - 1], Q = document.createElement("div"), ae = document.createElement("div");
556
- q.style.position = "absolute", q.style.color = "transparent", ae.style.position = "absolute", ae.style.top = "0", ae.style.setProperty("--scale-factor", `${h}`), Q.style.position = "relative", Q.style.width = `${ie}px`, Q.style.height = `${de}px`, Q.style.zIndex = "-1", Q.appendChild(q), ae.appendChild(Q), P.prepend(ae);
557
- const ee = K.element.getBoundingClientRect(), be = ae.getBoundingClientRect(), Oe = ee.top - be.top, ve = ee.left - be.left, pe = N + Oe - z + ee.height / 2, he = $ + ve - R + ee.width / 2, De = {
558
- left: Math.max(he, 0),
559
- top: Math.max(pe, 0)
565
+ const Z = U.textDivs[b.start.idx], [B] = rn([b], j, U.textDivs), le = l.widths[b.page - 1], ie = l.heights[b.page - 1], Q = document.createElement("div"), te = document.createElement("div");
566
+ Z.style.position = "absolute", Z.style.color = "transparent", te.style.position = "absolute", te.style.top = "0", te.style.setProperty("--scale-factor", `${h}`), Q.style.position = "relative", Q.style.width = `${le}px`, Q.style.height = `${ie}px`, Q.style.zIndex = "-1", Q.appendChild(Z), te.appendChild(Q), P.prepend(te);
567
+ const he = B.element.getBoundingClientRect(), ue = te.getBoundingClientRect(), Ie = he.top - ue.top, ye = he.left - ue.left, ae = E + Ie - D + he.height / 2, me = W + ye - y + he.width / 2, Oe = {
568
+ left: Math.max(me, 0),
569
+ top: Math.max(ae, 0)
560
570
  };
561
- P.removeChild(ae), x.scrollTo({
562
- ...De
571
+ P.removeChild(te), R.scrollTo({
572
+ ...Oe
563
573
  });
564
574
  });
565
575
  }, [
@@ -568,60 +578,60 @@ const no = () => {
568
578
  l,
569
579
  b,
570
580
  m,
571
- _,
572
581
  g,
582
+ w,
573
583
  P
574
584
  ]);
575
- const A = L(() => {
576
- C((x) => S ? x + 1 > S ? 1 : x + 1 : 0);
577
- }, [S]), y = L(() => {
578
- C((x) => S ? x - 1 <= 0 ? S : x - 1 : 0);
579
- }, [S]), E = L(async (x) => {
580
- if (!x)
585
+ const F = L(() => {
586
+ C((R) => S ? R + 1 > S ? 1 : R + 1 : 0);
587
+ }, [S]), x = L(() => {
588
+ C((R) => S ? R - 1 <= 0 ? S : R - 1 : 0);
589
+ }, [S]), N = L(async (R) => {
590
+ if (!R)
581
591
  return {};
582
- const F = x.numPages, z = {};
583
- for (let R = 1; R <= F; R++) {
592
+ const O = R.numPages, D = {};
593
+ for (let y = 1; y <= O; y++) {
584
594
  if (u.current)
585
595
  throw "close pop over";
586
- const N = await x.getPage(R);
587
- z[R.toString()] = await N.getTextContent();
596
+ const E = await R.getPage(y);
597
+ D[y.toString()] = await E.getTextContent();
588
598
  }
589
- return z;
599
+ return D;
590
600
  }, []);
591
- return O(() => {
601
+ return z(() => {
592
602
  if (!n) {
593
603
  u.current = !0, p([]), C(0);
594
604
  return;
595
605
  }
596
- u.current = !1, a(!0), p([]), C(0), E(s).then((x) => {
597
- T.current = x;
598
- const z = Object.keys(x).reduce((R, N) => {
599
- const $ = tr(
606
+ u.current = !1, a(!0), p([]), C(0), N(s).then((R) => {
607
+ T.current = R;
608
+ const D = Object.keys(R).reduce((y, E) => {
609
+ const W = nr(
600
610
  [n],
601
- x[N],
602
- Number(N) - 1,
611
+ R[E],
612
+ Number(E) - 1,
603
613
  t
604
- ).map((U, j) => ({ ...U, page: Number(N), pageMatchIdx: j }));
605
- return [...R, ...$];
614
+ ).map((U, j) => ({ ...U, page: Number(E), pageMatchIdx: j }));
615
+ return [...y, ...W];
606
616
  }, []);
607
- p(z), C(z.length ? 1 : 0);
617
+ p(D), C(D.length ? 1 : 0);
608
618
  }).catch(() => {
609
619
  p([]), C(0);
610
620
  }).finally(() => a(!1));
611
- }, [n, E, s, t]), {
621
+ }, [n, N, s, t]), {
612
622
  search: n,
613
623
  setSearch: o,
614
624
  loading: r,
615
625
  matches: f,
616
626
  totalMatches: S,
617
- currentMatchPosition: w,
627
+ currentMatchPosition: _,
618
628
  currentMatch: b,
619
- nextMatch: A,
620
- prevMatch: y,
629
+ nextMatch: F,
630
+ prevMatch: x,
621
631
  currentMatchElement: I,
622
632
  setCurrentMatchElement: d
623
633
  };
624
- }, fn = Be({
634
+ }, gn = je({
625
635
  search: "",
626
636
  setSearch: (t) => {
627
637
  },
@@ -639,7 +649,7 @@ const no = () => {
639
649
  currentMatchElement: null,
640
650
  setCurrentMatchElement: (t) => {
641
651
  }
642
- }), os = ({
652
+ }), rs = ({
643
653
  children: t,
644
654
  initialSearch: e
645
655
  }) => {
@@ -654,10 +664,10 @@ const no = () => {
654
664
  nextMatch: f,
655
665
  prevMatch: p,
656
666
  currentMatchElement: v,
657
- setCurrentMatchElement: w
667
+ setCurrentMatchElement: _
658
668
  } = oo(n, e);
659
669
  return /* @__PURE__ */ i(
660
- fn.Provider,
670
+ gn.Provider,
661
671
  {
662
672
  value: {
663
673
  searchOptions: n,
@@ -672,12 +682,12 @@ const no = () => {
672
682
  search: u,
673
683
  matches: h,
674
684
  currentMatchElement: v,
675
- setCurrentMatchElement: w
685
+ setCurrentMatchElement: _
676
686
  },
677
687
  children: t
678
688
  }
679
689
  );
680
- }, gn = () => Ke(fn), me = {
690
+ }, vn = () => Be(gn), fe = {
681
691
  "rp-pages": "_rp-pages_34orh_1",
682
692
  "rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_34orh_7",
683
693
  "rp-pages-container": "_rp-pages-container_34orh_11",
@@ -690,8 +700,8 @@ const no = () => {
690
700
  "rp-page": "_rp-page_h7a2q_1",
691
701
  "rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
692
702
  }, io = (t) => {
693
- const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = W(null), { pages: a } = Y(), { rotate: s } = Je(), c = W(), { currentZoom: l } = Ye();
694
- return O(() => {
703
+ const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = M(null), { pages: a } = Y(), { rotate: s } = Xe(), c = M(), { currentZoom: l } = Je();
704
+ return z(() => {
695
705
  if (!a || l === 0)
696
706
  return;
697
707
  const u = a.get(e);
@@ -715,58 +725,58 @@ const no = () => {
715
725
  "rp-text-layer": "_rp-text-layer_kwwfn_1",
716
726
  "rp-text-layer-text": "_rp-text-layer-text_kwwfn_9"
717
727
  }, ao = (t) => {
718
- const { pageNumber: e } = t, { pages: n } = Y(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: s } = gn(), [c, l] = H(
728
+ const { pageNumber: e } = t, { pages: n } = Y(), o = M(null), { matches: r, currentMatch: a, setCurrentMatchElement: s } = vn(), [c, l] = H(
719
729
  []
720
- ), u = W(), h = W(), f = W(), p = k(() => r.filter((w) => w.pageIndex === e - 1), [r, e]), v = L(
721
- (w, C, g = !1) => {
722
- if (g && nr(w, C), !p.length) {
730
+ ), u = M(), h = M(), f = M(), p = k(() => r.filter((_) => _.pageIndex === e - 1), [r, e]), v = L(
731
+ (_, C, w = !1) => {
732
+ if (w && rr(_, C), !p.length) {
723
733
  f.current = void 0, l([]);
724
734
  return;
725
735
  }
726
- const _ = tn(p, w, C);
727
- l(_);
736
+ const g = rn(p, _, C);
737
+ l(g);
728
738
  },
729
739
  [p]
730
740
  );
731
- return O(() => {
732
- var g;
733
- if ((g = f.current) == null || g.classList.remove("selected"), !c.length || !a || a.pageIndex !== e - 1)
741
+ return z(() => {
742
+ var w;
743
+ if ((w = f.current) == null || w.classList.remove("selected"), !c.length || !a || a.pageIndex !== e - 1)
734
744
  return;
735
- const w = p.findIndex(
736
- (_) => JSON.stringify(_) === JSON.stringify(a)
745
+ const _ = p.findIndex(
746
+ (g) => JSON.stringify(g) === JSON.stringify(a)
737
747
  );
738
- if (w === -1)
748
+ if (_ === -1)
739
749
  return;
740
- const C = c.find((_) => _.index === w);
750
+ const C = c.find((g) => g.index === _);
741
751
  C && (f.current = C.element, s(C.element), C.element.classList.add("selected"));
742
- }, [a, c, p]), O(() => {
743
- const w = n.get(e);
744
- if (!(!w || !o.current))
745
- return u.current && u.current.cancel(), w.page.getTextContent().then((C) => {
746
- const g = w.page.getViewport({ scale: 1 });
747
- return u.current = new nn.TextLayer({
748
- viewport: g,
752
+ }, [a, c, p]), z(() => {
753
+ const _ = n.get(e);
754
+ if (!(!_ || !o.current))
755
+ return u.current && u.current.cancel(), _.page.getTextContent().then((C) => {
756
+ const w = _.page.getViewport({ scale: 1 });
757
+ return u.current = new on.TextLayer({
758
+ viewport: w,
749
759
  textContentSource: C,
750
760
  container: o.current
751
761
  }), h.current = C, o.current && (o.current.innerText = ""), u.current.render();
752
762
  }).then(() => {
753
- var _;
763
+ var g;
754
764
  [].slice.call(o.current.children).forEach((m) => {
755
765
  m.classList.add(at["rp-text-layer-text"]);
756
766
  });
757
- const g = (_ = u.current) == null ? void 0 : _.textDivs;
758
- g && h.current && v(h.current, g);
767
+ const w = (g = u.current) == null ? void 0 : g.textDivs;
768
+ w && h.current && v(h.current, w);
759
769
  }).catch(() => {
760
770
  }), () => {
761
771
  var C;
762
772
  (C = u.current) == null || C.cancel();
763
773
  };
764
- }, [n, e]), O(() => {
765
- var g;
766
- [].slice.call(o.current.children).forEach((_) => {
767
- _.classList.add(at["rp-text-layer-text"]);
774
+ }, [n, e]), z(() => {
775
+ var w;
776
+ [].slice.call(o.current.children).forEach((g) => {
777
+ g.classList.add(at["rp-text-layer-text"]);
768
778
  });
769
- const C = (g = u.current) == null ? void 0 : g.textDivs;
779
+ const C = (w = u.current) == null ? void 0 : w.textDivs;
770
780
  C && h.current && v(h.current, C, !0);
771
781
  }, [v]), /* @__PURE__ */ i(
772
782
  "div",
@@ -781,56 +791,56 @@ const no = () => {
781
791
  };
782
792
  let co = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
783
793
  const lo = (t) => {
784
- const { pageNumber: e } = t, n = W(null), { pages: o, pdf: r } = Y(), a = W(), [s, c] = H(), { setFocusedPage: l, goToPage: u } = se(), { scrollMode: h } = Ee(), { print: f } = nt(), { download: p } = zn(), v = k(() => o.get(e), [o, e]), w = k(() => v == null ? void 0 : v.page.getViewport(), [v]);
785
- O(() => {
794
+ const { pageNumber: e } = t, n = M(null), { pages: o, pdf: r } = Y(), a = M(), [s, c] = H(), { setFocusedPage: l, goToPage: u } = se(), { scrollMode: h } = Ee(), { print: f } = tt(), { download: p } = An(), v = k(() => o.get(e), [o, e]), _ = k(() => v == null ? void 0 : v.page.getViewport(), [v]);
795
+ z(() => {
786
796
  a.current && (a.current.div.replaceChildren(), a.current = void 0);
787
- }, [r]), O(() => {
788
- v && v.page.getAnnotations().then((g) => {
789
- a.current = void 0, c(g), n.current && (n.current.innerText = "");
797
+ }, [r]), z(() => {
798
+ v && v.page.getAnnotations().then((w) => {
799
+ a.current = void 0, c(w), n.current && (n.current.innerText = "");
790
800
  });
791
801
  }, [v]);
792
802
  const C = L(
793
- (g) => {
794
- !s || !r || (vr(g), _r(g, r, s).then((_) => {
803
+ (w) => {
804
+ !s || !r || (_r(w), wr(w, r, s).then((g) => {
795
805
  var m, P;
796
- ((m = _ == null ? void 0 : _.data) == null ? void 0 : m.action) === "Print" ? f() : ((P = _ == null ? void 0 : _.data) == null ? void 0 : P.action) === "SaveAs" && p();
797
- }), h === X.PAGE_SCROLLING ? Lt(g, s, r, (_) => l(_.pageIndex + 1)) : Lt(g, s, r, (_) => u(_.pageIndex + 1)));
806
+ ((m = g == null ? void 0 : g.data) == null ? void 0 : m.action) === "Print" ? f() : ((P = g == null ? void 0 : g.data) == null ? void 0 : P.action) === "SaveAs" && p();
807
+ }), h === K.PAGE_SCROLLING ? Nt(w, s, r, (g) => l(g.pageIndex + 1)) : Nt(w, s, r, (g) => u(g.pageIndex + 1)));
798
808
  },
799
809
  [r, s, u, l, h, f, p]
800
810
  );
801
- return O(() => {
811
+ return z(() => {
802
812
  if (!v || !s)
803
813
  return;
804
- const g = v.page.getViewport();
814
+ const w = v.page.getViewport();
805
815
  if (a.current) {
806
816
  a.current.update({
807
- viewport: g.clone({ dontFlip: !0 })
817
+ viewport: w.clone({ dontFlip: !0 })
808
818
  });
809
819
  return;
810
820
  }
811
- const _ = /* @__PURE__ */ new Map([]);
821
+ const g = /* @__PURE__ */ new Map([]);
812
822
  for (const I of s) {
813
823
  const { annotationType: d } = I;
814
824
  switch (d) {
815
- case Rt.Link:
816
- br(I);
825
+ case Lt.Link:
826
+ Cr(I);
817
827
  break;
818
- case Rt.Widget:
819
- wr(I, g, _);
828
+ case Lt.Widget:
829
+ br(I, w, g);
820
830
  break;
821
831
  }
822
832
  }
823
833
  const m = new AbortController();
824
834
  return (async () => {
825
- a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new ar({
835
+ a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new sr({
826
836
  div: n.current,
827
837
  accessibilityManager: void 0,
828
838
  annotationCanvasMap: void 0,
829
839
  annotationEditorUIManager: void 0,
830
840
  structTreeLayer: null,
831
841
  page: v.page,
832
- viewport: g.clone({ dontFlip: !0 })
833
- }), n.current && Nt(n.current, C);
842
+ viewport: w.clone({ dontFlip: !0 })
843
+ }), n.current && Et(n.current, C);
834
844
  const I = await (r == null ? void 0 : r.hasJSActions()), d = await (r == null ? void 0 : r.getFieldObjects());
835
845
  if (m.signal.aborted)
836
846
  throw "abort";
@@ -840,58 +850,58 @@ const lo = (t) => {
840
850
  hasJSActions: I,
841
851
  fieldObjects: d,
842
852
  div: n.current,
843
- viewport: g.clone({ dontFlip: !0 }),
853
+ viewport: w.clone({ dontFlip: !0 }),
844
854
  page: v.page,
845
855
  imageResourcesPath: co,
846
856
  renderForms: !0,
847
- linkService: new gr(),
857
+ linkService: new vr(),
848
858
  downloadManager: null,
849
859
  enableScripting: !1
850
860
  });
851
861
  })().then(() => {
852
- n.current && Cr(n.current, C);
862
+ n.current && Tr(n.current, C);
853
863
  }).catch((I) => {
854
864
  if (I !== "abort")
855
865
  throw I;
856
866
  }), () => {
857
- m.abort("clear"), n.current && Nt(n.current, C);
867
+ m.abort("clear"), n.current && Et(n.current, C);
858
868
  };
859
869
  }, [r, s, C]), /* @__PURE__ */ i(
860
870
  "div",
861
871
  {
862
872
  "data-rp": `page-${e}-annotationLayer`,
863
- style: { width: `${w == null ? void 0 : w.width}px`, height: `${w == null ? void 0 : w.height}px` },
873
+ style: { width: `${_ == null ? void 0 : _.width}px`, height: `${_ == null ? void 0 : _.height}px` },
864
874
  className: so["rp-annotation-layer"],
865
875
  ref: n
866
876
  }
867
877
  );
868
- }, uo = Array.from({ length: 21 }, (t, e) => Number((e * 0.05).toFixed(2))), Pt = Xe((t, e) => {
869
- const { pageNumber: n, style: o, onIntersectRatioChange: r, ...a } = t, { pages: s } = Y(), { rotate: c } = Je(), { textLayer: l } = Jn(), { currentZoom: u } = Ye(), h = W(s.get(n)), [f, p] = H(!1), v = W(null), [w, C] = H({
878
+ }, uo = Array.from({ length: 21 }, (t, e) => Number((e * 0.05).toFixed(2))), St = Ke((t, e) => {
879
+ const { pageNumber: n, style: o, onIntersectRatioChange: r, ...a } = t, { pages: s } = Y(), { rotate: c } = Xe(), { textLayer: l } = Yn(), { currentZoom: u } = Je(), h = M(s.get(n)), [f, p] = H(!1), v = M(null), [_, C] = H({
870
880
  width: 0,
871
881
  height: 0
872
882
  });
873
- Yt(e, () => v.current), O(() => {
883
+ en(e, () => v.current), z(() => {
874
884
  if (s && (h.current = s.get(n), h.current)) {
875
885
  const P = h.current.page.getViewport({ scale: u, rotation: c });
876
886
  C(P);
877
887
  }
878
888
  }, [s, n, c, u]);
879
- const g = k(() => {
889
+ const w = k(() => {
880
890
  switch (c) {
881
891
  case 90:
882
- return `${w.width / 2}px ${w.width / 2}px`;
892
+ return `${_.width / 2}px ${_.width / 2}px`;
883
893
  case -90:
884
894
  case 270:
885
- return `${w.height / 2}px ${w.height / 2}px`;
895
+ return `${_.height / 2}px ${_.height / 2}px`;
886
896
  default:
887
897
  return "center";
888
898
  }
889
- }, [c, w]), _ = L(() => {
899
+ }, [c, _]), g = L(() => {
890
900
  p(!0);
891
901
  }, []), m = L(() => {
892
902
  p(!1);
893
903
  }, []);
894
- return O(() => {
904
+ return z(() => {
895
905
  const P = new IntersectionObserver(
896
906
  (I) => {
897
907
  r(n, I[0].intersectionRatio);
@@ -901,7 +911,7 @@ const lo = (t) => {
901
911
  return v.current && P.observe(v.current), () => {
902
912
  P.disconnect(), r(n, -1);
903
913
  };
904
- }, [r, n, c, w]), /* @__PURE__ */ i(
914
+ }, [r, n, c, _]), /* @__PURE__ */ i(
905
915
  "div",
906
916
  {
907
917
  ref: v,
@@ -911,21 +921,21 @@ const lo = (t) => {
911
921
  style: {
912
922
  ...o,
913
923
  "--rp-rotate": `${c}deg`,
914
- "--rp-page-rotate-translate": `${g}`,
924
+ "--rp-page-rotate-translate": `${w}`,
915
925
  "--scale-factor": u
916
926
  },
917
927
  className: it["rp-page-wrapper"],
918
- children: /* @__PURE__ */ D(
928
+ children: /* @__PURE__ */ A(
919
929
  "div",
920
930
  {
921
931
  style: {
922
- width: `${w.width}px`,
923
- height: `${w.height}px`
932
+ width: `${_.width}px`,
933
+ height: `${_.height}px`
924
934
  },
925
935
  className: it["rp-page"],
926
936
  children: [
927
- /* @__PURE__ */ i(io, { onLoading: _, onLoaded: m, pageNumber: n }),
928
- f && /* @__PURE__ */ i("div", { className: it["rp-loader-wrapper"], children: /* @__PURE__ */ i(Me, {}) }),
937
+ /* @__PURE__ */ i(io, { onLoading: g, onLoaded: m, pageNumber: n }),
938
+ f && /* @__PURE__ */ i("div", { className: it["rp-loader-wrapper"], children: /* @__PURE__ */ i(We, {}) }),
929
939
  l && /* @__PURE__ */ i(ao, { pageNumber: n }),
930
940
  /* @__PURE__ */ i(lo, { pageNumber: n })
931
941
  ]
@@ -944,7 +954,7 @@ function gt() {
944
954
  return t;
945
955
  }, gt.apply(null, arguments);
946
956
  }
947
- function Ft(t) {
957
+ function Wt(t) {
948
958
  if (t === void 0)
949
959
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
950
960
  return t;
@@ -957,11 +967,11 @@ function vt(t, e) {
957
967
  function po(t, e) {
958
968
  t.prototype = Object.create(e.prototype), t.prototype.constructor = t, vt(t, e);
959
969
  }
960
- var kt = Number.isNaN || function(e) {
970
+ var Mt = Number.isNaN || function(e) {
961
971
  return typeof e == "number" && e !== e;
962
972
  };
963
973
  function ho(t, e) {
964
- return !!(t === e || kt(t) && kt(e));
974
+ return !!(t === e || Mt(t) && Mt(e));
965
975
  }
966
976
  function mo(t, e) {
967
977
  if (t.length !== e.length)
@@ -981,7 +991,7 @@ function st(t, e) {
981
991
  }
982
992
  return s;
983
993
  }
984
- function Wt(t, e) {
994
+ function Ht(t, e) {
985
995
  if (t == null)
986
996
  return {};
987
997
  var n = {};
@@ -993,18 +1003,18 @@ function Wt(t, e) {
993
1003
  }
994
1004
  return n;
995
1005
  }
996
- var fo = typeof performance == "object" && typeof performance.now == "function", Mt = fo ? function() {
1006
+ var fo = typeof performance == "object" && typeof performance.now == "function", $t = fo ? function() {
997
1007
  return performance.now();
998
1008
  } : function() {
999
1009
  return Date.now();
1000
1010
  };
1001
- function Ht(t) {
1011
+ function Gt(t) {
1002
1012
  cancelAnimationFrame(t.id);
1003
1013
  }
1004
1014
  function go(t, e) {
1005
- var n = Mt();
1015
+ var n = $t();
1006
1016
  function o() {
1007
- Mt() - n >= e ? t.call(null) : r.id = requestAnimationFrame(o);
1017
+ $t() - n >= e ? t.call(null) : r.id = requestAnimationFrame(o);
1008
1018
  }
1009
1019
  var r = {
1010
1020
  id: requestAnimationFrame(o)
@@ -1020,7 +1030,7 @@ function vo(t) {
1020
1030
  return ct;
1021
1031
  }
1022
1032
  var Re = null;
1023
- function $t(t) {
1033
+ function Vt(t) {
1024
1034
  if (t === void 0 && (t = !1), Re === null || t) {
1025
1035
  var e = document.createElement("div"), n = e.style;
1026
1036
  n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
@@ -1034,82 +1044,82 @@ var _o = 150, wo = function(e) {
1034
1044
  e.data;
1035
1045
  var o = e.rowIndex;
1036
1046
  return o + ":" + n;
1037
- }, Ge = null, Ve = null, Ue = null;
1038
- process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ge = /* @__PURE__ */ new WeakSet(), Ve = /* @__PURE__ */ new WeakSet(), Ue = /* @__PURE__ */ new WeakSet());
1047
+ }, $e = null, Ge = null, Ve = null;
1048
+ process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && ($e = /* @__PURE__ */ new WeakSet(), Ge = /* @__PURE__ */ new WeakSet(), Ve = /* @__PURE__ */ new WeakSet());
1039
1049
  function bo(t) {
1040
- var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, s = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, l = t.getOffsetForColumnAndAlignment, u = t.getOffsetForRowAndAlignment, h = t.getRowHeight, f = t.getRowOffset, p = t.getRowStartIndexForOffset, v = t.getRowStopIndexForStartIndex, w = t.initInstanceProps, C = t.shouldResetStyleCacheOnItemSizeChange, g = t.validateProps;
1041
- return e = /* @__PURE__ */ function(_) {
1042
- po(m, _);
1050
+ var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, s = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, l = t.getOffsetForColumnAndAlignment, u = t.getOffsetForRowAndAlignment, h = t.getRowHeight, f = t.getRowOffset, p = t.getRowStartIndexForOffset, v = t.getRowStopIndexForStartIndex, _ = t.initInstanceProps, C = t.shouldResetStyleCacheOnItemSizeChange, w = t.validateProps;
1051
+ return e = /* @__PURE__ */ function(g) {
1052
+ po(m, g);
1043
1053
  function m(I) {
1044
1054
  var d;
1045
- return d = _.call(this, I) || this, d._instanceProps = w(d.props, Ft(d)), d._resetIsScrollingTimeoutId = null, d._outerRef = void 0, d.state = {
1046
- instance: Ft(d),
1055
+ return d = g.call(this, I) || this, d._instanceProps = _(d.props, Wt(d)), d._resetIsScrollingTimeoutId = null, d._outerRef = void 0, d.state = {
1056
+ instance: Wt(d),
1047
1057
  isScrolling: !1,
1048
1058
  horizontalScrollDirection: "forward",
1049
1059
  scrollLeft: typeof d.props.initialScrollLeft == "number" ? d.props.initialScrollLeft : 0,
1050
1060
  scrollTop: typeof d.props.initialScrollTop == "number" ? d.props.initialScrollTop : 0,
1051
1061
  scrollUpdateWasRequested: !1,
1052
1062
  verticalScrollDirection: "forward"
1053
- }, d._callOnItemsRendered = void 0, d._callOnItemsRendered = st(function(T, b, S, A, y, E, x, F) {
1063
+ }, d._callOnItemsRendered = void 0, d._callOnItemsRendered = st(function(T, b, S, F, x, N, R, O) {
1054
1064
  return d.props.onItemsRendered({
1055
1065
  overscanColumnStartIndex: T,
1056
1066
  overscanColumnStopIndex: b,
1057
1067
  overscanRowStartIndex: S,
1058
- overscanRowStopIndex: A,
1059
- visibleColumnStartIndex: y,
1060
- visibleColumnStopIndex: E,
1061
- visibleRowStartIndex: x,
1062
- visibleRowStopIndex: F
1068
+ overscanRowStopIndex: F,
1069
+ visibleColumnStartIndex: x,
1070
+ visibleColumnStopIndex: N,
1071
+ visibleRowStartIndex: R,
1072
+ visibleRowStopIndex: O
1063
1073
  });
1064
- }), d._callOnScroll = void 0, d._callOnScroll = st(function(T, b, S, A, y) {
1074
+ }), d._callOnScroll = void 0, d._callOnScroll = st(function(T, b, S, F, x) {
1065
1075
  return d.props.onScroll({
1066
1076
  horizontalScrollDirection: S,
1067
1077
  scrollLeft: T,
1068
1078
  scrollTop: b,
1069
- verticalScrollDirection: A,
1070
- scrollUpdateWasRequested: y
1079
+ verticalScrollDirection: F,
1080
+ scrollUpdateWasRequested: x
1071
1081
  });
1072
1082
  }), d._getItemStyle = void 0, d._getItemStyle = function(T, b) {
1073
- var S = d.props, A = S.columnWidth, y = S.direction, E = S.rowHeight, x = d._getItemStyleCache(C && A, C && y, C && E), F = T + ":" + b, z;
1074
- if (x.hasOwnProperty(F))
1075
- z = x[F];
1083
+ var S = d.props, F = S.columnWidth, x = S.direction, N = S.rowHeight, R = d._getItemStyleCache(C && F, C && x, C && N), O = T + ":" + b, D;
1084
+ if (R.hasOwnProperty(O))
1085
+ D = R[O];
1076
1086
  else {
1077
- var R = n(d.props, b, d._instanceProps), N = y === "rtl";
1078
- x[F] = z = {
1087
+ var y = n(d.props, b, d._instanceProps), E = x === "rtl";
1088
+ R[O] = D = {
1079
1089
  position: "absolute",
1080
- left: N ? void 0 : R,
1081
- right: N ? R : void 0,
1090
+ left: E ? void 0 : y,
1091
+ right: E ? y : void 0,
1082
1092
  top: f(d.props, T, d._instanceProps),
1083
1093
  height: h(d.props, T, d._instanceProps),
1084
1094
  width: a(d.props, b, d._instanceProps)
1085
1095
  };
1086
1096
  }
1087
- return z;
1097
+ return D;
1088
1098
  }, d._getItemStyleCache = void 0, d._getItemStyleCache = st(function(T, b, S) {
1089
1099
  return {};
1090
1100
  }), d._onScroll = function(T) {
1091
- var b = T.currentTarget, S = b.clientHeight, A = b.clientWidth, y = b.scrollLeft, E = b.scrollTop, x = b.scrollHeight, F = b.scrollWidth;
1092
- d.setState(function(z) {
1093
- if (z.scrollLeft === y && z.scrollTop === E)
1101
+ var b = T.currentTarget, S = b.clientHeight, F = b.clientWidth, x = b.scrollLeft, N = b.scrollTop, R = b.scrollHeight, O = b.scrollWidth;
1102
+ d.setState(function(D) {
1103
+ if (D.scrollLeft === x && D.scrollTop === N)
1094
1104
  return null;
1095
- var R = d.props.direction, N = y;
1096
- if (R === "rtl")
1097
- switch ($t()) {
1105
+ var y = d.props.direction, E = x;
1106
+ if (y === "rtl")
1107
+ switch (Vt()) {
1098
1108
  case "negative":
1099
- N = -y;
1109
+ E = -x;
1100
1110
  break;
1101
1111
  case "positive-descending":
1102
- N = F - A - y;
1112
+ E = O - F - x;
1103
1113
  break;
1104
1114
  }
1105
- N = Math.max(0, Math.min(N, F - A));
1106
- var $ = Math.max(0, Math.min(E, x - S));
1115
+ E = Math.max(0, Math.min(E, O - F));
1116
+ var W = Math.max(0, Math.min(N, R - S));
1107
1117
  return {
1108
1118
  isScrolling: !0,
1109
- horizontalScrollDirection: z.scrollLeft < y ? "forward" : "backward",
1110
- scrollLeft: N,
1111
- scrollTop: $,
1112
- verticalScrollDirection: z.scrollTop < E ? "forward" : "backward",
1119
+ horizontalScrollDirection: D.scrollLeft < x ? "forward" : "backward",
1120
+ scrollLeft: E,
1121
+ scrollTop: W,
1122
+ verticalScrollDirection: D.scrollTop < N ? "forward" : "backward",
1113
1123
  scrollUpdateWasRequested: !1
1114
1124
  };
1115
1125
  }, d._resetIsScrollingDebounced);
@@ -1117,7 +1127,7 @@ function bo(t) {
1117
1127
  var b = d.props.outerRef;
1118
1128
  d._outerRef = T, typeof b == "function" ? b(T) : b != null && typeof b == "object" && b.hasOwnProperty("current") && (b.current = T);
1119
1129
  }, d._resetIsScrollingDebounced = function() {
1120
- d._resetIsScrollingTimeoutId !== null && Ht(d._resetIsScrollingTimeoutId), d._resetIsScrollingTimeoutId = go(d._resetIsScrolling, _o);
1130
+ d._resetIsScrollingTimeoutId !== null && Gt(d._resetIsScrollingTimeoutId), d._resetIsScrollingTimeoutId = go(d._resetIsScrolling, _o);
1121
1131
  }, d._resetIsScrolling = function() {
1122
1132
  d._resetIsScrollingTimeoutId = null, d.setState({
1123
1133
  isScrolling: !1
@@ -1127,7 +1137,7 @@ function bo(t) {
1127
1137
  }, d;
1128
1138
  }
1129
1139
  m.getDerivedStateFromProps = function(d, T) {
1130
- return Co(d, T), g(d), null;
1140
+ return Co(d, T), w(d), null;
1131
1141
  };
1132
1142
  var P = m.prototype;
1133
1143
  return P.scrollTo = function(d) {
@@ -1142,12 +1152,12 @@ function bo(t) {
1142
1152
  };
1143
1153
  }, this._resetIsScrollingDebounced);
1144
1154
  }, P.scrollToItem = function(d) {
1145
- var T = d.align, b = T === void 0 ? "auto" : T, S = d.columnIndex, A = d.rowIndex, y = this.props, E = y.columnCount, x = y.height, F = y.rowCount, z = y.width, R = this.state, N = R.scrollLeft, $ = R.scrollTop, U = vo();
1146
- S !== void 0 && (S = Math.max(0, Math.min(S, E - 1))), A !== void 0 && (A = Math.max(0, Math.min(A, F - 1)));
1147
- var j = s(this.props, this._instanceProps), B = c(this.props, this._instanceProps), q = B > z ? U : 0, K = j > x ? U : 0;
1155
+ var T = d.align, b = T === void 0 ? "auto" : T, S = d.columnIndex, F = d.rowIndex, x = this.props, N = x.columnCount, R = x.height, O = x.rowCount, D = x.width, y = this.state, E = y.scrollLeft, W = y.scrollTop, U = vo();
1156
+ S !== void 0 && (S = Math.max(0, Math.min(S, N - 1))), F !== void 0 && (F = Math.max(0, Math.min(F, O - 1)));
1157
+ var j = s(this.props, this._instanceProps), X = c(this.props, this._instanceProps), Z = X > D ? U : 0, B = j > R ? U : 0;
1148
1158
  this.scrollTo({
1149
- scrollLeft: S !== void 0 ? l(this.props, S, b, N, this._instanceProps, K) : N,
1150
- scrollTop: A !== void 0 ? u(this.props, A, b, $, this._instanceProps, q) : $
1159
+ scrollLeft: S !== void 0 ? l(this.props, S, b, E, this._instanceProps, B) : E,
1160
+ scrollTop: F !== void 0 ? u(this.props, F, b, W, this._instanceProps, Z) : W
1151
1161
  });
1152
1162
  }, P.componentDidMount = function() {
1153
1163
  var d = this.props, T = d.initialScrollLeft, b = d.initialScrollTop;
@@ -1157,93 +1167,93 @@ function bo(t) {
1157
1167
  }
1158
1168
  this._callPropsCallbacks();
1159
1169
  }, P.componentDidUpdate = function() {
1160
- var d = this.props.direction, T = this.state, b = T.scrollLeft, S = T.scrollTop, A = T.scrollUpdateWasRequested;
1161
- if (A && this._outerRef != null) {
1162
- var y = this._outerRef;
1170
+ var d = this.props.direction, T = this.state, b = T.scrollLeft, S = T.scrollTop, F = T.scrollUpdateWasRequested;
1171
+ if (F && this._outerRef != null) {
1172
+ var x = this._outerRef;
1163
1173
  if (d === "rtl")
1164
- switch ($t()) {
1174
+ switch (Vt()) {
1165
1175
  case "negative":
1166
- y.scrollLeft = -b;
1176
+ x.scrollLeft = -b;
1167
1177
  break;
1168
1178
  case "positive-ascending":
1169
- y.scrollLeft = b;
1179
+ x.scrollLeft = b;
1170
1180
  break;
1171
1181
  default:
1172
- var E = y.clientWidth, x = y.scrollWidth;
1173
- y.scrollLeft = x - E - b;
1182
+ var N = x.clientWidth, R = x.scrollWidth;
1183
+ x.scrollLeft = R - N - b;
1174
1184
  break;
1175
1185
  }
1176
1186
  else
1177
- y.scrollLeft = Math.max(0, b);
1178
- y.scrollTop = Math.max(0, S);
1187
+ x.scrollLeft = Math.max(0, b);
1188
+ x.scrollTop = Math.max(0, S);
1179
1189
  }
1180
1190
  this._callPropsCallbacks();
1181
1191
  }, P.componentWillUnmount = function() {
1182
- this._resetIsScrollingTimeoutId !== null && Ht(this._resetIsScrollingTimeoutId);
1192
+ this._resetIsScrollingTimeoutId !== null && Gt(this._resetIsScrollingTimeoutId);
1183
1193
  }, P.render = function() {
1184
- var d = this.props, T = d.children, b = d.className, S = d.columnCount, A = d.direction, y = d.height, E = d.innerRef, x = d.innerElementType, F = d.innerTagName, z = d.itemData, R = d.itemKey, N = R === void 0 ? wo : R, $ = d.outerElementType, U = d.outerTagName, j = d.rowCount, B = d.style, q = d.useIsScrolling, K = d.width, ie = this.state.isScrolling, de = this._getHorizontalRangeToRender(), Q = de[0], ae = de[1], ee = this._getVerticalRangeToRender(), be = ee[0], Oe = ee[1], ve = [];
1194
+ var d = this.props, T = d.children, b = d.className, S = d.columnCount, F = d.direction, x = d.height, N = d.innerRef, R = d.innerElementType, O = d.innerTagName, D = d.itemData, y = d.itemKey, E = y === void 0 ? wo : y, W = d.outerElementType, U = d.outerTagName, j = d.rowCount, X = d.style, Z = d.useIsScrolling, B = d.width, le = this.state.isScrolling, ie = this._getHorizontalRangeToRender(), Q = ie[0], te = ie[1], he = this._getVerticalRangeToRender(), ue = he[0], Ie = he[1], ye = [];
1185
1195
  if (S > 0 && j)
1186
- for (var pe = be; pe <= Oe; pe++)
1187
- for (var he = Q; he <= ae; he++)
1188
- ve.push($e(T, {
1189
- columnIndex: he,
1190
- data: z,
1191
- isScrolling: q ? ie : void 0,
1192
- key: N({
1193
- columnIndex: he,
1194
- data: z,
1195
- rowIndex: pe
1196
+ for (var ae = ue; ae <= Ie; ae++)
1197
+ for (var me = Q; me <= te; me++)
1198
+ ye.push(He(T, {
1199
+ columnIndex: me,
1200
+ data: D,
1201
+ isScrolling: Z ? le : void 0,
1202
+ key: E({
1203
+ columnIndex: me,
1204
+ data: D,
1205
+ rowIndex: ae
1196
1206
  }),
1197
- rowIndex: pe,
1198
- style: this._getItemStyle(pe, he)
1207
+ rowIndex: ae,
1208
+ style: this._getItemStyle(ae, me)
1199
1209
  }));
1200
- var De = s(this.props, this._instanceProps), M = c(this.props, this._instanceProps);
1201
- return $e($ || U || "div", {
1210
+ var Oe = s(this.props, this._instanceProps), nt = c(this.props, this._instanceProps);
1211
+ return He(W || U || "div", {
1202
1212
  className: b,
1203
1213
  onScroll: this._onScroll,
1204
1214
  ref: this._outerRefSetter,
1205
1215
  style: gt({
1206
1216
  position: "relative",
1207
- height: y,
1208
- width: K,
1217
+ height: x,
1218
+ width: B,
1209
1219
  overflow: "auto",
1210
1220
  WebkitOverflowScrolling: "touch",
1211
1221
  willChange: "transform",
1212
- direction: A
1213
- }, B)
1214
- }, $e(x || F || "div", {
1215
- children: ve,
1216
- ref: E,
1222
+ direction: F
1223
+ }, X)
1224
+ }, He(R || O || "div", {
1225
+ children: ye,
1226
+ ref: N,
1217
1227
  style: {
1218
- height: De,
1219
- pointerEvents: ie ? "none" : void 0,
1220
- width: M
1228
+ height: Oe,
1229
+ pointerEvents: le ? "none" : void 0,
1230
+ width: nt
1221
1231
  }
1222
1232
  }));
1223
1233
  }, P._callPropsCallbacks = function() {
1224
- var d = this.props, T = d.columnCount, b = d.onItemsRendered, S = d.onScroll, A = d.rowCount;
1225
- if (typeof b == "function" && T > 0 && A > 0) {
1226
- var y = this._getHorizontalRangeToRender(), E = y[0], x = y[1], F = y[2], z = y[3], R = this._getVerticalRangeToRender(), N = R[0], $ = R[1], U = R[2], j = R[3];
1227
- this._callOnItemsRendered(E, x, N, $, F, z, U, j);
1234
+ var d = this.props, T = d.columnCount, b = d.onItemsRendered, S = d.onScroll, F = d.rowCount;
1235
+ if (typeof b == "function" && T > 0 && F > 0) {
1236
+ var x = this._getHorizontalRangeToRender(), N = x[0], R = x[1], O = x[2], D = x[3], y = this._getVerticalRangeToRender(), E = y[0], W = y[1], U = y[2], j = y[3];
1237
+ this._callOnItemsRendered(N, R, E, W, O, D, U, j);
1228
1238
  }
1229
1239
  if (typeof S == "function") {
1230
- var B = this.state, q = B.horizontalScrollDirection, K = B.scrollLeft, ie = B.scrollTop, de = B.scrollUpdateWasRequested, Q = B.verticalScrollDirection;
1231
- this._callOnScroll(K, ie, q, Q, de);
1240
+ var X = this.state, Z = X.horizontalScrollDirection, B = X.scrollLeft, le = X.scrollTop, ie = X.scrollUpdateWasRequested, Q = X.verticalScrollDirection;
1241
+ this._callOnScroll(B, le, Z, Q, ie);
1232
1242
  }
1233
1243
  }, P._getHorizontalRangeToRender = function() {
1234
- var d = this.props, T = d.columnCount, b = d.overscanColumnCount, S = d.overscanColumnsCount, A = d.overscanCount, y = d.rowCount, E = this.state, x = E.horizontalScrollDirection, F = E.isScrolling, z = E.scrollLeft, R = b || S || A || 1;
1235
- if (T === 0 || y === 0)
1244
+ var d = this.props, T = d.columnCount, b = d.overscanColumnCount, S = d.overscanColumnsCount, F = d.overscanCount, x = d.rowCount, N = this.state, R = N.horizontalScrollDirection, O = N.isScrolling, D = N.scrollLeft, y = b || S || F || 1;
1245
+ if (T === 0 || x === 0)
1236
1246
  return [0, 0, 0, 0];
1237
- var N = o(this.props, z, this._instanceProps), $ = r(this.props, N, z, this._instanceProps), U = !F || x === "backward" ? Math.max(1, R) : 1, j = !F || x === "forward" ? Math.max(1, R) : 1;
1238
- return [Math.max(0, N - U), Math.max(0, Math.min(T - 1, $ + j)), N, $];
1247
+ var E = o(this.props, D, this._instanceProps), W = r(this.props, E, D, this._instanceProps), U = !O || R === "backward" ? Math.max(1, y) : 1, j = !O || R === "forward" ? Math.max(1, y) : 1;
1248
+ return [Math.max(0, E - U), Math.max(0, Math.min(T - 1, W + j)), E, W];
1239
1249
  }, P._getVerticalRangeToRender = function() {
1240
- var d = this.props, T = d.columnCount, b = d.overscanCount, S = d.overscanRowCount, A = d.overscanRowsCount, y = d.rowCount, E = this.state, x = E.isScrolling, F = E.verticalScrollDirection, z = E.scrollTop, R = S || A || b || 1;
1241
- if (T === 0 || y === 0)
1250
+ var d = this.props, T = d.columnCount, b = d.overscanCount, S = d.overscanRowCount, F = d.overscanRowsCount, x = d.rowCount, N = this.state, R = N.isScrolling, O = N.verticalScrollDirection, D = N.scrollTop, y = S || F || b || 1;
1251
+ if (T === 0 || x === 0)
1242
1252
  return [0, 0, 0, 0];
1243
- var N = p(this.props, z, this._instanceProps), $ = v(this.props, N, z, this._instanceProps), U = !x || F === "backward" ? Math.max(1, R) : 1, j = !x || F === "forward" ? Math.max(1, R) : 1;
1244
- return [Math.max(0, N - U), Math.max(0, Math.min(y - 1, $ + j)), N, $];
1253
+ var E = p(this.props, D, this._instanceProps), W = v(this.props, E, D, this._instanceProps), U = !R || O === "backward" ? Math.max(1, y) : 1, j = !R || O === "forward" ? Math.max(1, y) : 1;
1254
+ return [Math.max(0, E - U), Math.max(0, Math.min(x - 1, W + j)), E, W];
1245
1255
  }, m;
1246
- }(jn), e.defaultProps = {
1256
+ }(Bn), e.defaultProps = {
1247
1257
  direction: "ltr",
1248
1258
  itemData: void 0,
1249
1259
  useIsScrolling: !1
@@ -1252,7 +1262,7 @@ function bo(t) {
1252
1262
  var Co = function(e, n) {
1253
1263
  var o = e.children, r = e.direction, a = e.height, s = e.innerTagName, c = e.outerTagName, l = e.overscanColumnsCount, u = e.overscanCount, h = e.overscanRowsCount, f = e.width, p = n.instance;
1254
1264
  if (process.env.NODE_ENV !== "production") {
1255
- if (typeof u == "number" && Ge && !Ge.has(p) && (Ge.add(p), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof l == "number" || typeof h == "number") && Ve && !Ve.has(p) && (Ve.add(p), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (s != null || c != null) && Ue && !Ue.has(p) && (Ue.add(p), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1265
+ if (typeof u == "number" && $e && !$e.has(p) && ($e.add(p), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof l == "number" || typeof h == "number") && Ge && !Ge.has(p) && (Ge.add(p), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (s != null || c != null) && Ve && !Ve.has(p) && (Ve.add(p), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
1256
1266
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
1257
1267
  switch (r) {
1258
1268
  case "ltr":
@@ -1266,7 +1276,7 @@ var Co = function(e, n) {
1266
1276
  if (typeof a != "number")
1267
1277
  throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
1268
1278
  }
1269
- }, Gt = 50, vn = function(e, n) {
1279
+ }, Ut = 50, _n = function(e, n) {
1270
1280
  var o = e.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, s = n.lastMeasuredRowIndex, c = 0;
1271
1281
  if (s >= o && (s = o - 1), s >= 0) {
1272
1282
  var l = r[s];
@@ -1274,7 +1284,7 @@ var Co = function(e, n) {
1274
1284
  }
1275
1285
  var u = o - s - 1, h = u * a;
1276
1286
  return c + h;
1277
- }, _n = function(e, n) {
1287
+ }, wn = function(e, n) {
1278
1288
  var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, s = n.lastMeasuredColumnIndex, c = 0;
1279
1289
  if (s >= o && (s = o - 1), s >= 0) {
1280
1290
  var l = r[s];
@@ -1282,7 +1292,7 @@ var Co = function(e, n) {
1282
1292
  }
1283
1293
  var u = o - s - 1, h = u * a;
1284
1294
  return c + h;
1285
- }, fe = function(e, n, o, r) {
1295
+ }, ge = function(e, n, o, r) {
1286
1296
  var a, s, c;
1287
1297
  if (e === "column" ? (a = r.columnMetadataMap, s = n.columnWidth, c = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, s = n.rowHeight, c = r.lastMeasuredRowIndex), o > c) {
1288
1298
  var l = 0;
@@ -1300,25 +1310,25 @@ var Co = function(e, n) {
1300
1310
  e === "column" ? r.lastMeasuredColumnIndex = o : r.lastMeasuredRowIndex = o;
1301
1311
  }
1302
1312
  return a[o];
1303
- }, Vt = function(e, n, o, r) {
1313
+ }, qt = function(e, n, o, r) {
1304
1314
  var a, s;
1305
1315
  e === "column" ? (a = o.columnMetadataMap, s = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, s = o.lastMeasuredRowIndex);
1306
1316
  var c = s > 0 ? a[s].offset : 0;
1307
- return c >= r ? wn(e, n, o, s, 0, r) : To(e, n, o, Math.max(0, s), r);
1308
- }, wn = function(e, n, o, r, a, s) {
1317
+ return c >= r ? bn(e, n, o, s, 0, r) : To(e, n, o, Math.max(0, s), r);
1318
+ }, bn = function(e, n, o, r, a, s) {
1309
1319
  for (; a <= r; ) {
1310
- var c = a + Math.floor((r - a) / 2), l = fe(e, n, c, o).offset;
1320
+ var c = a + Math.floor((r - a) / 2), l = ge(e, n, c, o).offset;
1311
1321
  if (l === s)
1312
1322
  return c;
1313
1323
  l < s ? a = c + 1 : l > s && (r = c - 1);
1314
1324
  }
1315
1325
  return a > 0 ? a - 1 : 0;
1316
1326
  }, To = function(e, n, o, r, a) {
1317
- for (var s = e === "column" ? n.columnCount : n.rowCount, c = 1; r < s && fe(e, n, r, o).offset < a; )
1327
+ for (var s = e === "column" ? n.columnCount : n.rowCount, c = 1; r < s && ge(e, n, r, o).offset < a; )
1318
1328
  r += c, c *= 2;
1319
- return wn(e, n, o, Math.min(r, s - 1), Math.floor(r / 2), a);
1320
- }, Ut = function(e, n, o, r, a, s, c) {
1321
- var l = e === "column" ? n.width : n.height, u = fe(e, n, o, s), h = e === "column" ? _n(n, s) : vn(n, s), f = Math.max(0, Math.min(h - l, u.offset)), p = Math.max(0, u.offset - l + c + u.size);
1329
+ return bn(e, n, o, Math.min(r, s - 1), Math.floor(r / 2), a);
1330
+ }, Zt = function(e, n, o, r, a, s, c) {
1331
+ var l = e === "column" ? n.width : n.height, u = ge(e, n, o, s), h = e === "column" ? wn(n, s) : _n(n, s), f = Math.max(0, Math.min(h - l, u.offset)), p = Math.max(0, u.offset - l + c + u.size);
1322
1332
  switch (r === "smart" && (a >= p - l && a <= f + l ? r = "auto" : r = "center"), r) {
1323
1333
  case "start":
1324
1334
  return f;
@@ -1332,46 +1342,46 @@ var Co = function(e, n) {
1332
1342
  }
1333
1343
  }, Po = /* @__PURE__ */ bo({
1334
1344
  getColumnOffset: function(e, n, o) {
1335
- return fe("column", e, n, o).offset;
1345
+ return ge("column", e, n, o).offset;
1336
1346
  },
1337
1347
  getColumnStartIndexForOffset: function(e, n, o) {
1338
- return Vt("column", e, o, n);
1348
+ return qt("column", e, o, n);
1339
1349
  },
1340
1350
  getColumnStopIndexForStartIndex: function(e, n, o, r) {
1341
- for (var a = e.columnCount, s = e.width, c = fe("column", e, n, r), l = o + s, u = c.offset + c.size, h = n; h < a - 1 && u < l; )
1342
- h++, u += fe("column", e, h, r).size;
1351
+ for (var a = e.columnCount, s = e.width, c = ge("column", e, n, r), l = o + s, u = c.offset + c.size, h = n; h < a - 1 && u < l; )
1352
+ h++, u += ge("column", e, h, r).size;
1343
1353
  return h;
1344
1354
  },
1345
1355
  getColumnWidth: function(e, n, o) {
1346
1356
  return o.columnMetadataMap[n].size;
1347
1357
  },
1348
- getEstimatedTotalHeight: vn,
1349
- getEstimatedTotalWidth: _n,
1358
+ getEstimatedTotalHeight: _n,
1359
+ getEstimatedTotalWidth: wn,
1350
1360
  getOffsetForColumnAndAlignment: function(e, n, o, r, a, s) {
1351
- return Ut("column", e, n, o, r, a, s);
1361
+ return Zt("column", e, n, o, r, a, s);
1352
1362
  },
1353
1363
  getOffsetForRowAndAlignment: function(e, n, o, r, a, s) {
1354
- return Ut("row", e, n, o, r, a, s);
1364
+ return Zt("row", e, n, o, r, a, s);
1355
1365
  },
1356
1366
  getRowOffset: function(e, n, o) {
1357
- return fe("row", e, n, o).offset;
1367
+ return ge("row", e, n, o).offset;
1358
1368
  },
1359
1369
  getRowHeight: function(e, n, o) {
1360
1370
  return o.rowMetadataMap[n].size;
1361
1371
  },
1362
1372
  getRowStartIndexForOffset: function(e, n, o) {
1363
- return Vt("row", e, o, n);
1373
+ return qt("row", e, o, n);
1364
1374
  },
1365
1375
  getRowStopIndexForStartIndex: function(e, n, o, r) {
1366
- for (var a = e.rowCount, s = e.height, c = fe("row", e, n, r), l = o + s, u = c.offset + c.size, h = n; h < a - 1 && u < l; )
1367
- h++, u += fe("row", e, h, r).size;
1376
+ for (var a = e.rowCount, s = e.height, c = ge("row", e, n, r), l = o + s, u = c.offset + c.size, h = n; h < a - 1 && u < l; )
1377
+ h++, u += ge("row", e, h, r).size;
1368
1378
  return h;
1369
1379
  },
1370
1380
  initInstanceProps: function(e, n) {
1371
1381
  var o = e, r = o.estimatedColumnWidth, a = o.estimatedRowHeight, s = {
1372
1382
  columnMetadataMap: {},
1373
- estimatedColumnWidth: r || Gt,
1374
- estimatedRowHeight: a || Gt,
1383
+ estimatedColumnWidth: r || Ut,
1384
+ estimatedRowHeight: a || Ut,
1375
1385
  lastMeasuredColumnIndex: -1,
1376
1386
  lastMeasuredRowIndex: -1,
1377
1387
  rowMetadataMap: {}
@@ -1403,7 +1413,7 @@ var Co = function(e, n) {
1403
1413
  }
1404
1414
  });
1405
1415
  process.env.NODE_ENV;
1406
- function qt(t, e) {
1416
+ function jt(t, e) {
1407
1417
  for (var n in t)
1408
1418
  if (!(n in e))
1409
1419
  return !0;
@@ -1414,21 +1424,21 @@ function qt(t, e) {
1414
1424
  }
1415
1425
  var So = ["style"], Io = ["style"];
1416
1426
  function yo(t, e) {
1417
- var n = t.style, o = Wt(t, So), r = e.style, a = Wt(e, Io);
1418
- return !qt(n, r) && !qt(o, a);
1427
+ var n = t.style, o = Ht(t, So), r = e.style, a = Ht(e, Io);
1428
+ return !jt(n, r) && !jt(o, a);
1419
1429
  }
1420
1430
  const xo = () => {
1421
- const { viewMode: t } = Qe(), { scrollMode: e } = Ee(), { setColumnCount: n } = en(), { virtualScrollableElementRef: o } = et(), r = rn(), a = L(
1431
+ const { viewMode: t } = Ye(), { scrollMode: e } = Ee(), { setColumnCount: n } = nn(), { virtualScrollableElementRef: o } = Qe(), r = bt(), a = L(
1422
1432
  (v) => r.widths[v] || 0,
1423
1433
  [r.widths]
1424
1434
  ), s = L(
1425
1435
  (v) => r.heights[v] || 0,
1426
1436
  [r.heights]
1427
- ), c = k(() => r.heights.length, [r.heights]), l = k(() => Math.max(...r.widths), [r.widths]), u = k(() => e === X.HORIZONTAL_SCROLLING ? c : t === qe.DUAL_PAGE ? 2 : 1, [t, e, e, c, o, l]);
1428
- O(() => {
1437
+ ), c = k(() => r.heights.length, [r.heights]), l = k(() => Math.max(...r.widths), [r.widths]), u = k(() => e === K.HORIZONTAL_SCROLLING ? c : t === Ue.DUAL_PAGE ? 2 : 1, [t, e, e, c, o, l]);
1438
+ z(() => {
1429
1439
  n(u);
1430
1440
  }, [u, n]);
1431
- const h = k(() => e === X.HORIZONTAL_SCROLLING || e === X.PAGE_SCROLLING ? 1 : Math.round(c / u), [u, c, e]), f = k(() => r.heights.reduce((v, w) => v + w, 0) / r.heights.length || 0, [r]), p = k(() => r.widths.reduce((v, w) => v + w, 0) / r.heights.length || 0, [r]);
1441
+ const h = k(() => e === K.HORIZONTAL_SCROLLING || e === K.PAGE_SCROLLING ? 1 : Math.round(c / u), [u, c, e]), f = k(() => r.heights.reduce((v, _) => v + _, 0) / r.heights.length || 0, [r]), p = k(() => r.widths.reduce((v, _) => v + _, 0) / r.heights.length || 0, [r]);
1432
1442
  return {
1433
1443
  rowCount: h,
1434
1444
  rowHeight: s,
@@ -1442,48 +1452,48 @@ const xo = () => {
1442
1452
  let oe;
1443
1453
  typeof window < "u" ? oe = window : typeof self < "u" ? oe = self : oe = global;
1444
1454
  let _t = null, wt = null;
1445
- const Zt = 20, lt = oe.clearTimeout, jt = oe.setTimeout, ut = oe.cancelAnimationFrame || oe.mozCancelAnimationFrame || oe.webkitCancelAnimationFrame, Bt = oe.requestAnimationFrame || oe.mozRequestAnimationFrame || oe.webkitRequestAnimationFrame;
1446
- ut == null || Bt == null ? (_t = lt, wt = function(e) {
1447
- return jt(e, Zt);
1455
+ const Bt = 20, lt = oe.clearTimeout, Kt = oe.setTimeout, ut = oe.cancelAnimationFrame || oe.mozCancelAnimationFrame || oe.webkitCancelAnimationFrame, Xt = oe.requestAnimationFrame || oe.mozRequestAnimationFrame || oe.webkitRequestAnimationFrame;
1456
+ ut == null || Xt == null ? (_t = lt, wt = function(e) {
1457
+ return Kt(e, Bt);
1448
1458
  }) : (_t = function([e, n]) {
1449
1459
  ut(e), lt(n);
1450
1460
  }, wt = function(e) {
1451
- const n = Bt(function() {
1461
+ const n = Xt(function() {
1452
1462
  lt(o), e();
1453
- }), o = jt(function() {
1463
+ }), o = Kt(function() {
1454
1464
  ut(n), e();
1455
- }, Zt);
1465
+ }, Bt);
1456
1466
  return [n, o];
1457
1467
  });
1458
1468
  function Ro(t) {
1459
1469
  let e, n, o, r, a, s, c;
1460
1470
  const l = typeof document < "u" && document.attachEvent;
1461
1471
  if (!l) {
1462
- s = function(_) {
1463
- const m = _.__resizeTriggers__, P = m.firstElementChild, I = m.lastElementChild, d = P.firstElementChild;
1472
+ s = function(g) {
1473
+ const m = g.__resizeTriggers__, P = m.firstElementChild, I = m.lastElementChild, d = P.firstElementChild;
1464
1474
  I.scrollLeft = I.scrollWidth, I.scrollTop = I.scrollHeight, d.style.width = P.offsetWidth + 1 + "px", d.style.height = P.offsetHeight + 1 + "px", P.scrollLeft = P.scrollWidth, P.scrollTop = P.scrollHeight;
1465
- }, a = function(_) {
1466
- return _.offsetWidth !== _.__resizeLast__.width || _.offsetHeight !== _.__resizeLast__.height;
1467
- }, c = function(_) {
1468
- if (_.target.className && typeof _.target.className.indexOf == "function" && _.target.className.indexOf("contract-trigger") < 0 && _.target.className.indexOf("expand-trigger") < 0)
1475
+ }, a = function(g) {
1476
+ return g.offsetWidth !== g.__resizeLast__.width || g.offsetHeight !== g.__resizeLast__.height;
1477
+ }, c = function(g) {
1478
+ if (g.target.className && typeof g.target.className.indexOf == "function" && g.target.className.indexOf("contract-trigger") < 0 && g.target.className.indexOf("expand-trigger") < 0)
1469
1479
  return;
1470
1480
  const m = this;
1471
1481
  s(this), this.__resizeRAF__ && _t(this.__resizeRAF__), this.__resizeRAF__ = wt(function() {
1472
1482
  a(m) && (m.__resizeLast__.width = m.offsetWidth, m.__resizeLast__.height = m.offsetHeight, m.__resizeListeners__.forEach(function(d) {
1473
- d.call(m, _);
1483
+ d.call(m, g);
1474
1484
  }));
1475
1485
  });
1476
1486
  };
1477
1487
  let p = !1, v = "";
1478
1488
  o = "animationstart";
1479
- const w = "Webkit Moz O ms".split(" ");
1480
- let C = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), g = "";
1489
+ const _ = "Webkit Moz O ms".split(" ");
1490
+ let C = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), w = "";
1481
1491
  {
1482
- const _ = document.createElement("fakeelement");
1483
- if (_.style.animationName !== void 0 && (p = !0), p === !1) {
1484
- for (let m = 0; m < w.length; m++)
1485
- if (_.style[w[m] + "AnimationName"] !== void 0) {
1486
- g = w[m], v = "-" + g.toLowerCase() + "-", o = C[m], p = !0;
1492
+ const g = document.createElement("fakeelement");
1493
+ if (g.style.animationName !== void 0 && (p = !0), p === !1) {
1494
+ for (let m = 0; m < _.length; m++)
1495
+ if (g.style[_[m] + "AnimationName"] !== void 0) {
1496
+ w = _[m], v = "-" + w.toLowerCase() + "-", o = C[m], p = !0;
1487
1497
  break;
1488
1498
  }
1489
1499
  }
@@ -1492,8 +1502,8 @@ function Ro(t) {
1492
1502
  }
1493
1503
  const u = function(p) {
1494
1504
  if (!p.getElementById("detectElementResize")) {
1495
- const v = (e || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', w = p.head || p.getElementsByTagName("head")[0], C = p.createElement("style");
1496
- C.id = "detectElementResize", C.type = "text/css", t != null && C.setAttribute("nonce", t), C.styleSheet ? C.styleSheet.cssText = v : C.appendChild(p.createTextNode(v)), w.appendChild(C);
1505
+ const v = (e || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', _ = p.head || p.getElementsByTagName("head")[0], C = p.createElement("style");
1506
+ C.id = "detectElementResize", C.type = "text/css", t != null && C.setAttribute("nonce", t), C.styleSheet ? C.styleSheet.cssText = v : C.appendChild(p.createTextNode(v)), _.appendChild(C);
1497
1507
  }
1498
1508
  };
1499
1509
  return {
@@ -1502,12 +1512,12 @@ function Ro(t) {
1502
1512
  p.attachEvent("onresize", v);
1503
1513
  else {
1504
1514
  if (!p.__resizeTriggers__) {
1505
- const w = p.ownerDocument, C = oe.getComputedStyle(p);
1506
- C && C.position === "static" && (p.style.position = "relative"), u(w), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = w.createElement("div")).className = "resize-triggers";
1507
- const g = w.createElement("div");
1508
- g.className = "expand-trigger", g.appendChild(w.createElement("div"));
1509
- const _ = w.createElement("div");
1510
- _.className = "contract-trigger", p.__resizeTriggers__.appendChild(g), p.__resizeTriggers__.appendChild(_), p.appendChild(p.__resizeTriggers__), s(p), p.addEventListener("scroll", c, !0), o && (p.__resizeTriggers__.__animationListener__ = function(P) {
1515
+ const _ = p.ownerDocument, C = oe.getComputedStyle(p);
1516
+ C && C.position === "static" && (p.style.position = "relative"), u(_), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = _.createElement("div")).className = "resize-triggers";
1517
+ const w = _.createElement("div");
1518
+ w.className = "expand-trigger", w.appendChild(_.createElement("div"));
1519
+ const g = _.createElement("div");
1520
+ g.className = "contract-trigger", p.__resizeTriggers__.appendChild(w), p.__resizeTriggers__.appendChild(g), p.appendChild(p.__resizeTriggers__), s(p), p.addEventListener("scroll", c, !0), o && (p.__resizeTriggers__.__animationListener__ = function(P) {
1511
1521
  P.animationName === n && s(p);
1512
1522
  }, p.__resizeTriggers__.addEventListener(o, p.__resizeTriggers__.__animationListener__));
1513
1523
  }
@@ -1527,7 +1537,7 @@ function Ro(t) {
1527
1537
  }
1528
1538
  };
1529
1539
  }
1530
- class Lo extends Bn {
1540
+ class Lo extends Kn {
1531
1541
  constructor(...e) {
1532
1542
  super(...e), this.state = {
1533
1543
  height: this.props.defaultHeight || 0,
@@ -1542,17 +1552,17 @@ class Lo extends Bn {
1542
1552
  onResize: r
1543
1553
  } = this.props;
1544
1554
  if (this._parentNode) {
1545
- const a = window.getComputedStyle(this._parentNode) || {}, s = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), l = parseFloat(a.paddingTop || "0"), u = parseFloat(a.paddingBottom || "0"), h = this._parentNode.getBoundingClientRect(), f = h.height - l - u, p = h.width - s - c, v = this._parentNode.offsetHeight - l - u, w = this._parentNode.offsetWidth - s - c;
1546
- (!n && (this.state.height !== v || this.state.scaledHeight !== f) || !o && (this.state.width !== w || this.state.scaledWidth !== p)) && (this.setState({
1555
+ const a = window.getComputedStyle(this._parentNode) || {}, s = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), l = parseFloat(a.paddingTop || "0"), u = parseFloat(a.paddingBottom || "0"), h = this._parentNode.getBoundingClientRect(), f = h.height - l - u, p = h.width - s - c, v = this._parentNode.offsetHeight - l - u, _ = this._parentNode.offsetWidth - s - c;
1556
+ (!n && (this.state.height !== v || this.state.scaledHeight !== f) || !o && (this.state.width !== _ || this.state.scaledWidth !== p)) && (this.setState({
1547
1557
  height: v,
1548
- width: w,
1558
+ width: _,
1549
1559
  scaledHeight: f,
1550
1560
  scaledWidth: p
1551
1561
  }), typeof r == "function" && r({
1552
1562
  height: v,
1553
1563
  scaledHeight: f,
1554
1564
  scaledWidth: p,
1555
- width: w
1565
+ width: _
1556
1566
  }));
1557
1567
  }
1558
1568
  }, this._setRef = (n) => {
@@ -1590,24 +1600,24 @@ class Lo extends Bn {
1590
1600
  } = this.props, {
1591
1601
  height: p,
1592
1602
  scaledHeight: v,
1593
- scaledWidth: w,
1603
+ scaledWidth: _,
1594
1604
  width: C
1595
- } = this.state, g = {
1605
+ } = this.state, w = {
1596
1606
  overflow: "visible"
1597
- }, _ = {};
1607
+ }, g = {};
1598
1608
  let m = !1;
1599
- return r || (p === 0 && (m = !0), g.height = 0, _.height = p, _.scaledHeight = v), a || (C === 0 && (m = !0), g.width = 0, _.width = C, _.scaledWidth = w), s && (m = !1), $e(h, {
1609
+ return r || (p === 0 && (m = !0), w.height = 0, g.height = p, g.scaledHeight = v), a || (C === 0 && (m = !0), w.width = 0, g.width = C, g.scaledWidth = _), s && (m = !1), He(h, {
1600
1610
  ref: this._setRef,
1601
1611
  style: {
1602
- ...g,
1612
+ ...w,
1603
1613
  ...u
1604
1614
  },
1605
1615
  ...f
1606
- }, !m && e(_));
1616
+ }, !m && e(g));
1607
1617
  }
1608
1618
  }
1609
1619
  const No = ({ widths: t, heights: e }) => {
1610
- const { focusedPage: n, totalPages: o } = se(), { isScrolling: r } = tt(), a = k(() => {
1620
+ const { focusedPage: n, totalPages: o } = se(), { isScrolling: r } = et(), a = k(() => {
1611
1621
  const l = [], u = Math.ceil(n / 2) * 2 - 1;
1612
1622
  if (l.push(u), u + 1 < o) {
1613
1623
  const h = u + 1;
@@ -1629,19 +1639,19 @@ const No = ({ widths: t, heights: e }) => {
1629
1639
  height: e(n)
1630
1640
  }
1631
1641
  ], [t, e, a]);
1632
- O(() => {
1642
+ z(() => {
1633
1643
  r.current = !1;
1634
1644
  }, [n]);
1635
1645
  const c = k(() => s.reduce((l, u) => l + Number(u.width || 0), 0), [s]);
1636
- return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: a.map((l, u) => /* @__PURE__ */ i(Pt, { onIntersectRatioChange: () => {
1646
+ return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: a.map((l, u) => /* @__PURE__ */ i(St, { onIntersectRatioChange: () => {
1637
1647
  }, style: s[u], pageNumber: l }, l)) });
1638
1648
  }, Eo = ({ widths: t, heights: e }) => {
1639
- const { focusedPage: n } = se(), { isScrolling: o } = tt(), r = k(() => ({
1649
+ const { focusedPage: n } = se(), { isScrolling: o } = et(), r = k(() => ({
1640
1650
  position: "absolute",
1641
1651
  width: t(n - 1),
1642
1652
  height: e(n - 1)
1643
1653
  }), [t, e, n]);
1644
- O(() => {
1654
+ z(() => {
1645
1655
  o.current = !1;
1646
1656
  }, [n]);
1647
1657
  const a = k(() => t(n - 1), [t]);
@@ -1653,7 +1663,7 @@ const No = ({ widths: t, heights: e }) => {
1653
1663
  position: "relative"
1654
1664
  },
1655
1665
  children: /* @__PURE__ */ i(
1656
- Pt,
1666
+ St,
1657
1667
  {
1658
1668
  style: r,
1659
1669
  onIntersectRatioChange: () => {
@@ -1664,10 +1674,10 @@ const No = ({ widths: t, heights: e }) => {
1664
1674
  )
1665
1675
  }
1666
1676
  );
1667
- }, Oo = Kn(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
1677
+ }, Oo = Xn(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
1668
1678
  const r = t + 1 + e * n.columnCount;
1669
1679
  return /* @__PURE__ */ i(
1670
- Pt,
1680
+ St,
1671
1681
  {
1672
1682
  style: o,
1673
1683
  onIntersectRatioChange: n.handleIntersectRatioChange,
@@ -1675,10 +1685,10 @@ const No = ({ widths: t, heights: e }) => {
1675
1685
  },
1676
1686
  r
1677
1687
  );
1678
- }, yo), is = () => {
1679
- const { initialPage: t = 1, initialScrollMode: e } = Qn(), { pagesRef: n, setPagesRef: o } = Ie();
1680
- Tr(n);
1681
- const { scrollToPage: r } = un(), {
1688
+ }, yo), os = () => {
1689
+ const { initialPage: t = 1, initialScrollMode: e } = er(), { pagesRef: n, setPagesRef: o } = Pe();
1690
+ Pr(n);
1691
+ const { scrollToPage: r } = dn(), {
1682
1692
  virtualScrollRef: a,
1683
1693
  getVirtualScrollRef: s,
1684
1694
  getPageScrollElementRef: c,
@@ -1686,171 +1696,181 @@ const No = ({ widths: t, heights: e }) => {
1686
1696
  setTotalInnerDimensions: u,
1687
1697
  totalInnerDimensions: h,
1688
1698
  pageScrollElementRef: f
1689
- } = et(), { nextPage: p, prevPage: v, setFocusedPage: w, focusedPage: C } = se(), { scrollMode: g } = Ee(), { viewMode: _ } = Qe(), m = W(null), { loading: P } = Y(), I = W(
1699
+ } = Qe(), p = M(!0), { nextPage: v, prevPage: _, setFocusedPage: C, focusedPage: w } = se(), { scrollMode: g } = Ee(), { viewMode: m } = Ye(), P = M(null), { loading: I } = Y(), d = M(
1690
1700
  h
1691
- ), d = W({
1692
- viewMode: _,
1701
+ ), T = M({
1702
+ viewMode: m,
1693
1703
  scrollMode: g
1694
- }), T = W(!1), b = W(), { isFullScreen: S } = er(), {
1695
- pageDimension: A,
1696
- rowCount: y,
1697
- rowHeight: E,
1698
- columnCount: x,
1699
- columnWidth: F,
1700
- estimatedColumnWidth: z,
1701
- estimatedRowHeight: R
1702
- } = xo(), N = ft(h, 100), [$, U] = H({}), j = ft($, 100), { isScrolling: B } = tt(), q = W(), K = W({
1704
+ }), b = M(!1), S = M(), { isFullScreen: F } = tr(), {
1705
+ pageDimension: x,
1706
+ rowCount: N,
1707
+ rowHeight: R,
1708
+ columnCount: O,
1709
+ columnWidth: D,
1710
+ estimatedColumnWidth: y,
1711
+ estimatedRowHeight: E
1712
+ } = xo(), W = ft(h, 100), [U, j] = H({}), X = ft(U, 100), { isScrolling: Z } = et(), B = M(), le = M({
1703
1713
  scrollTop: 0,
1704
1714
  scrollLeft: 0
1705
1715
  });
1706
- Ir(n);
1707
- const { isPressed: ie } = Pr(), { selectionMode: de } = Yn(), { initializeGrabScroll: Q, resetGrabState: ae } = Sr({
1716
+ yr(n);
1717
+ const { isPressed: ie } = Sr(), { selectionMode: Q } = Qn(), { initializeGrabScroll: te, resetGrabState: he } = Ir({
1708
1718
  isPressed: ie
1709
- }), ee = k(() => de === Xn.HAND, [de]), be = L((M, G) => {
1710
- U((J) => G > -1 ? { ...J, [M]: Math.round(G * 100) } : (delete J[M], J));
1711
- }, []), Oe = k(() => ({
1712
- columnCount: x,
1713
- handleIntersectRatioChange: be
1714
- }), [x, be]), ve = L(
1715
- (M) => {
1719
+ }), ue = k(() => Q === Jn.HAND, [Q]), Ie = L(($, G) => {
1720
+ j((J) => G > -1 ? { ...J, [$]: Math.round(G * 100) } : (delete J[$], J));
1721
+ }, []), ye = k(() => ({
1722
+ columnCount: O,
1723
+ handleIntersectRatioChange: Ie
1724
+ }), [O, Ie]), ae = L(
1725
+ ($) => {
1716
1726
  const G = document.activeElement !== n;
1717
- !S && G || (["ArrowUp", "ArrowLeft"].includes(M.key) ? (M.preventDefault(), v()) : ["ArrowDown", "ArrowRight"].includes(M.key) && (M.preventDefault(), p()));
1727
+ !F && G || (["ArrowUp", "ArrowLeft"].includes($.key) ? ($.preventDefault(), _()) : ["ArrowDown", "ArrowRight"].includes($.key) && ($.preventDefault(), v()));
1718
1728
  },
1719
- [p, v, S, g]
1720
- ), pe = L((M) => {
1721
- K.current = {
1722
- scrollTop: M.scrollTop,
1723
- scrollLeft: M.scrollLeft
1729
+ [v, _, F, g]
1730
+ ), me = L(($) => {
1731
+ le.current = {
1732
+ scrollTop: $.scrollTop,
1733
+ scrollLeft: $.scrollLeft
1724
1734
  };
1725
1735
  }, []);
1726
- O(() => (window.addEventListener("keydown", ve), () => {
1727
- window.removeEventListener("keydown", ve);
1728
- }), [ve]), O(() => {
1729
- if (m.current && (m.current.style.position = "relative"), !!a)
1730
- for (let M = 0; M < y; M++)
1731
- for (let G = 0; G < x; G++)
1736
+ z(() => (window.addEventListener("keydown", ae), () => {
1737
+ window.removeEventListener("keydown", ae);
1738
+ }), [ae]), z(() => {
1739
+ if (P.current && (P.current.style.position = "relative"), !!a)
1740
+ for (let $ = 0; $ < N; $++)
1741
+ for (let G = 0; G < O; G++)
1732
1742
  a.resetAfterIndices({
1733
1743
  columnIndex: G,
1734
- rowIndex: M,
1744
+ rowIndex: $,
1735
1745
  shouldForceUpdate: !0
1736
1746
  });
1737
- }, [y, x, A, a]), O(() => {
1738
- const M = Array.from({ length: y }).reduce(
1739
- (J, _e, xe) => J + E(xe),
1747
+ }, [N, O, x, a]), z(() => {
1748
+ const $ = Array.from({ length: N }).reduce(
1749
+ (J, _e, xe) => J + R(xe),
1740
1750
  0
1741
- ), G = Array.from({ length: x }).reduce(
1742
- (J, _e, xe) => J + F(xe),
1751
+ ), G = Array.from({ length: O }).reduce(
1752
+ (J, _e, xe) => J + D(xe),
1743
1753
  0
1744
1754
  );
1745
1755
  u({
1746
- height: M,
1756
+ height: $,
1747
1757
  width: G
1748
1758
  });
1749
- }, [y, x, A]), O(() => {
1750
- if (B.current)
1759
+ }, [N, O, x]), z(() => {
1760
+ if (Z.current)
1751
1761
  return;
1752
- if (d.current.viewMode !== _ || d.current.scrollMode !== g) {
1753
- q.current && clearTimeout(q.current), U({}), T.current = !0, r(C), g === X.HORIZONTAL_SCROLLING && (a == null || a.scrollTo({
1762
+ if (T.current.viewMode !== m || T.current.scrollMode !== g) {
1763
+ B.current && clearTimeout(B.current), j({}), b.current = !0, r(w), g === K.HORIZONTAL_SCROLLING && (a == null || a.scrollTo({
1754
1764
  scrollTop: 0
1755
- })), q.current = setTimeout(() => {
1765
+ })), B.current = setTimeout(() => {
1756
1766
  requestAnimationFrame(() => {
1757
- d.current = { viewMode: _, scrollMode: g };
1767
+ T.current = { viewMode: m, scrollMode: g };
1758
1768
  });
1759
1769
  }, 100);
1760
1770
  return;
1761
1771
  }
1762
- const G = K.current.scrollTop, J = K.current.scrollLeft;
1763
- if (N.height && N.width) {
1764
- T.current = !0;
1765
- const { height: _e, width: xe } = N, { height: $n, width: Gn } = I.current, Vn = G / $n * _e, Un = J / Gn * xe, qn = Math.min(Vn, _e) || 0, Zn = Math.min(Un, xe) || 0;
1772
+ const G = le.current.scrollTop, J = le.current.scrollLeft;
1773
+ if (W.height && W.width) {
1774
+ b.current = !0;
1775
+ const { height: _e, width: xe } = W, { height: Gn, width: Vn } = d.current, Un = G / Gn * _e, qn = J / Vn * xe, Zn = Math.min(Un, _e) || 0, jn = Math.min(qn, xe) || 0;
1766
1776
  a == null || a.scrollTo({
1767
- scrollTop: qn,
1768
- scrollLeft: Zn
1769
- }), I.current = {
1770
- height: N.height,
1771
- width: N.width
1772
- }, b.current && clearTimeout(b.current), b.current = setTimeout(() => {
1773
- T.current = !1;
1777
+ scrollTop: Zn,
1778
+ scrollLeft: jn
1779
+ }), d.current = {
1780
+ height: W.height,
1781
+ width: W.width
1782
+ }, S.current && clearTimeout(S.current), S.current = setTimeout(() => {
1783
+ b.current = !1;
1774
1784
  }, 100);
1775
1785
  }
1776
- }, [N, _, g]), O(() => {
1777
- if ((B.current || T.current) && (B.current = !1), B.current)
1786
+ }, [W]), z(() => {
1787
+ if ((Z.current || b.current) && (Z.current = !1), Z.current)
1778
1788
  return;
1779
- const M = Object.entries(j);
1789
+ const $ = Object.entries(X);
1780
1790
  let G = 0, J = -1;
1781
- M.forEach((_e) => {
1791
+ $.forEach((_e) => {
1782
1792
  J < _e[1] && (G = Number(_e[0]), J = _e[1]);
1783
- }), G && w(G);
1784
- }, [j, w]), O(() => () => {
1785
- q.current && clearTimeout(q.current), b.current && clearTimeout(b.current);
1793
+ }), G && C(G);
1794
+ }, [X, C]), z(() => () => {
1795
+ B.current && clearTimeout(B.current), S.current && clearTimeout(S.current);
1786
1796
  }, []);
1787
- const he = k(() => re(me["rp-pages-container"], {
1788
- [me["rp-cursor-grab"]]: ee && !ie,
1789
- [me["rp-cursor-grabbing"]]: ee && ie
1790
- }), [ee, ie]), De = L(
1791
- (M) => {
1792
- if (ee && M) {
1793
- const G = re(me["rp-pages"]), J = document.querySelector(`.${G}`);
1794
- Q(J);
1797
+ const Oe = k(() => re(fe["rp-pages-container"], {
1798
+ [fe["rp-cursor-grab"]]: ue && !ie,
1799
+ [fe["rp-cursor-grabbing"]]: ue && ie
1800
+ }), [ue, ie]), nt = L(
1801
+ ($) => {
1802
+ if (ue && $) {
1803
+ const G = re(fe["rp-pages"]), J = document.querySelector(`.${G}`);
1804
+ te(J);
1795
1805
  }
1796
1806
  },
1797
- [ee, Q, me]
1807
+ [ue, te, fe]
1798
1808
  );
1799
- return O(() => {
1800
- P && ae();
1801
- }, [P]), O(() => {
1802
- if (e === X.PAGE_SCROLLING) {
1803
- t !== C && f && w(t);
1804
- return;
1805
- }
1806
- if (a != null && a.scrollToItem)
1807
- switch (e) {
1808
- case X.HORIZONTAL_SCROLLING:
1809
- a.scrollToItem({
1810
- columnIndex: t - 1,
1811
- rowIndex: 0,
1812
- align: "start"
1813
- });
1814
- break;
1815
- default:
1816
- a.scrollToItem({
1817
- columnIndex: 0,
1818
- rowIndex: t - 1,
1819
- align: "start"
1820
- });
1821
- break;
1809
+ return z(() => {
1810
+ I && he();
1811
+ }, [I]), z(() => {
1812
+ if (!(W.height === 0 || !p.current)) {
1813
+ if (e === K.PAGE_SCROLLING) {
1814
+ t !== w && f && C(t), p.current = !1;
1815
+ return;
1816
+ }
1817
+ if (a != null && a.scrollToItem) {
1818
+ switch (e) {
1819
+ case K.HORIZONTAL_SCROLLING:
1820
+ a.scrollToItem({
1821
+ columnIndex: t - 1,
1822
+ rowIndex: 0,
1823
+ align: "start"
1824
+ });
1825
+ break;
1826
+ default:
1827
+ a.scrollToItem({
1828
+ columnIndex: 0,
1829
+ rowIndex: t - 1,
1830
+ align: "start"
1831
+ });
1832
+ break;
1833
+ }
1834
+ p.current = !1;
1822
1835
  }
1823
- }, [a, e, f, w]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: he, children: /* @__PURE__ */ i(Lo, { style: { minHeight: "50px" }, children: ({ width: M, height: G }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: De, style: { width: M, height: G }, children: g === X.PAGE_SCROLLING ? /* @__PURE__ */ i(
1836
+ }
1837
+ }, [
1838
+ a,
1839
+ e,
1840
+ f,
1841
+ C,
1842
+ W
1843
+ ]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: Oe, children: /* @__PURE__ */ i(Lo, { style: { minHeight: "50px" }, children: ({ width: $, height: G }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: nt, style: { width: $, height: G }, children: g === K.PAGE_SCROLLING ? /* @__PURE__ */ i(
1824
1844
  "div",
1825
1845
  {
1826
1846
  ref: c,
1827
- style: { width: M, height: G },
1828
- className: re(me["rp-pages"], me["rp-page-scrolling-wrapper"]),
1829
- children: _ === qe.DUAL_PAGE ? /* @__PURE__ */ i(No, { widths: F, heights: E }) : /* @__PURE__ */ i(Eo, { widths: F, heights: E })
1847
+ style: { width: $, height: G },
1848
+ className: re(fe["rp-pages"], fe["rp-page-scrolling-wrapper"]),
1849
+ children: m === Ue.DUAL_PAGE ? /* @__PURE__ */ i(No, { widths: D, heights: R }) : /* @__PURE__ */ i(Eo, { widths: D, heights: R })
1830
1850
  }
1831
- ) : z ? /* @__PURE__ */ i(
1851
+ ) : y ? /* @__PURE__ */ i(
1832
1852
  Po,
1833
1853
  {
1834
1854
  ref: s,
1835
- itemData: Oe,
1855
+ itemData: ye,
1836
1856
  outerRef: l,
1837
- innerRef: m,
1838
- onScroll: pe,
1839
- columnCount: x,
1840
- columnWidth: F,
1841
- rowHeight: E,
1857
+ innerRef: P,
1858
+ onScroll: me,
1859
+ columnCount: O,
1860
+ columnWidth: D,
1861
+ rowHeight: R,
1842
1862
  height: G,
1843
- width: M,
1844
- estimatedColumnWidth: z,
1845
- estimatedRowHeight: R,
1846
- rowCount: y,
1863
+ width: $,
1864
+ estimatedColumnWidth: y,
1865
+ estimatedRowHeight: E,
1866
+ rowCount: N,
1847
1867
  className: re(
1848
- me["rp-pages"],
1849
- g === X.HORIZONTAL_SCROLLING ? me["rp-pages-horizontal-scroll"] : ""
1868
+ fe["rp-pages"],
1869
+ g === K.HORIZONTAL_SCROLLING ? fe["rp-pages-horizontal-scroll"] : ""
1850
1870
  ),
1851
1871
  children: Oo
1852
1872
  }
1853
- ) : P ? null : /* @__PURE__ */ i(
1873
+ ) : I ? null : /* @__PURE__ */ i(
1854
1874
  "div",
1855
1875
  {
1856
1876
  style: {
@@ -1860,10 +1880,10 @@ const No = ({ widths: t, heights: e }) => {
1860
1880
  height: "100%",
1861
1881
  width: "100%"
1862
1882
  },
1863
- children: /* @__PURE__ */ i(Me, {})
1883
+ children: /* @__PURE__ */ i(We, {})
1864
1884
  }
1865
1885
  ) }) }) });
1866
- }, ze = {
1886
+ }, De = {
1867
1887
  "rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
1868
1888
  "rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
1869
1889
  "rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
@@ -1874,25 +1894,25 @@ const No = ({ widths: t, heights: e }) => {
1874
1894
  "rp-page-input": "_rp-page-input_1vu6o_6",
1875
1895
  "rp-total-page": "_rp-total-page_1vu6o_12"
1876
1896
  }, Do = () => {
1877
- const { prevIcon: t } = ue();
1878
- return t || /* @__PURE__ */ i(We, {});
1897
+ const { prevIcon: t } = pe();
1898
+ return t || /* @__PURE__ */ i(ke, {});
1879
1899
  }, zo = () => {
1880
- const { nextIcon: t } = ue();
1881
- return t || /* @__PURE__ */ i(We, { style: { transform: "rotate(180deg" } });
1900
+ const { nextIcon: t } = pe();
1901
+ return t || /* @__PURE__ */ i(ke, { style: { transform: "rotate(180deg" } });
1882
1902
  }, Ao = () => {
1883
- const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = se(), [s, c] = H(t.toString()), { pageNavigationTool: l = !0 } = ge(), { isSmallScreen: u } = ye(), { localeMessages: h } = le();
1884
- O(() => {
1903
+ const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = se(), [s, c] = H(t.toString()), { pageNavigationTool: l = !0 } = ve(), { isSmallScreen: u } = Se(), { localeMessages: h } = de();
1904
+ z(() => {
1885
1905
  c(t.toString());
1886
1906
  }, [t]);
1887
1907
  const f = L((C) => {
1888
- const g = C.target.value;
1889
- c(g);
1908
+ const w = C.target.value;
1909
+ c(w);
1890
1910
  }, []), p = L(async () => {
1891
1911
  const C = await a(s);
1892
1912
  C.success || c(C.currentPage.toString());
1893
1913
  }, [a, s, e]), v = L(() => {
1894
1914
  c(t.toString());
1895
- }, [t]), w = L(
1915
+ }, [t]), _ = L(
1896
1916
  (C) => {
1897
1917
  C.key === "Enter" && p();
1898
1918
  },
@@ -1908,9 +1928,9 @@ const No = ({ widths: t, heights: e }) => {
1908
1928
  goToPage: a,
1909
1929
  changePage: n
1910
1930
  }
1911
- ) : l ? /* @__PURE__ */ D("div", { className: dt["rp-paginate"], children: [
1912
- !u && /* @__PURE__ */ i(Z, { content: h == null ? void 0 : h.previousPageTooltip, children: /* @__PURE__ */ i(
1913
- te,
1931
+ ) : l ? /* @__PURE__ */ A("div", { className: dt["rp-paginate"], children: [
1932
+ !u && /* @__PURE__ */ i(q, { content: h == null ? void 0 : h.previousPageTooltip, children: /* @__PURE__ */ i(
1933
+ ee,
1914
1934
  {
1915
1935
  onClick: r,
1916
1936
  "aria-label": h == null ? void 0 : h.previousPageTooltip,
@@ -1918,22 +1938,22 @@ const No = ({ widths: t, heights: e }) => {
1918
1938
  children: /* @__PURE__ */ i(Do, {})
1919
1939
  }
1920
1940
  ) }),
1921
- /* @__PURE__ */ i(Z, { content: h == null ? void 0 : h.currentPageTooltip, children: /* @__PURE__ */ i(
1922
- Qt,
1941
+ /* @__PURE__ */ i(q, { content: h == null ? void 0 : h.currentPageTooltip, children: /* @__PURE__ */ i(
1942
+ tn,
1923
1943
  {
1924
- onKeyDown: w,
1944
+ onKeyDown: _,
1925
1945
  onBlur: v,
1926
1946
  onChange: f,
1927
1947
  value: s,
1928
1948
  className: dt["rp-page-input"]
1929
1949
  }
1930
1950
  ) }),
1931
- /* @__PURE__ */ D("span", { className: dt["rp-total-page"], children: [
1951
+ /* @__PURE__ */ A("span", { className: dt["rp-total-page"], children: [
1932
1952
  "/",
1933
1953
  e
1934
1954
  ] }),
1935
- !u && /* @__PURE__ */ i(Z, { content: h == null ? void 0 : h.nextPageTooltip, children: /* @__PURE__ */ i(
1936
- te,
1955
+ !u && /* @__PURE__ */ i(q, { content: h == null ? void 0 : h.nextPageTooltip, children: /* @__PURE__ */ i(
1956
+ ee,
1937
1957
  {
1938
1958
  onClick: o,
1939
1959
  "aria-label": h == null ? void 0 : h.nextPageTooltip,
@@ -1943,7 +1963,7 @@ const No = ({ widths: t, heights: e }) => {
1943
1963
  ) })
1944
1964
  ] }) : null;
1945
1965
  };
1946
- var St = "Dialog", [bn, as] = Nr(St), [Fo, ce] = bn(St), Cn = (t) => {
1966
+ var It = "Dialog", [Cn, is] = Nr(It), [Fo, ce] = Cn(It), Tn = (t) => {
1947
1967
  const {
1948
1968
  __scopeDialog: e,
1949
1969
  children: n,
@@ -1973,50 +1993,50 @@ var St = "Dialog", [bn, as] = Nr(St), [Fo, ce] = bn(St), Cn = (t) => {
1973
1993
  }
1974
1994
  );
1975
1995
  };
1976
- Cn.displayName = St;
1977
- var Tn = "DialogTrigger", ko = V.forwardRef(
1996
+ Tn.displayName = It;
1997
+ var Pn = "DialogTrigger", ko = V.forwardRef(
1978
1998
  (t, e) => {
1979
- const { __scopeDialog: n, ...o } = t, r = ce(Tn, n), a = bt(e, r.triggerRef);
1999
+ const { __scopeDialog: n, ...o } = t, r = ce(Pn, n), a = Ct(e, r.triggerRef);
1980
2000
  return /* @__PURE__ */ i(
1981
- He.button,
2001
+ Me.button,
1982
2002
  {
1983
2003
  type: "button",
1984
2004
  "aria-haspopup": "dialog",
1985
2005
  "aria-expanded": r.open,
1986
2006
  "aria-controls": r.contentId,
1987
- "data-state": xt(r.open),
2007
+ "data-state": Rt(r.open),
1988
2008
  ...o,
1989
2009
  ref: a,
1990
- onClick: Fe(t.onClick, r.onOpenToggle)
2010
+ onClick: Ae(t.onClick, r.onOpenToggle)
1991
2011
  }
1992
2012
  );
1993
2013
  }
1994
2014
  );
1995
- ko.displayName = Tn;
1996
- var It = "DialogPortal", [Wo, Pn] = bn(It, {
2015
+ ko.displayName = Pn;
2016
+ var yt = "DialogPortal", [Wo, Sn] = Cn(yt, {
1997
2017
  forceMount: void 0
1998
- }), Sn = (t) => {
1999
- const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = ce(It, e);
2000
- return /* @__PURE__ */ i(Wo, { scope: e, forceMount: n, children: V.Children.map(o, (s) => /* @__PURE__ */ i(Ct, { present: n || a.open, children: /* @__PURE__ */ i(Mr, { asChild: !0, container: r, children: s }) })) });
2018
+ }), In = (t) => {
2019
+ const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = ce(yt, e);
2020
+ return /* @__PURE__ */ i(Wo, { scope: e, forceMount: n, children: V.Children.map(o, (s) => /* @__PURE__ */ i(Tt, { present: n || a.open, children: /* @__PURE__ */ i(Mr, { asChild: !0, container: r, children: s }) })) });
2001
2021
  };
2002
- Sn.displayName = It;
2003
- var je = "DialogOverlay", In = V.forwardRef(
2022
+ In.displayName = yt;
2023
+ var Ze = "DialogOverlay", yn = V.forwardRef(
2004
2024
  (t, e) => {
2005
- const n = Pn(je, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(je, t.__scopeDialog);
2006
- return a.modal ? /* @__PURE__ */ i(Ct, { present: o || a.open, children: /* @__PURE__ */ i(Mo, { ...r, ref: e }) }) : null;
2025
+ const n = Sn(Ze, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Ze, t.__scopeDialog);
2026
+ return a.modal ? /* @__PURE__ */ i(Tt, { present: o || a.open, children: /* @__PURE__ */ i(Mo, { ...r, ref: e }) }) : null;
2007
2027
  }
2008
2028
  );
2009
- In.displayName = je;
2029
+ yn.displayName = Ze;
2010
2030
  var Mo = V.forwardRef(
2011
2031
  (t, e) => {
2012
- const { __scopeDialog: n, ...o } = t, r = ce(je, n);
2032
+ const { __scopeDialog: n, ...o } = t, r = ce(Ze, n);
2013
2033
  return (
2014
2034
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2015
2035
  // ie. when `Overlay` and `Content` are siblings
2016
2036
  /* @__PURE__ */ i(Ar, { as: Er, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
2017
- He.div,
2037
+ Me.div,
2018
2038
  {
2019
- "data-state": xt(r.open),
2039
+ "data-state": Rt(r.open),
2020
2040
  ...o,
2021
2041
  ref: e,
2022
2042
  style: { pointerEvents: "auto", ...o.style }
@@ -2024,36 +2044,36 @@ var Mo = V.forwardRef(
2024
2044
  ) })
2025
2045
  );
2026
2046
  }
2027
- ), Se = "DialogContent", yn = V.forwardRef(
2047
+ ), Te = "DialogContent", xn = V.forwardRef(
2028
2048
  (t, e) => {
2029
- const n = Pn(Se, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Se, t.__scopeDialog);
2030
- return /* @__PURE__ */ i(Ct, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(Ho, { ...r, ref: e }) : /* @__PURE__ */ i($o, { ...r, ref: e }) });
2049
+ const n = Sn(Te, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Te, t.__scopeDialog);
2050
+ return /* @__PURE__ */ i(Tt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(Ho, { ...r, ref: e }) : /* @__PURE__ */ i($o, { ...r, ref: e }) });
2031
2051
  }
2032
2052
  );
2033
- yn.displayName = Se;
2053
+ xn.displayName = Te;
2034
2054
  var Ho = V.forwardRef(
2035
2055
  (t, e) => {
2036
- const n = ce(Se, t.__scopeDialog), o = V.useRef(null), r = bt(e, n.contentRef, o);
2056
+ const n = ce(Te, t.__scopeDialog), o = V.useRef(null), r = Ct(e, n.contentRef, o);
2037
2057
  return V.useEffect(() => {
2038
2058
  const a = o.current;
2039
2059
  if (a)
2040
2060
  return Fr(a);
2041
2061
  }, []), /* @__PURE__ */ i(
2042
- xn,
2062
+ Rn,
2043
2063
  {
2044
2064
  ...t,
2045
2065
  ref: r,
2046
2066
  trapFocus: n.open,
2047
2067
  disableOutsidePointerEvents: !0,
2048
- onCloseAutoFocus: Fe(t.onCloseAutoFocus, (a) => {
2068
+ onCloseAutoFocus: Ae(t.onCloseAutoFocus, (a) => {
2049
2069
  var s;
2050
2070
  a.preventDefault(), (s = n.triggerRef.current) == null || s.focus();
2051
2071
  }),
2052
- onPointerDownOutside: Fe(t.onPointerDownOutside, (a) => {
2072
+ onPointerDownOutside: Ae(t.onPointerDownOutside, (a) => {
2053
2073
  const s = a.detail.originalEvent, c = s.button === 0 && s.ctrlKey === !0;
2054
2074
  (s.button === 2 || c) && a.preventDefault();
2055
2075
  }),
2056
- onFocusOutside: Fe(
2076
+ onFocusOutside: Ae(
2057
2077
  t.onFocusOutside,
2058
2078
  (a) => a.preventDefault()
2059
2079
  )
@@ -2062,9 +2082,9 @@ var Ho = V.forwardRef(
2062
2082
  }
2063
2083
  ), $o = V.forwardRef(
2064
2084
  (t, e) => {
2065
- const n = ce(Se, t.__scopeDialog), o = V.useRef(!1), r = V.useRef(!1);
2085
+ const n = ce(Te, t.__scopeDialog), o = V.useRef(!1), r = V.useRef(!1);
2066
2086
  return /* @__PURE__ */ i(
2067
- xn,
2087
+ Rn,
2068
2088
  {
2069
2089
  ...t,
2070
2090
  ref: e,
@@ -2083,10 +2103,10 @@ var Ho = V.forwardRef(
2083
2103
  }
2084
2104
  );
2085
2105
  }
2086
- ), xn = V.forwardRef(
2106
+ ), Rn = V.forwardRef(
2087
2107
  (t, e) => {
2088
- const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...s } = t, c = ce(Se, n), l = V.useRef(null), u = bt(e, l);
2089
- return kr(), /* @__PURE__ */ D(ke, { children: [
2108
+ const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...s } = t, c = ce(Te, n), l = V.useRef(null), u = Ct(e, l);
2109
+ return kr(), /* @__PURE__ */ A(Fe, { children: [
2090
2110
  /* @__PURE__ */ i(
2091
2111
  Wr,
2092
2112
  {
@@ -2102,7 +2122,7 @@ var Ho = V.forwardRef(
2102
2122
  id: c.contentId,
2103
2123
  "aria-describedby": c.descriptionId,
2104
2124
  "aria-labelledby": c.titleId,
2105
- "data-state": xt(c.open),
2125
+ "data-state": Rt(c.open),
2106
2126
  ...s,
2107
2127
  ref: u,
2108
2128
  onDismiss: () => c.onOpenChange(!1)
@@ -2110,50 +2130,50 @@ var Ho = V.forwardRef(
2110
2130
  )
2111
2131
  }
2112
2132
  ),
2113
- /* @__PURE__ */ D(ke, { children: [
2133
+ /* @__PURE__ */ A(Fe, { children: [
2114
2134
  /* @__PURE__ */ i(Vo, { titleId: c.titleId }),
2115
2135
  /* @__PURE__ */ i(qo, { contentRef: l, descriptionId: c.descriptionId })
2116
2136
  ] })
2117
2137
  ] });
2118
2138
  }
2119
- ), yt = "DialogTitle", Rn = V.forwardRef(
2139
+ ), xt = "DialogTitle", Ln = V.forwardRef(
2120
2140
  (t, e) => {
2121
- const { __scopeDialog: n, ...o } = t, r = ce(yt, n);
2122
- return /* @__PURE__ */ i(He.h2, { id: r.titleId, ...o, ref: e });
2141
+ const { __scopeDialog: n, ...o } = t, r = ce(xt, n);
2142
+ return /* @__PURE__ */ i(Me.h2, { id: r.titleId, ...o, ref: e });
2123
2143
  }
2124
2144
  );
2125
- Rn.displayName = yt;
2126
- var Ln = "DialogDescription", Go = V.forwardRef(
2145
+ Ln.displayName = xt;
2146
+ var Nn = "DialogDescription", Go = V.forwardRef(
2127
2147
  (t, e) => {
2128
- const { __scopeDialog: n, ...o } = t, r = ce(Ln, n);
2129
- return /* @__PURE__ */ i(He.p, { id: r.descriptionId, ...o, ref: e });
2148
+ const { __scopeDialog: n, ...o } = t, r = ce(Nn, n);
2149
+ return /* @__PURE__ */ i(Me.p, { id: r.descriptionId, ...o, ref: e });
2130
2150
  }
2131
2151
  );
2132
- Go.displayName = Ln;
2133
- var Nn = "DialogClose", En = V.forwardRef(
2152
+ Go.displayName = Nn;
2153
+ var En = "DialogClose", On = V.forwardRef(
2134
2154
  (t, e) => {
2135
- const { __scopeDialog: n, ...o } = t, r = ce(Nn, n);
2155
+ const { __scopeDialog: n, ...o } = t, r = ce(En, n);
2136
2156
  return /* @__PURE__ */ i(
2137
- He.button,
2157
+ Me.button,
2138
2158
  {
2139
2159
  type: "button",
2140
2160
  ...o,
2141
2161
  ref: e,
2142
- onClick: Fe(t.onClick, () => r.onOpenChange(!1))
2162
+ onClick: Ae(t.onClick, () => r.onOpenChange(!1))
2143
2163
  }
2144
2164
  );
2145
2165
  }
2146
2166
  );
2147
- En.displayName = Nn;
2148
- function xt(t) {
2167
+ On.displayName = En;
2168
+ function Rt(t) {
2149
2169
  return t ? "open" : "closed";
2150
2170
  }
2151
- var On = "DialogTitleWarning", [ss, Dn] = Or(On, {
2152
- contentName: Se,
2153
- titleName: yt,
2171
+ var Dn = "DialogTitleWarning", [as, zn] = Or(Dn, {
2172
+ contentName: Te,
2173
+ titleName: xt,
2154
2174
  docsSlug: "dialog"
2155
2175
  }), Vo = ({ titleId: t }) => {
2156
- const e = Dn(On), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
2176
+ const e = zn(Dn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
2157
2177
 
2158
2178
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
2159
2179
 
@@ -2162,14 +2182,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
2162
2182
  t && (document.getElementById(t) || console.error(n));
2163
2183
  }, [n, t]), null;
2164
2184
  }, Uo = "DialogDescriptionWarning", qo = ({ contentRef: t, descriptionId: e }) => {
2165
- const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Dn(Uo).contentName}}.`;
2185
+ const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${zn(Uo).contentName}}.`;
2166
2186
  return V.useEffect(() => {
2167
2187
  var a;
2168
2188
  const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
2169
2189
  e && r && (document.getElementById(e) || console.warn(o));
2170
2190
  }, [o, t, e]), null;
2171
- }, Zo = Cn, jo = Sn, Bo = In, Ko = yn, Xo = Rn, Jo = En;
2172
- const Pe = {
2191
+ }, Zo = Tn, jo = In, Bo = yn, Ko = xn, Xo = Ln, Jo = On;
2192
+ const Ce = {
2173
2193
  "rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
2174
2194
  "rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
2175
2195
  "rp-document-dialog": "_rp-document-dialog_slqo7_13",
@@ -2178,7 +2198,7 @@ const Pe = {
2178
2198
  "rp-dialog-close": "_rp-dialog-close_slqo7_47",
2179
2199
  "rp-properties-divider": "_rp-properties-divider_slqo7_55"
2180
2200
  }, Yo = () => {
2181
- const { pdfProperties: t } = Y(), { container: e } = Ie(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = $r(), { localeMessages: r } = le(), a = k(() => {
2201
+ const { pdfProperties: t } = Y(), { container: e } = Pe(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = $r(), { localeMessages: r } = de(), a = k(() => {
2182
2202
  if (!t)
2183
2203
  return [];
2184
2204
  const {
@@ -2190,10 +2210,10 @@ const Pe = {
2190
2210
  createdOn: f,
2191
2211
  creator: p,
2192
2212
  keywords: v,
2193
- modifiedOn: w,
2213
+ modifiedOn: _,
2194
2214
  pdfProducer: C,
2195
- pdfVersion: g,
2196
- pageCount: _
2215
+ pdfVersion: w,
2216
+ pageCount: g
2197
2217
  } = t;
2198
2218
  return [
2199
2219
  { label: r == null ? void 0 : r.propertiesFilenameLabel, value: c },
@@ -2206,24 +2226,24 @@ const Pe = {
2206
2226
  { label: r == null ? void 0 : r.propertiesCreatorLabel, value: p },
2207
2227
  {
2208
2228
  label: r == null ? void 0 : r.propertiesCreateOnLabel,
2209
- value: f ? Ot(f) : ""
2229
+ value: f ? zt(f) : ""
2210
2230
  },
2211
2231
  {
2212
2232
  label: r == null ? void 0 : r.propertiesModifiedOnLabel,
2213
- value: w ? Ot(w) : ""
2233
+ value: _ ? zt(_) : ""
2214
2234
  },
2215
2235
  { separate: !0 },
2216
2236
  { label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: C },
2217
- { label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: g },
2218
- { label: r == null ? void 0 : r.propertiesPageCountLabel, value: _ }
2237
+ { label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: w },
2238
+ { label: r == null ? void 0 : r.propertiesPageCountLabel, value: g }
2219
2239
  ];
2220
2240
  }, [t, r]);
2221
- return /* @__PURE__ */ i(Zo, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(jo, { container: e, children: /* @__PURE__ */ D("div", { className: Pe["rp-dialog-wrapper"], children: [
2222
- /* @__PURE__ */ i(Bo, { className: Pe["rp-dialog-overlay"] }),
2223
- /* @__PURE__ */ D(Ko, { className: Pe["rp-document-dialog"], children: [
2224
- /* @__PURE__ */ i(Xo, { className: Pe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2225
- /* @__PURE__ */ i("div", { className: Pe["rp-document-properties"], children: a.map((s, c) => /* @__PURE__ */ i("div", { children: s.separate ? /* @__PURE__ */ i("div", { className: Pe["rp-properties-divider"] }) : /* @__PURE__ */ i(Hr, { label: s.label, value: s.value }) }, c)) }),
2226
- /* @__PURE__ */ i(Jo, { asChild: !0, className: Pe["rp-dialog-close"], children: /* @__PURE__ */ i(sn, {}) })
2241
+ return /* @__PURE__ */ i(Zo, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(jo, { container: e, children: /* @__PURE__ */ A("div", { className: Ce["rp-dialog-wrapper"], children: [
2242
+ /* @__PURE__ */ i(Bo, { className: Ce["rp-dialog-overlay"] }),
2243
+ /* @__PURE__ */ A(Ko, { className: Ce["rp-document-dialog"], children: [
2244
+ /* @__PURE__ */ i(Xo, { className: Ce["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
2245
+ /* @__PURE__ */ i("div", { className: Ce["rp-document-properties"], children: a.map((s, c) => /* @__PURE__ */ i("div", { children: s.separate ? /* @__PURE__ */ i("div", { className: Ce["rp-properties-divider"] }) : /* @__PURE__ */ i(Hr, { label: s.label, value: s.value }) }, c)) }),
2246
+ /* @__PURE__ */ i(Jo, { asChild: !0, className: Ce["rp-dialog-close"], children: /* @__PURE__ */ i(cn, {}) })
2227
2247
  ] })
2228
2248
  ] }) }) });
2229
2249
  }, Qo = {
@@ -2231,7 +2251,7 @@ const Pe = {
2231
2251
  }, ei = (t) => URL.createObjectURL(t), ti = async (t) => {
2232
2252
  const n = await (await fetch(t)).blob();
2233
2253
  return ei(n);
2234
- }, zn = () => {
2254
+ }, An = () => {
2235
2255
  const { filename: t, pdfSrc: e } = Y();
2236
2256
  return { download: L(async () => {
2237
2257
  if (!t || !e)
@@ -2239,23 +2259,23 @@ const Pe = {
2239
2259
  const o = document.createElement("a");
2240
2260
  o.href = await ti(e), o.download = t, document.body.appendChild(o), o.click(), document.body.removeChild(o);
2241
2261
  }, [t, e]) };
2242
- }, An = () => {
2243
- const { downloadIcon: t } = ue();
2262
+ }, Fn = () => {
2263
+ const { downloadIcon: t } = pe();
2244
2264
  return t || /* @__PURE__ */ i(Zr, {});
2245
- }, Fn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), ni = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Fn, { localeMessages: e, children: /* @__PURE__ */ i(te, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(An, {}) }) }), ri = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(we, { onClick: t, children: /* @__PURE__ */ D(Fn, { className: "rp-menu-item", localeMessages: e, children: [
2246
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(An, {}) }),
2265
+ }, kn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(q, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), ni = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(kn, { localeMessages: e, children: /* @__PURE__ */ i(ee, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Fn, {}) }) }), ri = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(we, { onClick: t, children: /* @__PURE__ */ A(kn, { className: "rp-menu-item", localeMessages: e, children: [
2266
+ /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Fn, {}) }),
2247
2267
  e == null ? void 0 : e.downloadFileLabel
2248
- ] }) }), kn = () => {
2249
- const { download: t } = zn(), { downloadTool: e = !0 } = ge(), { isSmallScreen: n } = ye(), { localeMessages: o } = le();
2268
+ ] }) }), Wn = () => {
2269
+ const { download: t } = An(), { downloadTool: e = !0 } = ve(), { isSmallScreen: n } = Se(), { localeMessages: o } = de();
2250
2270
  return e ? n ? /* @__PURE__ */ i(ri, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(ni, { download: t, localeMessages: o }) : null : null;
2251
- }, Wn = () => {
2252
- const { printIcon: t } = ue();
2271
+ }, Mn = () => {
2272
+ const { printIcon: t } = pe();
2253
2273
  return t || /* @__PURE__ */ i(jr, {});
2254
- }, Mn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), oi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Mn, { localeMessages: e, children: /* @__PURE__ */ i(te, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Wn, {}) }) }), ii = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(we, { onClick: t, children: /* @__PURE__ */ D(Mn, { className: "rp-menu-item", localeMessages: e, children: [
2255
- /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Wn, {}) }),
2274
+ }, Hn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(q, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), oi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Hn, { localeMessages: e, children: /* @__PURE__ */ i(ee, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Mn, {}) }) }), ii = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(we, { onClick: t, children: /* @__PURE__ */ A(Hn, { className: "rp-menu-item", localeMessages: e, children: [
2275
+ /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Mn, {}) }),
2256
2276
  e == null ? void 0 : e.printLabel
2257
- ] }) }), Hn = () => {
2258
- const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = nt(), { printTool: s = !0 } = ge(), { isSmallScreen: c } = ye(), { localeMessages: l } = le();
2277
+ ] }) }), $n = () => {
2278
+ const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: s = !0 } = ve(), { isSmallScreen: c } = Se(), { localeMessages: l } = de();
2259
2279
  return s ? c ? /* @__PURE__ */ i(ii, { print: t, localeMessages: l }) : typeof s == "function" ? /* @__PURE__ */ i(
2260
2280
  s,
2261
2281
  {
@@ -2270,30 +2290,30 @@ const Pe = {
2270
2290
  }, ai = {
2271
2291
  "rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
2272
2292
  }, si = () => {
2273
- const { goToFirstPageIcon: t } = ue();
2274
- return t || /* @__PURE__ */ i(ln, { className: ai["rp-go-to-Top"] });
2293
+ const { goToFirstPageIcon: t } = pe();
2294
+ return t || /* @__PURE__ */ i(un, { className: ai["rp-go-to-Top"] });
2275
2295
  }, ci = () => {
2276
- const { goToLastPageIcon: t } = ue();
2277
- return t || /* @__PURE__ */ i(ln, {});
2278
- }, Kt = { width: "100%" }, li = () => {
2279
- const { goToPage: t, totalPages: e, focusedPage: n } = se(), { jumpNavigationTool: o = !0 } = ge(), { localeMessages: r } = le(), a = k(() => n === 1, [n]), s = k(() => n === e, [n, e]), c = L(() => {
2296
+ const { goToLastPageIcon: t } = pe();
2297
+ return t || /* @__PURE__ */ i(un, {});
2298
+ }, Jt = { width: "100%" }, li = () => {
2299
+ const { goToPage: t, totalPages: e, focusedPage: n } = se(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = de(), a = k(() => n === 1, [n]), s = k(() => n === e, [n, e]), c = L(() => {
2280
2300
  t(1);
2281
2301
  }, [t]), l = L(() => {
2282
2302
  t(e);
2283
2303
  }, [t, e]);
2284
- return o ? /* @__PURE__ */ D(Ze, { children: [
2285
- /* @__PURE__ */ i(we, { onClick: c, children: /* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.firstPageTooltip, style: Kt, children: /* @__PURE__ */ D("div", { className: "rp-menu-item", "aria-disabled": a, children: [
2304
+ return o ? /* @__PURE__ */ A(qe, { children: [
2305
+ /* @__PURE__ */ i(we, { onClick: c, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.firstPageTooltip, style: Jt, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": a, children: [
2286
2306
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(si, {}) }),
2287
2307
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
2288
2308
  ] }) }) }),
2289
- /* @__PURE__ */ i(we, { onClick: l, children: /* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.lastPageTooltip, style: Kt, children: /* @__PURE__ */ D("div", { className: "rp-menu-item", "aria-disabled": s, children: [
2309
+ /* @__PURE__ */ i(we, { onClick: l, children: /* @__PURE__ */ i(q, { content: r == null ? void 0 : r.lastPageTooltip, style: Jt, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": s, children: [
2290
2310
  /* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(ci, {}) }),
2291
2311
  /* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
2292
2312
  ] }) }) }),
2293
- /* @__PURE__ */ i(Tt, {})
2313
+ /* @__PURE__ */ i(Pt, {})
2294
2314
  ] }) : null;
2295
2315
  }, ui = () => {
2296
- const { container: t } = Ie(), { isSmallScreen: e } = ye(), {
2316
+ const { container: t } = Pe(), { isSmallScreen: e } = Se(), {
2297
2317
  openFileTool: n,
2298
2318
  downloadTool: o,
2299
2319
  documentProperties: r,
@@ -2303,11 +2323,11 @@ const Pe = {
2303
2323
  jumpNavigationTool: l,
2304
2324
  printTool: u,
2305
2325
  fullscreenTool: h
2306
- } = ge(), { localeMessages: f } = le();
2326
+ } = ve(), { localeMessages: f } = de();
2307
2327
  return k(() => {
2308
2328
  const v = l || s || c || a || r;
2309
- let w = !1;
2310
- return e && (w = !(!n && !o && !u && !h)), v || w;
2329
+ let _ = !1;
2330
+ return e && (_ = !(!n && !o && !u && !h)), v || _;
2311
2331
  }, [
2312
2332
  n,
2313
2333
  o,
@@ -2317,19 +2337,19 @@ const Pe = {
2317
2337
  c,
2318
2338
  l,
2319
2339
  e
2320
- ]) ? /* @__PURE__ */ D(Gr, { children: [
2340
+ ]) ? /* @__PURE__ */ A(Gr, { children: [
2321
2341
  /* @__PURE__ */ i(
2322
- an,
2342
+ sn,
2323
2343
  {
2324
2344
  container: t,
2325
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(te, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(Lr, {}) }) }) }),
2326
- children: /* @__PURE__ */ D("div", { className: Qo["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
2327
- e && /* @__PURE__ */ D(Ze, { children: [
2328
- /* @__PURE__ */ i(on, {}),
2329
- /* @__PURE__ */ i(kn, {}),
2330
- /* @__PURE__ */ i(Hn, {}),
2331
- /* @__PURE__ */ i(cn, {}),
2332
- /* @__PURE__ */ i(Tt, {})
2345
+ triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(q, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(ee, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(Lr, {}) }) }) }),
2346
+ children: /* @__PURE__ */ A("div", { className: Qo["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
2347
+ e && /* @__PURE__ */ A(qe, { children: [
2348
+ /* @__PURE__ */ i(an, {}),
2349
+ /* @__PURE__ */ i(Wn, {}),
2350
+ /* @__PURE__ */ i($n, {}),
2351
+ /* @__PURE__ */ i(ln, {}),
2352
+ /* @__PURE__ */ i(Pt, {})
2333
2353
  ] }),
2334
2354
  /* @__PURE__ */ i(li, {}),
2335
2355
  /* @__PURE__ */ i(Ur, {}),
@@ -2342,14 +2362,14 @@ const Pe = {
2342
2362
  /* @__PURE__ */ i(Yo, {})
2343
2363
  ] }) : null;
2344
2364
  }, di = () => {
2345
- const { isSmallScreen: t } = ye();
2346
- return /* @__PURE__ */ D(ke, { children: [
2365
+ const { isSmallScreen: t } = Se();
2366
+ return /* @__PURE__ */ A(Fe, { children: [
2347
2367
  /* @__PURE__ */ i(Rr, {}),
2348
- !t && /* @__PURE__ */ D(ke, { children: [
2349
- /* @__PURE__ */ i(on, {}),
2350
- /* @__PURE__ */ i(kn, {}),
2351
- /* @__PURE__ */ i(Hn, {}),
2352
- /* @__PURE__ */ i(cn, {})
2368
+ !t && /* @__PURE__ */ A(Fe, { children: [
2369
+ /* @__PURE__ */ i(an, {}),
2370
+ /* @__PURE__ */ i(Wn, {}),
2371
+ /* @__PURE__ */ i($n, {}),
2372
+ /* @__PURE__ */ i(ln, {})
2353
2373
  ] }),
2354
2374
  /* @__PURE__ */ i(ui, {})
2355
2375
  ] });
@@ -2360,40 +2380,40 @@ const Pe = {
2360
2380
  "rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
2361
2381
  "rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
2362
2382
  }, pi = 25, pt = 1e3, hi = [50, 75, 100, 125, 150, 200, 300, 400], mi = () => {
2363
- const { zoomInIcon: t } = ue();
2383
+ const { zoomInIcon: t } = pe();
2364
2384
  return t || /* @__PURE__ */ i(Kr, {});
2365
2385
  }, fi = () => {
2366
- const { zoomOutIcon: t } = ue();
2386
+ const { zoomOutIcon: t } = pe();
2367
2387
  return t || /* @__PURE__ */ i(Xr, {});
2368
2388
  }, gi = () => {
2369
- const { zoomLevel: t, setZoomLevel: e } = Ye(), { container: n, contentRef: o } = Ie(), { zoomTool: r = !0 } = ge(), { focusedPage: a } = se(), { rotate: s } = Je(), { pages: c } = Y(), { isSmallScreen: l } = ye(), { localeMessages: u } = le(), h = L(() => {
2370
- e((_) => {
2371
- const m = Math.floor(_ / 25) * 25;
2389
+ const { zoomLevel: t, setZoomLevel: e } = Je(), { container: n, contentRef: o } = Pe(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = se(), { rotate: s } = Xe(), { pages: c } = Y(), { isSmallScreen: l } = Se(), { localeMessages: u } = de(), h = L(() => {
2390
+ e((g) => {
2391
+ const m = Math.floor(g / 25) * 25;
2372
2392
  return Math.min(m + 25, pt);
2373
2393
  });
2374
2394
  }, [e]), f = L(() => {
2375
- e((_) => {
2376
- const m = Math.ceil(_ / 25) * 25;
2395
+ e((g) => {
2396
+ const m = Math.ceil(g / 25) * 25;
2377
2397
  return Math.min(m - 25, pt);
2378
2398
  });
2379
- }, [e]), p = k(() => t === pi, [t]), v = k(() => t === pt, [t]), w = k(() => {
2380
- var _;
2381
- return (_ = c.get(a)) == null ? void 0 : _.page.getViewport({ scale: 1, rotation: s });
2399
+ }, [e]), p = k(() => t === pi, [t]), v = k(() => t === pt, [t]), _ = k(() => {
2400
+ var g;
2401
+ return (g = c.get(a)) == null ? void 0 : g.page.getViewport({ scale: 1, rotation: s });
2382
2402
  }, [c, a, s]), C = L(
2383
- (_) => {
2384
- const m = ((w == null ? void 0 : w.width) || 0) + 2 * Dt, P = ((w == null ? void 0 : w.height) || 0) + 2 * Dt, I = (o == null ? void 0 : o.clientWidth) || 0, d = (o == null ? void 0 : o.clientHeight) || 0, T = Jr(_, I, d, m, P);
2403
+ (g) => {
2404
+ const m = ((_ == null ? void 0 : _.width) || 0) + 2 * At, P = ((_ == null ? void 0 : _.height) || 0) + 2 * At, I = (o == null ? void 0 : o.clientWidth) || 0, d = (o == null ? void 0 : o.clientHeight) || 0, T = Jr(g, I, d, m, P);
2385
2405
  e(T);
2386
2406
  },
2387
- [e, w]
2388
- ), g = L(
2389
- (_) => {
2390
- typeof _ == "number" ? e(_) : C(_);
2407
+ [e, _]
2408
+ ), w = L(
2409
+ (g) => {
2410
+ typeof g == "number" ? e(g) : C(g);
2391
2411
  },
2392
2412
  [e, C]
2393
2413
  );
2394
- return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ D("div", { className: Le["rp-zoom-wrapper"], children: [
2395
- /* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomOutTooltip, children: /* @__PURE__ */ i(
2396
- te,
2414
+ return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ A("div", { className: Le["rp-zoom-wrapper"], children: [
2415
+ /* @__PURE__ */ i(q, { content: u == null ? void 0 : u.zoomOutTooltip, children: /* @__PURE__ */ i(
2416
+ ee,
2397
2417
  {
2398
2418
  disabled: p,
2399
2419
  onClick: f,
@@ -2402,39 +2422,39 @@ const Pe = {
2402
2422
  }
2403
2423
  ) }),
2404
2424
  !l && /* @__PURE__ */ i(
2405
- an,
2425
+ sn,
2406
2426
  {
2407
2427
  container: n,
2408
- triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomSelectTooltip, children: /* @__PURE__ */ D(
2409
- te,
2428
+ triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(q, { content: u == null ? void 0 : u.zoomSelectTooltip, children: /* @__PURE__ */ A(
2429
+ ee,
2410
2430
  {
2411
2431
  className: Le["rp-current-zoom-wrapper"],
2412
2432
  "aria-label": u == null ? void 0 : u.zoomSelectTooltip,
2413
2433
  children: [
2414
2434
  /* @__PURE__ */ i("span", { className: Le["rp-current-zoom-text"], children: t }),
2415
2435
  /* @__PURE__ */ i("span", { className: Le["rp-current-zoom-text"], children: "%" }),
2416
- /* @__PURE__ */ i(We, { className: Le["rp-current-zoom-icon"] })
2436
+ /* @__PURE__ */ i(ke, { className: Le["rp-current-zoom-icon"] })
2417
2437
  ]
2418
2438
  }
2419
2439
  ) }) }),
2420
2440
  style: { minWidth: "200px" },
2421
2441
  align: "center",
2422
- children: /* @__PURE__ */ D("div", { className: Le["rp-zoom-dropdown-content"], children: [
2423
- /* @__PURE__ */ D(Ze, { children: [
2424
- /* @__PURE__ */ i(we, { onClick: () => g(rt.ACTUAL), children: u == null ? void 0 : u.zoomActualSize }),
2425
- /* @__PURE__ */ i(we, { onClick: () => g(rt.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
2426
- /* @__PURE__ */ i(we, { onClick: () => g(rt.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
2442
+ children: /* @__PURE__ */ A("div", { className: Le["rp-zoom-dropdown-content"], children: [
2443
+ /* @__PURE__ */ A(qe, { children: [
2444
+ /* @__PURE__ */ i(we, { onClick: () => w(rt.ACTUAL), children: u == null ? void 0 : u.zoomActualSize }),
2445
+ /* @__PURE__ */ i(we, { onClick: () => w(rt.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
2446
+ /* @__PURE__ */ i(we, { onClick: () => w(rt.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
2427
2447
  ] }),
2428
- /* @__PURE__ */ i(Tt, {}),
2429
- /* @__PURE__ */ i(Ze, { children: hi.map((_) => /* @__PURE__ */ D(we, { onClick: () => g(_), children: [
2430
- _,
2448
+ /* @__PURE__ */ i(Pt, {}),
2449
+ /* @__PURE__ */ i(qe, { children: hi.map((g) => /* @__PURE__ */ A(we, { onClick: () => w(g), children: [
2450
+ g,
2431
2451
  " %"
2432
- ] }, _)) })
2452
+ ] }, g)) })
2433
2453
  ] })
2434
2454
  }
2435
2455
  ),
2436
- /* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomInTooltip, children: /* @__PURE__ */ i(
2437
- te,
2456
+ /* @__PURE__ */ i(q, { content: u == null ? void 0 : u.zoomInTooltip, children: /* @__PURE__ */ i(
2457
+ ee,
2438
2458
  {
2439
2459
  disabled: v,
2440
2460
  onClick: h,
@@ -2453,11 +2473,11 @@ const Pe = {
2453
2473
  "rp-search-tool-input-clear": "_rp-search-tool-input-clear_jvchu_43",
2454
2474
  "rp-search-input": "_rp-search-input_jvchu_57",
2455
2475
  "rp-search-icon-info": "_rp-search-icon-info_jvchu_62"
2456
- }, Xt = () => {
2457
- const { searchIcon: t } = ue();
2476
+ }, Yt = () => {
2477
+ const { searchIcon: t } = pe();
2458
2478
  return t || /* @__PURE__ */ i(Yr, {});
2459
2479
  }, vi = () => {
2460
- const { container: t } = Ie(), [e, n] = H(!1), { pdf: o } = Y(), [r, a] = H(null), {
2480
+ const { container: t } = Pe(), [e, n] = H(!1), { pdf: o } = Y(), [r, a] = H(null), {
2461
2481
  searchOptions: s,
2462
2482
  setSearchOptions: c,
2463
2483
  loading: l,
@@ -2466,100 +2486,100 @@ const Pe = {
2466
2486
  currentMatchPosition: f,
2467
2487
  nextMatch: p,
2468
2488
  prevMatch: v,
2469
- search: w
2470
- } = gn(), { searchTool: C = !0 } = ge(), [g, _] = H(w), { localeMessages: m } = le(), P = L(() => {
2489
+ search: _
2490
+ } = vn(), { searchTool: C = !0 } = ve(), [w, g] = H(_), { localeMessages: m } = de(), P = L(() => {
2471
2491
  n(!0);
2472
2492
  }, []), I = L(() => {
2473
- u(""), _(""), n(!1);
2474
- }, [u]), d = (R) => {
2475
- const N = R.key === "Enter", $ = R.key === " ";
2476
- (N || $) && I();
2493
+ u(""), g(""), n(!1);
2494
+ }, [u]), d = (y) => {
2495
+ const E = y.key === "Enter", W = y.key === " ";
2496
+ (E || W) && I();
2477
2497
  }, T = L(
2478
- (R) => {
2479
- R.key === "Escape" && e && I();
2498
+ (y) => {
2499
+ y.key === "Escape" && e && I();
2480
2500
  },
2481
2501
  [e]
2482
2502
  ), b = L(
2483
- (R) => {
2484
- R.shiftKey && R.key === "Enter" ? v() : R.key === "Enter" && w !== g ? u(g) : R.key === "Enter" && p();
2503
+ (y) => {
2504
+ y.shiftKey && y.key === "Enter" ? v() : y.key === "Enter" && _ !== w ? u(w) : y.key === "Enter" && p();
2485
2505
  },
2486
- [g, v, p, u, w]
2506
+ [w, v, p, u, _]
2487
2507
  );
2488
- O(() => (window.addEventListener("keydown", T), () => {
2508
+ z(() => (window.addEventListener("keydown", T), () => {
2489
2509
  window.removeEventListener("keydown", T);
2490
- }), [T]), O(() => {
2510
+ }), [T]), z(() => {
2491
2511
  r && r.focus();
2492
2512
  }, [r]);
2493
- const S = L((R) => {
2494
- _(R.target.value);
2495
- }, []), A = L(() => {
2496
- _(""), u("");
2497
- }, [u]), y = k(() => `${f} / ${h}`, [f, h]), { wholeWords: E, matchCase: x } = k(() => s, [s]), F = L(
2498
- (R) => {
2499
- c((N) => ({ ...N, matchCase: R }));
2513
+ const S = L((y) => {
2514
+ g(y.target.value);
2515
+ }, []), F = L(() => {
2516
+ g(""), u("");
2517
+ }, [u]), x = k(() => `${f} / ${h}`, [f, h]), { wholeWords: N, matchCase: R } = k(() => s, [s]), O = L(
2518
+ (y) => {
2519
+ c((E) => ({ ...E, matchCase: y }));
2500
2520
  },
2501
2521
  [c]
2502
- ), z = L(
2503
- (R) => {
2504
- c((N) => ({ ...N, wholeWords: R }));
2522
+ ), D = L(
2523
+ (y) => {
2524
+ c((E) => ({ ...E, wholeWords: y }));
2505
2525
  },
2506
2526
  [c]
2507
2527
  );
2508
- return O(() => {
2528
+ return z(() => {
2509
2529
  I();
2510
- }, [o, I]), C ? /* @__PURE__ */ i(ke, { children: /* @__PURE__ */ i(
2530
+ }, [o, I]), C ? /* @__PURE__ */ i(Fe, { children: /* @__PURE__ */ i(
2511
2531
  eo,
2512
2532
  {
2513
2533
  open: e,
2514
2534
  container: t,
2515
- triggerComponent: /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(te, { onClick: P, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(Xt, {}) }) }),
2516
- children: /* @__PURE__ */ D("div", { className: ne["rp-search-tool-content"], children: [
2517
- /* @__PURE__ */ D("div", { className: ne["rp-search-tool-input-wrapper"], children: [
2518
- /* @__PURE__ */ D("div", { className: ne["rp-search-tool-input"], children: [
2519
- /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ i(
2520
- Qt,
2535
+ triggerComponent: /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(ee, { onClick: P, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(Yt, {}) }) }),
2536
+ children: /* @__PURE__ */ A("div", { className: ne["rp-search-tool-content"], children: [
2537
+ /* @__PURE__ */ A("div", { className: ne["rp-search-tool-input-wrapper"], children: [
2538
+ /* @__PURE__ */ A("div", { className: ne["rp-search-tool-input"], children: [
2539
+ /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ i(
2540
+ tn,
2521
2541
  {
2522
- value: g,
2542
+ value: w,
2523
2543
  onKeyDown: b,
2524
2544
  onChange: S,
2525
- icon: /* @__PURE__ */ i(Xt, {}),
2545
+ icon: /* @__PURE__ */ i(Yt, {}),
2526
2546
  placeholder: m == null ? void 0 : m.searchInputPlaceholder,
2527
2547
  className: ne["rp-search-input"],
2528
2548
  ref: a,
2529
- children: !!g && /* @__PURE__ */ i("span", { className: ne["rp-search-tool-input-clear"], onClick: A, children: /* @__PURE__ */ i(Qr, {}) })
2549
+ children: !!w && /* @__PURE__ */ i("span", { className: ne["rp-search-tool-input-clear"], onClick: F, children: /* @__PURE__ */ i(Qr, {}) })
2530
2550
  }
2531
2551
  ) }),
2532
- l ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Me, {}) }) : /* @__PURE__ */ i("span", { children: y })
2552
+ l ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(We, {}) }) : /* @__PURE__ */ i("span", { children: x })
2533
2553
  ] }),
2534
- /* @__PURE__ */ D("div", { className: ne["rp-search-tool-input-checkboxes"], children: [
2535
- /* @__PURE__ */ i(zt, { name: "matchCase", value: x, onChange: F, children: m == null ? void 0 : m.searchMatchCaseLabel }),
2536
- /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(At, {}) }) }),
2537
- /* @__PURE__ */ i(zt, { name: "wholeWord", value: E, onChange: z, children: m == null ? void 0 : m.searchWholeWordsLabel }),
2538
- /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(At, {}) }) })
2554
+ /* @__PURE__ */ A("div", { className: ne["rp-search-tool-input-checkboxes"], children: [
2555
+ /* @__PURE__ */ i(Ft, { name: "matchCase", value: R, onChange: O, children: m == null ? void 0 : m.searchMatchCaseLabel }),
2556
+ /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(kt, {}) }) }),
2557
+ /* @__PURE__ */ i(Ft, { name: "wholeWord", value: N, onChange: D, children: m == null ? void 0 : m.searchWholeWordsLabel }),
2558
+ /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(kt, {}) }) })
2539
2559
  ] })
2540
2560
  ] }),
2541
- /* @__PURE__ */ D("div", { className: ne["rp-search-tool-controls"], children: [
2542
- /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchPrevTooltip, children: /* @__PURE__ */ i(te, { onClick: v, "aria-label": m == null ? void 0 : m.searchPrevTooltip, children: /* @__PURE__ */ i(
2543
- We,
2561
+ /* @__PURE__ */ A("div", { className: ne["rp-search-tool-controls"], children: [
2562
+ /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchPrevTooltip, children: /* @__PURE__ */ i(ee, { onClick: v, "aria-label": m == null ? void 0 : m.searchPrevTooltip, children: /* @__PURE__ */ i(
2563
+ ke,
2544
2564
  {
2545
2565
  className: ne["rp-search-tool-input-icon"],
2546
2566
  "aria-disabled": !h
2547
2567
  }
2548
2568
  ) }) }),
2549
- /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchNextTooltip, children: /* @__PURE__ */ i(te, { onClick: p, "aria-label": m == null ? void 0 : m.searchNextTooltip, children: /* @__PURE__ */ i(
2550
- We,
2569
+ /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchNextTooltip, children: /* @__PURE__ */ i(ee, { onClick: p, "aria-label": m == null ? void 0 : m.searchNextTooltip, children: /* @__PURE__ */ i(
2570
+ ke,
2551
2571
  {
2552
2572
  style: { transform: "rotate(180deg" },
2553
2573
  className: ne["rp-search-tool-input-icon"],
2554
2574
  "aria-disabled": !h
2555
2575
  }
2556
2576
  ) }) }),
2557
- /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchCloseButtonTooltip, children: /* @__PURE__ */ i(
2558
- te,
2577
+ /* @__PURE__ */ i(q, { content: m == null ? void 0 : m.searchCloseButtonTooltip, children: /* @__PURE__ */ i(
2578
+ ee,
2559
2579
  {
2560
2580
  onKeyDown: d,
2561
2581
  "aria-label": m == null ? void 0 : m.searchCloseButtonTooltip,
2562
- children: /* @__PURE__ */ i(sn, { onClick: I, className: ne["rp-search-tool-input-icon"] })
2582
+ children: /* @__PURE__ */ i(cn, { onClick: I, className: ne["rp-search-tool-input-icon"] })
2563
2583
  }
2564
2584
  ) })
2565
2585
  ] })
@@ -2575,9 +2595,9 @@ const Pe = {
2575
2595
  "rp-loading-cancel-button": "_rp-loading-cancel-button_16o91_52",
2576
2596
  loading: _i
2577
2597
  }, wi = ({ percentage: t }) => {
2578
- const { cancel: e } = nt(), { localeMessages: n } = le();
2579
- return t < 1 ? null : /* @__PURE__ */ i("div", { className: re(Ne["rp-loading-overlay"]), children: /* @__PURE__ */ D("div", { className: re(Ne["rp-loading-modal"]), children: [
2580
- /* @__PURE__ */ D("div", { className: re(Ne["rp-loading-title"]), children: [
2598
+ const { cancel: e } = tt(), { localeMessages: n } = de();
2599
+ return t < 1 ? null : /* @__PURE__ */ i("div", { className: re(Ne["rp-loading-overlay"]), children: /* @__PURE__ */ A("div", { className: re(Ne["rp-loading-modal"]), children: [
2600
+ /* @__PURE__ */ A("div", { className: re(Ne["rp-loading-title"]), children: [
2581
2601
  n == null ? void 0 : n.printLoadingMessage,
2582
2602
  "..."
2583
2603
  ] }),
@@ -2590,16 +2610,16 @@ const Pe = {
2590
2610
  ) }),
2591
2611
  /* @__PURE__ */ i("button", { className: re(Ne["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
2592
2612
  ] }) });
2593
- }, bi = Xe((t, e) => {
2594
- const { showPrintProgress: n } = ge(), { progress: o } = nt(), { isSmallScreen: r } = ye(), { percentage: a } = o || {}, s = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2595
- return /* @__PURE__ */ D("div", { children: [
2596
- /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: ze["rp-toolbar-content"], children: /* @__PURE__ */ D("div", { className: ze["rp-toolbar-wrapper"], style: s(), children: [
2597
- /* @__PURE__ */ D("div", { "data-rp": "topBarLeft", className: ze["rp-toolbar-start"], children: [
2613
+ }, bi = Ke((t, e) => {
2614
+ const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Se(), { percentage: a } = o || {}, s = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
2615
+ return /* @__PURE__ */ A("div", { children: [
2616
+ /* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: De["rp-toolbar-content"], children: /* @__PURE__ */ A("div", { className: De["rp-toolbar-wrapper"], style: s(), children: [
2617
+ /* @__PURE__ */ A("div", { "data-rp": "topBarLeft", className: De["rp-toolbar-start"], children: [
2598
2618
  /* @__PURE__ */ i(vi, {}),
2599
2619
  /* @__PURE__ */ i(Ao, {})
2600
2620
  ] }),
2601
- /* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: ze["rp-toolbar-middle"], children: /* @__PURE__ */ i(gi, {}) }),
2602
- /* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: ze["rp-toolbar-end"], children: /* @__PURE__ */ i(di, {}) })
2621
+ /* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: De["rp-toolbar-middle"], children: /* @__PURE__ */ i(gi, {}) }),
2622
+ /* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: De["rp-toolbar-end"], children: /* @__PURE__ */ i(di, {}) })
2603
2623
  ] }) }),
2604
2624
  n && a ? /* @__PURE__ */ i(wi, { percentage: a }) : null
2605
2625
  ] });
@@ -2608,27 +2628,27 @@ const Pe = {
2608
2628
  "rp-sidebar-content": "_rp-sidebar-content_4wlw3_1",
2609
2629
  "rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_4wlw3_16",
2610
2630
  "rp-thumbnail-dragging": "_rp-thumbnail-dragging_4wlw3_21"
2611
- }, Ae = {
2631
+ }, ze = {
2612
2632
  "rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
2613
2633
  "rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
2614
2634
  "rp-thumbnail": "_rp-thumbnail_3fenb_1",
2615
2635
  "rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
2616
2636
  "rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
2617
2637
  }, Ci = (t) => {
2618
- const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = se(), s = k(() => o ? Ae["rp-thumbnail-active"] : "", [o]), c = k(() => ({
2638
+ const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = se(), s = k(() => o ? ze["rp-thumbnail-active"] : "", [o]), c = k(() => ({
2619
2639
  width: Math.round(r.width),
2620
2640
  height: Math.round(r.height)
2621
2641
  }), [r]), l = L(() => {
2622
2642
  n && a(n);
2623
2643
  }, [a, n]);
2624
- return /* @__PURE__ */ D(
2644
+ return /* @__PURE__ */ A(
2625
2645
  "div",
2626
2646
  {
2627
2647
  onClick: l,
2628
2648
  id: `page-${n}`,
2629
- className: Ae["rp-thumbnail-wrapper"],
2649
+ className: ze["rp-thumbnail-wrapper"],
2630
2650
  children: [
2631
- /* @__PURE__ */ i("div", { className: re(s, Ae["rp-thumbnail"]), children: e ? /* @__PURE__ */ i(
2651
+ /* @__PURE__ */ i("div", { className: re(s, ze["rp-thumbnail"]), children: e ? /* @__PURE__ */ i(
2632
2652
  "img",
2633
2653
  {
2634
2654
  src: e,
@@ -2639,63 +2659,63 @@ const Pe = {
2639
2659
  ) : /* @__PURE__ */ i(
2640
2660
  "div",
2641
2661
  {
2642
- className: Ae["rp-thumbnail-loader"],
2662
+ className: ze["rp-thumbnail-loader"],
2643
2663
  style: {
2644
2664
  width: `${c.width}px`,
2645
2665
  height: `${c.height}px`
2646
2666
  },
2647
- children: /* @__PURE__ */ i(Me, {})
2667
+ children: /* @__PURE__ */ i(We, {})
2648
2668
  }
2649
2669
  ) }),
2650
- /* @__PURE__ */ i("div", { className: Ae["rp-thumbnail-text"], children: n })
2670
+ /* @__PURE__ */ i("div", { className: ze["rp-thumbnail-text"], children: n })
2651
2671
  ]
2652
2672
  }
2653
2673
  );
2654
- }, Jt = {
2674
+ }, Qt = {
2655
2675
  "rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
2656
2676
  "rp-thumbnails": "_rp-thumbnails_16vqr_1"
2657
2677
  }, Ti = 16, Pi = (t, e) => {
2658
2678
  const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
2659
2679
  t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Ti);
2660
- }, Si = Xe((t, e) => {
2661
- const { show: n } = t, { focusedPage: o, totalPages: r } = se(), { thumbnailPages: a, addPage: s, thumbnailLength: c, addToPage: l } = mn(), u = W(null), h = W(1);
2662
- Yt(e, () => u.current);
2680
+ }, Si = Ke((t, e) => {
2681
+ const { show: n } = t, { focusedPage: o, totalPages: r } = se(), { thumbnailPages: a, addPage: s, thumbnailLength: c, addToPage: l } = fn(), u = M(null), h = M(1);
2682
+ en(e, () => u.current);
2663
2683
  const f = k(() => Object.values(a), [a]), p = L(() => {
2664
2684
  const v = c + 1;
2665
2685
  v <= r && s(v);
2666
2686
  }, [s, r, c]);
2667
- return O(() => {
2687
+ return z(() => {
2668
2688
  o > c ? l(o) : n && h.current !== o && (Pi(u.current, o), h.current = o);
2669
- }, [o, c, l, n, f]), cr(u.current, p), /* @__PURE__ */ i("div", { ref: u, className: Jt["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: Jt["rp-thumbnails"], children: n ? f.map((v, w) => {
2670
- var C, g;
2689
+ }, [o, c, l, n, f]), lr(u.current, p), /* @__PURE__ */ i("div", { ref: u, className: Qt["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: Qt["rp-thumbnails"], children: n ? f.map((v, _) => {
2690
+ var C, w;
2671
2691
  return /* @__PURE__ */ i(
2672
2692
  Ci,
2673
2693
  {
2674
2694
  isFocused: o === ((C = v.page) == null ? void 0 : C.pageNumber),
2675
- pageNumber: (g = v.page) == null ? void 0 : g.pageNumber,
2695
+ pageNumber: (w = v.page) == null ? void 0 : w.pageNumber,
2676
2696
  thumbnailSrc: v.thumbnailSrc,
2677
2697
  loading: v.loading,
2678
2698
  viewport: v.viewport
2679
2699
  },
2680
- w
2700
+ _
2681
2701
  );
2682
2702
  }) : null }) });
2683
2703
  }), Ii = () => {
2684
- const { thumbnailIcon: t } = ue();
2685
- return t || /* @__PURE__ */ i(sr, {});
2704
+ const { thumbnailIcon: t } = pe();
2705
+ return t || /* @__PURE__ */ i(cr, {});
2686
2706
  }, yi = () => {
2687
- const { active: t, setActive: e } = mn(), [n, o] = H(200), r = W(null), { thumbnailTool: a } = ge(), { localeMessages: s } = le(), c = L(() => {
2707
+ const { active: t, setActive: e } = fn(), [n, o] = H(200), r = M(null), { thumbnailTool: a } = ve(), { localeMessages: s } = de(), c = L(() => {
2688
2708
  e((u) => !u);
2689
- }, []), l = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: c, active: t }) : a ? /* @__PURE__ */ i(Z, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
2690
- te,
2709
+ }, []), l = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: c, active: t }) : a ? /* @__PURE__ */ i(q, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
2710
+ ee,
2691
2711
  {
2692
2712
  onClick: c,
2693
2713
  active: t,
2694
2714
  "aria-label": s == null ? void 0 : s.thumbnailTooltip,
2695
2715
  children: /* @__PURE__ */ i(Ii, {})
2696
2716
  }
2697
- ) }) : null, [a, t, c]);
2698
- return /* @__PURE__ */ D(
2717
+ ) }) : null, [a, t, c, s]);
2718
+ return /* @__PURE__ */ A(
2699
2719
  "div",
2700
2720
  {
2701
2721
  style: { "--rp-thumbnail-width": `${n}px` },
@@ -2703,39 +2723,39 @@ const Pe = {
2703
2723
  "data-rp": "sidebar",
2704
2724
  children: [
2705
2725
  /* @__PURE__ */ i("div", { className: ht["rp-sidebar-content"], children: l }),
2706
- /* @__PURE__ */ D("div", { "data-rp": "thumbnailSidebar", hidden: !t, className: ht["rp-thumbnails-wrapper"], children: [
2726
+ /* @__PURE__ */ A("div", { "data-rp": "thumbnailSidebar", hidden: !t, className: ht["rp-thumbnails-wrapper"], children: [
2707
2727
  /* @__PURE__ */ i(Si, { show: t, ref: r }),
2708
- /* @__PURE__ */ i(lr, { onWidthChange: o, thumbnailRef: r })
2728
+ /* @__PURE__ */ i(ur, { onWidthChange: o, thumbnailRef: r })
2709
2729
  ] })
2710
2730
  ]
2711
2731
  }
2712
2732
  );
2713
- }, cs = Xe((t, e) => {
2714
- const { children: n, slots: o, icons: r, style: a, className: s, mobileWidth: c, onLoaded: l, cleanupOnLoaded: u } = t, [h, f] = H(null), { setContainer: p, setContentRef: v } = Ie(), { loading: w } = Y();
2715
- return O(() => (l && l(), () => {
2733
+ }, ss = Ke((t, e) => {
2734
+ const { children: n, slots: o, icons: r, style: a, className: s, mobileWidth: c, onLoaded: l, cleanupOnLoaded: u } = t, [h, f] = H(null), { setContainer: p, setContentRef: v } = Pe(), { loading: _ } = Y();
2735
+ return z(() => (l && l(), () => {
2716
2736
  u && u();
2717
- }), [l, u]), /* @__PURE__ */ i("div", { ref: e, className: re(Ce["rp-theme-variables"], Ce["rp-container"]), children: /* @__PURE__ */ i(fr, { mobileWidth: c, children: /* @__PURE__ */ i(ur, { slots: o, children: /* @__PURE__ */ i(dr, { icons: r, children: /* @__PURE__ */ D(
2718
- pr,
2737
+ }), [l, u]), /* @__PURE__ */ i("div", { ref: e, className: re(be["rp-theme-variables"], be["rp-container"]), children: /* @__PURE__ */ i(gr, { mobileWidth: c, children: /* @__PURE__ */ i(dr, { slots: o, children: /* @__PURE__ */ i(pr, { icons: r, children: /* @__PURE__ */ A(
2738
+ hr,
2719
2739
  {
2720
2740
  getContainerRef: p,
2721
2741
  toolbarRef: h,
2722
2742
  style: a,
2723
2743
  className: s,
2724
2744
  children: [
2725
- /* @__PURE__ */ D(hr, { children: [
2726
- /* @__PURE__ */ D("div", { className: Ce["rp-layout"], children: [
2745
+ /* @__PURE__ */ A(mr, { children: [
2746
+ /* @__PURE__ */ A("div", { className: be["rp-layout"], children: [
2727
2747
  /* @__PURE__ */ i(bi, { ref: f }),
2728
- /* @__PURE__ */ D("div", { className: Ce["rp-content"], children: [
2729
- /* @__PURE__ */ i("div", { className: Ce["rp-sidebar"], children: /* @__PURE__ */ i(yi, {}) }),
2730
- /* @__PURE__ */ i("div", { ref: v, className: Ce["rp-pages"], children: n })
2748
+ /* @__PURE__ */ A("div", { className: be["rp-content"], children: [
2749
+ /* @__PURE__ */ i("div", { className: be["rp-sidebar"], children: /* @__PURE__ */ i(yi, {}) }),
2750
+ /* @__PURE__ */ i("div", { ref: v, className: be["rp-pages"], children: n })
2731
2751
  ] })
2732
2752
  ] }),
2733
- /* @__PURE__ */ i(mr, {})
2753
+ /* @__PURE__ */ i(fr, {})
2734
2754
  ] }),
2735
- w ? /* @__PURE__ */ i(
2755
+ _ ? /* @__PURE__ */ i(
2736
2756
  "div",
2737
2757
  {
2738
- className: Ce["rp-loader"],
2758
+ className: be["rp-loader"],
2739
2759
  style: {
2740
2760
  position: "absolute",
2741
2761
  top: 0,
@@ -2755,7 +2775,7 @@ const Pe = {
2755
2775
  height: "100%",
2756
2776
  width: "100%"
2757
2777
  },
2758
- children: /* @__PURE__ */ i(Me, {})
2778
+ children: /* @__PURE__ */ i(We, {})
2759
2779
  }
2760
2780
  )
2761
2781
  }
@@ -2770,39 +2790,39 @@ export {
2770
2790
  io as C,
2771
2791
  No as D,
2772
2792
  Si as E,
2773
- kn as F,
2793
+ Wn as F,
2774
2794
  yi as G,
2775
2795
  wi as L,
2776
2796
  li as M,
2777
2797
  ui as O,
2778
- ts as P,
2779
- is as R,
2780
- os as S,
2781
- rs as T,
2798
+ es as P,
2799
+ os as R,
2800
+ rs as S,
2801
+ ns as T,
2782
2802
  gi as Z,
2783
- ns as a,
2784
- cs as b,
2785
- zn as c,
2786
- nt as d,
2787
- gn as e,
2788
- un as f,
2803
+ ts as a,
2804
+ ss as b,
2805
+ An as c,
2806
+ tt as d,
2807
+ vn as e,
2808
+ dn as f,
2789
2809
  to as g,
2790
- dn as h,
2810
+ pn as h,
2791
2811
  no as i,
2792
- pn as j,
2812
+ hn as j,
2793
2813
  ro as k,
2794
- hn as l,
2795
- mn as m,
2814
+ mn as l,
2815
+ fn as m,
2796
2816
  oo as n,
2797
- fn as o,
2817
+ gn as o,
2798
2818
  ao as p,
2799
- Pt as q,
2819
+ St as q,
2800
2820
  xo as r,
2801
2821
  Eo as s,
2802
2822
  Ao as t,
2803
2823
  se as u,
2804
2824
  Yo as v,
2805
- Hn as w,
2825
+ $n as w,
2806
2826
  di as x,
2807
2827
  vi as y,
2808
2828
  bi as z