@sheetxl/studio-mui 0.4.19 → 0.4.21

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 (98) hide show
  1. package/browser/cjs/B1KlR2XYFpYbKjYS.cjs +20 -0
  2. package/browser/cjs/{afHzhXTMVhLQJ6uC.cjs → B1RMsexbz4bNlty_.cjs} +1 -1
  3. package/browser/cjs/B32faQpVaX1tkPuc.cjs +6 -0
  4. package/browser/cjs/B3XiHrRxW1LxML7F.cjs +6 -0
  5. package/browser/cjs/BGikYpeNpjwvXUdQ.cjs +18 -0
  6. package/browser/cjs/BY5l7DteiFtb2AKy.cjs +6 -0
  7. package/browser/cjs/Bb0Hd2RE7iVWVbm8.cjs +6 -0
  8. package/browser/cjs/C3EZkRIKfQURg9hX.cjs +6 -0
  9. package/browser/cjs/C7r573AdygYrVVEJ.cjs +7 -0
  10. package/browser/cjs/DEEknE8ARp0mc7fk.cjs +6 -0
  11. package/browser/cjs/DZwzUUHda3jr5jo4.cjs +6 -0
  12. package/browser/cjs/index.cjs +2 -2
  13. package/browser/cjs/veQZSq7ekc6G1FZT.cjs +42 -0
  14. package/browser/esm/B84RbTkXZiq6XIdH.mjs +49 -0
  15. package/browser/esm/{C4lgCnqxoHUTMKx0.mjs → BLy-hRTZkVfaGrcr.mjs} +1 -1
  16. package/browser/esm/Bapmv0WdnDq3Jl_q.mjs +53 -0
  17. package/browser/esm/C0OuiugFYjsjbY8q.mjs +46 -0
  18. package/browser/esm/{6nabbOchsfGHTDbJ.mjs → CGVN-NJF8ZTm9apo.mjs} +11 -10
  19. package/browser/esm/CcLpUDzJOdfqQ8Kf.mjs +25 -0
  20. package/browser/esm/Csg-hJrzm9r4vJrm.mjs +2156 -0
  21. package/browser/esm/{DwyDpojQzn8Yb0Z3.mjs → DHf2N2UY78nZFge3.mjs} +100 -98
  22. package/browser/esm/Dlc8L0qha0mZFIkY.mjs +62 -0
  23. package/browser/esm/{Duk7LVR9m02nk_H1.mjs → Dv-0R5pQwEnowzoO.mjs} +87 -85
  24. package/browser/esm/index.mjs +29 -29
  25. package/browser/esm/mVKwmIdSj4ua1Qce.mjs +4443 -0
  26. package/browser/esm/{aeeg2i5lmw2EnSq8.mjs → sHK4zKkWLGt2hVmW.mjs} +27 -26
  27. package/licenses/dependencies.txt +71 -342
  28. package/node/esm/{C1qlFAMFUg7JxINj.mjs → 49Eux5a_I5wZ-jfq.mjs} +29 -28
  29. package/node/esm/{Svd1DLPJnYKhJsxn.mjs → B00pGeZ7sj6QOFgF.mjs} +4 -3
  30. package/node/esm/{Cqh-VwF8iLFUBQG2.mjs → BEtxwx_Ji4aFNg8V.mjs} +79 -78
  31. package/node/esm/{BOlA6nKvsuwJ8-qE.mjs → BTcBIT144Lil18l-.mjs} +13 -11
  32. package/node/esm/{SdVxzy9D4jvK5ILt.mjs → Bw_f4uhXHpg1RA6Z.mjs} +7 -6
  33. package/node/esm/CGrG-gsnGd-Pn_T2.mjs +88 -0
  34. package/node/esm/CiUfb3MQCUC2McDP.mjs +46 -0
  35. package/node/esm/D1bjybdBQ28bumrW.mjs +63 -0
  36. package/node/esm/{wuBONOGgEy1w5A3Q.mjs → Dcnd4LiYyGf2eaNl.mjs} +23 -22
  37. package/node/esm/{BbLVlH-VHXBiyGbB.mjs → DiLUM75s3D56Y6Fx.mjs} +11 -10
  38. package/node/esm/index.mjs +2378 -18426
  39. package/package.json +8 -8
  40. package/browser/cjs/9JbHyHSHGCO4uFHn.cjs +0 -7
  41. package/browser/cjs/B17ClH6YVt0_UP8s.cjs +0 -6
  42. package/browser/cjs/B9LTfguTHj9uQv3h.cjs +0 -6
  43. package/browser/cjs/BYWh4kkrXJKKl2Ju.cjs +0 -145
  44. package/browser/cjs/BYrNOLTwEhs6LHAw.cjs +0 -6
  45. package/browser/cjs/Bh8xJY_qVp_q9NdJ.cjs +0 -6
  46. package/browser/cjs/Bl5l1B_eznDfB_7v.cjs +0 -18
  47. package/browser/cjs/C1LBzI2ntslIKFn5.cjs +0 -6
  48. package/browser/cjs/CGWf__jrNH3xfu2y.cjs +0 -161
  49. package/browser/cjs/CGlk1dj000Bm5cqP.cjs +0 -7
  50. package/browser/cjs/CX_y7y31Q5qi020q.cjs +0 -6
  51. package/browser/cjs/Cby5RVhO-aNkuWsV.cjs +0 -11
  52. package/browser/cjs/D2CoaVzteKVTLz2u.cjs +0 -42
  53. package/browser/cjs/D4ge-OwnSGkzaQnk.cjs +0 -15
  54. package/browser/cjs/D54KO7Qf1gFYpUYh.cjs +0 -11
  55. package/browser/cjs/D5Hr7ebLiJgvcT0k.cjs +0 -6
  56. package/browser/cjs/D6qxm65mk30iMCfQ.cjs +0 -6
  57. package/browser/cjs/DIR6Yr7FCZPYWi4-.cjs +0 -6
  58. package/browser/cjs/DeklxocxxZiZyZ5u.cjs +0 -6
  59. package/browser/cjs/Dh2Z7N-jImJZemiw.cjs +0 -6
  60. package/browser/cjs/Dngll9GyDqkTUUmu.cjs +0 -6
  61. package/browser/cjs/KmAkK4F7kLQEM3IN.cjs +0 -12
  62. package/browser/cjs/n8wDl6JTlhLU6ZAW.cjs +0 -16
  63. package/browser/cjs/zr0HW2FkaHX7brxh.cjs +0 -110
  64. package/browser/esm/B8eNugj_qKnbe7K9.mjs +0 -59
  65. package/browser/esm/BPRkMu1MFxUWK930.mjs +0 -3803
  66. package/browser/esm/BQtrstD4gTIutZpE.mjs +0 -1467
  67. package/browser/esm/BeT_3zf80WoubGnC.mjs +0 -1352
  68. package/browser/esm/C226zpF9x3cqGDep.mjs +0 -44
  69. package/browser/esm/C52hEZh6H2W5Zw5u.mjs +0 -2250
  70. package/browser/esm/CJi45DDPGy79h3Hk.mjs +0 -1366
  71. package/browser/esm/CSAsCpXnzBKwTizz.mjs +0 -23326
  72. package/browser/esm/ChetmIXTvR3tA23A.mjs +0 -48
  73. package/browser/esm/CtAFduFwOuqSdkvi.mjs +0 -23
  74. package/browser/esm/D1mFp2w9djJ0V4vm.mjs +0 -52
  75. package/browser/esm/DA83VkmtEXnqG2ye.mjs +0 -43
  76. package/browser/esm/Dy_zBluT96wehR25.mjs +0 -46
  77. package/browser/esm/NwT_h_qyOIJUd95T.mjs +0 -392
  78. package/browser/esm/eNfgzWFw915mA1DM.mjs +0 -84
  79. package/browser/esm/i07lQ5p_zaWwjifI.mjs +0 -12
  80. package/browser/esm/mWKbTdOrhJijxGkQ.mjs +0 -13391
  81. package/browser/esm/qTwpcY21ZDbsJF8q.mjs +0 -424
  82. package/browser/esm/rOu2mn5CpwGjRPMt.mjs +0 -1672
  83. package/browser/esm/xBoO8UGcKLTEtu2_.mjs +0 -1703
  84. package/node/esm/8IRz_tiw9gL3CiTm.mjs +0 -46
  85. package/node/esm/BGuyZxOceFDiCkHS.mjs +0 -553
  86. package/node/esm/BRc35RfDs9NeSBil.mjs +0 -78
  87. package/node/esm/BWNYjBRxl8-kaqWc.mjs +0 -1706
  88. package/node/esm/Bdk5FW-41aJV-x0f.mjs +0 -392
  89. package/node/esm/C2KYv5fsjkP4dceu.mjs +0 -86
  90. package/node/esm/C7eBwbZmMMcQeZ5y.mjs +0 -1479
  91. package/node/esm/CCmhTOlFNku7bidD.mjs +0 -44
  92. package/node/esm/COWuJnOkG4AgfLpx.mjs +0 -3776
  93. package/node/esm/CcxYuxLYIW_z4w-n.mjs +0 -1378
  94. package/node/esm/DO-FR-M-Iy43f7rk.mjs +0 -60
  95. package/node/esm/DOa-YBJSa8QO8ypH.mjs +0 -1246
  96. package/node/esm/DXgMMPZD2XcdNWPg.mjs +0 -44
  97. package/node/esm/DXlF9nEg2kAr3Ykp.mjs +0 -13464
  98. package/node/esm/FcospSz9-0aW4gFs.mjs +0 -1719
