@pdf-viewer/react 1.9.1 → 1.9.2-rc.1

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