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