@react-pdf-kit/viewer 2.3.0-beta.4 → 2.4.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/assets/style.css +1 -1
  2. package/dist/assets/style.js +5 -5
  3. package/dist/components/RPController.js +1 -1
  4. package/dist/components/RPDropFileZone.js +7 -6
  5. package/dist/components/RPPages.js +375 -373
  6. package/dist/components/RPProvider.js +1 -1
  7. package/dist/components/layout/RPDefaultLayout.js +3 -2
  8. package/dist/components/layout/RPLayout.js +3 -2
  9. package/dist/components/layout/WrapperLayout.js +3 -2
  10. package/dist/components/layout/sidebar/RPSidebar.js +3 -2
  11. package/dist/components/layout/sidebar/Thumbnail.js +3 -2
  12. package/dist/components/layout/sidebar/Thumbnails.js +3 -2
  13. package/dist/components/layout/toolbar/DocumentDialog.js +5 -4
  14. package/dist/components/layout/toolbar/FileDownloadTool.js +3 -2
  15. package/dist/components/layout/toolbar/FileUploadTool.js +3 -2
  16. package/dist/components/layout/toolbar/MostPageTool.js +3 -2
  17. package/dist/components/layout/toolbar/OtherTool.js +3 -2
  18. package/dist/components/layout/toolbar/Paginate.js +3 -2
  19. package/dist/components/layout/toolbar/PrintTool.js +3 -2
  20. package/dist/components/layout/toolbar/RPMoreOptions.js +3 -2
  21. package/dist/components/layout/toolbar/RPToolbar.js +3 -2
  22. package/dist/components/layout/toolbar/RPToolbarEnd.js +3 -2
  23. package/dist/components/layout/toolbar/RotateTool.js +3 -2
  24. package/dist/components/layout/toolbar/SearchResultNavigator.js +3 -2
  25. package/dist/components/layout/toolbar/SearchTool.js +3 -2
  26. package/dist/components/layout/toolbar/ThumbnailTool.js +3 -2
  27. package/dist/components/layout/toolbar/ToolbarCustom.js +3 -2
  28. package/dist/components/layout/toolbar/ToolbarDefault.js +3 -2
  29. package/dist/components/layout/toolbar/ToolbarLayout.js +3 -2
  30. package/dist/components/layout/toolbar/ZoomTool.js +3 -2
  31. package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +3 -2
  32. package/dist/components/layout/toolbar/tools/DualPageWithCoverTool.js +1 -1
  33. package/dist/components/layout/toolbar/tools/FileDownloadTool.js +3 -2
  34. package/dist/components/layout/toolbar/tools/FileUploadTool.js +3 -2
  35. package/dist/components/layout/toolbar/tools/FirstPageTool.js +1 -1
  36. package/dist/components/layout/toolbar/tools/InputPageTool.js +3 -2
  37. package/dist/components/layout/toolbar/tools/LastPageTool.js +1 -1
  38. package/dist/components/layout/toolbar/tools/NextPageTool.js +3 -2
  39. package/dist/components/layout/toolbar/tools/PreviousPageTool.js +3 -2
  40. package/dist/components/layout/toolbar/tools/PrintTool.js +3 -2
  41. package/dist/components/layout/toolbar/tools/RotateClockwiseTool.js +3 -2
  42. package/dist/components/layout/toolbar/tools/RotateCounterclockwiseTool.js +3 -2
  43. package/dist/components/layout/toolbar/tools/ThumbnailTool.js +3 -2
  44. package/dist/components/layout/toolbar/tools/ZoomInTool.js +3 -2
  45. package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +13 -12
  46. package/dist/components/layout/toolbar/tools/ZoomOutTool.js +3 -2
  47. package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +3 -2
  48. package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +3 -2
  49. package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +3 -2
  50. package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +3 -2
  51. package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +3 -2
  52. package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +3 -2
  53. package/dist/components/layout/toolbar/tools/more-options/RotateTool.js +3 -2
  54. package/dist/components/page/AnnotationLayer.js +3 -2
  55. package/dist/components/page/CanvasLayer.js +3 -2
  56. package/dist/components/page/CustomElement.js +1 -1
  57. package/dist/components/page/DualPage.js +1 -1
  58. package/dist/components/page/DualPageWithCover.js +1 -1
  59. package/dist/components/page/RPPage.js +1 -1
  60. package/dist/components/page/SinglePage.js +1 -1
  61. package/dist/components/page/TextHighlightLayer.js +1 -1
  62. package/dist/components/page/TextLayer.js +3 -2
  63. package/dist/components/ui/LoadingIndicator.js +7 -6
  64. package/dist/contexts/DimensionPagesContext.js +5 -4
  65. package/dist/contexts/DropFileZoneContext.js +4 -3
  66. package/dist/contexts/FileInputContext.js +5 -4
  67. package/dist/contexts/HighlightContext.js +5 -4
  68. package/dist/contexts/PagesRotateContext.js +5 -4
  69. package/dist/contexts/PaginationContext.js +5 -4
  70. package/dist/contexts/PrintContext.js +16 -15
  71. package/dist/contexts/RPDocumentContext.js +13 -12
  72. package/dist/contexts/RenderQueueProvider.js +5 -4
  73. package/dist/contexts/RotationContext.js +8 -7
  74. package/dist/contexts/SearchContext.js +5 -4
  75. package/dist/contexts/ThumbnailsContext.js +4 -3
  76. package/dist/contexts/ZoomContext.js +5 -4
  77. package/dist/types/utils/const.d.ts +1 -0
  78. package/dist/types/utils/types.d.ts +2 -1
  79. package/dist/utils/const.js +2 -1
  80. package/dist/utils/hooks/useFileDownload.js +5 -4
  81. package/dist/utils/hooks/useLicense.js +1 -1
  82. package/dist/utils/hooks/useLoadPdf.js +67 -60
  83. package/dist/utils/hooks/usePaginate.js +3 -2
  84. package/dist/utils/hooks/usePinch.js +10 -9
  85. package/dist/utils/hooks/usePresentPage.js +3 -2
  86. package/dist/utils/hooks/usePrint.js +3 -2
  87. package/dist/utils/hooks/useRotate.js +3 -2
  88. package/dist/utils/hooks/useScrollToPage.js +3 -2
  89. package/dist/utils/hooks/useSearch.js +15 -14
  90. package/dist/utils/hooks/useThumbnail.js +17 -16
  91. package/dist/utils/hooks/useVirtualReactWindow.js +3 -2
  92. package/dist/utils/types.js +3 -3
  93. package/package.json +1 -1
@@ -1,29 +1,29 @@
1
- import { jsx as L, jsxs as Se, Fragment as lt } from "react/jsx-runtime";
2
- import { createElement as de, PureComponent as ct, Component as ut, memo as dt, useRef as K, useState as ft, useMemo as Ie, useCallback as se, useEffect as ee } from "react";
1
+ import { jsx as w, jsxs as Se, Fragment as ct } from "react/jsx-runtime";
2
+ import { createElement as ue, PureComponent as dt, Component as ut, memo as ft, useRef as K, useState as mt, useMemo as Ie, useCallback as se, useEffect as ee } from "react";
3
3
  import { RPPage as Te } from "./page/RPPage.js";
4
- import { useVirtualReactWindow as mt } from "../utils/hooks/useVirtualReactWindow.js";
5
- import { useVirtualScrollContext as pt } from "../contexts/VirtualScrollContext.js";
6
- import { a as ht, u as gt } from "../PaginationContext-15f88187.js";
7
- import { useDocumentContext as vt } from "../contexts/RPDocumentContext.js";
8
- import { useViewModeContext as _t } from "../contexts/ViewModeContext.js";
9
- import { useScrollModeContext as wt } from "../contexts/ScrollModeContext.js";
10
- import { SelectionMode as Ct, ViewMode as xe, ScrollMode as Re, ErrorType as St } from "../utils/types.js";
4
+ import { useVirtualReactWindow as pt } from "../utils/hooks/useVirtualReactWindow.js";
5
+ import { useVirtualScrollContext as ht } from "../contexts/VirtualScrollContext.js";
6
+ import { a as gt, u as vt } from "../PaginationContext-15f88187.js";
7
+ import { useDocumentContext as _t } from "../contexts/RPDocumentContext.js";
8
+ import { useViewModeContext as wt } from "../contexts/ViewModeContext.js";
9
+ import { useScrollModeContext as Ct } from "../contexts/ScrollModeContext.js";
10
+ import { SelectionMode as St, ViewMode as Re, ScrollMode as xe, ErrorType as ye } from "../utils/types.js";
11
11
  import { useFullScreenContext as It } from "../contexts/FullScreenContext.js";
12
- import { c as ue } from "../clsx-0c6e471a.js";
12
+ import { c as de } from "../clsx-0c6e471a.js";
13
13
  import { DualPage as Tt } from "./page/DualPage.js";
14
- import { DualPageWithCover as xt } from "./page/DualPageWithCover.js";
15
- import { SinglePage as Rt } from "./page/SinglePage.js";
14
+ import { DualPageWithCover as Rt } from "./page/DualPageWithCover.js";
15
+ import { SinglePage as xt } from "./page/SinglePage.js";
16
16
  import { useMousePressed as yt } from "../utils/hooks/useMousePressed.js";
17
17
  import { useSelectionModeContext as bt } from "../contexts/SelectionModeContext.js";
18
- import { useGrabScroll as Lt } from "../utils/hooks/useGrabScroll.js";
19
- import { usePinch as zt } from "../utils/hooks/usePinch.js";
18
+ import { useGrabScroll as zt } from "../utils/hooks/useGrabScroll.js";
19
+ import { usePinch as Lt } from "../utils/hooks/usePinch.js";
20
20
  import { useInitialStateContext as Mt } from "../contexts/InitialStateContext.js";
21
21
  import { useLayoutContainer as Et } from "../contexts/LayoutContainerContext.js";
22
22
  import { useDebounce as Ot } from "../utils/hooks/useDebounce.js";
23
- import { useLoaderContext as Wt } from "../contexts/LoaderContext.js";
24
- import Pt from "./ui/PasswordModal.js";
25
- import { usePresentPage as At } from "../utils/hooks/usePresentPage.js";
26
- import { getPageFromPosition as Nt } from "../utils/calculatePage.js";
23
+ import { useLoaderContext as Pt } from "../contexts/LoaderContext.js";
24
+ import Nt from "./ui/PasswordModal.js";
25
+ import { usePresentPage as Wt } from "../utils/hooks/usePresentPage.js";
26
+ import { getPageFromPosition as At } from "../utils/calculatePage.js";
27
27
  import { useDocumentPasswordContext as Ft } from "../contexts/DocumentPasswordContext.js";
28
28
  import { LayoutContainer as Dt } from "./layout/LayoutContainer.js";
29
29
  import { LayoutWrapper as Ht } from "./layout/LayoutWrapper.js";
@@ -42,6 +42,7 @@ import "../contexts/RotationContext.js";
42
42
  import "../utils/hooks/useLoadPdf.js";
