@react-pdf-kit/viewer 0.0.0-experimental.2 → 0.0.0-experimental.4

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