@pdf-viewer/react 1.8.3-rc.0 → 1.8.4-rc.0

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