43
43
  import "../utils/getThumbnailViewport.js";
44
44
  import "../contexts/ConfigContext.js";
45
+ import "../utils/const.js";
45
46
  import "../utils/hooks/usePdfProperties.js";
46
47
  import "../utils/convertPdfDate.js";
47
48
  import "../utils/formatFileSize.js";
@@ -75,7 +76,6 @@ import "./page/TextHighlightLayer.js";
75
76
  import "../contexts/HighlightContext.js";
76
77
  import "../utils/hooks/useHighlight.js";
77
78
  import "./page/searchHighlight.js";
78
- import "../utils/const.js";
79
79
  import "./page/CustomElement.js";
80
80
  import "../contexts/ElementPageContext.js";
81
81
  import "../contexts/LicenseContext.js";
@@ -90,47 +90,49 @@ import "../RPLayout.module-b4b23e29.js";
90
90
  import "../contexts/ThemeContext.js";
91
91
  import "../contexts/DarkModeContext.js";
92
92
  import "../utils/hooks/useDarkMode.js";
93
- const k = {
94
- "rp-pages": "_rp-pages_1muxf_1",
95
- "rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_1muxf_6",
96
- "rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1muxf_11",
97
- "rp-not-supported-list": "_rp-not-supported-list_1muxf_15",
98
- "rp-pages-container": "_rp-pages-container_1muxf_23",
99
- "rp-viewer": "_rp-viewer_1muxf_65",
100
- "rp-cursor-grab": "_rp-cursor-grab_1muxf_70",
101
- "rp-cursor-grabbing": "_rp-cursor-grabbing_1muxf_78",
102
- "rp-loader": "_rp-loader_1muxf_86",
103
- "rp-not-supported": "_rp-not-supported_1muxf_15",
104
- "rp-not-supported-content": "_rp-not-supported-content_1muxf_102"
93
+ const F = {
94
+ "rp-pages": "_rp-pages_fn8tz_1",
95
+ "rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_fn8tz_6",
96
+ "rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_fn8tz_11",
97
+ "rp-not-supported-list": "_rp-not-supported-list_fn8tz_15",
98
+ "rp-pages-container": "_rp-pages-container_fn8tz_23",
99
+ "rp-viewer": "_rp-viewer_fn8tz_65",
100
+ "rp-cursor-grab": "_rp-cursor-grab_fn8tz_70",
101
+ "rp-cursor-grabbing": "_rp-cursor-grabbing_fn8tz_78",
102
+ "rp-loader": "_rp-loader_fn8tz_86",
103
+ "rp-not-supported": "_rp-not-supported_fn8tz_15",
104
+ "rp-not-supported-content": "_rp-not-supported-content_fn8tz_102",
105
+ "rp-load-error": "_rp-load-error_fn8tz_108",
106
+ "rp-load-error-message": "_rp-load-error-message_fn8tz_116"
105
107
  };
106
- function Me() {
107
- return Me = Object.assign ? Object.assign.bind() : function(n) {
108
+ function Ee() {
109
+ return Ee = Object.assign ? Object.assign.bind() : function(n) {
108
110
  for (var e = 1; e < arguments.length; e++) {
109
111
  var t = arguments[e];
110
112
  for (var r in t)
111
113
  ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
112
114
  }
113
115
  return n;
114
- }, Me.apply(null, arguments);
116
+ }, Ee.apply(null, arguments);
115
117
  }
116
- function Ne(n) {
118
+ function Fe(n) {
117
119
  if (n === void 0)
118
120
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
119
121
  return n;
120
122
  }
121
- function Ee(n, e) {
122
- return Ee = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
123
+ function Oe(n, e) {
124
+ return Oe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
123
125
  return t.__proto__ = r, t;
124
- }, Ee(n, e);
126
+ }, Oe(n, e);
125
127
  }
126
128
  function Gt(n, e) {
127
- n.prototype = Object.create(e.prototype), n.prototype.constructor = n, Ee(n, e);
129
+ n.prototype = Object.create(e.prototype), n.prototype.constructor = n, Oe(n, e);
128
130
  }
129
- var Fe = Number.isNaN || function(e) {
131
+ var De = Number.isNaN || function(e) {
130
132
  return typeof e == "number" && e !== e;
131
133
  };
132
134
  function $t(n, e) {
133
- return !!(n === e || Fe(n) && Fe(e));
135
+ return !!(n === e || De(n) && De(e));
134
136
  }
135
137
  function jt(n, e) {
136
138
  if (n.length !== e.length)
@@ -140,17 +142,17 @@ function jt(n, e) {
140
142
  return !1;
141
143
  return !0;
142
144
  }
143
- function ye(n, e) {
145
+ function be(n, e) {
144
146
  e === void 0 && (e = jt);
145
147
  var t, r = [], s, l = !1;
146
148
  function a() {
147
- for (var c = [], d = 0; d < arguments.length; d++)
148
- c[d] = arguments[d];
149
+ for (var c = [], u = 0; u < arguments.length; u++)
150
+ c[u] = arguments[u];
149
151
  return l && t === this && e(c, r) || (s = n.apply(this, c), l = !0, t = this, r = c), s;
150
152
  }
151
153
  return a;
152
154
  }
153
- function De(n, e) {
155
+ function He(n, e) {
154
156
  if (n == null)
155
157
  return {};
156
158
  var t = {};
@@ -162,34 +164,34 @@ function De(n, e) {
162
164
  }
163
165
  return t;
164
166
  }
165
- var Bt = typeof performance == "object" && typeof performance.now == "function", He = Bt ? function() {
167
+ var Bt = typeof performance == "object" && typeof performance.now == "function", ke = Bt ? function() {
166
168
  return performance.now();
167
169
  } : function() {
168
170
  return Date.now();
169
171
  };
170
- function ke(n) {
172
+ function Ue(n) {
171
173
  cancelAnimationFrame(n.id);
172
174
  }
173
175
  function Kt(n, e) {
174
- var t = He();
176
+ var t = ke();
175
177
  function r() {
176
- He() - t >= e ? n.call(null) : s.id = requestAnimationFrame(r);
178
+ ke() - t >= e ? n.call(null) : s.id = requestAnimationFrame(r);
177
179
  }
178
180
  var s = {
179
181
  id: requestAnimationFrame(r)
180
182
  };
181
183
  return s;
182
184
  }
183
- var be = -1;
185
+ var ze = -1;
184
186
  function Zt(n) {
185
- if (n === void 0 && (n = !1), be === -1 || n) {
187
+ if (n === void 0 && (n = !1), ze === -1 || n) {
186
188
  var e = document.createElement("div"), t = e.style;
187
- t.width = "50px", t.height = "50px", t.overflow = "scroll", document.body.appendChild(e), be = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
189
+ t.width = "50px", t.height = "50px", t.overflow = "scroll", document.body.appendChild(e), ze = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
188
190
  }
189
- return be;
191
+ return ze;
190
192
  }
191
193
  var oe = null;
192
- function Ue(n) {
194
+ function Ve(n) {
193
195
  if (n === void 0 && (n = !1), oe === null || n) {
194
196
  var e = document.createElement("div"), t = e.style;
195
197
  t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
@@ -206,87 +208,87 @@ var Jt = 150, Qt = function(e) {
206
208
  }, fe = null, me = null, pe = null;
207
209
  process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (fe = /* @__PURE__ */ new WeakSet(), me = /* @__PURE__ */ new WeakSet(), pe = /* @__PURE__ */ new WeakSet());
208
210
  function Xt(n) {
209
- var e, t = n.getColumnOffset, r = n.getColumnStartIndexForOffset, s = n.getColumnStopIndexForStartIndex, l = n.getColumnWidth, a = n.getEstimatedTotalHeight, c = n.getEstimatedTotalWidth, d = n.getOffsetForColumnAndAlignment, g = n.getOffsetForRowAndAlignment, h = n.getRowHeight, C = n.getRowOffset, i = n.getRowStartIndexForOffset, z = n.getRowStopIndexForStartIndex, S = n.initInstanceProps, I = n.shouldResetStyleCacheOnItemSizeChange, D = n.validateProps;
211
+ var e, t = n.getColumnOffset, r = n.getColumnStartIndexForOffset, s = n.getColumnStopIndexForStartIndex, l = n.getColumnWidth, a = n.getEstimatedTotalHeight, c = n.getEstimatedTotalWidth, u = n.getOffsetForColumnAndAlignment, g = n.getOffsetForRowAndAlignment, h = n.getRowHeight, I = n.getRowOffset, i = n.getRowStartIndexForOffset, L = n.getRowStopIndexForStartIndex, T = n.initInstanceProps, R = n.shouldResetStyleCacheOnItemSizeChange, H = n.validateProps;
210
212
  return e = /* @__PURE__ */ function(M) {
211
- Gt(y, M);
212
- function y(P) {
213
+ Gt(b, M);
214
+ function b(N) {
213
215
  var o;
214
- return o = M.call(this, P) || this, o._instanceProps = S(o.props, Ne(o)), o._resetIsScrollingTimeoutId = null, o._outerRef = void 0, o.state = {
215
- instance: Ne(o),
216
+ return o = M.call(this, N) || this, o._instanceProps = T(o.props, Fe(o)), o._resetIsScrollingTimeoutId = null, o._outerRef = void 0, o.state = {
217
+ instance: Fe(o),
216
218
  isScrolling: !1,
217
219
  horizontalScrollDirection: "forward",
218
220
  scrollLeft: typeof o.props.initialScrollLeft == "number" ? o.props.initialScrollLeft : 0,
219
221
  scrollTop: typeof o.props.initialScrollTop == "number" ? o.props.initialScrollTop : 0,
220
222
  scrollUpdateWasRequested: !1,
221
223
  verticalScrollDirection: "forward"
222
- }, o._callOnItemsRendered = void 0, o._callOnItemsRendered = ye(function(f, u, m, _, p, T, O, W) {
224
+ }, o._callOnItemsRendered = void 0, o._callOnItemsRendered = be(function(f, d, m, C, p, S, O, P) {
223
225
  return o.props.onItemsRendered({
224
226
  overscanColumnStartIndex: f,
225
- overscanColumnStopIndex: u,
227
+ overscanColumnStopIndex: d,
226
228
  overscanRowStartIndex: m,
227
- overscanRowStopIndex: _,
229
+ overscanRowStopIndex: C,
228
230
  visibleColumnStartIndex: p,
229
- visibleColumnStopIndex: T,
231
+ visibleColumnStopIndex: S,
230
232
  visibleRowStartIndex: O,
231
- visibleRowStopIndex: W
233
+ visibleRowStopIndex: P
232
234
  });
233
- }), o._callOnScroll = void 0, o._callOnScroll = ye(function(f, u, m, _, p) {
235
+ }), o._callOnScroll = void 0, o._callOnScroll = be(function(f, d, m, C, p) {
234
236
  return o.props.onScroll({
235
237
  horizontalScrollDirection: m,
236
238
  scrollLeft: f,
237
- scrollTop: u,
238
- verticalScrollDirection: _,
239
+ scrollTop: d,
240
+ verticalScrollDirection: C,
239
241
  scrollUpdateWasRequested: p
240
242
  });
241
- }), o._getItemStyle = void 0, o._getItemStyle = function(f, u) {
242
- var m = o.props, _ = m.columnWidth, p = m.direction, T = m.rowHeight, O = o._getItemStyleCache(I && _, I && p, I && T), W = f + ":" + u, x;
243
- if (O.hasOwnProperty(W))
244
- x = O[W];
243
+ }), o._getItemStyle = void 0, o._getItemStyle = function(f, d) {
244
+ var m = o.props, C = m.columnWidth, p = m.direction, S = m.rowHeight, O = o._getItemStyleCache(R && C, R && p, R && S), P = f + ":" + d, x;
245
+ if (O.hasOwnProperty(P))
246
+ x = O[P];
245
247
  else {
246
- var b = t(o.props, u, o._instanceProps), R = p === "rtl";
247
- O[W] = x = {
248
+ var z = t(o.props, d, o._instanceProps), y = p === "rtl";
249
+ O[P] = x = {
248
250
  position: "absolute",
249
- left: R ? void 0 : b,
250
- right: R ? b : void 0,
251
- top: C(o.props, f, o._instanceProps),
251
+ left: y ? void 0 : z,
252
+ right: y ? z : void 0,
253
+ top: I(o.props, f, o._instanceProps),
252
254
  height: h(o.props, f, o._instanceProps),
253
- width: l(o.props, u, o._instanceProps)
255
+ width: l(o.props, d, o._instanceProps)
254
256
  };
255
257
  }
256
258
  return x;
257
- }, o._getItemStyleCache = void 0, o._getItemStyleCache = ye(function(f, u, m) {
259
+ }, o._getItemStyleCache = void 0, o._getItemStyleCache = be(function(f, d, m) {
258
260
  return {};
259
261
  }), o._onScroll = function(f) {
260
- var u = f.currentTarget, m = u.clientHeight, _ = u.clientWidth, p = u.scrollLeft, T = u.scrollTop, O = u.scrollHeight, W = u.scrollWidth;
262
+ var d = f.currentTarget, m = d.clientHeight, C = d.clientWidth, p = d.scrollLeft, S = d.scrollTop, O = d.scrollHeight, P = d.scrollWidth;
261
263
  o.setState(function(x) {
262
- if (x.scrollLeft === p && x.scrollTop === T)
264
+ if (x.scrollLeft === p && x.scrollTop === S)
263
265
  return null;
264
- var b = o.props.direction, R = p;
265
- if (b === "rtl")
266
- switch (Ue()) {
266
+ var z = o.props.direction, y = p;
267
+ if (z === "rtl")
268
+ switch (Ve()) {
267
269
  case "negative":
268
- R = -p;
270
+ y = -p;
269
271
  break;
270
272
  case "positive-descending":
271
- R = W - _ - p;
273
+ y = P - C - p;
272
274
  break;
273
275
  }
274
- R = Math.max(0, Math.min(R, W - _));
275
- var A = Math.max(0, Math.min(T, O - m));
276
+ y = Math.max(0, Math.min(y, P - C));
277
+ var W = Math.max(0, Math.min(S, O - m));
276
278
  return {
277
279
  isScrolling: !0,
278
280
  horizontalScrollDirection: x.scrollLeft < p ? "forward" : "backward",
279
- scrollLeft: R,
280
- scrollTop: A,
281
- verticalScrollDirection: x.scrollTop < T ? "forward" : "backward",
281
+ scrollLeft: y,
282
+ scrollTop: W,
283
+ verticalScrollDirection: x.scrollTop < S ? "forward" : "backward",
282
284
  scrollUpdateWasRequested: !1
283
285
  };
284
286
  }, o._resetIsScrollingDebounced);
285
287
  }, o._outerRefSetter = function(f) {
286
- var u = o.props.outerRef;
287
- o._outerRef = f, typeof u == "function" ? u(f) : u != null && typeof u == "object" && u.hasOwnProperty("current") && (u.current = f);
288
+ var d = o.props.outerRef;
289
+ o._outerRef = f, typeof d == "function" ? d(f) : d != null && typeof d == "object" && d.hasOwnProperty("current") && (d.current = f);
288
290
  }, o._resetIsScrollingDebounced = function() {
289
- o._resetIsScrollingTimeoutId !== null && ke(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = Kt(o._resetIsScrolling, Jt);
291
+ o._resetIsScrollingTimeoutId !== null && Ue(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = Kt(o._resetIsScrolling, Jt);
290
292
  }, o._resetIsScrolling = function() {
291
293
  o._resetIsScrollingTimeoutId = null, o.setState({
292
294
  isScrolling: !1
@@ -295,70 +297,70 @@ function Xt(n) {
295
297
  });
296
298
  }, o;
297
299
  }
298
- y.getDerivedStateFromProps = function(o, f) {
299
- return Yt(o, f), D(o), null;
300
+ b.getDerivedStateFromProps = function(o, f) {
301
+ return Yt(o, f), H(o), null;
300
302
  };
301
- var E = y.prototype;
303
+ var E = b.prototype;
302
304
  return E.scrollTo = function(o) {
303
- var f = o.scrollLeft, u = o.scrollTop;
304
- f !== void 0 && (f = Math.max(0, f)), u !== void 0 && (u = Math.max(0, u)), this.setState(function(m) {
305
- return f === void 0 && (f = m.scrollLeft), u === void 0 && (u = m.scrollTop), m.scrollLeft === f && m.scrollTop === u ? null : {
305
+ var f = o.scrollLeft, d = o.scrollTop;
306
+ f !== void 0 && (f = Math.max(0, f)), d !== void 0 && (d = Math.max(0, d)), this.setState(function(m) {
307
+ return f === void 0 && (f = m.scrollLeft), d === void 0 && (d = m.scrollTop), m.scrollLeft === f && m.scrollTop === d ? null : {
306
308
  horizontalScrollDirection: m.scrollLeft < f ? "forward" : "backward",
307
309
  scrollLeft: f,
308
- scrollTop: u,
310
+ scrollTop: d,
309
311
  scrollUpdateWasRequested: !0,
310
- verticalScrollDirection: m.scrollTop < u ? "forward" : "backward"
312
+ verticalScrollDirection: m.scrollTop < d ? "forward" : "backward"
311
313
  };
312
314
  }, this._resetIsScrollingDebounced);
313
315
  }, E.scrollToItem = function(o) {
314
- var f = o.align, u = f === void 0 ? "auto" : f, m = o.columnIndex, _ = o.rowIndex, p = this.props, T = p.columnCount, O = p.height, W = p.rowCount, x = p.width, b = this.state, R = b.scrollLeft, A = b.scrollTop, H = Zt();
315
- m !== void 0 && (m = Math.max(0, Math.min(m, T - 1))), _ !== void 0 && (_ = Math.max(0, Math.min(_, W - 1)));
316
- var U = a(this.props, this._instanceProps), N = c(this.props, this._instanceProps), G = N > x ? H : 0, F = U > O ? H : 0;
316
+ var f = o.align, d = f === void 0 ? "auto" : f, m = o.columnIndex, C = o.rowIndex, p = this.props, S = p.columnCount, O = p.height, P = p.rowCount, x = p.width, z = this.state, y = z.scrollLeft, W = z.scrollTop, k = Zt();
317
+ m !== void 0 && (m = Math.max(0, Math.min(m, S - 1))), C !== void 0 && (C = Math.max(0, Math.min(C, P - 1)));
318
+ var U = a(this.props, this._instanceProps), A = c(this.props, this._instanceProps), G = A > x ? k : 0, D = U > O ? k : 0;
317
319
  this.scrollTo({
318
- scrollLeft: m !== void 0 ? d(this.props, m, u, R, this._instanceProps, F) : R,
319
- scrollTop: _ !== void 0 ? g(this.props, _, u, A, this._instanceProps, G) : A
320
+ scrollLeft: m !== void 0 ? u(this.props, m, d, y, this._instanceProps, D) : y,
321
+ scrollTop: C !== void 0 ? g(this.props, C, d, W, this._instanceProps, G) : W
320
322
  });
321
323
  }, E.componentDidMount = function() {
322
- var o = this.props, f = o.initialScrollLeft, u = o.initialScrollTop;
324
+ var o = this.props, f = o.initialScrollLeft, d = o.initialScrollTop;
323
325
  if (this._outerRef != null) {
324
326
  var m = this._outerRef;
325
- typeof f == "number" && (m.scrollLeft = f), typeof u == "number" && (m.scrollTop = u);
327
+ typeof f == "number" && (m.scrollLeft = f), typeof d == "number" && (m.scrollTop = d);
326
328
  }
327
329
  this._callPropsCallbacks();
328
330
  }, E.componentDidUpdate = function() {
329
- var o = this.props.direction, f = this.state, u = f.scrollLeft, m = f.scrollTop, _ = f.scrollUpdateWasRequested;
330
- if (_ && this._outerRef != null) {
331
+ var o = this.props.direction, f = this.state, d = f.scrollLeft, m = f.scrollTop, C = f.scrollUpdateWasRequested;
332
+ if (C && this._outerRef != null) {
331
333
  var p = this._outerRef;
332
334
  if (o === "rtl")
333
- switch (Ue()) {
335
+ switch (Ve()) {
334
336
  case "negative":
335
- p.scrollLeft = -u;
337
+ p.scrollLeft = -d;
336
338
  break;
337
339
  case "positive-ascending":
338
- p.scrollLeft = u;
340
+ p.scrollLeft = d;
339
341
  break;
340
342
  default:
341
- var T = p.clientWidth, O = p.scrollWidth;
342
- p.scrollLeft = O - T - u;
343
+ var S = p.clientWidth, O = p.scrollWidth;
344
+ p.scrollLeft = O - S - d;
343
345
  break;
344
346
  }
345
347
  else
346
- p.scrollLeft = Math.max(0, u);
348
+ p.scrollLeft = Math.max(0, d);
347
349
  p.scrollTop = Math.max(0, m);
348
350
  }
349
351
  this._callPropsCallbacks();
350
352
  }, E.componentWillUnmount = function() {
351
- this._resetIsScrollingTimeoutId !== null && ke(this._resetIsScrollingTimeoutId);
353
+ this._resetIsScrollingTimeoutId !== null && Ue(this._resetIsScrollingTimeoutId);
352
354
  }, E.render = function() {
353
- var o = this.props, f = o.children, u = o.className, m = o.columnCount, _ = o.direction, p = o.height, T = o.innerRef, O = o.innerElementType, W = o.innerTagName, x = o.itemData, b = o.itemKey, R = b === void 0 ? Qt : b, A = o.outerElementType, H = o.outerTagName, U = o.rowCount, N = o.style, G = o.useIsScrolling, F = o.width, V = this.state.isScrolling, te = this._getHorizontalRangeToRender(), re = te[0], ae = te[1], ne = this._getVerticalRangeToRender(), J = ne[0], he = ne[1], Q = [];
355
+ var o = this.props, f = o.children, d = o.className, m = o.columnCount, C = o.direction, p = o.height, S = o.innerRef, O = o.innerElementType, P = o.innerTagName, x = o.itemData, z = o.itemKey, y = z === void 0 ? Qt : z, W = o.outerElementType, k = o.outerTagName, U = o.rowCount, A = o.style, G = o.useIsScrolling, D = o.width, V = this.state.isScrolling, te = this._getHorizontalRangeToRender(), re = te[0], ae = te[1], ne = this._getVerticalRangeToRender(), J = ne[0], he = ne[1], Q = [];
354
356
  if (m > 0 && U)
355
357
  for (var $ = J; $ <= he; $++)
356
358
  for (var j = re; j <= ae; j++)
357
- Q.push(de(f, {
359
+ Q.push(ue(f, {
358
360
  columnIndex: j,
359
361
  data: x,
360
362
  isScrolling: G ? V : void 0,
361
- key: R({
363
+ key: y({
362
364
  columnIndex: j,
363
365
  data: x,
364
366
  rowIndex: $
@@ -367,22 +369,22 @@ function Xt(n) {
367
369
  style: this._getItemStyle($, j)
368
370
  }));
369
371
  var le = a(this.props, this._instanceProps), ce = c(this.props, this._instanceProps);
370
- return de(A || H || "div", {
371
- className: u,
372
+ return ue(W || k || "div", {
373
+ className: d,
372
374
  onScroll: this._onScroll,
373
375
  ref: this._outerRefSetter,
374
- style: Me({
376
+ style: Ee({
375
377
  position: "relative",
376
378
  height: p,
377
- width: F,
379
+ width: D,
378
380
  overflow: "auto",
379
381
  WebkitOverflowScrolling: "touch",
380
382
  willChange: "transform",
381
- direction: _
382
- }, N)
383
- }, de(O || W || "div", {
383
+ direction: C
384
+ }, A)
385
+ }, ue(O || P || "div", {
384
386
  children: Q,
385
- ref: T,
387
+ ref: S,
386
388
  style: {
387
389
  height: le,
388
390
  pointerEvents: V ? "none" : void 0,
@@ -390,38 +392,38 @@ function Xt(n) {
390
392
  }
391
393
  }));
392
394
  }, E._callPropsCallbacks = function() {
393
- var o = this.props, f = o.columnCount, u = o.onItemsRendered, m = o.onScroll, _ = o.rowCount;
394
- if (typeof u == "function" && f > 0 && _ > 0) {
395
- var p = this._getHorizontalRangeToRender(), T = p[0], O = p[1], W = p[2], x = p[3], b = this._getVerticalRangeToRender(), R = b[0], A = b[1], H = b[2], U = b[3];
396
- this._callOnItemsRendered(T, O, R, A, W, x, H, U);
395
+ var o = this.props, f = o.columnCount, d = o.onItemsRendered, m = o.onScroll, C = o.rowCount;
396
+ if (typeof d == "function" && f > 0 && C > 0) {
397
+ var p = this._getHorizontalRangeToRender(), S = p[0], O = p[1], P = p[2], x = p[3], z = this._getVerticalRangeToRender(), y = z[0], W = z[1], k = z[2], U = z[3];
398
+ this._callOnItemsRendered(S, O, y, W, P, x, k, U);
397
399
  }
398
400
  if (typeof m == "function") {
399
- var N = this.state, G = N.horizontalScrollDirection, F = N.scrollLeft, V = N.scrollTop, te = N.scrollUpdateWasRequested, re = N.verticalScrollDirection;
400
- this._callOnScroll(F, V, G, re, te);
401
+ var A = this.state, G = A.horizontalScrollDirection, D = A.scrollLeft, V = A.scrollTop, te = A.scrollUpdateWasRequested, re = A.verticalScrollDirection;
402
+ this._callOnScroll(D, V, G, re, te);
401
403
  }
402
404
  }, E._getHorizontalRangeToRender = function() {
403
- var o = this.props, f = o.columnCount, u = o.overscanColumnCount, m = o.overscanColumnsCount, _ = o.overscanCount, p = o.rowCount, T = this.state, O = T.horizontalScrollDirection, W = T.isScrolling, x = T.scrollLeft, b = u || m || _ || 1;
405
+ var o = this.props, f = o.columnCount, d = o.overscanColumnCount, m = o.overscanColumnsCount, C = o.overscanCount, p = o.rowCount, S = this.state, O = S.horizontalScrollDirection, P = S.isScrolling, x = S.scrollLeft, z = d || m || C || 1;
404
406
  if (f === 0 || p === 0)
405
407
  return [0, 0, 0, 0];
406
- var R = r(this.props, x, this._instanceProps), A = s(this.props, R, x, this._instanceProps), H = !W || O === "backward" ? Math.max(1, b) : 1, U = !W || O === "forward" ? Math.max(1, b) : 1;
407
- return [Math.max(0, R - H), Math.max(0, Math.min(f - 1, A + U)), R, A];
408
+ var y = r(this.props, x, this._instanceProps), W = s(this.props, y, x, this._instanceProps), k = !P || O === "backward" ? Math.max(1, z) : 1, U = !P || O === "forward" ? Math.max(1, z) : 1;
409
+ return [Math.max(0, y - k), Math.max(0, Math.min(f - 1, W + U)), y, W];
408
410
  }, E._getVerticalRangeToRender = function() {
409
- var o = this.props, f = o.columnCount, u = o.overscanCount, m = o.overscanRowCount, _ = o.overscanRowsCount, p = o.rowCount, T = this.state, O = T.isScrolling, W = T.verticalScrollDirection, x = T.scrollTop, b = m || _ || u || 1;
411
+ var o = this.props, f = o.columnCount, d = o.overscanCount, m = o.overscanRowCount, C = o.overscanRowsCount, p = o.rowCount, S = this.state, O = S.isScrolling, P = S.verticalScrollDirection, x = S.scrollTop, z = m || C || d || 1;
410
412
  if (f === 0 || p === 0)
411
413
  return [0, 0, 0, 0];
412
- var R = i(this.props, x, this._instanceProps), A = z(this.props, R, x, this._instanceProps), H = !O || W === "backward" ? Math.max(1, b) : 1, U = !O || W === "forward" ? Math.max(1, b) : 1;
413
- return [Math.max(0, R - H), Math.max(0, Math.min(p - 1, A + U)), R, A];
414
- }, y;
415
- }(ct), e.defaultProps = {
414
+ var y = i(this.props, x, this._instanceProps), W = L(this.props, y, x, this._instanceProps), k = !O || P === "backward" ? Math.max(1, z) : 1, U = !O || P === "forward" ? Math.max(1, z) : 1;
415
+ return [Math.max(0, y - k), Math.max(0, Math.min(p - 1, W + U)), y, W];
416
+ }, b;
417
+ }(dt), e.defaultProps = {
416
418
  direction: "ltr",
417
419
  itemData: void 0,
418
420
  useIsScrolling: !1
419
421
  }, e;
420
422
  }
421
423
  var Yt = function(e, t) {
422
- var r = e.children, s = e.direction, l = e.height, a = e.innerTagName, c = e.outerTagName, d = e.overscanColumnsCount, g = e.overscanCount, h = e.overscanRowsCount, C = e.width, i = t.instance;
424
+ var r = e.children, s = e.direction, l = e.height, a = e.innerTagName, c = e.outerTagName, u = e.overscanColumnsCount, g = e.overscanCount, h = e.overscanRowsCount, I = e.width, i = t.instance;
423
425
  if (process.env.NODE_ENV !== "production") {
424
- if (typeof g == "number" && fe && !fe.has(i) && (fe.add(i), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof h == "number") && me && !me.has(i) && (me.add(i), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (a != null || c != null) && pe && !pe.has(i) && (pe.add(i), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
426
+ if (typeof g == "number" && fe && !fe.has(i) && (fe.add(i), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof u == "number" || typeof h == "number") && me && !me.has(i) && (me.add(i), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (a != null || c != null) && pe && !pe.has(i) && (pe.add(i), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
425
427
  throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
426
428
  switch (s) {
427
429
  case "ltr":
@@ -430,97 +432,97 @@ var Yt = function(e, t) {
430
432
  default:
431
433
  throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + s + '" was specified.'));
432
434
  }
433
- if (typeof C != "number")
434
- throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (C === null ? "null" : typeof C) + '" was specified.'));
435
+ if (typeof I != "number")
436
+ throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (I === null ? "null" : typeof I) + '" was specified.'));
435
437
  if (typeof l != "number")
436
438
  throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (l === null ? "null" : typeof l) + '" was specified.'));
437
439
  }
438
- }, Ve = 50, Ze = function(e, t) {
440
+ }, qe = 50, Je = function(e, t) {
439
441
  var r = e.rowCount, s = t.rowMetadataMap, l = t.estimatedRowHeight, a = t.lastMeasuredRowIndex, c = 0;
440
442
  if (a >= r && (a = r - 1), a >= 0) {
441
- var d = s[a];
442
- c = d.offset + d.size;
443
+ var u = s[a];
444
+ c = u.offset + u.size;
443
445
  }
444
446
  var g = r - a - 1, h = g * l;
445
447
  return c + h;
446
- }, Je = function(e, t) {
448
+ }, Qe = function(e, t) {
447
449
  var r = e.columnCount, s = t.columnMetadataMap, l = t.estimatedColumnWidth, a = t.lastMeasuredColumnIndex, c = 0;
448
450
  if (a >= r && (a = r - 1), a >= 0) {
449
- var d = s[a];
450
- c = d.offset + d.size;
451
+ var u = s[a];
452
+ c = u.offset + u.size;
451
453
  }
452
454
  var g = r - a - 1, h = g * l;
453
455
  return c + h;
454
456
  }, Z = function(e, t, r, s) {
455
457
  var l, a, c;
456
458
  if (e === "column" ? (l = s.columnMetadataMap, a = t.columnWidth, c = s.lastMeasuredColumnIndex) : (l = s.rowMetadataMap, a = t.rowHeight, c = s.lastMeasuredRowIndex), r > c) {
457
- var d = 0;
459
+ var u = 0;
458
460
  if (c >= 0) {
459
461
  var g = l[c];
460
- d = g.offset + g.size;
462
+ u = g.offset + g.size;
461
463
  }
462
464
  for (var h = c + 1; h <= r; h++) {
463
- var C = a(h);
465
+ var I = a(h);
464
466
  l[h] = {
465
- offset: d,
466
- size: C
467
- }, d += C;
467
+ offset: u,
468
+ size: I
469
+ }, u += I;
468
470
  }
469
471
  e === "column" ? s.lastMeasuredColumnIndex = r : s.lastMeasuredRowIndex = r;
470
472
  }
471
473
  return l[r];
472
- }, qe = function(e, t, r, s) {
474
+ }, Ge = function(e, t, r, s) {
473
475
  var l, a;
474
476
  e === "column" ? (l = r.columnMetadataMap, a = r.lastMeasuredColumnIndex) : (l = r.rowMetadataMap, a = r.lastMeasuredRowIndex);
475
477
  var c = a > 0 ? l[a].offset : 0;
476
- return c >= s ? Qe(e, t, r, a, 0, s) : er(e, t, r, Math.max(0, a), s);
477
- }, Qe = function(e, t, r, s, l, a) {
478
+ return c >= s ? Xe(e, t, r, a, 0, s) : er(e, t, r, Math.max(0, a), s);
479
+ }, Xe = function(e, t, r, s, l, a) {
478
480
  for (; l <= s; ) {
479
- var c = l + Math.floor((s - l) / 2), d = Z(e, t, c, r).offset;
480
- if (d === a)
481
+ var c = l + Math.floor((s - l) / 2), u = Z(e, t, c, r).offset;
482
+ if (u === a)
481
483
  return c;
482
- d < a ? l = c + 1 : d > a && (s = c - 1);
484
+ u < a ? l = c + 1 : u > a && (s = c - 1);
483
485
  }
484
486
  return l > 0 ? l - 1 : 0;
485
487
  }, er = function(e, t, r, s, l) {
486
488
  for (var a = e === "column" ? t.columnCount : t.rowCount, c = 1; s < a && Z(e, t, s, r).offset < l; )
487
489
  s += c, c *= 2;
488
- return Qe(e, t, r, Math.min(s, a - 1), Math.floor(s / 2), l);
489
- }, Ge = function(e, t, r, s, l, a, c) {
490
- var d = e === "column" ? t.width : t.height, g = Z(e, t, r, a), h = e === "column" ? Je(t, a) : Ze(t, a), C = Math.max(0, Math.min(h - d, g.offset)), i = Math.max(0, g.offset - d + c + g.size);
491
- switch (s === "smart" && (l >= i - d && l <= C + d ? s = "auto" : s = "center"), s) {
490
+ return Xe(e, t, r, Math.min(s, a - 1), Math.floor(s / 2), l);
491
+ }, $e = function(e, t, r, s, l, a, c) {
492
+ var u = e === "column" ? t.width : t.height, g = Z(e, t, r, a), h = e === "column" ? Qe(t, a) : Je(t, a), I = Math.max(0, Math.min(h - u, g.offset)), i = Math.max(0, g.offset - u + c + g.size);
493
+ switch (s === "smart" && (l >= i - u && l <= I + u ? s = "auto" : s = "center"), s) {
492
494
  case "start":
493
- return C;
495
+ return I;
494
496
  case "end":
495
497
  return i;
496
498
  case "center":
497
- return Math.round(i + (C - i) / 2);
499
+ return Math.round(i + (I - i) / 2);
498
500
  case "auto":
499
501
  default:
500
- return l >= i && l <= C ? l : i > C || l < i ? i : C;
502
+ return l >= i && l <= I ? l : i > I || l < i ? i : I;
501
503
  }
502
504
  }, tr = /* @__PURE__ */ Xt({
503
505
  getColumnOffset: function(e, t, r) {
504
506
  return Z("column", e, t, r).offset;
505
507
  },
506
508
  getColumnStartIndexForOffset: function(e, t, r) {
507
- return qe("column", e, r, t);
509
+ return Ge("column", e, r, t);
508
510
  },
509
511
  getColumnStopIndexForStartIndex: function(e, t, r, s) {
510
- for (var l = e.columnCount, a = e.width, c = Z("column", e, t, s), d = r + a, g = c.offset + c.size, h = t; h < l - 1 && g < d; )
512
+ for (var l = e.columnCount, a = e.width, c = Z("column", e, t, s), u = r + a, g = c.offset + c.size, h = t; h < l - 1 && g < u; )
511
513
  h++, g += Z("column", e, h, s).size;
512
514
  return h;
513
515
  },
514
516
  getColumnWidth: function(e, t, r) {
515
517
  return r.columnMetadataMap[t].size;
516
518
  },
517
- getEstimatedTotalHeight: Ze,
518
- getEstimatedTotalWidth: Je,
519
+ getEstimatedTotalHeight: Je,
520
+ getEstimatedTotalWidth: Qe,
519
521
  getOffsetForColumnAndAlignment: function(e, t, r, s, l, a) {
520
- return Ge("column", e, t, r, s, l, a);
522
+ return $e("column", e, t, r, s, l, a);
521
523
  },
522
524
  getOffsetForRowAndAlignment: function(e, t, r, s, l, a) {
523
- return Ge("row", e, t, r, s, l, a);
525
+ return $e("row", e, t, r, s, l, a);
524
526
  },
525
527
  getRowOffset: function(e, t, r) {
526
528
  return Z("row", e, t, r).offset;
@@ -529,35 +531,35 @@ var Yt = function(e, t) {
529
531
  return r.rowMetadataMap[t].size;
530
532
  },
531
533
  getRowStartIndexForOffset: function(e, t, r) {
532
- return qe("row", e, r, t);
534
+ return Ge("row", e, r, t);
533
535
  },
534
536
  getRowStopIndexForStartIndex: function(e, t, r, s) {
535
- for (var l = e.rowCount, a = e.height, c = Z("row", e, t, s), d = r + a, g = c.offset + c.size, h = t; h < l - 1 && g < d; )
537
+ for (var l = e.rowCount, a = e.height, c = Z("row", e, t, s), u = r + a, g = c.offset + c.size, h = t; h < l - 1 && g < u; )
536
538
  h++, g += Z("row", e, h, s).size;
537
539
  return h;
538
540
  },
539
541
  initInstanceProps: function(e, t) {
540
542
  var r = e, s = r.estimatedColumnWidth, l = r.estimatedRowHeight, a = {
541
543
  columnMetadataMap: {},
542
- estimatedColumnWidth: s || Ve,
543
- estimatedRowHeight: l || Ve,
544
+ estimatedColumnWidth: s || qe,
545
+ estimatedRowHeight: l || qe,
544
546
  lastMeasuredColumnIndex: -1,
545
547
  lastMeasuredRowIndex: -1,
546
548
  rowMetadataMap: {}
547
549
  };
548
- return t.resetAfterColumnIndex = function(c, d) {
549
- d === void 0 && (d = !0), t.resetAfterIndices({
550
+ return t.resetAfterColumnIndex = function(c, u) {
551
+ u === void 0 && (u = !0), t.resetAfterIndices({
550
552
  columnIndex: c,
551
- shouldForceUpdate: d
553
+ shouldForceUpdate: u
552
554
  });
553
- }, t.resetAfterRowIndex = function(c, d) {
554
- d === void 0 && (d = !0), t.resetAfterIndices({
555
+ }, t.resetAfterRowIndex = function(c, u) {
556
+ u === void 0 && (u = !0), t.resetAfterIndices({
555
557
  rowIndex: c,
556
- shouldForceUpdate: d
558
+ shouldForceUpdate: u
557
559
  });
558
560
  }, t.resetAfterIndices = function(c) {
559
- var d = c.columnIndex, g = c.rowIndex, h = c.shouldForceUpdate, C = h === void 0 ? !0 : h;
560
- typeof d == "number" && (a.lastMeasuredColumnIndex = Math.min(a.lastMeasuredColumnIndex, d - 1)), typeof g == "number" && (a.lastMeasuredRowIndex = Math.min(a.lastMeasuredRowIndex, g - 1)), t._getItemStyleCache(-1), C && t.forceUpdate();
561
+ var u = c.columnIndex, g = c.rowIndex, h = c.shouldForceUpdate, I = h === void 0 ? !0 : h;
562
+ typeof u == "number" && (a.lastMeasuredColumnIndex = Math.min(a.lastMeasuredColumnIndex, u - 1)), typeof g == "number" && (a.lastMeasuredRowIndex = Math.min(a.lastMeasuredRowIndex, g - 1)), t._getItemStyleCache(-1), I && t.forceUpdate();
561
563
  }, a;
562
564
  },
563
565
  shouldResetStyleCacheOnItemSizeChange: !1,
@@ -572,7 +574,7 @@ var Yt = function(e, t) {
572
574
  }
573
575
  });
574
576
  process.env.NODE_ENV;
575
- function $e(n, e) {
577
+ function je(n, e) {
576
578
  for (var t in n)
577
579
  if (!(t in e))
578
580
  return !0;
@@ -583,88 +585,88 @@ function $e(n, e) {
583
585
  }
584
586
  var rr = ["style"], or = ["style"];
585
587
  function nr(n, e) {
586
- var t = n.style, r = De(n, rr), s = e.style, l = De(e, or);
587
- return !$e(t, s) && !$e(r, l);
588
+ var t = n.style, r = He(n, rr), s = e.style, l = He(e, or);
589
+ return !je(t, s) && !je(r, l);
588
590
  }
589
591
  let q;
590
592
  typeof window < "u" ? q = window : typeof self < "u" ? q = self : q = global;
591
- let Oe = null, We = null;
592
- const je = 20, Le = q.clearTimeout, Be = q.setTimeout, ze = q.cancelAnimationFrame || q.mozCancelAnimationFrame || q.webkitCancelAnimationFrame, Ke = q.requestAnimationFrame || q.mozRequestAnimationFrame || q.webkitRequestAnimationFrame;
593
- ze == null || Ke == null ? (Oe = Le, We = function(e) {
594
- return Be(e, je);
595
- }) : (Oe = function([e, t]) {
596
- ze(e), Le(t);
597
- }, We = function(e) {
598
- const t = Ke(function() {
593
+ let Pe = null, Ne = null;
594
+ const Be = 20, Le = q.clearTimeout, Ke = q.setTimeout, Me = q.cancelAnimationFrame || q.mozCancelAnimationFrame || q.webkitCancelAnimationFrame, Ze = q.requestAnimationFrame || q.mozRequestAnimationFrame || q.webkitRequestAnimationFrame;
595
+ Me == null || Ze == null ? (Pe = Le, Ne = function(e) {
596
+ return Ke(e, Be);
597
+ }) : (Pe = function([e, t]) {
598
+ Me(e), Le(t);
599
+ }, Ne = function(e) {
600
+ const t = Ze(function() {
599
601
  Le(r), e();
600
- }), r = Be(function() {
601
- ze(t), e();
602
- }, je);
602
+ }), r = Ke(function() {
603
+ Me(t), e();
604
+ }, Be);
603
605
  return [t, r];
604
606
  });
605
607
  function ir(n) {
606
608
  let e, t, r, s, l, a, c;
607
- const d = typeof document < "u" && document.attachEvent;
608
- if (!d) {
609
+ const u = typeof document < "u" && document.attachEvent;
610
+ if (!u) {
609
611
  a = function(M) {
610
- const y = M.__resizeTriggers__, E = y.firstElementChild, P = y.lastElementChild, o = E.firstElementChild;
611
- P.scrollLeft = P.scrollWidth, P.scrollTop = P.scrollHeight, o.style.width = E.offsetWidth + 1 + "px", o.style.height = E.offsetHeight + 1 + "px", E.scrollLeft = E.scrollWidth, E.scrollTop = E.scrollHeight;
612
+ const b = M.__resizeTriggers__, E = b.firstElementChild, N = b.lastElementChild, o = E.firstElementChild;
613
+ N.scrollLeft = N.scrollWidth, N.scrollTop = N.scrollHeight, o.style.width = E.offsetWidth + 1 + "px", o.style.height = E.offsetHeight + 1 + "px", E.scrollLeft = E.scrollWidth, E.scrollTop = E.scrollHeight;
612
614
  }, l = function(M) {
613
615
  return M.offsetWidth !== M.__resizeLast__.width || M.offsetHeight !== M.__resizeLast__.height;
614
616
  }, c = function(M) {
615
617
  if (M.target.className && typeof M.target.className.indexOf == "function" && M.target.className.indexOf("contract-trigger") < 0 && M.target.className.indexOf("expand-trigger") < 0)
616
618
  return;
617
- const y = this;
618
- a(this), this.__resizeRAF__ && Oe(this.__resizeRAF__), this.__resizeRAF__ = We(function() {
619
- l(y) && (y.__resizeLast__.width = y.offsetWidth, y.__resizeLast__.height = y.offsetHeight, y.__resizeListeners__.forEach(function(o) {
620
- o.call(y, M);
619
+ const b = this;
620
+ a(this), this.__resizeRAF__ && Pe(this.__resizeRAF__), this.__resizeRAF__ = Ne(function() {
621
+ l(b) && (b.__resizeLast__.width = b.offsetWidth, b.__resizeLast__.height = b.offsetHeight, b.__resizeListeners__.forEach(function(o) {
622
+ o.call(b, M);
621
623
  }));
622
624
  });
623
625
  };
624
- let i = !1, z = "";
626
+ let i = !1, L = "";
625
627
  r = "animationstart";
626
- const S = "Webkit Moz O ms".split(" ");
627
- let I = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), D = "";
628
+ const T = "Webkit Moz O ms".split(" ");
629
+ let R = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), H = "";
628
630
  {
629
631
  const M = document.createElement("fakeelement");
630
632
  if (M.style.animationName !== void 0 && (i = !0), i === !1) {
631
- for (let y = 0; y < S.length; y++)
632
- if (M.style[S[y] + "AnimationName"] !== void 0) {
633
- D = S[y], z = "-" + D.toLowerCase() + "-", r = I[y], i = !0;
633
+ for (let b = 0; b < T.length; b++)
634
+ if (M.style[T[b] + "AnimationName"] !== void 0) {
635
+ H = T[b], L = "-" + H.toLowerCase() + "-", r = R[b], i = !0;
634
636
  break;
635
637
  }
636
638
  }
637
639
  }
638
- t = "resizeanim", e = "@" + z + "keyframes " + t + " { from { opacity: 0; } to { opacity: 0; } } ", s = z + "animation: 1ms " + t + "; ";
640
+ t = "resizeanim", e = "@" + L + "keyframes " + t + " { from { opacity: 0; } to { opacity: 0; } } ", s = L + "animation: 1ms " + t + "; ";
639
641
  }
640
642
  const g = function(i) {
641
643
  if (!i.getElementById("detectElementResize")) {
642
- const z = (e || "") + ".resize-triggers { " + (s || "") + '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%; }', S = i.head || i.getElementsByTagName("head")[0], I = i.createElement("style");
643
- I.id = "detectElementResize", I.type = "text/css", n != null && I.setAttribute("nonce", n), I.styleSheet ? I.styleSheet.cssText = z : I.appendChild(i.createTextNode(z)), S.appendChild(I);
644
+ const L = (e || "") + ".resize-triggers { " + (s || "") + '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%; }', T = i.head || i.getElementsByTagName("head")[0], R = i.createElement("style");
645
+ R.id = "detectElementResize", R.type = "text/css", n != null && R.setAttribute("nonce", n), R.styleSheet ? R.styleSheet.cssText = L : R.appendChild(i.createTextNode(L)), T.appendChild(R);
644
646
  }
645
647
  };
646
648
  return {
647
- addResizeListener: function(i, z) {
648
- if (d)
649
- i.attachEvent("onresize", z);
649
+ addResizeListener: function(i, L) {
650
+ if (u)
651
+ i.attachEvent("onresize", L);
650
652
  else {
651
653
  if (!i.__resizeTriggers__) {
652
- const S = i.ownerDocument, I = q.getComputedStyle(i);
653
- I && I.position === "static" && (i.style.position = "relative"), g(S), i.__resizeLast__ = {}, i.__resizeListeners__ = [], (i.__resizeTriggers__ = S.createElement("div")).className = "resize-triggers";
654
- const D = S.createElement("div");
655
- D.className = "expand-trigger", D.appendChild(S.createElement("div"));
656
- const M = S.createElement("div");
657
- M.className = "contract-trigger", i.__resizeTriggers__.appendChild(D), i.__resizeTriggers__.appendChild(M), i.appendChild(i.__resizeTriggers__), a(i), i.addEventListener("scroll", c, !0), r && (i.__resizeTriggers__.__animationListener__ = function(E) {
654
+ const T = i.ownerDocument, R = q.getComputedStyle(i);
655
+ R && R.position === "static" && (i.style.position = "relative"), g(T), i.__resizeLast__ = {}, i.__resizeListeners__ = [], (i.__resizeTriggers__ = T.createElement("div")).className = "resize-triggers";
656
+ const H = T.createElement("div");
657
+ H.className = "expand-trigger", H.appendChild(T.createElement("div"));
658
+ const M = T.createElement("div");
659
+ M.className = "contract-trigger", i.__resizeTriggers__.appendChild(H), i.__resizeTriggers__.appendChild(M), i.appendChild(i.__resizeTriggers__), a(i), i.addEventListener("scroll", c, !0), r && (i.__resizeTriggers__.__animationListener__ = function(E) {
658
660
  E.animationName === t && a(i);
659
661
  }, i.__resizeTriggers__.addEventListener(r, i.__resizeTriggers__.__animationListener__));
660
662
  }
661
- i.__resizeListeners__.push(z);
663
+ i.__resizeListeners__.push(L);
662
664
  }
663
665
  },
664
- removeResizeListener: function(i, z) {
665
- if (d)
666
- i.detachEvent("onresize", z);
667
- else if (i.__resizeListeners__.splice(i.__resizeListeners__.indexOf(z), 1), !i.__resizeListeners__.length) {
666
+ removeResizeListener: function(i, L) {
667
+ if (u)
668
+ i.detachEvent("onresize", L);
669
+ else if (i.__resizeListeners__.splice(i.__resizeListeners__.indexOf(L), 1), !i.__resizeListeners__.length) {
668
670
  i.removeEventListener("scroll", c, !0), i.__resizeTriggers__.__animationListener__ && (i.__resizeTriggers__.removeEventListener(r, i.__resizeTriggers__.__animationListener__), i.__resizeTriggers__.__animationListener__ = null);
669
671
  try {
670
672
  i.__resizeTriggers__ = !i.removeChild(i.__resizeTriggers__);
@@ -687,24 +689,24 @@ class sr extends ut {
687
689
  onResize: s
688
690
  } = this.props;
689
691
  if (this._parentNode) {
690
- const l = window.getComputedStyle(this._parentNode) || {}, a = parseFloat(l.paddingLeft || "0"), c = parseFloat(l.paddingRight || "0"), d = parseFloat(l.paddingTop || "0"), g = parseFloat(l.paddingBottom || "0"), h = this._parentNode.getBoundingClientRect(), C = h.height - d - g, i = h.width - a - c;
691
- if (!t && this.state.height !== C || !r && this.state.width !== i) {
692
+ const l = window.getComputedStyle(this._parentNode) || {}, a = parseFloat(l.paddingLeft || "0"), c = parseFloat(l.paddingRight || "0"), u = parseFloat(l.paddingTop || "0"), g = parseFloat(l.paddingBottom || "0"), h = this._parentNode.getBoundingClientRect(), I = h.height - u - g, i = h.width - a - c;
693
+ if (!t && this.state.height !== I || !r && this.state.width !== i) {
692
694
  this.setState({
693
- height: C,
695
+ height: I,
694
696
  width: i
695
697
  });
696
- const z = () => {
698
+ const L = () => {
697
699
  this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
698
700
  };
699
701
  typeof s == "function" && s({
700
- height: C,
702
+ height: I,
701
703
  width: i,
702
704
  // TODO Remove these params in the next major release
703
705
  get scaledHeight() {
704
- return z(), C;
706
+ return L(), I;
705
707
  },
706
708
  get scaledWidth() {
707
- return z(), i;
709
+ return L(), i;
708
710
  }
709
711
  });
710
712
  }
@@ -737,29 +739,29 @@ class sr extends ut {
737
739
  disableWidth: l = !1,
738
740
  doNotBailOutOnEmptyChildren: a = !1,
739
741
  nonce: c,
740
- onResize: d,
742
+ onResize: u,
741
743
  style: g = {},
742
744
  tagName: h = "div",
743
- ...C
745
+ ...I
744
746
  } = this.props, {
745
747
  height: i,
746
- width: z
747
- } = this.state, S = {
748
+ width: L
749
+ } = this.state, T = {
748
750
  overflow: "visible"
749
- }, I = {};
750
- let D = !1;
751
- return s || (i === 0 && (D = !0), S.height = 0, I.height = i, I.scaledHeight = i), l || (z === 0 && (D = !0), S.width = 0, I.width = z, I.scaledWidth = z), a && (D = !1), de(h, {
751
+ }, R = {};
752
+ let H = !1;
753
+ return s || (i === 0 && (H = !0), T.height = 0, R.height = i, R.scaledHeight = i), l || (L === 0 && (H = !0), T.width = 0, R.width = L, R.scaledWidth = L), a && (H = !1), ue(h, {
752
754
  ref: this._setRef,
753
755
  style: {
754
- ...S,
756
+ ...T,
755
757
  ...g
756
758
  },
757
- ...C
758
- }, !D && e(I));
759
+ ...I
760
+ }, !H && e(R));
759
761
  }
760
762
  }
761
- const ar = dt(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
762
- const s = Nt(
763
+ const ar = ft(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
764
+ const s = At(
763
765
  e,
764
766
  n,
765
767
  t.columnCount,
@@ -770,23 +772,23 @@ const ar = dt(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
770
772
  if (t.isDualPageWithCover) {
771
773
  const a = s === t.totalPages && t.totalPages % 2 === 0;
772
774
  if (e === 0 && s === 1 || a && n === 0) {
773
- const d = t.columnWidths.reduce((g, h) => g + h, 0);
774
- return /* @__PURE__ */ L(
775
+ const u = t.columnWidths.reduce((g, h) => g + h, 0);
776
+ return /* @__PURE__ */ w(
775
777
  "div",
776
778
  {
777
779
  style: {
778
780
  ...r,
779
- width: d,
781
+ width: u,
780
782
  display: "flex",
781
783
  justifyContent: "center",
782
784
  alignItems: "flex-start"
783
785
  },
784
- children: /* @__PURE__ */ L(Te, { style: { position: "relative" }, pageNumber: s }, s)
786
+ children: /* @__PURE__ */ w(Te, { style: { position: "relative" }, pageNumber: s }, s)
785
787
  }
786
788
  );
787
789
  }
788
790
  }
789
- return t.columnCount === 2 ? /* @__PURE__ */ L(
791
+ return t.columnCount === 2 ? /* @__PURE__ */ w(
790
792
  "div",
791
793
  {
792
794
  style: {
@@ -795,146 +797,146 @@ const ar = dt(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
795
797
  justifyContent: n === 0 ? "flex-end" : "flex-start",
796
798
  alignItems: "flex-start"
797
799
  },
798
- children: /* @__PURE__ */ L(Te, { style: { position: "relative" }, pageNumber: s }, s)
800
+ children: /* @__PURE__ */ w(Te, { style: { position: "relative" }, pageNumber: s }, s)
799
801
  }
800
- ) : /* @__PURE__ */ L(Te, { style: r, pageNumber: s }, s);
802
+ ) : /* @__PURE__ */ w(Te, { style: r, pageNumber: s }, s);
801
803
  }, nr), Ko = () => {
802
- const n = K(new qt()), { initialPage: e = 1, initialScrollMode: t } = Mt(), { pagesRef: r, setPagesRef: s, setContentRef: l } = Et(), { scrollToPage: a } = ht();
804
+ const n = K(new qt()), { initialPage: e = 1, initialScrollMode: t } = Mt(), { pagesRef: r, setPagesRef: s, setContentRef: l } = Et(), { scrollToPage: a } = gt();
803
805
  Ut(r);
804
806
  const {
805
807
  virtualScrollRef: c,
806
- getVirtualScrollRef: d,
808
+ getVirtualScrollRef: u,
807
809
  getPageScrollElementRef: g,
808
810
  getVirtualScrollableElementRef: h,
809
- setTotalInnerDimensions: C,
811
+ setTotalInnerDimensions: I,
810
812
  virtualScrollableElementRef: i,
811
- totalInnerDimensions: z,
812
- pageScrollElementRef: S
813
- } = pt(), I = K(e > 1), [D, M] = ft(e > 1), { nextPage: y, prevPage: E, setFocusedPage: P, focusedPage: o, totalPages: f } = gt(), { scrollMode: u } = wt(), { viewMode: m } = _t(), _ = K(null), { loading: p, error: T } = vt(), { passwordRequired: O } = Ft(), { LoaderImageComponent: W } = Wt(), x = K(
814
- z
815
- ), b = K({
813
+ totalInnerDimensions: L,
814
+ pageScrollElementRef: T
815
+ } = ht(), R = K(e > 1), [H, M] = mt(e > 1), { nextPage: b, prevPage: E, setFocusedPage: N, focusedPage: o, totalPages: f } = vt(), { scrollMode: d } = Ct(), { viewMode: m } = wt(), C = K(null), { loading: p, error: S } = _t(), { passwordRequired: O } = Ft(), { LoaderImageComponent: P } = Pt(), x = K(
816
+ L
817
+ ), z = K({
816
818
  viewMode: m,
817
- scrollMode: u
818
- }), R = K(!1), A = K(), { isFullScreen: H } = It(), {
819
+ scrollMode: d
820
+ }), y = K(!1), W = K(), { isFullScreen: k } = It(), {
819
821
  pageDimension: U,
820
- rowCount: N,
822
+ rowCount: A,
821
823
  rowHeight: G,
822
- columnCount: F,
824
+ columnCount: D,
823
825
  columnWidth: V,
824
826
  estimatedColumnWidth: te,
825
827
  estimatedRowHeight: re,
826
828
  totalDimension: ae
827
- } = mt(), ne = Ot(z, 100), { onScroll: J, onTextSelect: he } = kt();
829
+ } = pt(), ne = Ot(L, 100), { onScroll: J, onTextSelect: he } = kt();
828
830
  Vt({ onTextSelect: he, pagesRef: r });
829
831
  const Q = K();
830
- At(F, N, i, m);
832
+ Wt(D, A, i, m);
831
833
  const $ = K({
832
834
  scrollTop: 0,
833
835
  scrollLeft: 0
834
836
  });
835
- zt(r);
836
- const { isPressed: j } = yt(), { selectionMode: le } = bt(), { initializeGrabScroll: ce, resetGrabState: Xe } = Lt({
837
+ Lt(r);
838
+ const { isPressed: j } = yt(), { selectionMode: le } = bt(), { initializeGrabScroll: ce, resetGrabState: Ye } = zt({
837
839
  isPressed: j
838
- }), ie = Ie(() => le === Ct.HAND, [le]), Ye = Ie(() => {
839
- const v = Array.from({ length: F }, (w, B) => V(B));
840
+ }), ie = Ie(() => le === St.HAND, [le]), et = Ie(() => {
841
+ const v = Array.from({ length: D }, (_, B) => V(B));
840
842
  return {
841
- columnCount: F,
842
- isDualPageWithCover: m === xe.DUAL_PAGE_WITH_COVER,
843
+ columnCount: D,
844
+ isDualPageWithCover: m === Re.DUAL_PAGE_WITH_COVER,
843
845
  columnWidths: v,
844
846
  totalPages: f
845
847
  };
846
- }, [F, m, V, f]), ge = se(
848
+ }, [D, m, V, f]), ge = se(
847
849
  (v) => {
848
- const w = document.activeElement !== r;
849
- !H && w || (["ArrowUp", "ArrowLeft"].includes(v.key) ? (v.preventDefault(), E()) : ["ArrowDown", "ArrowRight"].includes(v.key) && (v.preventDefault(), y()));
850
+ const _ = document.activeElement !== r;
851
+ !k && _ || (["ArrowUp", "ArrowLeft"].includes(v.key) ? (v.preventDefault(), E()) : ["ArrowDown", "ArrowRight"].includes(v.key) && (v.preventDefault(), b()));
850
852
  },
851
- [y, E, H, u]
853
+ [b, E, k, d]
852
854
  );
853
855
  ee(() => (window.addEventListener("keydown", ge), () => {
854
856
  window.removeEventListener("keydown", ge);
855
857
  }), [ge]), ee(() => {
856
- if (_.current && (_.current.style.position = "relative"), !!c)
857
- for (let v = 0; v < N; v++)
858
- for (let w = 0; w < F; w++)
858
+ if (C.current && (C.current.style.position = "relative"), !!c)
859
+ for (let v = 0; v < A; v++)
860
+ for (let _ = 0; _ < D; _++)
859
861
  c.resetAfterIndices({
860
- columnIndex: w,
862
+ columnIndex: _,
861
863
  rowIndex: v,
862
864
  shouldForceUpdate: !0
863
865
  });
864
- }, [N, F, U, c]);
865
- const et = se(
866
- (v, w) => {
866
+ }, [A, D, U, c]);
867
+ const tt = se(
868
+ (v, _) => {
867
869
  if (!i)
868
870
  return { scrollTop: 0, scrollLeft: 0 };
869
- const B = $.current.scrollTop > w, X = $.current.scrollLeft > v;
871
+ const B = $.current.scrollTop > _, X = $.current.scrollLeft > v;
870
872
  return B || X ? $.current : {
871
873
  scrollTop: i.scrollTop,
872
874
  scrollLeft: i.scrollLeft
873
875
  };
874
876
  },
875
877
  [i]
876
- ), Pe = se(
877
- (v, w) => {
878
- if (b.current.viewMode !== m || b.current.scrollMode !== u) {
879
- Q.current && clearTimeout(Q.current), R.current = !0, a(o, "auto"), Q.current = setTimeout(() => {
878
+ ), We = se(
879
+ (v, _) => {
880
+ if (z.current.viewMode !== m || z.current.scrollMode !== d) {
881
+ Q.current && clearTimeout(Q.current), y.current = !0, a(o, "auto"), Q.current = setTimeout(() => {
880
882
  requestAnimationFrame(() => {
881
- b.current = { viewMode: m, scrollMode: u };
883
+ z.current = { viewMode: m, scrollMode: d };
882
884
  });
883
885
  }, 100);
884
886
  return;
885
887
  }
886
888
  const X = v.scrollTop, ve = v.scrollLeft;
887
- if (!w.height || !w.width)
889
+ if (!_.height || !_.width)
888
890
  return;
889
- R.current = !0;
890
- const { height: Y, width: _e } = w, { height: we, width: Ce } = x.current;
891
+ y.current = !0;
892
+ const { height: Y, width: _e } = _, { height: we, width: Ce } = x.current;
891
893
  if (we === Y && Ce === _e)
892
894
  return;
893
- if (I.current && e > 1) {
895
+ if (R.current && e > 1) {
894
896
  x.current = {
895
- height: w.height,
896
- width: w.width
897
+ height: _.height,
898
+ width: _.width
897
899
  };
898
900
  return;
899
901
  }
900
902
  if (!we || !Ce) {
901
903
  x.current = {
902
- height: w.height,
903
- width: w.width
904
+ height: _.height,
905
+ width: _.width
904
906
  };
905
907
  return;
906
908
  }
907
- const nt = X / we * Y, it = ve / Ce * _e, st = Math.round(Math.min(nt, Y)) || 0, at = Math.round(Math.min(it, _e)) || 0;
908
- A.current = setTimeout(() => {
909
+ const it = X / we * Y, st = ve / Ce * _e, at = Math.round(Math.min(it, Y)) || 0, lt = Math.round(Math.min(st, _e)) || 0;
910
+ W.current = setTimeout(() => {
909
911
  requestAnimationFrame(() => {
910
912
  i == null || i.scrollTo({
911
- top: st,
912
- left: at,
913
+ top: at,
914
+ left: lt,
913
915
  behavior: "auto"
914
916
  });
915
917
  });
916
918
  }, 0), x.current = {
917
- height: w.height,
918
- width: w.width
919
+ height: _.height,
920
+ width: _.width
919
921
  };
920
922
  },
921
- [i, m, u, a, e]
923
+ [i, m, d, a, e]
922
924
  );
923
925
  ee(() => {
924
- clearTimeout(A.current);
925
- const v = Array.from({ length: N }).reduce(
926
+ clearTimeout(W.current);
927
+ const v = Array.from({ length: A }).reduce(
926
928
  (X, ve, Y) => X + G(Y),
927
929
  0
928
- ), w = Array.from({ length: F }).reduce(
930
+ ), _ = Array.from({ length: D }).reduce(
929
931
  (X, ve, Y) => X + V(Y),
930
932
  0
931
- ), B = et(w, v);
932
- $.current = B, Pe(B, { height: v, width: w }), C({
933
+ ), B = tt(_, v);
934
+ $.current = B, We(B, { height: v, width: _ }), I({
933
935
  height: v,
934
- width: w
936
+ width: _
935
937
  });
936
- }, [U, N, F, Pe]);
937
- const tt = se(
938
+ }, [U, A, D, We]);
939
+ const rt = se(
938
940
  (v) => {
939
941
  $.current = {
940
942
  scrollTop: v.scrollTop,
@@ -945,102 +947,102 @@ const ar = dt(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
945
947
  );
946
948
  ee(() => {
947
949
  if (J)
948
- return S && S.addEventListener("scroll", J), i && i.addEventListener("scroll", J), () => {
949
- S == null || S.removeEventListener("scroll", J), i == null || i.removeEventListener("scroll", J);
950
+ return T && T.addEventListener("scroll", J), i && i.addEventListener("scroll", J), () => {
951
+ T == null || T.removeEventListener("scroll", J), i == null || i.removeEventListener("scroll", J);
950
952
  };
951
- }, [i, S, J]), ee(() => () => {
953
+ }, [i, T, J]), ee(() => () => {
952
954
  Q.current && clearTimeout(Q.current);
953
955
  }, []);
954
- const rt = Ie(() => ue(k["rp-pages-container"], {
955
- [k["rp-cursor-grab"]]: ie && !j,
956
- [k["rp-cursor-grabbing"]]: ie && j
957
- }), [ie, j]), ot = se(
956
+ const ot = Ie(() => de(F["rp-pages-container"], {
957
+ [F["rp-cursor-grab"]]: ie && !j,
958
+ [F["rp-cursor-grabbing"]]: ie && j
959
+ }), [ie, j]), nt = se(
958
960
  (v) => {
959
961
  if (ie && v) {
960
- const w = ue(k["rp-pages"]), B = document.querySelector(`.${w}`);
962
+ const _ = de(F["rp-pages"]), B = document.querySelector(`.${_}`);
961
963
  ce(B);
962
964
  }
963
965
  },
964
- [ie, ce, k]
966
+ [ie, ce, F]
965
967
  );
966
968
  return ee(() => {
967
- p && Xe();
969
+ p && Ye();
968
970
  }, [p]), ee(() => {
969
- if (ne.height === 0 || !I.current)
971
+ if (ne.height === 0 || !R.current)
970
972
  return;
971
- if (t === Re.PAGE_SCROLLING) {
972
- e !== o && S && P(e), I.current = !1, M(!1);
973
+ if (t === xe.PAGE_SCROLLING) {
974
+ e !== o && T && N(e), R.current = !1, M(!1);
973
975
  return;
974
976
  }
975
- !i || (a(e, "auto"), !(i.scrollLeft > 0 || i.scrollTop > 0)) || (P(e), I.current = !1, M(!1));
977
+ !i || (a(e, "auto"), !(i.scrollLeft > 0 || i.scrollTop > 0)) || (N(e), R.current = !1, M(!1));
976
978
  }, [
977
979
  a,
978
980
  t,
979
- S,
980
- P,
981
+ T,
982
+ N,
981
983
  ne,
982
984
  i
983
- ]), /* @__PURE__ */ Se(lt, { children: [
984
- /* @__PURE__ */ L(Ht, { ref: l, children: /* @__PURE__ */ L(
985
+ ]), /* @__PURE__ */ Se(ct, { children: [
986
+ /* @__PURE__ */ w(Ht, { ref: l, children: /* @__PURE__ */ w(
985
987
  Dt,
986
988
  {
987
989
  ref: s,
988
990
  tabIndex: -1,
989
- className: rt,
991
+ className: ot,
990
992
  style: {
991
993
  "--scale-round-x": `${Ae(n.current.sx)[1]}px`,
992
994
  "--scale-round-y": `${Ae(n.current.sy)[1]}px`
993
995
  },
994
- children: /* @__PURE__ */ L(sr, { style: { minHeight: "50px" }, children: ({ width: v, height: w }) => /* @__PURE__ */ L(
996
+ children: /* @__PURE__ */ w(sr, { style: { minHeight: "50px" }, children: ({ width: v, height: _ }) => /* @__PURE__ */ w(
995
997
  "div",
996
998
  {
997
999
  "data-rp": "pages",
998
- ref: ot,
1000
+ ref: nt,
999
1001
  style: {
1000
1002
  width: v,
1001
- height: w,
1002
- ...D && { visibility: "hidden" }
1003
+ height: _,
1004
+ ...H && { visibility: "hidden" }
1003
1005
  },
1004
- children: u === Re.PAGE_SCROLLING ? /* @__PURE__ */ L(
1006
+ children: d === xe.PAGE_SCROLLING ? S === ye.INVALID_OR_CORRUPTED_PDF ? /* @__PURE__ */ w("div", { className: F["rp-load-error"], style: { width: v, height: _ }, children: /* @__PURE__ */ w("div", { className: F["rp-load-error-message"], children: "Invalid or corrupted PDF file." }) }) : /* @__PURE__ */ w(
1005
1007
  "div",
1006
1008
  {
1007
1009
  ref: g,
1008
- style: { width: v, height: w },
1009
- className: ue(k["rp-pages"], k["rp-page-scrolling-wrapper"]),
1010
- children: m === xe.DUAL_PAGE ? /* @__PURE__ */ L(Tt, { widths: V, heights: G }) : m === xe.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ L(xt, { widths: V, heights: G }) : /* @__PURE__ */ L(Rt, { widths: V, heights: G })
1010
+ style: { width: v, height: _ },
1011
+ className: de(F["rp-pages"], F["rp-page-scrolling-wrapper"]),
1012
+ children: m === Re.DUAL_PAGE ? /* @__PURE__ */ w(Tt, { widths: V, heights: G }) : m === Re.DUAL_PAGE_WITH_COVER ? /* @__PURE__ */ w(Rt, { widths: V, heights: G }) : /* @__PURE__ */ w(xt, { widths: V, heights: G })
1011
1013
  }
1012
- ) : re ? /* @__PURE__ */ L(
1014
+ ) : re ? /* @__PURE__ */ w(
1013
1015
  tr,
1014
1016
  {
1015
- ref: d,
1016
- itemData: Ye,
1017
+ ref: u,
1018
+ itemData: et,
1017
1019
  outerRef: h,
1018
- innerRef: _,
1019
- onScroll: tt,
1020
- columnCount: F,
1020
+ innerRef: C,
1021
+ onScroll: rt,
1022
+ columnCount: D,
1021
1023
  columnWidth: V,
1022
1024
  rowHeight: G,
1023
- height: w,
1025
+ height: _,
1024
1026
  width: v,
1025
1027
  estimatedColumnWidth: te,
1026
1028
  estimatedRowHeight: re,
1027
- rowCount: N,
1028
- className: ue(
1029
- k["rp-pages"],
1030
- u === Re.HORIZONTAL_SCROLLING ? k["rp-pages-horizontal-scroll"] : ""
1029
+ rowCount: A,
1030
+ className: de(
1031
+ F["rp-pages"],
1032
+ d === xe.HORIZONTAL_SCROLLING ? F["rp-pages-horizontal-scroll"] : ""
1031
1033
  ),
1032
1034
  style: {
1033
1035
  "--rp-pages-height": `${ae.height}px`,
1034
1036
  "--rp-pages-width": `${ae.width}px`,
1035
- "--rp-row-count": `${N}`,
1036
- "--rp-column-count": `${F}`
1037
+ "--rp-row-count": `${A}`,
1038
+ "--rp-column-count": `${D}`
1037
1039
  },
1038
1040
  children: ar
1039
1041
  }
1040
- ) : !p && !T ? /* @__PURE__ */ L(
1042
+ ) : !p && !S ? /* @__PURE__ */ w(
1041
1043
  "div",
1042
1044
  {
1043
- className: k["rp-loader"],
1045
+ className: F["rp-loader"],
1044
1046
  style: {
1045
1047
  display: "flex",
1046
1048
  justifyContent: "center",
@@ -1048,24 +1050,24 @@ const ar = dt(({ columnIndex: n, rowIndex: e, data: t, style: r }) => {
1048
1050
  height: "100%",
1049
1051
  width: "100%"
1050
1052
  },
1051
- children: W && /* @__PURE__ */ L(W, {})
1053
+ children: P && /* @__PURE__ */ w(P, {})
1052
1054
  }
1053
- ) : T === St.NOT_SUPPORTED ? /* @__PURE__ */ L("div", { className: k["rp-not-supported"], children: /* @__PURE__ */ Se("div", { className: k["rp-not-supported-content"], children: [
1055
+ ) : S === ye.NOT_SUPPORTED ? /* @__PURE__ */ w("div", { className: F["rp-not-supported"], children: /* @__PURE__ */ Se("div", { className: F["rp-not-supported-content"], children: [
1054
1056
  "React PDF Kit is unable to render on this browser. Please use the supported browsers from the list below:",
1055
- /* @__PURE__ */ L("div", { children: /* @__PURE__ */ Se("ul", { className: k["rp-not-supported-list"], children: [
1056
- /* @__PURE__ */ L("li", { children: "Chrome 126+" }),
1057
- /* @__PURE__ */ L("li", { children: "Edge 126+" }),
1058
- /* @__PURE__ */ L("li", { children: "Firefox 126+" }),
1059
- /* @__PURE__ */ L("li", { children: "Safari 18.4+" }),
1060
- /* @__PURE__ */ L("li", { children: "Safari iOS 18.4+" }),
1061
- /* @__PURE__ */ L("li", { children: "Chrome Android 126+" })
1057
+ /* @__PURE__ */ w("div", { children: /* @__PURE__ */ Se("ul", { className: F["rp-not-supported-list"], children: [
1058
+ /* @__PURE__ */ w("li", { children: "Chrome 126+" }),
1059
+ /* @__PURE__ */ w("li", { children: "Edge 126+" }),
1060
+ /* @__PURE__ */ w("li", { children: "Firefox 126+" }),
1061
+ /* @__PURE__ */ w("li", { children: "Safari 18.4+" }),
1062
+ /* @__PURE__ */ w("li", { children: "Safari iOS 18.4+" }),
1063
+ /* @__PURE__ */ w("li", { children: "Chrome Android 126+" })
1062
1064
  ] }) })
1063
- ] }) }) : null
1065
+ ] }) }) : S === ye.INVALID_OR_CORRUPTED_PDF ? /* @__PURE__ */ w("div", { className: F["rp-load-error"], children: /* @__PURE__ */ w("div", { className: F["rp-load-error-message"], children: "Invalid or corrupted PDF file." }) }) : null
1064
1066
  }
1065
1067
  ) })
1066
1068
  }
1067
1069
  ) }),
1068
- O && /* @__PURE__ */ L(Pt, {})
1070
+ O && /* @__PURE__ */ w(Nt, {})
1069
1071
  ] });
1070
1072
  };
1071
1073
  export {