@@ -1,2250 +0,0 @@
1
- import { jsxs as Ee, jsx as W } from "react/jsx-runtime";
2
- import { Box as ue, TextField as Qt, InputAdornment as eo, IconButton as to, FormControlLabel as oo, Checkbox as no, Typography as ro, TableCell as We, DialogContent as io } from "@mui/material";
3
- import { o as lo, p as He, q as so, x as ao, z as co, _ as uo, C as N, E as U, G as ho, Y as fo, a as St, g as de, J as Se, K as po, j as mo } from "./CSAsCpXnzBKwTizz.mjs";
4
- import * as x from "react";
5
- import yt, { cloneElement as go, useState as he, useMemo as vo, useEffect as De } from "react";
6
- import { Close as _o } from "@mui/icons-material";
7
- import So, { internal_serializeStyles as K, internal_mutateStyles as yo } from "@mui/styled-engine";
8
- import { alpha as fe } from "@mui/system";
9
- /**
10
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.19
11
- *
12
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
13
- * License: The license can be found at https://www.sheetxl.com/license.
14
- */
15
- const wo = lo();
16
- function ye(o) {
17
- return o !== "ownerState" && o !== "theme" && o !== "sx" && o !== "as";
18
- }
19
- function q(o, e) {
20
- return e && o && typeof o == "object" && o.styles && !o.styles.startsWith("@layer") && (o.styles = `@layer ${e}{${String(o.styles)}}`), o;
21
- }
22
- function Co(o) {
23
- return o ? (e, t) => t[o] : null;
24
- }
25
- function ge(o, e, t) {
26
- const n = typeof e == "function" ? e(o) : e;
27
- if (Array.isArray(n)) return n.flatMap((r) => ge(o, r, t));
28
- if (Array.isArray(n?.variants)) {
29
- let r;
30
- if (n.isProcessed) r = t ? q(n.style, t) : n.style;
31
- else {
32
- const { variants: l, ...i } = n;
33
- r = t ? q(K(i), t) : i;
34
- }
35
- return wt(o, n.variants, [r], t);
36
- }
37
- return n?.isProcessed ? t ? q(K(n.style), t) : n.style : t ? q(K(n), t) : n;
38
- }
39
- function wt(o, e, t = [], n = void 0) {
40
- let r;
41
- e: for (let l = 0; l < e.length; l += 1) {
42
- const i = e[l];
43
- if (typeof i.props == "function") {
44
- if (r ??= { ...o, ...o.ownerState, ownerState: o.ownerState }, !i.props(r)) continue;
45
- } else for (const a in i.props) if (o[a] !== i.props[a] && o.ownerState?.[a] !== i.props[a]) continue e;
46
- typeof i.style == "function" ? (r ??= { ...o, ...o.ownerState, ownerState: o.ownerState }, t.push(n ? q(K(i.style(r)), n) : i.style(r))) : t.push(n ? q(K(i.style), n) : i.style);
47
- }
48
- return t;
49
- }
50
- function xo(o) {
51
- return o && o.charAt(0).toLowerCase() + o.slice(1);
52
- }
53
- const Ro = function(o = {}) {
54
- const { themeId: e, defaultTheme: t = wo, rootShouldForwardProp: n = ye, slotShouldForwardProp: r = ye } = o;
55
- function l(i) {
56
- (function(a, s, c) {
57
- a.theme = function(u) {
58
- for (const d in u) return !1;
59
- return !0;
60
- }(a.theme) ? c : a.theme[s] || a.theme;
61
- })(i, e, t);
62
- }
63
- return (i, a = {}) => {
64
- yo(i, (C) => C.filter((R) => R !== He));
65
- const { name: s, slot: c, skipVariantsResolver: u, skipSx: d, overridesResolver: f = Co(xo(c)), ...h } = a, g = s && s.startsWith("Mui") || c ? "components" : "custom", v = u !== void 0 ? u : c && c !== "Root" && c !== "root" || !1, _ = d || !1;
66
- let S = ye;
67
- c === "Root" || c === "root" ? S = n : c ? S = r : function(C) {
68
- return typeof C == "string" && C.charCodeAt(0) > 96;
69
- }(i) && (S = void 0);
70
- const m = So(i, { shouldForwardProp: S, label: void 0, ...h }), y = (C) => {
71
- if (C.__emotion_real === C) return C;
72
- if (typeof C == "function") return function(R) {
73
- return ge(R, C, R.theme.modularCssLayers ? g : void 0);
74
- };
75
- if (so(C)) {
76
- const R = function(T) {
77
- const { variants: b, ...I } = T, O = { variants: b, style: K(I), isProcessed: !0 };
78
- return O.style === I || b && b.forEach((z) => {
79
- typeof z.style != "function" && (z.style = K(z.style));
80
- }), O;
81
- }(C);
82
- return function(T) {
83
- return R.variants ? ge(T, R, T.theme.modularCssLayers ? g : void 0) : T.theme.modularCssLayers ? q(R.style, g) : R.style;
84
- };
85
- }
86
- return C;
87
- }, w = (...C) => {
88
- const R = [], T = C.map(y), b = [];
89
- if (R.push(l), s && f && b.push(function(z) {
90
- const L = z.theme, k = L.components?.[s]?.styleOverrides;
91
- if (!k) return null;
92
- const E = {};
93
- for (const J in k) E[J] = ge(z, k[J], z.theme.modularCssLayers ? "theme" : void 0);
94
- return f(z, E);
95
- }), s && !v && b.push(function(z) {
96
- const L = z.theme, k = L?.components?.[s]?.variants;
97
- return k ? wt(z, k, [], z.theme.modularCssLayers ? "theme" : void 0) : null;
98
- }), _ || b.push(He), Array.isArray(T[0])) {
99
- const z = T.shift(), L = new Array(R.length).fill(""), k = new Array(b.length).fill("");
100
- let E;
101
- E = [...L, ...z, ...k], E.raw = [...L, ...z.raw, ...k], R.unshift(E);
102
- }
103
- const I = [...R, ...T, ...b], O = m(...I);
104
- return i.muiName && (O.muiName = i.muiName), O;
105
- };
106
- return m.withConfig && (w.withConfig = m.withConfig), w;
107
- };
108
- }({ themeId: ao, defaultTheme: co, rootShouldForwardProp: (o) => /* @__PURE__ */ function(e) {
109
- return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as";
110
- }(o) && o !== "classes" });
111
- function G(o, e) {
112
- if (!(o instanceof e)) throw new TypeError("Cannot call a class as a function");
113
- }
114
- function $(o) {
115
- return $ = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
116
- return typeof e;
117
- } : function(e) {
118
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
119
- }, $(o);
120
- }
121
- function Ct(o) {
122
- var e = function(t, n) {
123
- if ($(t) != "object" || !t) return t;
124
- var r = t[Symbol.toPrimitive];
125
- if (r !== void 0) {
126
- var l = r.call(t, n);
127
- if ($(l) != "object") return l;
128
- throw new TypeError("@@toPrimitive must return a primitive value.");
129
- }
130
- return String(t);
131
- }(o, "string");
132
- return $(e) == "symbol" ? e : e + "";
133
- }
134
- function je(o, e) {
135
- for (var t = 0; t < e.length; t++) {
136
- var n = e[t];
137
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(o, Ct(n.key), n);
138
- }
139
- }
140
- function A(o, e, t) {
141
- return e && je(o.prototype, e), t && je(o, t), Object.defineProperty(o, "prototype", { writable: !1 }), o;
142
- }
143
- function H(o, e) {
144
- if (e && ($(e) == "object" || typeof e == "function")) return e;
145
- if (e !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
146
- return function(t) {
147
- if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
148
- return t;
149
- }(o);
150
- }
151
- function P(o) {
152
- return P = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
153
- return e.__proto__ || Object.getPrototypeOf(e);
154
- }, P(o);
155
- }
156
- function D(o, e) {
157
- if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
158
- o.prototype = Object.create(e && e.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), Object.defineProperty(o, "prototype", { writable: !1 }), e && uo(o, e);
159
- }
160
- function p(o, e, t) {
161
- return (e = Ct(e)) in o ? Object.defineProperty(o, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : o[e] = t, o;
162
- }
163
- function xt() {
164
- var o = this.constructor.getDerivedStateFromProps(this.props, this.state);
165
- o != null && this.setState(o);
166
- }
167
- function Rt(o) {
168
- this.setState(function(e) {
169
- var t = this.constructor.getDerivedStateFromProps(o, e);
170
- return t ?? null;
171
- }.bind(this));
172
- }
173
- function bt(o, e) {
174
- try {
175
- var t = this.props, n = this.state;
176
- this.props = o, this.state = e, this.__reactInternalSnapshotFlag = !0, this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(t, n);
177
- } finally {
178
- this.props = t, this.state = n;
179
- }
180
- }
181
- function ce(o) {
182
- var e = o.prototype;
183
- if (!e || !e.isReactComponent) throw new Error("Can only polyfill class components");
184
- if (typeof o.getDerivedStateFromProps != "function" && typeof e.getSnapshotBeforeUpdate != "function") return o;
185
- var t = null, n = null, r = null;
186
- if (typeof e.componentWillMount == "function" ? t = "componentWillMount" : typeof e.UNSAFE_componentWillMount == "function" && (t = "UNSAFE_componentWillMount"), typeof e.componentWillReceiveProps == "function" ? n = "componentWillReceiveProps" : typeof e.UNSAFE_componentWillReceiveProps == "function" && (n = "UNSAFE_componentWillReceiveProps"), typeof e.componentWillUpdate == "function" ? r = "componentWillUpdate" : typeof e.UNSAFE_componentWillUpdate == "function" && (r = "UNSAFE_componentWillUpdate"), t !== null || n !== null || r !== null) {
187
- var l = o.displayName || o.name, i = typeof o.getDerivedStateFromProps == "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
188
- throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
189
-
190
- ` + l + " uses " + i + " but also contains the following legacy lifecycles:" + (t !== null ? `
191
- ` + t : "") + (n !== null ? `
192
- ` + n : "") + (r !== null ? `
193
- ` + r : "") + `
194
-
195
- The above lifecycles should be removed. Learn more about this warning here:
196
- https://fb.me/react-async-component-lifecycle-hooks`);
197
- }
198
- if (typeof o.getDerivedStateFromProps == "function" && (e.componentWillMount = xt, e.componentWillReceiveProps = Rt), typeof e.getSnapshotBeforeUpdate == "function") {
199
- if (typeof e.componentDidUpdate != "function") throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");
200
- e.componentWillUpdate = bt;
201
- var a = e.componentDidUpdate;
202
- e.componentDidUpdate = function(s, c, u) {
203
- var d = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : u;
204
- a.call(this, s, c, d);
205
- };
206
- }
207
- return o;
208
- }
209
- function Fe(o, e) {
210
- var t = Object.keys(o);
211
- if (Object.getOwnPropertySymbols) {
212
- var n = Object.getOwnPropertySymbols(o);
213
- e && (n = n.filter(function(r) {
214
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
215
- })), t.push.apply(t, n);
216
- }
217
- return t;
218
- }
219
- function Ne(o) {
220
- for (var e = 1; e < arguments.length; e++) {
221
- var t = arguments[e] != null ? arguments[e] : {};
222
- e % 2 ? Fe(Object(t), !0).forEach(function(n) {
223
- p(o, n, t[n]);
224
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Fe(Object(t)).forEach(function(n) {
225
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
226
- });
227
- }
228
- return o;
229
- }
230
- function zt() {
231
- try {
232
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
233
- }));
234
- } catch {
235
- }
236
- return (zt = function() {
237
- return !!o;
238
- })();
239
- }
240
- xt.__suppressDeprecationWarning = !0, Rt.__suppressDeprecationWarning = !0, bt.__suppressDeprecationWarning = !0;
241
- var Be = function() {
242
- function o() {
243
- var e, t, n, r;
244
- G(this, o);
245
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
246
- return t = this, n = o, r = [].concat(i), n = P(n), p(e = H(t, zt() ? Reflect.construct(n, r || [], P(t).constructor) : n.apply(t, r)), "state", { scrollToColumn: 0, scrollToRow: 0, instanceProps: { prevScrollToColumn: 0, prevScrollToRow: 0 } }), p(e, "_columnStartIndex", 0), p(e, "_columnStopIndex", 0), p(e, "_rowStartIndex", 0), p(e, "_rowStopIndex", 0), p(e, "_onKeyDown", function(s) {
247
- var c = e.props, u = c.columnCount, d = c.disabled, f = c.mode, h = c.rowCount;
248
- if (!d) {
249
- var g = e._getScrollState(), v = g.scrollToColumn, _ = g.scrollToRow, S = e._getScrollState(), m = S.scrollToColumn, y = S.scrollToRow;
250
- switch (s.key) {
251
- case "ArrowDown":
252
- y = Math.min(f === "cells" ? y + 1 : e._rowStopIndex + 1, h - 1);
253
- break;
254
- case "ArrowLeft":
255
- m = Math.max(f === "cells" ? m - 1 : e._columnStartIndex - 1, 0);
256
- break;
257
- case "ArrowRight":
258
- m = Math.min(f === "cells" ? m + 1 : e._columnStopIndex + 1, u - 1);
259
- break;
260
- case "ArrowUp":
261
- y = Math.max(f === "cells" ? y - 1 : e._rowStartIndex - 1, 0);
262
- }
263
- m === v && y === _ || (s.preventDefault(), e._updateScrollState({ scrollToColumn: m, scrollToRow: y }));
264
- }
265
- }), p(e, "_onSectionRendered", function(s) {
266
- var c = s.columnStartIndex, u = s.columnStopIndex, d = s.rowStartIndex, f = s.rowStopIndex;
267
- e._columnStartIndex = c, e._columnStopIndex = u, e._rowStartIndex = d, e._rowStopIndex = f;
268
- }), e;
269
- }
270
- return D(o, x.PureComponent), A(o, [{ key: "setScrollIndexes", value: function(e) {
271
- var t = e.scrollToColumn, n = e.scrollToRow;
272
- this.setState({ scrollToRow: n, scrollToColumn: t });
273
- } }, { key: "render", value: function() {
274
- var e = this.props, t = e.className, n = e.children, r = this._getScrollState(), l = r.scrollToColumn, i = r.scrollToRow;
275
- return x.createElement("div", { className: t, onKeyDown: this._onKeyDown }, n({ onSectionRendered: this._onSectionRendered, scrollToColumn: l, scrollToRow: i }));
276
- } }, { key: "_getScrollState", value: function() {
277
- return this.props.isControlled ? this.props : this.state;
278
- } }, { key: "_updateScrollState", value: function(e) {
279
- var t = e.scrollToColumn, n = e.scrollToRow, r = this.props, l = r.isControlled, i = r.onScrollToChange;
280
- typeof i == "function" && i({ scrollToColumn: t, scrollToRow: n }), l || this.setState({ scrollToColumn: t, scrollToRow: n });
281
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
282
- return e.isControlled ? {} : e.scrollToColumn !== t.instanceProps.prevScrollToColumn || e.scrollToRow !== t.instanceProps.prevScrollToRow ? Ne(Ne({}, t), {}, { scrollToColumn: e.scrollToColumn, scrollToRow: e.scrollToRow, instanceProps: { prevScrollToColumn: e.scrollToColumn, prevScrollToRow: e.scrollToRow } }) : {};
283
- } }]);
284
- }();
285
- function Tt(o, e) {
286
- var t, n = (t = e !== void 0 ? e : typeof window < "u" ? window : typeof self < "u" ? self : global).document !== void 0 && t.document.attachEvent;
287
- if (!n) {
288
- var r = function() {
289
- var m = t.requestAnimationFrame || t.mozRequestAnimationFrame || t.webkitRequestAnimationFrame || function(y) {
290
- return t.setTimeout(y, 20);
291
- };
292
- return function(y) {
293
- return m(y);
294
- };
295
- }(), l = function() {
296
- var m = t.cancelAnimationFrame || t.mozCancelAnimationFrame || t.webkitCancelAnimationFrame || t.clearTimeout;
297
- return function(y) {
298
- return m(y);
299
- };
300
- }(), i = function(m) {
301
- var y = m.__resizeTriggers__, w = y.firstElementChild, C = y.lastElementChild, R = w.firstElementChild;
302
- C.scrollLeft = C.scrollWidth, C.scrollTop = C.scrollHeight, R.style.width = w.offsetWidth + 1 + "px", R.style.height = w.offsetHeight + 1 + "px", w.scrollLeft = w.scrollWidth, w.scrollTop = w.scrollHeight;
303
- }, a = function(m) {
304
- if (!(m.target.className && typeof m.target.className.indexOf == "function" && m.target.className.indexOf("contract-trigger") < 0 && m.target.className.indexOf("expand-trigger") < 0)) {
305
- var y = this;
306
- i(this), this.__resizeRAF__ && l(this.__resizeRAF__), this.__resizeRAF__ = r(function() {
307
- (function(w) {
308
- return w.offsetWidth != w.__resizeLast__.width || w.offsetHeight != w.__resizeLast__.height;
309
- })(y) && (y.__resizeLast__.width = y.offsetWidth, y.__resizeLast__.height = y.offsetHeight, y.__resizeListeners__.forEach(function(w) {
310
- w.call(y, m);
311
- }));
312
- });
313
- }
314
- }, s = !1, c = "", u = "animationstart", d = "Webkit Moz O ms".split(" "), f = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), h = t.document.createElement("fakeelement");
315
- if (h.style.animationName !== void 0 && (s = !0), s === !1) {
316
- for (var g = 0; g < d.length; g++) if (h.style[d[g] + "AnimationName"] !== void 0) {
317
- c = "-" + d[g].toLowerCase() + "-", u = f[g], s = !0;
318
- break;
319
- }
320
- }
321
- var v = "resizeanim", _ = "@" + c + "keyframes " + v + " { from { opacity: 0; } to { opacity: 0; } } ", S = c + "animation: 1ms " + v + "; ";
322
- }
323
- return { addResizeListener: function(m, y) {
324
- if (n) m.attachEvent("onresize", y);
325
- else {
326
- if (!m.__resizeTriggers__) {
327
- var w = m.ownerDocument, C = t.getComputedStyle(m);
328
- C && C.position == "static" && (m.style.position = "relative"), function(b) {
329
- if (!b.getElementById("detectElementResize")) {
330
- var I = (_ || "") + ".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%; }', O = b.head || b.getElementsByTagName("head")[0], z = b.createElement("style");
331
- z.id = "detectElementResize", z.type = "text/css", o != null && z.setAttribute("nonce", o), z.styleSheet ? z.styleSheet.cssText = I : z.appendChild(b.createTextNode(I)), O.appendChild(z);
332
- }
333
- }(w), m.__resizeLast__ = {}, m.__resizeListeners__ = [], (m.__resizeTriggers__ = w.createElement("div")).className = "resize-triggers";
334
- var R = w.createElement("div");
335
- R.className = "expand-trigger", R.appendChild(w.createElement("div"));
336
- var T = w.createElement("div");
337
- T.className = "contract-trigger", m.__resizeTriggers__.appendChild(R), m.__resizeTriggers__.appendChild(T), m.appendChild(m.__resizeTriggers__), i(m), m.addEventListener("scroll", a, !0), u && (m.__resizeTriggers__.__animationListener__ = function(b) {
338
- b.animationName == v && i(m);
339
- }, m.__resizeTriggers__.addEventListener(u, m.__resizeTriggers__.__animationListener__));
340
- }
341
- m.__resizeListeners__.push(y);
342
- }
343
- }, removeResizeListener: function(m, y) {
344
- if (n) m.detachEvent("onresize", y);
345
- else if (m.__resizeListeners__.splice(m.__resizeListeners__.indexOf(y), 1), !m.__resizeListeners__.length) {
346
- m.removeEventListener("scroll", a, !0), m.__resizeTriggers__.__animationListener__ && (m.__resizeTriggers__.removeEventListener(u, m.__resizeTriggers__.__animationListener__), m.__resizeTriggers__.__animationListener__ = null);
347
- try {
348
- m.__resizeTriggers__ = !m.removeChild(m.__resizeTriggers__);
349
- } catch {
350
- }
351
- }
352
- } };
353
- }
354
- function Ue(o, e) {
355
- var t = Object.keys(o);
356
- if (Object.getOwnPropertySymbols) {
357
- var n = Object.getOwnPropertySymbols(o);
358
- e && (n = n.filter(function(r) {
359
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
360
- })), t.push.apply(t, n);
361
- }
362
- return t;
363
- }
364
- function Ve(o) {
365
- for (var e = 1; e < arguments.length; e++) {
366
- var t = arguments[e] != null ? arguments[e] : {};
367
- e % 2 ? Ue(Object(t), !0).forEach(function(n) {
368
- p(o, n, t[n]);
369
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Ue(Object(t)).forEach(function(n) {
370
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
371
- });
372
- }
373
- return o;
374
- }
375
- function It() {
376
- try {
377
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
378
- }));
379
- } catch {
380
- }
381
- return (It = function() {
382
- return !!o;
383
- })();
384
- }
385
- p(Be, "defaultProps", { disabled: !1, isControlled: !1, mode: "edges", scrollToColumn: 0, scrollToRow: 0 }), ce(Be);
386
- var Pt = function() {
387
- function o() {
388
- var e, t, n, r;
389
- G(this, o);
390
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
391
- return t = this, n = o, r = [].concat(i), n = P(n), p(e = H(t, It() ? Reflect.construct(n, r || [], P(t).constructor) : n.apply(t, r)), "state", { height: e.props.defaultHeight || 0, width: e.props.defaultWidth || 0 }), p(e, "_parentNode", void 0), p(e, "_autoSizer", void 0), p(e, "_window", void 0), p(e, "_detectElementResize", void 0), p(e, "_onResize", function() {
392
- var s = e.props, c = s.disableHeight, u = s.disableWidth, d = s.onResize;
393
- if (e._parentNode) {
394
- var f = e._parentNode.offsetHeight || 0, h = e._parentNode.offsetWidth || 0, g = (e._window || window).getComputedStyle(e._parentNode) || {}, v = parseInt(g.paddingLeft, 10) || 0, _ = parseInt(g.paddingRight, 10) || 0, S = parseInt(g.paddingTop, 10) || 0, m = parseInt(g.paddingBottom, 10) || 0, y = f - S - m, w = h - v - _;
395
- (!c && e.state.height !== y || !u && e.state.width !== w) && (e.setState({ height: f - S - m, width: h - v - _ }), d({ height: f, width: h }));
396
- }
397
- }), p(e, "_setRef", function(s) {
398
- e._autoSizer = s;
399
- }), e;
400
- }
401
- return D(o, x.Component), A(o, [{ key: "componentDidMount", value: function() {
402
- var e = this.props.nonce;
403
- this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement && (this._parentNode = this._autoSizer.parentNode, this._window = this._autoSizer.parentNode.ownerDocument.defaultView, this._detectElementResize = Tt(e, this._window), this._detectElementResize.addResizeListener(this._parentNode, this._onResize), this._onResize());
404
- } }, { key: "componentWillUnmount", value: function() {
405
- this._detectElementResize && this._parentNode && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);
406
- } }, { key: "render", value: function() {
407
- var e = this.props, t = e.children, n = e.className, r = e.disableHeight, l = e.disableWidth, i = e.style, a = this.state, s = a.height, c = a.width, u = { overflow: "visible" }, d = {};
408
- return r || (u.height = 0, d.height = s), l || (u.width = 0, d.width = c), x.createElement("div", { className: n, ref: this._setRef, style: Ve(Ve({}, u), i) }, t(d));
409
- } }]);
410
- }();
411
- function Ot() {
412
- try {
413
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
414
- }));
415
- } catch {
416
- }
417
- return (Ot = function() {
418
- return !!o;
419
- })();
420
- }
421
- p(Pt, "defaultProps", { onResize: function() {
422
- }, disableHeight: !1, disableWidth: !1, style: {} });
423
- var bo = function() {
424
- function o() {
425
- var e, t, n, r;
426
- G(this, o);
427
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
428
- return t = this, n = o, r = [].concat(i), n = P(n), p(e = H(t, Ot() ? Reflect.construct(n, r || [], P(t).constructor) : n.apply(t, r)), "_child", x.createRef()), p(e, "_measure", function() {
429
- var s = e.props, c = s.cache, u = s.columnIndex, d = u === void 0 ? 0 : u, f = s.parent, h = s.rowIndex, g = h === void 0 ? e.props.index || 0 : h, v = e._getCellMeasurements(), _ = v.height, S = v.width;
430
- _ === c.getHeight(g, d) && S === c.getWidth(g, d) || (c.set(g, d, S, _), f && typeof f.recomputeGridSize == "function" && f.recomputeGridSize({ columnIndex: d, rowIndex: g }));
431
- }), p(e, "_registerChild", function(s) {
432
- !s || s instanceof Element || console.warn("CellMeasurer registerChild expects to be passed Element or null"), e._child.current = s, s && e._maybeMeasureCell();
433
- }), e;
434
- }
435
- return D(o, x.PureComponent), A(o, [{ key: "componentDidMount", value: function() {
436
- this._maybeMeasureCell();
437
- } }, { key: "componentDidUpdate", value: function() {
438
- this._maybeMeasureCell();
439
- } }, { key: "render", value: function() {
440
- var e = this, t = this.props.children, n = typeof t == "function" ? t({ measure: this._measure, registerChild: this._registerChild }) : t;
441
- return n === null ? n : go(n, { ref: function(r) {
442
- typeof n.ref == "function" ? n.ref(r) : n.ref && (n.ref.current = r), e._child.current = r;
443
- } });
444
- } }, { key: "_getCellMeasurements", value: function() {
445
- var e = this.props.cache, t = this._child.current;
446
- if (t && t.ownerDocument && t.ownerDocument.defaultView && t instanceof t.ownerDocument.defaultView.HTMLElement) {
447
- var n = t.style.width, r = t.style.height;
448
- e.hasFixedWidth() || (t.style.width = "auto"), e.hasFixedHeight() || (t.style.height = "auto");
449
- var l = Math.ceil(t.offsetHeight), i = Math.ceil(t.offsetWidth);
450
- return n && (t.style.width = n), r && (t.style.height = r), { height: l, width: i };
451
- }
452
- return { height: 0, width: 0 };
453
- } }, { key: "_maybeMeasureCell", value: function() {
454
- var e = this.props, t = e.cache, n = e.columnIndex, r = n === void 0 ? 0 : n, l = e.parent, i = e.rowIndex, a = i === void 0 ? this.props.index || 0 : i;
455
- if (!t.has(a, r)) {
456
- var s = this._getCellMeasurements(), c = s.height, u = s.width;
457
- t.set(a, r, u, c), l && typeof l.invalidateCellSizeAfterRender == "function" && l.invalidateCellSizeAfterRender({ columnIndex: r, rowIndex: a });
458
- }
459
- } }]);
460
- }();
461
- function Q() {
462
- var o = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0], e = {};
463
- return function(t) {
464
- var n = t.callback, r = t.indices, l = Object.keys(r), i = !o || l.every(function(s) {
465
- var c = r[s];
466
- return Array.isArray(c) ? c.length > 0 : c >= 0;
467
- }), a = l.length !== Object.keys(e).length || l.some(function(s) {
468
- var c = e[s], u = r[s];
469
- return Array.isArray(u) ? c.join(",") !== u.join(",") : c !== u;
470
- });
471
- e = r, i && a && n(r);
472
- };
473
- }
474
- p(bo, "__internalCellMeasurerFlag", !1);
475
- const zo = !(typeof window > "u" || !window.document || !window.document.createElement);
476
- var pe;
477
- function be(o) {
478
- if ((!pe && pe !== 0 || o) && zo) {
479
- var e = document.createElement("div");
480
- e.style.position = "absolute", e.style.top = "-9999px", e.style.width = "50px", e.style.height = "50px", e.style.overflow = "scroll", document.body.appendChild(e), pe = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
481
- }
482
- return pe;
483
- }
484
- function qe(o, e) {
485
- var t = Object.keys(o);
486
- if (Object.getOwnPropertySymbols) {
487
- var n = Object.getOwnPropertySymbols(o);
488
- e && (n = n.filter(function(r) {
489
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
490
- })), t.push.apply(t, n);
491
- }
492
- return t;
493
- }
494
- function Ke(o) {
495
- for (var e = 1; e < arguments.length; e++) {
496
- var t = arguments[e] != null ? arguments[e] : {};
497
- e % 2 ? qe(Object(t), !0).forEach(function(n) {
498
- p(o, n, t[n]);
499
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : qe(Object(t)).forEach(function(n) {
500
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
501
- });
502
- }
503
- return o;
504
- }
505
- function kt() {
506
- try {
507
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
508
- }));
509
- } catch {
510
- }
511
- return (kt = function() {
512
- return !!o;
513
- })();
514
- }
515
- var To = "observed", te = "requested", ve = function() {
516
- function o() {
517
- var e, t, n, r;
518
- G(this, o);
519
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
520
- return t = this, n = o, r = [].concat(i), n = P(n), p(e = H(t, kt() ? Reflect.construct(n, r || [], P(t).constructor) : n.apply(t, r)), "state", { isScrolling: !1, scrollLeft: 0, scrollTop: 0 }), p(e, "_calculateSizeAndPositionDataOnNextUpdate", !1), p(e, "_onSectionRenderedMemoizer", Q()), p(e, "_onScrollMemoizer", Q(!1)), p(e, "_invokeOnSectionRenderedHelper", function() {
521
- var s = e.props, c = s.cellLayoutManager, u = s.onSectionRendered;
522
- e._onSectionRenderedMemoizer({ callback: u, indices: { indices: c.getLastRenderedIndices() } });
523
- }), p(e, "_setScrollingContainerRef", function(s) {
524
- e._scrollingContainer = s;
525
- }), p(e, "_updateScrollPositionForScrollToCell", function() {
526
- var s = e.props, c = s.cellLayoutManager, u = s.height, d = s.scrollToAlignment, f = s.scrollToCell, h = s.width, g = e.state, v = g.scrollLeft, _ = g.scrollTop;
527
- if (f >= 0) {
528
- var S = c.getScrollPositionForCell({ align: d, cellIndex: f, height: u, scrollLeft: v, scrollTop: _, width: h });
529
- S.scrollLeft === v && S.scrollTop === _ || e._setScrollPosition(S);
530
- }
531
- }), p(e, "_onScroll", function(s) {
532
- if (s.target === e._scrollingContainer) {
533
- e._enablePointerEventsAfterDelay();
534
- var c = e.props, u = c.cellLayoutManager, d = c.height, f = c.isScrollingChange, h = c.width, g = e._scrollbarSize, v = u.getTotalSize(), _ = v.height, S = v.width, m = Math.max(0, Math.min(S - h + g, s.target.scrollLeft)), y = Math.max(0, Math.min(_ - d + g, s.target.scrollTop));
535
- if (e.state.scrollLeft !== m || e.state.scrollTop !== y) {
536
- var w = s.cancelable ? To : te;
537
- e.state.isScrolling || f(!0), e.setState({ isScrolling: !0, scrollLeft: m, scrollPositionChangeReason: w, scrollTop: y });
538
- }
539
- e._invokeOnScrollMemoizer({ scrollLeft: m, scrollTop: y, totalWidth: S, totalHeight: _ });
540
- }
541
- }), e._scrollbarSize = be(), e._scrollbarSize === void 0 ? (e._scrollbarSizeMeasured = !1, e._scrollbarSize = 0) : e._scrollbarSizeMeasured = !0, e;
542
- }
543
- return D(o, x.PureComponent), A(o, [{ key: "recomputeCellSizesAndPositions", value: function() {
544
- this._calculateSizeAndPositionDataOnNextUpdate = !0, this.forceUpdate();
545
- } }, { key: "componentDidMount", value: function() {
546
- var e = this.props, t = e.cellLayoutManager, n = e.scrollLeft, r = e.scrollToCell, l = e.scrollTop;
547
- this._scrollbarSizeMeasured || (this._scrollbarSize = be(), this._scrollbarSizeMeasured = !0, this.setState({})), r >= 0 ? this._updateScrollPositionForScrollToCell() : (n >= 0 || l >= 0) && this._setScrollPosition({ scrollLeft: n, scrollTop: l }), this._invokeOnSectionRenderedHelper();
548
- var i = t.getTotalSize(), a = i.height, s = i.width;
549
- this._invokeOnScrollMemoizer({ scrollLeft: n || 0, scrollTop: l || 0, totalHeight: a, totalWidth: s });
550
- } }, { key: "componentDidUpdate", value: function(e, t) {
551
- var n = this.props, r = n.height, l = n.scrollToAlignment, i = n.scrollToCell, a = n.width, s = this.state, c = s.scrollLeft, u = s.scrollPositionChangeReason, d = s.scrollTop;
552
- u === te && (c >= 0 && c !== t.scrollLeft && c !== this._scrollingContainer.scrollLeft && (this._scrollingContainer.scrollLeft = c), d >= 0 && d !== t.scrollTop && d !== this._scrollingContainer.scrollTop && (this._scrollingContainer.scrollTop = d)), r === e.height && l === e.scrollToAlignment && i === e.scrollToCell && a === e.width || this._updateScrollPositionForScrollToCell(), this._invokeOnSectionRenderedHelper();
553
- } }, { key: "componentWillUnmount", value: function() {
554
- this._disablePointerEventsTimeoutId && clearTimeout(this._disablePointerEventsTimeoutId);
555
- } }, { key: "render", value: function() {
556
- var e = this.props, t = e.autoHeight, n = e.cellCount, r = e.cellLayoutManager, l = e.className, i = e.height, a = e.horizontalOverscanSize, s = e.id, c = e.noContentRenderer, u = e.style, d = e.verticalOverscanSize, f = e.width, h = this.state, g = h.isScrolling, v = h.scrollLeft, _ = h.scrollTop;
557
- (this._lastRenderedCellCount !== n || this._lastRenderedCellLayoutManager !== r || this._calculateSizeAndPositionDataOnNextUpdate) && (this._lastRenderedCellCount = n, this._lastRenderedCellLayoutManager = r, this._calculateSizeAndPositionDataOnNextUpdate = !1, r.calculateSizeAndPositionData());
558
- var S = r.getTotalSize(), m = S.height, y = S.width, w = Math.max(0, v - a), C = Math.max(0, _ - d), R = Math.min(y, v + f + a), T = Math.min(m, _ + i + d), b = i > 0 && f > 0 ? r.cellRenderers({ height: T - C, isScrolling: g, width: R - w, x: w, y: C }) : [], I = { boxSizing: "border-box", direction: "ltr", height: t ? "auto" : i, position: "relative", WebkitOverflowScrolling: "touch", width: f, willChange: "transform" }, O = m > i ? this._scrollbarSize : 0, z = y > f ? this._scrollbarSize : 0;
559
- return I.overflowX = y + O <= f ? "hidden" : "auto", I.overflowY = m + z <= i ? "hidden" : "auto", x.createElement("div", { ref: this._setScrollingContainerRef, "aria-label": this.props["aria-label"], className: N("ReactVirtualized__Collection", l), id: s, onScroll: this._onScroll, role: "grid", style: Ke(Ke({}, I), u), tabIndex: 0 }, n > 0 && x.createElement("div", { className: "ReactVirtualized__Collection__innerScrollContainer", style: { height: m, maxHeight: m, maxWidth: y, overflow: "hidden", pointerEvents: g ? "none" : "", width: y } }, b), n === 0 && c());
560
- } }, { key: "_enablePointerEventsAfterDelay", value: function() {
561
- var e = this;
562
- this._disablePointerEventsTimeoutId && clearTimeout(this._disablePointerEventsTimeoutId), this._disablePointerEventsTimeoutId = setTimeout(function() {
563
- (0, e.props.isScrollingChange)(!1), e._disablePointerEventsTimeoutId = null, e.setState({ isScrolling: !1 });
564
- }, 150);
565
- } }, { key: "_invokeOnScrollMemoizer", value: function(e) {
566
- var t = this, n = e.scrollLeft, r = e.scrollTop, l = e.totalHeight, i = e.totalWidth;
567
- this._onScrollMemoizer({ callback: function(a) {
568
- var s = a.scrollLeft, c = a.scrollTop, u = t.props, d = u.height;
569
- (0, u.onScroll)({ clientHeight: d, clientWidth: u.width, scrollHeight: l, scrollLeft: s, scrollTop: c, scrollWidth: i });
570
- }, indices: { scrollLeft: n, scrollTop: r } });
571
- } }, { key: "_setScrollPosition", value: function(e) {
572
- var t = e.scrollLeft, n = e.scrollTop, r = { scrollPositionChangeReason: te };
573
- t >= 0 && (r.scrollLeft = t), n >= 0 && (r.scrollTop = n), (t >= 0 && t !== this.state.scrollLeft || n >= 0 && n !== this.state.scrollTop) && this.setState(r);
574
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
575
- return e.cellCount !== 0 || t.scrollLeft === 0 && t.scrollTop === 0 ? e.scrollLeft !== t.scrollLeft || e.scrollTop !== t.scrollTop ? { scrollLeft: e.scrollLeft != null ? e.scrollLeft : t.scrollLeft, scrollTop: e.scrollTop != null ? e.scrollTop : t.scrollTop, scrollPositionChangeReason: te } : null : { scrollLeft: 0, scrollTop: 0, scrollPositionChangeReason: te };
576
- } }]);
577
- }();
578
- p(ve, "defaultProps", { "aria-label": "grid", horizontalOverscanSize: 0, noContentRenderer: function() {
579
- return null;
580
- }, onScroll: function() {
581
- return null;
582
- }, onSectionRendered: function() {
583
- return null;
584
- }, scrollToAlignment: "auto", scrollToCell: -1, style: {}, verticalOverscanSize: 0 }), ve.propTypes = {}, ce(ve);
585
- var Io = function() {
586
- return A(function o(e) {
587
- var t = e.height, n = e.width, r = e.x, l = e.y;
588
- G(this, o), this.height = t, this.width = n, this.x = r, this.y = l, this._indexMap = {}, this._indices = [];
589
- }, [{ key: "addCellIndex", value: function(o) {
590
- var e = o.index;
591
- this._indexMap[e] || (this._indexMap[e] = !0, this._indices.push(e));
592
- } }, { key: "getCellIndices", value: function() {
593
- return this._indices;
594
- } }, { key: "toString", value: function() {
595
- return "".concat(this.x, ",").concat(this.y, " ").concat(this.width, "x").concat(this.height);
596
- } }]);
597
- }(), Po = function() {
598
- return A(function o() {
599
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 100;
600
- G(this, o), this._sectionSize = e, this._cellMetadata = [], this._sections = {};
601
- }, [{ key: "getCellIndices", value: function(o) {
602
- var e = o.height, t = o.width, n = o.x, r = o.y, l = {};
603
- return this.getSections({ height: e, width: t, x: n, y: r }).forEach(function(i) {
604
- return i.getCellIndices().forEach(function(a) {
605
- l[a] = a;
606
- });
607
- }), Object.keys(l).map(function(i) {
608
- return l[i];
609
- });
610
- } }, { key: "getCellMetadata", value: function(o) {
611
- var e = o.index;
612
- return this._cellMetadata[e];
613
- } }, { key: "getSections", value: function(o) {
614
- for (var e = o.height, t = o.width, n = o.x, r = o.y, l = Math.floor(n / this._sectionSize), i = Math.floor((n + t - 1) / this._sectionSize), a = Math.floor(r / this._sectionSize), s = Math.floor((r + e - 1) / this._sectionSize), c = [], u = l; u <= i; u++) for (var d = a; d <= s; d++) {
615
- var f = "".concat(u, ".").concat(d);
616
- this._sections[f] || (this._sections[f] = new Io({ height: this._sectionSize, width: this._sectionSize, x: u * this._sectionSize, y: d * this._sectionSize })), c.push(this._sections[f]);
617
- }
618
- return c;
619
- } }, { key: "getTotalSectionCount", value: function() {
620
- return Object.keys(this._sections).length;
621
- } }, { key: "toString", value: function() {
622
- var o = this;
623
- return Object.keys(this._sections).map(function(e) {
624
- return o._sections[e].toString();
625
- });
626
- } }, { key: "registerCell", value: function(o) {
627
- var e = o.cellMetadatum, t = o.index;
628
- this._cellMetadata[t] = e, this.getSections(e).forEach(function(n) {
629
- return n.addCellIndex({ index: t });
630
- });
631
- } }]);
632
- }();
633
- function $e(o) {
634
- var e = o.align, t = e === void 0 ? "auto" : e, n = o.cellOffset, r = o.cellSize, l = o.containerSize, i = o.currentOffset, a = n, s = a - l + r;
635
- switch (t) {
636
- case "start":
637
- return a;
638
- case "end":
639
- return s;
640
- case "center":
641
- return a - (l - r) / 2;
642
- default:
643
- return Math.max(s, Math.min(a, i));
644
- }
645
- }
646
- function Mt() {
647
- try {
648
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
649
- }));
650
- } catch {
651
- }
652
- return (Mt = function() {
653
- return !!o;
654
- })();
655
- }
656
- var Xe = function() {
657
- function o(e, t) {
658
- var n, r, l, i;
659
- return G(this, o), r = this, i = [e, t], l = P(l = o), (n = H(r, Mt() ? Reflect.construct(l, i || [], P(r).constructor) : l.apply(r, i)))._cellMetadata = [], n._lastRenderedCellIndices = [], n._cellCache = [], n._isScrollingChange = n._isScrollingChange.bind(n), n._setCollectionViewRef = n._setCollectionViewRef.bind(n), n;
660
- }
661
- return D(o, x.PureComponent), A(o, [{ key: "forceUpdate", value: function() {
662
- this._collectionView !== void 0 && this._collectionView.forceUpdate();
663
- } }, { key: "recomputeCellSizesAndPositions", value: function() {
664
- this._cellCache = [], this._collectionView.recomputeCellSizesAndPositions();
665
- } }, { key: "render", value: function() {
666
- var e = U({}, (function(t) {
667
- if (t == null) throw new TypeError("Cannot destructure " + t);
668
- }(this.props), this.props));
669
- return x.createElement(ve, U({ cellLayoutManager: this, isScrollingChange: this._isScrollingChange, ref: this._setCollectionViewRef }, e));
670
- } }, { key: "calculateSizeAndPositionData", value: function() {
671
- var e = this.props, t = function(n) {
672
- for (var r = n.cellCount, l = n.cellSizeAndPositionGetter, i = n.sectionSize, a = [], s = new Po(i), c = 0, u = 0, d = 0; d < r; d++) {
673
- var f = l({ index: d });
674
- if (f.height == null || isNaN(f.height) || f.width == null || isNaN(f.width) || f.x == null || isNaN(f.x) || f.y == null || isNaN(f.y)) throw Error("Invalid metadata returned for cell ".concat(d, `:
675
- x:`).concat(f.x, ", y:").concat(f.y, ", width:").concat(f.width, ", height:").concat(f.height));
676
- c = Math.max(c, f.y + f.height), u = Math.max(u, f.x + f.width), a[d] = f, s.registerCell({ cellMetadatum: f, index: d });
677
- }
678
- return { cellMetadata: a, height: c, sectionManager: s, width: u };
679
- }({ cellCount: e.cellCount, cellSizeAndPositionGetter: e.cellSizeAndPositionGetter, sectionSize: e.sectionSize });
680
- this._cellMetadata = t.cellMetadata, this._sectionManager = t.sectionManager, this._height = t.height, this._width = t.width;
681
- } }, { key: "getLastRenderedIndices", value: function() {
682
- return this._lastRenderedCellIndices;
683
- } }, { key: "getScrollPositionForCell", value: function(e) {
684
- var t = e.align, n = e.cellIndex, r = e.height, l = e.scrollLeft, i = e.scrollTop, a = e.width, s = this.props.cellCount;
685
- if (n >= 0 && n < s) {
686
- var c = this._cellMetadata[n];
687
- l = $e({ align: t, cellOffset: c.x, cellSize: c.width, containerSize: a, currentOffset: l }), i = $e({ align: t, cellOffset: c.y, cellSize: c.height, containerSize: r, currentOffset: i });
688
- }
689
- return { scrollLeft: l, scrollTop: i };
690
- } }, { key: "getTotalSize", value: function() {
691
- return { height: this._height, width: this._width };
692
- } }, { key: "cellRenderers", value: function(e) {
693
- var t = this, n = e.height, r = e.isScrolling, l = e.width, i = e.x, a = e.y, s = this.props, c = s.cellGroupRenderer, u = s.cellRenderer;
694
- return this._lastRenderedCellIndices = this._sectionManager.getCellIndices({ height: n, width: l, x: i, y: a }), c({ cellCache: this._cellCache, cellRenderer: u, cellSizeAndPositionGetter: function(d) {
695
- var f = d.index;
696
- return t._sectionManager.getCellMetadata({ index: f });
697
- }, indices: this._lastRenderedCellIndices, isScrolling: r });
698
- } }, { key: "_isScrollingChange", value: function(e) {
699
- e || (this._cellCache = []);
700
- } }, { key: "_setCollectionViewRef", value: function(e) {
701
- this._collectionView = e;
702
- } }]);
703
- }();
704
- function Lt() {
705
- try {
706
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
707
- }));
708
- } catch {
709
- }
710
- return (Lt = function() {
711
- return !!o;
712
- })();
713
- }
714
- function Ye(o) {
715
- var e = o.cellCount, t = o.cellSize, n = o.computeMetadataCallback, r = o.computeMetadataCallbackProps, l = o.nextCellsCount, i = o.nextCellSize, a = o.nextScrollToIndex, s = o.scrollToIndex, c = o.updateScrollOffsetForScrollToIndex;
716
- e === l && (typeof t != "number" && typeof i != "number" || t === i) || (n(r), s >= 0 && s === a && c());
717
- }
718
- function ne(o, e) {
719
- if (o == null) return {};
720
- var t, n, r = ho(o, e);
721
- if (Object.getOwnPropertySymbols) {
722
- var l = Object.getOwnPropertySymbols(o);
723
- for (n = 0; n < l.length; n++) t = l[n], e.indexOf(t) === -1 && {}.propertyIsEnumerable.call(o, t) && (r[t] = o[t]);
724
- }
725
- return r;
726
- }
727
- p(Xe, "defaultProps", { "aria-label": "grid", cellGroupRenderer: function(o) {
728
- var e = o.cellCache, t = o.cellRenderer, n = o.cellSizeAndPositionGetter, r = o.indices, l = o.isScrolling;
729
- return r.map(function(i) {
730
- var a = n({ index: i }), s = { index: i, isScrolling: l, key: i, style: { height: a.height, left: a.x, position: "absolute", top: a.y, width: a.width } };
731
- return l ? (i in e || (e[i] = t(s)), e[i]) : t(s);
732
- }).filter(function(i) {
733
- return !!i;
734
- });
735
- } }), Xe.propTypes = {}, function() {
736
- function o(e, t) {
737
- var n, r, l, i;
738
- return G(this, o), r = this, i = [e, t], l = P(l = o), (n = H(r, Lt() ? Reflect.construct(l, i || [], P(r).constructor) : l.apply(r, i)))._registerChild = n._registerChild.bind(n), n;
739
- }
740
- return D(o, x.PureComponent), A(o, [{ key: "componentDidUpdate", value: function(e) {
741
- var t = this.props, n = t.columnMaxWidth, r = t.columnMinWidth, l = t.columnCount, i = t.width;
742
- n === e.columnMaxWidth && r === e.columnMinWidth && l === e.columnCount && i === e.width || this._registeredChild && this._registeredChild.recomputeGridSize();
743
- } }, { key: "render", value: function() {
744
- var e = this.props, t = e.children, n = e.columnMaxWidth, r = e.columnMinWidth, l = e.columnCount, i = e.width, a = r || 1, s = n ? Math.min(n, i) : i, c = i / l;
745
- return c = Math.max(a, c), c = Math.min(s, c), c = Math.floor(c), t({ adjustedWidth: Math.min(i, c * l), columnWidth: c, getColumnWidth: function() {
746
- return c;
747
- }, registerChild: this._registerChild });
748
- } }, { key: "_registerChild", value: function(e) {
749
- if (e && typeof e.recomputeGridSize != "function") throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");
750
- this._registeredChild = e, this._registeredChild && this._registeredChild.recomputeGridSize();
751
- } }]);
752
- }().propTypes = {};
753
- var F, Oo = function() {
754
- return A(function o(e) {
755
- var t = e.cellCount, n = e.cellSizeGetter, r = e.estimatedCellSize;
756
- G(this, o), p(this, "_cellSizeAndPositionData", {}), p(this, "_lastMeasuredIndex", -1), p(this, "_lastBatchedIndex", -1), p(this, "_cellCount", void 0), p(this, "_cellSizeGetter", void 0), p(this, "_estimatedCellSize", void 0), this._cellSizeGetter = n, this._cellCount = t, this._estimatedCellSize = r;
757
- }, [{ key: "areOffsetsAdjusted", value: function() {
758
- return !1;
759
- } }, { key: "configure", value: function(o) {
760
- var e = o.cellCount, t = o.estimatedCellSize, n = o.cellSizeGetter;
761
- this._cellCount = e, this._estimatedCellSize = t, this._cellSizeGetter = n;
762
- } }, { key: "getCellCount", value: function() {
763
- return this._cellCount;
764
- } }, { key: "getEstimatedCellSize", value: function() {
765
- return this._estimatedCellSize;
766
- } }, { key: "getLastMeasuredIndex", value: function() {
767
- return this._lastMeasuredIndex;
768
- } }, { key: "getOffsetAdjustment", value: function() {
769
- return 0;
770
- } }, { key: "getSizeAndPositionOfCell", value: function(o) {
771
- if (o < 0 || o >= this._cellCount) throw Error("Requested index ".concat(o, " is outside of range 0..").concat(this._cellCount));
772
- if (o > this._lastMeasuredIndex) for (var e = this.getSizeAndPositionOfLastMeasuredCell(), t = e.offset + e.size, n = this._lastMeasuredIndex + 1; n <= o; n++) {
773
- var r = this._cellSizeGetter({ index: n });
774
- if (r === void 0 || isNaN(r)) throw Error("Invalid size returned for cell ".concat(n, " of value ").concat(r));
775
- r === null ? (this._cellSizeAndPositionData[n] = { offset: t, size: 0 }, this._lastBatchedIndex = o) : (this._cellSizeAndPositionData[n] = { offset: t, size: r }, t += r, this._lastMeasuredIndex = o);
776
- }
777
- return this._cellSizeAndPositionData[o];
778
- } }, { key: "getSizeAndPositionOfLastMeasuredCell", value: function() {
779
- return this._lastMeasuredIndex >= 0 ? this._cellSizeAndPositionData[this._lastMeasuredIndex] : { offset: 0, size: 0 };
780
- } }, { key: "getTotalSize", value: function() {
781
- var o = this.getSizeAndPositionOfLastMeasuredCell();
782
- return o.offset + o.size + (this._cellCount - this._lastMeasuredIndex - 1) * this._estimatedCellSize;
783
- } }, { key: "getUpdatedOffsetForIndex", value: function(o) {
784
- var e = o.align, t = e === void 0 ? "auto" : e, n = o.containerSize, r = o.currentOffset, l = o.targetIndex;
785
- if (n <= 0) return 0;
786
- var i, a = this.getSizeAndPositionOfCell(l), s = a.offset, c = s - n + a.size;
787
- switch (t) {
788
- case "start":
789
- i = s;
790
- break;
791
- case "end":
792
- i = c;
793
- break;
794
- case "center":
795
- i = s - (n - a.size) / 2;
796
- break;
797
- default:
798
- i = Math.max(c, Math.min(s, r));
799
- }
800
- var u = this.getTotalSize();
801
- return Math.max(0, Math.min(u - n, i));
802
- } }, { key: "getVisibleCellRange", value: function(o) {
803
- var e = o.containerSize, t = o.offset;
804
- if (this.getTotalSize() === 0) return {};
805
- var n = t + e, r = this._findNearestCell(t), l = this.getSizeAndPositionOfCell(r);
806
- t = l.offset + l.size;
807
- for (var i = r; t < n && i < this._cellCount - 1; ) i++, t += this.getSizeAndPositionOfCell(i).size;
808
- return { start: r, stop: i };
809
- } }, { key: "resetCell", value: function(o) {
810
- this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, o - 1);
811
- } }, { key: "_binarySearch", value: function(o, e, t) {
812
- for (; e <= o; ) {
813
- var n = e + Math.floor((o - e) / 2), r = this.getSizeAndPositionOfCell(n).offset;
814
- if (r === t) return n;
815
- r < t ? e = n + 1 : r > t && (o = n - 1);
816
- }
817
- return e > 0 ? e - 1 : 0;
818
- } }, { key: "_exponentialSearch", value: function(o, e) {
819
- for (var t = 1; o < this._cellCount && this.getSizeAndPositionOfCell(o).offset < e; ) o += t, t *= 2;
820
- return this._binarySearch(Math.min(o, this._cellCount - 1), Math.floor(o / 2), e);
821
- } }, { key: "_findNearestCell", value: function(o) {
822
- if (isNaN(o)) throw Error("Invalid offset ".concat(o, " specified"));
823
- o = Math.max(0, o);
824
- var e = this.getSizeAndPositionOfLastMeasuredCell(), t = Math.max(0, this._lastMeasuredIndex);
825
- return e.offset >= o ? this._binarySearch(t, 0, o) : this._exponentialSearch(t, o);
826
- } }]);
827
- }(), ko = function() {
828
- return typeof window < "u" && window.chrome ? 16777100 : 15e5;
829
- }, Mo = ["maxScrollSize"], Je = function() {
830
- return A(function o(e) {
831
- var t = e.maxScrollSize, n = t === void 0 ? ko() : t, r = ne(e, Mo);
832
- G(this, o), p(this, "_cellSizeAndPositionManager", void 0), p(this, "_maxScrollSize", void 0), this._cellSizeAndPositionManager = new Oo(r), this._maxScrollSize = n;
833
- }, [{ key: "areOffsetsAdjusted", value: function() {
834
- return this._cellSizeAndPositionManager.getTotalSize() > this._maxScrollSize;
835
- } }, { key: "configure", value: function(o) {
836
- this._cellSizeAndPositionManager.configure(o);
837
- } }, { key: "getCellCount", value: function() {
838
- return this._cellSizeAndPositionManager.getCellCount();
839
- } }, { key: "getEstimatedCellSize", value: function() {
840
- return this._cellSizeAndPositionManager.getEstimatedCellSize();
841
- } }, { key: "getLastMeasuredIndex", value: function() {
842
- return this._cellSizeAndPositionManager.getLastMeasuredIndex();
843
- } }, { key: "getOffsetAdjustment", value: function(o) {
844
- var e = o.containerSize, t = o.offset, n = this._cellSizeAndPositionManager.getTotalSize(), r = this.getTotalSize(), l = this._getOffsetPercentage({ containerSize: e, offset: t, totalSize: r });
845
- return Math.round(l * (r - n));
846
- } }, { key: "getSizeAndPositionOfCell", value: function(o) {
847
- return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(o);
848
- } }, { key: "getSizeAndPositionOfLastMeasuredCell", value: function() {
849
- return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();
850
- } }, { key: "getTotalSize", value: function() {
851
- return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());
852
- } }, { key: "getUpdatedOffsetForIndex", value: function(o) {
853
- var e = o.align, t = e === void 0 ? "auto" : e, n = o.containerSize, r = o.currentOffset, l = o.targetIndex;
854
- r = this._safeOffsetToOffset({ containerSize: n, offset: r });
855
- var i = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({ align: t, containerSize: n, currentOffset: r, targetIndex: l });
856
- return this._offsetToSafeOffset({ containerSize: n, offset: i });
857
- } }, { key: "getVisibleCellRange", value: function(o) {
858
- var e = o.containerSize, t = o.offset;
859
- return t = this._safeOffsetToOffset({ containerSize: e, offset: t }), this._cellSizeAndPositionManager.getVisibleCellRange({ containerSize: e, offset: t });
860
- } }, { key: "resetCell", value: function(o) {
861
- this._cellSizeAndPositionManager.resetCell(o);
862
- } }, { key: "_getOffsetPercentage", value: function(o) {
863
- var e = o.containerSize, t = o.offset, n = o.totalSize;
864
- return n <= e ? 0 : t / (n - e);
865
- } }, { key: "_offsetToSafeOffset", value: function(o) {
866
- var e = o.containerSize, t = o.offset, n = this._cellSizeAndPositionManager.getTotalSize(), r = this.getTotalSize();
867
- if (n === r) return t;
868
- var l = this._getOffsetPercentage({ containerSize: e, offset: t, totalSize: n });
869
- return Math.round(l * (r - e));
870
- } }, { key: "_safeOffsetToOffset", value: function(o) {
871
- var e = o.containerSize, t = o.offset, n = this._cellSizeAndPositionManager.getTotalSize(), r = this.getTotalSize();
872
- if (n === r) return t;
873
- var l = this._getOffsetPercentage({ containerSize: e, offset: t, totalSize: r });
874
- return Math.round(l * (n - e));
875
- } }]);
876
- }();
877
- function Ze(o) {
878
- var e = o.cellSize, t = o.cellSizeAndPositionManager, n = o.previousCellsCount, r = o.previousCellSize, l = o.previousScrollToAlignment, i = o.previousScrollToIndex, a = o.previousSize, s = o.scrollOffset, c = o.scrollToAlignment, u = o.scrollToIndex, d = o.size, f = o.sizeJustIncreasedFromZero, h = o.updateScrollIndexCallback, g = t.getCellCount(), v = u >= 0 && u < g;
879
- v && (d !== a || f || !r || typeof e == "number" && e !== r || c !== l || u !== i) ? h(u) : !v && g > 0 && (d < a || g < n) && s > t.getTotalSize() - d && h(g - 1);
880
- }
881
- var Lo = (F = typeof window < "u" ? window : typeof self < "u" ? self : {}).requestAnimationFrame || F.webkitRequestAnimationFrame || F.mozRequestAnimationFrame || F.oRequestAnimationFrame || F.msRequestAnimationFrame || function(o) {
882
- return F.setTimeout(o, 1e3 / 60);
883
- }, Go = F.cancelAnimationFrame || F.webkitCancelAnimationFrame || F.mozCancelAnimationFrame || F.oCancelAnimationFrame || F.msCancelAnimationFrame || function(o) {
884
- F.clearTimeout(o);
885
- }, Qe = Lo, Ao = Go, ee = function(o) {
886
- return Ao(o.id);
887
- }, Le = function(o, e) {
888
- var t;
889
- Promise.resolve().then(function() {
890
- t = Date.now();
891
- });
892
- var n = function() {
893
- Date.now() - t >= e ? o.call() : r.id = Qe(n);
894
- }, r = { id: Qe(n) };
895
- return r;
896
- };
897
- function et(o, e) {
898
- var t = Object.keys(o);
899
- if (Object.getOwnPropertySymbols) {
900
- var n = Object.getOwnPropertySymbols(o);
901
- e && (n = n.filter(function(r) {
902
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
903
- })), t.push.apply(t, n);
904
- }
905
- return t;
906
- }
907
- function j(o) {
908
- for (var e = 1; e < arguments.length; e++) {
909
- var t = arguments[e] != null ? arguments[e] : {};
910
- e % 2 ? et(Object(t), !0).forEach(function(n) {
911
- p(o, n, t[n]);
912
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : et(Object(t)).forEach(function(n) {
913
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
914
- });
915
- }
916
- return o;
917
- }
918
- function Gt() {
919
- try {
920
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
921
- }));
922
- } catch {
923
- }
924
- return (Gt = function() {
925
- return !!o;
926
- })();
927
- }
928
- var Eo = "observed", tt = "requested", V = function() {
929
- function o(e) {
930
- var t, n, r, l;
931
- G(this, o), n = this, l = [e], r = P(r = o), p(t = H(n, Gt() ? Reflect.construct(r, l || [], P(n).constructor) : r.apply(n, l)), "_onGridRenderedMemoizer", Q()), p(t, "_onScrollMemoizer", Q(!1)), p(t, "_deferredInvalidateColumnIndex", null), p(t, "_deferredInvalidateRowIndex", null), p(t, "_recomputeScrollLeftFlag", !1), p(t, "_recomputeScrollTopFlag", !1), p(t, "_horizontalScrollBarSize", 0), p(t, "_verticalScrollBarSize", 0), p(t, "_scrollbarPresenceChanged", !1), p(t, "_scrollingContainer", void 0), p(t, "_childrenToDisplay", void 0), p(t, "_columnStartIndex", void 0), p(t, "_columnStopIndex", void 0), p(t, "_rowStartIndex", void 0), p(t, "_rowStopIndex", void 0), p(t, "_renderedColumnStartIndex", 0), p(t, "_renderedColumnStopIndex", 0), p(t, "_renderedRowStartIndex", 0), p(t, "_renderedRowStopIndex", 0), p(t, "_initialScrollTop", void 0), p(t, "_initialScrollLeft", void 0), p(t, "_disablePointerEventsTimeoutId", void 0), p(t, "_styleCache", {}), p(t, "_cellCache", {}), p(t, "_debounceScrollEndedCallback", function() {
932
- t._disablePointerEventsTimeoutId = null, t.setState({ isScrolling: !1, needToResetStyleCache: !1 });
933
- }), p(t, "_invokeOnGridRenderedHelper", function() {
934
- var s = t.props.onSectionRendered;
935
- t._onGridRenderedMemoizer({ callback: s, indices: { columnOverscanStartIndex: t._columnStartIndex, columnOverscanStopIndex: t._columnStopIndex, columnStartIndex: t._renderedColumnStartIndex, columnStopIndex: t._renderedColumnStopIndex, rowOverscanStartIndex: t._rowStartIndex, rowOverscanStopIndex: t._rowStopIndex, rowStartIndex: t._renderedRowStartIndex, rowStopIndex: t._renderedRowStopIndex } });
936
- }), p(t, "_setScrollingContainerRef", function(s) {
937
- t._scrollingContainer = s, typeof t.props.elementRef == "function" ? t.props.elementRef(s) : $(t.props.elementRef) === "object" && (t.props.elementRef.current = s);
938
- }), p(t, "_onScroll", function(s) {
939
- s.target === t._scrollingContainer && t.handleScrollEvent(s.target);
940
- });
941
- var i = new Je({ cellCount: e.columnCount, cellSizeGetter: function(s) {
942
- return o._wrapSizeGetter(e.columnWidth)(s);
943
- }, estimatedCellSize: o._getEstimatedColumnSize(e) }), a = new Je({ cellCount: e.rowCount, cellSizeGetter: function(s) {
944
- return o._wrapSizeGetter(e.rowHeight)(s);
945
- }, estimatedCellSize: o._getEstimatedRowSize(e) });
946
- return t.state = { instanceProps: { columnSizeAndPositionManager: i, rowSizeAndPositionManager: a, prevColumnWidth: e.columnWidth, prevRowHeight: e.rowHeight, prevColumnCount: e.columnCount, prevRowCount: e.rowCount, prevIsScrolling: e.isScrolling === !0, prevScrollToColumn: e.scrollToColumn, prevScrollToRow: e.scrollToRow, scrollbarSize: 0, scrollbarSizeMeasured: !1 }, isScrolling: !1, scrollDirectionHorizontal: 1, scrollDirectionVertical: 1, scrollLeft: 0, scrollTop: 0, scrollPositionChangeReason: null, needToResetStyleCache: !1 }, e.scrollToRow > 0 && (t._initialScrollTop = t._getCalculatedScrollTop(e, t.state)), e.scrollToColumn > 0 && (t._initialScrollLeft = t._getCalculatedScrollLeft(e, t.state)), t;
947
- }
948
- return D(o, x.PureComponent), A(o, [{ key: "getOffsetForCell", value: function() {
949
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.alignment, n = t === void 0 ? this.props.scrollToAlignment : t, r = e.columnIndex, l = r === void 0 ? this.props.scrollToColumn : r, i = e.rowIndex, a = i === void 0 ? this.props.scrollToRow : i, s = j(j({}, this.props), {}, { scrollToAlignment: n, scrollToColumn: l, scrollToRow: a });
950
- return { scrollLeft: this._getCalculatedScrollLeft(s), scrollTop: this._getCalculatedScrollTop(s) };
951
- } }, { key: "getTotalRowsHeight", value: function() {
952
- return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize();
953
- } }, { key: "getTotalColumnsWidth", value: function() {
954
- return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize();
955
- } }, { key: "handleScrollEvent", value: function(e) {
956
- var t = e.scrollLeft, n = t === void 0 ? 0 : t, r = e.scrollTop, l = r === void 0 ? 0 : r;
957
- if (!(l < 0)) {
958
- this._debounceScrollEnded();
959
- var i = this.props, a = i.autoHeight, s = i.autoWidth, c = i.height, u = i.width, d = this.state.instanceProps, f = d.scrollbarSize, h = d.rowSizeAndPositionManager.getTotalSize(), g = d.columnSizeAndPositionManager.getTotalSize(), v = Math.min(Math.max(0, g - u + f), n), _ = Math.min(Math.max(0, h - c + f), l);
960
- if (this.state.scrollLeft !== v || this.state.scrollTop !== _) {
961
- var S = { isScrolling: !0, scrollDirectionHorizontal: v !== this.state.scrollLeft ? v > this.state.scrollLeft ? 1 : -1 : this.state.scrollDirectionHorizontal, scrollDirectionVertical: _ !== this.state.scrollTop ? _ > this.state.scrollTop ? 1 : -1 : this.state.scrollDirectionVertical, scrollPositionChangeReason: Eo };
962
- a || (S.scrollTop = _), s || (S.scrollLeft = v), S.needToResetStyleCache = !1, this.setState(S);
963
- }
964
- this._invokeOnScrollMemoizer({ scrollLeft: v, scrollTop: _, totalColumnsWidth: g, totalRowsHeight: h });
965
- }
966
- } }, { key: "invalidateCellSizeAfterRender", value: function(e) {
967
- var t = e.columnIndex, n = e.rowIndex;
968
- this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex == "number" ? Math.min(this._deferredInvalidateColumnIndex, t) : t, this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex == "number" ? Math.min(this._deferredInvalidateRowIndex, n) : n;
969
- } }, { key: "measureAllCells", value: function() {
970
- var e = this.props, t = e.columnCount, n = e.rowCount, r = this.state.instanceProps;
971
- r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t - 1), r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n - 1);
972
- } }, { key: "recomputeGridSize", value: function() {
973
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r, i = this.props, a = i.scrollToColumn, s = i.scrollToRow, c = this.state.instanceProps;
974
- c.columnSizeAndPositionManager.resetCell(n), c.rowSizeAndPositionManager.resetCell(l), this._recomputeScrollLeftFlag = a >= 0 && (this.state.scrollDirectionHorizontal === 1 ? n <= a : n >= a), this._recomputeScrollTopFlag = s >= 0 && (this.state.scrollDirectionVertical === 1 ? l <= s : l >= s), this._styleCache = {}, this._cellCache = {}, this.forceUpdate();
975
- } }, { key: "scrollToCell", value: function(e) {
976
- var t = e.columnIndex, n = e.rowIndex, r = this.props.columnCount, l = this.props;
977
- r > 1 && t !== void 0 && this._updateScrollLeftForScrollToColumn(j(j({}, l), {}, { scrollToColumn: t })), n !== void 0 && this._updateScrollTopForScrollToRow(j(j({}, l), {}, { scrollToRow: n }));
978
- } }, { key: "componentDidMount", value: function() {
979
- var e = this.props, t = e.getScrollbarSize, n = e.height, r = e.scrollLeft, l = e.scrollToColumn, i = e.scrollTop, a = e.scrollToRow, s = e.width, c = this.state.instanceProps;
980
- if (this._initialScrollTop = 0, this._initialScrollLeft = 0, this._handleInvalidatedGridSize(), c.scrollbarSizeMeasured || this.setState(function(f) {
981
- var h = j(j({}, f), {}, { needToResetStyleCache: !1 });
982
- return h.instanceProps.scrollbarSize = t(), h.instanceProps.scrollbarSizeMeasured = !0, h;
983
- }), typeof r == "number" && r >= 0 || typeof i == "number" && i >= 0) {
984
- var u = o._getScrollToPositionStateUpdate({ prevState: this.state, scrollLeft: r, scrollTop: i });
985
- u && (u.needToResetStyleCache = !1, this.setState(u));
986
- }
987
- this._scrollingContainer && (this._scrollingContainer.scrollLeft !== this.state.scrollLeft && (this._scrollingContainer.scrollLeft = this.state.scrollLeft), this._scrollingContainer.scrollTop !== this.state.scrollTop && (this._scrollingContainer.scrollTop = this.state.scrollTop));
988
- var d = n > 0 && s > 0;
989
- l >= 0 && d && this._updateScrollLeftForScrollToColumn(), a >= 0 && d && this._updateScrollTopForScrollToRow(), this._invokeOnGridRenderedHelper(), this._invokeOnScrollMemoizer({ scrollLeft: r || 0, scrollTop: i || 0, totalColumnsWidth: c.columnSizeAndPositionManager.getTotalSize(), totalRowsHeight: c.rowSizeAndPositionManager.getTotalSize() }), this._maybeCallOnScrollbarPresenceChange();
990
- } }, { key: "componentDidUpdate", value: function(e, t) {
991
- var n = this, r = this.props, l = r.autoHeight, i = r.autoWidth, a = r.columnCount, s = r.height, c = r.rowCount, u = r.scrollToAlignment, d = r.scrollToColumn, f = r.scrollToRow, h = r.width, g = this.state, v = g.scrollLeft, _ = g.scrollPositionChangeReason, S = g.scrollTop, m = g.instanceProps;
992
- this._handleInvalidatedGridSize();
993
- var y = a > 0 && e.columnCount === 0 || c > 0 && e.rowCount === 0;
994
- _ === tt && (!i && v >= 0 && (v !== this._scrollingContainer.scrollLeft || y) && (this._scrollingContainer.scrollLeft = v), !l && S >= 0 && (S !== this._scrollingContainer.scrollTop || y) && (this._scrollingContainer.scrollTop = S));
995
- var w = (e.width === 0 || e.height === 0) && s > 0 && h > 0;
996
- if (this._recomputeScrollLeftFlag ? (this._recomputeScrollLeftFlag = !1, this._updateScrollLeftForScrollToColumn(this.props)) : Ze({ cellSizeAndPositionManager: m.columnSizeAndPositionManager, previousCellsCount: e.columnCount, previousCellSize: e.columnWidth, previousScrollToAlignment: e.scrollToAlignment, previousScrollToIndex: e.scrollToColumn, previousSize: e.width, scrollOffset: v, scrollToAlignment: u, scrollToIndex: d, size: h, sizeJustIncreasedFromZero: w, updateScrollIndexCallback: function() {
997
- return n._updateScrollLeftForScrollToColumn(n.props);
998
- } }), this._recomputeScrollTopFlag ? (this._recomputeScrollTopFlag = !1, this._updateScrollTopForScrollToRow(this.props)) : Ze({ cellSizeAndPositionManager: m.rowSizeAndPositionManager, previousCellsCount: e.rowCount, previousCellSize: e.rowHeight, previousScrollToAlignment: e.scrollToAlignment, previousScrollToIndex: e.scrollToRow, previousSize: e.height, scrollOffset: S, scrollToAlignment: u, scrollToIndex: f, size: s, sizeJustIncreasedFromZero: w, updateScrollIndexCallback: function() {
999
- return n._updateScrollTopForScrollToRow(n.props);
1000
- } }), this._invokeOnGridRenderedHelper(), v !== t.scrollLeft || S !== t.scrollTop) {
1001
- var C = m.rowSizeAndPositionManager.getTotalSize(), R = m.columnSizeAndPositionManager.getTotalSize();
1002
- this._invokeOnScrollMemoizer({ scrollLeft: v, scrollTop: S, totalColumnsWidth: R, totalRowsHeight: C });
1003
- }
1004
- this._maybeCallOnScrollbarPresenceChange();
1005
- } }, { key: "componentWillUnmount", value: function() {
1006
- this._disablePointerEventsTimeoutId && ee(this._disablePointerEventsTimeoutId);
1007
- } }, { key: "render", value: function() {
1008
- var e = this.props, t = e.autoContainerWidth, n = e.autoHeight, r = e.autoWidth, l = e.className, i = e.containerProps, a = e.containerRole, s = e.containerStyle, c = e.height, u = e.id, d = e.noContentRenderer, f = e.role, h = e.style, g = e.tabIndex, v = e.width, _ = this.state, S = _.instanceProps, m = _.needToResetStyleCache, y = this._isScrolling(), w = { boxSizing: "border-box", direction: "ltr", height: n ? "auto" : c, position: "relative", width: r ? "auto" : v, WebkitOverflowScrolling: "touch", willChange: "transform" };
1009
- m && (this._styleCache = {}), this.state.isScrolling || this._resetStyleCache(), this._calculateChildrenToRender(this.props, this.state);
1010
- var C = S.columnSizeAndPositionManager.getTotalSize(), R = S.rowSizeAndPositionManager.getTotalSize(), T = R > c ? S.scrollbarSize : 0, b = C > v ? S.scrollbarSize : 0;
1011
- b === this._horizontalScrollBarSize && T === this._verticalScrollBarSize || (this._horizontalScrollBarSize = b, this._verticalScrollBarSize = T, this._scrollbarPresenceChanged = !0), w.overflowX = C + T <= v ? "hidden" : "auto", w.overflowY = R + b <= c ? "hidden" : "auto";
1012
- var I = this._childrenToDisplay, O = I.length === 0 && c > 0 && v > 0;
1013
- return x.createElement("div", U({ ref: this._setScrollingContainerRef }, i, { "aria-label": this.props["aria-label"], "aria-readonly": this.props["aria-readonly"], className: N("ReactVirtualized__Grid", l), id: u, onScroll: this._onScroll, role: f, style: j(j({}, w), h), tabIndex: g }), I.length > 0 && x.createElement("div", { className: "ReactVirtualized__Grid__innerScrollContainer", role: a, style: j({ width: t ? "auto" : C, height: R, maxWidth: C, maxHeight: R, overflow: "hidden", pointerEvents: y ? "none" : "", position: "relative" }, s) }, I), O && d());
1014
- } }, { key: "_calculateChildrenToRender", value: function() {
1015
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state, n = e.cellRenderer, r = e.cellRangeRenderer, l = e.columnCount, i = e.deferredMeasurementCache, a = e.height, s = e.overscanColumnCount, c = e.overscanIndicesGetter, u = e.overscanRowCount, d = e.rowCount, f = e.width, h = e.isScrollingOptOut, g = t.scrollDirectionHorizontal, v = t.scrollDirectionVertical, _ = t.instanceProps, S = this._initialScrollTop > 0 ? this._initialScrollTop : t.scrollTop, m = this._initialScrollLeft > 0 ? this._initialScrollLeft : t.scrollLeft, y = this._isScrolling(e, t);
1016
- if (this._childrenToDisplay = [], a > 0 && f > 0) {
1017
- var w = _.columnSizeAndPositionManager.getVisibleCellRange({ containerSize: f, offset: m }), C = _.rowSizeAndPositionManager.getVisibleCellRange({ containerSize: a, offset: S }), R = _.columnSizeAndPositionManager.getOffsetAdjustment({ containerSize: f, offset: m }), T = _.rowSizeAndPositionManager.getOffsetAdjustment({ containerSize: a, offset: S });
1018
- this._renderedColumnStartIndex = w.start, this._renderedColumnStopIndex = w.stop, this._renderedRowStartIndex = C.start, this._renderedRowStopIndex = C.stop;
1019
- var b = c({ direction: "horizontal", cellCount: l, overscanCellsCount: s, scrollDirection: g, startIndex: typeof w.start == "number" ? w.start : 0, stopIndex: typeof w.stop == "number" ? w.stop : -1 }), I = c({ direction: "vertical", cellCount: d, overscanCellsCount: u, scrollDirection: v, startIndex: typeof C.start == "number" ? C.start : 0, stopIndex: typeof C.stop == "number" ? C.stop : -1 }), O = b.overscanStartIndex, z = b.overscanStopIndex, L = I.overscanStartIndex, k = I.overscanStopIndex;
1020
- if (i) {
1021
- if (!i.hasFixedHeight()) {
1022
- for (var E = L; E <= k; E++) if (!i.has(E, 0)) {
1023
- O = 0, z = l - 1;
1024
- break;
1025
- }
1026
- }
1027
- if (!i.hasFixedWidth()) {
1028
- for (var J = O; J <= z; J++) if (!i.has(0, J)) {
1029
- L = 0, k = d - 1;
1030
- break;
1031
- }
1032
- }
1033
- }
1034
- this._childrenToDisplay = r({ cellCache: this._cellCache, cellRenderer: n, columnSizeAndPositionManager: _.columnSizeAndPositionManager, columnStartIndex: O, columnStopIndex: z, deferredMeasurementCache: i, horizontalOffsetAdjustment: R, isScrolling: y, isScrollingOptOut: h, parent: this, rowSizeAndPositionManager: _.rowSizeAndPositionManager, rowStartIndex: L, rowStopIndex: k, scrollLeft: m, scrollTop: S, styleCache: this._styleCache, verticalOffsetAdjustment: T, visibleColumnIndices: w, visibleRowIndices: C }), this._columnStartIndex = O, this._columnStopIndex = z, this._rowStartIndex = L, this._rowStopIndex = k;
1035
- }
1036
- } }, { key: "_debounceScrollEnded", value: function() {
1037
- var e = this.props.scrollingResetTimeInterval;
1038
- this._disablePointerEventsTimeoutId && ee(this._disablePointerEventsTimeoutId), this._disablePointerEventsTimeoutId = Le(this._debounceScrollEndedCallback, e);
1039
- } }, { key: "_handleInvalidatedGridSize", value: function() {
1040
- if (typeof this._deferredInvalidateColumnIndex == "number" && typeof this._deferredInvalidateRowIndex == "number") {
1041
- var e = this._deferredInvalidateColumnIndex, t = this._deferredInvalidateRowIndex;
1042
- this._deferredInvalidateColumnIndex = null, this._deferredInvalidateRowIndex = null, this.recomputeGridSize({ columnIndex: e, rowIndex: t });
1043
- }
1044
- } }, { key: "_invokeOnScrollMemoizer", value: function(e) {
1045
- var t = this, n = e.scrollLeft, r = e.scrollTop, l = e.totalColumnsWidth, i = e.totalRowsHeight;
1046
- this._onScrollMemoizer({ callback: function(a) {
1047
- var s = a.scrollLeft, c = a.scrollTop, u = t.props, d = u.height;
1048
- (0, u.onScroll)({ clientHeight: d, clientWidth: u.width, scrollHeight: i, scrollLeft: s, scrollTop: c, scrollWidth: l });
1049
- }, indices: { scrollLeft: n, scrollTop: r } });
1050
- } }, { key: "_isScrolling", value: function() {
1051
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state;
1052
- return Object.hasOwnProperty.call(e, "isScrolling") ? !!e.isScrolling : !!t.isScrolling;
1053
- } }, { key: "_maybeCallOnScrollbarPresenceChange", value: function() {
1054
- if (this._scrollbarPresenceChanged) {
1055
- var e = this.props.onScrollbarPresenceChange;
1056
- this._scrollbarPresenceChanged = !1, e({ horizontal: this._horizontalScrollBarSize > 0, size: this.state.instanceProps.scrollbarSize, vertical: this._verticalScrollBarSize > 0 });
1057
- }
1058
- } }, { key: "scrollToPosition", value: function(e) {
1059
- var t = e.scrollLeft, n = e.scrollTop, r = o._getScrollToPositionStateUpdate({ prevState: this.state, scrollLeft: t, scrollTop: n });
1060
- r && (r.needToResetStyleCache = !1, this.setState(r));
1061
- } }, { key: "_getCalculatedScrollLeft", value: function() {
1062
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state;
1063
- return o._getCalculatedScrollLeft(e, t);
1064
- } }, { key: "_updateScrollLeftForScrollToColumn", value: function() {
1065
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state, n = o._getScrollLeftForScrollToColumnStateUpdate(e, t);
1066
- n && (n.needToResetStyleCache = !1, this.setState(n));
1067
- } }, { key: "_getCalculatedScrollTop", value: function() {
1068
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state;
1069
- return o._getCalculatedScrollTop(e, t);
1070
- } }, { key: "_resetStyleCache", value: function() {
1071
- var e = this._styleCache, t = this._cellCache, n = this.props.isScrollingOptOut;
1072
- this._cellCache = {}, this._styleCache = {};
1073
- for (var r = this._rowStartIndex; r <= this._rowStopIndex; r++) for (var l = this._columnStartIndex; l <= this._columnStopIndex; l++) {
1074
- var i = "".concat(r, "-").concat(l);
1075
- this._styleCache[i] = e[i], n && (this._cellCache[i] = t[i]);
1076
- }
1077
- } }, { key: "_updateScrollTopForScrollToRow", value: function() {
1078
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.state, n = o._getScrollTopForScrollToRowStateUpdate(e, t);
1079
- n && (n.needToResetStyleCache = !1, this.setState(n));
1080
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
1081
- var n = {};
1082
- e.columnCount === 0 && t.scrollLeft !== 0 || e.rowCount === 0 && t.scrollTop !== 0 ? (n.scrollLeft = 0, n.scrollTop = 0) : (e.scrollLeft !== t.scrollLeft && e.scrollToColumn < 0 || e.scrollTop !== t.scrollTop && e.scrollToRow < 0) && Object.assign(n, o._getScrollToPositionStateUpdate({ prevState: t, scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }));
1083
- var r, l, i = t.instanceProps;
1084
- return n.needToResetStyleCache = !1, e.columnWidth === i.prevColumnWidth && e.rowHeight === i.prevRowHeight || (n.needToResetStyleCache = !0), i.columnSizeAndPositionManager.configure({ cellCount: e.columnCount, estimatedCellSize: o._getEstimatedColumnSize(e), cellSizeGetter: o._wrapSizeGetter(e.columnWidth) }), i.rowSizeAndPositionManager.configure({ cellCount: e.rowCount, estimatedCellSize: o._getEstimatedRowSize(e), cellSizeGetter: o._wrapSizeGetter(e.rowHeight) }), i.prevColumnCount !== 0 && i.prevRowCount !== 0 || (i.prevColumnCount = 0, i.prevRowCount = 0), e.autoHeight && e.isScrolling === !1 && i.prevIsScrolling === !0 && Object.assign(n, { isScrolling: !1 }), Ye({ cellCount: i.prevColumnCount, cellSize: typeof i.prevColumnWidth == "number" ? i.prevColumnWidth : null, computeMetadataCallback: function() {
1085
- return i.columnSizeAndPositionManager.resetCell(0);
1086
- }, computeMetadataCallbackProps: e, nextCellsCount: e.columnCount, nextCellSize: typeof e.columnWidth == "number" ? e.columnWidth : null, nextScrollToIndex: e.scrollToColumn, scrollToIndex: i.prevScrollToColumn, updateScrollOffsetForScrollToIndex: function() {
1087
- r = o._getScrollLeftForScrollToColumnStateUpdate(e, t);
1088
- } }), Ye({ cellCount: i.prevRowCount, cellSize: typeof i.prevRowHeight == "number" ? i.prevRowHeight : null, computeMetadataCallback: function() {
1089
- return i.rowSizeAndPositionManager.resetCell(0);
1090
- }, computeMetadataCallbackProps: e, nextCellsCount: e.rowCount, nextCellSize: typeof e.rowHeight == "number" ? e.rowHeight : null, nextScrollToIndex: e.scrollToRow, scrollToIndex: i.prevScrollToRow, updateScrollOffsetForScrollToIndex: function() {
1091
- l = o._getScrollTopForScrollToRowStateUpdate(e, t);
1092
- } }), i.prevColumnCount = e.columnCount, i.prevColumnWidth = e.columnWidth, i.prevIsScrolling = e.isScrolling === !0, i.prevRowCount = e.rowCount, i.prevRowHeight = e.rowHeight, i.prevScrollToColumn = e.scrollToColumn, i.prevScrollToRow = e.scrollToRow, i.scrollbarSize = e.getScrollbarSize(), i.scrollbarSize === void 0 ? (i.scrollbarSizeMeasured = !1, i.scrollbarSize = 0) : i.scrollbarSizeMeasured = !0, n.instanceProps = i, j(j(j({}, n), r), l);
1093
- } }, { key: "_getEstimatedColumnSize", value: function(e) {
1094
- return typeof e.columnWidth == "number" ? e.columnWidth : e.estimatedColumnSize;
1095
- } }, { key: "_getEstimatedRowSize", value: function(e) {
1096
- return typeof e.rowHeight == "number" ? e.rowHeight : e.estimatedRowSize;
1097
- } }, { key: "_getScrollToPositionStateUpdate", value: function(e) {
1098
- var t = e.prevState, n = e.scrollLeft, r = e.scrollTop, l = { scrollPositionChangeReason: tt };
1099
- return typeof n == "number" && n >= 0 && (l.scrollDirectionHorizontal = n > t.scrollLeft ? 1 : -1, l.scrollLeft = n), typeof r == "number" && r >= 0 && (l.scrollDirectionVertical = r > t.scrollTop ? 1 : -1, l.scrollTop = r), typeof n == "number" && n >= 0 && n !== t.scrollLeft || typeof r == "number" && r >= 0 && r !== t.scrollTop ? l : {};
1100
- } }, { key: "_wrapSizeGetter", value: function(e) {
1101
- return typeof e == "function" ? e : function() {
1102
- return e;
1103
- };
1104
- } }, { key: "_getCalculatedScrollLeft", value: function(e, t) {
1105
- var n = e.columnCount, r = e.height, l = e.scrollToAlignment, i = e.scrollToColumn, a = e.width, s = t.scrollLeft, c = t.instanceProps;
1106
- if (n > 0) {
1107
- var u = n - 1, d = i < 0 ? u : Math.min(u, i), f = c.rowSizeAndPositionManager.getTotalSize(), h = c.scrollbarSizeMeasured && f > r ? c.scrollbarSize : 0;
1108
- return c.columnSizeAndPositionManager.getUpdatedOffsetForIndex({ align: l, containerSize: a - h, currentOffset: s, targetIndex: d });
1109
- }
1110
- return 0;
1111
- } }, { key: "_getScrollLeftForScrollToColumnStateUpdate", value: function(e, t) {
1112
- var n = t.scrollLeft, r = o._getCalculatedScrollLeft(e, t);
1113
- return typeof r == "number" && r >= 0 && n !== r ? o._getScrollToPositionStateUpdate({ prevState: t, scrollLeft: r, scrollTop: -1 }) : {};
1114
- } }, { key: "_getCalculatedScrollTop", value: function(e, t) {
1115
- var n = e.height, r = e.rowCount, l = e.scrollToAlignment, i = e.scrollToRow, a = e.width, s = t.scrollTop, c = t.instanceProps;
1116
- if (r > 0) {
1117
- var u = r - 1, d = i < 0 ? u : Math.min(u, i), f = c.columnSizeAndPositionManager.getTotalSize(), h = c.scrollbarSizeMeasured && f > a ? c.scrollbarSize : 0;
1118
- return c.rowSizeAndPositionManager.getUpdatedOffsetForIndex({ align: l, containerSize: n - h, currentOffset: s, targetIndex: d });
1119
- }
1120
- return 0;
1121
- } }, { key: "_getScrollTopForScrollToRowStateUpdate", value: function(e, t) {
1122
- var n = t.scrollTop, r = o._getCalculatedScrollTop(e, t);
1123
- return typeof r == "number" && r >= 0 && n !== r ? o._getScrollToPositionStateUpdate({ prevState: t, scrollLeft: -1, scrollTop: r }) : {};
1124
- } }]);
1125
- }();
1126
- p(V, "defaultProps", { "aria-label": "grid", "aria-readonly": !0, autoContainerWidth: !1, autoHeight: !1, autoWidth: !1, cellRangeRenderer: function(o) {
1127
- for (var e = o.cellCache, t = o.cellRenderer, n = o.columnSizeAndPositionManager, r = o.columnStartIndex, l = o.columnStopIndex, i = o.deferredMeasurementCache, a = o.horizontalOffsetAdjustment, s = o.isScrolling, c = o.isScrollingOptOut, u = o.parent, d = o.rowSizeAndPositionManager, f = o.rowStartIndex, h = o.rowStopIndex, g = o.styleCache, v = o.verticalOffsetAdjustment, _ = o.visibleColumnIndices, S = o.visibleRowIndices, m = [], y = n.areOffsetsAdjusted() || d.areOffsetsAdjusted(), w = !s && !y, C = f; C <= h; C++) for (var R = d.getSizeAndPositionOfCell(C), T = r; T <= l; T++) {
1128
- var b = n.getSizeAndPositionOfCell(T), I = T >= _.start && T <= _.stop && C >= S.start && C <= S.stop, O = "".concat(C, "-").concat(T), z = void 0;
1129
- w && g[O] ? z = g[O] : i && !i.has(C, T) ? z = { height: "auto", left: 0, position: "absolute", top: 0, width: "auto" } : (z = { height: R.size, left: b.offset + a, position: "absolute", top: R.offset + v, width: b.size }, g[O] = z);
1130
- var L = { columnIndex: T, isScrolling: s, isVisible: I, key: O, parent: u, rowIndex: C, style: z }, k = void 0;
1131
- !c && !s || a || v ? k = t(L) : (e[O] || (e[O] = t(L)), k = e[O]), k != null && k !== !1 && (k.props.role || (k = yt.cloneElement(k, { role: "gridcell" })), m.push(k));
1132
- }
1133
- return m;
1134
- }, containerRole: "row", containerStyle: {}, estimatedColumnSize: 100, estimatedRowSize: 30, getScrollbarSize: be, noContentRenderer: function() {
1135
- return null;
1136
- }, onScroll: function() {
1137
- }, onScrollbarPresenceChange: function() {
1138
- }, onSectionRendered: function() {
1139
- }, overscanColumnCount: 0, overscanIndicesGetter: function(o) {
1140
- var e = o.cellCount, t = o.overscanCellsCount, n = o.scrollDirection, r = o.startIndex, l = o.stopIndex;
1141
- return n === 1 ? { overscanStartIndex: Math.max(0, r), overscanStopIndex: Math.min(e - 1, l + t) } : { overscanStartIndex: Math.max(0, r - t), overscanStopIndex: Math.min(e - 1, l) };
1142
- }, overscanRowCount: 10, role: "grid", scrollingResetTimeInterval: 150, scrollToAlignment: "auto", scrollToColumn: -1, scrollToRow: -1, style: {}, tabIndex: 0, isScrollingOptOut: !1 }), ce(V);
1143
- function At(o) {
1144
- var e = o.cellCount, t = o.overscanCellsCount, n = o.scrollDirection, r = o.startIndex, l = o.stopIndex;
1145
- return t = Math.max(1, t), n === 1 ? { overscanStartIndex: Math.max(0, r - 1), overscanStopIndex: Math.min(e - 1, l + t) } : { overscanStartIndex: Math.max(0, r - t), overscanStopIndex: Math.min(e - 1, l + 1) };
1146
- }
1147
- function ze(o, e) {
1148
- (e == null || e > o.length) && (e = o.length);
1149
- for (var t = 0, n = Array(e); t < e; t++) n[t] = o[t];
1150
- return n;
1151
- }
1152
- function Et(o, e) {
1153
- if (o) {
1154
- if (typeof o == "string") return ze(o, e);
1155
- var t = {}.toString.call(o).slice(8, -1);
1156
- return t === "Object" && o.constructor && (t = o.constructor.name), t === "Map" || t === "Set" ? Array.from(o) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? ze(o, e) : void 0;
1157
- }
1158
- }
1159
- function Wo(o) {
1160
- return function(e) {
1161
- if (Array.isArray(e)) return ze(e);
1162
- }(o) || function(e) {
1163
- if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
1164
- }(o) || Et(o) || function() {
1165
- throw new TypeError(`Invalid attempt to spread non-iterable instance.
1166
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1167
- }();
1168
- }
1169
- function Wt() {
1170
- try {
1171
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1172
- }));
1173
- } catch {
1174
- }
1175
- return (Wt = function() {
1176
- return !!o;
1177
- })();
1178
- }
1179
- var ot = function() {
1180
- function o(e, t) {
1181
- var n, r, l, i;
1182
- return G(this, o), r = this, i = [e, t], l = P(l = o), (n = H(r, Wt() ? Reflect.construct(l, i || [], P(r).constructor) : l.apply(r, i)))._loadMoreRowsMemoizer = Q(), n._onRowsRendered = n._onRowsRendered.bind(n), n._registerChild = n._registerChild.bind(n), n;
1183
- }
1184
- return D(o, x.PureComponent), A(o, [{ key: "resetLoadMoreRowsCache", value: function(e) {
1185
- this._loadMoreRowsMemoizer = Q(), e && this._doStuff(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
1186
- } }, { key: "render", value: function() {
1187
- return (0, this.props.children)({ onRowsRendered: this._onRowsRendered, registerChild: this._registerChild });
1188
- } }, { key: "_loadUnloadedRanges", value: function(e) {
1189
- var t = this, n = this.props.loadMoreRows;
1190
- e.forEach(function(r) {
1191
- var l = n(r);
1192
- l && l.then(function() {
1193
- var i, a, s, c, u;
1194
- i = { lastRenderedStartIndex: t._lastRenderedStartIndex, lastRenderedStopIndex: t._lastRenderedStopIndex, startIndex: r.startIndex, stopIndex: r.stopIndex }, a = i.lastRenderedStartIndex, s = i.lastRenderedStopIndex, c = i.startIndex, u = i.stopIndex, c > s || u < a || t._registeredChild && function(d) {
1195
- var f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, h = typeof d.recomputeGridSize == "function" ? d.recomputeGridSize : d.recomputeRowHeights;
1196
- h ? h.call(d, f) : d.forceUpdate();
1197
- }(t._registeredChild, t._lastRenderedStartIndex);
1198
- });
1199
- });
1200
- } }, { key: "_onRowsRendered", value: function(e) {
1201
- var t = e.startIndex, n = e.stopIndex;
1202
- this._lastRenderedStartIndex = t, this._lastRenderedStopIndex = n, this._doStuff(t, n);
1203
- } }, { key: "_doStuff", value: function(e, t) {
1204
- var n, r = this, l = this.props, i = l.isRowLoaded, a = l.minimumBatchSize, s = l.rowCount, c = l.threshold, u = function(f) {
1205
- for (var h = f.isRowLoaded, g = f.minimumBatchSize, v = f.rowCount, _ = f.startIndex, S = f.stopIndex, m = [], y = null, w = null, C = _; C <= S; C++)
1206
- h({ index: C }) ? w !== null && (m.push({ startIndex: y, stopIndex: w }), y = w = null) : (w = C, y === null && (y = C));
1207
- if (w !== null) {
1208
- for (var R = Math.min(Math.max(w, y + g - 1), v - 1), T = w + 1; T <= R && !h({ index: T }); T++) w = T;
1209
- m.push({ startIndex: y, stopIndex: w });
1210
- }
1211
- if (m.length) for (var b = m[0]; b.stopIndex - b.startIndex + 1 < g && b.startIndex > 0; ) {
1212
- var I = b.startIndex - 1;
1213
- if (h({ index: I })) break;
1214
- b.startIndex = I;
1215
- }
1216
- return m;
1217
- }({ isRowLoaded: i, minimumBatchSize: a, rowCount: s, startIndex: Math.max(0, e - c), stopIndex: Math.min(s - 1, t + c) }), d = (n = []).concat.apply(n, Wo(u.map(function(f) {
1218
- return [f.startIndex, f.stopIndex];
1219
- })));
1220
- this._loadMoreRowsMemoizer({ callback: function() {
1221
- r._loadUnloadedRanges(u);
1222
- }, indices: { squashedUnloadedRanges: d } });
1223
- } }, { key: "_registerChild", value: function(e) {
1224
- this._registeredChild = e;
1225
- } }]);
1226
- }();
1227
- function Ht() {
1228
- try {
1229
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1230
- }));
1231
- } catch {
1232
- }
1233
- return (Ht = function() {
1234
- return !!o;
1235
- })();
1236
- }
1237
- p(ot, "defaultProps", { minimumBatchSize: 10, rowCount: 0, threshold: 15 }), ot.propTypes = {};
1238
- var Ho = function() {
1239
- function o() {
1240
- var e, t, n, r;
1241
- G(this, o);
1242
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
1243
- return t = this, n = o, r = [].concat(i), n = P(n), p(e = H(t, Ht() ? Reflect.construct(n, r || [], P(t).constructor) : n.apply(t, r)), "Grid", void 0), p(e, "_cellRenderer", function(s) {
1244
- var c = s.parent, u = s.rowIndex, d = s.style, f = s.isScrolling, h = s.isVisible, g = s.key, v = e.props.rowRenderer, _ = Object.getOwnPropertyDescriptor(d, "width");
1245
- return _ && _.writable && (d.width = "100%"), v({ index: u, style: d, isScrolling: f, isVisible: h, key: g, parent: c });
1246
- }), p(e, "_setRef", function(s) {
1247
- e.Grid = s;
1248
- }), p(e, "_onScroll", function(s) {
1249
- var c = s.clientHeight, u = s.scrollHeight, d = s.scrollTop;
1250
- (0, e.props.onScroll)({ clientHeight: c, scrollHeight: u, scrollTop: d });
1251
- }), p(e, "_onSectionRendered", function(s) {
1252
- var c = s.rowOverscanStartIndex, u = s.rowOverscanStopIndex, d = s.rowStartIndex, f = s.rowStopIndex;
1253
- (0, e.props.onRowsRendered)({ overscanStartIndex: c, overscanStopIndex: u, startIndex: d, stopIndex: f });
1254
- }), e;
1255
- }
1256
- return D(o, x.PureComponent), A(o, [{ key: "forceUpdateGrid", value: function() {
1257
- this.Grid && this.Grid.forceUpdate();
1258
- } }, { key: "getOffsetForRow", value: function(e) {
1259
- var t = e.alignment, n = e.index;
1260
- return this.Grid ? this.Grid.getOffsetForCell({ alignment: t, rowIndex: n, columnIndex: 0 }).scrollTop : 0;
1261
- } }, { key: "invalidateCellSizeAfterRender", value: function(e) {
1262
- var t = e.columnIndex, n = e.rowIndex;
1263
- this.Grid && this.Grid.invalidateCellSizeAfterRender({ rowIndex: n, columnIndex: t });
1264
- } }, { key: "measureAllRows", value: function() {
1265
- this.Grid && this.Grid.measureAllCells();
1266
- } }, { key: "recomputeGridSize", value: function() {
1267
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r;
1268
- this.Grid && this.Grid.recomputeGridSize({ rowIndex: l, columnIndex: n });
1269
- } }, { key: "recomputeRowHeights", value: function() {
1270
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1271
- this.Grid && this.Grid.recomputeGridSize({ rowIndex: e, columnIndex: 0 });
1272
- } }, { key: "scrollToPosition", value: function() {
1273
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1274
- this.Grid && this.Grid.scrollToPosition({ scrollTop: e });
1275
- } }, { key: "scrollToRow", value: function() {
1276
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1277
- this.Grid && this.Grid.scrollToCell({ columnIndex: 0, rowIndex: e });
1278
- } }, { key: "render", value: function() {
1279
- var e = this.props, t = e.className, n = e.noRowsRenderer, r = e.scrollToIndex, l = e.width, i = N("ReactVirtualized__List", t);
1280
- return x.createElement(V, U({}, this.props, { autoContainerWidth: !0, cellRenderer: this._cellRenderer, className: i, columnWidth: l, columnCount: 1, noContentRenderer: n, onScroll: this._onScroll, onSectionRendered: this._onSectionRendered, ref: this._setRef, scrollToRow: r }));
1281
- } }]);
1282
- }();
1283
- function Do(o, e) {
1284
- return function(t) {
1285
- if (Array.isArray(t)) return t;
1286
- }(o) || function(t, n) {
1287
- var r = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1288
- if (r != null) {
1289
- var l, i, a, s, c = [], u = !0, d = !1;
1290
- try {
1291
- if (a = (r = r.call(t)).next, n !== 0) for (; !(u = (l = a.call(r)).done) && (c.push(l.value), c.length !== n); u = !0) ;
1292
- } catch (f) {
1293
- d = !0, i = f;
1294
- } finally {
1295
- try {
1296
- if (!u && r.return != null && (s = r.return(), Object(s) !== s)) return;
1297
- } finally {
1298
- if (d) throw i;
1299
- }
1300
- }
1301
- return c;
1302
- }
1303
- }(o, e) || Et(o, e) || function() {
1304
- throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1305
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1306
- }();
1307
- }
1308
- p(Ho, "defaultProps", { autoHeight: !1, estimatedRowSize: 30, onScroll: function() {
1309
- }, noRowsRenderer: function() {
1310
- return null;
1311
- }, onRowsRendered: function() {
1312
- }, overscanIndicesGetter: At, overscanRowCount: 10, scrollToAlignment: "auto", scrollToIndex: -1, style: {} });
1313
- const me = { ge: function(o, e, t, n, r) {
1314
- return typeof t == "function" ? function(l, i, a, s, c) {
1315
- for (var u = a + 1; i <= a; ) {
1316
- var d = i + a >>> 1;
1317
- c(l[d], s) >= 0 ? (u = d, a = d - 1) : i = d + 1;
1318
- }
1319
- return u;
1320
- }(o, n === void 0 ? 0 : 0 | n, r === void 0 ? o.length - 1 : 0 | r, e, t) : function(l, i, a, s) {
1321
- for (var c = a + 1; i <= a; ) {
1322
- var u = i + a >>> 1;
1323
- l[u] >= s ? (c = u, a = u - 1) : i = u + 1;
1324
- }
1325
- return c;
1326
- }(o, t === void 0 ? 0 : 0 | t, n === void 0 ? o.length - 1 : 0 | n, e);
1327
- }, gt: function(o, e, t, n, r) {
1328
- return typeof t == "function" ? function(l, i, a, s, c) {
1329
- for (var u = a + 1; i <= a; ) {
1330
- var d = i + a >>> 1;
1331
- c(l[d], s) > 0 ? (u = d, a = d - 1) : i = d + 1;
1332
- }
1333
- return u;
1334
- }(o, n === void 0 ? 0 : 0 | n, r === void 0 ? o.length - 1 : 0 | r, e, t) : function(l, i, a, s) {
1335
- for (var c = a + 1; i <= a; ) {
1336
- var u = i + a >>> 1;
1337
- l[u] > s ? (c = u, a = u - 1) : i = u + 1;
1338
- }
1339
- return c;
1340
- }(o, t === void 0 ? 0 : 0 | t, n === void 0 ? o.length - 1 : 0 | n, e);
1341
- }, lt: function(o, e, t, n, r) {
1342
- return typeof t == "function" ? function(l, i, a, s, c) {
1343
- for (var u = i - 1; i <= a; ) {
1344
- var d = i + a >>> 1;
1345
- c(l[d], s) < 0 ? (u = d, i = d + 1) : a = d - 1;
1346
- }
1347
- return u;
1348
- }(o, n === void 0 ? 0 : 0 | n, r === void 0 ? o.length - 1 : 0 | r, e, t) : function(l, i, a, s) {
1349
- for (var c = i - 1; i <= a; ) {
1350
- var u = i + a >>> 1;
1351
- l[u] < s ? (c = u, i = u + 1) : a = u - 1;
1352
- }
1353
- return c;
1354
- }(o, t === void 0 ? 0 : 0 | t, n === void 0 ? o.length - 1 : 0 | n, e);
1355
- }, le: function(o, e, t, n, r) {
1356
- return typeof t == "function" ? function(l, i, a, s, c) {
1357
- for (var u = i - 1; i <= a; ) {
1358
- var d = i + a >>> 1;
1359
- c(l[d], s) <= 0 ? (u = d, i = d + 1) : a = d - 1;
1360
- }
1361
- return u;
1362
- }(o, n === void 0 ? 0 : 0 | n, r === void 0 ? o.length - 1 : 0 | r, e, t) : function(l, i, a, s) {
1363
- for (var c = i - 1; i <= a; ) {
1364
- var u = i + a >>> 1;
1365
- l[u] <= s ? (c = u, i = u + 1) : a = u - 1;
1366
- }
1367
- return c;
1368
- }(o, t === void 0 ? 0 : 0 | t, n === void 0 ? o.length - 1 : 0 | n, e);
1369
- }, eq: function(o, e, t, n, r) {
1370
- return typeof t == "function" ? function(l, i, a, s, c) {
1371
- for (; i <= a; ) {
1372
- var u = i + a >>> 1, d = c(l[u], s);
1373
- if (d === 0) return u;
1374
- d <= 0 ? i = u + 1 : a = u - 1;
1375
- }
1376
- return -1;
1377
- }(o, n === void 0 ? 0 : 0 | n, r === void 0 ? o.length - 1 : 0 | r, e, t) : function(l, i, a, s) {
1378
- for (; i <= a; ) {
1379
- var c = i + a >>> 1, u = l[c];
1380
- if (u === s) return c;
1381
- u <= s ? i = c + 1 : a = c - 1;
1382
- }
1383
- return -1;
1384
- }(o, t === void 0 ? 0 : 0 | t, n === void 0 ? o.length - 1 : 0 | n, e);
1385
- } };
1386
- function Ge(o, e, t, n, r) {
1387
- this.mid = o, this.left = e, this.right = t, this.leftPoints = n, this.rightPoints = r, this.count = (e ? e.count : 0) + (t ? t.count : 0) + n.length;
1388
- }
1389
- var oe = Ge.prototype;
1390
- function we(o, e) {
1391
- o.mid = e.mid, o.left = e.left, o.right = e.right, o.leftPoints = e.leftPoints, o.rightPoints = e.rightPoints, o.count = e.count;
1392
- }
1393
- function Dt(o, e) {
1394
- var t = se(e);
1395
- o.mid = t.mid, o.left = t.left, o.right = t.right, o.leftPoints = t.leftPoints, o.rightPoints = t.rightPoints, o.count = t.count;
1396
- }
1397
- function nt(o, e) {
1398
- var t = o.intervals([]);
1399
- t.push(e), Dt(o, t);
1400
- }
1401
- function rt(o, e) {
1402
- var t = o.intervals([]), n = t.indexOf(e);
1403
- return n < 0 ? 0 : (t.splice(n, 1), Dt(o, t), 1);
1404
- }
1405
- function it(o, e, t) {
1406
- for (var n = 0; n < o.length && o[n][0] <= e; ++n) {
1407
- var r = t(o[n]);
1408
- if (r) return r;
1409
- }
1410
- }
1411
- function lt(o, e, t) {
1412
- for (var n = o.length - 1; n >= 0 && o[n][1] >= e; --n) {
1413
- var r = t(o[n]);
1414
- if (r) return r;
1415
- }
1416
- }
1417
- function st(o, e) {
1418
- for (var t = 0; t < o.length; ++t) {
1419
- var n = e(o[t]);
1420
- if (n) return n;
1421
- }
1422
- }
1423
- function jo(o, e) {
1424
- return o - e;
1425
- }
1426
- function Te(o, e) {
1427
- var t = o[0] - e[0];
1428
- return t || o[1] - e[1];
1429
- }
1430
- function Ie(o, e) {
1431
- var t = o[1] - e[1];
1432
- return t || o[0] - e[0];
1433
- }
1434
- function se(o) {
1435
- if (o.length === 0) return null;
1436
- for (var e = [], t = 0; t < o.length; ++t) e.push(o[t][0], o[t][1]);
1437
- e.sort(jo);
1438
- var n = e[e.length >> 1], r = [], l = [], i = [];
1439
- for (t = 0; t < o.length; ++t) {
1440
- var a = o[t];
1441
- a[1] < n ? r.push(a) : n < a[0] ? l.push(a) : i.push(a);
1442
- }
1443
- var s = i, c = i.slice();
1444
- return s.sort(Te), c.sort(Ie), new Ge(n, se(r), se(l), s, c);
1445
- }
1446
- function jt(o) {
1447
- this.root = o;
1448
- }
1449
- oe.intervals = function(o) {
1450
- return o.push.apply(o, this.leftPoints), this.left && this.left.intervals(o), this.right && this.right.intervals(o), o;
1451
- }, oe.insert = function(o) {
1452
- var e = this.count - this.leftPoints.length;
1453
- if (this.count += 1, o[1] < this.mid) this.left ? 4 * (this.left.count + 1) > 3 * (e + 1) ? nt(this, o) : this.left.insert(o) : this.left = se([o]);
1454
- else if (o[0] > this.mid) this.right ? 4 * (this.right.count + 1) > 3 * (e + 1) ? nt(this, o) : this.right.insert(o) : this.right = se([o]);
1455
- else {
1456
- var t = me.ge(this.leftPoints, o, Te), n = me.ge(this.rightPoints, o, Ie);
1457
- this.leftPoints.splice(t, 0, o), this.rightPoints.splice(n, 0, o);
1458
- }
1459
- }, oe.remove = function(o) {
1460
- var e = this.count - this.leftPoints;
1461
- if (o[1] < this.mid) return this.left ? 4 * (this.right ? this.right.count : 0) > 3 * (e - 1) ? rt(this, o) : (l = this.left.remove(o)) === 2 ? (this.left = null, this.count -= 1, 1) : (l === 1 && (this.count -= 1), l) : 0;
1462
- if (o[0] > this.mid) return this.right ? 4 * (this.left ? this.left.count : 0) > 3 * (e - 1) ? rt(this, o) : (l = this.right.remove(o)) === 2 ? (this.right = null, this.count -= 1, 1) : (l === 1 && (this.count -= 1), l) : 0;
1463
- if (this.count === 1) return this.leftPoints[0] === o ? 2 : 0;
1464
- if (this.leftPoints.length === 1 && this.leftPoints[0] === o) {
1465
- if (this.left && this.right) {
1466
- for (var t = this, n = this.left; n.right; ) t = n, n = n.right;
1467
- if (t === this) n.right = this.right;
1468
- else {
1469
- var r = this.left, l = this.right;
1470
- t.count -= n.count, t.right = n.left, n.left = r, n.right = l;
1471
- }
1472
- we(this, n), this.count = (this.left ? this.left.count : 0) + (this.right ? this.right.count : 0) + this.leftPoints.length;
1473
- } else this.left ? we(this, this.left) : we(this, this.right);
1474
- return 1;
1475
- }
1476
- for (r = me.ge(this.leftPoints, o, Te); r < this.leftPoints.length && this.leftPoints[r][0] === o[0]; ++r) if (this.leftPoints[r] === o) {
1477
- for (this.count -= 1, this.leftPoints.splice(r, 1), l = me.ge(this.rightPoints, o, Ie); l < this.rightPoints.length && this.rightPoints[l][1] === o[1]; ++l) if (this.rightPoints[l] === o) return this.rightPoints.splice(l, 1), 1;
1478
- }
1479
- return 0;
1480
- }, oe.queryPoint = function(o, e) {
1481
- if (o < this.mid)
1482
- return this.left && (t = this.left.queryPoint(o, e)) ? t : it(this.leftPoints, o, e);
1483
- if (o > this.mid) {
1484
- var t;
1485
- return this.right && (t = this.right.queryPoint(o, e)) ? t : lt(this.rightPoints, o, e);
1486
- }
1487
- return st(this.leftPoints, e);
1488
- }, oe.queryInterval = function(o, e, t) {
1489
- var n;
1490
- return o < this.mid && this.left && (n = this.left.queryInterval(o, e, t)) || e > this.mid && this.right && (n = this.right.queryInterval(o, e, t)) ? n : e < this.mid ? it(this.leftPoints, e, t) : o > this.mid ? lt(this.rightPoints, o, t) : st(this.leftPoints, t);
1491
- };
1492
- var Z = jt.prototype;
1493
- Z.insert = function(o) {
1494
- this.root ? this.root.insert(o) : this.root = new Ge(o[0], null, null, [o], [o]);
1495
- }, Z.remove = function(o) {
1496
- if (this.root) {
1497
- var e = this.root.remove(o);
1498
- return e === 2 && (this.root = null), e !== 0;
1499
- }
1500
- return !1;
1501
- }, Z.queryPoint = function(o, e) {
1502
- if (this.root) return this.root.queryPoint(o, e);
1503
- }, Z.queryInterval = function(o, e, t) {
1504
- if (o <= e && this.root) return this.root.queryInterval(o, e, t);
1505
- }, Object.defineProperty(Z, "count", { get: function() {
1506
- return this.root ? this.root.count : 0;
1507
- } }), Object.defineProperty(Z, "intervals", { get: function() {
1508
- return this.root ? this.root.intervals([]) : [];
1509
- } });
1510
- var Ce = function() {
1511
- return A(function o() {
1512
- G(this, o), p(this, "_columnSizeMap", {}), p(this, "_intervalTree", new jt(null)), p(this, "_leftMap", {});
1513
- }, [{ key: "estimateTotalHeight", value: function(o, e, t) {
1514
- var n = o - this.count;
1515
- return this.tallestColumnSize + Math.ceil(n / e) * t;
1516
- } }, { key: "range", value: function(o, e, t) {
1517
- var n = this;
1518
- this._intervalTree.queryInterval(o, o + e, function(r) {
1519
- var l = Do(r, 3), i = l[0];
1520
- l[1];
1521
- var a = l[2];
1522
- return t(a, n._leftMap[a], i);
1523
- });
1524
- } }, { key: "setPosition", value: function(o, e, t, n) {
1525
- this._intervalTree.insert([t, t + n, o]), this._leftMap[o] = e;
1526
- var r = this._columnSizeMap, l = r[e];
1527
- r[e] = l === void 0 ? t + n : Math.max(l, t + n);
1528
- } }, { key: "count", get: function() {
1529
- return this._intervalTree.count;
1530
- } }, { key: "shortestColumnSize", get: function() {
1531
- var o = this._columnSizeMap, e = 0;
1532
- for (var t in o) {
1533
- var n = o[t];
1534
- e = e === 0 ? n : Math.min(e, n);
1535
- }
1536
- return e;
1537
- } }, { key: "tallestColumnSize", get: function() {
1538
- var o = this._columnSizeMap, e = 0;
1539
- for (var t in o) {
1540
- var n = o[t];
1541
- e = Math.max(e, n);
1542
- }
1543
- return e;
1544
- } }]);
1545
- }();
1546
- function at(o, e) {
1547
- var t = Object.keys(o);
1548
- if (Object.getOwnPropertySymbols) {
1549
- var n = Object.getOwnPropertySymbols(o);
1550
- e && (n = n.filter(function(r) {
1551
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
1552
- })), t.push.apply(t, n);
1553
- }
1554
- return t;
1555
- }
1556
- function Fo(o) {
1557
- for (var e = 1; e < arguments.length; e++) {
1558
- var t = arguments[e] != null ? arguments[e] : {};
1559
- e % 2 ? at(Object(t), !0).forEach(function(n) {
1560
- p(o, n, t[n]);
1561
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : at(Object(t)).forEach(function(n) {
1562
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
1563
- });
1564
- }
1565
- return o;
1566
- }
1567
- function Ft() {
1568
- try {
1569
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1570
- }));
1571
- } catch {
1572
- }
1573
- return (Ft = function() {
1574
- return !!o;
1575
- })();
1576
- }
1577
- var ct = function() {
1578
- function o() {
1579
- var e, t, n, r;
1580
- G(this, o);
1581
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
1582
- return t = this, n = o, r = [].concat(i), n = P(n), p(e = H(t, Ft() ? Reflect.construct(n, r || [], P(t).constructor) : n.apply(t, r)), "state", { isScrolling: !1, scrollTop: 0 }), p(e, "_debounceResetIsScrollingId", void 0), p(e, "_invalidateOnUpdateStartIndex", null), p(e, "_invalidateOnUpdateStopIndex", null), p(e, "_positionCache", new Ce()), p(e, "_startIndex", null), p(e, "_startIndexMemoized", null), p(e, "_stopIndex", null), p(e, "_stopIndexMemoized", null), p(e, "_debounceResetIsScrollingCallback", function() {
1583
- e.setState({ isScrolling: !1 });
1584
- }), p(e, "_setScrollingContainerRef", function(s) {
1585
- e._scrollingContainer = s;
1586
- }), p(e, "_onScroll", function(s) {
1587
- var c = e.props.height, u = s.currentTarget.scrollTop, d = Math.min(Math.max(0, e._getEstimatedTotalHeight() - c), u);
1588
- u === d && (e._debounceResetIsScrolling(), e.state.scrollTop !== d && e.setState({ isScrolling: !0, scrollTop: d }));
1589
- }), e;
1590
- }
1591
- return D(o, x.PureComponent), A(o, [{ key: "clearCellPositions", value: function() {
1592
- this._positionCache = new Ce(), this.forceUpdate();
1593
- } }, { key: "invalidateCellSizeAfterRender", value: function(e) {
1594
- var t = e.rowIndex;
1595
- this._invalidateOnUpdateStartIndex === null ? (this._invalidateOnUpdateStartIndex = t, this._invalidateOnUpdateStopIndex = t) : (this._invalidateOnUpdateStartIndex = Math.min(this._invalidateOnUpdateStartIndex, t), this._invalidateOnUpdateStopIndex = Math.max(this._invalidateOnUpdateStopIndex, t));
1596
- } }, { key: "recomputeCellPositions", value: function() {
1597
- var e = this._positionCache.count - 1;
1598
- this._positionCache = new Ce(), this._populatePositionCache(0, e), this.forceUpdate();
1599
- } }, { key: "componentDidMount", value: function() {
1600
- this._checkInvalidateOnUpdate(), this._invokeOnScrollCallback(), this._invokeOnCellsRenderedCallback();
1601
- } }, { key: "componentDidUpdate", value: function(e, t) {
1602
- this._checkInvalidateOnUpdate(), this._invokeOnScrollCallback(), this._invokeOnCellsRenderedCallback(), this.props.scrollTop !== e.scrollTop && this._debounceResetIsScrolling();
1603
- } }, { key: "componentWillUnmount", value: function() {
1604
- this._debounceResetIsScrollingId && ee(this._debounceResetIsScrollingId);
1605
- } }, { key: "render", value: function() {
1606
- var e, t = this, n = this.props, r = n.autoHeight, l = n.cellCount, i = n.cellMeasurerCache, a = n.cellRenderer, s = n.className, c = n.height, u = n.id, d = n.keyMapper, f = n.overscanByPixels, h = n.role, g = n.style, v = n.tabIndex, _ = n.width, S = n.rowDirection, m = this.state, y = m.isScrolling, w = m.scrollTop, C = [], R = this._getEstimatedTotalHeight(), T = this._positionCache.shortestColumnSize, b = this._positionCache.count, I = 0;
1607
- if (this._positionCache.range(Math.max(0, w - f), c + 2 * f, function(L, k, E) {
1608
- e === void 0 ? (I = L, e = L) : (I = Math.min(I, L), e = Math.max(e, L)), C.push(a({ index: L, isScrolling: y, key: d(L), parent: t, style: p(p(p(p({ height: i.getHeight(L) }, S === "ltr" ? "left" : "right", k), "position", "absolute"), "top", E), "width", i.getWidth(L)) }));
1609
- }), T < w + c + f && b < l) for (var O = Math.min(l - b, Math.ceil((w + c + f - T) / i.defaultHeight * _ / i.defaultWidth)), z = b; z < b + O; z++) e = z, C.push(a({ index: z, isScrolling: y, key: d(z), parent: this, style: { width: i.getWidth(z) } }));
1610
- return this._startIndex = I, this._stopIndex = e, x.createElement("div", { ref: this._setScrollingContainerRef, "aria-label": this.props["aria-label"], className: N("ReactVirtualized__Masonry", s), id: u, onScroll: this._onScroll, role: h, style: Fo({ boxSizing: "border-box", direction: "ltr", height: r ? "auto" : c, overflowX: "hidden", overflowY: R < c ? "hidden" : "auto", position: "relative", width: _, WebkitOverflowScrolling: "touch", willChange: "transform" }, g), tabIndex: v }, x.createElement("div", { className: "ReactVirtualized__Masonry__innerScrollContainer", style: { width: "100%", height: R, maxWidth: "100%", maxHeight: R, overflow: "hidden", pointerEvents: y ? "none" : "", position: "relative" } }, C));
1611
- } }, { key: "_checkInvalidateOnUpdate", value: function() {
1612
- if (typeof this._invalidateOnUpdateStartIndex == "number") {
1613
- var e = this._invalidateOnUpdateStartIndex, t = this._invalidateOnUpdateStopIndex;
1614
- this._invalidateOnUpdateStartIndex = null, this._invalidateOnUpdateStopIndex = null, this._populatePositionCache(e, t), this.forceUpdate();
1615
- }
1616
- } }, { key: "_debounceResetIsScrolling", value: function() {
1617
- var e = this.props.scrollingResetTimeInterval;
1618
- this._debounceResetIsScrollingId && ee(this._debounceResetIsScrollingId), this._debounceResetIsScrollingId = Le(this._debounceResetIsScrollingCallback, e);
1619
- } }, { key: "_getEstimatedTotalHeight", value: function() {
1620
- var e = this.props, t = e.cellCount, n = e.cellMeasurerCache, r = e.width, l = Math.max(1, Math.floor(r / n.defaultWidth));
1621
- return this._positionCache.estimateTotalHeight(t, l, n.defaultHeight);
1622
- } }, { key: "_invokeOnScrollCallback", value: function() {
1623
- var e = this.props, t = e.height, n = e.onScroll, r = this.state.scrollTop;
1624
- this._onScrollMemoized !== r && (n({ clientHeight: t, scrollHeight: this._getEstimatedTotalHeight(), scrollTop: r }), this._onScrollMemoized = r);
1625
- } }, { key: "_invokeOnCellsRenderedCallback", value: function() {
1626
- this._startIndexMemoized === this._startIndex && this._stopIndexMemoized === this._stopIndex || ((0, this.props.onCellsRendered)({ startIndex: this._startIndex, stopIndex: this._stopIndex }), this._startIndexMemoized = this._startIndex, this._stopIndexMemoized = this._stopIndex);
1627
- } }, { key: "_populatePositionCache", value: function(e, t) {
1628
- for (var n = this.props, r = n.cellMeasurerCache, l = n.cellPositioner, i = e; i <= t; i++) {
1629
- var a = l(i), s = a.left, c = a.top;
1630
- this._positionCache.setPosition(i, s, c, r.getHeight(i));
1631
- }
1632
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
1633
- return e.scrollTop !== void 0 && t.scrollTop !== e.scrollTop ? { isScrolling: !0, scrollTop: e.scrollTop } : null;
1634
- } }]);
1635
- }();
1636
- function ut() {
1637
- }
1638
- p(ct, "defaultProps", { autoHeight: !1, keyMapper: function(o) {
1639
- return o;
1640
- }, onCellsRendered: ut, onScroll: ut, overscanByPixels: 20, role: "grid", scrollingResetTimeInterval: 150, style: {}, tabIndex: 0, rowDirection: "ltr" }), ce(ct);
1641
- var xe = function() {
1642
- return A(function o() {
1643
- var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1644
- G(this, o), p(this, "_cellMeasurerCache", void 0), p(this, "_columnIndexOffset", void 0), p(this, "_rowIndexOffset", void 0), p(this, "columnWidth", function(s) {
1645
- var c = s.index;
1646
- e._cellMeasurerCache.columnWidth({ index: c + e._columnIndexOffset });
1647
- }), p(this, "rowHeight", function(s) {
1648
- var c = s.index;
1649
- e._cellMeasurerCache.rowHeight({ index: c + e._rowIndexOffset });
1650
- });
1651
- var n = t.cellMeasurerCache, r = t.columnIndexOffset, l = r === void 0 ? 0 : r, i = t.rowIndexOffset, a = i === void 0 ? 0 : i;
1652
- this._cellMeasurerCache = n, this._columnIndexOffset = l, this._rowIndexOffset = a;
1653
- }, [{ key: "clear", value: function(o, e) {
1654
- this._cellMeasurerCache.clear(o + this._rowIndexOffset, e + this._columnIndexOffset);
1655
- } }, { key: "clearAll", value: function() {
1656
- this._cellMeasurerCache.clearAll();
1657
- } }, { key: "defaultHeight", get: function() {
1658
- return this._cellMeasurerCache.defaultHeight;
1659
- } }, { key: "defaultWidth", get: function() {
1660
- return this._cellMeasurerCache.defaultWidth;
1661
- } }, { key: "hasFixedHeight", value: function() {
1662
- return this._cellMeasurerCache.hasFixedHeight();
1663
- } }, { key: "hasFixedWidth", value: function() {
1664
- return this._cellMeasurerCache.hasFixedWidth();
1665
- } }, { key: "getHeight", value: function(o) {
1666
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1667
- return this._cellMeasurerCache.getHeight(o + this._rowIndexOffset, e + this._columnIndexOffset);
1668
- } }, { key: "getWidth", value: function(o) {
1669
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1670
- return this._cellMeasurerCache.getWidth(o + this._rowIndexOffset, e + this._columnIndexOffset);
1671
- } }, { key: "has", value: function(o) {
1672
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
1673
- return this._cellMeasurerCache.has(o + this._rowIndexOffset, e + this._columnIndexOffset);
1674
- } }, { key: "set", value: function(o, e, t, n) {
1675
- this._cellMeasurerCache.set(o + this._rowIndexOffset, e + this._columnIndexOffset, t, n);
1676
- } }]);
1677
- }(), No = ["rowIndex"], Bo = ["columnIndex", "rowIndex"], Uo = ["columnIndex"], Vo = ["onScroll", "onSectionRendered", "onScrollbarPresenceChange", "scrollLeft", "scrollToColumn", "scrollTop", "scrollToRow"];
1678
- function dt(o, e) {
1679
- var t = Object.keys(o);
1680
- if (Object.getOwnPropertySymbols) {
1681
- var n = Object.getOwnPropertySymbols(o);
1682
- e && (n = n.filter(function(r) {
1683
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
1684
- })), t.push.apply(t, n);
1685
- }
1686
- return t;
1687
- }
1688
- function M(o) {
1689
- for (var e = 1; e < arguments.length; e++) {
1690
- var t = arguments[e] != null ? arguments[e] : {};
1691
- e % 2 ? dt(Object(t), !0).forEach(function(n) {
1692
- p(o, n, t[n]);
1693
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : dt(Object(t)).forEach(function(n) {
1694
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
1695
- });
1696
- }
1697
- return o;
1698
- }
1699
- function Nt() {
1700
- try {
1701
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1702
- }));
1703
- } catch {
1704
- }
1705
- return (Nt = function() {
1706
- return !!o;
1707
- })();
1708
- }
1709
- var Re = function() {
1710
- function o(e, t) {
1711
- var n, r, l, i;
1712
- G(this, o), r = this, i = [e, t], l = P(l = o), p(n = H(r, Nt() ? Reflect.construct(l, i || [], P(r).constructor) : l.apply(r, i)), "state", { scrollLeft: 0, scrollTop: 0, scrollbarSize: 0, showHorizontalScrollbar: !1, showVerticalScrollbar: !1 }), p(n, "_deferredInvalidateColumnIndex", null), p(n, "_deferredInvalidateRowIndex", null), p(n, "_bottomLeftGridRef", function(u) {
1713
- n._bottomLeftGrid = u;
1714
- }), p(n, "_bottomRightGridRef", function(u) {
1715
- n._bottomRightGrid = u;
1716
- }), p(n, "_cellRendererBottomLeftGrid", function(u) {
1717
- var d = u.rowIndex, f = ne(u, No), h = n.props, g = h.cellRenderer, v = h.fixedRowCount;
1718
- return d === h.rowCount - v ? x.createElement("div", { key: f.key, style: M(M({}, f.style), {}, { height: 20 }) }) : g(M(M({}, f), {}, { parent: n, rowIndex: d + v }));
1719
- }), p(n, "_cellRendererBottomRightGrid", function(u) {
1720
- var d = u.columnIndex, f = u.rowIndex, h = ne(u, Bo), g = n.props, v = g.cellRenderer, _ = g.fixedColumnCount, S = g.fixedRowCount;
1721
- return v(M(M({}, h), {}, { columnIndex: d + _, parent: n, rowIndex: f + S }));
1722
- }), p(n, "_cellRendererTopRightGrid", function(u) {
1723
- var d = u.columnIndex, f = ne(u, Uo), h = n.props, g = h.cellRenderer, v = h.columnCount, _ = h.fixedColumnCount;
1724
- return d === v - _ ? x.createElement("div", { key: f.key, style: M(M({}, f.style), {}, { width: 20 }) }) : g(M(M({}, f), {}, { columnIndex: d + _, parent: n }));
1725
- }), p(n, "_columnWidthRightGrid", function(u) {
1726
- var d = u.index, f = n.props, h = f.columnCount, g = f.fixedColumnCount, v = f.columnWidth, _ = n.state, S = _.scrollbarSize;
1727
- return _.showHorizontalScrollbar && d === h - g ? S : typeof v == "function" ? v({ index: d + g }) : v;
1728
- }), p(n, "_onScroll", function(u) {
1729
- var d = u.scrollLeft, f = u.scrollTop;
1730
- n.setState({ scrollLeft: d, scrollTop: f });
1731
- var h = n.props.onScroll;
1732
- h && h(u);
1733
- }), p(n, "_onScrollbarPresenceChange", function(u) {
1734
- var d = u.horizontal, f = u.size, h = u.vertical, g = n.state, v = g.showHorizontalScrollbar, _ = g.showVerticalScrollbar;
1735
- if (d !== v || h !== _) {
1736
- n.setState({ scrollbarSize: f, showHorizontalScrollbar: d, showVerticalScrollbar: h });
1737
- var S = n.props.onScrollbarPresenceChange;
1738
- typeof S == "function" && S({ horizontal: d, size: f, vertical: h });
1739
- }
1740
- }), p(n, "_onScrollLeft", function(u) {
1741
- var d = u.scrollLeft;
1742
- n._onScroll({ scrollLeft: d, scrollTop: n.state.scrollTop });
1743
- }), p(n, "_onScrollTop", function(u) {
1744
- var d = u.scrollTop;
1745
- n._onScroll({ scrollTop: d, scrollLeft: n.state.scrollLeft });
1746
- }), p(n, "_rowHeightBottomGrid", function(u) {
1747
- var d = u.index, f = n.props, h = f.fixedRowCount, g = f.rowCount, v = f.rowHeight, _ = n.state, S = _.scrollbarSize;
1748
- return _.showVerticalScrollbar && d === g - h ? S : typeof v == "function" ? v({ index: d + h }) : v;
1749
- }), p(n, "_topLeftGridRef", function(u) {
1750
- n._topLeftGrid = u;
1751
- }), p(n, "_topRightGridRef", function(u) {
1752
- n._topRightGrid = u;
1753
- });
1754
- var a = e.deferredMeasurementCache, s = e.fixedColumnCount, c = e.fixedRowCount;
1755
- return n._maybeCalculateCachedStyles(!0), a && (n._deferredMeasurementCacheBottomLeftGrid = c > 0 ? new xe({ cellMeasurerCache: a, columnIndexOffset: 0, rowIndexOffset: c }) : a, n._deferredMeasurementCacheBottomRightGrid = s > 0 || c > 0 ? new xe({ cellMeasurerCache: a, columnIndexOffset: s, rowIndexOffset: c }) : a, n._deferredMeasurementCacheTopRightGrid = s > 0 ? new xe({ cellMeasurerCache: a, columnIndexOffset: s, rowIndexOffset: 0 }) : a), n;
1756
- }
1757
- return D(o, x.PureComponent), A(o, [{ key: "forceUpdateGrids", value: function() {
1758
- this._bottomLeftGrid && this._bottomLeftGrid.forceUpdate(), this._bottomRightGrid && this._bottomRightGrid.forceUpdate(), this._topLeftGrid && this._topLeftGrid.forceUpdate(), this._topRightGrid && this._topRightGrid.forceUpdate();
1759
- } }, { key: "invalidateCellSizeAfterRender", value: function() {
1760
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r;
1761
- this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex == "number" ? Math.min(this._deferredInvalidateColumnIndex, n) : n, this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex == "number" ? Math.min(this._deferredInvalidateRowIndex, l) : l;
1762
- } }, { key: "measureAllCells", value: function() {
1763
- this._bottomLeftGrid && this._bottomLeftGrid.measureAllCells(), this._bottomRightGrid && this._bottomRightGrid.measureAllCells(), this._topLeftGrid && this._topLeftGrid.measureAllCells(), this._topRightGrid && this._topRightGrid.measureAllCells();
1764
- } }, { key: "recomputeGridSize", value: function() {
1765
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r, i = this.props, a = i.fixedColumnCount, s = i.fixedRowCount, c = Math.max(0, n - a), u = Math.max(0, l - s);
1766
- this._bottomLeftGrid && this._bottomLeftGrid.recomputeGridSize({ columnIndex: n, rowIndex: u }), this._bottomRightGrid && this._bottomRightGrid.recomputeGridSize({ columnIndex: c, rowIndex: u }), this._topLeftGrid && this._topLeftGrid.recomputeGridSize({ columnIndex: n, rowIndex: l }), this._topRightGrid && this._topRightGrid.recomputeGridSize({ columnIndex: c, rowIndex: l }), this._leftGridWidth = null, this._topGridHeight = null, this._maybeCalculateCachedStyles(!0);
1767
- } }, { key: "componentDidMount", value: function() {
1768
- var e = this.props, t = e.scrollLeft, n = e.scrollTop;
1769
- if (t > 0 || n > 0) {
1770
- var r = {};
1771
- t > 0 && (r.scrollLeft = t), n > 0 && (r.scrollTop = n), this.setState(r);
1772
- }
1773
- this._handleInvalidatedGridSize();
1774
- } }, { key: "componentDidUpdate", value: function() {
1775
- this._handleInvalidatedGridSize();
1776
- } }, { key: "render", value: function() {
1777
- var e = this.props, t = e.onScroll, n = e.onSectionRendered;
1778
- e.onScrollbarPresenceChange, e.scrollLeft;
1779
- var r = e.scrollToColumn;
1780
- e.scrollTop;
1781
- var l = e.scrollToRow, i = ne(e, Vo);
1782
- if (this._prepareForRender(), this.props.width === 0 || this.props.height === 0) return null;
1783
- var a = this.state, s = a.scrollLeft, c = a.scrollTop;
1784
- return x.createElement("div", { style: this._containerOuterStyle }, x.createElement("div", { style: this._containerTopStyle }, this._renderTopLeftGrid(i), this._renderTopRightGrid(M(M({}, i), {}, { onScroll: t, scrollLeft: s }))), x.createElement("div", { style: this._containerBottomStyle }, this._renderBottomLeftGrid(M(M({}, i), {}, { onScroll: t, scrollTop: c })), this._renderBottomRightGrid(M(M({}, i), {}, { onScroll: t, onSectionRendered: n, scrollLeft: s, scrollToColumn: r, scrollToRow: l, scrollTop: c }))));
1785
- } }, { key: "_getBottomGridHeight", value: function(e) {
1786
- return e.height - this._getTopGridHeight(e);
1787
- } }, { key: "_getLeftGridWidth", value: function(e) {
1788
- var t = e.fixedColumnCount, n = e.columnWidth;
1789
- if (this._leftGridWidth == null) if (typeof n == "function") {
1790
- for (var r = 0, l = 0; l < t; l++) r += n({ index: l });
1791
- this._leftGridWidth = r;
1792
- } else this._leftGridWidth = n * t;
1793
- return this._leftGridWidth;
1794
- } }, { key: "_getRightGridWidth", value: function(e) {
1795
- return e.width - this._getLeftGridWidth(e);
1796
- } }, { key: "_getTopGridHeight", value: function(e) {
1797
- var t = e.fixedRowCount, n = e.rowHeight;
1798
- if (this._topGridHeight == null) if (typeof n == "function") {
1799
- for (var r = 0, l = 0; l < t; l++) r += n({ index: l });
1800
- this._topGridHeight = r;
1801
- } else this._topGridHeight = n * t;
1802
- return this._topGridHeight;
1803
- } }, { key: "_handleInvalidatedGridSize", value: function() {
1804
- if (typeof this._deferredInvalidateColumnIndex == "number") {
1805
- var e = this._deferredInvalidateColumnIndex, t = this._deferredInvalidateRowIndex;
1806
- this._deferredInvalidateColumnIndex = null, this._deferredInvalidateRowIndex = null, this.recomputeGridSize({ columnIndex: e, rowIndex: t }), this.forceUpdate();
1807
- }
1808
- } }, { key: "_maybeCalculateCachedStyles", value: function(e) {
1809
- var t = this.props, n = t.columnWidth, r = t.enableFixedColumnScroll, l = t.enableFixedRowScroll, i = t.height, a = t.fixedColumnCount, s = t.fixedRowCount, c = t.rowHeight, u = t.style, d = t.styleBottomLeftGrid, f = t.styleBottomRightGrid, h = t.styleTopLeftGrid, g = t.styleTopRightGrid, v = t.width, _ = e || i !== this._lastRenderedHeight || v !== this._lastRenderedWidth, S = e || n !== this._lastRenderedColumnWidth || a !== this._lastRenderedFixedColumnCount, m = e || s !== this._lastRenderedFixedRowCount || c !== this._lastRenderedRowHeight;
1810
- (e || _ || u !== this._lastRenderedStyle) && (this._containerOuterStyle = M({ height: i, overflow: "visible", width: v }, u)), (e || _ || m) && (this._containerTopStyle = { height: this._getTopGridHeight(this.props), position: "relative", width: v }, this._containerBottomStyle = { height: i - this._getTopGridHeight(this.props), overflow: "visible", position: "relative", width: v }), (e || d !== this._lastRenderedStyleBottomLeftGrid) && (this._bottomLeftGridStyle = M({ left: 0, overflowX: "hidden", overflowY: r ? "auto" : "hidden", position: "absolute" }, d)), (e || S || f !== this._lastRenderedStyleBottomRightGrid) && (this._bottomRightGridStyle = M({ left: this._getLeftGridWidth(this.props), position: "absolute" }, f)), (e || h !== this._lastRenderedStyleTopLeftGrid) && (this._topLeftGridStyle = M({ left: 0, overflowX: "hidden", overflowY: "hidden", position: "absolute", top: 0 }, h)), (e || S || g !== this._lastRenderedStyleTopRightGrid) && (this._topRightGridStyle = M({ left: this._getLeftGridWidth(this.props), overflowX: l ? "auto" : "hidden", overflowY: "hidden", position: "absolute", top: 0 }, g)), this._lastRenderedColumnWidth = n, this._lastRenderedFixedColumnCount = a, this._lastRenderedFixedRowCount = s, this._lastRenderedHeight = i, this._lastRenderedRowHeight = c, this._lastRenderedStyle = u, this._lastRenderedStyleBottomLeftGrid = d, this._lastRenderedStyleBottomRightGrid = f, this._lastRenderedStyleTopLeftGrid = h, this._lastRenderedStyleTopRightGrid = g, this._lastRenderedWidth = v;
1811
- } }, { key: "_prepareForRender", value: function() {
1812
- this._lastRenderedColumnWidth === this.props.columnWidth && this._lastRenderedFixedColumnCount === this.props.fixedColumnCount || (this._leftGridWidth = null), this._lastRenderedFixedRowCount === this.props.fixedRowCount && this._lastRenderedRowHeight === this.props.rowHeight || (this._topGridHeight = null), this._maybeCalculateCachedStyles(), this._lastRenderedColumnWidth = this.props.columnWidth, this._lastRenderedFixedColumnCount = this.props.fixedColumnCount, this._lastRenderedFixedRowCount = this.props.fixedRowCount, this._lastRenderedRowHeight = this.props.rowHeight;
1813
- } }, { key: "_renderBottomLeftGrid", value: function(e) {
1814
- var t = e.enableFixedColumnScroll, n = e.fixedColumnCount, r = e.fixedRowCount, l = e.rowCount, i = e.hideBottomLeftGridScrollbar, a = this.state.showVerticalScrollbar;
1815
- if (!n) return null;
1816
- var s = a ? 1 : 0, c = this._getBottomGridHeight(e), u = this._getLeftGridWidth(e), d = this.state.showVerticalScrollbar ? this.state.scrollbarSize : 0, f = i ? u + d : u, h = x.createElement(V, U({}, e, { cellRenderer: this._cellRendererBottomLeftGrid, className: this.props.classNameBottomLeftGrid, columnCount: n, deferredMeasurementCache: this._deferredMeasurementCacheBottomLeftGrid, height: c, onScroll: t ? this._onScrollTop : void 0, ref: this._bottomLeftGridRef, rowCount: Math.max(0, l - r) + s, rowHeight: this._rowHeightBottomGrid, style: this._bottomLeftGridStyle, tabIndex: null, width: f }));
1817
- return i ? x.createElement("div", { className: "BottomLeftGrid_ScrollWrapper", style: M(M({}, this._bottomLeftGridStyle), {}, { height: c, width: u, overflowY: "hidden" }) }, h) : h;
1818
- } }, { key: "_renderBottomRightGrid", value: function(e) {
1819
- var t = e.columnCount, n = e.fixedColumnCount, r = e.fixedRowCount, l = e.rowCount, i = e.scrollToColumn, a = e.scrollToRow;
1820
- return x.createElement(V, U({}, e, { cellRenderer: this._cellRendererBottomRightGrid, className: this.props.classNameBottomRightGrid, columnCount: Math.max(0, t - n), columnWidth: this._columnWidthRightGrid, deferredMeasurementCache: this._deferredMeasurementCacheBottomRightGrid, height: this._getBottomGridHeight(e), onScroll: this._onScroll, onScrollbarPresenceChange: this._onScrollbarPresenceChange, ref: this._bottomRightGridRef, rowCount: Math.max(0, l - r), rowHeight: this._rowHeightBottomGrid, scrollToColumn: i - n, scrollToRow: a - r, style: this._bottomRightGridStyle, width: this._getRightGridWidth(e) }));
1821
- } }, { key: "_renderTopLeftGrid", value: function(e) {
1822
- var t = e.fixedColumnCount, n = e.fixedRowCount;
1823
- return t && n ? x.createElement(V, U({}, e, { className: this.props.classNameTopLeftGrid, columnCount: t, height: this._getTopGridHeight(e), ref: this._topLeftGridRef, rowCount: n, style: this._topLeftGridStyle, tabIndex: null, width: this._getLeftGridWidth(e) })) : null;
1824
- } }, { key: "_renderTopRightGrid", value: function(e) {
1825
- var t = e.columnCount, n = e.enableFixedRowScroll, r = e.fixedColumnCount, l = e.fixedRowCount, i = e.scrollLeft, a = e.hideTopRightGridScrollbar, s = this.state, c = s.showHorizontalScrollbar, u = s.scrollbarSize;
1826
- if (!l) return null;
1827
- var d = c ? 1 : 0, f = this._getTopGridHeight(e), h = this._getRightGridWidth(e), g = c ? u : 0, v = f, _ = this._topRightGridStyle;
1828
- a && (v = f + g, _ = M(M({}, this._topRightGridStyle), {}, { left: 0 }));
1829
- var S = x.createElement(V, U({}, e, { cellRenderer: this._cellRendererTopRightGrid, className: this.props.classNameTopRightGrid, columnCount: Math.max(0, t - r) + d, columnWidth: this._columnWidthRightGrid, deferredMeasurementCache: this._deferredMeasurementCacheTopRightGrid, height: v, onScroll: n ? this._onScrollLeft : void 0, ref: this._topRightGridRef, rowCount: l, scrollLeft: i, style: _, tabIndex: null, width: h }));
1830
- return a ? x.createElement("div", { className: "TopRightGrid_ScrollWrapper", style: M(M({}, this._topRightGridStyle), {}, { height: f, width: h, overflowX: "hidden" }) }, S) : S;
1831
- } }], [{ key: "getDerivedStateFromProps", value: function(e, t) {
1832
- return e.scrollLeft !== t.scrollLeft || e.scrollTop !== t.scrollTop ? { scrollLeft: e.scrollLeft != null && e.scrollLeft >= 0 ? e.scrollLeft : t.scrollLeft, scrollTop: e.scrollTop != null && e.scrollTop >= 0 ? e.scrollTop : t.scrollTop } : null;
1833
- } }]);
1834
- }();
1835
- function Bt() {
1836
- try {
1837
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1838
- }));
1839
- } catch {
1840
- }
1841
- return (Bt = function() {
1842
- return !!o;
1843
- })();
1844
- }
1845
- p(Re, "defaultProps", { classNameBottomLeftGrid: "", classNameBottomRightGrid: "", classNameTopLeftGrid: "", classNameTopRightGrid: "", enableFixedColumnScroll: !1, enableFixedRowScroll: !1, fixedColumnCount: 0, fixedRowCount: 0, scrollToColumn: -1, scrollToRow: -1, style: {}, styleBottomLeftGrid: {}, styleBottomRightGrid: {}, styleTopLeftGrid: {}, styleTopRightGrid: {}, hideTopRightGridScrollbar: !1, hideBottomLeftGridScrollbar: !1 }), Re.propTypes = {}, ce(Re), function() {
1846
- function o(e, t) {
1847
- var n, r, l, i;
1848
- return G(this, o), r = this, i = [e, t], l = P(l = o), (n = H(r, Bt() ? Reflect.construct(l, i || [], P(r).constructor) : l.apply(r, i))).state = { clientHeight: 0, clientWidth: 0, scrollHeight: 0, scrollLeft: 0, scrollTop: 0, scrollWidth: 0 }, n._onScroll = n._onScroll.bind(n), n;
1849
- }
1850
- return D(o, x.PureComponent), A(o, [{ key: "render", value: function() {
1851
- var e = this.props.children, t = this.state, n = t.clientHeight, r = t.clientWidth, l = t.scrollHeight, i = t.scrollLeft, a = t.scrollTop, s = t.scrollWidth;
1852
- return e({ clientHeight: n, clientWidth: r, onScroll: this._onScroll, scrollHeight: l, scrollLeft: i, scrollTop: a, scrollWidth: s });
1853
- } }, { key: "_onScroll", value: function(e) {
1854
- var t = e.clientHeight, n = e.clientWidth, r = e.scrollHeight, l = e.scrollLeft, i = e.scrollTop, a = e.scrollWidth;
1855
- this.setState({ clientHeight: t, clientWidth: n, scrollHeight: r, scrollLeft: l, scrollTop: i, scrollWidth: a });
1856
- } }]);
1857
- }().propTypes = {};
1858
- var ae = "ASC", Pe = "DESC";
1859
- function Ut(o) {
1860
- var e = o.sortDirection, t = N("ReactVirtualized__Table__sortableHeaderIcon", { "ReactVirtualized__Table__sortableHeaderIcon--ASC": e === ae, "ReactVirtualized__Table__sortableHeaderIcon--DESC": e === Pe });
1861
- return x.createElement("svg", { className: t, width: 18, height: 18, viewBox: "0 0 24 24" }, e === ae ? x.createElement("path", { d: "M7 14l5-5 5 5z" }) : x.createElement("path", { d: "M7 10l5 5 5-5z" }), x.createElement("path", { d: "M0 0h24v24H0z", fill: "none" }));
1862
- }
1863
- function Vt() {
1864
- try {
1865
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1866
- }));
1867
- } catch {
1868
- }
1869
- return (Vt = function() {
1870
- return !!o;
1871
- })();
1872
- }
1873
- Ut.propTypes = {};
1874
- var _e = function() {
1875
- function o() {
1876
- return G(this, o), e = this, n = arguments, t = P(t = o), H(e, Vt() ? Reflect.construct(t, n || [], P(e).constructor) : t.apply(e, n));
1877
- var e, t, n;
1878
- }
1879
- return D(o, x.Component), A(o);
1880
- }();
1881
- function ht(o, e) {
1882
- var t = Object.keys(o);
1883
- if (Object.getOwnPropertySymbols) {
1884
- var n = Object.getOwnPropertySymbols(o);
1885
- e && (n = n.filter(function(r) {
1886
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
1887
- })), t.push.apply(t, n);
1888
- }
1889
- return t;
1890
- }
1891
- function B(o) {
1892
- for (var e = 1; e < arguments.length; e++) {
1893
- var t = arguments[e] != null ? arguments[e] : {};
1894
- e % 2 ? ht(Object(t), !0).forEach(function(n) {
1895
- p(o, n, t[n]);
1896
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : ht(Object(t)).forEach(function(n) {
1897
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
1898
- });
1899
- }
1900
- return o;
1901
- }
1902
- function qt() {
1903
- try {
1904
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1905
- }));
1906
- } catch {
1907
- }
1908
- return (qt = function() {
1909
- return !!o;
1910
- })();
1911
- }
1912
- p(_e, "defaultProps", { cellDataGetter: function(o) {
1913
- var e = o.dataKey, t = o.rowData;
1914
- return typeof t.get == "function" ? t.get(e) : t[e];
1915
- }, cellRenderer: function(o) {
1916
- var e = o.cellData;
1917
- return e == null ? "" : String(e);
1918
- }, defaultSortDirection: ae, flexGrow: 0, flexShrink: 1, headerRenderer: function(o) {
1919
- var e = o.dataKey, t = o.label, n = o.sortBy, r = o.sortDirection, l = n === e, i = [x.createElement("span", { className: "ReactVirtualized__Table__headerTruncatedText", key: "label", title: typeof t == "string" ? t : null }, t)];
1920
- return l && i.push(x.createElement(Ut, { key: "SortIndicator", sortDirection: r })), i;
1921
- }, style: {} }), _e.propTypes = {};
1922
- var Oe = function() {
1923
- function o(e) {
1924
- var t, n, r, l;
1925
- return G(this, o), n = this, l = [e], r = P(r = o), (t = H(n, qt() ? Reflect.construct(r, l || [], P(n).constructor) : r.apply(n, l))).state = { scrollbarWidth: 0 }, t._createColumn = t._createColumn.bind(t), t._createRow = t._createRow.bind(t), t._onScroll = t._onScroll.bind(t), t._onSectionRendered = t._onSectionRendered.bind(t), t._setRef = t._setRef.bind(t), t._setGridElementRef = t._setGridElementRef.bind(t), t;
1926
- }
1927
- return D(o, x.PureComponent), A(o, [{ key: "forceUpdateGrid", value: function() {
1928
- this.Grid && this.Grid.forceUpdate();
1929
- } }, { key: "getOffsetForRow", value: function(e) {
1930
- var t = e.alignment, n = e.index;
1931
- return this.Grid ? this.Grid.getOffsetForCell({ alignment: t, rowIndex: n }).scrollTop : 0;
1932
- } }, { key: "invalidateCellSizeAfterRender", value: function(e) {
1933
- var t = e.columnIndex, n = e.rowIndex;
1934
- this.Grid && this.Grid.invalidateCellSizeAfterRender({ rowIndex: n, columnIndex: t });
1935
- } }, { key: "measureAllRows", value: function() {
1936
- this.Grid && this.Grid.measureAllCells();
1937
- } }, { key: "recomputeGridSize", value: function() {
1938
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.columnIndex, n = t === void 0 ? 0 : t, r = e.rowIndex, l = r === void 0 ? 0 : r;
1939
- this.Grid && this.Grid.recomputeGridSize({ rowIndex: l, columnIndex: n });
1940
- } }, { key: "recomputeRowHeights", value: function() {
1941
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1942
- this.Grid && this.Grid.recomputeGridSize({ rowIndex: e });
1943
- } }, { key: "scrollToPosition", value: function() {
1944
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1945
- this.Grid && this.Grid.scrollToPosition({ scrollTop: e });
1946
- } }, { key: "scrollToRow", value: function() {
1947
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
1948
- this.Grid && this.Grid.scrollToCell({ columnIndex: 0, rowIndex: e });
1949
- } }, { key: "getScrollbarWidth", value: function() {
1950
- if (this.GridElement) {
1951
- var e = this.GridElement, t = e.clientWidth || 0;
1952
- return (e.offsetWidth || 0) - t;
1953
- }
1954
- return 0;
1955
- } }, { key: "componentDidMount", value: function() {
1956
- this._setScrollbarWidth();
1957
- } }, { key: "componentDidUpdate", value: function() {
1958
- this._setScrollbarWidth();
1959
- } }, { key: "render", value: function() {
1960
- var e = this, t = this.props, n = t.children, r = t.className, l = t.disableHeader, i = t.gridClassName, a = t.gridStyle, s = t.headerHeight, c = t.headerRowRenderer, u = t.height, d = t.id, f = t.noRowsRenderer, h = t.rowClassName, g = t.rowStyle, v = t.scrollToIndex, _ = t.style, S = t.width, m = this.state.scrollbarWidth, y = l ? u : u - s, w = typeof h == "function" ? h({ index: -1 }) : h, C = typeof g == "function" ? g({ index: -1 }) : g;
1961
- return this._cachedColumnStyles = [], x.Children.toArray(n).forEach(function(R, T) {
1962
- var b = e._getFlexStyleForColumn(R, R.props.style || _e.defaultProps.style);
1963
- e._cachedColumnStyles[T] = B({ overflow: "hidden" }, b);
1964
- }), x.createElement("div", { "aria-label": this.props["aria-label"], "aria-labelledby": this.props["aria-labelledby"], "aria-colcount": x.Children.toArray(n).length, "aria-rowcount": this.props.rowCount, className: N("ReactVirtualized__Table", r), id: d, role: "grid", style: _ }, !l && c({ className: N("ReactVirtualized__Table__headerRow", w), columns: this._getHeaderColumns(), style: B({ height: s, overflow: "hidden", paddingRight: m, width: S }, C) }), x.createElement(V, U({}, this.props, { elementRef: this._setGridElementRef, "aria-readonly": null, autoContainerWidth: !0, className: N("ReactVirtualized__Table__Grid", i), cellRenderer: this._createRow, columnWidth: S, columnCount: 1, height: y, id: void 0, noContentRenderer: f, onScroll: this._onScroll, onSectionRendered: this._onSectionRendered, ref: this._setRef, role: "rowgroup", scrollbarWidth: m, scrollToRow: v, style: B(B({}, a), {}, { overflowX: "hidden" }) })));
1965
- } }, { key: "_createColumn", value: function(e) {
1966
- var t = e.column, n = e.columnIndex, r = e.isScrolling, l = e.parent, i = e.rowData, a = e.rowIndex, s = this.props.onColumnClick, c = t.props, u = c.cellDataGetter, d = c.cellRenderer, f = c.className, h = c.columnData, g = c.dataKey, v = c.id, _ = d({ cellData: u({ columnData: h, dataKey: g, rowData: i }), columnData: h, columnIndex: n, dataKey: g, isScrolling: r, parent: l, rowData: i, rowIndex: a }), S = this._cachedColumnStyles[n], m = typeof _ == "string" ? _ : null;
1967
- return x.createElement("div", { "aria-colindex": n + 1, "aria-describedby": v, className: N("ReactVirtualized__Table__rowColumn", f), key: "Row" + a + "-Col" + n, onClick: function(y) {
1968
- s && s({ columnData: h, dataKey: g, event: y });
1969
- }, role: "gridcell", style: S, title: m }, _);
1970
- } }, { key: "_createHeader", value: function(e) {
1971
- var t, n, r, l, i, a = e.column, s = e.index, c = this.props, u = c.headerClassName, d = c.headerStyle, f = c.onHeaderClick, h = c.sort, g = c.sortBy, v = c.sortDirection, _ = a.props, S = _.columnData, m = _.dataKey, y = _.defaultSortDirection, w = _.disableSort, C = _.headerRenderer, R = _.id, T = _.label, b = !w && h, I = N("ReactVirtualized__Table__headerColumn", u, a.props.headerClassName, { ReactVirtualized__Table__sortableHeaderColumn: b }), O = this._getFlexStyleForColumn(a, B(B({}, d), a.props.headerStyle)), z = C({ columnData: S, dataKey: m, disableSort: w, label: T, sortBy: g, sortDirection: v });
1972
- if (b || f) {
1973
- var L = g !== m ? y : v === Pe ? ae : Pe, k = function(E) {
1974
- b && h({ defaultSortDirection: y, event: E, sortBy: m, sortDirection: L }), f && f({ columnData: S, dataKey: m, event: E });
1975
- };
1976
- i = a.props["aria-label"] || T || m, l = "none", r = 0, t = k, n = function(E) {
1977
- E.key !== "Enter" && E.key !== " " || k(E);
1978
- };
1979
- }
1980
- return g === m && (l = v === ae ? "ascending" : "descending"), x.createElement("div", { "aria-label": i, "aria-sort": l, className: I, id: R, key: "Header-Col" + s, onClick: t, onKeyDown: n, role: "columnheader", style: O, tabIndex: r }, z);
1981
- } }, { key: "_createRow", value: function(e) {
1982
- var t = this, n = e.rowIndex, r = e.isScrolling, l = e.key, i = e.parent, a = e.style, s = this.props, c = s.children, u = s.onRowClick, d = s.onRowDoubleClick, f = s.onRowRightClick, h = s.onRowMouseOver, g = s.onRowMouseOut, v = s.rowClassName, _ = s.rowGetter, S = s.rowRenderer, m = s.rowStyle, y = this.state.scrollbarWidth, w = typeof v == "function" ? v({ index: n }) : v, C = typeof m == "function" ? m({ index: n }) : m, R = _({ index: n }), T = x.Children.toArray(c).map(function(O, z) {
1983
- return t._createColumn({ column: O, columnIndex: z, isScrolling: r, parent: i, rowData: R, rowIndex: n, scrollbarWidth: y });
1984
- }), b = N("ReactVirtualized__Table__row", w), I = B(B({}, a), {}, { height: this._getRowHeight(n), overflow: "hidden", paddingRight: y }, C);
1985
- return S({ className: b, columns: T, index: n, isScrolling: r, key: l, onRowClick: u, onRowDoubleClick: d, onRowRightClick: f, onRowMouseOver: h, onRowMouseOut: g, rowData: R, style: I });
1986
- } }, { key: "_getFlexStyleForColumn", value: function(e) {
1987
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = "".concat(e.props.flexGrow, " ").concat(e.props.flexShrink, " ").concat(e.props.width, "px"), r = B(B({}, t), {}, { flex: n, msFlex: n, WebkitFlex: n });
1988
- return e.props.maxWidth && (r.maxWidth = e.props.maxWidth), e.props.minWidth && (r.minWidth = e.props.minWidth), r;
1989
- } }, { key: "_getHeaderColumns", value: function() {
1990
- var e = this, t = this.props, n = t.children;
1991
- return (t.disableHeader ? [] : x.Children.toArray(n)).map(function(r, l) {
1992
- return e._createHeader({ column: r, index: l });
1993
- });
1994
- } }, { key: "_getRowHeight", value: function(e) {
1995
- var t = this.props.rowHeight;
1996
- return typeof t == "function" ? t({ index: e }) : t;
1997
- } }, { key: "_onScroll", value: function(e) {
1998
- var t = e.clientHeight, n = e.scrollHeight, r = e.scrollTop;
1999
- (0, this.props.onScroll)({ clientHeight: t, scrollHeight: n, scrollTop: r });
2000
- } }, { key: "_onSectionRendered", value: function(e) {
2001
- var t = e.rowOverscanStartIndex, n = e.rowOverscanStopIndex, r = e.rowStartIndex, l = e.rowStopIndex;
2002
- (0, this.props.onRowsRendered)({ overscanStartIndex: t, overscanStopIndex: n, startIndex: r, stopIndex: l });
2003
- } }, { key: "_setRef", value: function(e) {
2004
- this.Grid = e;
2005
- } }, { key: "_setGridElementRef", value: function(e) {
2006
- this.GridElement = e;
2007
- } }, { key: "_setScrollbarWidth", value: function() {
2008
- var e = this.getScrollbarWidth();
2009
- this.setState({ scrollbarWidth: e });
2010
- } }]);
2011
- }();
2012
- p(Oe, "defaultProps", { disableHeader: !1, estimatedRowSize: 30, headerHeight: 0, headerStyle: {}, noRowsRenderer: function() {
2013
- return null;
2014
- }, onRowsRendered: function() {
2015
- return null;
2016
- }, onScroll: function() {
2017
- return null;
2018
- }, overscanIndicesGetter: At, overscanRowCount: 10, rowRenderer: function(o) {
2019
- var e = o.className, t = o.columns, n = o.index, r = o.key, l = o.onRowClick, i = o.onRowDoubleClick, a = o.onRowMouseOut, s = o.onRowMouseOver, c = o.onRowRightClick, u = o.rowData, d = o.style, f = { "aria-rowindex": n + 1 };
2020
- return (l || i || a || s || c) && (f["aria-label"] = "row", f.tabIndex = 0, l && (f.onClick = function(h) {
2021
- return l({ event: h, index: n, rowData: u });
2022
- }), i && (f.onDoubleClick = function(h) {
2023
- return i({ event: h, index: n, rowData: u });
2024
- }), a && (f.onMouseOut = function(h) {
2025
- return a({ event: h, index: n, rowData: u });
2026
- }), s && (f.onMouseOver = function(h) {
2027
- return s({ event: h, index: n, rowData: u });
2028
- }), c && (f.onContextMenu = function(h) {
2029
- return c({ event: h, index: n, rowData: u });
2030
- })), x.createElement("div", U({}, f, { className: e, key: r, role: "row", style: d }), t);
2031
- }, headerRowRenderer: function(o) {
2032
- var e = o.className, t = o.columns, n = o.style;
2033
- return x.createElement("div", { className: e, role: "row", style: n }, t);
2034
- }, rowStyle: {}, scrollToAlignment: "auto", scrollToIndex: -1, style: {} }), Oe.propTypes = {};
2035
- var Y = [], le = null, X = null;
2036
- function Kt() {
2037
- X && (X = null, document.body && le != null && (document.body.style.pointerEvents = le), le = null);
2038
- }
2039
- function qo() {
2040
- Kt(), Y.forEach(function(o) {
2041
- return o.__resetIsScrolling();
2042
- });
2043
- }
2044
- function $t(o) {
2045
- o.currentTarget === window && le == null && document.body && (le = document.body.style.pointerEvents, document.body.style.pointerEvents = "none"), function() {
2046
- X && ee(X);
2047
- var e = 0;
2048
- Y.forEach(function(t) {
2049
- e = Math.max(e, t.props.scrollingResetTimeInterval);
2050
- }), X = Le(qo, e);
2051
- }(), Y.forEach(function(e) {
2052
- e.props.scrollElement === o.currentTarget && e.__handleWindowScrollEvent();
2053
- });
2054
- }
2055
- function ft(o, e) {
2056
- Y.some(function(t) {
2057
- return t.props.scrollElement === e;
2058
- }) || e.addEventListener("scroll", $t), Y.push(o);
2059
- }
2060
- function pt(o, e) {
2061
- (Y = Y.filter(function(t) {
2062
- return t !== o;
2063
- })).length || (e.removeEventListener("scroll", $t), X && (ee(X), Kt()));
2064
- }
2065
- var Ae = function(o) {
2066
- return o === window;
2067
- }, re = function(o) {
2068
- return o.getBoundingClientRect();
2069
- };
2070
- function mt(o, e) {
2071
- if (o) {
2072
- if (Ae(o)) {
2073
- var t = window, n = t.innerHeight, r = t.innerWidth;
2074
- return { height: typeof n == "number" ? n : 0, width: typeof r == "number" ? r : 0 };
2075
- }
2076
- return re(o);
2077
- }
2078
- return { height: e.serverHeight, width: e.serverWidth };
2079
- }
2080
- function gt(o) {
2081
- return Ae(o) && document.documentElement ? { top: "scrollY" in window ? window.scrollY : document.documentElement.scrollTop, left: "scrollX" in window ? window.scrollX : document.documentElement.scrollLeft } : { top: o.scrollTop, left: o.scrollLeft };
2082
- }
2083
- function vt(o, e) {
2084
- var t = Object.keys(o);
2085
- if (Object.getOwnPropertySymbols) {
2086
- var n = Object.getOwnPropertySymbols(o);
2087
- e && (n = n.filter(function(r) {
2088
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
2089
- })), t.push.apply(t, n);
2090
- }
2091
- return t;
2092
- }
2093
- function _t(o) {
2094
- for (var e = 1; e < arguments.length; e++) {
2095
- var t = arguments[e] != null ? arguments[e] : {};
2096
- e % 2 ? vt(Object(t), !0).forEach(function(n) {
2097
- p(o, n, t[n]);
2098
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : vt(Object(t)).forEach(function(n) {
2099
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
2100
- });
2101
- }
2102
- return o;
2103
- }
2104
- function Xt() {
2105
- try {
2106
- var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
2107
- }));
2108
- } catch {
2109
- }
2110
- return (Xt = function() {
2111
- return !!o;
2112
- })();
2113
- }
2114
- var Yt = function() {
2115
- return typeof window < "u" ? window : void 0;
2116
- }, Ko = function() {
2117
- function o() {
2118
- var e, t, n, r;
2119
- G(this, o);
2120
- for (var l = arguments.length, i = new Array(l), a = 0; a < l; a++) i[a] = arguments[a];
2121
- return t = this, n = o, r = [].concat(i), n = P(n), p(e = H(t, Xt() ? Reflect.construct(n, r || [], P(t).constructor) : n.apply(t, r)), "_window", Yt()), p(e, "_isMounted", !1), p(e, "_positionFromTop", 0), p(e, "_positionFromLeft", 0), p(e, "_detectElementResize", void 0), p(e, "_child", void 0), p(e, "_windowScrollerRef", x.createRef()), p(e, "state", _t(_t({}, mt(e.props.scrollElement, e.props)), {}, { isScrolling: !1, scrollLeft: 0, scrollTop: 0 })), p(e, "_registerChild", function(s) {
2122
- !s || s instanceof Element || console.warn("WindowScroller registerChild expects to be passed Element or null"), e._child = s, e.updatePosition();
2123
- }), p(e, "_onChildScroll", function(s) {
2124
- var c = s.scrollTop;
2125
- if (e.state.scrollTop !== c) {
2126
- var u = e.props.scrollElement;
2127
- u && (typeof u.scrollTo == "function" ? u.scrollTo(0, c + e._positionFromTop) : u.scrollTop = c + e._positionFromTop);
2128
- }
2129
- }), p(e, "_registerResizeListener", function(s) {
2130
- s === window ? window.addEventListener("resize", e._onResize, !1) : e._detectElementResize.addResizeListener(s, e._onResize);
2131
- }), p(e, "_unregisterResizeListener", function(s) {
2132
- s === window ? window.removeEventListener("resize", e._onResize, !1) : s && e._detectElementResize.removeResizeListener(s, e._onResize);
2133
- }), p(e, "_onResize", function() {
2134
- e.updatePosition();
2135
- }), p(e, "__handleWindowScrollEvent", function() {
2136
- if (e._isMounted) {
2137
- var s = e.props.onScroll, c = e.props.scrollElement;
2138
- if (c) {
2139
- var u = gt(c), d = Math.max(0, u.left - e._positionFromLeft), f = Math.max(0, u.top - e._positionFromTop);
2140
- e.setState({ isScrolling: !0, scrollLeft: d, scrollTop: f }), s({ scrollLeft: d, scrollTop: f });
2141
- }
2142
- }
2143
- }), p(e, "__resetIsScrolling", function() {
2144
- e.setState({ isScrolling: !1 });
2145
- }), e;
2146
- }
2147
- return D(o, x.PureComponent), A(o, [{ key: "updatePosition", value: function() {
2148
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.props.scrollElement, t = this.props.onResize, n = this.state, r = n.height, l = n.width, i = this._child || this._windowScrollerRef.current;
2149
- if (i instanceof Element && e) {
2150
- var a = function(c, u) {
2151
- if (Ae(u) && document.documentElement) {
2152
- var d = document.documentElement, f = re(c), h = re(d);
2153
- return { top: f.top - h.top, left: f.left - h.left };
2154
- }
2155
- var g = gt(u), v = re(c), _ = re(u);
2156
- return { top: v.top + g.top - _.top, left: v.left + g.left - _.left };
2157
- }(i, e);
2158
- this._positionFromTop = a.top, this._positionFromLeft = a.left;
2159
- }
2160
- var s = mt(e, this.props);
2161
- r === s.height && l === s.width || (this.setState({ height: s.height, width: s.width }), t({ height: s.height, width: s.width })), this.props.updateScrollTopOnUpdatePosition === !0 && (this.__handleWindowScrollEvent(), this.__resetIsScrolling());
2162
- } }, { key: "componentDidMount", value: function() {
2163
- var e = this.props.scrollElement;
2164
- this._detectElementResize = Tt(), this.updatePosition(e), e && (ft(this, e), this._registerResizeListener(e)), this._isMounted = !0;
2165
- } }, { key: "componentDidUpdate", value: function(e, t) {
2166
- var n = this.props.scrollElement, r = e.scrollElement;
2167
- r !== n && r != null && n != null && (this.updatePosition(n), pt(this, r), ft(this, n), this._unregisterResizeListener(r), this._registerResizeListener(n));
2168
- } }, { key: "componentWillUnmount", value: function() {
2169
- var e = this.props.scrollElement;
2170
- e && (pt(this, e), this._unregisterResizeListener(e)), this._isMounted = !1;
2171
- } }, { key: "render", value: function() {
2172
- var e = this.props.children, t = this.state, n = t.isScrolling, r = t.scrollTop, l = t.scrollLeft, i = t.height, a = t.width;
2173
- return x.createElement("div", { ref: this._windowScrollerRef }, e({ onChildScroll: this._onChildScroll, registerChild: this._registerChild, height: i, isScrolling: n, scrollLeft: l, scrollTop: r, width: a }));
2174
- } }]);
2175
- }();
2176
- p(Ko, "defaultProps", { onResize: function() {
2177
- }, onScroll: function() {
2178
- }, scrollingResetTimeInterval: 150, scrollElement: Yt(), serverHeight: 0, serverWidth: 0 });
2179
- const ie = "ReactVirtualizedDemo-flexContainer", Jt = "ReactVirtualizedDemo-tableRow", Zt = "ReactVirtualizedDemo-tableRowHover", ke = "ReactVirtualizedDemo-tableCell", Me = "ReactVirtualizedDemo-noClick";
2180
- class $o extends yt.PureComponent {
2181
- constructor() {
2182
- super(...arguments), this.getRowClassName = ({ index: e }) => {
2183
- const { onRowClick: t } = this.props;
2184
- return Se(Jt, ie, { [Zt]: e !== -1 && t != null });
2185
- }, this.cellRenderer = ({ cellData: e, dataKey: t, columnIndex: n, width: r }) => {
2186
- const { columns: l, rowHeight: i, onRowClick: a } = this.props;
2187
- let s = e, c = { height: i, paddingRight: "2px", paddingTop: "0px", paddingBottom: "0px", minWidth: `${r}px`, maxWidth: `${r}px` };
2188
- return t === "shortcut" ? s = po(e) : t === "description" && (c = { ...c, fontSize: ".75rem", display: "block", paddingTop: "4px", whiteSpace: "pre-line" }), W(We, { component: "div", className: Se(ke, ie, { [Me]: a == null }), variant: "body", style: c, align: n != null && l[n].numeric ? "right" : "left", children: s });
2189
- }, this.headerRenderer = ({ label: e, columnIndex: t, width: n }) => {
2190
- const { headerHeight: r, columns: l } = this.props, i = l[t];
2191
- return W(We, { component: "div", className: Se(ke, ie, Me), variant: "head", sx: { width: n, height: r, backgroundColor: (a) => a.palette.grey[300] }, align: i.numeric ? "right" : "left", children: W("span", { children: i.label }) });
2192
- };
2193
- }
2194
- static {
2195
- this.defaultProps = { headerHeight: 40, rowHeight: 48 };
2196
- }
2197
- render() {
2198
- const { columns: e, rowHeight: t, headerHeight: n, ...r } = this.props;
2199
- return W(Pt, { children: ({ height: l, width: i }) => W(Oe, { height: l, width: i, rowHeight: t, gridStyle: { direction: "inherit" }, headerHeight: n, ...r, rowClassName: this.getRowClassName, children: e.map(({ dataKey: a, width: s, widthLess: c, ...u }, d) => {
2200
- const f = c ? i - c : s;
2201
- return W(_e, { style: { flex: `1 1 ${f}px` }, headerRenderer: (h) => this.headerRenderer({ ...h, width: f, columnIndex: d }), className: ie, cellDataGetter: ({ rowData: h, columnData: g, dataKey: v }) => h[v], cellRenderer: (h) => this.cellRenderer({ ...h, width: f, columnIndex: d }), dataKey: a, width: f, ...u }, a);
2202
- }) }) });
2203
- }
2204
- }
2205
- const Xo = Ro($o)(({ theme: o }) => ({ "& .ReactVirtualized__Table__headerRow": { ...o.direction === "rtl" && { paddingLeft: "0 !important" }, ...o.direction !== "rtl" && { paddingRight: void 0 } }, "& .ReactVirtualized__Table__Grid": { outline: "none" }, [`& .${ie}`]: { display: "flex", alignItems: "center", boxSizing: "border-box" }, [`& .${Jt}`]: { cursor: "pointer" }, [`& .${Zt}`]: { "&:hover:not([disabled])": { backgroundColor: o.palette.grey[200] } }, [`& .${ke}`]: { flex: 1 }, [`& .${Me}`]: { cursor: "initial" } }));
2206
- function Yo(o) {
2207
- const { commands: e, ...t } = o, [n, r] = he(!1), [l, i] = he(""), a = vo(() => {
2208
- let h = e.getAllCommands();
2209
- n || (h = h.filter((_) => _.command.shortcut())), h.sort((_, S) => _.command.label().localeCompare(S.command.label()));
2210
- const g = [], v = (_) => _.replace(/\n\n/g, `
2211
- `);
2212
- for (let _ = 0; _ < h.length; _++) {
2213
- const S = h[_].command, m = S.shortcut();
2214
- if (Array.isArray(m)) {
2215
- const y = m;
2216
- for (let w = 0; w < y.length; w++) g.push({ label: S.label(), description: v(S.description()), shortcut: y[w] });
2217
- } else g.push({ label: S.label(), description: v(S.description()), shortcut: S.shortcut() });
2218
- }
2219
- return g;
2220
- }, [n, e]), [s, c] = he(null);
2221
- De(() => {
2222
- import("./C4lgCnqxoHUTMKx0.mjs").then((h) => {
2223
- c(new h.default(a, { threshold: 0, ignoreLocation: !0, keys: ["label", "description"] }));
2224
- });
2225
- }, [a]);
2226
- const [u, d] = he(a), f = l.length > 0 && u.length === 0;
2227
- return De(() => {
2228
- s && fo.debounce(() => {
2229
- if (l.trim().length === 0) return void d(a);
2230
- const h = s.search(l.trim()), g = new Array(h.length);
2231
- for (let v = 0; v < h.length; v++) g[v] = h[v].item;
2232
- d(g);
2233
- }, 90)();
2234
- }, [s, l]), Ee(ue, { style: { height: 440, width: "100%", display: "flex", flexDirection: "column" }, ...t, children: [Ee(ue, { sx: { display: "flex", alignItems: "center", justifyContent: "end", marginBottom: (h) => h.spacing(2), color: (h) => h.palette.text.secondary }, children: [W(Qt, { InputProps: { sx: { backgroundImage: `linear-gradient(${fe("#fff", de(5))}, ${fe("#fff", de(5))})` }, inputProps: { className: "input", autoFocus: !0, spellCheck: !1, placeholder: "Type to search key bindings", autoComplete: "off", sx: { paddingTop: (h) => h.spacing(1), paddingBottom: (h) => h.spacing(1) } }, endAdornment: W(eo, { sx: { opacity: l.length > 0 ? 1 : 0, display: l.length > 0 ? "flex" : "none" }, position: "end", children: W(to, { "aria-label": "clear search", onClick: () => i(""), edge: "end", children: W(_o, {}) }) }) }, sx: { flex: "1 1 40%", marginRight: (h) => h.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (h) => f ? `${h.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (h) => f ? `${h.palette.error.main} !important` : void 0 } }, value: l, onChange: (h) => {
2235
- i(h.target.value);
2236
- }, onKeyDown: (h) => {
2237
- h.which === St.Escape && l.length > 0 && (i(""), h.stopPropagation(), h.preventDefault());
2238
- }, onContextMenu: (h) => {
2239
- h.stopPropagation();
2240
- } }), W(oo, { sx: { flex: "1 1 60%" }, control: W(no, { checked: n, onChange: () => r(!n) }), label: "Show commands without key bindings", labelPlacement: "start" })] }), W(ue, { sx: { flex: "1 1 100%", borderRadius: (h) => `${h.shape.borderRadius}px`, border: (h) => `solid ${h.palette.divider} 1px`, paddingRight: "1px", overflow: "hidden", "* .MuiTableCell-head": { background: (h) => h.palette.background.paper, backgroundImage: `linear-gradient(${fe("#fff", de(5))}, ${fe("#fff", de(5))})` } }, children: W(Xo, { rowCount: u.length, rowGetter: (h) => u[h.index], columns: [{ width: 180, label: "Command", dataKey: "label" }, { width: 260, label: "Key Binding", dataKey: "shortcut" }, { width: 240, label: "Description", dataKey: "description", widthLess: 440 }] }) }), W(ue, { sx: { display: "flex", flexShrink: "0", paddingLeft: (h) => h.spacing(1), paddingTop: (h) => h.spacing(1), paddingRight: (h) => h.spacing(1), userSelect: "none", justifyContent: "flex-end" }, children: W(ro, { noWrap: !0, component: "div", sx: { color: (h) => f ? h.palette.error.main : h.palette.text.secondary }, children: `${u.length === 0 ? "No" : u.length} shortcut key${u.length === 1 ? "" : "s"}${l.length > 0 ? " found" : ""}` }) })] });
2241
- }
2242
- const rn = (o) => {
2243
- const { title: e = "Shortcut Keys", commands: t, sx: n, ...r } = o;
2244
- return W(mo, { isModal: !0, onKeyDown: (l) => {
2245
- l.keyCode === St.F1 && l.preventDefault();
2246
- }, sx: { width: "780px", ...n }, title: e, autoFocusSel: ".input", ...r, children: W(io, { dividers: !0, children: W(Yo, { commands: t, sx: { marginBottom: "8px" } }) }) });
2247
- };
2248
- export {
2249
- rn as default
2250
- };